From 80f6228d45b67147815af15b27058b0173b402af Mon Sep 17 00:00:00 2001 From: Nabin Hait Date: Tue, 4 Jun 2024 11:42:20 +0530 Subject: [PATCH] fix: Ignore disabling default currency field while creating new company (#41699) --- erpnext/setup/doctype/company/company.js | 9 +++++---- 1 file changed, 5 insertions(+), 4 deletions(-) diff --git a/erpnext/setup/doctype/company/company.js b/erpnext/setup/doctype/company/company.js index a94abbdfdf2..e39e72379bf 100644 --- a/erpnext/setup/doctype/company/company.js +++ b/erpnext/setup/doctype/company/company.js @@ -12,10 +12,11 @@ frappe.ui.form.on("Company", { } }); } - - frm.call("check_if_transactions_exist").then((r) => { - frm.toggle_enable("default_currency", !r.message); - }); + if (!frm.doc.__islocal) { + frm.call("check_if_transactions_exist").then((r) => { + frm.toggle_enable("default_currency", !r.message); + }); + } }, setup: function (frm) { frm.__rename_queue = "long";