You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@fineract.apache.org by GitBox <gi...@apache.org> on 2022/12/12 19:13:43 UTC

[GitHub] [fineract] adamsaghy commented on a diff in pull request #2797: FINERACT-1785: Allow to add charge (penalty) with same disbursement date

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


##########
fineract-provider/src/main/java/org/apache/fineract/portfolio/loanaccount/domain/LoanRepaymentScheduleProcessingWrapper.java:
##########
@@ -213,6 +213,10 @@ private Money cumulativePenaltyChargesDueWithin(final LocalDate periodStart, fin
                     cumulative = cumulative.plus(loanChargeAmt);
                 } else if (loanCharge.isDueForCollectionFromAndUpToAndIncluding(periodStart, periodEnd)) {
                     cumulative = cumulative.plus(loanCharge.amount());
+                    // Special case for Loan Charges (Due Date) added the same disbursement date
+                } else if (period.isFirstPeriod()

Review Comment:
   i dont think this newly added branch will ever be executed.
   
   the condition in line 214 will always be true before it could reach the new branch in line 217.
   Also both of them do exactly the same thing. 
   @josehernandezfintecheandomx could you advise on this?



-- 
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: commits-unsubscribe@fineract.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org