From bb9730af7a434ffef675a04a7da2f74dce370709 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?C=C3=A9dric=20Krier?= Date: Mon, 10 Feb 2014 22:28:29 +0100 Subject: [PATCH] Fix computation of second currency amount issue3664 review3351002 (transplanted from b81862858d215919a2c3355d4075c656e5ed516b) --- invoice.py | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/invoice.py b/invoice.py index 421da9af18..dca44247ec 100644 --- a/invoice.py +++ b/invoice.py @@ -866,10 +866,10 @@ class Invoice(Workflow, ModelSQL, ModelView): term_lines = [(Date.today(), total)] for date, amount in term_lines: val = self._get_move_line(date, amount) - remainder_total_currency -= val['amount_second_currency'] + remainder_total_currency += val['amount_second_currency'] move_lines.append(val) if not self.currency.is_zero(remainder_total_currency): - move_lines[-1]['amount_second_currency'] += \ + move_lines[-1]['amount_second_currency'] -= \ remainder_total_currency accounting_date = self.accounting_date or self.invoice_date