adamsaghy commented on code in PR #4651:
URL: https://github.com/apache/fineract/pull/4651#discussion_r2081477172
##########
fineract-loan/src/main/java/org/apache/fineract/portfolio/loanaccount/service/LoanDownPaymentHandlerServiceImpl.java:
##########
@@ -172,8 +172,14 @@ public void
handleRepaymentOrRecoveryOrWaiverTransaction(final Loan loan, final
loan.updateLoanSummaryDerivedFields();
}
+ BigDecimal disbursedThroughCapitalizedIncome = BigDecimal.ZERO;
+ if (loan.getLoanProductRelatedDetail().isEnableIncomeCapitalization())
{
+ disbursedThroughCapitalizedIncome =
loan.getLoanTransactions().stream().filter(LoanTransaction::isCapitalizedIncome)
+
.map(LoanTransaction::getPrincipalPortion).reduce(BigDecimal.ZERO,
BigDecimal::add);
+ }
+
if (loan.getLoanProduct().isMultiDisburseLoan()) {
- final BigDecimal totalDisbursed = loan.getDisbursedAmount();
+ final BigDecimal totalDisbursed =
loan.getDisbursedAmount().add(disbursedThroughCapitalizedIncome);
Review Comment:
Please dont mix disbursement amounts and capitalized income amounts! Keep
them separate please!
--
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]