Revision b6cc2106
Von Niclas Zimmermann vor fast 12 Jahren hinzugefügt
bin/mozilla/vk.pl | ||
---|---|---|
336 | 336 |
# discount was already accounted for in db sellprice |
337 | 337 |
$ar->{sellprice} = $ar->{sellprice} / $ar->{price_factor} / $basefactor; |
338 | 338 |
$ar->{lastcost} = $ar->{lastcost} / $ar->{price_factor} / $basefactor; |
339 |
$ar->{sellprice_total} = $ar->{qty} * ( $ar->{fxsellprice} * ( 1 - $ar->{discount} ) ) / $ar->{price_factor};
|
|
340 |
$ar->{lastcost_total} = $ar->{qty} * $ar->{lastcost} * $basefactor;
|
|
339 |
$ar->{sellprice_total} = $form->round_amount( $ar->{qty} * ( $ar->{fxsellprice} * ( 1 - $ar->{discount} ) ) / $ar->{price_factor}, 2);
|
|
340 |
$ar->{lastcost_total} = $form->round_amount( $ar->{qty} * $ar->{lastcost} * $basefactor, 2);
|
|
341 | 341 |
# marge_percent wird neu berechnet, da Wert in invoice leer ist (Bug) |
342 | 342 |
$ar->{marge_percent} = $ar->{sellprice_total} ? (($ar->{sellprice_total}-$ar->{lastcost_total}) / $ar->{sellprice_total} * 100) : 0; |
343 | 343 |
# marge_total neu berechnen |
... | ... | |
428 | 428 |
# wird laufend bei jeder Position neu berechnet |
429 | 429 |
$totals{marge_percent} = $totals{sellprice_total} ? ( ($totals{sellprice_total} - $totals{lastcost_total}) / $totals{sellprice_total} ) * 100 : 0; |
430 | 430 |
|
431 |
map { $ar->{$_} = $form->format_amount(\%myconfig, $ar->{$_}, 2) } qw(marge_total marge_percent qty); |
|
431 |
map { $ar->{$_} = $form->format_amount(\%myconfig, $ar->{$_}, 2) } qw(marge_total marge_percent qty sellprice_total lastcost_total);
|
|
432 | 432 |
map { $ar->{$_} = $form->format_amount(\%myconfig, $ar->{$_}, 3) } qw(weight); |
433 |
map { $ar->{$_} = $form->format_amount(\%myconfig, $ar->{$_}, $form->{"decimalplaces"} )} qw(lastcost sellprice sellprice_total lastcost_total);
|
|
433 |
map { $ar->{$_} = $form->format_amount(\%myconfig, $ar->{$_}, $form->{"decimalplaces"} )} qw(lastcost sellprice); |
|
434 | 434 |
|
435 | 435 |
my $row = { }; |
436 | 436 |
|
Auch abrufbar als: Unified diff
Angleichung Verkaufsbericht an Verkauf-Berichte-Rechnungen
Der Ertrag/Einkaufsbetrag/Verkaufsbetrag wurde bisher im
Verkaufsbericht anders berechnet als in Verkauf-Berichte-
Rechnungen.
Behebt Bug #1990.