fix: wrong compute of CTC on salary slip, if employee relieving date before end of payroll period. (backport #1779) #2053
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.
Calculation of CTC on Salary Slip is rediculous wrong if Employee's relieving date is set before end of payroll period.
And from the testing, I only find this false commit -> 4303a9b
and so, this PR is just removing it.
To explain the problem, I am testing with a simple salary structure with just income and tax.
Create the Slary Slip for January 2024
CTC wil be be 250,000 !!!
Looking at the code that I removed
As
And so, 1 Dec 2022 until 15 Dec 2024 is 25 months, which compute to CTC = 10,000 * 25 = 250,000
Note: even if we use period_end very close to start_date, i.e. 15 Feb, it is still make a very wrong computation. So, I am really don't know the reason of having such code.
This is an automatic backport of pull request #1779 done by [Mergify](https://mergify.com).