From 926ae17e5a32f8d2784a42b527da02b1cbc21ce5 Mon Sep 17 00:00:00 2001 From: Nabin Hait Date: Thu, 17 Sep 2015 18:42:55 +0530 Subject: [PATCH] Update journal_entry.py --- erpnext/accounts/doctype/journal_entry/journal_entry.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/erpnext/accounts/doctype/journal_entry/journal_entry.py b/erpnext/accounts/doctype/journal_entry/journal_entry.py index cb12969112..11bf3847d1 100644 --- a/erpnext/accounts/doctype/journal_entry/journal_entry.py +++ b/erpnext/accounts/doctype/journal_entry/journal_entry.py @@ -551,7 +551,7 @@ def get_payment_entry_from_purchase_invoice(purchase_invoice): """Returns new Journal Entry document as dict for given Purchase Invoice""" pi = frappe.get_doc("Purchase Invoice", purchase_invoice) - exchange_rate = get_exchange_rate(pi.debit_to, pi.party_account_currency, pi.company, + exchange_rate = get_exchange_rate(pi.credit_to, pi.party_account_currency, pi.company, pi.doctype, pi.name) jv = get_payment_entry(pi)