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

fix: exclude carry forwarded leaves while updating leaves after submission #381

Merged
merged 6 commits into from
Mar 14, 2023

Conversation

ruchamahabal
Copy link
Member

@ruchamahabal ruchamahabal commented Mar 10, 2023

Problem

15 leaves allocated with 5 carry forwarded leaves

image

Changed 15 leaves allocated to 10

image

New leaves allocated should be 10 not 5,

incorrect-balance

The intermediate leave ledger entry created on updating new leaves allocated is also considering carry forwarded leaves while finding out the difference to update existing allocation:

image

Fix

Ledger entry should only consider new leaves allocated and exclude carry forwarded leaves while computing difference

image

Leave balance is rectified:

leave-balance-after

@ruchamahabal ruchamahabal force-pushed the fix-leave-balance-editing branch from 5ae1644 to 347e08c Compare March 10, 2023 10:03
@ruchamahabal ruchamahabal changed the title fix: leave allocation updated after submission is not considering carry forwarded leaves fix: exclude carry forwarded leaves while updating leaves after submission Mar 10, 2023
@codecov-commenter
Copy link

Codecov Report

Merging #381 (e8fce17) into develop (5fea591) will decrease coverage by 0.01%.
The diff coverage is 100.00%.

Additional details and impacted files
@@             Coverage Diff             @@
##           develop     #381      +/-   ##
===========================================
- Coverage    71.68%   71.67%   -0.01%     
===========================================
  Files          181      181              
  Lines         9344     9341       -3     
===========================================
- Hits          6698     6695       -3     
  Misses        2646     2646              
Impacted Files Coverage Δ
...ms/hr/doctype/leave_allocation/leave_allocation.py 97.26% <100.00%> (-0.06%) ⬇️

@ruchamahabal
Copy link
Member Author

Unrelated test case failure from Salary Slip. Will fix in a separate PR.

@ruchamahabal ruchamahabal merged commit e7c1a0e into frappe:develop Mar 14, 2023
ruchamahabal added a commit that referenced this pull request Mar 14, 2023
fix: exclude carry forwarded leaves while updating leaves after submission (backport #381)
@ruchamahabal ruchamahabal added the backport version-13-hotfix Needs manual backporting to frappe/erpnext label Apr 3, 2023
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
backport version-13-hotfix Needs manual backporting to frappe/erpnext backport version-14-hotfix
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants