Revision 36bdd487
Von Bernd Bleßmann vor etwa 6 Jahren hinzugefügt
SL/DB/Helper/PriceTaxCalculator.pm | ||
---|---|---|
|
||
my $num_dec = max 2, _num_decimal_places($item->sellprice);
|
||
|
||
# don't include rounded discount into sellprice
|
||
|
||
# don't include rounded discount into sellprice for calculation
|
||
# any time the sellprice is multiplied with qty discount has to be considered as part of the multiplication
|
||
my $sellprice = $item->sellprice;
|
||
|
||
... | ... | |
|
||
$data->{last_incex_chart_id} = $chart->id if $data->{is_sales};
|
||
|
||
my $item_sellprice = _round($sellprice * (1 - $item->discount), $num_dec);
|
||
|
||
push @{ $data->{items} }, {
|
||
linetotal => $linetotal,
|
||
linetotal_cost => $linetotal_cost,
|
||
sellprice => $sellprice,
|
||
sellprice => $item_sellprice,
|
||
tax_amount => $tax_amount,
|
||
taxkey_id => $taxkey->id,
|
||
};
|
Auch abrufbar als: Unified diff
PTC: Rückgabe sellprice für items: Steuer und Rabatt berücksichtigen.
So war das vor dem PTC-Rundungs-Patch …
"PTC rundet nicht mehr Rabatt vor Mengenmultiplikation"