add absence reason (leave_type) column to Monthly Absence Report
Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
This commit is contained in:
parent
e883f8816f
commit
a1d4d7ab51
|
|
@ -43,6 +43,12 @@ def get_columns():
|
|||
"fieldtype": "Data",
|
||||
"width": 130
|
||||
},
|
||||
{
|
||||
"label": _("Davamsızlığın səbəbi"),
|
||||
"fieldname": "leave_type",
|
||||
"fieldtype": "Data",
|
||||
"width": 180
|
||||
},
|
||||
{
|
||||
"label": _("İşçinin işləmədiyi iş günlərinin sayı"),
|
||||
"fieldname": "days_absent",
|
||||
|
|
@ -63,6 +69,7 @@ def get_data(filters):
|
|||
e.father_name,
|
||||
e.identification_number AS fin,
|
||||
e.ssn,
|
||||
a.leave_type,
|
||||
COUNT(*) AS days_absent
|
||||
FROM `tabAttendance` a
|
||||
LEFT JOIN `tabEmployee` e ON e.name = a.employee
|
||||
|
|
@ -72,6 +79,6 @@ def get_data(filters):
|
|||
AND a.company = %(company)s
|
||||
AND a.attendance_date >= %(from_date)s
|
||||
AND a.attendance_date <= %(to_date)s
|
||||
GROUP BY a.employee
|
||||
GROUP BY a.employee, a.leave_type
|
||||
ORDER BY e.last_name ASC, e.first_name ASC
|
||||
""", filters, as_dict=1)
|
||||
|
|
|
|||
Loading…
Reference in New Issue