This commit is contained in:
oscar alvarez 2023-11-09 17:18:29 -05:00
parent d9d0f4832c
commit 166b77f007
1 changed files with 2 additions and 2 deletions

View File

@ -1750,11 +1750,11 @@ class FolioCharge(Workflow, ModelSQL, ModelView):
def set_unit_price_w_tax(cls, charges, name, value):
Tax = Pool().get('account.tax')
to_write = []
rvalue = Decimal(value).quantize('0.01')
rvalue = Decimal(value).quantize(Decimal('0.01'))
for charge in charges:
taxes = charge.product.customer_taxes_used
unit_price = Tax.reverse_compute(rvalue, taxes)
unit_price = Decimal(unit_price).quantize('0.01')
unit_price = Decimal(unit_price).quantize(Decimal('0.01'))
to_write.extend([[charge], {
'unit_price': unit_price,
}])