FINERACT-1971: Delinquency evaluation should be happen only for Active Loans

This commit is contained in:
Jose Alberto Hernandez
2024-01-18 14:07:19 +01:00
committed by Adam Saghy
parent 189b94bd19
commit e169b5cd61
2 changed files with 69 additions and 2 deletions
@@ -126,6 +126,11 @@ public class DelinquencyReadPlatformServiceImpl implements DelinquencyReadPlatfo
if (optLoan.isPresent()) {
final Loan loan = optLoan.get();
// If the Loan is not Active yet, return template data
if (loan.isSubmittedAndPendingApproval() || loan.isApproved()) {
return CollectionData.template();
}
final List<LoanDelinquencyAction> savedDelinquencyList = retrieveLoanDelinquencyActions(loanId);
List<LoanDelinquencyActionData> effectiveDelinquencyList = delinquencyEffectivePauseHelper
.calculateEffectiveDelinquencyList(savedDelinquencyList);