Skip to content

Commit

Permalink
[SU-535] Generate "CANCELACIÓN DEFINITIVA POR REESTRUCTURACIÓN" Event…
Browse files Browse the repository at this point in the history
… on Top-Up Loan Closure
  • Loading branch information
oluexpert99 committed Dec 22, 2024
1 parent 1ac6ff3 commit 37fcc7d
Showing 1 changed file with 4 additions and 0 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -1397,6 +1397,10 @@ private void handleDefinitiveRestructuringCancellation(Loan loan, InsuranceIncid
if (!doesIncidentExist) {
LoanCharge loanCharge = loan.getLoanCharges().stream()
.filter(charge -> isChargeEligibleForNoveltyNews(charge, loan.getCurrency(), incident)).findFirst().orElse(null);
if (loanCharge == null) {
log.warn("No loan charge found for loan with id: {} and incident type: {}", loan.getId(), incident.getIncidentType());
return;
}
InsuranceIncidentNoveltyNews noveltyNews = InsuranceIncidentNoveltyNews.instance(loan, loanCharge, null, incident,
transactionDate, BigDecimal.ZERO);
this.insuranceIncidentNoveltyNewsRepository.saveAndFlush(noveltyNews);
Expand Down

0 comments on commit 37fcc7d

Please sign in to comment.