Revision 5a9d765f
Von Philip Reetz vor mehr als 17 Jahren hinzugefügt
bin/mozilla/ar.pl | ||
---|---|---|
1518 | 1518 |
# escape callback for href |
1519 | 1519 |
$callback = $form->escape($href); |
1520 | 1520 |
|
1521 |
my @subtotal_columns = qw(netamount amount paid due marge_total); |
|
1521 |
my @subtotal_columns = qw(netamount amount paid due marge_total marge_percent);
|
|
1522 | 1522 |
|
1523 | 1523 |
my %totals = map { $_ => 0 } @subtotal_columns; |
1524 | 1524 |
my %subtotals = map { $_ => 0 } @subtotal_columns; |
... | ... | |
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; |
|
1537 |
|
|
1535 | 1538 |
map { $ar->{$_} = $form->format_amount(\%myconfig, $ar->{$_}, 2) } qw(netamount tax amount paid due marge_total marge_percent); |
1536 | 1539 |
|
1537 | 1540 |
my $is_storno = $ar->{storno} && !$ar->{storno_id}; |
bin/mozilla/oe.pl | ||
---|---|---|
1761 | 1761 |
# escape callback for href |
1762 | 1762 |
$callback = $form->escape($href); |
1763 | 1763 |
|
1764 |
my @subtotal_columns = qw(netamount amount marge_total); |
|
1764 |
my @subtotal_columns = qw(netamount amount marge_total marge_percent);
|
|
1765 | 1765 |
|
1766 | 1766 |
my %totals = map { $_ => 0 } @subtotal_columns; |
1767 | 1767 |
my %subtotals = map { $_ => 0 } @subtotal_columns; |
... | ... | |
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 | 1784 |
|
1783 | 1785 |
map { $oe->{$_} = $form->format_amount(\%myconfig, $oe->{$_}, 2) } qw(netamount tax amount marge_total marge_percent); |
1784 | 1786 |
|
Auch abrufbar als: Unified diff
In Berichten ar und oe auch die prozentuale Marge bei Zwischensummen und Gesammtsummen ausgeben