You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@fineract.apache.org by "soticsenge (via GitHub)" <gi...@apache.org> on 2025/06/16 07:01:58 UTC
[PR] FINERACT-nnn: fix prepayment functionality when prepayment happens in… [fineract]
soticsenge opened a new pull request, #4771:
URL: https://github.com/apache/fineract/pull/4771
… the first month of loan
## Description
These changes fix the prepayment logic when prepayment is done in the last month of the loan schedule.
Ignore if these details are present on the associated [Apache Fineract JIRA ticket](https://github.com/apache/fineract/pull/1284).
## Checklist
Please make sure these boxes are checked before submitting your pull request - thanks!
- [ ] Write the commit message as per https://github.com/apache/fineract/#pull-requests
- [ ] Acknowledge that we will not review PRs that are not passing the build _("green")_ - it is your responsibility to get a proposed PR to pass the build, not primarily the project's maintainers.
- [ ] Create/update unit or integration tests for verifying the changes made.
- [ ] Follow coding conventions at https://cwiki.apache.org/confluence/display/FINERACT/Coding+Conventions.
- [ ] Add required Swagger annotation and update API documentation at fineract-provider/src/main/resources/static/legacy-docs/apiLive.htm with details of any API changes
- [ ] Submission is not a "code dump". (Large changes can be made "in repository" via a branch. Ask on the developer mailing list for guidance, if required.)
FYI our guidelines for code reviews are at https://cwiki.apache.org/confluence/display/FINERACT/Code+Review+Guide.
--
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: commits-unsubscribe@fineract.apache.org
For queries about this service, please contact Infrastructure at:
users@infra.apache.org
Re: [PR] FINERACT-2181: Fix prepayment functionality when prepayment happens in the first month of loan [fineract]
Posted by "soticsenge (via GitHub)" <gi...@apache.org>.
soticsenge closed pull request #4771: FINERACT-2181: Fix prepayment functionality when prepayment happens in the first month of loan
URL: https://github.com/apache/fineract/pull/4771
--
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: commits-unsubscribe@fineract.apache.org
For queries about this service, please contact Infrastructure at:
users@infra.apache.org
Re: [PR] FINERACT-nnn: fix prepayment functionality when prepayment happens in… [fineract]
Posted by "galovics (via GitHub)" <gi...@apache.org>.
galovics commented on code in PR #4771:
URL: https://github.com/apache/fineract/pull/4771#discussion_r2149944147
##########
integration-tests/src/test/java/org/apache/fineract/integrationtests/loan/repayment/LoanRepaymentTest.java:
##########
@@ -36,7 +36,7 @@ public class LoanRepaymentTest extends BaseLoanIntegrationTest {
@Test
public void test_LoanRepaymentWorks_WhenDisbursementChargeIsAvailable_AndAccrualAccounting_AndDailyRecalculateInterest_AndDailyInterestCalculationPeriod() {
- runAt("01 January 2023", () -> {
+ runAt("14 June 2025", () -> {
Review Comment:
Why the change?
##########
fineract-provider/src/main/java/org/apache/fineract/portfolio/loanaccount/domain/LoanAccountDomainServiceJpa.java:
##########
@@ -242,10 +238,18 @@ public LoanTransaction makeRepayment(final LoanTransactionType repaymentTransact
}
LocalDate recalculateFrom = null;
- if (loan.isInterestBearingAndInterestRecalculationEnabled()) {
+ if (loan.isInterestBearingAndInterestRecalculationEnabled() && loan.getLoanProduct().getProductInterestRecalculationDetails().getPreCloseInterestCalculationStrategy().calculateTillPreClosureDateEnabled()) {
recalculateFrom = transactionDate;
}
- final ScheduleGeneratorDTO scheduleGeneratorDTO = this.loanUtilService.buildScheduleGeneratorDTO(loan, recalculateFrom,
+ final ScheduleGeneratorDTO scheduleGeneratorDTOForPrepay = this.loanUtilService.buildScheduleGeneratorDTO(loan, recalculateFrom, null, holidayDetailDto);
+
+ Money outstanding = loanTransactionProcessingService.fetchPrepaymentDetail(scheduleGeneratorDTOForPrepay, transactionDate, loan).getTotalOutstanding();
+ LocalDate recalculateTill = null;
+ if (repaymentAmount.isGreaterThanOrEqualTo(outstanding) && loan.isInterestBearingAndInterestRecalculationEnabled() && loan.getLoanProduct().getProductInterestRecalculationDetails().getPreCloseInterestCalculationStrategy().calculateTillPreClosureDateEnabled()){
Review Comment:
Can this be null? loan.getLoanProduct().getProductInterestRecalculationDetails()
Or this:
loan.getLoanProduct().getProductInterestRecalculationDetails().getPreCloseInterestCalculationStrategy()
Or this?
loan.getLoanProduct().getProductInterestRecalculationDetails().getPreCloseInterestCalculationStrategy().calculateTillPreClosureDateEnabled()
--
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: commits-unsubscribe@fineract.apache.org
For queries about this service, please contact Infrastructure at:
users@infra.apache.org
Re: [PR] FINERACT-2181: Fix prepayment functionality when prepayment happens in the first month of loan [fineract]
Posted by "adamsaghy (via GitHub)" <gi...@apache.org>.
adamsaghy commented on PR #4771:
URL: https://github.com/apache/fineract/pull/4771#issuecomment-2983593956
@soticsenge @galovics It would be better to have a bug ticket in public fineract jira for this...
--
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: commits-unsubscribe@fineract.apache.org
For queries about this service, please contact Infrastructure at:
users@infra.apache.org