mirror of
https://github.com/frappe/erpnext.git
synced 2026-04-27 02:28:30 +00:00
@@ -965,6 +965,7 @@ class ProductionPlan(Document):
|
||||
if material_request_type == "Material Transfer"
|
||||
else None,
|
||||
"qty": item.quantity - item.requested_qty,
|
||||
"uom": item.uom,
|
||||
"schedule_date": schedule_date,
|
||||
"warehouse": item.warehouse,
|
||||
"sales_order": item.sales_order,
|
||||
@@ -1928,7 +1929,7 @@ def get_reserved_qty_for_production_plan(item_code, warehouse):
|
||||
frappe.qb.from_(table)
|
||||
.inner_join(child)
|
||||
.on(table.name == child.parent)
|
||||
.select(Sum(child.required_bom_qty))
|
||||
.select(Sum(child.quantity * child.conversion_factor))
|
||||
.where(
|
||||
(table.docstatus == 1)
|
||||
& (child.item_code == item_code)
|
||||
|
||||
@@ -1256,7 +1256,6 @@ class TestProductionPlan(IntegrationTestCase):
|
||||
after_qty = flt(frappe.db.get_value("Bin", bin_name, "reserved_qty_for_production_plan"))
|
||||
|
||||
self.assertEqual(after_qty, before_qty)
|
||||
|
||||
completed_plans = get_non_completed_production_plans()
|
||||
for plan in plans:
|
||||
self.assertFalse(plan in completed_plans)
|
||||
|
||||
Reference in New Issue
Block a user