Add loan charge-off behaviour
This commit is contained in:
committed by
Jose Alberto Hernandez
parent
497fc3b9d9
commit
fb692d47da
@@ -55,6 +55,11 @@
|
||||
<span fxFlex="50%">{{ loanDetails.enableDownPayment | yesNo }}</span>
|
||||
</div>
|
||||
|
||||
<div fxFlexFill>
|
||||
<span fxFlex="50%">{{ 'labels.inputs.Loan Charge-off behaviour' | translate}}:</span>
|
||||
<span fxFlex="50%">{{ loanDetails.chargeOffBehaviour.value | translateKey: 'catalogs' }}</span>
|
||||
</div>
|
||||
|
||||
<div fxFlexFill>
|
||||
<span fxFlex="50%"> {{"labels.inputs.Grace: On Principal Payment" | translate}}</span>
|
||||
<span fxFlex="50%"> {{loanDetails.graceOnPrincipalPayment}} </span>
|
||||
|
||||
+11
@@ -403,6 +403,17 @@
|
||||
<span fxFlex="53%">{{ loanProduct.enableAutoRepaymentForDownPayment | yesNo }}</span>
|
||||
</div>
|
||||
|
||||
<div fxFlexFill *ngIf="isAdvancedPaymentAllocation" fxLayout="row wrap" fxLayout.lt-md="column">
|
||||
<h3 class="mat-h3" fxFlexFill>{{ 'labels.inputs.Loan Charge-off behaviour' | translate}}</h3>
|
||||
|
||||
<mat-divider [inset]="true"></mat-divider>
|
||||
|
||||
<div fxFlexFill>
|
||||
<span fxFlex="47%">{{ 'labels.inputs.Loan Charge-off behaviour' | translate}}:</span>
|
||||
<span fxFlex="53%">{{ loanProduct.chargeOffBehaviour.value | translateKey:'catalogs' }}</span>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<h3 class="mat-h3" fxFlexFill>{{ 'labels.heading.Moratorium' | translate}}</h3>
|
||||
|
||||
<div fxFlexFill *ngIf="loanProduct.delinquencyBucket">
|
||||
|
||||
+17
@@ -202,6 +202,9 @@ export class LoanProductSummaryComponent implements OnInit, OnChanges {
|
||||
this.loanProduct.loanScheduleProcessingType = this.optionDataLookUpByCode(this.loanProduct.loanScheduleProcessingType,
|
||||
this.loanProductsTemplate.loanScheduleProcessingTypeOptions);
|
||||
}
|
||||
if (!this.loanProduct.chargeOffBehaviour.value) {
|
||||
this.loanProduct.chargeOffBehaviour = this.stringEnumOptionDataLookUp(this.loanProduct.chargeOffBehaviour, this.loanProductsTemplate.chargeOffBehaviourOptions);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
@@ -242,6 +245,20 @@ export class LoanProductSummaryComponent implements OnInit, OnChanges {
|
||||
return optionData;
|
||||
}
|
||||
|
||||
stringEnumOptionDataLookUp(itemId: any, optionsData: any[]): StringEnumOptionData {
|
||||
let optionData: StringEnumOptionData | null;
|
||||
optionsData.some((o: any) => {
|
||||
if (o.id === itemId) {
|
||||
optionData = {
|
||||
id: o.id,
|
||||
code: o.code,
|
||||
value: o.value
|
||||
};
|
||||
}
|
||||
});
|
||||
return optionData;
|
||||
}
|
||||
|
||||
optionDataLookUpByCode(currentValue: any, optionsData: any[]): OptionData {
|
||||
let optionData: OptionData | null;
|
||||
optionsData.some((o: any) => {
|
||||
|
||||
+13
@@ -135,6 +135,19 @@
|
||||
|
||||
<span fxFlex="48%" fxHide.lt-md></span>
|
||||
|
||||
<div *ngIf="isAdvancedTransactionProcessingStrategy" fxFlexFill fxLayout="row wrap" fxLayoutGap="2%" fxLayout.lt-md="column">
|
||||
<h3 fxFlex="98%" class="mat-h4">{{'labels.inputs.Loan Charge-off behaviour' | translate}}</h3>
|
||||
|
||||
<mat-form-field fxFlex="30%">
|
||||
<mat-label>{{'labels.inputs.Loan Charge-off behaviour' | translate}}</mat-label>
|
||||
<mat-select formControlName="chargeOffBehaviour" required>
|
||||
<mat-option *ngFor="let chargeOffBehaviour of chargeOffBehaviourData" [value]="chargeOffBehaviour.id">
|
||||
{{ chargeOffBehaviour.value | translateKey:'catalogs' }}
|
||||
</mat-option>
|
||||
</mat-select>
|
||||
</mat-form-field>
|
||||
</div>
|
||||
|
||||
<h4 fxFlex="98%" class="mat-h4 m-r-10">{{'labels.inputs.Moratorium' | translate}} <i class="fas fa-question" matTooltip="{{ 'tooltips.The moratorium information' | translate}}"></i></h4>
|
||||
|
||||
<mat-form-field fxFlex="48%">
|
||||
|
||||
+7
-2
@@ -3,7 +3,7 @@ import { UntypedFormGroup, UntypedFormBuilder, Validators, UntypedFormControl }
|
||||
import { LoanProducts } from '../../loan-products';
|
||||
import { rangeValidator } from 'app/shared/validators/percentage.validator';
|
||||
import { GlobalConfiguration } from 'app/system/configurations/global-configurations-tab/configuration.model';
|
||||
import { CodeName, OptionData } from 'app/shared/models/option-data.model';
|
||||
import { CodeName, OptionData, StringEnumOptionData } from 'app/shared/models/option-data.model';
|
||||
import { ProcessingStrategyService } from '../../services/processing-strategy.service';
|
||||
|
||||
|
||||
@@ -46,6 +46,7 @@ export class LoanProductSettingsStepComponent implements OnInit {
|
||||
advancedTransactionProcessingStrategyDisabled = true;
|
||||
useDueForRepaymentsConfigurations = false;
|
||||
rescheduleStrategyTypeDisabled = false;
|
||||
chargeOffBehaviourData: StringEnumOptionData[] = [];
|
||||
|
||||
/** Values to Days for Repayments */
|
||||
defaultConfigValues: GlobalConfiguration[] = [];
|
||||
@@ -85,6 +86,7 @@ export class LoanProductSettingsStepComponent implements OnInit {
|
||||
this.delinquencyBucketData = this.loanProductsTemplate.delinquencyBucketOptions;
|
||||
this.loanScheduleTypeData = this.loanProductsTemplate.loanScheduleTypeOptions;
|
||||
this.loanScheduleProcessingTypeData = this.loanProductsTemplate.loanScheduleProcessingTypeOptions;
|
||||
this.chargeOffBehaviourData = this.loanProductsTemplate.chargeOffBehaviourOptions;
|
||||
|
||||
// this.useDueForRepaymentsConfigurations = (!this.loanProduct.dueDaysForRepaymentEvent && !this.loanProduct.overDueDaysForRepaymentEvent);
|
||||
|
||||
@@ -121,7 +123,8 @@ export class LoanProductSettingsStepComponent implements OnInit {
|
||||
'enableInstallmentLevelDelinquency': this.loanProductsTemplate.enableInstallmentLevelDelinquency,
|
||||
'loanScheduleType': this.loanProductsTemplate.loanScheduleType.code,
|
||||
'useDueForRepaymentsConfigurations': this.loanProductsTemplate.useDueForRepaymentsConfigurations,
|
||||
'allowAccrualPostingInArrears': this.loanProductsTemplate.allowAccrualPostingInArrears
|
||||
'allowAccrualPostingInArrears': this.loanProductsTemplate.allowAccrualPostingInArrears,
|
||||
'chargeOffBehaviour': this.loanProductsTemplate.chargeOffBehaviour.id
|
||||
});
|
||||
|
||||
this.isAdvancedTransactionProcessingStrategy = LoanProducts.isAdvancedPaymentAllocationStrategy(transactionProcessingStrategyCode);
|
||||
@@ -474,6 +477,7 @@ export class LoanProductSettingsStepComponent implements OnInit {
|
||||
}
|
||||
this.advancedTransactionProcessingStrategyDisabled = false;
|
||||
this.isAdvancedTransactionProcessingStrategy = false;
|
||||
this.loanProductSettingsForm.removeControl('chargeOffBehaviour');
|
||||
} else {
|
||||
// Only Advanced Payment Allocation Strategy
|
||||
this.transactionProcessingStrategyDataBase.some(
|
||||
@@ -487,6 +491,7 @@ export class LoanProductSettingsStepComponent implements OnInit {
|
||||
'transactionProcessingStrategyCode': this.transactionProcessingStrategyData[0].code
|
||||
});
|
||||
this.isAdvancedTransactionProcessingStrategy = true;
|
||||
this.loanProductSettingsForm.addControl('chargeOffBehaviour', new UntypedFormControl(this.loanProductsTemplate.chargeOffBehaviour.id));
|
||||
}
|
||||
if (this.loanProductSettingsForm.value.isInterestRecalculationEnabled) {
|
||||
this.setRescheduleStrategies();
|
||||
|
||||
@@ -128,6 +128,7 @@ export interface LoanProduct {
|
||||
chargeOffReasonToGLAccountMappings?: ChargeOffReasonsToGLAccountMapping[];
|
||||
enableAccrualActivityPosting?: boolean;
|
||||
supportedInterestRefundTypes?: StringEnumOptionData[];
|
||||
chargeOffBehaviour?: StringEnumOptionData;
|
||||
}
|
||||
|
||||
|
||||
|
||||
Reference in New Issue
Block a user