Backdated delinquency pause with end date in the past validation
This commit is contained in:
committed by
Adam Saghy
parent
3e589894ce
commit
780c469ee4
+16
-1
@@ -129,7 +129,22 @@ export class LoanDelinquencyTagsTabComponent implements OnInit {
|
||||
|
||||
isCurrentAndPauseAction(item: LoanDelinquencyAction): boolean {
|
||||
if (this.currentLoanDelinquencyAction != null) {
|
||||
return (this.currentLoanDelinquencyAction.id === item.id && item.action === 'PAUSE');
|
||||
if (this.currentLoanDelinquencyAction.id === item.id) {
|
||||
if (item.action === 'PAUSE') {
|
||||
const businessDate: Date = this.settingsService.businessDate;
|
||||
const startDate: Date = this.dateUtils.parseDate(item.startDate);
|
||||
if (businessDate < startDate) {
|
||||
return false;
|
||||
}
|
||||
if (item.endDate) {
|
||||
const endDate: Date = this.dateUtils.parseDate(item.endDate);
|
||||
if (businessDate > endDate) {
|
||||
return false;
|
||||
}
|
||||
}
|
||||
return true;
|
||||
}
|
||||
}
|
||||
}
|
||||
return false;
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user