Append company after (#14119)

This commit is contained in:
Valmik 2018-05-21 10:44:35 +05:30 committed by Nabin Hait
parent 5f6b44e142
commit bfb8a73377

4
erpnext/accounts/doctype/sales_invoice/pos.py Normal file → Executable file
View File

@ -153,13 +153,15 @@ def update_tax_table(doc):
def get_items_list(pos_profile, company):
cond = ""
args_list = [company]
args_list = []
if pos_profile.get('item_groups'):
# Get items based on the item groups defined in the POS profile
for d in pos_profile.get('item_groups'):
args_list.extend([d.name for d in get_child_nodes('Item Group', d.item_group)])
cond = "and i.item_group in (%s)" % (', '.join(['%s'] * len(args_list)))
args_list = [company] + args_list
return frappe.db.sql("""
select
i.name, i.item_code, i.item_name, i.description, i.item_group, i.has_batch_no,