mirror of
https://github.com/frappe/erpnext.git
synced 2026-10-29 22:57:42 +00:00
fix(stock): ignore cancelled ledger entries when changing item stock uom
(cherry picked from commit c2238b0218)
This commit is contained in:
@@ -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):
|
||||
|
||||
Reference in New Issue
Block a user