item search by item_name by default

This commit is contained in:
Nabin Hait 2013-04-11 16:57:01 +05:30
parent bab018b759
commit 6ce8af3b67

View File

@ -133,10 +133,8 @@ erpnext.queries.item = function(opts) {
WHERE tabItem.docstatus!=2 \ WHERE tabItem.docstatus!=2 \
AND (ifnull(`tabItem`.`end_of_life`,"") in ("", "0000-00-00") \ AND (ifnull(`tabItem`.`end_of_life`,"") in ("", "0000-00-00") \
OR `tabItem`.`end_of_life` > NOW()) \ OR `tabItem`.`end_of_life` > NOW()) \
AND tabItem.%(key)s LIKE "%s" ' + (conditions AND (tabItem.%(key)s LIKE \"%s\" OR tabItem.item_name LIKE \"%%%s\")' +
? (" AND " + conditions.join(" AND ")) (conditions ? (" AND " + conditions.join(" AND ")) : "") + " LIMIT 50"
: "")
+ " LIMIT 50"
} }
erpnext.queries.item_std = function() { erpnext.queries.item_std = function() {