mariiaKraievska commented on code in PR #5396:
URL: https://github.com/apache/fineract/pull/5396#discussion_r2736334143
##########
fineract-progressive-loan/src/main/java/org/apache/fineract/portfolio/loanproduct/calc/ProgressiveEMICalculator.java:
##########
@@ -138,7 +138,8 @@ private void addDisbursement(final
ProgressiveLoanInterestScheduleModel schedule
.forEach(rp ->
rp.setTotalDisbursedAmount(rp.getTotalDisbursedAmount().add(operation.getAmount())));
final int numberOfRepayments =
scheduleModel.loanProductRelatedDetail().getNumberOfRepayments();
- if
(scheduleModel.loanProductRelatedDetail().isAllowFullTermForTranche() &&
numberOfRepayments > 0) {
+ if
(scheduleModel.loanProductRelatedDetail().isAllowFullTermForTranche() &&
numberOfRepayments > 0
+ &&
operation.getAction().equals(EmiChangeOperation.Action.DISBURSEMENT)) {
Review Comment:
I think the action check is necessary. The addDisbursement method is called
with different operation actions. For example, in
calculateEMIOnNewModelAndMerge, it's called with operation.withZeroAmount(),
where the operation can have different action types such as CAPITALIZED_INCOME
for example.
I believe the Full Term Tranche logic should only apply to actual
disbursement operations, not to capitalized income or other operation types.
Without this check, the full-term tranche behavior would incorrectly trigger
for capitalized income transactions, which would extend the schedule
unnecessarily.
--
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]