From a9546dd01f5781c3a64c42bb61d0d05c2f4922da Mon Sep 17 00:00:00 2001 From: anandbaburajan Date: Fri, 30 Sep 2022 15:27:03 +0530 Subject: [PATCH] fix: mark attendance issue with relieving date --- erpnext/hr/doctype/attendance/attendance.py | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) diff --git a/erpnext/hr/doctype/attendance/attendance.py b/erpnext/hr/doctype/attendance/attendance.py index e24079ed318..b4650d57da0 100644 --- a/erpnext/hr/doctype/attendance/attendance.py +++ b/erpnext/hr/doctype/attendance/attendance.py @@ -256,7 +256,11 @@ def get_unmarked_days(employee, month, exclude_holidays=0): 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]: + if ( + relieving_date + and relieving_date.year == today.year + and relieving_date.month == month_map[month] + ): end_day = relieving_date.day + 1 dates_of_month = [