mirror of
https://github.com/frappe/erpnext.git
synced 2026-08-27 22:05:19 +00:00
Revert "refactor(stock): use db.count for the empty ledger check" (#58506)
Revert "refactor(stock): use db.count for the empty ledger check (#58486)"
This reverts commit 2866be2816.
This commit is contained in:
@@ -1949,7 +1949,7 @@ class update_entries_after:
|
|||||||
if not item_code or not warehouse or (item_code, warehouse) in self.prev_sle_dict:
|
if not item_code or not warehouse or (item_code, warehouse) in self.prev_sle_dict:
|
||||||
return
|
return
|
||||||
|
|
||||||
if frappe.db.count(
|
if frappe.db.exists(
|
||||||
"Stock Ledger Entry", {"item_code": item_code, "warehouse": warehouse, "is_cancelled": 0}
|
"Stock Ledger Entry", {"item_code": item_code, "warehouse": warehouse, "is_cancelled": 0}
|
||||||
):
|
):
|
||||||
return
|
return
|
||||||
|
|||||||
Reference in New Issue
Block a user