mariiaKraievska commented on code in PR #5053:
URL: https://github.com/apache/fineract/pull/5053#discussion_r2465472032
##########
fineract-provider/src/main/java/org/apache/fineract/portfolio/loanaccount/service/reaging/LoanReAgingServiceImpl.java:
##########
@@ -95,16 +95,24 @@ public CommandProcessingResult reAge(Long loanId,
JsonCommand command) {
LoanReAgeParameter reAgeParameter =
createReAgeParameter(reAgeTransaction, command);
reAgeTransaction.setLoanReAgeParameter(reAgeParameter);
loanTransactionRepository.saveAndFlush(reAgeTransaction);
-
- if
(reAgeTransaction.getTransactionDate().isBefore(reAgeTransaction.getSubmittedOnDate()))
{
+ loan.addLoanTransaction(reAgeTransaction);
+ final LoanRepaymentScheduleTransactionProcessor
loanRepaymentScheduleTransactionProcessor =
loanRepaymentScheduleTransactionProcessorFactory
+ .determineProcessor(loan.transactionProcessingStrategy());
+ if
(reAgeTransaction.getTransactionDate().isBefore(reAgeTransaction.getSubmittedOnDate())
+ && !loan.isInterestBearingAndInterestRecalculationEnabled()) {
reprocessLoanTransactionsService.reprocessTransactionsWithPostTransactionChecks(loan,
reAgeTransaction.getTransactionDate());
+ } else if (loan.isInterestBearingAndInterestRecalculationEnabled()) {
+ if (loan.isProgressiveSchedule() &&
((loan.hasChargeOffTransaction() && loan.hasAccelerateChargeOffStrategy())
+ || loan.hasContractTerminationTransaction()
+ || (loan.isInterestRecalculationEnabled() &&
loan.hasReAgingTransaction()))) {
+ final ScheduleGeneratorDTO scheduleGeneratorDTO =
loanUtilService.buildScheduleGeneratorDTO(loan, null);
+ loanScheduleService.regenerateRepaymentSchedule(loan,
scheduleGeneratorDTO);
+ }
+ reprocessLoanTransactionsService.reprocessTransactions(loan);
Review Comment:
Done
--
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]