X-Git-Url: http://wagnertech.de/git?a=blobdiff_plain;f=bin%2Fmozilla%2Fir.pl;h=ced248f4807b6a2f046461ad63db6dbbe9f5ca4d;hb=c9902d7658d0cacdf665971b32de0e054637efd0;hp=1dafe84512a9477845950fe29e474d6c80994498;hpb=6cf3f7762efd40bee49a2b8f11bb4ab6915d9071;p=kivitendo-erp.git diff --git a/bin/mozilla/ir.pl b/bin/mozilla/ir.pl index 1dafe8451..ced248f48 100644 --- a/bin/mozilla/ir.pl +++ b/bin/mozilla/ir.pl @@ -171,7 +171,7 @@ sub invoice_links { foreach my $key (keys %{ $form->{AP_links} }) { foreach my $ref (@{ $form->{AP_links}{$key} }) { - $form->{"select$key"} .= ""; } next unless $form->{acc_trans}{$key}; @@ -393,9 +393,17 @@ sub form_footer { $form->{paidaccounts}++ if ($form->{"paid_$form->{paidaccounts}"}); $form->{paid_indices} = [ 1 .. $form->{paidaccounts} ]; + # Standard Konto für Umlaufvermögen + my $accno_arap = IS->get_standard_accno_current_assets(\%myconfig, \%$form); + for my $i (1 .. $form->{paidaccounts}) { $form->{"selectAP_paid_$i"} = $form->{selectAP_paid}; - $form->{"selectAP_paid_$i"} =~ s/option>\Q$form->{"AP_paid_$i"}\E/option selected>$form->{"AP_paid_$i"}/; + if (!$form->{"AP_paid_$i"}) { + $form->{"selectAP_paid_$i"} =~ s/option>$accno_arap--(.*?)>/option selected>$accno_arap--$1>/; + } else { + $form->{"selectAP_paid_$i"} =~ s/option>\Q$form->{"AP_paid_$i"}\E/option selected>$form->{"AP_paid_$i"}/; + } + $totalpaid += $form->{"paid_$i"}; }