Merge pull request #1548 from openMF/bugfix/loan_transaction_processing_strategy

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