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:
Ali 2026-03-25 19:12:17 +04:00
parent 1e1822745e
commit e5df13a68b
1 changed files with 3 additions and 3 deletions

View File

@ -39,7 +39,7 @@ def get_columns():
}, },
{ {
"label": _("Davamsızlığın səbəbi"), "label": _("Davamsızlığın səbəbi"),
"fieldname": "leave_type", "fieldname": "absent_reason",
"fieldtype": "Data", "fieldtype": "Data",
"width": 180 "width": 180
}, },
@ -62,7 +62,7 @@ def get_data(filters):
e.first_name, e.first_name,
e.identification_number AS fin, e.identification_number AS fin,
e.ssn, e.ssn,
a.leave_type, a.absent_reason,
COUNT(*) AS days_absent COUNT(*) AS days_absent
FROM `tabAttendance` a FROM `tabAttendance` a
LEFT JOIN `tabEmployee` e ON e.name = a.employee 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.company = %(company)s
AND a.attendance_date >= %(from_date)s AND a.attendance_date >= %(from_date)s
AND a.attendance_date <= %(to_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 ORDER BY e.last_name ASC, e.first_name ASC
""", filters, as_dict=1) """, filters, as_dict=1)