mirror of
https://github.com/frappe/erpnext.git
synced 2026-09-09 15:29:30 +00:00
fix(batch): show Expired status only after expiry date has passed (#58736)
Co-authored-by: Ajish18 <ajishiyappan1@gmail.com>
(cherry picked from commit 00f04fc084)
This commit is contained in:
@@ -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"];
|
||||
|
||||
Reference in New Issue
Block a user