feat: consider expiry_date during Batch queries (#20065)
diff --git a/erpnext/controllers/queries.py b/erpnext/controllers/queries.py
index 7b4a4c9..5c31900 100644
--- a/erpnext/controllers/queries.py
+++ b/erpnext/controllers/queries.py
@@ -311,6 +311,7 @@
and sle.item_code = %(item_code)s
and sle.warehouse = %(warehouse)s
and (sle.batch_no like %(txt)s
+ or batch.expiry_date like %(txt)s
or batch.manufacturing_date like %(txt)s)
and batch.docstatus < 2
{cond}
@@ -329,6 +330,7 @@
where batch.disabled = 0
and item = %(item_code)s
and (name like %(txt)s
+ or expiry_date like %(txt)s
or manufacturing_date like %(txt)s)
and docstatus < 2
{0}