[FIX] account: sign of a fixed amount tax
The sign of a fixed amount tax must be the same as the base amount. Inspired from the computation of a percent tax. opw:682407
This commit is contained in:
@@ -613,7 +613,7 @@ class AccountTax(models.Model):
|
||||
"""
|
||||
self.ensure_one()
|
||||
if self.amount_type == 'fixed':
|
||||
return math.copysign(self.amount, base_amount) * quantity
|
||||
return math.copysign(self.amount, base_amount) * abs(quantity)
|
||||
if (self.amount_type == 'percent' and not self.price_include) or (self.amount_type == 'division' and self.price_include):
|
||||
return base_amount * self.amount / 100
|
||||
if self.amount_type == 'percent' and self.price_include:
|
||||
|
||||
Reference in New Issue
Block a user