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


##########
fineract-progressive-loan/src/main/java/org/apache/fineract/portfolio/loanaccount/domain/transactionprocessor/impl/AdvancedPaymentScheduleTransactionProcessor.java:
##########
@@ -1794,19 +1792,18 @@ private void allocateOverpayment(LoanTransaction 
loanTransaction, TransactionCtx
 
     private boolean shouldUseEmiCalculation(TransactionCtx transactionCtx, 
LocalDate transactionDate) {
         if (transactionCtx instanceof ProgressiveTransactionCtx 
progressiveTransactionCtx) {
-            boolean hasActiveReAmortization = 
progressiveTransactionCtx.getAlreadyProcessedTransactions().stream()
-                    .anyMatch(t -> t.getTypeOf().isReAmortize() && 
t.isNotReversed());
-            boolean hasActiveReAge = 
progressiveTransactionCtx.getAlreadyProcessedTransactions().stream()
-                    .anyMatch(t -> t.getTypeOf().isReAge() && 
t.isNotReversed());
-            if (hasActiveReAmortization) {
-                return false;
-            } else {
-                return !hasActiveReAge || !DateUtils.isAfter(transactionDate, 
progressiveTransactionCtx.getModel().getMaturityDate());
+            final Loan loan = 
progressiveTransactionCtx.getInstallments().getFirst().getLoan();
+
+            if (!loan.isInterestBearing()) {
+                boolean hasActiveReAmortization = 
progressiveTransactionCtx.getAlreadyProcessedTransactions().stream()
+                        .anyMatch(t -> t.getTypeOf().isReAmortize() && 
t.isNotReversed());

Review Comment:
   reage too, no?



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