fix: Recurring Deposit accounts issues
This commit is contained in:
committed by
Jose Alberto Hernandez
parent
9b51ec4694
commit
b23efd3e1c
+3
-3
@@ -29,14 +29,14 @@
|
||||
<ng-container matColumnDef="chargeCalculationType">
|
||||
<th mat-header-cell *matHeaderCellDef> {{"labels.inputs.Type" | translate }} </th>
|
||||
<td mat-cell *matCellDef="let charge">
|
||||
{{ charge.chargeCalculationType.value }}
|
||||
{{ charge.chargeCalculationType.value | translateKey:'catalogs' }}
|
||||
</td>
|
||||
</ng-container>
|
||||
|
||||
<ng-container matColumnDef="amount">
|
||||
<th mat-header-cell *matHeaderCellDef> {{"labels.inputs.Amount" | translate }} </th>
|
||||
<td mat-cell *matCellDef="let charge">
|
||||
{{ charge.amount }}
|
||||
{{ charge.amount | formatNumber }}
|
||||
<button mat-icon-button color="primary" (click)="editChargeAmount(charge)">
|
||||
<fa-icon icon="pen"></fa-icon>
|
||||
</button>
|
||||
@@ -46,7 +46,7 @@
|
||||
<ng-container matColumnDef="chargeTimeType">
|
||||
<th mat-header-cell *matHeaderCellDef> {{"labels.inputs.Collected On" | translate }} </th>
|
||||
<td mat-cell *matCellDef="let charge">
|
||||
{{ charge.chargeTimeType.value }}
|
||||
{{ charge.chargeTimeType.value | translateKey:'catalogs' }}
|
||||
</td>
|
||||
</ng-container>
|
||||
|
||||
|
||||
+4
-4
@@ -31,17 +31,17 @@
|
||||
<ng-container matColumnDef="period">
|
||||
<th mat-header-cell *matHeaderCellDef> {{"labels.inputs.Period" | translate }} </th>
|
||||
<td mat-cell *matCellDef="let chartSlab">
|
||||
{{chartSlab.fromPeriod}}-{{chartSlab.toPeriod}} {{chartSlab.periodType.value}}</td>
|
||||
{{chartSlab.fromPeriod}} - {{chartSlab.toPeriod}} {{chartSlab.periodType.value | translateKey:'catalogs'}}</td>
|
||||
</ng-container>
|
||||
|
||||
<ng-container matColumnDef="amountRange">
|
||||
<th mat-header-cell *matHeaderCellDef> {{"labels.inputs.Amount Range" | translate }} </th>
|
||||
<td mat-cell *matCellDef="let chartSlab">{{chartSlab.amountRangeFrom}}-{{chartSlab.amountRangeTo}}</td>
|
||||
<td mat-cell *matCellDef="let chartSlab">{{chartSlab.amountRangeFrom | formatNumber}} - {{chartSlab.amountRangeTo | formatNumber }}</td>
|
||||
</ng-container>
|
||||
|
||||
<ng-container matColumnDef="interest">
|
||||
<th mat-header-cell *matHeaderCellDef> {{"labels.inputs.Interest" | translate }} </th>
|
||||
<td mat-cell *matCellDef="let chartSlab"> {{ chartSlab.annualInterestRate }} </td>
|
||||
<td mat-cell *matCellDef="let chartSlab"> {{ chartSlab.annualInterestRate | formatNumber }} %</td>
|
||||
</ng-container>
|
||||
|
||||
<ng-container matColumnDef="description">
|
||||
@@ -120,7 +120,7 @@
|
||||
<ng-container matColumnDef="amount">
|
||||
<th mat-header-cell *matHeaderCellDef> {{"labels.inputs.Interest" | translate }} </th>
|
||||
<td mat-cell *matCellDef="let incentive">
|
||||
{{ incentive.amount }}
|
||||
{{ incentive.amount | formatNumber }}
|
||||
</td>
|
||||
</ng-container>
|
||||
|
||||
|
||||
+16
-16
@@ -46,25 +46,25 @@
|
||||
<div fxFlexFill>
|
||||
<span fxFlex="40%">{{"labels.inputs.Interest Compounding Period" | translate }}:</span>
|
||||
<span
|
||||
fxFlex="60%">{{ recurringDepositAccountData.interestCompoundingPeriodType | find:recurringDepositsAccountProductTemplate.interestCompoundingPeriodTypeOptions:'id':'value' }}</span>
|
||||
fxFlex="60%">{{ recurringDepositAccountData.interestCompoundingPeriodType | find:recurringDepositsAccountProductTemplate.interestCompoundingPeriodTypeOptions:'id':'value' | translateKey:'catalogs' }}</span>
|
||||
</div>
|
||||
|
||||
<div fxFlexFill>
|
||||
<span fxFlex="40%">{{"labels.inputs.Interest Posting Period" | translate }}:</span>
|
||||
<span
|
||||
fxFlex="60%">{{ recurringDepositAccountData.interestPostingPeriodType | find:recurringDepositsAccountProductTemplate.interestPostingPeriodTypeOptions:'id':'value' }}</span>
|
||||
fxFlex="60%">{{ recurringDepositAccountData.interestPostingPeriodType | find:recurringDepositsAccountProductTemplate.interestPostingPeriodTypeOptions:'id':'value' | translateKey:'catalogs' }}</span>
|
||||
</div>
|
||||
|
||||
<div fxFlexFill>
|
||||
<span fxFlex="40%">{{"labels.inputs.Interest Calculated using" | translate }}:</span>
|
||||
<span
|
||||
fxFlex="60%">{{ recurringDepositAccountData.interestCalculationType | find:recurringDepositsAccountProductTemplate.interestCalculationTypeOptions:'id':'value' }}</span>
|
||||
fxFlex="60%">{{ recurringDepositAccountData.interestCalculationType | find:recurringDepositsAccountProductTemplate.interestCalculationTypeOptions:'id':'value' | translateKey:'catalogs' }}</span>
|
||||
</div>
|
||||
|
||||
<div fxFlexFill>
|
||||
<span fxFlex="40%">{{"labels.inputs.Days in Year" | translate }}:</span>
|
||||
<span
|
||||
fxFlex="60%">{{ recurringDepositAccountData.interestCalculationDaysInYearType | find:recurringDepositsAccountProductTemplate.interestCalculationDaysInYearTypeOptions:'id':'value' }}</span>
|
||||
fxFlex="60%">{{ recurringDepositAccountData.interestCalculationDaysInYearType | find:recurringDepositsAccountProductTemplate.interestCalculationDaysInYearTypeOptions:'id':'value' | translateKey:'catalogs' }}</span>
|
||||
</div>
|
||||
|
||||
<h3 class="mat-h3" fxFlexFill>{{"labels.heading.Settings" | translate }}</h3>
|
||||
@@ -74,7 +74,7 @@
|
||||
<div fxFlexFill *ngIf="recurringDepositAccountData.lockinPeriodFrequency">
|
||||
<span fxFlex="40%">{{"labels.inputs.Lock-in Period" | translate }}:</span>
|
||||
<span
|
||||
fxFlex="60%">{{ recurringDepositAccountData.lockinPeriodFrequency + ' ' + (recurringDepositAccountData.lockinPeriodFrequencyType | find:recurringDepositsAccountProductTemplate.lockinPeriodFrequencyTypeOptions:'id':'value') }}</span>
|
||||
fxFlex="60%">{{ recurringDepositAccountData.lockinPeriodFrequency}} {{(recurringDepositAccountData.lockinPeriodFrequencyType | find:recurringDepositsAccountProductTemplate.lockinPeriodFrequencyTypeOptions:'id':'value') | translateKey:'catalogs'}}</span>
|
||||
</div>
|
||||
|
||||
<div fxFlexFill *ngIf="recurringDepositAccountData.mandatoryRecommendedDepositAmount">
|
||||
@@ -85,12 +85,12 @@
|
||||
<div fxFlexFill>
|
||||
<span fxFlex="40%">{{"labels.inputs.Deposit Period" | translate }}:</span>
|
||||
<span
|
||||
fxFlex="60%">{{ recurringDepositAccountData.depositPeriod + ' ' + (recurringDepositAccountData.depositPeriodFrequencyId | find:recurringDepositsAccountProductTemplate.periodFrequencyTypeData:'id':'value') }}</span>
|
||||
fxFlex="60%">{{ recurringDepositAccountData.depositPeriod}} {{recurringDepositAccountData.depositPeriodFrequencyId | find:recurringDepositsAccountProductTemplate.periodFrequencyTypeOptions:'id':'value' | translateKey:'catalogs'}}</span>
|
||||
</div>
|
||||
|
||||
<div fxFlexFill>
|
||||
<span fxFlex="40%">{{"labels.inputs.Deposit Frequency Same as Group/Center meeting" | translate }}:</span>
|
||||
<span fxFlex="60%">{{ recurringDepositsAccountProductTemplate.isCalendarInherited === true ? 'Yes' : 'No' }}</span>
|
||||
<span fxFlex="60%">{{ recurringDepositsAccountProductTemplate.isCalendarInherited | yesNo }}</span>
|
||||
</div>
|
||||
|
||||
<ng-container *ngIf="!recurringDepositsAccountProductTemplate.isCalendarInherited">
|
||||
@@ -102,7 +102,7 @@
|
||||
<div fxFlexFill>
|
||||
<span fxFlex="40%">{{"labels.inputs.Deposit Frequency" | translate }}:</span>
|
||||
<span *ngIf="recurringDepositAccountData.recurringFrequency"
|
||||
fxFlex="60%">{{ recurringDepositAccountData.recurringFrequency + ' ' + (recurringDepositAccountData.recurringFrequencyType | find:recurringDepositsAccountProductTemplate.periodFrequencyTypeData:'id':'value')}}</span>
|
||||
fxFlex="60%">{{ recurringDepositAccountData.recurringFrequency}} {{(recurringDepositAccountData.recurringFrequencyType | find:recurringDepositsAccountProductTemplate.periodFrequencyTypeOptions:'id':'value') | translateKey:'catalogs'}}</span>
|
||||
</div>
|
||||
</ng-container>
|
||||
|
||||
@@ -110,19 +110,19 @@
|
||||
<div fxFlexFill>
|
||||
<span fxFlex="40%">{{"labels.inputs.Minimum Deposit Term" | translate }}:</span>
|
||||
<span
|
||||
fxFlex="60%">{{ (recurringDepositsAccountProductTemplate.minDepositTerm ? recurringDepositsAccountProductTemplate.minDepositTerm: '') + ' ' + (this.recurringDepositsAccountProductTemplate.minDepositTermType ? this.recurringDepositsAccountProductTemplate.minDepositTermType.value: '') }}</span>
|
||||
fxFlex="60%">{{ (recurringDepositsAccountProductTemplate.minDepositTerm ? recurringDepositsAccountProductTemplate.minDepositTerm: '')}} {{(this.recurringDepositsAccountProductTemplate.minDepositTermType ? this.recurringDepositsAccountProductTemplate.minDepositTermType.value: '') | translateKey:'catalogs'}}</span>
|
||||
</div>
|
||||
|
||||
<div fxFlexFill>
|
||||
<span fxFlex="40%">{{"labels.inputs.In Multiples Of" | translate }}:</span>
|
||||
<span
|
||||
fxFlex="60%">{{ (recurringDepositsAccountProductTemplate.inMultiplesOfDepositTerm ? recurringDepositsAccountProductTemplate.inMultiplesOfDepositTerm: '') + ' ' + (this.recurringDepositsAccountProductTemplate.inMultiplesOfDepositTermType ? this.recurringDepositsAccountProductTemplate.inMultiplesOfDepositTermType.value: '') }}</span>
|
||||
fxFlex="60%">{{ (recurringDepositsAccountProductTemplate.inMultiplesOfDepositTerm ? recurringDepositsAccountProductTemplate.inMultiplesOfDepositTerm: '')}} {{(this.recurringDepositsAccountProductTemplate.inMultiplesOfDepositTermType ? this.recurringDepositsAccountProductTemplate.inMultiplesOfDepositTermType.value: '') | translateKey:'catalogs'}}</span>
|
||||
</div>
|
||||
|
||||
<div fxFlexFill>
|
||||
<span fxFlex="40%">{{"labels.inputs.Maximum Deposit Term" | translate }}</span>
|
||||
<span
|
||||
fxFlex="60%">{{ (recurringDepositsAccountProductTemplate.maxDepositTerm ? recurringDepositsAccountProductTemplate.maxDepositTerm: '') + ' ' + (this.recurringDepositsAccountProductTemplate.maxDepositTermType ? this.recurringDepositsAccountProductTemplate.maxDepositTermType.value: '') }}</span>
|
||||
fxFlex="60%">{{ (recurringDepositsAccountProductTemplate.maxDepositTerm ? recurringDepositsAccountProductTemplate.maxDepositTerm: '')}} {{(this.recurringDepositsAccountProductTemplate.maxDepositTermType ? this.recurringDepositsAccountProductTemplate.maxDepositTermType.value: '') | translateKey:'catalogs'}}</span>
|
||||
</div>
|
||||
|
||||
|
||||
@@ -163,17 +163,17 @@
|
||||
<ng-container matColumnDef="period">
|
||||
<th mat-header-cell *matHeaderCellDef> {{"labels.inputs.Period" | translate }} </th>
|
||||
<td mat-cell *matCellDef="let chartSlab">
|
||||
{{chartSlab.fromPeriod}}-{{chartSlab.toPeriod}} {{chartSlab.periodType.value}}</td>
|
||||
{{chartSlab.fromPeriod}} - {{chartSlab.toPeriod}} {{chartSlab.periodType.value | translateKey:'catalogs'}}</td>
|
||||
</ng-container>
|
||||
|
||||
<ng-container matColumnDef="amountRange">
|
||||
<th mat-header-cell *matHeaderCellDef> {{"labels.inputs.Amount Range" | translate }} </th>
|
||||
<td mat-cell *matCellDef="let chartSlab">{{chartSlab.amountRangeFrom}}-{{chartSlab.amountRangeTo}}</td>
|
||||
<td mat-cell *matCellDef="let chartSlab">{{chartSlab.amountRangeFrom | formatNumber}} - {{chartSlab.amountRangeTo | formatNumber}}</td>
|
||||
</ng-container>
|
||||
|
||||
<ng-container matColumnDef="interest">
|
||||
<th mat-header-cell *matHeaderCellDef> {{"labels.inputs.Interest" | translate }} </th>
|
||||
<td mat-cell *matCellDef="let chartSlab"> {{ chartSlab.annualInterestRate }} </td>
|
||||
<td mat-cell *matCellDef="let chartSlab"> {{ chartSlab.annualInterestRate | formatNumber }} %</td>
|
||||
</ng-container>
|
||||
|
||||
<ng-container matColumnDef="description">
|
||||
@@ -292,14 +292,14 @@
|
||||
<ng-container matColumnDef="chargeCalculationType">
|
||||
<th mat-header-cell *matHeaderCellDef> {{"labels.inputs.Type" | translate }} </th>
|
||||
<td mat-cell *matCellDef="let charge">
|
||||
{{ charge.chargeCalculationType.value }}
|
||||
{{ charge.chargeCalculationType.value | translateKey:'catalogs' }}
|
||||
</td>
|
||||
</ng-container>
|
||||
|
||||
<ng-container matColumnDef="amount">
|
||||
<th mat-header-cell *matHeaderCellDef> {{"labels.inputs.Amount" | translate }} </th>
|
||||
<td mat-cell *matCellDef="let charge">
|
||||
{{ charge.amount }}
|
||||
{{ charge.amount | formatNumber }}
|
||||
</td>
|
||||
</ng-container>
|
||||
|
||||
|
||||
+7
-8
@@ -27,7 +27,7 @@
|
||||
<mat-select formControlName="lockinPeriodFrequencyType">
|
||||
<mat-option *ngFor="let lockinPeriodFrequencyType of lockinPeriodFrequencyTypeData"
|
||||
[value]="lockinPeriodFrequencyType.id">
|
||||
{{ lockinPeriodFrequencyType.value }}
|
||||
{{ lockinPeriodFrequencyType.value | translateKey:'catalogs' }}
|
||||
</mat-option>
|
||||
</mat-select>
|
||||
</mat-form-field>
|
||||
@@ -53,7 +53,7 @@
|
||||
<mat-label>{{"labels.inputs.Type" | translate }}</mat-label>
|
||||
<mat-select formControlName="depositPeriodFrequencyId" required>
|
||||
<mat-option *ngFor="let periodFrequencyType of periodFrequencyTypeData" [value]="periodFrequencyType.id">
|
||||
{{ periodFrequencyType.value }}
|
||||
{{ periodFrequencyType.value | translateKey:'catalogs' }}
|
||||
</mat-option>
|
||||
</mat-select>
|
||||
</mat-form-field>
|
||||
@@ -85,7 +85,7 @@
|
||||
<mat-label>{{"labels.inputs.Type" | translate }}</mat-label>
|
||||
<mat-select formControlName="recurringFrequencyType" required>
|
||||
<mat-option *ngFor="let periodFrequencyType of periodFrequencyTypeData" [value]="periodFrequencyType.id">
|
||||
{{ periodFrequencyType.value }}
|
||||
{{ periodFrequencyType.value | translateKey:'catalogs' }}
|
||||
</mat-option>
|
||||
</mat-select>
|
||||
<mat-error>
|
||||
@@ -94,7 +94,6 @@
|
||||
</mat-form-field>
|
||||
</ng-container>
|
||||
|
||||
|
||||
<mat-divider fxFlex="98%"></mat-divider>
|
||||
|
||||
<h4 fxFlex="98%" class="mat-h4">{{"labels.heading.Minimum Deposit Term" | translate }}</h4>
|
||||
@@ -111,7 +110,7 @@
|
||||
<mat-label>{{"labels.inputs.Frequency Type" | translate }}</mat-label>
|
||||
<mat-select formControlName="minDepositTermTypeId" required>
|
||||
<mat-option *ngFor="let periodFrequencyType of periodFrequencyTypeData" [value]="periodFrequencyType.id">
|
||||
{{ periodFrequencyType.value }}
|
||||
{{ periodFrequencyType.value | translateKey:'catalogs' }}
|
||||
</mat-option>
|
||||
</mat-select>
|
||||
<mat-error>
|
||||
@@ -130,7 +129,7 @@
|
||||
<mat-label>{{"labels.inputs.Type" | translate }}</mat-label>
|
||||
<mat-select formControlName="inMultiplesOfDepositTermTypeId">
|
||||
<mat-option *ngFor="let periodFrequencyType of periodFrequencyTypeData" [value]="periodFrequencyType.id">
|
||||
{{ periodFrequencyType.value }}
|
||||
{{ periodFrequencyType.value | translateKey:'catalogs' }}
|
||||
</mat-option>
|
||||
</mat-select>
|
||||
</mat-form-field>
|
||||
@@ -146,7 +145,7 @@
|
||||
<mat-label>{{"labels.inputs.Type" | translate }}</mat-label>
|
||||
<mat-select formControlName="maxDepositTermTypeId">
|
||||
<mat-option *ngFor="let periodFrequencyType of periodFrequencyTypeData" [value]="periodFrequencyType.id">
|
||||
{{ periodFrequencyType.value }}
|
||||
{{ periodFrequencyType.value | translateKey:'catalogs' }}
|
||||
</mat-option>
|
||||
</mat-select>
|
||||
</mat-form-field>
|
||||
@@ -169,7 +168,7 @@
|
||||
<mat-select formControlName="preClosurePenalInterestOnTypeId">
|
||||
<mat-option *ngFor="let preClosurePenalInterestOnType of preClosurePenalInterestOnTypeData"
|
||||
[value]="preClosurePenalInterestOnType.id">
|
||||
{{ preClosurePenalInterestOnType.value }}
|
||||
{{ preClosurePenalInterestOnType.value | translateKey:'catalogs' }}
|
||||
</mat-option>
|
||||
</mat-select>
|
||||
</mat-form-field>
|
||||
|
||||
+31
-26
@@ -15,6 +15,7 @@ import { SettingsService } from 'app/settings/settings.service';
|
||||
})
|
||||
export class RecurringDepositsAccountSettingsStepComponent implements OnInit, OnChanges {
|
||||
|
||||
@Input() isNew = true;
|
||||
@Input() recurringDepositsAccountTemplate: any;
|
||||
@Input() recurringDepositsAccountProductTemplate: any;
|
||||
|
||||
@@ -44,32 +45,36 @@ export class RecurringDepositsAccountSettingsStepComponent implements OnInit, On
|
||||
}
|
||||
|
||||
ngOnChanges() {
|
||||
if (this.recurringDepositsAccountProductTemplate) {
|
||||
const recurringDepositsAccount: any = this.isNew ? this.recurringDepositsAccountProductTemplate : this.recurringDepositsAccountTemplate;
|
||||
if (recurringDepositsAccount) {
|
||||
this.recurringDepositAccountSettingsForm.patchValue({
|
||||
'isMandatoryDeposit': this.recurringDepositsAccountProductTemplate.isMandatoryDeposit,
|
||||
'adjustAdvanceTowardsFuturePayments': this.recurringDepositsAccountProductTemplate.adjustAdvanceTowardsFuturePayments,
|
||||
'allowWithdrawal': this.recurringDepositsAccountProductTemplate.allowWithdrawal,
|
||||
'lockinPeriodFrequency': this.recurringDepositsAccountProductTemplate.lockinPeriodFrequency,
|
||||
'lockinPeriodFrequencyType': this.recurringDepositsAccountProductTemplate.lockinPeriodFrequencyType ? this.recurringDepositsAccountProductTemplate.lockinPeriodFrequencyType.id : '',
|
||||
'minDepositTerm': this.recurringDepositsAccountProductTemplate.minDepositTerm,
|
||||
'minDepositTermTypeId': this.recurringDepositsAccountProductTemplate.minDepositTermType ? this.recurringDepositsAccountProductTemplate.minDepositTermType.id : '',
|
||||
'inMultiplesOfDepositTerm': this.recurringDepositsAccountProductTemplate.inMultiplesOfDepositTerm,
|
||||
'inMultiplesOfDepositTermTypeId': this.recurringDepositsAccountProductTemplate.inMultiplesOfDepositTermType ? this.recurringDepositsAccountProductTemplate.inMultiplesOfDepositTermType.id : '',
|
||||
'maxDepositTerm': this.recurringDepositsAccountProductTemplate.maxDepositTerm,
|
||||
'maxDepositTermTypeId': this.recurringDepositsAccountProductTemplate.maxDepositTermType ? this.recurringDepositsAccountProductTemplate.maxDepositTermType.id : '',
|
||||
'preClosurePenalApplicable': this.recurringDepositsAccountProductTemplate.preClosurePenalApplicable,
|
||||
'preClosurePenalInterest': this.recurringDepositsAccountProductTemplate.preClosurePenalInterest,
|
||||
'preClosurePenalInterestOnTypeId': this.recurringDepositsAccountProductTemplate.preClosurePenalInterestOnType ? this.recurringDepositsAccountProductTemplate.preClosurePenalInterestOnType.id : '',
|
||||
'minBalanceForInterestCalculation': this.recurringDepositsAccountProductTemplate.minBalanceForInterestCalculation,
|
||||
'depositPeriod': this.recurringDepositsAccountProductTemplate.minDepositTerm,
|
||||
'depositPeriodFrequencyId': this.recurringDepositsAccountProductTemplate.minDepositTermType.id
|
||||
'isMandatoryDeposit': recurringDepositsAccount.isMandatoryDeposit,
|
||||
'adjustAdvanceTowardsFuturePayments': recurringDepositsAccount.adjustAdvanceTowardsFuturePayments,
|
||||
'allowWithdrawal': recurringDepositsAccount.allowWithdrawal,
|
||||
'lockinPeriodFrequency': recurringDepositsAccount.lockinPeriodFrequency,
|
||||
'lockinPeriodFrequencyType': recurringDepositsAccount.lockinPeriodFrequencyType ? recurringDepositsAccount.lockinPeriodFrequencyType.id : '',
|
||||
'minDepositTerm': recurringDepositsAccount.minDepositTerm,
|
||||
'minDepositTermTypeId': recurringDepositsAccount.minDepositTermType ? recurringDepositsAccount.minDepositTermType.id : '',
|
||||
'inMultiplesOfDepositTerm': recurringDepositsAccount.inMultiplesOfDepositTerm,
|
||||
'inMultiplesOfDepositTermTypeId': recurringDepositsAccount.inMultiplesOfDepositTermType ? recurringDepositsAccount.inMultiplesOfDepositTermType.id : '',
|
||||
'maxDepositTerm': recurringDepositsAccount.maxDepositTerm,
|
||||
'maxDepositTermTypeId': recurringDepositsAccount.maxDepositTermType ? recurringDepositsAccount.maxDepositTermType.id : '',
|
||||
'preClosurePenalApplicable': recurringDepositsAccount.preClosurePenalApplicable,
|
||||
'preClosurePenalInterest': recurringDepositsAccount.preClosurePenalInterest,
|
||||
'preClosurePenalInterestOnTypeId': recurringDepositsAccount.preClosurePenalInterestOnType ? recurringDepositsAccount.preClosurePenalInterestOnType.id : '',
|
||||
'minBalanceForInterestCalculation': recurringDepositsAccount.minBalanceForInterestCalculation,
|
||||
'depositPeriod': recurringDepositsAccount.minDepositTerm,
|
||||
'depositPeriodFrequencyId': recurringDepositsAccount.minDepositTermType.id,
|
||||
'expectedFirstDepositOnDate': recurringDepositsAccount.expectedFirstDepositOnDate && new Date(recurringDepositsAccount.expectedFirstDepositOnDate),
|
||||
'recurringFrequency': recurringDepositsAccount.recurringFrequency,
|
||||
'recurringFrequencyType': recurringDepositsAccount.recurringFrequencyType ? recurringDepositsAccount.recurringFrequencyType.id : ''
|
||||
});
|
||||
if (this.recurringDepositsAccountProductTemplate.withHoldTax) {
|
||||
if (recurringDepositsAccount.withHoldTax) {
|
||||
this.recurringDepositAccountSettingsForm.addControl('withHoldTax', new UntypedFormControl(false));
|
||||
this.recurringDepositAccountSettingsForm.get('withHoldTax').valueChanges.subscribe((value: boolean) => {
|
||||
if (value) {
|
||||
this.recurringDepositAccountSettingsForm.addControl('taxGroupId', new UntypedFormControl({ value: '', disabled: true }));
|
||||
this.recurringDepositAccountSettingsForm.get('taxGroupId').patchValue(this.recurringDepositsAccountProductTemplate.taxGroup && this.recurringDepositsAccountProductTemplate.taxGroup.name);
|
||||
this.recurringDepositAccountSettingsForm.get('taxGroupId').patchValue(recurringDepositsAccount.taxGroup && recurringDepositsAccount.taxGroup.name);
|
||||
} else {
|
||||
this.recurringDepositAccountSettingsForm.removeControl('taxGroupId');
|
||||
}
|
||||
@@ -78,8 +83,8 @@ export class RecurringDepositsAccountSettingsStepComponent implements OnInit, On
|
||||
} else {
|
||||
this.recurringDepositAccountSettingsForm.removeControl('withHoldTax');
|
||||
}
|
||||
this.taxGroup = this.recurringDepositsAccountProductTemplate.taxGroup;
|
||||
this.setOptions();
|
||||
this.taxGroup = recurringDepositsAccount.taxGroup;
|
||||
this.setOptions(recurringDepositsAccount);
|
||||
}
|
||||
}
|
||||
|
||||
@@ -127,10 +132,10 @@ export class RecurringDepositsAccountSettingsStepComponent implements OnInit, On
|
||||
/**
|
||||
* Sets all select dropdown options.
|
||||
*/
|
||||
setOptions() {
|
||||
this.lockinPeriodFrequencyTypeData = this.recurringDepositsAccountProductTemplate.lockinPeriodFrequencyTypeOptions;
|
||||
this.periodFrequencyTypeData = this.recurringDepositsAccountProductTemplate.periodFrequencyTypeOptions;
|
||||
this.preClosurePenalInterestOnTypeData = this.recurringDepositsAccountProductTemplate.preClosurePenalInterestOnTypeOptions;
|
||||
setOptions(recurringDepositsAccount: any) {
|
||||
this.lockinPeriodFrequencyTypeData = recurringDepositsAccount.lockinPeriodFrequencyTypeOptions;
|
||||
this.periodFrequencyTypeData = recurringDepositsAccount.periodFrequencyTypeOptions;
|
||||
this.preClosurePenalInterestOnTypeData = recurringDepositsAccount.preClosurePenalInterestOnTypeOptions;
|
||||
}
|
||||
|
||||
/**
|
||||
|
||||
+4
-4
@@ -7,7 +7,7 @@
|
||||
<mat-select formControlName="interestCompoundingPeriodType" required>
|
||||
<mat-option *ngFor="let interestCompoundingPeriodType of interestCompoundingPeriodTypeData"
|
||||
[value]="interestCompoundingPeriodType.id">
|
||||
{{ interestCompoundingPeriodType.value }}
|
||||
{{ interestCompoundingPeriodType.value | translateKey:'catalogs' }}
|
||||
</mat-option>
|
||||
</mat-select>
|
||||
<mat-error>
|
||||
@@ -20,7 +20,7 @@
|
||||
<mat-select formControlName="interestPostingPeriodType" required>
|
||||
<mat-option *ngFor="let interestPostingPeriodType of interestPostingPeriodTypeData"
|
||||
[value]="interestPostingPeriodType.id">
|
||||
{{ interestPostingPeriodType.value }}
|
||||
{{ interestPostingPeriodType.value | translateKey:'catalogs' }}
|
||||
</mat-option>
|
||||
</mat-select>
|
||||
<mat-error>
|
||||
@@ -33,7 +33,7 @@
|
||||
<mat-select formControlName="interestCalculationType" required>
|
||||
<mat-option *ngFor="let interestCalculationType of interestCalculationTypeData"
|
||||
[value]="interestCalculationType.id">
|
||||
{{ interestCalculationType.value }}
|
||||
{{ interestCalculationType.value | translateKey:'catalogs' }}
|
||||
</mat-option>
|
||||
</mat-select>
|
||||
<mat-error>
|
||||
@@ -46,7 +46,7 @@
|
||||
<mat-select formControlName="interestCalculationDaysInYearType" required>
|
||||
<mat-option *ngFor="let interestCalculationDaysInYearType of interestCalculationDaysInYearTypeData"
|
||||
[value]="interestCalculationDaysInYearType.id">
|
||||
{{ interestCalculationDaysInYearType.value }}
|
||||
{{ interestCalculationDaysInYearType.value | translateKey:'catalogs' }}
|
||||
</mat-option>
|
||||
</mat-select>
|
||||
<mat-error>
|
||||
|
||||
Reference in New Issue
Block a user