Referring to the attached picture, on V15
When
Payroll Based On:
Attendance
Consider Unmarked Attendance As:
Absent
Consider Marked Attendance on Holidays:
Disabled
The attendance is marked as holidays are absent, which should not be the result.
Kindly advice.
1 Like
@Jannat_Patel Please advice
I am Also Facing Same issue. Kindly Advice
@Jannat_Patel - Facing same issue after migrating to v15. Checked the code but couldn’t find any issues! Can you please check and advice.
wale
May 4, 2024, 4:04pm
5
Hi ,
I took a quick glance at the code and I’d suggest investigating the output of the ‘getdate’ method (being used to confirm if the attendance date falls on a holiday) in the block of code referenced below:
for d in attendance_details:
if (
d.status in ("Half Day", "On Leave")
and d.leave_type
and d.leave_type not in leave_type_map.keys()
):
continue
# skip counting absent on holidays
if not consider_marked_attendance_on_holidays and getdate(d.attendance_date) in holidays:
if d.status in ["Absent", "Half Day"] or (
d.leave_type
and d.leave_type in leave_type_map.keys()
and not leave_type_map[d.leave_type]["include_holiday"]
):
continue
if d.leave_type:
fraction_of_daily_salary_per_leave = leave_type_map[d.leave_type][
"fraction_of_daily_salary_per_leave"
You need to be sure it’s returning the date in the expected format
Cheers
wale
May 4, 2024, 4:08pm
6
I’d also recommend opening a Github Issue for this
Kind regards,
Facing the same issue, I will raise a ticket, hopefully they will fix this out.
frappe:develop
← KhaledBinAmir:develop
opened 12:14PM - 04 May 24 UTC
The previous logic allowed marking attendance as absent on holidays via consider… _marked_attendance_on_holidays, meaning that if an employee was absent on a holiday, it would be counted as an absence.
**New Logic:**
This PR introduces the following two new variables to extend the behavior:
`consider_marked_absent_attendance_on_holidays`: This retains the original functionality where an absence on holidays will be marked as absent, provided that Include holidays in Total no. of Working Days is enabled.
`consider_marked_present_attendance_on_holidays`: This new variable introduces the option to count attendance as present on holidays if Include holidays in Total no. of Working Days is not enabled. Previously, present attendance on holidays was ignored.
These changes allow combining the checkboxes "Include holidays in Total no. of Working Days" and "Consider Marked Attendance on Holidays," so that attendance logic accurately reflects the combined settings. also removed display on dependency in `payroll_settings.json`.
Update above changes in the code and try.