adamsaghy commented on code in PR #3150:
URL: https://github.com/apache/fineract/pull/3150#discussion_r1182980853
##########
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:
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]