fix: get_planned_qty chnages

This commit is contained in:
Anupam 2021-11-09 10:50:38 +05:30
parent 27709a1c71
commit 663a7afe4d

View File

@ -161,7 +161,7 @@ def get_ordered_qty(item_code, warehouse):
def get_planned_qty(item_code, warehouse):
planned_qty = frappe.db.sql("""
select sum(qty - produced_qty) from `tabWork Order`
where production_item = %s and fg_warehouse = %s and status not in ("Stopped", "Completed")
where production_item = %s and fg_warehouse = %s and status not in ("Stopped", "Completed", "Closed")
and docstatus=1 and qty > produced_qty""", (item_code, warehouse))
return flt(planned_qty[0][0]) if planned_qty else 0