+1
-1
@@ -99,7 +99,7 @@
|
||||
</mifosx-loan-product-charges-step>
|
||||
</mat-step>
|
||||
|
||||
<mat-step *ngIf="isAdvancedPaymentStrategy">
|
||||
<mat-step *ngIf="isAdvancedPaymentStrategy" [stepControl]="loanIncomeCapitalizationForm">
|
||||
<ng-template matStepLabel>{{ 'labels.inputs.DEFERRED INCOME RECOGNITION' | translate }}</ng-template>
|
||||
|
||||
<mifosx-loan-product-capitalized-income-step
|
||||
|
||||
@@ -84,6 +84,7 @@ export class CreateLoanProductComponent implements OnInit {
|
||||
advancedCreditAllocations: AdvancedPaymentAllocation[] = [];
|
||||
|
||||
deferredIncomeRecognition: DeferredIncomeRecognition | null = null;
|
||||
loanIncomeCapitalizationForm: UntypedFormGroup | null = null;
|
||||
|
||||
/**
|
||||
* @param {ActivatedRoute} route Activated Route.
|
||||
@@ -197,6 +198,7 @@ export class CreateLoanProductComponent implements OnInit {
|
||||
|
||||
setViewChildForm(viewChildForm: UntypedFormGroup): void {
|
||||
const formValues: any = viewChildForm.getRawValue();
|
||||
this.loanIncomeCapitalizationForm = viewChildForm;
|
||||
const capitalizedIncome: CapitalizedIncome = formValues.enableIncomeCapitalization
|
||||
? {
|
||||
enableIncomeCapitalization: true,
|
||||
@@ -228,10 +230,6 @@ export class CreateLoanProductComponent implements OnInit {
|
||||
return this.loanProductAccountingStep.loanProductAccountingForm;
|
||||
}
|
||||
|
||||
get loanDeferredIncomeRecognitionForm() {
|
||||
return this.loanProductDeferredIncomeRecognitionStep.loanDeferredIncomeRecognitionForm;
|
||||
}
|
||||
|
||||
get loanProductFormValid() {
|
||||
if (this.isAdvancedPaymentStrategy) {
|
||||
return (
|
||||
@@ -239,7 +237,7 @@ export class CreateLoanProductComponent implements OnInit {
|
||||
this.loanProductCurrencyForm.valid &&
|
||||
this.loanProductTermsForm.valid &&
|
||||
this.loanProductSettingsForm.valid &&
|
||||
this.loanDeferredIncomeRecognitionForm.valid &&
|
||||
this.loanIncomeCapitalizationForm.valid &&
|
||||
this.loanProductAccountingForm.valid
|
||||
);
|
||||
} else {
|
||||
|
||||
+10
-5
@@ -21,7 +21,8 @@
|
||||
<mat-label>{{ 'labels.inputs.Default' | translate }}</mat-label>
|
||||
<input type="number" matInput formControlName="principal" required />
|
||||
<mat-error>
|
||||
{{ 'labels.inputs.Default Principal' | translate }} {{ 'labels.commons.is' | translate }}
|
||||
{{ 'labels.catalogs.Default' | translate }} {{ 'labels.inputs.Principal' | translate }}
|
||||
{{ 'labels.commons.is' | translate }}
|
||||
<strong>{{ 'labels.commons.required' | translate }}</strong>
|
||||
</mat-error>
|
||||
</mat-form-field>
|
||||
@@ -107,7 +108,8 @@
|
||||
<mat-label>{{ 'labels.inputs.Default' | translate }}</mat-label>
|
||||
<input type="number" matInput formControlName="numberOfRepayments" required />
|
||||
<mat-error>
|
||||
{{ 'labels.inputs.Default number of repayments' | translate }} {{ 'labels.commons.is' | translate }}
|
||||
{{ 'labels.catalogs.Default' | translate }} {{ 'labels.inputs.Number of repayments' | translate }}
|
||||
{{ 'labels.commons.is' | translate }}
|
||||
<strong>{{ 'labels.commons.required' | translate }}</strong>
|
||||
</mat-error>
|
||||
</mat-form-field>
|
||||
@@ -188,7 +190,8 @@
|
||||
[attr.disabled]="isZeroInterest()"
|
||||
/>
|
||||
<mat-error>
|
||||
{{ 'labels.inputs.Default nominal interest rate' | translate }} {{ 'labels.commons.is' | translate }}
|
||||
{{ 'labels.catalogs.Default' | translate }} {{ 'labels.inputs.Nominal interest rate' | translate }}
|
||||
{{ 'labels.commons.is' | translate }}
|
||||
<strong>{{ 'labels.commons.required' | translate }}</strong>
|
||||
</mat-error>
|
||||
</mat-form-field>
|
||||
@@ -280,7 +283,8 @@
|
||||
<mat-label>{{ 'labels.inputs.Default' | translate }}</mat-label>
|
||||
<input type="number" matInput formControlName="defaultDifferentialLendingRate" required />
|
||||
<mat-error>
|
||||
{{ 'labels.inputs.Default interest rate' | translate }} {{ 'labels.commons.is' | translate }}
|
||||
{{ 'labels.catalogs.Default' | translate }} {{ 'labels.inputs.Interest rate' | translate }}
|
||||
{{ 'labels.commons.is' | translate }}
|
||||
<strong>{{ 'labels.commons.required' | translate }}</strong>
|
||||
</mat-error>
|
||||
</mat-form-field>
|
||||
@@ -561,7 +565,8 @@
|
||||
<mat-label>{{ 'labels.inputs.Frequency' | translate }}</mat-label>
|
||||
<input type="number" matInput formControlName="repaymentEvery" required />
|
||||
<mat-error>
|
||||
{{ 'labels.inputs.Repaid every frequency' | translate }} {{ 'labels.commons.is' | translate }}
|
||||
{{ 'labels.inputs.Repaid every' | translate }} {{ 'labels.inputs.Frequency' | translate }}
|
||||
{{ 'labels.commons.is' | translate }}
|
||||
<strong>{{ 'labels.commons.required' | translate }}</strong>
|
||||
</mat-error>
|
||||
</mat-form-field>
|
||||
|
||||
Reference in New Issue
Block a user