diff --git a/invoice.py b/invoice.py index 7216a58de7..15f651ec50 100644 --- a/invoice.py +++ b/invoice.py @@ -862,11 +862,11 @@ class Invoice(ModelWorkflow, ModelSQL, ModelView): remainder_total_currency = total_currency for date, amount in term_lines: val = self._get_move_line(invoice, date, amount) - remainder_total_currency -= val['amount_second_currency'] + remainder_total_currency += val['amount_second_currency'] move_lines.append(val) if not currency_obj.is_zero(invoice.currency, remainder_total_currency): - move_lines[-1]['amount_second_currency'] += remainder_total_currency + move_lines[-1]['amount_second_currency'] -= remainder_total_currency accounting_date = invoice.accounting_date or invoice.invoice_date period_id = period_obj.find(invoice.company.id, date=accounting_date)