FINERACT-2405: totalUnpaidPayableNotDueInterest resets to 0 on Charge-Off

This commit is contained in:
Jose Alberto Hernandez
2025-11-19 19:58:33 +01:00
committed by Adam Saghy
parent 2681ee3518
commit 47e8674fa0
7 changed files with 177 additions and 4 deletions
@@ -84,8 +84,11 @@ public class ProgressiveLoanSummaryDataProvider extends CommonLoanSummaryDataPro
if (currentRepaymentPeriod.isPresent()) {
if (loan.isChargedOff() || loan.hasContractTerminationTransaction()) {
return MathUtil.subtractToZero(currentRepaymentPeriod.get().getInterestOutstanding(loan.getCurrency()).getAmount(),
totalUnpaidPayableDueInterest);
if (currentRepaymentPeriod.get().getDueDate().isEqual(businessDate)) {
return BigDecimal.ZERO;
} else {
return currentRepaymentPeriod.get().getInterestOutstanding(loan.getCurrency()).getAmount();
}
} else {
Optional<ProgressiveLoanInterestScheduleModel> savedModel = modelRepository.getSavedModel(loan, businessDate);