Aman-Mittal commented on code in PR #5218:
URL: https://github.com/apache/fineract/pull/5218#discussion_r2616946922


##########
fineract-progressive-loan/src/main/java/org/apache/fineract/portfolio/loanaccount/domain/transactionprocessor/impl/AdvancedPaymentScheduleTransactionProcessor.java:
##########
@@ -563,12 +563,10 @@ private void handleInterestRefund(final LoanTransaction 
loanTransaction, final T
                         
.filter(LoanTransaction::isNotReversed).map(AbstractPersistableCustom::getId).toList();
                 final List<LoanTransaction> modifiedTransactions = new 
ArrayList<>(progCtx.getAlreadyProcessedTransactions().stream()
                         .filter(LoanTransaction::isNotReversed).filter(tr -> 
tr.getId() == null).toList());
-                if (!modifiedTransactions.isEmpty()) {
-                    final Money interestAfterRefund = 
interestRefundService.totalInterestByTransactions(this, loan.getId(), 
targetDate,
-                            modifiedTransactions, unmodifiedTransactionIds);
-                    final Money newAmount = 
interestBeforeRefund.minus(progCtx.getSumOfInterestRefundAmount()).minus(interestAfterRefund);
-                    loanTransaction.updateAmount(newAmount.getAmount());
-                }
+                final Money interestAfterRefund = 
interestRefundService.totalInterestByTransactions(this, loan.getId(), 
targetDate,

Review Comment:
   I am seeing you have removed the condition check for 
!modifiedTransactions.isEmpty(), is there is any specific usecase for it?



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