fix: difference amount calculation for company currency accounts

(cherry picked from commit 48fae0c1ce)
This commit is contained in:
ruthra kumar
2023-03-16 09:54:06 +05:30
committed by Mergify
parent 524ed324fb
commit 9ab7bff0e0

View File

@@ -221,6 +221,9 @@ class PaymentReconciliation(Document):
def get_difference_amount(self, payment_entry, invoice, allocated_amount):
difference_amount = 0
if frappe.get_cached_value(
"Account", self.receivable_payable_account, "account_currency"
) != frappe.get_cached_value("Company", self.company, "default_currency"):
if invoice.get("exchange_rate") and payment_entry.get("exchange_rate", 1) != invoice.get(
"exchange_rate", 1
):