fix(stock): ignore cancelled ledger entries when changing item stock uom

(cherry picked from commit c2238b0218)
This commit is contained in:
R-Jayaraman
2026-10-23 13:02:24 +00:00
committed by Mergify
parent a2f8b6cd30
commit 505ed2b3fd
+1 -1
View File
@@ -1386,7 +1386,7 @@ def check_stock_uom_with_bin(item, stock_uom):
if stock_uom == frappe.db.get_value("Item", item, "stock_uom"):
return
ref_uom = frappe.db.get_value("Stock Ledger Entry", {"item_code": item}, "stock_uom")
ref_uom = frappe.db.get_value("Stock Ledger Entry", {"item_code": item, "is_cancelled": 0}, "stock_uom")
if ref_uom:
if cstr(ref_uom) != cstr(stock_uom):