fix: display amount in account currency if party is supplied

(cherry picked from commit e5b04d54ff)
This commit is contained in:
ruthra kumar
2022-08-24 17:05:13 +05:30
committed by Mergify
parent 362976fa42
commit 15915d7053

View File

@@ -187,7 +187,11 @@ class ReceivablePayableReport(object):
if not row:
return
amount = ple.amount
# amount in "Party Currency", if its supplied. If not, amount in company currency
if self.filters.get(scrub(self.party_type)):
amount = ple.amount_in_account_currency
else:
amount = ple.amount
amount_in_account_currency = ple.amount_in_account_currency
# update voucher
@@ -685,7 +689,7 @@ class ReceivablePayableReport(object):
ple.party,
ple.posting_date,
ple.due_date,
ple.account_currency.as_("currency"),
ple.account_currency,
ple.amount,
ple.amount_in_account_currency,
)