Revision 36bdd487
Von Bernd Bleßmann vor etwa 6 Jahren hinzugefügt
SL/DB/Helper/PriceTaxCalculator.pm | ||
---|---|---|
96 | 96 |
|
97 | 97 |
my $num_dec = max 2, _num_decimal_places($item->sellprice); |
98 | 98 |
|
99 |
# don't include rounded discount into sellprice |
|
99 |
|
|
100 |
# don't include rounded discount into sellprice for calculation |
|
100 | 101 |
# any time the sellprice is multiplied with qty discount has to be considered as part of the multiplication |
101 | 102 |
my $sellprice = $item->sellprice; |
102 | 103 |
|
... | ... | |
161 | 162 |
|
162 | 163 |
$data->{last_incex_chart_id} = $chart->id if $data->{is_sales}; |
163 | 164 |
|
165 |
my $item_sellprice = _round($sellprice * (1 - $item->discount), $num_dec); |
|
166 |
|
|
164 | 167 |
push @{ $data->{items} }, { |
165 | 168 |
linetotal => $linetotal, |
166 | 169 |
linetotal_cost => $linetotal_cost, |
167 |
sellprice => $sellprice, |
|
170 |
sellprice => $item_sellprice,
|
|
168 | 171 |
tax_amount => $tax_amount, |
169 | 172 |
taxkey_id => $taxkey->id, |
170 | 173 |
}; |
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"