Skip to content

Commit

Permalink
fix: Cannot read properties of undefined
Browse files Browse the repository at this point in the history
(cherry picked from commit 44ed52c)
  • Loading branch information
rohitwaghchaure authored and mergify[bot] committed Feb 24, 2024
1 parent d755b9d commit 3d65230
Showing 1 changed file with 4 additions and 1 deletion.
5 changes: 4 additions & 1 deletion erpnext/public/js/utils.js
Original file line number Diff line number Diff line change
Expand Up @@ -40,7 +40,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);
}
}
},

Expand Down

0 comments on commit 3d65230

Please sign in to comment.