diff --git a/erpnext/public/js/utils.js b/erpnext/public/js/utils.js index bedd094813b01f2317b40d13da79eef690aea75d..2e7c125e88f305545335361c9aab190461d2e872 100755 --- a/erpnext/public/js/utils.js +++ b/erpnext/public/js/utils.js @@ -50,7 +50,10 @@ $.extend(erpnext, { is_perpetual_inventory_enabled: function(company) { if(company) { - return frappe.get_doc(":Company", company).enable_perpetual_inventory + let company_local = locals[":Company"] && locals[":Company"][company]; + if(company_local) { + return cint(company_local.enable_perpetual_inventory); + } } },