From 2a10f09d8dc221b8e8c7c519bf3f56405024afff Mon Sep 17 00:00:00 2001 From: Deepesh Garg Date: Fri, 27 May 2022 12:12:34 +0530 Subject: [PATCH] fix: Exchange rate reste to 1 on making mapped doc --- erpnext/public/js/controllers/transaction.js | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) diff --git a/erpnext/public/js/controllers/transaction.js b/erpnext/public/js/controllers/transaction.js index 05a401bdee..d11205a1ad 100644 --- a/erpnext/public/js/controllers/transaction.js +++ b/erpnext/public/js/controllers/transaction.js @@ -944,7 +944,11 @@ erpnext.TransactionController = class TransactionController extends erpnext.taxe } else { // company currency and doc currency is same // this will prevent unnecessary conversion rate triggers - this.frm.set_value("conversion_rate", 1.0); + if(this.frm.doc.currency === this.get_company_currency()) { + this.frm.set_value("conversion_rate", 1.0); + } else { + this.conversion_rate(); + } } }