mirror of
https://github.com/frappe/erpnext.git
synced 2026-06-03 12:19:12 +00:00
[fix] [minor] remove end of life condition from item query
This commit is contained in:
@@ -169,15 +169,13 @@ 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
|
||||||
limit %(start)s,%(page_len)s """ % {'key': searchfield, 'txt': "%%%s%%" % txt,
|
limit %(start)s,%(page_len)s """ % {'key': searchfield, 'txt': "%%%s%%" % txt,
|
||||||
'fcond': get_filters_cond(doctype, filters, conditions),
|
'fcond': get_filters_cond(doctype, filters, conditions),
|
||||||
'mcond':get_match_cond(doctype, searchfield), 'start': start, 'page_len': page_len})
|
'mcond': get_match_cond(doctype, searchfield), 'start': start, 'page_len': page_len})
|
||||||
|
|
||||||
def bom(doctype, txt, searchfield, start, page_len, filters):
|
def bom(doctype, txt, searchfield, start, page_len, filters):
|
||||||
conditions = []
|
conditions = []
|
||||||
|
|||||||
Reference in New Issue
Block a user