Projekt

Allgemein

Profil

« Zurück | Weiter » 

Revision 3505ff1b

Von Moritz Bunkus vor mehr als 17 Jahren hinzugefügt

  • ID 3505ff1bb654d331bd384461d471fa895635e7b4
  • Vorgänger 5a9d765f
  • Nachfolger 1a6dada1

Vermeiden, dass versucht wird, durch 0 zu teilen.

Unterschiede anzeigen:

bin/mozilla/ar.pl
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);
bin/mozilla/oe.pl
map { $subtotals{$_} += $oe->{$_};
$totals{$_} += $oe->{$_} } @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 { $oe->{$_} = $form->format_amount(\%myconfig, $oe->{$_}, 2) } qw(netamount tax amount marge_total marge_percent);

Auch abrufbar als: Unified diff