From 5be8f31261931722ee1e33d553282140c323e6a9 Mon Sep 17 00:00:00 2001 From: =?utf8?q?Jan=20B=C3=BCren?= Date: Mon, 20 Jan 2014 11:16:20 +0100 Subject: [PATCH] =?utf8?q?Standard-Umlaufverm=C3=B6gen-Konto=20auch=20f?= =?utf8?q?=C3=BCr=20Debitoren-=20und=20Kreditorenbuchung=20vorbelegen?= MIME-Version: 1.0 Content-Type: text/plain; charset=utf8 Content-Transfer-Encoding: 8bit closes #2385 --- bin/mozilla/ap.pl | 4 ++++ bin/mozilla/ar.pl | 5 ++++- templates/webpages/ap/form_header.html | 4 ++-- 3 files changed, 10 insertions(+), 3 deletions(-) diff --git a/bin/mozilla/ap.pl b/bin/mozilla/ap.pl index 0bb1a8bc4..7b16657e5 100644 --- a/bin/mozilla/ap.pl +++ b/bin/mozilla/ap.pl @@ -375,6 +375,10 @@ sub form_header { if ( $form->{'paid_'. $form->{paidaccounts}} ) { $form->{paidaccounts}++; } + + # default account for current assets (i.e. 1801 - SKR04) + $form->{accno_arap} = IS->get_standard_accno_current_assets(\%myconfig, \%$form); + for my $i (1 .. $form->{paidaccounts}) { $form->{totalpaid} += $form->{"paid_$i"}; diff --git a/bin/mozilla/ar.pl b/bin/mozilla/ar.pl index cec9db7a6..480507bb3 100644 --- a/bin/mozilla/ar.pl +++ b/bin/mozilla/ar.pl @@ -409,12 +409,15 @@ sub form_header { gldate => $form->{"gldate_$i"}, }; + # default account for current assets (i.e. 1801 - SKR04) + $form->{accno_arap} = IS->get_standard_accno_current_assets(\%myconfig, \%$form); + $payment->{selectAR_paid} = NTI($cgi->popup_menu('-name' => "AR_paid_$i", '-id' => "AR_paid_$i", '-values' => \@AR_paid_values, '-labels' => \%chart_labels, - '-default' => $payment->{AR_paid})); + '-default' => $form->{accno_arap})); diff --git a/templates/webpages/ap/form_header.html b/templates/webpages/ap/form_header.html index 0bd5466ce..dde66f750 100644 --- a/templates/webpages/ap/form_header.html +++ b/templates/webpages/ap/form_header.html @@ -285,7 +285,7 @@ [% L.date_tag(temp, $temp) %] [% ELSE %] [% $temp | html %] - |; + [% END %] @@ -338,7 +338,7 @@ [% temp = "AP_paid_"_ i %] [% IF( changeable ) %] - [% L.select_tag(temp, ALL_CHARTS_AP_paid, value_title_sub = \AP_paid_value_title_sub, default = $temp) %] + [% L.select_tag(temp, ALL_CHARTS_AP_paid, value_title_sub = \AP_paid_value_title_sub, default = accno_arap) %] [% ELSE %] [% $temp | html %] -- 2.20.1