diff --git a/erpnext/hr/report/monthly_attendance_sheet/monthly_attendance_sheet.py b/erpnext/hr/report/monthly_attendance_sheet/monthly_attendance_sheet.py index bb200a997ed..698c4fbd7c9 100644 --- a/erpnext/hr/report/monthly_attendance_sheet/monthly_attendance_sheet.py +++ b/erpnext/hr/report/monthly_attendance_sheet/monthly_attendance_sheet.py @@ -36,7 +36,7 @@ def execute(filters=None): status_map = {"Present": "P", "Absent": "A", "Half Day": "HD", "On Leave": "L", "None": "", "Holiday":"H"} if status == "None" and holiday_map: emp_holiday_list = emp_det.holiday_list if emp_det.holiday_list else default_holiday_list - if (day+1) in holiday_map[emp_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]) @@ -45,7 +45,7 @@ def execute(filters=None): elif status == "Absent": total_a += 1 elif status == "On Leave": - total_l += 1 + total_l += 1 elif status == "Half Day": total_p += 0.5 total_a += 0.5