FINERACT-2197: Fix FEB_29_PERIOD_ONLY strategy for cross-year repayment periods#5729
Open
pratikpatel-aurochs wants to merge 2 commits intoapache:developfrom
Open
FINERACT-2197: Fix FEB_29_PERIOD_ONLY strategy for cross-year repayment periods#5729pratikpatel-aurochs wants to merge 2 commits intoapache:developfrom
pratikpatel-aurochs wants to merge 2 commits intoapache:developfrom
Conversation
6 tasks
Contributor
|
@pratikpatel-aurochs please sign your commits ,refer https://github.com/apache/fineract/blob/develop/CONTRIBUTING.md#pull-requests for more information. |
5e874ab to
a8ebf5c
Compare
Author
Done |
DeathGun44
approved these changes
Apr 3, 2026
Contributor
DeathGun44
left a comment
There was a problem hiding this comment.
The failing test cases seem unrelated, LGTM
This file contains hidden or 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
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.
Description
isPeriodContainsFeb29inProgressiveEMICalculatoronly checked therepaymentPeriodFromDate's year for leap year. A repayment period spanning from a non-leap year into a leap year (e.g., Dec 1, 2023 → Mar 1, 2024) returnedfalseeven though Feb 29, 2024 fallswithin the period.
This caused two downstream issues for
FEB_29_PERIOD_ONLYstrategy:numberOfDaysFeb29PeriodOnlyreturned 365 instead of 366partialPeriodCalculationNeededwasfalse, skipping the year-splitting interest calculationFix: Iterate all years the period spans and check each leap year's Feb 29 against the range.
Impact: Affects progressive loans using
ACTUALdays-in-year +FEB_29_PERIOD_ONLYwith non-monthly repayment frequencies (bi-monthly, quarterly) where a period crosses from a non-leap year past Feb 29 of the next leap year. Monthly repayments are not affected.Checklist
Please make sure these boxes are checked before submitting your pull request - thanks!
Your assigned reviewer(s) will follow our guidelines for code reviews.