Fixed item query

This commit is contained in:
Anand Doshi 2014-06-16 13:25:20 +05:30
parent e35841a2ea
commit 0521814dea

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 (ifnull(tabItem.end_of_life, '') = '' or tabItem.end_of_life > %(today)s)
and (ifnull(tabItem.end_of_life, '0000-00-00') = '0000-00-00' or tabItem.end_of_life > %(today)s)
and (tabItem.`{key}` LIKE %(txt)s
or tabItem.item_name LIKE %(txt)s)
{fcond} {mcond}