From 36bee66bb72423debb5671c59e7b78d189ff0be6 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?C=C3=A9dric=20Krier?= Date: Tue, 10 Feb 2015 00:02:29 +0100 Subject: [PATCH] Normalize the usage of amount second currency issue3663 review14921002 --- dunning.py | 5 ++--- 1 file changed, 2 insertions(+), 3 deletions(-) diff --git a/dunning.py b/dunning.py index d0e48d04c8..295df9f794 100644 --- a/dunning.py +++ b/dunning.py @@ -128,14 +128,13 @@ class Letter(CompanyReport): @staticmethod def get_payment_amount(payment): if payment.amount_second_currency: - return payment.amount_second_currency.copy_sign( - payment.credit - payment.debit) + return -payment.amount_second_currency else: return payment.credit - payment.debit @staticmethod def get_payment_currency(payment): - if payment.amount_second_currency: + if payment.second_currency: return payment.second_currency else: return payment.account.company.currency