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


##########
fineract-provider/src/main/java/org/apache/fineract/portfolio/loanaccount/loanschedule/domain/AbstractCumulativeLoanScheduleGenerator.java:
##########
@@ -423,6 +427,87 @@ private LoanScheduleModel generate(final MathContext mc, 
final LoanApplicationTe
                 scheduleParams.getTotalRepaymentExpected().getAmount(), 
totalOutstanding);
     }
 
+    private void addChargesOnlyRepaymentSchedule(MonetaryCurrency currency, 
LoanScheduleParams scheduleParams,
+            List<LoanScheduleModelPeriod> periods, Set<LoanCharge> 
loanCharges, MathContext mc, LoanApplicationTerms loanApplicationTerms,
+            Collection<RecalculationDetail> transactions,
+            LoanRepaymentScheduleTransactionProcessor 
loanRepaymentScheduleTransactionProcessor, final HolidayDetailDTO 
holidayDetailDTO,
+            final LocalDate lastRestDate, final LocalDate firstRepaymentDate, 
final LocalDate idealDisbursementDate) {
+        if (periods.size() > 0) {
+            LoanScheduleModelPeriod lastInstallment = 
periods.get(periods.size() - 1);
+            // get end date for the schedule from loan charges
+            LocalDate scheduleDueDate = null;
+            if 
(!(BigDecimal.ZERO.compareTo(loanApplicationTerms.getAnnualNominalInterestRate())
 < 0)) {

Review Comment:
   Can you please simplify this condition?
   Negating whether annual nominal interest rate is higher than 0 is not easy 
to read. 
   
   Also interest rate cannot be negative.



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