From 6f83e7701081a32081aec6108b1ae34704a3a462 Mon Sep 17 00:00:00 2001 From: Anand Doshi Date: Tue, 23 Apr 2013 12:24:31 +0530 Subject: [PATCH] [leave application] [employee query] fixes --- hr/doctype/leave_application/leave_application.py | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/hr/doctype/leave_application/leave_application.py b/hr/doctype/leave_application/leave_application.py index 839c73031b..6e39751b71 100755 --- a/hr/doctype/leave_application/leave_application.py +++ b/hr/doctype/leave_application/leave_application.py @@ -333,7 +333,7 @@ def add_holidays(events, start, end, employee, company): @webnotes.whitelist() def query_for_permitted_employees(doctype, txt, searchfield, start, page_len, filters): - txt = cstr(txt) + "%" + txt = "%" + cstr(txt) + "%" return webnotes.conn.sql("""select name, employee_name from `tabEmployee` emp where status = 'Active' and docstatus < 2 and @@ -346,4 +346,4 @@ def query_for_permitted_employees(doctype, txt, searchfield, start, page_len, fi case when name like %s then 0 else 1 end, case when employee_name like %s then 0 else 1 end, name limit %s, %s""" % tuple([searchfield] + ["%s"]*8), - (txt, txt, webnotes.session.user, webnotes.session.user, txt, txt, start, page_len), debug=1) + (txt, txt, webnotes.session.user, webnotes.session.user, txt, txt, start, page_len))