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


##########
fineract-provider/src/main/java/org/apache/fineract/portfolio/loanaccount/service/LoanChargeWritePlatformServiceImpl.java:
##########
@@ -245,6 +246,18 @@ public CommandProcessingResult addLoanCharge(final Long 
loanId, final JsonComman
             }
             this.loanWritePlatformService.updateOriginalSchedule(loan);
         }
+        // [For Adv payment allocation strategy] check if charge due date is 
earlier than last transaction
+        // date, if yes trigger reprocess else no reprocessing
+        if 
(AdvancedPaymentScheduleTransactionProcessor.ADVANCED_PAYMENT_ALLOCATION_STRATEGY.equals(loan.transactionProcessingStrategy()))
 {
+            LoanTransaction lastPaymentTransaction = 
loan.getLastPaymentTransaction();
+            if (lastPaymentTransaction != null) {
+                if (loanCharge.getDueLocalDate() != null

Review Comment:
   Please consider using the "getEffectiveDueDate" method instead.



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