adamsaghy commented on code in PR #5102:
URL: https://github.com/apache/fineract/pull/5102#discussion_r2490504240


##########
fineract-provider/src/main/java/org/apache/fineract/portfolio/loanaccount/service/LoanTransactionProcessingServiceImpl.java:
##########
@@ -221,7 +222,11 @@ public LoanScheduleDTO getRecalculatedSchedule(final 
ScheduleGeneratorDTO genera
     public OutstandingAmountsDTO fetchPrepaymentDetail(final 
ScheduleGeneratorDTO scheduleGeneratorDTO, final LocalDate onDate, Loan loan) {
         OutstandingAmountsDTO outstandingAmounts;
 
-        if (loan.isInterestBearingAndInterestRecalculationEnabled() && 
!loan.isChargeOffOnDate(onDate)) {
+        Optional<LoanTransaction> activeReageTransactionOnDate = 
loanTransactionService.getActiveReageTransactionOnDate(loan, onDate);
+
+        if (loan.isInterestBearingAndInterestRecalculationEnabled() && 
!loan.isChargeOffOnDate(onDate)
+                && (activeReageTransactionOnDate.isEmpty() || 
LoanReAgeInterestHandlingType.DEFAULT

Review Comment:
   its incorrect. What you need is if the loan is reaged AND EQUAL 
AMORTIZATION, then use the `getTotalOutstandingLoan()`



-- 
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]

Reply via email to