item list view indicator fix

This commit is contained in:
Nabin Hait 2015-05-04 16:06:59 +05:30
parent 72f71836d7
commit f73aa079a0

View File

@ -3,7 +3,7 @@ frappe.listview_settings['Item'] = {
"has_variants", "end_of_life", "is_sales_item"],
get_indicator: function(doc) {
if(doc.end_of_life < frappe.datetime.get_today()) {
if(doc.end_of_life && doc.end_of_life < frappe.datetime.get_today()) {
return [__("Expired"), "grey", "end_of_life,<,Today"]
} else if(doc.has_variants) {
return [__("Template"), "blue", "has_variant,=,1"]