magyari-adam commented on code in PR #4338:
URL: https://github.com/apache/fineract/pull/4338#discussion_r1967377276


##########
fineract-progressive-loan/src/main/java/org/apache/fineract/portfolio/loanaccount/domain/transactionprocessor/impl/AdvancedPaymentScheduleTransactionProcessor.java:
##########
@@ -1349,13 +1349,11 @@ private void handleChargeOff(final LoanTransaction 
loanTransaction, final Transa
         Money feeChargesPortion = Money.zero(transactionCtx.getCurrency());
         Money penaltychargesPortion = Money.zero(transactionCtx.getCurrency());
         for (final LoanRepaymentScheduleInstallment currentInstallment : 
transactionCtx.getInstallments()) {
-            if (currentInstallment.isNotFullyPaidOff()) {
-                principalPortion = 
principalPortion.plus(currentInstallment.getPrincipalOutstanding(transactionCtx.getCurrency()));
-                interestPortion = 
interestPortion.plus(currentInstallment.getInterestOutstanding(transactionCtx.getCurrency()));
-                feeChargesPortion = 
feeChargesPortion.plus(currentInstallment.getFeeChargesOutstanding(transactionCtx.getCurrency()));
-                penaltychargesPortion = penaltychargesPortion
-                        
.plus(currentInstallment.getPenaltyChargesOutstanding(transactionCtx.getCurrency()));
-            }
+            principalPortion = 
principalPortion.plus(currentInstallment.getPrincipalOutstanding(transactionCtx.getCurrency()));

Review Comment:
   In case of early repayment with zero interest after charge-off and interest 
reclaculation enabled, we (re)calculate the remaining interest portion on the 
installment where it would belong date wise, then blindly set the interest 
after the charge-off date to 0, and don't consider unrecognized interest there. 
In all other cases fully paid installments should have 0 outstanding so this 
shouldn't affect those.



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