From 2b87d100fa9d71acece3cab5945869bd58314fed Mon Sep 17 00:00:00 2001 From: Rushabh Mehta Date: Thu, 28 Sep 2017 15:21:36 +0530 Subject: [PATCH] [fix] https://github.com/frappe/erpnext/issues/10956 --- .../monthly_attendance_sheet/monthly_attendance_sheet.py | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) 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 bb200a997e..698c4fbd7c 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