X-Git-Url: http://wagnertech.de/gitweb/gitweb.cgi/mfinanz.git/blobdiff_plain/b3501bdfd1971fd17d06e47cdf994c7545c3c13c..9f055edb25f912aa2cb3dfd8e8a4cf20703f75a2:/bin/mozilla/is.pl diff --git a/bin/mozilla/is.pl b/bin/mozilla/is.pl index db2d4b43e..52e668233 100644 --- a/bin/mozilla/is.pl +++ b/bin/mozilla/is.pl @@ -261,10 +261,11 @@ sub prepare_invoice { # # get pricegroups for parts # IS->get_pricegroups_for_parts(\%myconfig, \%$form); + my $i = 0; + foreach $ref (@{ $form->{invoice_details} }) { $i++; - map { $form->{"${_}_$i"} = $ref->{$_} } keys %{$ref}; $form->{"discount_$i"} = $form->format_amount(\%myconfig, $form->{"discount_$i"} * 100); @@ -1013,8 +1014,10 @@ if ($form->{type} eq "credit_note") { # format amounts $totalpaid += $form->{"paid_$i"}; - $form->{"paid_$i"} = - $form->format_amount(\%myconfig, $form->{"paid_$i"}, 2); + if ($form->{"paid_$i"}) { + $form->{"paid_$i"} = + $form->format_amount(\%myconfig, $form->{"paid_$i"}, 2); + } $form->{"exchangerate_$i"} = $form->format_amount(\%myconfig, $form->{"exchangerate_$i"}); @@ -1207,8 +1210,6 @@ sub update { } else { - $form->{"selected_unit_$i"} = $form->{"unit_$i"}; - IS->retrieve_item(\%myconfig, \%$form); $rows = scalar @{ $form->{item_list} };