From 1b5a23709a751f925d78c476bd5e51b743135d3f Mon Sep 17 00:00:00 2001 From: ruthra kumar Date: Tue, 27 Feb 2024 15:34:34 +0530 Subject: [PATCH] fix: incorrect exchange rate if JE has multi parties (cherry picked from commit 694c17487d76ddc38764d58311ff2153a15d1ee5) --- .../payment_reconciliation/payment_reconciliation.py | 7 ++++++- 1 file changed, 6 insertions(+), 1 deletion(-) diff --git a/erpnext/accounts/doctype/payment_reconciliation/payment_reconciliation.py b/erpnext/accounts/doctype/payment_reconciliation/payment_reconciliation.py index 5605d068187f..33f736fe915f 100644 --- a/erpnext/accounts/doctype/payment_reconciliation/payment_reconciliation.py +++ b/erpnext/accounts/doctype/payment_reconciliation/payment_reconciliation.py @@ -566,7 +566,12 @@ def get_invoice_exchange_map(self, invoices, payments): journals_map = frappe._dict( frappe.db.get_all( "Journal Entry Account", - filters={"parent": ("in", journals), "account": ("in", [self.receivable_payable_account])}, + filters={ + "parent": ("in", journals), + "account": ("in", [self.receivable_payable_account]), + "party_type": self.party_type, + "party": self.party, + }, fields=[ "parent as `name`", "exchange_rate",