fix(stock): ignore cancelled entries in valuation validation

This commit is contained in:
R-Jayaraman
2026-10-23 13:21:47 +05:30
committed by pandiyan
parent a689f13ae2
commit ed85741fef
@@ -153,7 +153,7 @@ class StockSettings(Document):
# which does not have it's own valuation method
sle = frappe.db.sql(
"""select name from `tabStock Ledger Entry` sle
where exists(select name from tabItem
where sle.is_cancelled=0 and exists(select name from tabItem
where name=sle.item_code and (valuation_method is null or valuation_method='')) limit 1
"""
)