budaidev commented on code in PR #6067:
URL: https://github.com/apache/fineract/pull/6067#discussion_r3505307229
##########
fineract-provider/src/main/java/org/apache/fineract/portfolio/loanaccount/service/LoanBuyDownFeeAmortizationProcessingServiceImpl.java:
##########
@@ -80,14 +80,17 @@ public void processBuyDownFeeAmortizationTillDate(@NonNull
Loan loan, @NonNull L
AmortizationType amortizationType;
if (!balance.isDeleted()) {
final List<LoanTransaction> adjustments =
loanTransactionRepository.findAdjustments(balance.getLoanTransaction());
- final Money amortizationTillDate =
BuyDownFeeAmortizationUtil.calculateTotalAmortizationTillDate(balance,
adjustments,
- maturityDate,
loan.getLoanProductRelatedDetail().getBuyDownFeeStrategy(), tillDatePlusOne,
loan.getCurrency());
final BigDecimal alreadyAmortizedAmount =
loanAmortizationAllocationService
.calculateAlreadyAmortizedAmount(balance.getLoanTransaction().getId(),
loan.getId());
if (MathUtil.isZero(balance.getUnrecognizedAmount()) &&
adjustments.isEmpty()) {
totalAmortization =
totalAmortization.add(Money.of(loan.getCurrency(), alreadyAmortizedAmount));
continue;
}
+ final boolean fullyAmortizedOnSaleOrClosure =
MathUtil.isZero(balance.getUnrecognizedAmount())
+ &&
alreadyAmortizedAmount.compareTo(balance.getAmount()) >= 0;
Review Comment:
I think we should check the netFeeAmount here
--
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]