Normalize the usage of amount second currency
issue3663 review14921002
This commit is contained in:
1 parent
f0307c3027
commit
36bee66bb7
1 file changed
+2
-3
+2
-3
@@ -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
|
||||
Reference in new issue
Block a user