fix: mark attendance issue with relieving date

This commit is contained in:
anandbaburajan
2022-09-30 15:27:03 +05:30
parent cb4fbd5432
commit a9546dd01f

View File

@@ -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 = [