-
Notifications
You must be signed in to change notification settings - Fork 7.3k
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
fix: Earned Leave allocation from Leave Policy Assignment #29163
Merged
ruchamahabal
merged 2 commits into
frappe:develop
from
ruchamahabal:fix-earned-leave-allocation
Jan 6, 2022
Merged
fix: Earned Leave allocation from Leave Policy Assignment #29163
ruchamahabal
merged 2 commits into
frappe:develop
from
ruchamahabal:fix-earned-leave-allocation
Jan 6, 2022
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
ruchamahabal
force-pushed
the
fix-earned-leave-allocation
branch
from
January 6, 2022 05:28
66d8500
to
bc2dd86
Compare
ruchamahabal
force-pushed
the
fix-earned-leave-allocation
branch
from
January 6, 2022 05:30
bc2dd86
to
c5d1c30
Compare
Codecov Report
@@ Coverage Diff @@
## develop #29163 +/- ##
===========================================
+ Coverage 55.78% 55.81% +0.03%
===========================================
Files 1107 1107
Lines 67359 67360 +1
===========================================
+ Hits 37575 37597 +22
+ Misses 29784 29763 -21
|
@Mergifyio backport version-13-hotfix version-13-pre-release |
mergify bot
pushed a commit
that referenced
this pull request
Jan 6, 2022
* fix: Earned Leave allocation from Leave Policy Assignment * test: Earned Leave Allocation from Leave Policy Assignment (cherry picked from commit 26247be)
mergify bot
pushed a commit
that referenced
this pull request
Jan 6, 2022
* fix: Earned Leave allocation from Leave Policy Assignment * test: Earned Leave Allocation from Leave Policy Assignment (cherry picked from commit 26247be)
✅ Backports have been created
|
This was referenced Jan 6, 2022
Closed
conncampbell
pushed a commit
to conncampbell/erpnext
that referenced
this pull request
Jan 9, 2022
* fix: Earned Leave allocation from Leave Policy Assignment * test: Earned Leave Allocation from Leave Policy Assignment
conncampbell
pushed a commit
to conncampbell/erpnext
that referenced
this pull request
Jan 9, 2022
* fix: Earned Leave allocation from Leave Policy Assignment * test: Earned Leave Allocation from Leave Policy Assignment
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
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:
Earned Leave allocation via Leave Policy Assignment is incorrect.
Steps to replicate:
Create a Leave Type for Earned Leave with monthly frequency
Create a Leave Policy with Earned Leave
Create Leave Policy Assignment based on Leave Period. The Leave Allocation created from this assignment should allocate 0 leaves first since it is an Earned Leave and the scheduler will allocate leaves based on the set frequency (eg: if the policy is for 12 earned leaves for Monthly frequency, then the employee should get 0 leaves at first and 1 leave allocated at the end of every month). However, currently, it allocates all 12 leaves on assignment submission.
Fix:
The
get_leaves_for_passed_months
does not reset leaves allocated if months passed are 0 i.e if the allocation is done in the first month of the leave period