* fix: Cannot read properties of undefined
(cherry picked from commit 44ed52c5cf)
* chore: fix linter issue
---------
Co-authored-by: Rohit Waghchaure <rohitw1991@gmail.com>
This commit is contained in:
@@ -40,7 +40,10 @@ $.extend(erpnext, {
|
|||||||
|
|
||||||
is_perpetual_inventory_enabled: function(company) {
|
is_perpetual_inventory_enabled: function(company) {
|
||||||
if(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);
|
||||||
|
}
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
|
|
||||||
|
|||||||
@@ -702,10 +702,7 @@ class StockReconciliation(StockController):
|
|||||||
if allow_negative_stock:
|
if allow_negative_stock:
|
||||||
return True
|
return True
|
||||||
|
|
||||||
if any(
|
if any((d.batch_no and flt(d.qty) == flt(d.current_qty)) for d in self.items):
|
||||||
(d.batch_no and flt(d.qty) == flt(d.current_qty))
|
|
||||||
for d in self.items
|
|
||||||
):
|
|
||||||
allow_negative_stock = True
|
allow_negative_stock = True
|
||||||
|
|
||||||
return allow_negative_stock
|
return allow_negative_stock
|
||||||
|
|||||||
Reference in New Issue
Block a user