fix: get_planned_qty chnages
This commit is contained in:
parent
27709a1c71
commit
663a7afe4d
@ -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
|
||||
|
Loading…
x
Reference in New Issue
Block a user