[fix] [minor] remove end of life condition from item query

This commit is contained in:
Anand Doshi
2013-07-29 13:07:30 +05:30
parent ef0ab5d9aa
commit 9eb2868bf1

View File

@@ -169,9 +169,7 @@ def item_query(doctype, txt, searchfield, start, page_len, filters):
if(length(tabItem.description) > 40, \ if(length(tabItem.description) > 40, \
concat(substr(tabItem.description, 1, 40), "..."), description) as decription concat(substr(tabItem.description, 1, 40), "..."), description) as decription
from tabItem from tabItem
where tabItem.docstatus!=2 where tabItem.docstatus<2
and (ifnull(`tabItem`.`end_of_life`,"") in ("", "0000-00-00")
or `tabItem`.`end_of_life` > NOW())
and (tabItem.%(key)s LIKE "%(txt)s" and (tabItem.%(key)s LIKE "%(txt)s"
or tabItem.item_name LIKE "%(txt)s") or tabItem.item_name LIKE "%(txt)s")
%(fcond)s %(mcond)s %(fcond)s %(mcond)s