mirror of
https://github.com/frappe/erpnext.git
synced 2026-05-27 00:44:45 +00:00
PP Tool: Create production order if applicable for item
This commit is contained in:
@@ -185,7 +185,9 @@ class ProductionPlanningTool(Document):
|
|||||||
"""
|
"""
|
||||||
item_dict, bom_dict = {}, {}
|
item_dict, bom_dict = {}, {}
|
||||||
for d in self.get("items"):
|
for d in self.get("items"):
|
||||||
|
if d.bom_no:
|
||||||
bom_dict.setdefault(d.bom_no, []).append([d.sales_order, flt(d.planned_qty)])
|
bom_dict.setdefault(d.bom_no, []).append([d.sales_order, flt(d.planned_qty)])
|
||||||
|
if frappe.db.get_value("Item", d.item_code, "is_pro_applicable") == "Yes":
|
||||||
item_dict[(d.item_code, d.sales_order, d.warehouse)] = {
|
item_dict[(d.item_code, d.sales_order, d.warehouse)] = {
|
||||||
"production_item" : d.item_code,
|
"production_item" : d.item_code,
|
||||||
"sales_order" : d.sales_order,
|
"sales_order" : d.sales_order,
|
||||||
|
|||||||
Reference in New Issue
Block a user