fix: remove unknown field employee_name from query (bp #27634)

* fix: remove unknown field employee_name from query

* fix: remove unknown fieldname

Co-authored-by: root <root@vultr.guest>
Co-authored-by: Ankush Menat <ankushmenat@gmail.com>
(cherry picked from commit 9ebabb86b3d28e2c94eb2761f1864c88b6eb1e59)

Co-authored-by: Bhavesh Maheshwari <34086262+bhavesh95863@users.noreply.github.com>
This commit is contained in:
Frappe PR Bot 2021-09-21 20:33:09 +05:30 committed by GitHub
parent c302c7ab42
commit 2af6ea68ae
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23

View File

@ -677,7 +677,7 @@ def get_job_details(start, end, filters=None):
conditions = get_filters_cond("Job Card", filters, []) conditions = get_filters_cond("Job Card", filters, [])
job_cards = frappe.db.sql(""" SELECT `tabJob Card`.name, `tabJob Card`.work_order, job_cards = frappe.db.sql(""" SELECT `tabJob Card`.name, `tabJob Card`.work_order,
`tabJob Card`.employee_name, `tabJob Card`.status, ifnull(`tabJob Card`.remarks, ''), `tabJob Card`.status, ifnull(`tabJob Card`.remarks, ''),
min(`tabJob Card Time Log`.from_time) as from_time, min(`tabJob Card Time Log`.from_time) as from_time,
max(`tabJob Card Time Log`.to_time) as to_time max(`tabJob Card Time Log`.to_time) as to_time
FROM `tabJob Card` , `tabJob Card Time Log` FROM `tabJob Card` , `tabJob Card Time Log`
@ -687,7 +687,7 @@ def get_job_details(start, end, filters=None):
for d in job_cards: for d in job_cards:
subject_data = [] subject_data = []
for field in ["name", "work_order", "remarks", "employee_name"]: for field in ["name", "work_order", "remarks"]:
if not d.get(field): continue if not d.get(field): continue
subject_data.append(d.get(field)) subject_data.append(d.get(field))