[fix][patch] Delete Bin for non-stock item

This commit is contained in:
Nabin Hait 2015-08-20 15:21:42 +05:30
parent 712fccd876
commit 24998a6ca7

View File

@ -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)
})
})
frappe.db.sql("""delete from tabBin
where exists(
select name from tabItem where name=tabBin.item_code and ifnull(is_stock_item, 0) = 0
)
""")