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


##########
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:
   We should only update the transaction date of an Accrual Activity 
transaction, if the obligations met date is earlier than the due date but later 
than the from date of the period and not the current installment is fully paid 
or overpaid, but the whole loan!
   
   We want to change the existing accrual activity transaction date, if the 
loan got fully paid / overpaid earlier and that date if between the period from 
and 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