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


##########
fineract-provider/src/main/java/org/apache/fineract/portfolio/loanaccount/domain/transactionprocessor/AbstractLoanRepaymentScheduleTransactionProcessor.java:
##########
@@ -110,10 +110,10 @@ public ChangedTransactionDetail handleTransaction(final 
LocalDate disbursementDa
                 LocalDate startDate = disbursementDate;
                 for (final LoanRepaymentScheduleInstallment installment : 
installments) {
                     for (final LoanCharge loanCharge : transferCharges) {
-                        if 
(loanCharge.isDueForCollectionFromAndUpToAndIncluding(startDate, 
installment.getDueDate())
-                                // Special case for Loan Charges (Due Date) 
added the same disbursement date
-                                || (startDate.equals(disbursementDate) && 
loanCharge.getDueDate() != null
-                                        && 
loanCharge.getDueDate().equals(disbursementDate))) {
+                        boolean isDue = installment.isFirstPeriod()
+                                ? 
loanCharge.isDueForCollectionFromIncludingAndUpToAndIncluding(startDate, 
installment.getDueDate())
+                                : 
loanCharge.isDueForCollectionFromAndUpToAndIncluding(startDate, 
installment.getDueDate());

Review Comment:
   Again this is independent of `installment.getFromDate()`, so any date less 
than `installment.getDueDate()` should be sufficient.



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