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


##########
fineract-provider/src/main/java/org/apache/fineract/portfolio/loanaccount/loanschedule/domain/AbstractLoanScheduleGenerator.java:
##########
@@ -128,16 +132,17 @@ private LoanScheduleModel generate(final MathContext mc, 
final LoanApplicationTe
                 loanApplicationTerms.getLoanCalendar(), 
loanApplicationTerms.getHolidayDetailDTO(), loanApplicationTerms);
 
         if (!scheduleParams.isPartialUpdate()) {
+            Long notDownPaymentPeriodNumber = periods.stream().filter(period 
-> !period.isDownPaymentPeriod()).count();
             // Set Fixed Principal Amount
-            updateAmortization(mc, loanApplicationTerms, 
scheduleParams.getPeriodNumber(), scheduleParams.getOutstandingBalance());
+            updateAmortization(mc, loanApplicationTerms, 
notDownPaymentPeriodNumber.intValue(), scheduleParams.getOutstandingBalance());

Review Comment:
   yes, the updateAmortization expects to have only disbursement and repayment 
periods



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