From 33326fe90e8971d61d97f5c5323db5c34c67966a Mon Sep 17 00:00:00 2001 From: Rohit Waghchaure Date: Mon, 21 Aug 2017 16:29:49 +0530 Subject: [PATCH] [Fix] Pricing rule applying only on item groups defined in POS profile --- erpnext/accounts/doctype/sales_invoice/pos.py | 9 ++------- 1 file changed, 2 insertions(+), 7 deletions(-) diff --git a/erpnext/accounts/doctype/sales_invoice/pos.py b/erpnext/accounts/doctype/sales_invoice/pos.py index 57f75b46c1..f36fdf7907 100644 --- a/erpnext/accounts/doctype/sales_invoice/pos.py +++ b/erpnext/accounts/doctype/sales_invoice/pos.py @@ -151,13 +151,8 @@ def get_items_list(pos_profile): def get_item_groups(pos_profile): item_group_dict = {} - if pos_profile.get('item_groups'): - item_groups = [] - for d in pos_profile.get('item_groups'): - item_groups.extend(get_child_nodes('Item Group', d.item_group)) - else: - item_groups = frappe.db.sql("""Select name, - lft, rgt from `tabItem Group` order by lft""", as_dict=1) + item_groups = frappe.db.sql("""Select name, + lft, rgt from `tabItem Group` order by lft""", as_dict=1) for data in item_groups: item_group_dict[data.name] = [data.lft, data.rgt]