Revision 4c438c0a
Von Niclas Zimmermann vor etwa 12 Jahren hinzugefügt
bin/mozilla/vk.pl | ||
---|---|---|
344 | 344 |
$ar->{marge_total} = $ar->{sellprice_total} ? $ar->{sellprice_total}-$ar->{lastcost_total} : 0; |
345 | 345 |
$ar->{discount} *= 100; # für Ausgabe formatieren, 10% stored as 0.1 in db |
346 | 346 |
|
347 |
#adapt qty to the chosen unit |
|
348 |
$ar->{qty} *= $basefactor; |
|
349 |
|
|
350 |
#weight is the still the weight per part, but here we want the total weight |
|
351 |
$ar->{weight} *= $ar->{qty}; |
|
352 |
|
|
347 | 353 |
# Anfangshauptüberschrift |
348 | 354 |
if ( $form->{l_headers_mainsort} eq "Y" && ( $idx == 0 or $ar->{ $form->{'mainsort'} } ne $form->{AR}->[$idx - 1]->{ $form->{'mainsort'} } )) { |
349 | 355 |
my $headerrow; |
... | ... | |
422 | 428 |
# wird laufend bei jeder Position neu berechnet |
423 | 429 |
$totals{marge_percent} = $totals{sellprice_total} ? ( ($totals{sellprice_total} - $totals{lastcost_total}) / $totals{sellprice_total} ) * 100 : 0; |
424 | 430 |
|
425 |
#passt die qty an die gewählte Einheit an |
|
426 |
#qty wurde bisher noch für andere Berechnungen benötigt und daher erst am Schluss überschrieben |
|
427 |
$ar->{qty} *= $basefactor; |
|
428 |
|
|
429 |
#weight is the still the weight per part, but here we want the total weight |
|
430 |
$ar->{weight} *= $ar->{qty}; |
|
431 |
|
|
432 |
map { $ar->{$_} = $form->format_amount(\%myconfig, $ar->{$_}, 2) } qw(marge_total marge_percent); |
|
431 |
map { $ar->{$_} = $form->format_amount(\%myconfig, $ar->{$_}, 2) } qw(marge_total marge_percent qty); |
|
432 |
map { $ar->{$_} = $form->format_amount(\%myconfig, $ar->{$_}, 3) } qw(weight); |
|
433 | 433 |
map { $ar->{$_} = $form->format_amount(\%myconfig, $ar->{$_}, $form->{"decimalplaces"} )} qw(lastcost sellprice sellprice_total lastcost_total); |
434 | 434 |
|
435 | 435 |
my $row = { }; |
... | ... | |
521 | 521 |
$row->{description}->{data} = $locale->text('Total') . ' ' . $name; |
522 | 522 |
}; |
523 | 523 |
|
524 |
map { $row->{$_}->{data} = $form->format_amount(\%myconfig, $totals->{$_}, 2) } qw(marge_total marge_percent weight);
|
|
525 |
map { $row->{$_}->{data} = $form->format_amount(\%myconfig, $totals->{$_}, 0) } qw(qty);
|
|
524 |
map { $row->{$_}->{data} = $form->format_amount(\%myconfig, $totals->{$_}, 2) } qw(marge_total marge_percent qty);
|
|
525 |
map { $row->{$_}->{data} = $form->format_amount(\%myconfig, $totals->{$_}, 3) } qw(weight);
|
|
526 | 526 |
map { $row->{$_}->{data} = $form->format_amount(\%myconfig, $totals->{$_}, $form->{decimalplaces}) } qw(lastcost sellprice sellprice_total lastcost_total); |
527 | 527 |
|
528 | 528 |
|
Auch abrufbar als: Unified diff
Rundungsfehler in Verkaufsbericht
In der Verkaufsbericht gab es je nach Anzeigeoptionen noch
Rundungsfehler.
qty wird nun auf 2 Stellen gerundet und weight auf 3 Stellen.