Projekt

Allgemein

Profil

« Zurück | Weiter » 

Revision 5a9d765f

Von Philip Reetz vor etwa 17 Jahren hinzugefügt

  • ID 5a9d765f8503e6c1be32fd5a71d8f551e2f0da94
  • Vorgänger 6ca711a5
  • Nachfolger 3505ff1b

In Berichten ar und oe auch die prozentuale Marge bei Zwischensummen und Gesammtsummen ausgeben

Unterschiede anzeigen:

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};

Auch abrufbar als: Unified diff