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:
rohitwaghchaure
2026-08-27 19:21:49 +05:30
committed by GitHub
parent 0849f187e7
commit 457283f2b0

View File

@@ -1949,7 +1949,7 @@ class update_entries_after:
if not item_code or not warehouse or (item_code, warehouse) in self.prev_sle_dict:
return
if frappe.db.count(
if frappe.db.exists(
"Stock Ledger Entry", {"item_code": item_code, "warehouse": warehouse, "is_cancelled": 0}
):
return