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


##########
fineract-provider/src/main/java/org/apache/fineract/portfolio/loanaccount/loanschedule/domain/AbstractLoanScheduleGenerator.java:
##########
@@ -178,7 +178,58 @@ private LoanScheduleModel generate(final MathContext mc, 
final LoanApplicationTe
                 isFirstRepayment = false;
             }
         }
-        while (!scheduleParams.getOutstandingBalance().isZero() || 
!scheduleParams.getDisburseDetailMap().isEmpty()) {
+
+        Money totalDownPaymentAmount = 
Money.zero(loanApplicationTerms.getCurrency());
+
+        if (loanApplicationTerms.isDownPaymentEnabled()) {
+            if (!scheduleParams.getDisburseDetailMap().isEmpty()) {
+                for (Map.Entry<LocalDate, Money> disburseDetail : 
scheduleParams.getDisburseDetailMap().entrySet()) {

Review Comment:
   Should we check whether the disbursement was already disbursed? I might be 
wrong, but i dont we are storing the "expected" disbursements as well, but 
should it mean we need to create the down payment installment for them?



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