Merge pull request #20537 from Alchez/dev-wfh-attendance-report
fix: show WFH in monthly attendance sheet report
This commit is contained in:
commit
38f7e7b9f0
@ -37,13 +37,22 @@ def execute(filters=None):
|
||||
|
||||
total_p = total_a = total_l = 0.0
|
||||
for day in range(filters["total_days_in_month"]):
|
||||
status = att_map.get(emp).get(day + 1, "None")
|
||||
status_map = {"Present": "P", "Absent": "A", "Half Day": "HD", "On Leave": "L", "None": "", "Holiday":"<b>H</b>"}
|
||||
if status == "None" and holiday_map:
|
||||
status = att_map.get(emp).get(day + 1)
|
||||
status_map = {
|
||||
"Absent": "A",
|
||||
"Half Day": "HD",
|
||||
"Holiday":"<b>H</b>",
|
||||
"On Leave": "L",
|
||||
"Present": "P",
|
||||
"Work From Home": "WFH"
|
||||
}
|
||||
|
||||
if status is None and holiday_map:
|
||||
emp_holiday_list = emp_det.holiday_list if emp_det.holiday_list else default_holiday_list
|
||||
if emp_holiday_list in holiday_map and (day+1) in holiday_map[emp_holiday_list]:
|
||||
status = "Holiday"
|
||||
row.append(status_map[status])
|
||||
|
||||
row.append(status_map.get(status, ""))
|
||||
|
||||
if status == "Present":
|
||||
total_p += 1
|
||||
|
Loading…
x
Reference in New Issue
Block a user