mirror of
https://github.com/frappe/erpnext.git
synced 2026-05-27 00:44:45 +00:00
Merge pull request #5901 from bcornwellmott/fix_employee_lookup
Fix Timesheet employee query to show names
This commit is contained in:
@@ -293,7 +293,7 @@ def get_activity_cost(employee=None, activity_type=None):
|
|||||||
|
|
||||||
@frappe.whitelist()
|
@frappe.whitelist()
|
||||||
def get_employee_list(doctype, txt, searchfield, start, page_len, filters):
|
def get_employee_list(doctype, txt, searchfield, start, page_len, filters):
|
||||||
return frappe.db.sql("""select distinct(employee) as employee
|
return frappe.db.sql("""select distinct employee, employee_name
|
||||||
from `tabSalary Structure` where salary_slip_based_on_timesheet=1
|
from `tabSalary Structure` where salary_slip_based_on_timesheet=1
|
||||||
and employee like %(txt)s limit %(start)s, %(page_len)s""",
|
and employee like %(txt)s or employee_name like %(txt)s limit %(start)s, %(page_len)s""",
|
||||||
{'txt': "%%%s%%"%(txt), 'start': start, 'page_len': page_len})
|
{'txt': "%%%s%%"% txt, 'start': start, 'page_len': page_len})
|
||||||
|
|||||||
Reference in New Issue
Block a user