From 9cae3b4ecf9e8cc487ef5bb9d757cd751a094b4e Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?C=C3=A9dric=20Krier?= Date: Fri, 25 Jul 2008 12:03:38 +0200 Subject: [PATCH] Round base and tax amount on each lines of invoice for issue215 --- invoice.py | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) diff --git a/invoice.py b/invoice.py index b06028dd34..15755c7cfa 100644 --- a/invoice.py +++ b/invoice.py @@ -556,8 +556,10 @@ class Invoice(OSV): val['manual'] = False val['invoice'] = invoice.id val['description'] = tax['tax'].description - val['base'] = tax['base'] - val['amount'] = tax['amount'] + val['base'] = currency_obj.round(cursor, user, + invoice.currency, tax['base']) + val['amount'] = currency_obj.round(cursor, user, + invoice.currency, tax['amount']) if invoice.type in ('out_invoice', 'in_invoice'): val['base_code'] = tax['tax'].invoice_base_code.id