From 2f3ad64bd69b6582a30b0ab208c44422c904ec69 Mon Sep 17 00:00:00 2001 From: Rohit Waghchaure Date: Thu, 18 Jan 2018 18:20:14 +0530 Subject: [PATCH] [Fix] Precision issue while making material requests from production planning tool --- .../production_planning_tool/production_planning_tool.py | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) diff --git a/erpnext/manufacturing/doctype/production_planning_tool/production_planning_tool.py b/erpnext/manufacturing/doctype/production_planning_tool/production_planning_tool.py index 3ef7be1494..16a30230c0 100644 --- a/erpnext/manufacturing/doctype/production_planning_tool/production_planning_tool.py +++ b/erpnext/manufacturing/doctype/production_planning_tool/production_planning_tool.py @@ -310,6 +310,7 @@ class ProductionPlanningTool(Document): } """ item_list = [] + precision = frappe.get_precision("BOM Item", "stock_qty") for bom, so_wise_qty in bom_dict.items(): bom_wise_item_details = {} @@ -334,8 +335,9 @@ class ProductionPlanningTool(Document): for item, item_details in bom_wise_item_details.items(): for so_qty in so_wise_qty: - item_list.append([item, flt(item_details.qty) * so_qty[1], item_details.description, - item_details.stock_uom, item_details.min_order_qty, so_qty[0]]) + item_list.append([item, flt(flt(item_details.qty) * so_qty[1], precision), + item_details.description, item_details.stock_uom, item_details.min_order_qty, + so_qty[0]]) self.make_items_dict(item_list)