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


##########
fineract-progressive-loan/src/main/java/org/apache/fineract/portfolio/loanaccount/domain/transactionprocessor/impl/AdvancedPaymentScheduleTransactionProcessor.java:
##########
@@ -3287,6 +3287,21 @@ private boolean 
isInterestRecalculationSupported(TransactionCtx ctx, Loan loan)
         }
     }
 
+    private boolean isInterestStoppingTransaction(final LoanTransaction 
loanTransaction, final LocalDate reAgingStartDate) {
+        final Loan loan = loanTransaction.getLoan();
+        return ((loanTransaction.isChargeOff() && 
(loan.hasAccelerateChargeOffStrategy() || 
loan.hasZeroInterestChargeOffStrategy()))
+                || loanTransaction.isContractTermination()) && 
!loanTransaction.isReversed()
+                && 
!loanTransaction.getTransactionDate().isAfter(reAgingStartDate);
+    }
+
+    /**
+     * Finds the period containing the specified date (the period contains the 
date if: getFromDate() <= date <
+     * getDueDate())
+     */
+    private RepaymentPeriod findPeriodThatContainsDate(final 
List<RepaymentPeriod> periods, final LocalDate date) {
+        return periods.stream().filter(rp -> !rp.getFromDate().isAfter(date) 
&& !rp.getDueDate().isBefore(date)).toList().getFirst();

Review Comment:
   why from date included and due date excluded?



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