fix: Do not fetch batch items and serialized items in stock reconciliation (#17725)

This commit is contained in:
Deepesh Garg 2019-05-27 13:42:29 +05:30 committed by Nabin Hait
parent a281ce3dde
commit 5f2afb8803

View File

@ -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))