mirror of
https://github.com/frappe/erpnext.git
synced 2026-05-25 07:54:46 +00:00
Merge pull request #16652 from nabinhait/work-order-fix
fix: Make work order from production plan considering already ordered qty
This commit is contained in:
@@ -276,8 +276,8 @@ class ProductionPlan(Document):
|
|||||||
item_dict[(d.item_code, d.material_request_item, d.warehouse)] = item_details
|
item_dict[(d.item_code, d.material_request_item, d.warehouse)] = item_details
|
||||||
else:
|
else:
|
||||||
item_details.update({
|
item_details.update({
|
||||||
"qty":flt(item_dict.get((d.item_code, d.sales_order, d.warehouse),{})
|
"qty": flt(item_dict.get((d.item_code, d.sales_order, d.warehouse),{})
|
||||||
.get("qty")) + flt(d.planned_qty)
|
.get("qty")) + (flt(d.planned_qty) - flt(d.ordered_qty))
|
||||||
})
|
})
|
||||||
item_dict[(d.item_code, d.sales_order, d.warehouse)] = item_details
|
item_dict[(d.item_code, d.sales_order, d.warehouse)] = item_details
|
||||||
|
|
||||||
|
|||||||
Reference in New Issue
Block a user