X-Git-Url: http://wagnertech.de/gitweb/gitweb.cgi/mfinanz.git/blobdiff_plain/dc83feb1ebefe50e443a351a7d158517bc23d526..97908d779dfe277a4482c1be2c7e919dfd28026b:/bin/mozilla/io.pl diff --git a/bin/mozilla/io.pl b/bin/mozilla/io.pl index 365afab02..70f850a98 100644 --- a/bin/mozilla/io.pl +++ b/bin/mozilla/io.pl @@ -655,7 +655,7 @@ sub item_selected { } my $amount = - $form->{"sellprice_$i"} * (1 - $form->{"discount_$i"} / 100) * + $form->{"sellprice_$i"} * (1 - $form->{"discount_$i"}) * $form->{"qty_$i"}; map { $form->{"${_}_base"} += $amount } (split / /, $form->{"taxaccounts_$i"}); @@ -672,6 +672,7 @@ sub item_selected { $form->{"${_}_$i"} = $form->format_amount(\%myconfig, $form->{"${_}_$i"}, $decimalplaces) } qw(sellprice listprice lastcost qty) if $form->{item} ne 'assembly'; + $form->{"discount_$i"} = $form->format_amount(\%myconfig, $form->{"discount_$i"} * 100.0) if $form->{item} ne 'assembly'; delete $form->{nextsub};