Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

feat: Consider present attendance on holidays in payroll settings #1745

Open
wants to merge 4 commits into
base: develop
Choose a base branch
from

Conversation

KhaledBinAmir
Copy link
Contributor

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.

Copy link

@Bandarivijay Bandarivijay left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Hi ,

In Frappe V 15 HRMS we found that there some calculation errors in working days and payment days in HRMS.

We have 3 scenarios in calculating working days 1) Do Not Include
holidays in Total no. of Working Days 2)
Include holidays in Total no. of Working Days and 3)Consider Marked Attendance on Holidays

If we use 1st option then if the person works all the days including holidays then the person should get additional payment. However in V15 it is not calculating for additional working days. Which was calculating in earlier versions eg V14.

Can above issue will be solved with this changed code.

Thanks in advance.

@Bandarivijay
Copy link

I have tested it and the code is working fine as per logic.

image

Base was 15000 and the amount got added for additional working days.

image

@KhaledBinAmir
Copy link
Contributor Author

@ruchamahabal Would you mind reviewing the PR? Also, I mistakenly left frappe.msgprint('Deducted absent '+str(d.attendance_date)) used for tests, please remove this line before you approve. I am new to git things.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

3 participants