From 00f04fc084bd48140013172f9f71c8ad2c07df8a Mon Sep 17 00:00:00 2001 From: Pandiyan P Date: Fri, 4 Sep 2026 12:21:01 +0530 Subject: [PATCH] fix(batch): show Expired status only after expiry date has passed (#58736) Co-authored-by: Ajish18 --- erpnext/stock/doctype/batch/batch_list.js | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/erpnext/stock/doctype/batch/batch_list.js b/erpnext/stock/doctype/batch/batch_list.js index 644ef131399..a64aff903c3 100644 --- a/erpnext/stock/doctype/batch/batch_list.js +++ b/erpnext/stock/doctype/batch/batch_list.js @@ -5,12 +5,12 @@ frappe.listview_settings["Batch"] = { return [__("Disabled"), "gray", "disabled,=,1"]; } else if ( doc.expiry_date && - frappe.datetime.get_diff(doc.expiry_date, frappe.datetime.nowdate()) <= 0 + frappe.datetime.get_diff(doc.expiry_date, frappe.datetime.nowdate()) < 0 ) { return [ __("Expired"), "red", - "expiry_date,not in,|expiry_date,<=,Today|batch_qty,>,0|disabled,=,0", + "expiry_date,not in,|expiry_date,<,Today|batch_qty,>,0|disabled,=,0", ]; } else if (!doc.batch_qty) { return [__("Empty"), "gray", "batch_qty,=,0|disabled,=,0"];