Merge pull request #22977 from sahil28297/fix_pos_isse_v13

fix: remove mentions of display items in stock (#22963)
This commit is contained in:
sahil28297 2020-08-10 16:00:56 +05:30 committed by GitHub
commit 8aeb20cab8
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23

View File

@ -14,10 +14,9 @@ from six import string_types
def get_items(start, page_length, price_list, item_group, search_value="", pos_profile=None):
data = dict()
warehouse = ""
display_items_in_stock = 0
if pos_profile:
warehouse, display_items_in_stock = frappe.db.get_value('POS Profile', pos_profile, ['warehouse', 'display_items_in_stock'])
warehouse = frappe.db.get_value('POS Profile', pos_profile, ['warehouse'])
if not frappe.db.exists('Item Group', item_group):
item_group = get_root_of('Item Group')
@ -85,7 +84,7 @@ def get_items(start, page_length, price_list, item_group, search_value="", pos_p
item_price = item_prices.get(item_code) or {}
item_stock_qty = get_stock_availability(item_code, warehouse)
if display_items_in_stock and not item_stock_qty:
if not item_stock_qty:
pass
else:
row = {}