mirror of
https://github.com/frappe/erpnext.git
synced 2026-06-07 15:12:51 +00:00
Production Order Enhancements (#9432)
* Production Order Enhancements - Show required items child table - Source warehouse for each raw materials, in Pro Order Item and BOM Item table - Group warehouse allowed for source and wip warehouse - Patch to populate required items, to fix status and reserved qty for stopped pro order - Cleaned up existing codes - Test cases * Set available qty in source and wip warehouse * minor fix in bom query naming * Minor Fixes * Reload BOM doctypes in patch
This commit is contained in:
committed by
Makarand Bauskar
parent
852cb64e4f
commit
949a920022
@@ -132,7 +132,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 `tabProduction Order`
|
||||
where production_item = %s and fg_warehouse = %s and status != "Stopped"
|
||||
where production_item = %s and fg_warehouse = %s and status not in ("Stopped", "Completed")
|
||||
and docstatus=1 and qty > produced_qty""", (item_code, warehouse))
|
||||
|
||||
return flt(planned_qty[0][0]) if planned_qty else 0
|
||||
|
||||
Reference in New Issue
Block a user