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