Piyush00715 opened a new pull request, #6617: URL: https://github.com/apache/fineract/pull/6617
## Description (FINERACT-2819: https://issues.apache.org/jira/browse/FINERACT-2819) -- Root cause: calculateRepaymentPeriodFraction multiplied grace days by repaidEvery instead of dividing by the full interval (daysPerUnit x repaidEvery). E.g. 7 grace days in a 2-week period returned 2 instead of 0.5. -- Fix: divide by the full interval length for DAYS/WEEKS/MONTHS/YEARS in DefaultPaymentPeriodsInOneYearCalculator. No behavior change for WHOLE_TERM/default. -- Credit: reproducer, regression tests and patch reference by Xamit Kadirbekov via the issue gist. -- ## Tests -- New PaymentPeriodGraceFractionTest (9 tests): 6 failed before fix (e.g. Expected 0.5 but got 2), 9/9 pass after. Command: gradle :fineract-loan:test --tests PaymentPeriodGraceFractionTest -- Also ran: StandingInstructionDataValidatorTest (2 pass), Sms/EmailCampaignValidatorTest (6 pass) — unrelated NPE families confirmed already fixed. Spotless: :fineract-loan:spotlessApply BUILD SUCCESSFUL. -- ## Checklist -- PR title follows convention; build green for the touched module; regression tests added; coding conventions followed; no API changes (no Swagger update needed); not a code dump (4-line fix + 1 test file). Note: commit is unsigned (no GPG key configured locally) and Jira assignment is pending (reporter approved, awaiting maintainer assignment). -- This is an automated message from the Apache Git Service. To respond to the message, please log on to GitHub and use the URL above to go to the specific comment. To unsubscribe, e-mail: [email protected] For queries about this service, please contact Infrastructure at: [email protected]
