fix(accounts-receivable): ensure report data with party account currency

(cherry picked from commit 752ea7ee7d)
This commit is contained in:
Bhavan23
2025-10-12 19:46:40 +00:00
committed by Mergify
parent e1afcb39db
commit 164333a730

View File

@@ -664,7 +664,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