Skip to content

Commit d7903de

Browse files
deepeshgarg007nabinhait
authored andcommitted
fix: Do not fetch batch items and serialized items in stock reconciliation (frappe#17726)
1 parent 0e31cc9 commit d7903de

1 file changed

Lines changed: 2 additions & 1 deletion

File tree

erpnext/stock/doctype/stock_reconciliation/stock_reconciliation.py

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -276,7 +276,8 @@ def get_items(warehouse, posting_date, posting_time, company):
276276
items = frappe.db.sql("""
277277
select i.name, i.item_name, bin.warehouse
278278
from tabBin bin, tabItem i
279-
where i.name=bin.item_code and i.disabled=0
279+
where i.name=bin.item_code and i.disabled=0 and i.is_stock_item = 1
280+
and i.has_variants = 0 and i.has_serial_no = 0 and i.has_batch_no = 0
280281
and exists(select name from `tabWarehouse` where lft >= %s and rgt <= %s and name=bin.warehouse)
281282
""", (lft, rgt))
282283

0 commit comments

Comments
 (0)