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


##########
fineract-provider/src/main/java/org/apache/fineract/portfolio/loanaccount/loanschedule/domain/AbstractLoanScheduleGenerator.java:
##########
@@ -139,8 +139,13 @@ private LoanScheduleModel generate(final MathContext mc, 
final LoanApplicationTe
         if (!scheduleParams.isPartialUpdate()) {
             BigDecimal downPaymentAmount = BigDecimal.ZERO;
             if (loanApplicationTerms.isDownPaymentEnabled()) {
-                downPaymentAmount = 
MathUtil.percentageOf(scheduleParams.getOutstandingBalance().getAmount(),
-                        
loanApplicationTerms.getDisbursedAmountPercentageForDownPayment(), 19);
+                double downPaymentAmt = 
MathUtil.percentageOf(scheduleParams.getOutstandingBalance().getAmount(),

Review Comment:
   Please dont cast the BigDecimal to double, do the rounding and later cast it 
back to BigDecimal. It should be done the rounding with BigDecimal.



-- 
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-unsubscr...@fineract.apache.org

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

Reply via email to