Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Original file line number Diff line number Diff line change
Expand Up @@ -73,6 +73,7 @@ <h4 class="mat-h4 flex-98">{{ 'labels.inputs.Repayments' | translate }}</h4>
matInput
formControlName="numberOfRepayments"
matTooltip="{{ 'tooltips.Enter the total count of repayments' | translate }}"
min="0"
/>
@if (loansAccountTermsForm.controls.numberOfRepayments.hasError('required')) {
<mat-error>
Expand Down Expand Up @@ -133,6 +134,7 @@ <h4 class="mat-h4 flex-98">
required
formControlName="repaymentEvery"
matTooltip="{{ 'tooltips.Fields are input to calculating the repayment schedule' | translate }}"
min="0"
/>
@if (loansAccountTermsForm.controls.repaymentEvery.hasError('required')) {
<mat-error>
Expand Down Expand Up @@ -198,7 +200,7 @@ <h4 class="mat-h4 flex-98">{{ 'labels.inputs.Nominal interest rate' | translate
@if (!loansAccountTermsData?.isLoanProductLinkedToFloatingRate) {
<mat-form-field class="flex-fill flex-23">
<mat-label>{{ 'labels.inputs.Nominal interest rate' | translate }} %</mat-label>
<input type="number" matInput formControlName="interestRatePerPeriod" />
<input type="number" matInput formControlName="interestRatePerPeriod" min="0" />
</mat-form-field>
<mat-form-field class="flex-fill flex-23">
<mat-label>{{ 'labels.inputs.Frequency' | translate }}</mat-label>
Expand Down Expand Up @@ -375,6 +377,7 @@ <h4 class="mat-h4 flex-98">{{ 'labels.heading.Interest Calculations' | translate
type="number"
formControlName="inArrearsTolerance"
matTooltip="{{ 'tooltips.With Arrears tolerance' | translate }}"
min="0"
/>
</mat-form-field>

Expand All @@ -384,6 +387,7 @@ <h4 class="mat-h4 flex-98">{{ 'labels.heading.Interest Calculations' | translate
matInput
formControlName="graceOnInterestCharged"
matTooltip="{{ 'tooltips.If the Interest Free Period' | translate }}"
min="0"
/>
</mat-form-field>

Expand All @@ -394,17 +398,17 @@ <h4 class="mat-h4 flex-98">

<mat-form-field class="flex-fill flex-23">
<mat-label>{{ 'labels.inputs.Grace on principal payment' | translate }}</mat-label>
<input type="number" matInput formControlName="graceOnPrincipalPayment" />
<input type="number" matInput formControlName="graceOnPrincipalPayment" min="0" />
</mat-form-field>

<mat-form-field class="flex-fill flex-23">
<mat-label>{{ 'labels.inputs.Grace on interest payment' | translate }}</mat-label>
<input type="number" matInput formControlName="graceOnInterestPayment" />
<input type="number" matInput formControlName="graceOnInterestPayment" min="0" />
</mat-form-field>

<mat-form-field class="flex-48">
<mat-label>{{ 'labels.inputs.On arrears ageing' | translate }}</mat-label>
<input type="number" matInput formControlName="graceOnArrearsAgeing" />
<input type="number" matInput formControlName="graceOnArrearsAgeing" min="0" />
</mat-form-field>

@if (isDelinquencyEnabled()) {
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -497,11 +497,17 @@ export class LoansAccountTermsStepComponent extends LoanProductBaseComponent imp
],
numberOfRepayments: [
'',
Validators.required
[
Validators.required,
Validators.min(0)
]
],
repaymentEvery: [
'',
Validators.required
[
Validators.required,
Validators.min(0)
]
],
repaymentFrequencyType: [
{ value: '', disabled: true },
Expand All @@ -511,7 +517,10 @@ export class LoansAccountTermsStepComponent extends LoanProductBaseComponent imp
repaymentFrequencyDayOfWeekType: [''],
repaymentsStartingFromDate: [''],
interestChargedFromDate: [''],
interestRatePerPeriod: [''],
interestRatePerPeriod: [
'',
Validators.min(0)
],
interestType: [''],
isFloatingInterestRate: [null],
isEqualAmortization: [''],
Expand All @@ -521,11 +530,26 @@ export class LoansAccountTermsStepComponent extends LoanProductBaseComponent imp
],
interestCalculationPeriodType: [''],
allowPartialPeriodInterestCalculation: [''],
inArrearsTolerance: [''],
graceOnInterestCharged: [''],
graceOnPrincipalPayment: [''],
graceOnInterestPayment: [''],
graceOnArrearsAgeing: [''],
inArrearsTolerance: [
'',
Validators.min(0)
],
graceOnInterestCharged: [
'',
Validators.min(0)
],
graceOnPrincipalPayment: [
'',
Validators.min(0)
],
graceOnInterestPayment: [
'',
Validators.min(0)
],
graceOnArrearsAgeing: [
'',
Validators.min(0)
],
loanIdToClose: [''],
fixedEmiAmount: [''],
isTopup: [''],
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -20,7 +20,7 @@

<mat-form-field class="flex-48">
<mat-label>{{ 'labels.inputs.Nominal Annual Interest' | translate }}</mat-label>
<input type="number" matInput formControlName="nominalAnnualInterestRate" required />
<input type="number" matInput formControlName="nominalAnnualInterestRate" required min="0" />
<mat-error>
{{ 'labels.inputs.Nominal Annual Interest' | translate }} {{ 'labels.commons.is' | translate }}
<strong>{{ 'labels.commons.required' | translate }}</strong>
Expand Down Expand Up @@ -92,7 +92,7 @@

<mat-form-field class="flex-48">
<mat-label>{{ 'labels.inputs.Minimum Opening Balance' | translate }}</mat-label>
<input type="number" matInput formControlName="minRequiredOpeningBalance" />
<input type="number" matInput formControlName="minRequiredOpeningBalance" min="0" />
</mat-form-field>

<mat-checkbox labelPosition="before" formControlName="withdrawalFeeForTransfers" class="margin-v flex-48">
Expand All @@ -103,7 +103,7 @@ <h4 class="mat-h4 flex-98">{{ 'labels.inputs.Lock-in Period' | translate }}</h4>

<mat-form-field class="flex-48">
<mat-label>{{ 'labels.inputs.Frequency' | translate }}</mat-label>
<input type="number" matInput formControlName="lockinPeriodFrequency" />
<input type="number" matInput formControlName="lockinPeriodFrequency" min="0" />
</mat-form-field>

<mat-form-field class="flex-48">
Expand All @@ -129,15 +129,15 @@ <h3 class="mat-h3 flex-23">{{ 'labels.inputs.Overdraft' | translate }}</h3>
<div class="flex-fill layout-row-wrap gap-2percent responsive-column">
<mat-form-field class="flex-31">
<mat-label>{{ 'labels.inputs.Minimum Overdraft Required for Interest Calculation' | translate }}</mat-label>
<input type="number" matInput formControlName="minOverdraftForInterestCalculation" />
<input type="number" matInput formControlName="minOverdraftForInterestCalculation" min="0" />
</mat-form-field>
<mat-form-field class="flex-31">
<mat-label>{{ 'labels.inputs.Nominal Annual Interest for Overdraft' | translate }}</mat-label>
<input type="number" matInput formControlName="nominalAnnualInterestRateOverdraft" />
<input type="number" matInput formControlName="nominalAnnualInterestRateOverdraft" min="0" />
</mat-form-field>
<mat-form-field class="flex-31">
<mat-label>{{ 'labels.inputs.Maximum Overdraft Amount Limit' | translate }}</mat-label>
<input type="number" matInput formControlName="overdraftLimit" />
<input type="number" matInput formControlName="overdraftLimit" min="0" />
</mat-form-field>
</div>
}
Expand All @@ -150,13 +150,13 @@ <h3 class="mat-h3 flex-23">{{ 'labels.inputs.Overdraft' | translate }}</h3>

<mat-form-field class="flex-48">
<mat-label>{{ 'labels.inputs.Minimum Balance' | translate }}</mat-label>
<input type="number" matInput formControlName="minRequiredBalance" />
<input type="number" matInput formControlName="minRequiredBalance" min="0" />
</mat-form-field>

@if (savingsAccountTermsForm.controls.minBalanceForInterestCalculation.value) {
<mat-form-field class="flex-48">
<mat-label>{{ 'labels.inputs.Balance Required for Interest Calculation' | translate }}</mat-label>
<input type="number" matInput formControlName="minBalanceForInterestCalculation" />
<input type="number" matInput formControlName="minBalanceForInterestCalculation" min="0" />
</mat-form-field>
}
</div>
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -128,7 +128,10 @@ export class SavingsAccountTermsStepComponent implements OnChanges, OnInit {
decimal: [{ value: '', disabled: true }],
nominalAnnualInterestRate: [
'',
Validators.required
[
Validators.required,
Validators.min(0)
]
],
interestCompoundingPeriodType: [
'',
Expand All @@ -146,13 +149,22 @@ export class SavingsAccountTermsStepComponent implements OnChanges, OnInit {
'',
Validators.required
],
minRequiredOpeningBalance: [''],
minRequiredOpeningBalance: [
'',
Validators.min(0)
],
withdrawalFeeForTransfers: [false],
lockinPeriodFrequency: [''],
lockinPeriodFrequency: [
'',
Validators.min(0)
],
lockinPeriodFrequencyType: [''],
allowOverdraft: [false],
enforceMinRequiredBalance: [false],
minRequiredBalance: [''],
minRequiredBalance: [
'',
Validators.min(0)
],
minBalanceForInterestCalculation: [{ value: '', disabled: true }]
});
}
Expand All @@ -175,9 +187,15 @@ export class SavingsAccountTermsStepComponent implements OnChanges, OnInit {
buildDependencies() {
this.savingsAccountTermsForm.get('allowOverdraft').valueChanges.subscribe((allowOverdraft: any) => {
if (allowOverdraft) {
this.savingsAccountTermsForm.addControl('minOverdraftForInterestCalculation', new UntypedFormControl(''));
this.savingsAccountTermsForm.addControl('nominalAnnualInterestRateOverdraft', new UntypedFormControl(''));
this.savingsAccountTermsForm.addControl('overdraftLimit', new UntypedFormControl(''));
this.savingsAccountTermsForm.addControl(
'minOverdraftForInterestCalculation',
new UntypedFormControl('', Validators.min(0))
);
this.savingsAccountTermsForm.addControl(
'nominalAnnualInterestRateOverdraft',
new UntypedFormControl('', Validators.min(0))
);
this.savingsAccountTermsForm.addControl('overdraftLimit', new UntypedFormControl('', Validators.min(0)));
} else {
this.savingsAccountTermsForm.removeControl('minOverdraftForInterestCalculation');
this.savingsAccountTermsForm.removeControl('nominalAnnualInterestRateOverdraft');
Expand Down