diff --git a/erpnext/patches/v4_2/repost_reserved_qty.py b/erpnext/patches/v4_2/repost_reserved_qty.py index 4479411284..a2cd4d8ad6 100644 --- a/erpnext/patches/v4_2/repost_reserved_qty.py +++ b/erpnext/patches/v4_2/repost_reserved_qty.py @@ -26,4 +26,10 @@ def execute(): for item_code, warehouse in repost_for: update_bin_qty(item_code, warehouse, { "reserved_qty": get_reserved_qty(item_code, warehouse) - }) \ No newline at end of file + }) + + frappe.db.sql("""delete from tabBin + where exists( + select name from tabItem where name=tabBin.item_code and ifnull(is_stock_item, 0) = 0 + ) + """) \ No newline at end of file