From: Jan Büren Date: Mon, 20 Jan 2014 10:16:20 +0000 (+0100) Subject: Standard-Umlaufvermögen-Konto auch für Debitoren- und Kreditorenbuchung vorbelegen X-Git-Tag: release-3.1.0beta1~20^2~2^2~3 X-Git-Url: http://wagnertech.de/git?a=commitdiff_plain;h=5be8f31261931722ee1e33d553282140c323e6a9;p=kivitendo-erp.git Standard-Umlaufvermögen-Konto auch für Debitoren- und Kreditorenbuchung vorbelegen closes #2385 --- 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 %]