Skip to content

Comments

FINERACT-2357: Support principal & interest moratorium for progressive loans#5441

Open
airajena wants to merge 1 commit intoapache:developfrom
airajena:FINERACT-2357/progressive-moratorium
Open

FINERACT-2357: Support principal & interest moratorium for progressive loans#5441
airajena wants to merge 1 commit intoapache:developfrom
airajena:FINERACT-2357/progressive-moratorium

Conversation

@airajena
Copy link
Contributor

@airajena airajena commented Feb 4, 2026

Description

This PR adds principal and interest moratorium support to the Progressive repayment strategy. Principal grace produces interest-only installments for the configured number of periods and re-amortizes the remaining schedule. Interest grace defers interest (it is not waived), with deferred interest recognized in subsequent periods. It also fixes the progressive loan configuration mapping so interest grace is correctly passed through.

Changes

  • Apply principal moratorium by setting grace-period EMIs to interest-only and re-amortizing remaining periods
  • Treat interest-moratorium periods as zero-rate periods for EMI calculation while deferring interest
  • Fix configuration mapping for graceOnInterestPayment
  • Add unit coverage for principal/interest moratorium examples
  • Add integration tests for progressive moratorium schedules

Testing

  • ./gradlew :fineract-progressive-loan:spotlessApply :fineract-progressive-loan:spotbugsMain :fineract-progressive-loan:spotbugsTest :fineract-progressive-loan:checkstyleMain :fineract-progressive-loan:checkstyleTest
  • ./gradlew :integration-tests:spotlessApply :integration-tests:spotbugsMain :integration-tests:spotbugsTest :integration-tests:checkstyleMain :integration-tests:checkstyleTest

Checklist

  • Write the commit message as per our guidelines
  • Acknowledge that PRs must be green (passing build)
  • Create/update unit or integration tests
  • Follow coding conventions
  • Add required Swagger annotation and update API docs (N/A - no API changes)
  • This PR is not a code dump

@airajena airajena force-pushed the FINERACT-2357/progressive-moratorium branch from 26050c7 to b3c3fcd Compare February 4, 2026 13:01
@adamsaghy
Copy link
Contributor

@airajena Kindly review the failed checks!

@airajena airajena force-pushed the FINERACT-2357/progressive-moratorium branch from b3c3fcd to 9d5c239 Compare February 11, 2026 15:10
@airajena
Copy link
Contributor Author

@airajena Kindly review the failed checks!

Added the fixes

@airajena airajena force-pushed the FINERACT-2357/progressive-moratorium branch from 9d5c239 to a169dbd Compare February 11, 2026 17:26
@airajena airajena force-pushed the FINERACT-2357/progressive-moratorium branch from a169dbd to 08669c9 Compare February 12, 2026 19:13
return new LoanConfigurationDetails(currencyData, loanProductRelatedDetail.getNominalInterestRatePerPeriod(),
loanProductRelatedDetail.getAnnualNominalInterestRate(), loanProductRelatedDetail.getGraceOnInterestCharged(),
loanProductRelatedDetail.getGraceOnPrincipalPayment(), loanProductRelatedDetail.getGraceOnPrincipalPayment(),
loanProductRelatedDetail.getGraceOnInterestPayment(), loanProductRelatedDetail.getGraceOnPrincipalPayment(),
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

nice catch!

return getPeriodNumber() <= interestGrace;
}

private int getPeriodNumber() {
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Interesting approach, but i think we should do it differently.

Based on the configuration let's use modifier flags which will instruct the calculator whether interest can be calculated or not.

The interest pause logic which is already in place can be rather used here to achieve the same! :)

I think the right approach anyway would be to consider the grace principal and grace interest from the moment it was generated and the EMI should consider and reflect them from Day 1.
@bharathc27 what do you think?

Copy link
Contributor

@adamsaghy adamsaghy left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Kindly see my concerns!

@adamsaghy
Copy link
Contributor

@bharathc27 I would like to hear your opinion on this PR. I think grace periods / moratorium is something that we know from Day 1 and the repayment schedule should be calculated and reflect its side effects, no? EMI calculation should consider and calculate an EMI which remains the same across the periods anyway, no?

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants