alberto-art3ch commented on code in PR #5363:
URL: https://github.com/apache/fineract/pull/5363#discussion_r2717234253
##########
fineract-provider/src/main/java/org/apache/fineract/portfolio/loanaccount/service/LoanWritePlatformServiceJpaRepositoryImpl.java:
##########
@@ -3016,6 +3016,7 @@ public CommandProcessingResult
makeManualInterestRefund(final Long loanId, final
loanAccrualsProcessingService.reprocessExistingAccruals(loan,
true);
loanAccrualsProcessingService.processIncomePostingAndAccruals(loan, true);
}
+ loanLifecycleStateMachine.determineAndTransition(loan,
interestRefundTxn.getTransactionDate());
Review Comment:
The `DatabaseException` was because in the AccrualActivity process, the
`closureDate` was set in null because the loanBalanceService.isOverPaid(loan)
return true but the Loan instance was not set as Overpaid status
`LocalDate closureDate = loanBalanceService.isOverPaid(loan) ?
loan.getOverpaidOnDate() : loan.getClosedOnDate();`
So, If we set the Loan transition we are ensuring the Loan has the right
status and this case the `OverpaidOnDate` value need to set the `closureDate`
--
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]