Revision 3505ff1b
Von Moritz Bunkus vor mehr als 17 Jahren hinzugefügt
bin/mozilla/ar.pl | ||
---|---|---|
1532 | 1532 |
map { $subtotals{$_} += $ar->{$_}; |
1533 | 1533 |
$totals{$_} += $ar->{$_} } @subtotal_columns; |
1534 | 1534 |
|
1535 |
$subtotals{marge_percent} = $subtotals{marge_total} / $subtotals{netamount} * 100;
|
|
1536 |
$totals{marge_percent} = $totals{marge_total} / $totals{netamount} * 100;
|
|
1535 |
$subtotals{marge_percent} = $subtotals{netamount} ? ($subtotals{marge_total} * 100 / $subtotals{netamount}) : 0;
|
|
1536 |
$totals{marge_percent} = $totals{netamount} ? ($totals{marge_total} * 100 / $totals{netamount} ) : 0;
|
|
1537 | 1537 |
|
1538 | 1538 |
map { $ar->{$_} = $form->format_amount(\%myconfig, $ar->{$_}, 2) } qw(netamount tax amount paid due marge_total marge_percent); |
1539 | 1539 |
|
bin/mozilla/oe.pl | ||
---|---|---|
1779 | 1779 |
|
1780 | 1780 |
map { $subtotals{$_} += $oe->{$_}; |
1781 | 1781 |
$totals{$_} += $oe->{$_} } @subtotal_columns; |
1782 |
$subtotals{marge_percent} = $subtotals{marge_total} / $subtotals{netamount} * 100; |
|
1783 |
$totals{marge_percent} = $totals{marge_total} / $totals{netamount} * 100; |
|
1782 |
|
|
1783 |
$subtotals{marge_percent} = $subtotals{netamount} ? ($subtotals{marge_total} * 100 / $subtotals{netamount}) : 0; |
|
1784 |
$totals{marge_percent} = $totals{netamount} ? ($totals{marge_total} * 100 / $totals{netamount} ) : 0; |
|
1784 | 1785 |
|
1785 | 1786 |
map { $oe->{$_} = $form->format_amount(\%myconfig, $oe->{$_}, 2) } qw(netamount tax amount marge_total marge_percent); |
1786 | 1787 |
|
Auch abrufbar als: Unified diff
Vermeiden, dass versucht wird, durch 0 zu teilen.