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(Payroll): calculate loan repayment amount based on payroll end date instead of posting date #2154

Merged
merged 2 commits into from
Sep 4, 2024

Conversation

ruchamahabal
Copy link
Member

Steps to replicate

Loan Repayment Schedule:

Monthly repayment amount is 2000

image

Backdated salary slip:

For April 2024 generated in Sept 2024. Since all loan interest accruals have been processed by sept, loan amount shows up as 10000 for a backdated salary slip:

loans-before

Fix

Calculate loan repayment amount based on payroll end date instead of posting date
For backdated salary slips fetching loan repayments based on posting date seems incorrect and leads to more deductions than earnings sometimes. Process this relative to the payroll dates instead of posting date

loans

…te instead of posting date

- for backdated salary slips fetching loan repayments based on posting date leads to more deductions than earnings sometimes. Process this relative to the payroll dates instead of posting date
- doing extra actions in a function named get is misleading
@ruchamahabal ruchamahabal merged commit 5669fab into frappe:develop Sep 4, 2024
7 checks passed
mergify bot pushed a commit that referenced this pull request Sep 4, 2024
…te instead of posting date (#2154)

* fix(Payroll): calculate loan repayment amount based on payroll end date instead of posting date

- for backdated salary slips fetching loan repayments based on posting date leads to more deductions than earnings sometimes. Process this relative to the payroll dates instead of posting date

* refactor: move out process accrual entries from `get_loan_details`

- doing extra actions in a function named get is misleading

(cherry picked from commit 5669fab)
ruchamahabal added a commit that referenced this pull request Sep 4, 2024
…te instead of posting date (backport #2154) (#2156)

* fix(Payroll): calculate loan repayment amount based on payroll end date instead of posting date

- for backdated salary slips fetching loan repayments based on posting date leads to more deductions than earnings sometimes. Process this relative to the payroll dates instead of posting date

* refactor: move out process accrual entries from `get_loan_details`

- doing extra actions in a function named get is misleading

(cherry picked from commit 5669fab)

Co-authored-by: Rucha Mahabal <ruchamahabal2@gmail.com>
frappe-pr-bot pushed a commit that referenced this pull request Sep 4, 2024
## [15.28.2](v15.28.1...v15.28.2) (2024-09-04)

### Bug Fixes

* **Employee Checkin:** set the form as dirty on fetching geolocation (backport [#2157](#2157)) ([#2158](#2158)) ([3598ae9](3598ae9))
* **Payroll:** calculate loan repayment amount based on payroll end date instead of posting date (backport [#2154](#2154)) ([#2156](#2156)) ([020344d](020344d))
* **Payroll:** skip dependent component update if no formula is set (backport [#2152](#2152)) ([#2153](#2153)) ([190959f](190959f))
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.

1 participant