Support for Loan Transaction Processing Strategy Code - fix

This commit is contained in:
Adam Saghy
2022-11-04 14:40:20 +01:00
parent aae293fb16
commit 80422e2804
7 changed files with 19 additions and 19 deletions
@@ -126,7 +126,7 @@
<div fxFlexFill> <div fxFlexFill>
<span fxFlex="40%">Repayment strategy: </span> <span fxFlex="40%">Repayment strategy: </span>
<span <span
fxFlex="60%">{{ loansAccount.transactionProcessingStrategyId | find:loansAccountTemplate.transactionProcessingStrategyOptions:'id':'name' }}</span> fxFlex="60%">{{ loansAccount.transactionProcessingStrategyCode | find:loansAccountTemplate.transactionProcessingStrategyOptions:'code':'name' }}</span>
</div> </div>
<h3 class="mat-h3" fxFlexFill>Moratorium</h3> <h3 class="mat-h3" fxFlexFill>Moratorium</h3>
@@ -61,7 +61,7 @@ export class GlimTermsStepComponent implements OnInit, OnChanges {
'interestRatePerPeriod': this.loansAccountProductTemplate.interestRatePerPeriod, 'interestRatePerPeriod': this.loansAccountProductTemplate.interestRatePerPeriod,
'interestType': this.loansAccountProductTemplate.interestType.id, 'interestType': this.loansAccountProductTemplate.interestType.id,
'interestCalculationPeriodType': this.loansAccountProductTemplate.interestCalculationPeriodType.id, 'interestCalculationPeriodType': this.loansAccountProductTemplate.interestCalculationPeriodType.id,
'transactionProcessingStrategyId': this.loansAccountProductTemplate.transactionProcessingStrategyId, 'transactionProcessingStrategyCode': this.loansAccountProductTemplate.transactionProcessingStrategyCode,
}); });
this.setOptions(); this.setOptions();
} }
@@ -117,7 +117,7 @@ export class GlimTermsStepComponent implements OnInit, OnChanges {
'interestRatePerPeriod': [''], 'interestRatePerPeriod': [''],
'interestType': [''], 'interestType': [''],
'interestCalculationPeriodType': [''], 'interestCalculationPeriodType': [''],
'transactionProcessingStrategyId': [''] 'transactionProcessingStrategyCode': ['']
}); });
} }
@@ -126,7 +126,7 @@
<div fxFlexFill> <div fxFlexFill>
<span fxFlex="40%">Repayment strategy: </span> <span fxFlex="40%">Repayment strategy: </span>
<span <span
fxFlex="60%">{{ loansAccount.transactionProcessingStrategyId | find:loansAccountTemplate.transactionProcessingStrategyOptions:'id':'name' }}</span> fxFlex="60%">{{ loansAccount.transactionProcessingStrategyCode | find:loansAccountTemplate.transactionProcessingStrategyOptions:'code':'name' }}</span>
</div> </div>
<h3 class="mat-h3" fxFlexFill>Moratorium</h3> <h3 class="mat-h3" fxFlexFill>Moratorium</h3>
@@ -298,7 +298,7 @@
<div fxFlexFill> <div fxFlexFill>
<span fxFlex="40%">Repayment Strategy:</span> <span fxFlex="40%">Repayment Strategy:</span>
<span fxFlex="60%">{{ loanProduct.transactionProcessingStrategyId | find:loanProductsTemplate.transactionProcessingStrategyOptions:'id':'name' }}</span> <span fxFlex="60%">{{ loanProduct.transactionProcessingStrategyCode | find:loanProductsTemplate.transactionProcessingStrategyOptions:'code':'name' }}</span>
</div> </div>
<div fxFlexFill *ngIf="loanProduct.graceOnPrincipalPayment"> <div fxFlexFill *ngIf="loanProduct.graceOnPrincipalPayment">
@@ -488,7 +488,7 @@
<span fxFlex="40%">Interest method:</span> <span fxFlex="40%">Interest method:</span>
<span fxFlex="60%">{{ loanProduct.allowAttributeOverrides.interestType ? 'Yes' : 'No' }}</span> <span fxFlex="60%">{{ loanProduct.allowAttributeOverrides.interestType ? 'Yes' : 'No' }}</span>
<span fxFlex="40%">Repayment strategy:</span> <span fxFlex="40%">Repayment strategy:</span>
<span fxFlex="60%">{{ loanProduct.allowAttributeOverrides.transactionProcessingStrategyId ? 'Yes' : 'No' }}</span> <span fxFlex="60%">{{ loanProduct.allowAttributeOverrides.transactionProcessingStrategyCode ? 'Yes' : 'No' }}</span>
<span fxFlex="40%">Interest calculation period:</span> <span fxFlex="40%">Interest calculation period:</span>
<span fxFlex="60%">{{ loanProduct.allowAttributeOverrides.interestCalculationPeriodType ? 'Yes' : 'No' }}</span> <span fxFlex="60%">{{ loanProduct.allowAttributeOverrides.interestCalculationPeriodType ? 'Yes' : 'No' }}</span>
<span fxFlex="40%">Arrears tolerance:</span> <span fxFlex="40%">Arrears tolerance:</span>
@@ -48,8 +48,8 @@
<mat-form-field fxFlex="48%"> <mat-form-field fxFlex="48%">
<mat-label>Repayment strategy</mat-label> <mat-label>Repayment strategy</mat-label>
<mat-select formControlName="transactionProcessingStrategyId" required> <mat-select formControlName="transactionProcessingStrategyCode" required>
<mat-option *ngFor="let transactionProcessingStrategy of transactionProcessingStrategyData" [value]="transactionProcessingStrategy.id"> <mat-option *ngFor="let transactionProcessingStrategy of transactionProcessingStrategyData" [value]="transactionProcessingStrategy.code">
{{ transactionProcessingStrategy.name }} {{ transactionProcessingStrategy.name }}
</mat-option> </mat-option>
</mat-select> </mat-select>
@@ -417,7 +417,7 @@
Interest method Interest method
</mat-checkbox> </mat-checkbox>
<mat-checkbox fxFlex="48%" labelPosition="before" formControlName="transactionProcessingStrategyId" class="margin-v"> <mat-checkbox fxFlex="48%" labelPosition="before" formControlName="transactionProcessingStrategyCode" class="margin-v">
Repayment strategy Repayment strategy
</mat-checkbox> </mat-checkbox>
@@ -39,7 +39,7 @@ export class LoanProductSettingsStepComponent implements OnInit {
if (isLinkedToFloatingInterestRates) { if (isLinkedToFloatingInterestRates) {
this.loanProductSettingsForm.get('isInterestRecalculationEnabled').setValue(true); this.loanProductSettingsForm.get('isInterestRecalculationEnabled').setValue(true);
} }
}); });
this.amortizationTypeData = this.loanProductsTemplate.amortizationTypeOptions; this.amortizationTypeData = this.loanProductsTemplate.amortizationTypeOptions;
this.interestTypeData = this.loanProductsTemplate.interestTypeOptions; this.interestTypeData = this.loanProductsTemplate.interestTypeOptions;
@@ -63,7 +63,7 @@ export class LoanProductSettingsStepComponent implements OnInit {
'isEqualAmortization': this.loanProductsTemplate.isEqualAmortization, 'isEqualAmortization': this.loanProductsTemplate.isEqualAmortization,
'interestCalculationPeriodType': this.loanProductsTemplate.interestCalculationPeriodType.id, 'interestCalculationPeriodType': this.loanProductsTemplate.interestCalculationPeriodType.id,
'allowPartialPeriodInterestCalcualtion': this.loanProductsTemplate.allowPartialPeriodInterestCalcualtion, 'allowPartialPeriodInterestCalcualtion': this.loanProductsTemplate.allowPartialPeriodInterestCalcualtion,
'transactionProcessingStrategyId': this.loanProductsTemplate.transactionProcessingStrategyId || this.transactionProcessingStrategyData[0].id, 'transactionProcessingStrategyCode': this.loanProductsTemplate.transactionProcessingStrategyCode || this.transactionProcessingStrategyData[0].code,
'graceOnPrincipalPayment': this.loanProductsTemplate.graceOnPrincipalPayment, 'graceOnPrincipalPayment': this.loanProductsTemplate.graceOnPrincipalPayment,
'graceOnInterestPayment': this.loanProductsTemplate.graceOnInterestPayment, 'graceOnInterestPayment': this.loanProductsTemplate.graceOnInterestPayment,
'graceOnInterestCharged': this.loanProductsTemplate.graceOnInterestCharged, 'graceOnInterestCharged': this.loanProductsTemplate.graceOnInterestCharged,
@@ -102,7 +102,7 @@ export class LoanProductSettingsStepComponent implements OnInit {
-2 : this.loanProductsTemplate.interestRecalculationData.recalculationRestFrequencyNthDay && this.loanProductsTemplate.interestRecalculationData.recalculationRestFrequencyNthDay.id, -2 : this.loanProductsTemplate.interestRecalculationData.recalculationRestFrequencyNthDay && this.loanProductsTemplate.interestRecalculationData.recalculationRestFrequencyNthDay.id,
'recalculationCompoundingFrequencyNthDayType': this.loanProductsTemplate.interestRecalculationData.interestRecalculationCompoundingType.id && this.loanProductsTemplate.interestRecalculationData.recalculationCompoundingFrequencyType.id === 4 'recalculationCompoundingFrequencyNthDayType': this.loanProductsTemplate.interestRecalculationData.interestRecalculationCompoundingType.id && this.loanProductsTemplate.interestRecalculationData.recalculationCompoundingFrequencyType.id === 4
&& this.loanProductsTemplate.interestRecalculationData.recalculationCompoundingFrequencyOnDay ? -2 : this.loanProductsTemplate.interestRecalculationData.recalculationCompoundingFrequencyNthDay && this.loanProductsTemplate.interestRecalculationData.recalculationCompoundingFrequencyOnDay ? -2 : this.loanProductsTemplate.interestRecalculationData.recalculationCompoundingFrequencyNthDay
&& this.loanProductsTemplate.interestRecalculationData.recalculationCompoundingFrequencyNthDay.id, && this.loanProductsTemplate.interestRecalculationData.recalculationCompoundingFrequencyNthDay.id,
'recalculationCompoundingFrequencyDayOfWeekType': this.loanProductsTemplate.interestRecalculationData.interestRecalculationCompoundingType.id && ((this.loanProductsTemplate.interestRecalculationData.recalculationCompoundingFrequencyType.id 'recalculationCompoundingFrequencyDayOfWeekType': this.loanProductsTemplate.interestRecalculationData.interestRecalculationCompoundingType.id && ((this.loanProductsTemplate.interestRecalculationData.recalculationCompoundingFrequencyType.id
=== 4 && !this.loanProductsTemplate.interestRecalculationData.recalculationCompoundingFrequencyOnDay) || this.loanProductsTemplate.interestRecalculationData.recalculationCompoundingFrequencyType.id === 3) === 4 && !this.loanProductsTemplate.interestRecalculationData.recalculationCompoundingFrequencyOnDay) || this.loanProductsTemplate.interestRecalculationData.recalculationCompoundingFrequencyType.id === 3)
&& this.loanProductsTemplate.interestRecalculationData.recalculationCompoundingFrequencyWeekday && this.loanProductsTemplate.interestRecalculationData.recalculationCompoundingFrequencyWeekday.id, && this.loanProductsTemplate.interestRecalculationData.recalculationCompoundingFrequencyWeekday && this.loanProductsTemplate.interestRecalculationData.recalculationCompoundingFrequencyWeekday.id,
@@ -128,7 +128,7 @@ export class LoanProductSettingsStepComponent implements OnInit {
'allowAttributeOverrides': { 'allowAttributeOverrides': {
'amortizationType': this.loanProductsTemplate.allowAttributeOverrides.amortizationType, 'amortizationType': this.loanProductsTemplate.allowAttributeOverrides.amortizationType,
'interestType': this.loanProductsTemplate.allowAttributeOverrides.interestType, 'interestType': this.loanProductsTemplate.allowAttributeOverrides.interestType,
'transactionProcessingStrategyId': this.loanProductsTemplate.allowAttributeOverrides.transactionProcessingStrategyId, 'transactionProcessingStrategyCode': this.loanProductsTemplate.allowAttributeOverrides.transactionProcessingStrategyCode,
'interestCalculationPeriodType': this.loanProductsTemplate.allowAttributeOverrides.interestCalculationPeriodType, 'interestCalculationPeriodType': this.loanProductsTemplate.allowAttributeOverrides.interestCalculationPeriodType,
'inArrearsTolerance': this.loanProductsTemplate.allowAttributeOverrides.inArrearsTolerance, 'inArrearsTolerance': this.loanProductsTemplate.allowAttributeOverrides.inArrearsTolerance,
'repaymentEvery': this.loanProductsTemplate.allowAttributeOverrides.repaymentEvery, 'repaymentEvery': this.loanProductsTemplate.allowAttributeOverrides.repaymentEvery,
@@ -145,7 +145,7 @@ export class LoanProductSettingsStepComponent implements OnInit {
'interestType': ['', Validators.required], 'interestType': ['', Validators.required],
'isEqualAmortization': [false], 'isEqualAmortization': [false],
'interestCalculationPeriodType': ['', Validators.required], 'interestCalculationPeriodType': ['', Validators.required],
'transactionProcessingStrategyId': ['', Validators.required], 'transactionProcessingStrategyCode': ['', Validators.required],
'graceOnPrincipalPayment': [''], 'graceOnPrincipalPayment': [''],
'graceOnInterestPayment': [''], 'graceOnInterestPayment': [''],
'graceOnInterestCharged': [''], 'graceOnInterestCharged': [''],
@@ -167,7 +167,7 @@ export class LoanProductSettingsStepComponent implements OnInit {
'allowAttributeOverrides': this.formBuilder.group({ 'allowAttributeOverrides': this.formBuilder.group({
'amortizationType': [true], 'amortizationType': [true],
'interestType': [true], 'interestType': [true],
'transactionProcessingStrategyId': [true], 'transactionProcessingStrategyCode': [true],
'interestCalculationPeriodType': [true], 'interestCalculationPeriodType': [true],
'inArrearsTolerance': [true], 'inArrearsTolerance': [true],
'repaymentEvery': [true], 'repaymentEvery': [true],
@@ -317,7 +317,7 @@ export class LoanProductSettingsStepComponent implements OnInit {
} else { } else {
this.loanProductSettingsForm.removeControl('maxTrancheCount'); this.loanProductSettingsForm.removeControl('maxTrancheCount');
this.loanProductSettingsForm.removeControl('outstandingLoanBalance'); this.loanProductSettingsForm.removeControl('outstandingLoanBalance');
this.loanProductSettingsForm.patchValue({'disallowExpectedDisbursements': false}); this.loanProductSettingsForm.patchValue({ 'disallowExpectedDisbursements': false });
} }
}); });
@@ -327,7 +327,7 @@ export class LoanProductSettingsStepComponent implements OnInit {
allowAttributeOverrides.patchValue({ allowAttributeOverrides.patchValue({
'amortizationType': true, 'amortizationType': true,
'interestType': true, 'interestType': true,
'transactionProcessingStrategyId': true, 'transactionProcessingStrategyCode': true,
'interestCalculationPeriodType': true, 'interestCalculationPeriodType': true,
'inArrearsTolerance': true, 'inArrearsTolerance': true,
'repaymentEvery': true, 'repaymentEvery': true,
@@ -338,7 +338,7 @@ export class LoanProductSettingsStepComponent implements OnInit {
allowAttributeOverrides.patchValue({ allowAttributeOverrides.patchValue({
'amortizationType': false, 'amortizationType': false,
'interestType': false, 'interestType': false,
'transactionProcessingStrategyId': false, 'transactionProcessingStrategyCode': false,
'interestCalculationPeriodType': false, 'interestCalculationPeriodType': false,
'inArrearsTolerance': false, 'inArrearsTolerance': false,
'repaymentEvery': false, 'repaymentEvery': false,
@@ -495,7 +495,7 @@
<span fxFlex="40%">Interest method:</span> <span fxFlex="40%">Interest method:</span>
<span fxFlex="60%">{{ loanProduct.allowAttributeOverrides.interestType ? 'Yes' : 'No' }}</span> <span fxFlex="60%">{{ loanProduct.allowAttributeOverrides.interestType ? 'Yes' : 'No' }}</span>
<span fxFlex="40%">Repayment strategy:</span> <span fxFlex="40%">Repayment strategy:</span>
<span fxFlex="60%">{{ loanProduct.allowAttributeOverrides.transactionProcessingStrategyId ? 'Yes' : 'No' }}</span> <span fxFlex="60%">{{ loanProduct.allowAttributeOverrides.transactionProcessingStrategyCode ? 'Yes' : 'No' }}</span>
<span fxFlex="40%">Interest calculation period:</span> <span fxFlex="40%">Interest calculation period:</span>
<span fxFlex="60%">{{ loanProduct.allowAttributeOverrides.interestCalculationPeriodType ? 'Yes' : 'No' }}</span> <span fxFlex="60%">{{ loanProduct.allowAttributeOverrides.interestCalculationPeriodType ? 'Yes' : 'No' }}</span>
<span fxFlex="40%">Arrears tolerance:</span> <span fxFlex="40%">Arrears tolerance:</span>