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


##########
fineract-provider/src/main/java/org/apache/fineract/portfolio/loanaccount/domain/Loan.java:
##########
@@ -773,8 +773,10 @@ private void handleChargePaidTransaction(final LoanCharge 
charge, final LoanTran
         LocalDate startDate = getDisbursementDate();
         List<LoanRepaymentScheduleInstallment> installments = 
getRepaymentScheduleInstallments();
         for (final LoanRepaymentScheduleInstallment installment : 
installments) {
-            if (installmentNumber == null && 
charge.isDueForCollectionFromAndUpToAndIncluding(startDate, 
installment.getDueDate())) {
-
+            boolean isDue = installment.isFirstPeriod()
+                    ? 
charge.isDueForCollectionFromIncludingAndUpToAndIncluding(startDate, 
installment.getDueDate())
+                    : 
charge.isDueForCollectionFromAndUpToAndIncluding(startDate, 
installment.getDueDate());

Review Comment:
   Not entirely true. We are going through on each installment and the 
startDate need to be included only for the very first period. For 2nd period, 
the start date is not inclusive as the start date of the second installment and 
due date of the 1st installment is the same



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