Remove rounding on each lines for tax computation
This commit is contained in:
+1
-2
@@ -189,12 +189,11 @@ class Purchase(OSV):
|
||||
purchase, context=context))
|
||||
res.setdefault(purchase.id, Decimal('0.0'))
|
||||
for line in purchase.lines:
|
||||
# Don't round on each line to handle rounding error
|
||||
for tax in tax_obj.compute(
|
||||
cursor, user, [t.id for t in line.taxes], line.unit_price,
|
||||
line.quantity, context=ctx):
|
||||
res[purchase.id] += tax['amount']
|
||||
res[purchase.id] = currency_obj.round(cursor, user, purchase.currency,
|
||||
res[purchase.id])
|
||||
res[purchase.id] = currency_obj.round(cursor, user, purchase.currency,
|
||||
res[purchase.id])
|
||||
return res
|
||||
|
||||
Reference in New Issue
Block a user