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


##########
fineract-provider/src/main/java/org/apache/fineract/portfolio/loanaccount/loanschedule/domain/AbstractLoanScheduleGenerator.java:
##########
@@ -1968,11 +1991,35 @@ private Collection<LoanScheduleModelPeriod> 
createNewLoanScheduleListWithDisburs
             final LoanScheduleModelDisbursementPeriod disbursementPeriod = 
LoanScheduleModelDisbursementPeriod
                     .disbursement(loanApplicationTerms, 
chargesDueAtTimeOfDisbursement);
             periods.add(disbursementPeriod);
+            if (loanApplicationTerms.isDownPaymentEnabled()) {
+                createDownPaymentPeriod(loanApplicationTerms, scheduleParams, 
periods, loanApplicationTerms.getExpectedDisbursementDate(),
+                        loanApplicationTerms.getPrincipal().getAmount());
+            }
         }
 
         return periods;
     }
 
+    private void createDownPaymentPeriod(LoanApplicationTerms 
loanApplicationTerms, LoanScheduleParams scheduleParams,
+            Collection<LoanScheduleModelPeriod> periods, LocalDate date, 
BigDecimal periodBaseAmount) {
+        BigDecimal downPaymentAmount = MathUtil.percentageOf(periodBaseAmount,
+                
loanApplicationTerms.getDisbursedAmountPercentageForDownPayment(), 6);

Review Comment:
   Please go with 19 precision



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