diff --git a/erpnext/stock/doctype/stock_reconciliation/stock_reconciliation.py b/erpnext/stock/doctype/stock_reconciliation/stock_reconciliation.py index a00d279f97..1fd617c034 100644 --- a/erpnext/stock/doctype/stock_reconciliation/stock_reconciliation.py +++ b/erpnext/stock/doctype/stock_reconciliation/stock_reconciliation.py @@ -276,7 +276,8 @@ def get_items(warehouse, posting_date, posting_time, company): items = frappe.db.sql(""" select i.name, i.item_name, bin.warehouse from tabBin bin, tabItem i - where i.name=bin.item_code and i.disabled=0 + where i.name=bin.item_code and i.disabled=0 and i.is_stock_item = 1 + and i.has_variants = 0 and i.has_serial_no = 0 and i.has_batch_no = 0 and exists(select name from `tabWarehouse` where lft >= %s and rgt <= %s and name=bin.warehouse) """, (lft, rgt))