fix end of life query for item

This commit is contained in:
Rushabh Mehta 2014-06-23 12:20:12 +05:30 committed by Anand Doshi
parent 32303daf63
commit 37f809a1f4

View File

@ -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}