[FIX] account,point_of_sale: Fix 'fixed' price-included tax with negative quantity
closes odoo/odoo#73324 Ticket: 2585188 X-original-commit: 1417a34c6e3dc6f2826e605ad60de1030c80b186 Signed-off-by: oco-odoo <oco-odoo@users.noreply.github.com> Signed-off-by: Laurent Smet <smetl@users.noreply.github.com>
This commit is contained in:
@@ -502,7 +502,7 @@ class AccountTax(models.Model):
|
||||
elif tax.amount_type == 'division':
|
||||
incl_division_amount += tax.amount * sum_repartition_factor
|
||||
elif tax.amount_type == 'fixed':
|
||||
incl_fixed_amount += quantity * tax.amount * sum_repartition_factor
|
||||
incl_fixed_amount += abs(quantity) * tax.amount * sum_repartition_factor
|
||||
else:
|
||||
# tax.amount_type == other (python)
|
||||
tax_amount = tax._compute_amount(base, sign * price_unit, quantity, product, partner) * sum_repartition_factor
|
||||
|
||||
@@ -2182,7 +2182,7 @@ exports.Orderline = Backbone.Model.extend({
|
||||
else if(tax.amount_type === 'division')
|
||||
incl_division_amount += tax.amount;
|
||||
else if(tax.amount_type === 'fixed')
|
||||
incl_fixed_amount += quantity * tax.amount
|
||||
incl_fixed_amount += Math.abs(quantity) * tax.amount
|
||||
else{
|
||||
var tax_amount = self._compute_all(tax, base, quantity);
|
||||
incl_fixed_amount += tax_amount;
|
||||
|
||||
Reference in New Issue
Block a user