correctly set frm company currency (#10944)

This commit is contained in:
tundebabzy 2017-09-29 10:51:59 +01:00 committed by Rushabh Mehta
parent b79c4a9ff6
commit 5510d0751d

View File

@ -378,7 +378,8 @@ erpnext.TransactionController = erpnext.taxes_and_totals.extend({
if(me.frm.doc.company && me.frm.fields_dict.currency) { if(me.frm.doc.company && me.frm.fields_dict.currency) {
var company_currency = me.get_company_currency(); var company_currency = me.get_company_currency();
var company_doc = frappe.get_doc(":Company", me.frm.doc.company); var company_doc = frappe.get_doc(":Company", me.frm.doc.company);
if (!me.frm.doc.currency) {
if (!me.frm.doc.currency || me.frm.doc.currency != company_currency) {
me.frm.set_value("currency", company_currency); me.frm.set_value("currency", company_currency);
} }