FINERACT-2405: totalUnpaidPayableNotDueInterest resets to 0 on Charge-Off
This commit is contained in:
committed by
Adam Saghy
parent
2681ee3518
commit
47e8674fa0
+5
-2
@@ -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);
|
||||
|
||||
Reference in New Issue
Block a user