From 8b9f4ffcfc6e2463a3928c79730109ad11117dfb Mon Sep 17 00:00:00 2001 From: Nabin Hait Date: Fri, 30 Nov 2012 17:40:31 +0530 Subject: [PATCH] fixes in production plan --- .../production_planning_tool/production_planning_tool.py | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/production/doctype/production_planning_tool/production_planning_tool.py b/production/doctype/production_planning_tool/production_planning_tool.py index 863e254754f..64ac73d2b09 100644 --- a/production/doctype/production_planning_tool/production_planning_tool.py +++ b/production/doctype/production_planning_tool/production_planning_tool.py @@ -81,7 +81,7 @@ class DocType: from `tabSales Order` so, `tabSales Order Item` so_item where so_item.parent = so.name and so.docstatus = 1 and so.status != "Stopped" - and so.company = 'Web Notes Technologies Pvt Ltd' + and so.company = %s and ifnull(so_item.qty, 0) > ifnull(so_item.delivered_qty, 0) %s and (exists (select * from `tabItem` item where item.name=so_item.item_code and (ifnull(item.is_pro_applicable, 'No') = 'Yes' @@ -91,7 +91,7 @@ class DocType: and exists (select * from `tabItem` item where item.name=dnpi.item_code and (ifnull(item.is_pro_applicable, 'No') = 'Yes' or ifnull(item.is_sub_contracted_item, 'No') = 'Yes') %s))) - """ % (so_filter, item_filter, item_filter), as_dict=1) + """ % ('%s', so_filter, item_filter, item_filter), self.doc.company, as_dict=1) self.add_so_in_table(open_so)