mirror of
https://github.com/frappe/erpnext.git
synced 2026-05-20 05:29:18 +00:00
@@ -161,7 +161,7 @@ def get_ordered_qty(item_code, warehouse):
|
|||||||
def get_planned_qty(item_code, warehouse):
|
def get_planned_qty(item_code, warehouse):
|
||||||
planned_qty = frappe.db.sql("""
|
planned_qty = frappe.db.sql("""
|
||||||
select sum(qty - produced_qty) from `tabWork Order`
|
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))
|
and docstatus=1 and qty > produced_qty""", (item_code, warehouse))
|
||||||
|
|
||||||
return flt(planned_qty[0][0]) if planned_qty else 0
|
return flt(planned_qty[0][0]) if planned_qty else 0
|
||||||
|
|||||||
Reference in New Issue
Block a user