Normalize the usage of amount second currency

issue3663
review14921002
This commit is contained in:
Cédric Krier committed 2015-02-10 00:02:29 +01:00
1 parent f0307c3027
commit 36bee66bb7
1 file changed
+2 -3
+2 -3
View File
@@ -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