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


##########
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:
   Cmiiw
   For this condition, do we need to check from `disbursementDate` of loan?
   A charge is due if it is less than `installment.getDueDate()`
   This logic seems to be independent of `installment.getFromDate()`, so a date 
less than `dueDate` should suffice. 



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