From 0e3b000e81ad014e9f99da8e9b88917d48579939 Mon Sep 17 00:00:00 2001 From: Zarrar Date: Thu, 5 Apr 2018 10:34:30 +0530 Subject: [PATCH] sql syntax fix (#13529) --- erpnext/controllers/queries.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/erpnext/controllers/queries.py b/erpnext/controllers/queries.py index a174ce2a2f..fd13c1353e 100644 --- a/erpnext/controllers/queries.py +++ b/erpnext/controllers/queries.py @@ -171,7 +171,7 @@ def item_query(doctype, txt, searchfield, start, page_len, filters, as_dict=Fals or tabItem.item_group LIKE %(txt)s or tabItem.item_name LIKE %(txt)s or tabItem.item_code IN (select parent from `tabItem Barcode` where barcode LIKE %(txt)s - {description_cond}) + {description_cond})) {fcond} {mcond} order by if(locate(%(_txt)s, name), locate(%(_txt)s, name), 99999),