fix absence reason field: use absent_reason instead of leave_type
Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
This commit is contained in:
parent
1e1822745e
commit
e5df13a68b
|
|
@ -39,7 +39,7 @@ def get_columns():
|
|||
},
|
||||
{
|
||||
"label": _("Davamsızlığın səbəbi"),
|
||||
"fieldname": "leave_type",
|
||||
"fieldname": "absent_reason",
|
||||
"fieldtype": "Data",
|
||||
"width": 180
|
||||
},
|
||||
|
|
@ -62,7 +62,7 @@ def get_data(filters):
|
|||
e.first_name,
|
||||
e.identification_number AS fin,
|
||||
e.ssn,
|
||||
a.leave_type,
|
||||
a.absent_reason,
|
||||
COUNT(*) AS days_absent
|
||||
FROM `tabAttendance` a
|
||||
LEFT JOIN `tabEmployee` e ON e.name = a.employee
|
||||
|
|
@ -72,6 +72,6 @@ e.identification_number AS fin,
|
|||
AND a.company = %(company)s
|
||||
AND a.attendance_date >= %(from_date)s
|
||||
AND a.attendance_date <= %(to_date)s
|
||||
GROUP BY a.employee, a.leave_type
|
||||
GROUP BY a.employee, a.absent_reason
|
||||
ORDER BY e.last_name ASC, e.first_name ASC
|
||||
""", filters, as_dict=1)
|
||||
|
|
|
|||
Loading…
Reference in New Issue