diff --git a/erpnext/hr/doctype/attendance/attendance.py b/erpnext/hr/doctype/attendance/attendance.py index 7e51db2978b..e24079ed318 100644 --- a/erpnext/hr/doctype/attendance/attendance.py +++ b/erpnext/hr/doctype/attendance/attendance.py @@ -253,7 +253,7 @@ def get_unmarked_days(employee, month, exclude_holidays=0): start_day = 1 end_day = calendar.monthrange(today.year, month_map[month])[1] + 1 - if joining_date and joining_date.month == month_map[month]: + if joining_date and joining_date.year == today.year and joining_date.month == month_map[month]: start_day = joining_date.day if relieving_date and relieving_date.month == month_map[month]: