fix: Exchange rate reste to 1 on making mapped doc

(cherry picked from commit 2a10f09d8d)
This commit is contained in:
Deepesh Garg
2022-05-27 12:12:34 +05:30
committed by Mergify
parent 91e935fee7
commit e5b586ffd5

View File

@@ -1055,7 +1055,11 @@ erpnext.TransactionController = erpnext.taxes_and_totals.extend({
} 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();
}
}
},