X-Git-Url: http://wagnertech.de/gitweb/gitweb.cgi/mfinanz.git/blobdiff_plain/5a9d765f8503e6c1be32fd5a71d8f551e2f0da94..2ef21b8f2aaae439a9408977458bdeb9b0fd9e25:/bin/mozilla/ar.pl diff --git a/bin/mozilla/ar.pl b/bin/mozilla/ar.pl index 161dde9a0..11a12e440 100644 --- a/bin/mozilla/ar.pl +++ b/bin/mozilla/ar.pl @@ -1532,8 +1532,8 @@ sub ar_transactions { map { $subtotals{$_} += $ar->{$_}; $totals{$_} += $ar->{$_} } @subtotal_columns; - $subtotals{marge_percent} = $subtotals{marge_total} / $subtotals{netamount} * 100; - $totals{marge_percent} = $totals{marge_total} / $totals{netamount} * 100; + $subtotals{marge_percent} = $subtotals{netamount} ? ($subtotals{marge_total} * 100 / $subtotals{netamount}) : 0; + $totals{marge_percent} = $totals{netamount} ? ($totals{marge_total} * 100 / $totals{netamount} ) : 0; map { $ar->{$_} = $form->format_amount(\%myconfig, $ar->{$_}, 2) } qw(netamount tax amount paid due marge_total marge_percent);