From: Jan Büren Date: Tue, 11 Aug 2020 07:21:47 +0000 (+0200) Subject: Logik-Kosmetik: Die Variablen werden lokal für der Schleife benötigt X-Git-Tag: release-3.5.6.1~75 X-Git-Url: http://wagnertech.de/git?a=commitdiff_plain;h=52b04172a511edae60ec9b5ada327f3cdcd150e2;p=kivitendo-erp.git Logik-Kosmetik: Die Variablen werden lokal für der Schleife benötigt Aufruf von weiteren Funktionen nach der initialiserung erschwert die Lesbarkeit --- diff --git a/bin/mozilla/ap.pl b/bin/mozilla/ap.pl index 470af2542..31ac25d09 100644 --- a/bin/mozilla/ap.pl +++ b/bin/mozilla/ap.pl @@ -460,9 +460,6 @@ sub form_header { my $follow_up_trans_info = "$form->{invnumber} ($follow_up_vc)"; $::request->layout->add_javascripts("autocomplete_chart.js", "show_vc_details.js", "show_history.js", "follow_up.js", "kivi.Draft.js", "kivi.GL.js", "kivi.RecordTemplate.js", "kivi.File.js", "kivi.AP.js", "kivi.CustomerVendor.js", "kivi.Validator.js"); - my $transdate = $::form->{transdate} ? DateTime->from_kivitendo($::form->{transdate}) : DateTime->today_local; - my $first_taxchart; - # $form->{totalpaid} is used by the action bar setup to determine # whether or not canceling is allowed. Therefore it must be # calculated prior to the action bar setup. @@ -472,6 +469,9 @@ sub form_header { $form->header(); + my $transdate = $::form->{transdate} ? DateTime->from_kivitendo($::form->{transdate}) : DateTime->today_local; + my $first_taxchart; + for my $i (1 .. $form->{rowcount}) { # format amounts