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


##########
fineract-loan/src/main/java/org/apache/fineract/portfolio/loanaccount/domain/transactionprocessor/AbstractLoanRepaymentScheduleTransactionProcessor.java:
##########
@@ -239,7 +239,14 @@ protected void calculateAccrualActivity(LoanTransaction 
loanTransaction, Monetar
             Money interestPortion = 
currentInstallment.getInterestCharged(currency);
             Money feeChargesPortion = 
currentInstallment.getFeeChargesCharged(currency);
             Money penaltyChargesPortion = 
currentInstallment.getPenaltyChargesCharged(currency);
-            loanTransaction.updateComponentsAndTotal(principalPortion, 
interestPortion, feeChargesPortion, penaltyChargesPortion);
+            if 
(interestPortion.plus(feeChargesPortion).plus(penaltyChargesPortion).isZero()) {
+                loanTransaction.reverse();
+            } else {
+                loanTransaction.updateComponentsAndTotal(principalPortion, 
interestPortion, feeChargesPortion, penaltyChargesPortion);
+                if (currentInstallment.isObligationsMet()) {

Review Comment:
   Please make sure you are not change the transaction date in case the 
repayment date is later than the installment due date!



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