From 37f809a1f4fe817dbf16a425af2384a930422f9a Mon Sep 17 00:00:00 2001 From: Rushabh Mehta Date: Mon, 23 Jun 2014 12:20:12 +0530 Subject: [PATCH] fix end of life query for item --- erpnext/controllers/queries.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/erpnext/controllers/queries.py b/erpnext/controllers/queries.py index 789e7a331a..0f1d5f6dab 100644 --- a/erpnext/controllers/queries.py +++ b/erpnext/controllers/queries.py @@ -141,7 +141,7 @@ def item_query(doctype, txt, searchfield, start, page_len, filters): concat(substr(tabItem.description, 1, 40), "..."), description) as decription from tabItem where tabItem.docstatus < 2 - and (tabItem.end_of_life is null or tabItem.end_of_life > %(today)s) + and (tabItem.end_of_life > %(today)s or ifnull(tabItem.end_of_life, '0000-00-00')='0000-00-00') and (tabItem.`{key}` LIKE %(txt)s or tabItem.item_name LIKE %(txt)s) {fcond} {mcond}