diff --git a/src/app/clients/edit-client/edit-client.component.html b/src/app/clients/edit-client/edit-client.component.html index f5ca34e87..6f2f902f2 100644 --- a/src/app/clients/edit-client/edit-client.component.html +++ b/src/app/clients/edit-client/edit-client.component.html @@ -44,7 +44,7 @@ - {{ editClientForm.value.legalFormId === 1 ? 'Name' : 'Entity Name' }} + {{ legalFormId === 1 ? 'Name' : 'Entity Name' }} Client name is required @@ -72,8 +72,17 @@ + + Gender + + + {{ gender.name }} + + + + - {{ editClientForm.value.legalFormId === 1 ? 'Date of Birth' : 'Incorporation Date' }} + {{ legalFormId === 1 ? 'Date of Birth' : 'Incorporation Date' }} @@ -123,7 +132,7 @@ - + Is staff? @@ -176,15 +185,6 @@ - - Gender - - - {{ gender.name }} - - - - diff --git a/src/app/clients/edit-client/edit-client.component.ts b/src/app/clients/edit-client/edit-client.component.ts index 304d40cb1..34030b825 100644 --- a/src/app/clients/edit-client/edit-client.component.ts +++ b/src/app/clients/edit-client/edit-client.component.ts @@ -44,6 +44,7 @@ export class EditClientComponent implements OnInit { constitutionOptions: any; /** Gender Options */ genderOptions: any; + legalFormId = 1; /** * Fetches client template data from `resolve` @@ -70,6 +71,7 @@ export class EditClientComponent implements OnInit { this.createEditClientForm(); this.setOptions(); this.buildDependencies(); + this.legalFormId = 1; this.editClientForm.patchValue({ 'officeId': this.clientDataAndTemplate.officeId, 'staffId': this.clientDataAndTemplate.staffId, @@ -87,6 +89,9 @@ export class EditClientComponent implements OnInit { 'submittedOnDate': this.clientDataAndTemplate.timeline.submittedOnDate && new Date(this.clientDataAndTemplate.timeline.submittedOnDate), 'activationDate': this.clientDataAndTemplate.timeline.activatedOnDate && new Date(this.clientDataAndTemplate.timeline.activatedOnDate) }); + if (this.clientDataAndTemplate.legalForm) { + this.legalFormId = this.clientDataAndTemplate.legalForm.id; + } } /** diff --git a/src/app/products/loan-products/loan-product-stepper/loan-product-preview-step/loan-product-preview-step.component.html b/src/app/products/loan-products/loan-product-stepper/loan-product-preview-step/loan-product-preview-step.component.html index 5882538d3..9b6943d68 100644 --- a/src/app/products/loan-products/loan-product-stepper/loan-product-preview-step/loan-product-preview-step.component.html +++ b/src/app/products/loan-products/loan-product-stepper/loan-product-preview-step/loan-product-preview-step.component.html @@ -291,7 +291,7 @@ {{ loanProduct.interestCalculationPeriodType | find:loanProductsTemplate.interestCalculationPeriodTypeOptions:'id':'value' }} -
+
Allow Partial Interest Calculation with same as repayment: {{ loanProduct.allowPartialPeriodInterestCalcualtion ? 'Yes' : 'No' }}
diff --git a/src/app/products/loan-products/loan-product-stepper/loan-product-settings-step/loan-product-settings-step.component.html b/src/app/products/loan-products/loan-product-stepper/loan-product-settings-step/loan-product-settings-step.component.html index cda791fbb..ba62bc3de 100644 --- a/src/app/products/loan-products/loan-product-stepper/loan-product-settings-step/loan-product-settings-step.component.html +++ b/src/app/products/loan-products/loan-product-stepper/loan-product-settings-step/loan-product-settings-step.component.html @@ -32,7 +32,8 @@ Interest calculation period - + {{ interestCalculationPeriodType.value }} @@ -42,7 +43,10 @@ - + Calculate interest for exact days in partial period @@ -85,12 +89,14 @@ Interest free period - + Arrears tolerance - + @@ -121,14 +127,16 @@ Allow fixing of the installment amount -

Number of days a loan may be overdue before moving into arrears

+

Number of days a loan may be overdue before moving into arrears

On arrears ageing -

Maximum number of days a loan may be overdue before becoming a NPA (non-performing asset)

+

Maximum number of days a loan may be overdue before becoming a NPA (non-performing asset)

Overdue days for NPA @@ -265,7 +273,8 @@
-
+
@@ -277,7 +286,8 @@
-
+
@@ -315,7 +325,8 @@
-
+
@@ -379,7 +390,8 @@

Loan Tranche Details

- + Enable Multiple Disbursals diff --git a/src/app/products/loan-products/loan-product-stepper/loan-product-settings-step/loan-product-settings-step.component.ts b/src/app/products/loan-products/loan-product-stepper/loan-product-settings-step/loan-product-settings-step.component.ts index db378aedc..4dff2e4c6 100644 --- a/src/app/products/loan-products/loan-product-stepper/loan-product-settings-step/loan-product-settings-step.component.ts +++ b/src/app/products/loan-products/loan-product-stepper/loan-product-settings-step/loan-product-settings-step.component.ts @@ -1,6 +1,5 @@ import { Component, OnInit, Input } from '@angular/core'; import { FormGroup, FormBuilder, Validators, FormControl } from '@angular/forms'; -import { TooltipPosition } from '@angular/material/tooltip'; @Component({ selector: 'mifosx-loan-product-settings-step', @@ -170,6 +169,7 @@ export class LoanProductSettingsStepComponent implements OnInit { 'holdGuaranteeFunds': [false], 'multiDisburseLoan': [false], 'allowAttributeConfiguration': [true], + 'allowPartialPeriodInterestCalcualtion': [false], 'allowAttributeOverrides': this.formBuilder.group({ 'amortizationType': [true], 'interestType': [true], @@ -189,10 +189,8 @@ export class LoanProductSettingsStepComponent implements OnInit { this.loanProductSettingsForm.get('interestCalculationPeriodType').valueChanges .subscribe((interestCalculationPeriodType: any) => { - if (interestCalculationPeriodType === 1) { - this.loanProductSettingsForm.addControl('allowPartialPeriodInterestCalcualtion', new FormControl(false)); - } else { - this.loanProductSettingsForm.removeControl('allowPartialPeriodInterestCalcualtion'); + if (interestCalculationPeriodType === 0) { + this.loanProductSettingsForm.patchValue({'allowPartialPeriodInterestCalcualtion': false}); } }); diff --git a/src/app/products/loan-products/view-loan-product/general-tab/general-tab.component.html b/src/app/products/loan-products/view-loan-product/general-tab/general-tab.component.html index 20d94315c..9c8dbaf40 100644 --- a/src/app/products/loan-products/view-loan-product/general-tab/general-tab.component.html +++ b/src/app/products/loan-products/view-loan-product/general-tab/general-tab.component.html @@ -314,9 +314,9 @@ {{ loanProduct.interestCalculationPeriodType.value }}
-
+
Allow Partial Interest Calculation with same as repayment: - {{ loanProduct.allowPartialPeriodInterestCalcualtion ? 'Yes' : 'No' }} + {{ loanProduct.allowPartialPeriodInterestCalculation ? 'Yes' : 'No' }}