From 752ea7ee7d05d081a08ebc03f0eb7a87e0ea3d9b Mon Sep 17 00:00:00 2001 From: Bhavan23 Date: Sun, 12 Oct 2025 19:46:40 +0000 Subject: [PATCH] fix(accounts-receivable): ensure report data with party account currency --- .../report/accounts_receivable/accounts_receivable.py | 11 ++++++++++- 1 file changed, 10 insertions(+), 1 deletion(-) diff --git a/erpnext/accounts/report/accounts_receivable/accounts_receivable.py b/erpnext/accounts/report/accounts_receivable/accounts_receivable.py index 9e1112ba117..d77f0d087ff 100644 --- a/erpnext/accounts/report/accounts_receivable/accounts_receivable.py +++ b/erpnext/accounts/report/accounts_receivable/accounts_receivable.py @@ -666,7 +666,16 @@ class ReceivablePayableReport: invoiced = d.base_payment_amount paid_amount = d.base_paid_amount - if company_currency == d.party_account_currency or self.filters.get("in_party_currency"): + in_party_currency = self.filters.get("in_party_currency") + # company, billing, and party account currencies are the same + if company_currency == d.currency and company_currency == d.party_account_currency: + in_party_currency = False + + # When filtered by party currency and the billing currency not matches the party account currency + if in_party_currency and d.currency != d.party_account_currency: + in_party_currency = False + + if in_party_currency: invoiced = d.payment_amount paid_amount = d.paid_amount