From 69cdf59d633c16d714058fa75931370a9665ef3d Mon Sep 17 00:00:00 2001 From: Nabin Hait Date: Sat, 2 May 2015 18:46:10 +0530 Subject: [PATCH] Maintain same currency exchnage rate while mapping --- erpnext/public/js/controllers/transaction.js | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/erpnext/public/js/controllers/transaction.js b/erpnext/public/js/controllers/transaction.js index f62eed2175..b45e1208ce 100644 --- a/erpnext/public/js/controllers/transaction.js +++ b/erpnext/public/js/controllers/transaction.js @@ -214,7 +214,8 @@ erpnext.TransactionController = erpnext.taxes_and_totals.extend({ this.set_dynamic_labels(); var company_currency = this.get_company_currency(); - if(this.frm.doc.currency !== company_currency) { + // Added `ignore_pricing_rule` to determine if document is loading after mapping from another doc + if(this.frm.doc.currency !== company_currency && !this.frm.doc.ignore_pricing_rule) { this.get_exchange_rate(this.frm.doc.currency, company_currency, function(exchange_rate) { me.frm.set_value("conversion_rate", exchange_rate);