-
Notifications
You must be signed in to change notification settings - Fork 7.9k
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: Scheduling Multiple shifts and Auto Attendance #30588
Merged
Merged
Conversation
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
- convert raw query to frappe.qb - check for overlapping timings if dates overlap - translation friendly error messages with link to overlapping doc
- break down into smaller functions - make it work with multiple shifts - this will mark employee as absent per shift, meaning employee can be present for one shift and absent for another on the same day
- split into smaller functions - add type hints - get rid of unnecessary db calls and loops - add docstrings for functions
- legend with colors and full form for status abbreviations
- check half day attendance threshold before absent threshold to avoid half day getting marked as absent - round working hours to 2 digits for better accuracy - start and end dates for absent attendance marking
fix test setups
- commonify time overlap function between request and assignment - add tests for shift request overlap
- skip auto attendance in case of overlapping shift attendance record - this case won't occur in case of shift assignment, since it will not allow overlapping shifts to be assigned - can happen if manual attendance records are created
8 tasks
Codecov Report
@@ Coverage Diff @@
## develop #30588 +/- ##
===========================================
+ Coverage 60.92% 61.22% +0.30%
===========================================
Files 1083 1083
Lines 69224 69356 +132
===========================================
+ Hits 42173 42466 +293
+ Misses 27051 26890 -161
|
Could you please support v13 as well. |
Sign up for free
to subscribe to this conversation on GitHub.
Already have an account?
Sign in.
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
Problem
What Changes?
Schedule multiple shifts
Shift Request
Fetching shift in Employee Check In
Attendance
Attendance Reports
Before:

After:

Impact on Payroll
If there are multiple attendance records marked for a single day with separate shifts, each record will be considered as 1 Payment Day in payroll. So if an employee works 2 shifts in a single day this contributes to 2 payment days in Payroll. No code level changes are done for this
Documentation: Added docs for Monthly Attendance Sheet only since others are mostly backend changes: https://docs.erpnext.com/docs/v14/user/manual/en/human-resources/human-resources-reports#3-monthly-attendance-sheet
Also closes #29210
ToDo