X-Git-Url: http://wagnertech.de/gitweb/gitweb.cgi/mfinanz.git/blobdiff_plain/b3501bdfd1971fd17d06e47cdf994c7545c3c13c..9f055edb25f912aa2cb3dfd8e8a4cf20703f75a2:/bin/mozilla/ir.pl diff --git a/bin/mozilla/ir.pl b/bin/mozilla/ir.pl index 6038276b6..541eb6c06 100644 --- a/bin/mozilla/ir.pl +++ b/bin/mozilla/ir.pl @@ -112,7 +112,7 @@ sub invoice_links { } # currencies - @curr = split /:/, $form->{currencies}; + @curr = split(/:/, $form->{currencies}); chomp $curr[0]; $form->{defaultcurrency} = $curr[0]; @@ -189,6 +189,7 @@ sub prepare_invoice { map { $form->{$_} =~ s/\"/"/g } qw(invnumber ordnumber quonumber); + my $i = 0; foreach $ref (@{ $form->{invoice_details} }) { $i++; map { $form->{"${_}_$i"} = $ref->{$_} } keys %{$ref}; @@ -684,8 +685,10 @@ sub form_footer { s/option>\Q$form->{"AP_paid_$i"}\E/option selected>$form->{"AP_paid_$i"}/; # format amounts - $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"}); @@ -831,8 +834,6 @@ sub update { } else { - $form->{"selected_unit_$i"} = $form->{"unit_$i"}; - IR->retrieve_item(\%myconfig, \%$form); my $rows = scalar @{ $form->{item_list} };