mirror of
https://github.com/frappe/erpnext.git
synced 2026-08-28 06:08:25 +00:00
Merge pull request #58522 from frappe/mergify/bp/version-15-hotfix/pr-58521
Revert "refactor(stock): use db.count for the empty ledger check (backport #58486)" (backport #58521)
This commit is contained in:
@@ -1758,9 +1758,8 @@ 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",
|
"Stock Ledger Entry", {"item_code": item_code, "warehouse": warehouse, "is_cancelled": 0}
|
||||||
{"item_code": item_code, "warehouse": warehouse, "is_cancelled": 0},
|
|
||||||
):
|
):
|
||||||
return
|
return
|
||||||
|
|
||||||
|
|||||||
Reference in New Issue
Block a user