Standard-Umlaufvermögen-Konto auch für Debitoren- und Kreditorenbuchung vorbelegen
authorJan Büren <jan@kivitendo-premium.de>
Mon, 20 Jan 2014 10:16:20 +0000 (11:16 +0100)
committerJan Büren <jan@kivitendo-premium.de>
Mon, 20 Jan 2014 10:16:20 +0000 (11:16 +0100)
closes #2385

bin/mozilla/ap.pl
bin/mozilla/ar.pl
templates/webpages/ap/form_header.html

index 0bb1a8b..7b16657 100644 (file)
@@ -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"};
 
index cec9db7..480507b 100644 (file)
@@ -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}));
 
 
 
index 0bd5466..dde66f7 100644 (file)
                 [% L.date_tag(temp, $temp) %]
               [% ELSE %]
                 [% $temp | html %]
-                <input type="hidden" name="[% temp %]" value="[% $temp | html %]">|;
+                <input type="hidden" name="[% temp %]" value="[% $temp | html %]">
               [% END %]
             </td>
 
             [% temp = "AP_paid_"_ i %]
             <td align="center">
               [% 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 %]
                 <input type="hidden" name="[% temp %]" value="[% $temp | html %]">