Merge pull request #31950 from ruthra-kumar/party_currency_or_multi_currency

fix: display amount in account currency if party is supplied
This commit is contained in:
Deepesh Garg 2022-08-25 10:33:49 +05:30 committed by GitHub
commit 40bf1a50fd
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23

View File

@ -192,6 +192,10 @@ class ReceivablePayableReport(object):
if not row:
return
# 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
@ -690,7 +694,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,
)