FINERACT-1971: Delinquency evaluation should be happen only for Active loans in COB
This commit is contained in:
committed by
Adam Saghy
parent
84afccc1f7
commit
fc0fee1e6a
+7
-1
@@ -160,7 +160,13 @@ public class DelinquencyWritePlatformServiceImpl implements DelinquencyWritePlat
|
||||
if (loan == null) {
|
||||
loan = this.loanRepository.findOneWithNotFoundDetection(loanScheduleDelinquencyData.getLoanId());
|
||||
}
|
||||
final CollectionData collectionData = loanDelinquencyDomainService.getOverdueCollectionData(loan, effectiveDelinquencyList);
|
||||
CollectionData collectionData = null;
|
||||
// If the Loan is not Active yet, return template data
|
||||
if (loan.isSubmittedAndPendingApproval() || loan.isApproved()) {
|
||||
collectionData = CollectionData.template();
|
||||
} else {
|
||||
collectionData = loanDelinquencyDomainService.getOverdueCollectionData(loan, effectiveDelinquencyList);
|
||||
}
|
||||
log.debug("Delinquency {}", collectionData);
|
||||
return new LoanScheduleDelinquencyData(loan.getId(), collectionData.getDelinquentDate(), collectionData.getDelinquentDays(), loan);
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user