From 9d5a07d101b072421ee2bd87a228ff765a227196 Mon Sep 17 00:00:00 2001 From: Rohit Waghchaure Date: Thu, 18 Aug 2016 13:25:12 +0530 Subject: [PATCH] [POS] Fixed stock update issue --- erpnext/accounts/doctype/sales_invoice/pos.py | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/erpnext/accounts/doctype/sales_invoice/pos.py b/erpnext/accounts/doctype/sales_invoice/pos.py index df0874bce4..599e9b1e1f 100644 --- a/erpnext/accounts/doctype/sales_invoice/pos.py +++ b/erpnext/accounts/doctype/sales_invoice/pos.py @@ -13,9 +13,9 @@ from erpnext.controllers.accounts_controller import get_taxes_and_charges @frappe.whitelist() def get_pos_data(): doc = frappe.new_doc('Sales Invoice') - doc.update_stock = 1; doc.is_pos = 1; pos_profile = get_pos_profile(doc.company) or {} + doc.update_stock = pos_profile.get('update_stock') if pos_profile.get('name'): pos_profile = frappe.get_doc('POS Profile', pos_profile.get('name')) @@ -105,7 +105,7 @@ def update_tax_table(doc): def get_items(doc, pos_profile): item_list = [] - for item in frappe.get_all("Item", fields=["*"], filters={'disabled': 0, 'has_variants': 0}): + for item in frappe.get_all("Item", fields=["*"], filters={'disabled': 0, 'has_variants': 0, 'is_sales_item': 1}): item_doc = frappe.get_doc('Item', item.name) if item_doc.taxes: item.taxes = json.dumps(dict(([d.tax_type, d.tax_rate] for d in