From 7f031d1bfd32b2e1a46c4e8dbaafc347ea47d46c Mon Sep 17 00:00:00 2001 From: Rohit Waghchaure Date: Tue, 2 Aug 2016 11:07:40 +0530 Subject: [PATCH] minor fix in payment entry --- erpnext/accounts/doctype/payment_entry/payment_entry.py | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) diff --git a/erpnext/accounts/doctype/payment_entry/payment_entry.py b/erpnext/accounts/doctype/payment_entry/payment_entry.py index 6c04cf53cc..175ebdade2 100644 --- a/erpnext/accounts/doctype/payment_entry/payment_entry.py +++ b/erpnext/accounts/doctype/payment_entry/payment_entry.py @@ -569,10 +569,9 @@ def get_company_defaults(company): @frappe.whitelist() def get_reference_details(reference_doctype, reference_name, party_account_currency): total_amount = outstanding_amount = exchange_rate = None + ref_doc = frappe.get_doc(reference_doctype, reference_name) if reference_doctype != "Journal Entry": - ref_doc = frappe.get_doc(reference_doctype, reference_name) - if party_account_currency == ref_doc.company_currency: total_amount = ref_doc.base_grand_total exchange_rate = 1