build: Use prettier for html

Stop ignoring html files in prettier and fix existing issues.
This commit is contained in:
Ralph Hopman
2024-12-19 09:36:50 +01:00
committed by Adam Saghy
parent c5fc3925fb
commit 2ec9ba81d6
651 changed files with 28935 additions and 20624 deletions
@@ -1,7 +1,6 @@
<div fxLayout="row wrap" fxLayoutGap="2%" fxLayout.lt-md="column">
<mat-form-field fxFlex="48%">
<mat-label>{{"labels.inputs.Charge" | translate}}</mat-label>
<mat-label>{{ 'labels.inputs.Charge' | translate }}</mat-label>
<mat-select #charge>
<mat-option *ngFor="let charge of chargeData" [value]="charge">
{{ charge.name }}
@@ -12,29 +11,33 @@
<div fxFlex="48%" fxFlexAlign="center">
<button type="button" mat-raised-button color="primary" (click)="addCharge(charge)" [disabled]="!charge.value">
<fa-icon icon="plus" class="m-r-10"></fa-icon>
{{"labels.buttons.Add" | translate}}
{{ 'labels.buttons.Add' | translate }}
</button>
</div>
<table fxFlex="98%" class="mat-elevation-z1" mat-table [dataSource]="chargesDataSource"
[hidden]="chargesDataSource.length === 0">
<table
fxFlex="98%"
class="mat-elevation-z1"
mat-table
[dataSource]="chargesDataSource"
[hidden]="chargesDataSource.length === 0"
>
<ng-container matColumnDef="name">
<th mat-header-cell *matHeaderCellDef> {{"labels.inputs.name" | translate}} </th>
<th mat-header-cell *matHeaderCellDef>{{ 'labels.inputs.name' | translate }}</th>
<td mat-cell *matCellDef="let charge">
{{ charge.name + ', ' + charge.currency.displaySymbol }}
</td>
</ng-container>
<ng-container matColumnDef="chargeCalculationType">
<th mat-header-cell *matHeaderCellDef> {{"labels.inputs.Type" | translate}} </th>
<th mat-header-cell *matHeaderCellDef>{{ 'labels.inputs.Type' | translate }}</th>
<td mat-cell *matCellDef="let charge">
{{ charge.chargeCalculationType.value }}
</td>
</ng-container>
<ng-container matColumnDef="amount">
<th mat-header-cell *matHeaderCellDef> {{"labels.inputs.Amount" | translate}} </th>
<th mat-header-cell *matHeaderCellDef>{{ 'labels.inputs.Amount' | translate }}</th>
<td mat-cell *matCellDef="let charge">
{{ charge.amount }}
<button mat-icon-button color="primary" (click)="editChargeAmount(charge)">
@@ -44,36 +47,52 @@
</ng-container>
<ng-container matColumnDef="chargeTimeType">
<th mat-header-cell *matHeaderCellDef> {{"labels.inputs.Collected On" | translate}} </th>
<th mat-header-cell *matHeaderCellDef>{{ 'labels.inputs.Collected On' | translate }}</th>
<td mat-cell *matCellDef="let charge">
{{ charge.chargeTimeType.value }}
</td>
</ng-container>
<ng-container matColumnDef="date">
<th mat-header-cell *matHeaderCellDef> {{"labels.inputs.Date" | translate}} </th>
<th mat-header-cell *matHeaderCellDef>{{ 'labels.inputs.Date' | translate }}</th>
<td mat-cell *matCellDef="let charge">
<span
*ngIf="charge.chargeTimeType.value === 'Specified due date' || charge.chargeTimeType.value === 'Weekly Fee'">
{{(charge.dueDate | dateFormat) || 'Unassigned'}}
*ngIf="charge.chargeTimeType.value === 'Specified due date' || charge.chargeTimeType.value === 'Weekly Fee'"
>
{{ (charge.dueDate | dateFormat) || 'Unassigned' }}
</span>
<span *ngIf="charge.chargeTimeType.value === 'Monthly Fee' || charge.chargeTimeType.value === 'Annual Fee'">
{{(charge.feeOnMonthDay | dateFormat) || 'Unassigned'}}
{{ (charge.feeOnMonthDay | dateFormat) || 'Unassigned' }}
</span>
<span
*ngIf="!(charge.chargeTimeType.value === 'Monthly Fee' || charge.chargeTimeType.value === 'Annual Fee'
|| charge.chargeTimeType.value === 'Specified due date' || charge.chargeTimeType.value === 'Weekly Fee')">
{{"labels.inputs.N/A" | translate}}
*ngIf="
!(
charge.chargeTimeType.value === 'Monthly Fee' ||
charge.chargeTimeType.value === 'Annual Fee' ||
charge.chargeTimeType.value === 'Specified due date' ||
charge.chargeTimeType.value === 'Weekly Fee'
)
"
>
{{ 'labels.inputs.N/A' | translate }}
</span>
<button mat-icon-button color="primary" *ngIf="charge.chargeTimeType.value === 'Weekly Fee' || charge.chargeTimeType.value === 'Annual Fee'
|| charge.chargeTimeType.value === 'Specified due date'" (click)="editChargeDate(charge)">
<button
mat-icon-button
color="primary"
*ngIf="
charge.chargeTimeType.value === 'Weekly Fee' ||
charge.chargeTimeType.value === 'Annual Fee' ||
charge.chargeTimeType.value === 'Specified due date'
"
(click)="editChargeDate(charge)"
>
<fa-icon icon="pen"></fa-icon>
</button>
</td>
</ng-container>
<ng-container matColumnDef="action">
<th mat-header-cell *matHeaderCellDef> {{"labels.inputs.Actions" | translate}} </th>
<th mat-header-cell *matHeaderCellDef>{{ 'labels.inputs.Actions' | translate }}</th>
<td mat-cell *matCellDef="let charge">
<button mat-icon-button color="warn" (click)="deleteCharge(charge)">
<fa-icon icon="trash"></fa-icon>
@@ -82,52 +101,49 @@
</ng-container>
<tr mat-header-row *matHeaderRowDef="chargesDisplayedColumns"></tr>
<tr mat-row *matRowDef="let row; columns: chargesDisplayedColumns;"></tr>
<tr mat-row *matRowDef="let row; columns: chargesDisplayedColumns"></tr>
</table>
<mat-divider fxFlex="98%"></mat-divider>
<h4 fxFlex="98%" class="mat-h4">{{"labels.heading.Overdue Charges" | translate}}</h4>
<h4 fxFlex="98%" class="mat-h4">{{ 'labels.heading.Overdue Charges' | translate }}</h4>
<table mat-table class="mat-elevation-z1" [dataSource]="overDueChargesDataSource">
<ng-container matColumnDef="name">
<th mat-header-cell *matHeaderCellDef> {{"labels.inputs.name" | translate}} </th>
<td mat-cell *matCellDef="let charge"> {{ charge.name }},{{ charge.currency.displaySymbol }} </td>
<th mat-header-cell *matHeaderCellDef>{{ 'labels.inputs.name' | translate }}</th>
<td mat-cell *matCellDef="let charge">{{ charge.name }},{{ charge.currency.displaySymbol }}</td>
</ng-container>
<ng-container matColumnDef="type">
<th mat-header-cell *matHeaderCellDef> {{"labels.inputs.Type" | translate}} </th>
<td mat-cell *matCellDef="let charge"> {{ charge.chargeCalculationType.value }} </td>
<th mat-header-cell *matHeaderCellDef>{{ 'labels.inputs.Type' | translate }}</th>
<td mat-cell *matCellDef="let charge">{{ charge.chargeCalculationType.value }}</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| formatNumber }} </td>
<th mat-header-cell *matHeaderCellDef>{{ 'labels.inputs.Amount' | translate }}</th>
<td mat-cell *matCellDef="let charge">{{ charge.amount | formatNumber }}</td>
</ng-container>
<ng-container matColumnDef="collectedon">
<th mat-header-cell *matHeaderCellDef> {{"labels.inputs.Collected On" | translate}} </th>
<td mat-cell *matCellDef="let charge"> {{ charge.chargeTimeType.value }} </td>
<th mat-header-cell *matHeaderCellDef>{{ 'labels.inputs.Collected On' | translate }}</th>
<td mat-cell *matCellDef="let charge">{{ charge.chargeTimeType.value }}</td>
</ng-container>
<tr mat-header-row *matHeaderRowDef="overdueChargesDisplayedColumns"></tr>
<tr mat-row *matRowDef="let row; columns: overdueChargesDisplayedColumns;"></tr>
<tr mat-row *matRowDef="let row; columns: overdueChargesDisplayedColumns"></tr>
</table>
</div>
<div fxLayout="row" class="margin-t" fxLayout.xs="column" fxLayoutAlign="center" fxLayoutGap="2%">
<button mat-raised-button matStepperPrevious>
<fa-icon icon="arrow-left" class="m-r-10"></fa-icon>
{{"labels.buttons.Previous" | translate}}
{{ 'labels.buttons.Previous' | translate }}
</button>
<button mat-raised-button matStepperNext [disabled]="!loansAccountFormValid">
{{"labels.buttons.Next" | translate}}
{{ 'labels.buttons.Next' | translate }}
<fa-icon icon="arrow-right" class="m-l-10"></fa-icon>
</button>
<button mat-raised-button *ngIf="loanId" [routerLink]="['../', 'general']">
{{"labels.buttons.Cancel" | translate}}
{{ 'labels.buttons.Cancel' | translate }}
</button>
</div>
@@ -1,51 +1,68 @@
<form [formGroup]="datatableForm">
<div fxLayout="row wrap" fxLayoutGap="2%" fxLayout.lt-md="column">
<div *ngFor="let datatableInput of datatableInputs" fxFlex="48%">
<mat-form-field fxFlex="100%" *ngIf="!isBoolean(datatableInput.columnDisplayType)">
<mat-label>{{ getInputName(datatableInput) }}</mat-label>
<mat-label>{{getInputName(datatableInput)}}</mat-label>
<mat-select *ngIf="isDropdown(datatableInput.columnDisplayType)" formControlName="{{datatableInput.controlName}}">
<mat-select
*ngIf="isDropdown(datatableInput.columnDisplayType)"
formControlName="{{ datatableInput.controlName }}"
>
<mat-option *ngFor="let code of datatableInput.columnValues" [value]="code.id">
{{ code.value }}
</mat-option>
</mat-select>
<input matInput type="number" *ngIf="isNumeric(datatableInput.columnDisplayType)"
formControlName="{{datatableInput.controlName}}">
<input
matInput
type="number"
*ngIf="isNumeric(datatableInput.columnDisplayType)"
formControlName="{{ datatableInput.controlName }}"
/>
<input matInput *ngIf="isString(datatableInput.columnDisplayType)"
formControlName="{{datatableInput.controlName}}">
<input
matInput
*ngIf="isString(datatableInput.columnDisplayType)"
formControlName="{{ datatableInput.controlName }}"
/>
<textarea matInput *ngIf="isText(datatableInput.columnDisplayType)"
formControlName="{{datatableInput.controlName}}"></textarea>
<textarea
matInput
*ngIf="isText(datatableInput.columnDisplayType)"
formControlName="{{ datatableInput.controlName }}"
></textarea>
<span *ngIf="isDate(datatableInput.columnDisplayType)" (click)="datePicker.open()">
<input matInput [matDatepicker]="datePicker" formControlName="{{datatableInput.controlName}}" class="date-picker">
<input
matInput
[matDatepicker]="datePicker"
formControlName="{{ datatableInput.controlName }}"
class="date-picker"
/>
<mat-datepicker-toggle matSuffix [for]="datePicker"></mat-datepicker-toggle>
<mat-datepicker #datePicker></mat-datepicker>
</span>
</mat-form-field>
<mat-checkbox *ngIf="isBoolean(datatableInput.columnDisplayType)" formControlName="{{datatableInput.controlName}}"
labelPosition="before" class="margin-v">
{{getInputName(datatableInput)}}
<mat-checkbox
*ngIf="isBoolean(datatableInput.columnDisplayType)"
formControlName="{{ datatableInput.controlName }}"
labelPosition="before"
class="margin-v"
>
{{ getInputName(datatableInput) }}
</mat-checkbox>
</div>
</div>
<div fxLayout="row" class="margin-t" fxLayout.xs="column" fxLayoutAlign="center" fxLayoutGap="2%">
<button mat-raised-button matStepperPrevious disabled>
<fa-icon icon="arrow-left" class="m-r-10"></fa-icon>
{{"labels.buttons.Previous" | translate}}
{{ 'labels.buttons.Previous' | translate }}
</button>
<button mat-raised-button matStepperNext>
{{"labels.buttons.Next" | translate}}
{{ 'labels.buttons.Next' | translate }}
<fa-icon icon="arrow-right" class="m-l-10"></fa-icon>
</button>
</div>
</form>
@@ -1,10 +1,12 @@
<form [formGroup]="loansAccountDetailsForm">
<div fxLayout="row wrap" fxLayoutGap="2%" fxLayout.lt-md="column">
<mat-form-field fxFlex="72%">
<mat-label>{{"labels.inputs.Product Name" | translate}}</mat-label>
<mat-select required matTooltip="{{ 'tooltips.Name of the loan product' | translate}}" formControlName="productId">
<mat-label>{{ 'labels.inputs.Product Name' | translate }}</mat-label>
<mat-select
required
matTooltip="{{ 'tooltips.Name of the loan product' | translate }}"
formControlName="productId"
>
<mat-option>
<ngx-mat-select-search [formControl]="filterFormCtrl"></ngx-mat-select-search>
</mat-option>
@@ -13,21 +15,24 @@
</mat-option>
</mat-select>
<mat-error>
{{"labels.inputs.Product Name" | translate}} {{"labels.commons.is" | translate}} <strong>{{"labels.commons.required" | translate}}</strong>
{{ 'labels.inputs.Product Name' | translate }} {{ 'labels.commons.is' | translate }}
<strong>{{ 'labels.commons.required' | translate }}</strong>
</mat-error>
</mat-form-field>
</div>
<div fxLayout="row wrap" fxLayoutGap="2%" fxLayout.lt-md="column" *ngIf="loanProductSelected">
<mat-form-field fxFlex="48%">
<mat-label>{{"labels.inputs.External id" | translate}}</mat-label>
<input matInput formControlName="externalId" matTooltip="{{ 'tooltips.Provides an external id' | translate}}">
<mat-label>{{ 'labels.inputs.External id' | translate }}</mat-label>
<input matInput formControlName="externalId" matTooltip="{{ 'tooltips.Provides an external id' | translate }}" />
</mat-form-field>
<mat-form-field fxFlex="48%" *ngIf="loanProductSelected">
<mat-label>{{"labels.inputs.Loan officer" | translate}}</mat-label>
<mat-select formControlName="loanOfficerId" matTooltip="{{ 'tooltips.Financial institution representative' | translate}}">
<mat-label>{{ 'labels.inputs.Loan officer' | translate }}</mat-label>
<mat-select
formControlName="loanOfficerId"
matTooltip="{{ 'tooltips.Financial institution representative' | translate }}"
>
<mat-option *ngFor="let loanOfficer of loanOfficerOptions" [value]="loanOfficer.id">
{{ loanOfficer.displayName }}
</mat-option>
@@ -35,8 +40,8 @@
</mat-form-field>
<mat-form-field fxFlex="48%">
<mat-label>{{"labels.inputs.Loan Purpose" | translate}}</mat-label>
<mat-select formControlName="loanPurposeId" matTooltip="{{ 'tooltips.Provides an indication' | translate}}">
<mat-label>{{ 'labels.inputs.Loan Purpose' | translate }}</mat-label>
<mat-select formControlName="loanPurposeId" matTooltip="{{ 'tooltips.Provides an indication' | translate }}">
<mat-option *ngFor="let loanPurpose of loanPurposeOptions" [value]="loanPurpose.id">
{{ loanPurpose.name }}
</mat-option>
@@ -44,7 +49,7 @@
</mat-form-field>
<mat-form-field fxFlex="48%">
<mat-label>{{"labels.inputs.Fund" | translate}}</mat-label>
<mat-label>{{ 'labels.inputs.Fund' | translate }}</mat-label>
<mat-select formControlName="fundId">
<mat-option *ngFor="let fund of fundOptions" [value]="fund.id">
{{ fund.name }}
@@ -53,33 +58,49 @@
</mat-form-field>
<mat-form-field fxFlex="48%" (click)="submitPicker.open()">
<mat-label>{{"labels.inputs.Submitted on" | translate}}</mat-label>
<input matInput [min]="minDate" [max]="maxDate" [matDatepicker]="submitPicker" matTooltip="{{ 'tooltips.Date the loan account application' | translate}}" required
formControlName="submittedOnDate">
<mat-label>{{ 'labels.inputs.Submitted on' | translate }}</mat-label>
<input
matInput
[min]="minDate"
[max]="maxDate"
[matDatepicker]="submitPicker"
matTooltip="{{ 'tooltips.Date the loan account application' | translate }}"
required
formControlName="submittedOnDate"
/>
<mat-datepicker-toggle matSuffix [for]="submitPicker"></mat-datepicker-toggle>
<mat-datepicker #submitPicker></mat-datepicker>
<mat-error *ngIf="loansAccountDetailsForm.controls.submittedOnDate?.hasError('required')">
{{"labels.inputs.Submitted on" | translate}} {{"labels.commons.is" | translate}} <strong>{{"labels.commons.required" | translate}}</strong>
{{ 'labels.inputs.Submitted on' | translate }} {{ 'labels.commons.is' | translate }}
<strong>{{ 'labels.commons.required' | translate }}</strong>
</mat-error>
</mat-form-field>
<mat-form-field fxFlex="48%" (click)="disbursementPicker.open()">
<mat-label>{{"labels.inputs.Disbursement on" | translate}}</mat-label>
<input matInput [min]="loansAccountDetailsForm.value.submittedOnDate" [max]="maxDate" [matDatepicker]="disbursementPicker" matTooltip="{{ 'tooltips.Date that the loan account disbursed' | translate}}" required
formControlName="expectedDisbursementDate">
<mat-label>{{ 'labels.inputs.Disbursement on' | translate }}</mat-label>
<input
matInput
[min]="loansAccountDetailsForm.value.submittedOnDate"
[max]="maxDate"
[matDatepicker]="disbursementPicker"
matTooltip="{{ 'tooltips.Date that the loan account disbursed' | translate }}"
required
formControlName="expectedDisbursementDate"
/>
<mat-datepicker-toggle matSuffix [for]="disbursementPicker"></mat-datepicker-toggle>
<mat-datepicker #disbursementPicker></mat-datepicker>
<mat-error *ngIf="loansAccountDetailsForm.controls.submittedOnDate?.hasError('required')">
{{"labels.inputs.Disbursement on" | translate}} {{"labels.commons.is" | translate}} <strong>{{"labels.commons.required" | translate}}</strong>
{{ 'labels.inputs.Disbursement on' | translate }} {{ 'labels.commons.is' | translate }}
<strong>{{ 'labels.commons.required' | translate }}</strong>
</mat-error>
</mat-form-field>
<mat-divider fxFlex="98%"></mat-divider>
<h3 class="mat-h3" fxFlexFill>{{"labels.heading.Savings Linkage" | translate}}</h3>
<h3 class="mat-h3" fxFlexFill>{{ 'labels.heading.Savings Linkage' | translate }}</h3>
<mat-form-field fxFlex="48%">
<mat-label>{{"labels.inputs.Link savings" | translate}}</mat-label>
<mat-label>{{ 'labels.inputs.Link savings' | translate }}</mat-label>
<mat-select formControlName="linkAccountId">
<mat-option *ngFor="let savingaccount of accountLinkingOptions" [value]="savingaccount.id">
({{ savingaccount.accountNo }}) {{ savingaccount.productName }}
@@ -88,22 +109,21 @@
</mat-form-field>
<mat-checkbox fxFlex="48%" formControlName="createStandingInstructionAtDisbursement">
<p>{{"labels.inputs.Create standing instructions at disbursement" | translate}}</p>
<p>{{ 'labels.inputs.Create standing instructions at disbursement' | translate }}</p>
</mat-checkbox>
</div>
<div fxLayout="row" class="margin-t" fxLayout.xs="column" fxLayoutAlign="center" fxLayoutGap="2%">
<button mat-raised-button matStepperPrevious disabled>
<fa-icon icon="arrow-left" class="m-r-10"></fa-icon>
{{"labels.buttons.Previous" | translate}}
{{ 'labels.buttons.Previous' | translate }}
</button>
<button mat-raised-button matStepperNext>
{{"labels.buttons.Next" | translate}}
{{ 'labels.buttons.Next' | translate }}
<fa-icon icon="arrow-right" class="m-l-10"></fa-icon>
</button>
<button mat-raised-button *ngIf="loanId" [routerLink]="['../', 'general']">
{{"labels.buttons.Cancel" | translate}}
{{ 'labels.buttons.Cancel' | translate }}
</button>
</div>
</form>
@@ -1,296 +1,321 @@
<div fxLayout="row wrap" fxLayout.lt-md="column">
<h3 class="mat-h3" fxFlexFill>{{"labels.heading.Details" | translate}}</h3>
<h3 class="mat-h3" fxFlexFill>{{ 'labels.heading.Details' | translate }}</h3>
<div fxFlexFill>
<span fxFlex="40%">{{"labels.inputs.Product" | translate}}:</span>
<span fxFlex="60%">{{ loansAccount.productId | find:loansAccountTemplate.productOptions:'id':'name' }}</span>
<span fxFlex="40%">{{ 'labels.inputs.Product' | translate }}:</span>
<span fxFlex="60%">{{ loansAccount.productId | find: loansAccountTemplate.productOptions : 'id' : 'name' }}</span>
</div>
<div fxFlexFill *ngIf="loansAccount.loanOfficerId">
<span fxFlex="40%">{{"labels.inputs.Loan officer" | translate}}:</span>
<span
fxFlex="60%">{{ loansAccount.loanOfficerId | find:loansAccountProductTemplate.loanOfficerOptions:'id':'displayName'}}</span>
<span fxFlex="40%">{{ 'labels.inputs.Loan officer' | translate }}:</span>
<span fxFlex="60%">{{
loansAccount.loanOfficerId | find: loansAccountProductTemplate.loanOfficerOptions : 'id' : 'displayName'
}}</span>
</div>
<div fxFlexFill *ngIf="loansAccount.loanPurposeId">
<span fxFlex="40%">{{"labels.inputs.Loan purpose" | translate}}:</span>
<span
fxFlex="60%">{{ loansAccount.loanPurposeId | find:loansAccountProductTemplate.loanPurposeOptions:'id':'name'}}</span>
<span fxFlex="40%">{{ 'labels.inputs.Loan purpose' | translate }}:</span>
<span fxFlex="60%">{{
loansAccount.loanPurposeId | find: loansAccountProductTemplate.loanPurposeOptions : 'id' : 'name'
}}</span>
</div>
<div fxFlexFill *ngIf="loansAccount.fundId">
<span fxFlex="40%">{{"labels.inputs.Fund" | translate}}:</span>
<span fxFlex="60%">{{ loansAccount.fundId | find:loansAccountProductTemplate.fundOptions:'id':'name'}}</span>
<span fxFlex="40%">{{ 'labels.inputs.Fund' | translate }}:</span>
<span fxFlex="60%">{{ loansAccount.fundId | find: loansAccountProductTemplate.fundOptions : 'id' : 'name' }}</span>
</div>
<div fxFlexFill>
<span fxFlex="40%">{{"labels.inputs.Submitted on" | translate}}:</span>
<span fxFlex="40%">{{ 'labels.inputs.Submitted on' | translate }}:</span>
<span fxFlex="60%">{{ loansAccount.submittedOnDate | dateFormat }}</span>
</div>
<div fxFlexFill>
<span fxFlex="40%">{{"labels.inputs.Disbursement on" | translate}}:</span>
<span fxFlex="40%">{{ 'labels.inputs.Disbursement on' | translate }}:</span>
<span fxFlex="60%">{{ loansAccount.expectedDisbursementDate | dateFormat }}</span>
</div>
<div fxFlexFill *ngIf="loansAccount.externalId">
<span fxFlex="40%">{{"labels.inputs.External id" | translate}}:</span>
<span fxFlex="40%">{{ 'labels.inputs.External id' | translate }}:</span>
<span fxFlex="60%">
<mifosx-external-identifier externalId="{{loansAccount.externalId}}"></mifosx-external-identifier>
<mifosx-external-identifier externalId="{{ loansAccount.externalId }}"></mifosx-external-identifier>
</span>
</div>
<h3 class="mat-h3" fxFlexFill>{{"labels.heading.Terms" | translate}}</h3>
<h3 class="mat-h3" fxFlexFill>{{ 'labels.heading.Terms' | translate }}</h3>
<mat-divider fxFlexFill></mat-divider>
<div fxFlexFill>
<span fxFlex="40%">{{"labels.inputs.Principal" | translate}}:</span>
<span fxFlex="40%">{{ 'labels.inputs.Principal' | translate }}:</span>
<span fxFlex="60%">
{{ loansAccount.principalAmount | currency:loansAccountProductTemplate.currency.code:'symbol-narrow':'1.2-2'}}
<span class="m-l-5">{{loansAccountProductTemplate.currency.code}}</span>
{{
loansAccount.principalAmount | currency: loansAccountProductTemplate.currency.code : 'symbol-narrow' : '1.2-2'
}}
<span class="m-l-5">{{ loansAccountProductTemplate.currency.code }}</span>
</span>
</div>
<div fxFlexFill>
<span fxFlex="40%">{{"labels.inputs.Loan Term" | translate}}:</span>
<span fxFlex="60%">{{ loansAccount.loanTermFrequency }}
{{loansAccount.loanTermFrequencyType | find: loansAccountProductTemplate.termFrequencyTypeOptions:'id':'name'}}</span>
<span fxFlex="40%">{{ 'labels.inputs.Loan Term' | translate }}:</span>
<span fxFlex="60%"
>{{ loansAccount.loanTermFrequency }}
{{
loansAccount.loanTermFrequencyType | find: loansAccountProductTemplate.termFrequencyTypeOptions : 'id' : 'name'
}}</span
>
</div>
<div fxFlexFill>
<span fxFlex="40%">{{"labels.inputs.Number of repayments" | translate}}:</span>
<span fxFlex="40%">{{ 'labels.inputs.Number of repayments' | translate }}:</span>
<span fxFlex="60%">{{ loansAccount.numberOfRepayments }}</span>
</div>
<div fxFlexFill>
<span fxFlex="40%">{{"labels.inputs.Repaid every" | translate}}:</span>
<span fxFlex="60%">{{loansAccount.repaymentEvery}}
{{loansAccount.repaymentFrequencyType | find: loansAccountProductTemplate.termFrequencyTypeOptions:'id':'name'}}
{{loansAccount.repaymentFrequencyNthDayType | find: loansAccountProductTemplate.repaymentFrequencyNthDayTypeOptions:'id': 'name'}}
{{loansAccount.repaymentFrequencyDayOfWeekType | find: loansAccountProductTemplate.repaymentFrequencyDaysOfWeekTypeOptions:'id': 'name'}}</span>
<span fxFlex="40%">{{ 'labels.inputs.Repaid every' | translate }}:</span>
<span fxFlex="60%"
>{{ loansAccount.repaymentEvery }}
{{
loansAccount.repaymentFrequencyType | find: loansAccountProductTemplate.termFrequencyTypeOptions : 'id' : 'name'
}}
{{
loansAccount.repaymentFrequencyNthDayType
| find: loansAccountProductTemplate.repaymentFrequencyNthDayTypeOptions : 'id' : 'name'
}}
{{
loansAccount.repaymentFrequencyDayOfWeekType
| find: loansAccountProductTemplate.repaymentFrequencyDaysOfWeekTypeOptions : 'id' : 'name'
}}</span
>
</div>
<div fxFlexFill *ngIf="productEnableDownPayment">
<span fxFlex="40%">{{ 'labels.inputs.Enable Down Payments' | translate}}:</span>
<span fxFlex="60%">{{ loansAccount.enableDownPayment | yesNo }}</span>
<span fxFlex="40%">{{ 'labels.inputs.Enable Down Payments' | translate }}:</span>
<span fxFlex="60%">{{ loansAccount.enableDownPayment | yesNo }}</span>
</div>
<div fxFlexFill *ngIf="loansAccount.repaymentsStartingFromDate">
<span fxFlex="40%">{{"labels.inputs.First repayment on" | translate}}:</span>
<span fxFlex="40%">{{ 'labels.inputs.First repayment on' | translate }}:</span>
<span fxFlex="60%">{{ loansAccount.repaymentsStartingFromDate | dateFormat }}</span>
</div>
<div fxFlexFill *ngIf="loansAccount.interestChargedFromDate">
<span fxFlex="40%">{{"labels.inputs.Interest charged from" | translate}}:</span>
<span fxFlex="40%">{{ 'labels.inputs.Interest charged from' | translate }}:</span>
<span fxFlex="60%">{{ loansAccount.interestChargedFromDate | dateFormat }}</span>
</div>
<div fxFlexFill *ngIf="loansAccount.interestRatePerPeriod">
<span fxFlex="40%">{{"labels.inputs.Nominal interest rate" | translate}}:</span>
<span
fxFlex="60%">{{loansAccount.interestRatePerPeriod}}&nbsp;&nbsp;{{loansAccountProductTemplate.interestRateFrequencyType.value}}</span>
<span fxFlex="40%">{{ 'labels.inputs.Nominal interest rate' | translate }}:</span>
<span fxFlex="60%"
>{{ loansAccount.interestRatePerPeriod }}&nbsp;&nbsp;{{
loansAccountProductTemplate.interestRateFrequencyType.value
}}</span
>
</div>
<div fxFlexFill *ngIf="loansAccount.interestType">
<span fxFlex="40%">{{"labels.inputs.Interest method" | translate}}: </span>
<span fxFlex="60%">{{loansAccount.interestType}}</span>
<span fxFlex="40%">{{ 'labels.inputs.Interest method' | translate }}: </span>
<span fxFlex="60%">{{ loansAccount.interestType }}</span>
</div>
<div fxFlexFill *ngIf="loansAccount.isEqualAmortization">
<span fxFlex="40%">{{"labels.inputs.Is Equal Amortization" | translate}}:</span>
<span fxFlex="60%">{{loansAccount.isEqualAmortization}}</span>
<span fxFlex="40%">{{ 'labels.inputs.Is Equal Amortization' | translate }}:</span>
<span fxFlex="60%">{{ loansAccount.isEqualAmortization }}</span>
</div>
<div fxFlexFill>
<span fxFlex="40%">{{"labels.inputs.Amortization" | translate}}</span>
<span
fxFlex="60%">{{ loansAccount.amortizationType | find:loansAccountProductTemplate.amortizationTypeOptions:'id':'value' }}</span>
<span fxFlex="40%">{{ 'labels.inputs.Amortization' | translate }}</span>
<span fxFlex="60%">{{
loansAccount.amortizationType | find: loansAccountProductTemplate.amortizationTypeOptions : 'id' : 'value'
}}</span>
</div>
<div fxFlexFill>
<span fxFlex="40%">{{"labels.inputs.Interest calculation period" | translate}}: </span>
<span
fxFlex="60%">{{ loansAccount.interestCalculationPeriodType | find:loansAccountProductTemplate.interestCalculationPeriodTypeOptions:'id':'value' }}</span>
<span fxFlex="40%">{{ 'labels.inputs.Interest calculation period' | translate }}: </span>
<span fxFlex="60%">{{
loansAccount.interestCalculationPeriodType
| find: loansAccountProductTemplate.interestCalculationPeriodTypeOptions : 'id' : 'value'
}}</span>
</div>
<div fxFlexFill *ngIf="loansAccount.allowPartialPeriodInterestCalcualtion">
<span fxFlex="40%">{{"labels.inputs.Calculate interest for exact days in partial period" | translate}}:</span>
<span fxFlex="40%">{{ 'labels.inputs.Calculate interest for exact days in partial period' | translate }}:</span>
<span fxFlex="60%">{{ loansAccount.allowPartialPeriodInterestCalcualtion }}</span>
</div>
<div fxFlexFill *ngIf="loansAccount.inArrearsTolerance">
<span fxFlex="40%">{{"labels.inputs.Arrears tolerance" | translate}}: </span>
<span
fxFlex="60%">{{loansAccount.inArrearsTolerance}}</span>
<span fxFlex="40%">{{ 'labels.inputs.Arrears tolerance' | translate }}: </span>
<span fxFlex="60%">{{ loansAccount.inArrearsTolerance }}</span>
</div>
<div fxFlexFill *ngIf="loansAccount.graceOnInterestCharged">
<span fxFlex="40%">{{"labels.inputs.Interest free period" | translate}}: </span>
<span fxFlex="40%">{{ 'labels.inputs.Interest free period' | translate }}: </span>
<span fxFlex="60%">{{ loansAccount.graceOnInterestCharged }}</span>
</div>
<div fxFlexFill>
<span fxFlex="40%">{{"labels.inputs.Repayment strategy" | translate}}: </span>
<span
fxFlex="60%">{{ loansAccount.transactionProcessingStrategyCode | find:loansAccountProductTemplate.transactionProcessingStrategyOptions:'code':'name' }}</span>
<span fxFlex="40%">{{ 'labels.inputs.Repayment strategy' | translate }}: </span>
<span fxFlex="60%">{{
loansAccount.transactionProcessingStrategyCode
| find: loansAccountProductTemplate.transactionProcessingStrategyOptions : 'code' : 'name'
}}</span>
</div>
<div fxFlexFill>
<span fxFlex="40%"> {{"labels.inputs.Installment Amount" | translate}} </span>
<span fxFlex="40%"> {{ 'labels.inputs.Installment Amount' | translate }} </span>
<span fxFlex="60%"> {{ loansAccount.fixedEmiAmount | formatNumber }} </span>
</div>
<div fxFlexFill>
<span fxFlex="40%"> {{"labels.inputs.Balloon Repayment Amount" | translate}} </span>
<span fxFlex="40%"> {{ 'labels.inputs.Balloon Repayment Amount' | translate }} </span>
<span fxFlex="60%"> {{ loansAccount.balloonRepaymentAmount | formatNumber }} </span>
</div>
<h3 class="mat-h3" fxFlexFill>{{"labels.heading.Moratorium" | translate}}</h3>
<h3 class="mat-h3" fxFlexFill>{{ 'labels.heading.Moratorium' | translate }}</h3>
<mat-divider fxFlexFill></mat-divider>
<div fxFlexFill *ngIf="loansAccount.graceOnPrincipalPayment">
<span fxFlex="40%">{{"labels.inputs.On principal payment" | translate}}: </span>
<span fxFlex="40%">{{ 'labels.inputs.On principal payment' | translate }}: </span>
<span fxFlex="60%">{{ loansAccount.graceOnPrincipalPayment }}</span>
</div>
<div fxFlexFill *ngIf="loansAccount.graceOnInterestPayment">
<span fxFlex="40%">{{"labels.inputs.On interest payment" | translate}}: </span>
<span fxFlex="40%">{{ 'labels.inputs.On interest payment' | translate }}: </span>
<span fxFlex="60%">{{ loansAccount.graceOnInterestPayment }}</span>
</div>
<div fxFlexFill *ngIf="loansAccount.graceOnArrearsAgeing">
<span fxFlex="40%">{{"labels.inputs.On Arrears Aging" | translate}}: </span>
<span fxFlex="40%">{{ 'labels.inputs.On Arrears Aging' | translate }}: </span>
<span fxFlex="60%">{{ loansAccount.graceOnArrearsAgeing }}</span>
</div>
<div fxFlexFill>
<span fxFlex="40%"> {{"labels.inputs.Enable installment level Delinquency" | translate}} </span>
<span fxFlex="40%"> {{ 'labels.inputs.Enable installment level Delinquency' | translate }} </span>
<span fxFlex="60%"> {{ loansAccount.enableInstallmentLevelDelinquency | yesNo }} </span>
</div>
<div fxFlexFill *ngIf="loansAccount.isTopup">
<span fxFlex="40%">{{"labels.inputs.Is Topup Loan" | translate}}? </span>
<span fxFlex="40%">{{ 'labels.inputs.Is Topup Loan' | translate }}? </span>
<span fxFlex="60%">{{ loansAccount.isTopup }}</span>
</div>
<div fxFlexFill>
<span fxFlex="40%">{{"labels.inputs.Recalculate Interest" | translate}}: </span>
<span fxFlex="60%">{{ loansAccountProductTemplate?.isInterestRecalculationEnabled| yesNo }}</span>
<span fxFlex="40%">{{ 'labels.inputs.Recalculate Interest' | translate }}: </span>
<span fxFlex="60%">{{ loansAccountProductTemplate?.isInterestRecalculationEnabled | yesNo }}</span>
</div>
<div fxFlexFill *ngIf="loansAccountProductTemplate?.daysInMonthType">
<span fxFlex="40%">{{"labels.inputs.Days in month" | translate}}: </span>
<span fxFlex="40%">{{ 'labels.inputs.Days in month' | translate }}: </span>
<span fxFlex="60%">{{ loansAccountProductTemplate?.daysInMonthType.value }}</span>
</div>
<div fxFlexFill *ngIf="loansAccount.charges.length" fxLayout="row wrap" fxLayout.lt-md="column">
<h3 class="mat-h3" fxFlexFill>{{"labels.heading.Charges" | translate}}</h3>
<h3 class="mat-h3" fxFlexFill>{{ 'labels.heading.Charges' | translate }}</h3>
<mat-divider fxFlexFill></mat-divider>
<table fxFlexFill class="mat-elevation-z1" mat-table [dataSource]="loansAccount.charges">
<ng-container matColumnDef="name">
<th mat-header-cell *matHeaderCellDef> {{"labels.inputs.name" | translate}} </th>
<th mat-header-cell *matHeaderCellDef>{{ 'labels.inputs.name' | translate }}</th>
<td mat-cell *matCellDef="let charge">
{{ charge.name + ', ' + charge.currency.displaySymbol }}
</td>
</ng-container>
<ng-container matColumnDef="chargeCalculationType">
<th mat-header-cell *matHeaderCellDef> {{"labels.inputs.Type" | translate}} </th>
<th mat-header-cell *matHeaderCellDef>{{ 'labels.inputs.Type' | translate }}</th>
<td mat-cell *matCellDef="let charge">
{{ charge.chargeCalculationType.value }}
</td>
</ng-container>
<ng-container matColumnDef="amount">
<th mat-header-cell *matHeaderCellDef> {{"labels.inputs.Amount" | translate}} </th>
<th mat-header-cell *matHeaderCellDef>{{ 'labels.inputs.Amount' | translate }}</th>
<td mat-cell *matCellDef="let charge">
{{ charge.amount }}
</td>
</ng-container>
<ng-container matColumnDef="chargeTimeType">
<th mat-header-cell *matHeaderCellDef> {{"labels.inputs.Collected On" | translate}} </th>
<th mat-header-cell *matHeaderCellDef>{{ 'labels.inputs.Collected On' | translate }}</th>
<td mat-cell *matCellDef="let charge">
{{ charge.chargeTimeType.value }}
</td>
</ng-container>
<ng-container matColumnDef="date">
<th mat-header-cell *matHeaderCellDef> {{"labels.inputs.Date" | translate}} </th>
<th mat-header-cell *matHeaderCellDef>{{ 'labels.inputs.Date' | translate }}</th>
<td mat-cell *matCellDef="let charge">
<span
*ngIf="charge.chargeTimeType.value === 'Specified due date' || charge.chargeTimeType.value === 'Weekly Fee'">
{{(charge.dueDate | dateFormat) || 'Unassigned'}}
*ngIf="charge.chargeTimeType.value === 'Specified due date' || charge.chargeTimeType.value === 'Weekly Fee'"
>
{{ (charge.dueDate | dateFormat) || 'Unassigned' }}
</span>
<span *ngIf="charge.chargeTimeType.value === 'Monthly Fee' || charge.chargeTimeType.value === 'Annual Fee'">
{{(charge.feeOnMonthDay | dateFormat) || 'Unassigned'}}
{{ (charge.feeOnMonthDay | dateFormat) || 'Unassigned' }}
</span>
<span
*ngIf="!(charge.chargeTimeType.value === 'Monthly Fee' || charge.chargeTimeType.value === 'Annual Fee'
|| charge.chargeTimeType.value === 'Specified due date' || charge.chargeTimeType.value === 'Weekly Fee')">
{{"labels.inputs.N/A" | translate}}
*ngIf="
!(
charge.chargeTimeType.value === 'Monthly Fee' ||
charge.chargeTimeType.value === 'Annual Fee' ||
charge.chargeTimeType.value === 'Specified due date' ||
charge.chargeTimeType.value === 'Weekly Fee'
)
"
>
{{ 'labels.inputs.N/A' | translate }}
</span>
</td>
</ng-container>
<tr mat-header-row *matHeaderRowDef="chargesDisplayedColumns"></tr>
<tr mat-row *matRowDef="let row; columns: chargesDisplayedColumns;"></tr>
<tr mat-row *matRowDef="let row; columns: chargesDisplayedColumns"></tr>
</table>
</div>
<div fxFlexFill *ngIf="loansAccountProductTemplate.overdueCharges.length" fxLayout="row wrap" fxLayout.lt-md="column">
<h3 fxFlex="98%" class="mat-h3">{{"labels.heading.Overdue Charges" | translate}}</h3>
<h3 fxFlex="98%" class="mat-h3">{{ 'labels.heading.Overdue Charges' | translate }}</h3>
<mat-divider fxFlex="98%"></mat-divider>
<table mat-table class="mat-elevation-z1" [dataSource]="loansAccountProductTemplate.overdueCharges">
<ng-container matColumnDef="name">
<th mat-header-cell *matHeaderCellDef> {{"labels.inputs.name" | translate}} </th>
<td mat-cell *matCellDef="let charge"> {{ charge.name }},{{ charge.currency.displaySymbol }} </td>
<th mat-header-cell *matHeaderCellDef>{{ 'labels.inputs.name' | translate }}</th>
<td mat-cell *matCellDef="let charge">{{ charge.name }},{{ charge.currency.displaySymbol }}</td>
</ng-container>
<ng-container matColumnDef="type">
<th mat-header-cell *matHeaderCellDef> {{"labels.inputs.Type" | translate}} </th>
<td mat-cell *matCellDef="let charge"> {{ charge.chargeCalculationType.value }} </td>
<th mat-header-cell *matHeaderCellDef>{{ 'labels.inputs.Type' | translate }}</th>
<td mat-cell *matCellDef="let charge">{{ charge.chargeCalculationType.value }}</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| formatNumber }} </td>
<th mat-header-cell *matHeaderCellDef>{{ 'labels.inputs.Amount' | translate }}</th>
<td mat-cell *matCellDef="let charge">{{ charge.amount | formatNumber }}</td>
</ng-container>
<ng-container matColumnDef="collectedon">
<th mat-header-cell *matHeaderCellDef> {{"labels.inputs.Collected On" | translate}} </th>
<td mat-cell *matCellDef="let charge"> {{ charge.chargeTimeType.value }} </td>
<th mat-header-cell *matHeaderCellDef>{{ 'labels.inputs.Collected On' | translate }}</th>
<td mat-cell *matCellDef="let charge">{{ charge.chargeTimeType.value }}</td>
</ng-container>
<tr mat-header-row *matHeaderRowDef="overdueChargesDisplayedColumns"></tr>
<tr mat-row *matRowDef="let row; columns: overdueChargesDisplayedColumns;"></tr>
<tr mat-row *matRowDef="let row; columns: overdueChargesDisplayedColumns"></tr>
</table>
</div>
</div>
<div fxLayout="row" class="margin-t" fxLayout.xs="column" fxLayoutAlign="center" fxLayoutGap="2%">
<button mat-raised-button matStepperPrevious>
<fa-icon icon="arrow-left" class="m-r-10"></fa-icon>
{{"labels.buttons.Previous" | translate}}
{{ 'labels.buttons.Previous' | translate }}
</button>
<button mat-raised-button [routerLink]="['../..']">
{{"labels.buttons.Cancel" | translate}}
{{ 'labels.buttons.Cancel' | translate }}
</button>
<button mat-raised-button color="primary" (click)="submitEvent.emit()">
{{"labels.buttons.Submit" | translate}}
{{ 'labels.buttons.Submit' | translate }}
</button>
</div>
@@ -1,25 +1,26 @@
<div fxLayout="row wrap" fxLayout.lt-md="column">
<button mat-flat-button color="primary" (click)="showRepaymentInfo()">
<fa-icon icon="calendar" class="m-r-10"></fa-icon>{{"labels.inputs.Generate Repayment Schedule" | translate}}
<fa-icon icon="calendar" class="m-r-10"></fa-icon>{{ 'labels.inputs.Generate Repayment Schedule' | translate }}
</button>
<mifosx-repayment-schedule-tab fxFlex="100%" [repaymentScheduleDetails]="repaymentScheduleDetails"
[currencyCode]="currencyCode">
<mifosx-repayment-schedule-tab
fxFlex="100%"
[repaymentScheduleDetails]="repaymentScheduleDetails"
[currencyCode]="currencyCode"
>
</mifosx-repayment-schedule-tab>
</div>
<div fxLayout="row" class="margin-t" fxLayout.xs="column" fxLayoutAlign="center" fxLayoutGap="2%">
<button mat-raised-button matStepperPrevious>
<fa-icon icon="arrow-left" class="m-r-10"></fa-icon>
{{"labels.buttons.Previous" | translate}}
{{ 'labels.buttons.Previous' | translate }}
</button>
<button mat-raised-button matStepperNext>
{{"labels.buttons.Next" | translate}}
{{ 'labels.buttons.Next' | translate }}
<fa-icon icon="arrow-right" class="m-l-10"></fa-icon>
</button>
<button mat-raised-button *ngIf="loanId" [routerLink]="['../', 'general']">
{{"labels.buttons.Cancel" | translate}}
{{ 'labels.buttons.Cancel' | translate }}
</button>
</div>
@@ -1,476 +1,634 @@
<form [formGroup]="loansAccountTermsForm">
<div fxLayout="row wrap" fxLayoutGap="2%" fxLayout.lt-md="column">
<mifosx-input-amount fxFlex="48%" *ngIf="currency" [currency]="currency" [isRequired]="true"
<mifosx-input-amount
fxFlex="48%"
*ngIf="currency"
[currency]="currency"
[isRequired]="true"
[inputFormControl]="loansAccountTermsForm.controls.principalAmount"
[inputLabel]="'Principal'">
[inputLabel]="'Principal'"
>
</mifosx-input-amount>
<h4 fxFlex="98%" class="mat-h4">{{"labels.heading.Term Options" | translate}} <i class="fas fa-question" matTooltip="The loan term parameter in loan accounts
is the default-calculated field based on the number of repayments and repaid every value entered by the user"></i></h4>
<h4 fxFlex="98%" class="mat-h4">
{{ 'labels.heading.Term Options' | translate }}
<i
class="fas fa-question"
matTooltip="The loan term parameter in loan accounts
is the default-calculated field based on the number of repayments and repaid every value entered by the user"
></i>
</h4>
<mat-form-field fxFlex="23%">
<mat-label>{{"labels.inputs.Loan Term" | translate}}</mat-label>
<input type="number" matInput required disabled formControlName="loanTermFrequency">
<mat-label>{{ 'labels.inputs.Loan Term' | translate }}</mat-label>
<input type="number" matInput required disabled formControlName="loanTermFrequency" />
<mat-error *ngIf="loansAccountTermsForm.controls.loanTermFrequency.hasError('required')">
{{"labels.inputs.Loan Term" | translate}} {{"labels.commons.is" | translate}} <strong>{{"labels.commons.required" | translate}}</strong>
{{ 'labels.inputs.Loan Term' | translate }} {{ 'labels.commons.is' | translate }}
<strong>{{ 'labels.commons.required' | translate }}</strong>
</mat-error>
</mat-form-field>
<mat-form-field fxFlex="23%">
<mat-label>{{"labels.inputs.Frequency" | translate}}</mat-label>
<mat-label>{{ 'labels.inputs.Frequency' | translate }}</mat-label>
<mat-select required formControlName="loanTermFrequencyType">
<mat-option *ngFor="let type of termFrequencyTypeData" [value]="type.id">
{{ type.value | translateKey:'catalogs' }}
{{ type.value | translateKey: 'catalogs' }}
</mat-option>
</mat-select>
<mat-error *ngIf="loansAccountTermsForm.controls.loanTermFrequencyType.hasError('required')">
{{"labels.inputs.Frequency" | translate}} {{"labels.commons.is" | translate}} <strong>{{"labels.commons.required" | translate}}</strong>
{{ 'labels.inputs.Frequency' | translate }} {{ 'labels.commons.is' | translate }}
<strong>{{ 'labels.commons.required' | translate }}</strong>
</mat-error>
</mat-form-field>
<mat-form-field fxFlex="20%" *ngIf="hasFixedLength()">
<mat-label>{{"labels.inputs.Fixed Length" | translate}}</mat-label>
<input type="number" matInput formControlName="fixedLength">
<mat-label>{{ 'labels.inputs.Fixed Length' | translate }}</mat-label>
<input type="number" matInput formControlName="fixedLength" />
</mat-form-field>
<span fxFlex="20%" *ngIf="hasFixedLength()" class="label-field">{{ loansAccountTermsForm.value.loanTermFrequencyType | find:termFrequencyTypeData:'id':'value' }}</span>
<span fxFlex="20%" *ngIf="hasFixedLength()" class="label-field">{{
loansAccountTermsForm.value.loanTermFrequencyType | find: termFrequencyTypeData : 'id' : 'value'
}}</span>
<h4 fxFlex="98%" class="mat-h4">Repayments </h4>
<h4 fxFlex="98%" class="mat-h4">Repayments</h4>
<mat-form-field fxFlex="48%">
<mat-label>{{"labels.inputs.Number of repayments" | translate}}</mat-label>
<input type="number" matInput formControlName="numberOfRepayments" matTooltip="Enter the total count of repayments that loan schedule has excluding the down-payment. Example:
If the loan account has 4 Installments including down-payment then number of repayments is equal to 3">
<mat-label>{{ 'labels.inputs.Number of repayments' | translate }}</mat-label>
<input
type="number"
matInput
formControlName="numberOfRepayments"
matTooltip="Enter the total count of repayments that loan schedule has excluding the down-payment. Example:
If the loan account has 4 Installments including down-payment then number of repayments is equal to 3"
/>
<mat-error *ngIf="loansAccountTermsForm.controls.numberOfRepayments.hasError('required')">
{{"labels.inputs.Number of repayments" | translate}} {{"labels.commons.is" | translate}} <strong>{{"labels.commons.required" | translate}}</strong>
{{ 'labels.inputs.Number of repayments' | translate }} {{ 'labels.commons.is' | translate }}
<strong>{{ 'labels.commons.required' | translate }}</strong>
</mat-error>
</mat-form-field>
<mat-form-field fxFlex="23%" (click)="repaymentsPicker.open()">
<mat-label>{{"labels.inputs.First repayment on" | translate}}</mat-label>
<input matInput [min]="minDate" [max]="maxDate" matTooltip="{{ 'tooltips.May be entered to override' | translate}}" [matDatepicker]="repaymentsPicker"
formControlName="repaymentsStartingFromDate">
<mat-label>{{ 'labels.inputs.First repayment on' | translate }}</mat-label>
<input
matInput
[min]="minDate"
[max]="maxDate"
matTooltip="{{ 'tooltips.May be entered to override' | translate }}"
[matDatepicker]="repaymentsPicker"
formControlName="repaymentsStartingFromDate"
/>
<mat-datepicker-toggle matSuffix [for]="repaymentsPicker"></mat-datepicker-toggle>
<mat-datepicker #repaymentsPicker></mat-datepicker>
</mat-form-field>
<mat-form-field fxFlex="23%" (click)="interestPicker.open()">
<mat-label>{{"labels.inputs.Interest charged from" | translate}}</mat-label>
<input matInput [min]="minDate" [max]="maxDate" [matDatepicker]="interestPicker" matTooltip="{{ 'tooltips.May be entered to override the date' | translate}}"
formControlName="interestChargedFromDate">
<mat-label>{{ 'labels.inputs.Interest charged from' | translate }}</mat-label>
<input
matInput
[min]="minDate"
[max]="maxDate"
[matDatepicker]="interestPicker"
matTooltip="{{ 'tooltips.May be entered to override the date' | translate }}"
formControlName="interestChargedFromDate"
/>
<mat-datepicker-toggle matSuffix [for]="interestPicker"></mat-datepicker-toggle>
<mat-datepicker #interestPicker></mat-datepicker>
</mat-form-field>
<h4 fxFlex="98%" class="mat-h4">{{"labels.heading.Repaid Every" | translate}} <i class="fas fa-question" matTooltip="{{ 'tooltips.Fields are input to calculating the repayment schedule' | translate}}"></i></h4>
<h4 fxFlex="98%" class="mat-h4">
{{ 'labels.heading.Repaid Every' | translate }}
<i
class="fas fa-question"
matTooltip="{{ 'tooltips.Fields are input to calculating the repayment schedule' | translate }}"
></i>
</h4>
<mat-form-field fxFlex="23%">
<mat-label>{{"labels.inputs.Repaid every" | translate}}</mat-label>
<input type="number" matInput required formControlName="repaymentEvery"
matTooltip="{{ 'tooltips.Fields are input to calculating the repayment schedule' | translate}}">
<mat-label>{{ 'labels.inputs.Repaid every' | translate }}</mat-label>
<input
type="number"
matInput
required
formControlName="repaymentEvery"
matTooltip="{{ 'tooltips.Fields are input to calculating the repayment schedule' | translate }}"
/>
<mat-error *ngIf="loansAccountTermsForm.controls.repaymentEvery.hasError('required')">
{{"labels.inputs.Repaid every" | translate}} {{"labels.commons.is" | translate}} <strong>{{"labels.commons.required" | translate}}</strong>
{{ 'labels.inputs.Repaid every' | translate }} {{ 'labels.commons.is' | translate }}
<strong>{{ 'labels.commons.required' | translate }}</strong>
</mat-error>
</mat-form-field>
<mat-form-field fxFlex="23%">
<mat-label>{{"labels.inputs.Frequency" | translate}}</mat-label>
<mat-label>{{ 'labels.inputs.Frequency' | translate }}</mat-label>
<mat-select formControlName="repaymentFrequencyType" disabled required>
<mat-option *ngFor="let repaymentFrequencyType of termFrequencyTypeData" [value]="repaymentFrequencyType.id">
{{ repaymentFrequencyType.value | translateKey:'catalogs' }}
{{ repaymentFrequencyType.value | translateKey: 'catalogs' }}
</mat-option>
</mat-select>
</mat-form-field>
<mat-form-field fxFlex="14%" *ngIf="loansAccountTermsForm.controls.repaymentFrequencyType.value === 2">
<mat-label>{{"labels.inputs.Select On" | translate}}</mat-label>
<mat-label>{{ 'labels.inputs.Select On' | translate }}</mat-label>
<mat-select formControlName="repaymentFrequencyNthDayType">
<mat-option *ngFor="let repaymentFrequencyNthDayType of repaymentFrequencyNthDayTypeData"
[value]="repaymentFrequencyNthDayType.id">
{{ repaymentFrequencyNthDayType.value | translateKey:'catalogs' }}
<mat-option
*ngFor="let repaymentFrequencyNthDayType of repaymentFrequencyNthDayTypeData"
[value]="repaymentFrequencyNthDayType.id"
>
{{ repaymentFrequencyNthDayType.value | translateKey: 'catalogs' }}
</mat-option>
</mat-select>
</mat-form-field>
<mat-form-field fxFlex="14%" *ngIf="loansAccountTermsForm.controls.repaymentFrequencyType.value === 2">
<mat-label>{{"labels.inputs.Select Day" | translate}}</mat-label>
<mat-label>{{ 'labels.inputs.Select Day' | translate }}</mat-label>
<mat-select formControlName="repaymentFrequencyDayOfWeekType">
<mat-option *ngFor="let repaymentFrequencyDayOfWeekType of repaymentFrequencyDaysOfWeekTypeData"
[value]="repaymentFrequencyDayOfWeekType.id">
{{ repaymentFrequencyDayOfWeekType.value | translateKey:'catalogs' }}
<mat-option
*ngFor="let repaymentFrequencyDayOfWeekType of repaymentFrequencyDaysOfWeekTypeData"
[value]="repaymentFrequencyDayOfWeekType.id"
>
{{ repaymentFrequencyDayOfWeekType.value | translateKey: 'catalogs' }}
</mat-option>
</mat-select>
</mat-form-field>
<mat-checkbox fxFlex="73%" labelPosition="before" formControlName="enableDownPayment" matTooltip="Leave this checkbox checked if the loan has Down Payment, A Down Payment is
a sum a buyer pays upfront when purchasing a good. It represents a percentage of the total purchase price, and the balance is usually financed" class="margin-b" *ngIf="productEnableDownPayment">
{{'labels.inputs.Enable Down Payment' | translate}}
<mat-checkbox
fxFlex="73%"
labelPosition="before"
formControlName="enableDownPayment"
matTooltip="Leave this checkbox checked if the loan has Down Payment, A Down Payment is
a sum a buyer pays upfront when purchasing a good. It represents a percentage of the total purchase price, and the balance is usually financed"
class="margin-b"
*ngIf="productEnableDownPayment"
>
{{ 'labels.inputs.Enable Down Payment' | translate }}
</mat-checkbox>
<h4 fxFlex="98%" class="mat-h4">{{"labels.inputs.Nominal interest rate" | translate}}</h4>
<h4 fxFlex="98%" class="mat-h4">{{ 'labels.inputs.Nominal interest rate' | translate }}</h4>
<ng-container *ngIf="!loansAccountTermsData?.isLoanProductLinkedToFloatingRate">
<mat-form-field fxFlex="23%">
<mat-label>{{"labels.inputs.Nominal interest rate" | translate}} %</mat-label>
<input type="number" matInput formControlName="interestRatePerPeriod">
<mat-label>{{ 'labels.inputs.Nominal interest rate' | translate }} %</mat-label>
<input type="number" matInput formControlName="interestRatePerPeriod" />
</mat-form-field>
<mat-form-field fxFlex="23%">
<mat-label>{{'labels.inputs.Frequency' | translate}}</mat-label>
<mat-label>{{ 'labels.inputs.Frequency' | translate }}</mat-label>
<mat-select formControlName="interestRateFrequencyType">
<mat-option *ngFor="let interestRateFrequencyType of interestRateFrequencyTypeData" [value]="interestRateFrequencyType.id">
{{ interestRateFrequencyType.value | translateKey:'catalogs' }}
<mat-option
*ngFor="let interestRateFrequencyType of interestRateFrequencyTypeData"
[value]="interestRateFrequencyType.id"
>
{{ interestRateFrequencyType.value | translateKey: 'catalogs' }}
</mat-option>
</mat-select>
<mat-error>
{{'labels.inputs.Nominal interest rate frequency' | translate}} {{'labels.commons.is' | translate}} <strong>{{'labels.commons.required' | translate}}</strong>
{{ 'labels.inputs.Nominal interest rate frequency' | translate }} {{ 'labels.commons.is' | translate }}
<strong>{{ 'labels.commons.required' | translate }}</strong>
</mat-error>
</mat-form-field>
<mat-form-field fxFlex="23%">
<mat-label>{{"labels.inputs.Interest method" | translate}}</mat-label>
<mat-select formControlName="interestType" matTooltip="{{ 'tooltips.The Interest method value' | translate}}">
<mat-label>{{ 'labels.inputs.Interest method' | translate }}</mat-label>
<mat-select formControlName="interestType" matTooltip="{{ 'tooltips.The Interest method value' | translate }}">
<mat-option *ngFor="let interestType of interestTypeData" [value]="interestType.id">
{{ interestType.value | translateKey:'catalogs' }}
{{ interestType.value | translateKey: 'catalogs' }}
</mat-option>
</mat-select>
</mat-form-field>
<mat-form-field fxFlex="23%">
<mat-label>{{"labels.inputs.Amortization" | translate}}</mat-label>
<mat-select required matTooltip="{{ 'tooltips.The Amortization value' | translate}}" formControlName="amortizationType">
<mat-label>{{ 'labels.inputs.Amortization' | translate }}</mat-label>
<mat-select
required
matTooltip="{{ 'tooltips.The Amortization value' | translate }}"
formControlName="amortizationType"
>
<mat-option *ngFor="let amortizationType of amortizationTypeData" [value]="amortizationType.id">
{{ amortizationType.value | translateKey:'catalogs' }}
{{ amortizationType.value | translateKey: 'catalogs' }}
</mat-option>
</mat-select>
<mat-error *ngIf="loansAccountTermsForm.controls.amortizationType.hasError('required')">
{{"labels.inputs.Amortization Type" | translate}} {{"labels.commons.is" | translate}} <strong>{{"labels.commons.required" | translate}}</strong>
{{ 'labels.inputs.Amortization Type' | translate }} {{ 'labels.commons.is' | translate }}
<strong>{{ 'labels.commons.required' | translate }}</strong>
</mat-error>
</mat-form-field>
<mat-form-field fxFlex="23%" *ngIf="isEqualPrincipalPayments()">
<mat-label>{{"labels.inputs.Principal Percentage Per Installment" | translate}}</mat-label>
<input type="number" matInput formControlName="fixedPrincipalPercentagePerInstallment">
<mat-label>{{ 'labels.inputs.Principal Percentage Per Installment' | translate }}</mat-label>
<input type="number" matInput formControlName="fixedPrincipalPercentagePerInstallment" />
</mat-form-field>
<mat-checkbox fxFlex="23%" formControlName="isEqualAmortization"
[checked]="loansAccountTermsData?.isEqualAmortization">
<p>{{"labels.inputs.Is Equal Amortization" | translate}}</p>
<mat-checkbox
fxFlex="23%"
formControlName="isEqualAmortization"
[checked]="loansAccountTermsData?.isEqualAmortization"
>
<p>{{ 'labels.inputs.Is Equal Amortization' | translate }}</p>
</mat-checkbox>
</ng-container>
<ng-container *ngIf="loansAccountTermsData?.isLoanProductLinkedToFloatingRate">
<div fxFlex="48%" fxLayout="row wrap" fxLayoutGap="2%" fxLayout.lt-md="column">
<mat-form-field fxFlex="48%">
<mat-label>{{"labels.inputs.Interest Method" | translate}}</mat-label>
<mat-label>{{ 'labels.inputs.Interest Method' | translate }}</mat-label>
<mat-select formControlName="interestType">
<mat-option *ngFor="let interestType of interestTypeData" [value]="interestType.id">
{{ interestType.value | translateKey:'catalogs' }}
{{ interestType.value | translateKey: 'catalogs' }}
</mat-option>
</mat-select>
</mat-form-field>
<mat-form-field fxFlex="48%">
<mat-label>{{"labels.inputs.Amortization" | translate}}</mat-label>
<mat-select required matTooltip="{{ 'tooltips.The Amortization value' | translate}}" formControlName="amortizationType">
<mat-label>{{ 'labels.inputs.Amortization' | translate }}</mat-label>
<mat-select
required
matTooltip="{{ 'tooltips.The Amortization value' | translate }}"
formControlName="amortizationType"
>
<mat-option *ngFor="let amortizationType of amortizationTypeData" [value]="amortizationType.id">
{{ amortizationType.value | translateKey:'catalogs' }}
{{ amortizationType.value | translateKey: 'catalogs' }}
</mat-option>
</mat-select>
<mat-error *ngIf="loansAccountTermsForm.controls.amortizationType.hasError('required')">
{{"labels.inputs.Amortization Type" | translate}} {{"labels.commons.is" | translate}} <strong>{{"labels.commons.required" | translate}}</strong>
{{ 'labels.inputs.Amortization Type' | translate }} {{ 'labels.commons.is' | translate }}
<strong>{{ 'labels.commons.required' | translate }}</strong>
</mat-error>
</mat-form-field>
<mat-checkbox fxFlex="48%" formControlName="isFloatingInterestRate">
<p>{{"labels.inputs.Is Floating Rate" | translate}}?</p>
<p>{{ 'labels.inputs.Is Floating Rate' | translate }}?</p>
</mat-checkbox>
</div>
</ng-container>
<h4 fxFlex="98%" class="mat-h4">{{"labels.inputs.Loan Schedule" | translate}}</h4>
<h4 fxFlex="98%" class="mat-h4">{{ 'labels.inputs.Loan Schedule' | translate }}</h4>
<div fxFlex="48%" *ngIf="loanScheduleType">
<span fxFlex="40%"><p>{{"labels.inputs.Loan Schedule Type" | translate}}</p></span>
<span fxFlex="60%"><p>{{ loanScheduleType.value | translateKey:'catalogs' }}</p></span>
<span fxFlex="40%"
><p>{{ 'labels.inputs.Loan Schedule Type' | translate }}</p></span
>
<span fxFlex="60%"
><p>{{ loanScheduleType.value | translateKey: 'catalogs' }}</p></span
>
</div>
<mat-form-field fxFlex="48%">
<mat-label>{{"labels.inputs.Repayment Strategy" | translate}}</mat-label>
<mat-select formControlName="transactionProcessingStrategyCode" matTooltip="{{ 'tooltips.The repayment strategy' | translate}}" [disabled]="repaymentStrategyDisabled">
<mat-option *ngFor="let transactionProcessingStrategy of transactionProcessingStrategyOptions" [value]="transactionProcessingStrategy.code">
{{ transactionProcessingStrategy.name | translateKey:'catalogs' }}
<mat-label>{{ 'labels.inputs.Repayment Strategy' | translate }}</mat-label>
<mat-select
formControlName="transactionProcessingStrategyCode"
matTooltip="{{ 'tooltips.The repayment strategy' | translate }}"
[disabled]="repaymentStrategyDisabled"
>
<mat-option
*ngFor="let transactionProcessingStrategy of transactionProcessingStrategyOptions"
[value]="transactionProcessingStrategy.code"
>
{{ transactionProcessingStrategy.name | translateKey: 'catalogs' }}
</mat-option>
</mat-select>
<mat-error *ngIf="loansAccountTermsForm.controls.transactionProcessingStrategyCode.hasError('required')">
{{"labels.inputs.Repayment Strategy" | translate}} {{"labels.commons.is" | translate}} <strong>{{"labels.commons.required" | translate}}</strong>
{{ 'labels.inputs.Repayment Strategy' | translate }} {{ 'labels.commons.is' | translate }}
<strong>{{ 'labels.commons.required' | translate }}</strong>
</mat-error>
</mat-form-field>
<mat-form-field fxFlex="48%" *ngIf="loansAccountTermsData?.canDefineInstallmentAmount">
<mat-label>{{"labels.inputs.Installment Amount" | translate}}</mat-label>
<input type="number" matInput formControlName="fixedEmiAmount">
<mat-label>{{ 'labels.inputs.Installment Amount' | translate }}</mat-label>
<input type="number" matInput formControlName="fixedEmiAmount" />
</mat-form-field>
<mat-form-field fxFlex="48%">
<mat-label>{{"labels.inputs.Balloon Repayment Amount" | translate}}</mat-label>
<input type="number" matInput formControlName="balloonRepaymentAmount">
<mat-label>{{ 'labels.inputs.Balloon Repayment Amount' | translate }}</mat-label>
<input type="number" matInput formControlName="balloonRepaymentAmount" />
</mat-form-field>
<h4 fxFlex="98%" class="mat-h4">{{"labels.heading.Interest Calculations" | translate}}</h4>
<h4 fxFlex="98%" class="mat-h4">{{ 'labels.heading.Interest Calculations' | translate }}</h4>
<mat-form-field fxFlex="48%">
<mat-label>{{"labels.inputs.Interest calculation period" | translate}}</mat-label>
<mat-select formControlName="interestCalculationPeriodType" matTooltip="{{ 'tooltips.Daily - Will Calculate the interest' | translate}}">
<mat-option *ngFor="let interestCalculationPeriodType of interestCalculationPeriodTypeData"
[value]="interestCalculationPeriodType.id">
{{ interestCalculationPeriodType.value | translateKey:'catalogs' }}
<mat-label>{{ 'labels.inputs.Interest calculation period' | translate }}</mat-label>
<mat-select
formControlName="interestCalculationPeriodType"
matTooltip="{{ 'tooltips.Daily - Will Calculate the interest' | translate }}"
>
<mat-option
*ngFor="let interestCalculationPeriodType of interestCalculationPeriodTypeData"
[value]="interestCalculationPeriodType.id"
>
{{ interestCalculationPeriodType.value | translateKey: 'catalogs' }}
</mat-option>
</mat-select>
</mat-form-field>
<mat-checkbox fxFlex="48%" formControlName="allowPartialPeriodInterestCalcualtion" matTooltip="{{ 'tooltips.To be used with SAME AS REPAYMENT PERIOD' | translate}}">
<p>{{"labels.inputs.Calculate interest for exact days in partial period" | translate}}</p>
<mat-checkbox
fxFlex="48%"
formControlName="allowPartialPeriodInterestCalcualtion"
matTooltip="{{ 'tooltips.To be used with SAME AS REPAYMENT PERIOD' | translate }}"
>
<p>{{ 'labels.inputs.Calculate interest for exact days in partial period' | translate }}</p>
</mat-checkbox>
<mat-form-field fxFlex="48%">
<mat-label>{{"labels.inputs.Arrears tolerance" | translate}} </mat-label>
<input matInput type="number" formControlName="inArrearsTolerance" matTooltip="{{ 'tooltips.With Arrears tolerance' | translate}}">
<mat-label>{{ 'labels.inputs.Arrears tolerance' | translate }} </mat-label>
<input
matInput
type="number"
formControlName="inArrearsTolerance"
matTooltip="{{ 'tooltips.With Arrears tolerance' | translate }}"
/>
</mat-form-field>
<mat-form-field fxFlex="48%">
<mat-label>{{"labels.inputs.Interest free period" | translate}}</mat-label>
<input matInput formControlName="graceOnInterestCharged" matTooltip="{{ 'tooltips.If the Interest Free Period' | translate}}">
<mat-label>{{ 'labels.inputs.Interest free period' | translate }}</mat-label>
<input
matInput
formControlName="graceOnInterestCharged"
matTooltip="{{ 'tooltips.If the Interest Free Period' | translate }}"
/>
</mat-form-field>
<h4 fxFlex="98%" class="mat-h4">{{"labels.heading.Moratorium" | translate}} <i class="fas fa-question" matTooltip="{{ 'tooltips.The moratorium information' | translate}}"></i></h4>
<h4 fxFlex="98%" class="mat-h4">
{{ 'labels.heading.Moratorium' | translate }}
<i class="fas fa-question" matTooltip="{{ 'tooltips.The moratorium information' | translate }}"></i>
</h4>
<mat-form-field fxFlex="23%">
<mat-label>{{"labels.inputs.Grace on principal payment" | translate}}</mat-label>
<input type="number" matInput formControlName="graceOnPrincipalPayment">
<mat-label>{{ 'labels.inputs.Grace on principal payment' | translate }}</mat-label>
<input type="number" matInput formControlName="graceOnPrincipalPayment" />
</mat-form-field>
<mat-form-field fxFlex="23%">
<mat-label>{{"labels.inputs.Grace on interest payment" | translate}}</mat-label>
<input type="number" matInput formControlName="graceOnInterestPayment">
<mat-label>{{ 'labels.inputs.Grace on interest payment' | translate }}</mat-label>
<input type="number" matInput formControlName="graceOnInterestPayment" />
</mat-form-field>
<mat-form-field fxFlex="48%">
<mat-label>{{"labels.inputs.On arrears ageing" | translate}}</mat-label>
<input type="number" matInput formControlName="graceOnArrearsAgeing">
<mat-label>{{ 'labels.inputs.On arrears ageing' | translate }}</mat-label>
<input type="number" matInput formControlName="graceOnArrearsAgeing" />
</mat-form-field>
<div fxFlexFill fxFlex="48%" *ngIf="isDelinquencyEnabled()">
<p><span fxFlex="53%"><b>{{"labels.inputs.Delinquency Bucket" | translate}}</b></span>
<span fxFlex="48%">{{ loanProduct?.delinquencyBucket.name }}</span></p>
<p>
<span fxFlex="53%"
><b>{{ 'labels.inputs.Delinquency Bucket' | translate }}</b></span
>
<span fxFlex="48%">{{ loanProduct?.delinquencyBucket.name }}</span>
</p>
</div>
<ng-container fxFlex="48%" *ngIf="isDelinquencyEnabled()">
<mat-checkbox formControlName="enableInstallmentLevelDelinquency">
<p>{{'labels.inputs.Enable installment level Delinquency' | translate}}</p>
<p>{{ 'labels.inputs.Enable installment level Delinquency' | translate }}</p>
</mat-checkbox>
</ng-container>
<ng-container fxFlex="48%" *ngIf="loansAccountTermsData?.isTopup">
<mat-checkbox fxFlex="20%" formControlName="isTopup">
<p>{{"labels.inputs.Is Topup Loan" | translate}}?</p>
<p>{{ 'labels.inputs.Is Topup Loan' | translate }}?</p>
</mat-checkbox>
<mat-form-field fxFlex="24%" *ngIf="loansAccountTermsForm.controls.isTopup.value">
<mat-label>{{"labels.inputs.Loan closed with Topup" | translate}}</mat-label>
<mat-label>{{ 'labels.inputs.Loan closed with Topup' | translate }}</mat-label>
<mat-select formControlName="loanIdToClose">
<mat-option *ngFor="let clientActiveLoan of clientActiveLoanData" [value]="clientActiveLoan.id">
{{ clientActiveLoan.accountNo }}
</mat-option>
</mat-select>
</mat-form-field>
</ng-container>
<mat-divider fxFlex="98%"></mat-divider>
<div fxFlexFill>
<span fxFlex="40%"><b>{{"labels.inputs.Recalculate Interest" | translate}}</b></span>
<span fxFlex="60%">{{ loansAccountTermsData?.isInterestRecalculationEnabled| yesNo }}</span>
<span fxFlex="40%"
><b>{{ 'labels.inputs.Recalculate Interest' | translate }}</b></span
>
<span fxFlex="60%">{{ loansAccountTermsData?.isInterestRecalculationEnabled | yesNo }}</span>
</div>
<div fxFlexFill *ngIf="loansAccountTermsData?.isInterestRecalculationEnabled">
<span fxFlex="40%">{{"labels.inputs.Days in year" | translate}}</span>
<span fxFlex="60%">{{ loansAccountTermsData.daysInYearType.value | translateKey:'catalogs' }}</span>
<span fxFlex="40%">{{ 'labels.inputs.Days in year' | translate }}</span>
<span fxFlex="60%">{{ loansAccountTermsData.daysInYearType.value | translateKey: 'catalogs' }}</span>
</div>
<ng-container *ngIf="loansAccountTermsData?.isInterestRecalculationEnabled">
<div fxFlexFill *ngIf="loansAccountTermsData?.isInterestRecalculationEnabled">
<span fxFlex="40%">{{"labels.inputs.Advance payments adjustment type" | translate}}</span>
<span fxFlex="40%">{{ 'labels.inputs.Advance payments adjustment type' | translate }}</span>
<span fxFlex="60%">{{ loansAccountTermsData.interestRecalculationData.rescheduleStrategyType.value }}</span>
</div>
<div fxFlexFill *ngIf="loansAccountTermsData?.isInterestRecalculationEnabled">
<span fxFlex="40%">{{"labels.inputs.Days in month" | translate}}</span>
<span fxFlex="60%">{{ loansAccountTermsData.daysInMonthType.value | translateKey:'catalogs' }}</span>
<span fxFlex="40%">{{ 'labels.inputs.Days in month' | translate }}</span>
<span fxFlex="60%">{{ loansAccountTermsData.daysInMonthType.value | translateKey: 'catalogs' }}</span>
</div>
</ng-container>
<ng-container *ngIf="loansAccountTermsData?.isInterestRecalculationEnabled">
<div fxFlexFill>
<span fxFlex="40%">{{"labels.inputs.Interest recalculation compounding on" | translate}}</span>
<span fxFlex="60%">{{ loansAccountTermsData.interestRecalculationData.interestRecalculationCompoundingType.value | translateKey:'catalogs' }}</span>
<span fxFlex="40%">{{ 'labels.inputs.Interest recalculation compounding on' | translate }}</span>
<span fxFlex="60%">{{
loansAccountTermsData.interestRecalculationData.interestRecalculationCompoundingType.value
| translateKey: 'catalogs'
}}</span>
</div>
<div fxFlexFill>
<span fxFlex="40%">{{"labels.inputs.Frequency Interval for recalculation" | translate}}</span>
<span fxFlex="40%">{{ 'labels.inputs.Frequency Interval for recalculation' | translate }}</span>
<span fxFlex="60%">
<span>{{ loansAccountTermsData.interestRecalculationData.recalculationRestFrequencyType.value}}</span>
<span *ngIf="loansAccountTermsData.interestRecalculationData.recalculationRestFrequencyType.id === 3 &&
loansAccountTermsData.interestRecalculationData.recalculationRestFrequencyWeekday">
on {{ loansAccountTermsData.interestRecalculationData.recalculationRestFrequencyWeekday.value}}</span>
<span *ngIf="loansAccountTermsData.interestRecalculationData.recalculationRestFrequencyType.id === 4 &&
loansAccountTermsData.interestRecalculationData.recalculationRestFrequencyOnDay">on day
{{ loansAccountTermsData.interestRecalculationData.recalculationRestFrequencyOnDay}}</span>
<span *ngIf="loansAccountTermsData.interestRecalculationData.recalculationRestFrequencyType.id === 4 &&
! loansAccountTermsData.interestRecalculationData.recalculationRestFrequencyOnDay &&
loansAccountTermsData.interestRecalculationData.recalculationRestFrequencyNthDay">on
{{ loansAccountTermsData.interestRecalculationData.recalculationRestFrequencyNthDay.value}}
{{ loansAccountTermsData.interestRecalculationData.recalculationRestFrequencyWeekday.value}}</span>
<span>{{ loansAccountTermsData.interestRecalculationData.recalculationRestFrequencyType.value }}</span>
<span
*ngIf="
loansAccountTermsData.interestRecalculationData.recalculationRestFrequencyType.id === 3 &&
loansAccountTermsData.interestRecalculationData.recalculationRestFrequencyWeekday
"
>
on {{ loansAccountTermsData.interestRecalculationData.recalculationRestFrequencyWeekday.value }}</span
>
<span
*ngIf="
loansAccountTermsData.interestRecalculationData.recalculationRestFrequencyType.id === 4 &&
loansAccountTermsData.interestRecalculationData.recalculationRestFrequencyOnDay
"
>on day {{ loansAccountTermsData.interestRecalculationData.recalculationRestFrequencyOnDay }}</span
>
<span
*ngIf="
loansAccountTermsData.interestRecalculationData.recalculationRestFrequencyType.id === 4 &&
!loansAccountTermsData.interestRecalculationData.recalculationRestFrequencyOnDay &&
loansAccountTermsData.interestRecalculationData.recalculationRestFrequencyNthDay
"
>on
{{ loansAccountTermsData.interestRecalculationData.recalculationRestFrequencyNthDay.value }}
{{ loansAccountTermsData.interestRecalculationData.recalculationRestFrequencyWeekday.value }}</span
>
</span>
</div>
</ng-container>
<div fxFlexFill
*ngIf="loansAccountTermsData?.isInterestRecalculationEnabled && loansAccountTermsData.interestRecalculationData.recalculationRestFrequencyType.id !== 1">
<span fxFlex="40%">{{"labels.inputs.Frequency Interval for recalculation" | translate}}</span>
<span fxFlex="60%">{{ loansAccountTermsData.interestRecalculationData.recalculationRestFrequencyInterval}}</span>
<div
fxFlexFill
*ngIf="
loansAccountTermsData?.isInterestRecalculationEnabled &&
loansAccountTermsData.interestRecalculationData.recalculationRestFrequencyType.id !== 1
"
>
<span fxFlex="40%">{{ 'labels.inputs.Frequency Interval for recalculation' | translate }}</span>
<span fxFlex="60%">{{ loansAccountTermsData.interestRecalculationData.recalculationRestFrequencyInterval }}</span>
</div>
<ng-container *ngIf="multiDisburseLoan">
<mat-divider fxFlex="98%"></mat-divider>
<div fxFlexFill *ngIf="allowAddDisbursementDetails()">
<h4 fxFlex="98%" class="mat-h4">{{"labels.heading.Loan Tranche Details" | translate}}</h4>
<h4 fxFlex="98%" class="mat-h4">{{ 'labels.heading.Loan Tranche Details' | translate }}</h4>
<mat-form-field fxFlex="48%">
<mat-label>{{"labels.inputs.Maximum allowed outstanding balance" | translate}}</mat-label>
<input matInput required formControlName="maxOutstandingLoanBalance">
<mat-label>{{ 'labels.inputs.Maximum allowed outstanding balance' | translate }}</mat-label>
<input matInput required formControlName="maxOutstandingLoanBalance" />
</mat-form-field>
<span fxFlex>
<button type="button" mat-icon-button color="primary" required (click)="addDisbursementDataEntry(disbursementData)"
[disabled]="isMultiDisbursedCompleted">
<button
type="button"
mat-icon-button
color="primary"
required
(click)="addDisbursementDataEntry(disbursementData)"
[disabled]="isMultiDisbursedCompleted"
>
<fa-icon icon="plus-circle" size="lg"></fa-icon>
</button>
</span>
</div>
<div fxFlexFill *ngIf="!allowAddDisbursementDetails()">
<h4 fxFlex="98%" class="mat-h4">{{"labels.heading.Loan Tranche Details are not allowed for this Loan Product" | translate}}</h4>
<h4 fxFlex="98%" class="mat-h4">
{{ 'labels.heading.Loan Tranche Details are not allowed for this Loan Product' | translate }}
</h4>
</div>
<table mat-table [dataSource]="disbursementDataSource" [hidden]="disbursementDataSource.length === 0">
<ng-container matColumnDef="expectedDisbursementDate">
<th mat-header-cell *matHeaderCellDef> {{"labels.inputs.Eexpected Disbursement Date" | translate}} </th>
<th mat-header-cell *matHeaderCellDef>{{ 'labels.inputs.Eexpected Disbursement Date' | translate }}</th>
<td mat-cell *matCellDef="let row">
{{ row.expectedDisbursementDate | dateFormat }} </td>
{{ row.expectedDisbursementDate | dateFormat }}
</td>
</ng-container>
<ng-container matColumnDef="principal">
<th mat-header-cell *matHeaderCellDef> {{"labels.inputs.Principal" | translate}} </th>
<th mat-header-cell *matHeaderCellDef>{{ 'labels.inputs.Principal' | translate }}</th>
<td mat-cell *matCellDef="let row">
{{ row.principal }} </td>
{{ row.principal }}
</td>
</ng-container>
<ng-container matColumnDef="actions">
<th mat-header-cell *matHeaderCellDef> {{"labels.inputs.Actions" | translate}} </th>
<th mat-header-cell *matHeaderCellDef>{{ 'labels.inputs.Actions' | translate }}</th>
<td mat-cell *matCellDef="let row; let rowIndex = index">
<button type="button" mat-icon-button color="warn" (click)="removeDisbursementDataEntry(rowIndex)"
matTooltip="{{ 'tooltips.Delete' | translate}}" matTooltipPosition="left">
<button
type="button"
mat-icon-button
color="warn"
(click)="removeDisbursementDataEntry(rowIndex)"
matTooltip="{{ 'tooltips.Delete' | translate }}"
matTooltipPosition="left"
>
<fa-icon icon="trash"></fa-icon>
</button>
</td>
</ng-container>
<tr mat-header-row *matHeaderRowDef="disbursementDisplayedColumns"></tr>
<tr mat-row *matRowDef="let row; columns: disbursementDisplayedColumns;"></tr>
<tr mat-row *matRowDef="let row; columns: disbursementDisplayedColumns"></tr>
</table>
</ng-container>
<ng-container
*ngIf="loansAccountTermsData?.isInterestRecalculationEnabled && loansAccountTermsData.interestRecalculationData.interestRecalculationCompoundingType.id !== 0">
*ngIf="
loansAccountTermsData?.isInterestRecalculationEnabled &&
loansAccountTermsData.interestRecalculationData.interestRecalculationCompoundingType.id !== 0
"
>
<div fxFlexFill>
<span fxFlex="40%">{{"labels.inputs.Frequency for compounding" | translate}}</span>
<span fxFlex="60%">{{
loansAccountTermsData.interestRecalculationData.recalculationCompoundingFrequencyType.value}}
<span *ngIf="loansAccountTermsData.interestRecalculationData.recalculationCompoundingFrequencyType.id === 3 &&
loansAccountTermsData.interestRecalculationData.recalculationCompoundingFrequencyWeekday">
on {{ loansAccountTermsData.interestRecalculationData.recalculationCompoundingFrequencyWeekday.value}}
<span fxFlex="40%">{{ 'labels.inputs.Frequency for compounding' | translate }}</span>
<span fxFlex="60%"
>{{ loansAccountTermsData.interestRecalculationData.recalculationCompoundingFrequencyType.value }}
<span
*ngIf="
loansAccountTermsData.interestRecalculationData.recalculationCompoundingFrequencyType.id === 3 &&
loansAccountTermsData.interestRecalculationData.recalculationCompoundingFrequencyWeekday
"
>
on {{ loansAccountTermsData.interestRecalculationData.recalculationCompoundingFrequencyWeekday.value }}
</span>
<span *ngIf="loansAccountTermsData.interestRecalculationData.recalculationCompoundingFrequencyType.id === 4 &&
loansAccountTermsData.interestRecalculationData.recalculationCompoundingFrequencyOnDay">on day
{{ loansAccountTermsData.interestRecalculationData.recalculationCompoundingFrequencyOnDay}}
<span
*ngIf="
loansAccountTermsData.interestRecalculationData.recalculationCompoundingFrequencyType.id === 4 &&
loansAccountTermsData.interestRecalculationData.recalculationCompoundingFrequencyOnDay
"
>on day
{{ loansAccountTermsData.interestRecalculationData.recalculationCompoundingFrequencyOnDay }}
</span>
<span *ngIf="loansAccountTermsData.interestRecalculationData.recalculationCompoundingFrequencyType.id === 4 &&
! loansAccountTermsData.interestRecalculationData.recalculationCompoundingFrequencyOnDay &&
loansAccountTermsData.interestRecalculationData.recalculationCompoundingFrequencyNthDay">on
{{ loansAccountTermsData.interestRecalculationData.recalculationCompoundingFrequencyNthDay.value}}
{{ loansAccountTermsData.interestRecalculationData.recalculationCompoundingFrequencyWeekday.value}}
<span
*ngIf="
loansAccountTermsData.interestRecalculationData.recalculationCompoundingFrequencyType.id === 4 &&
!loansAccountTermsData.interestRecalculationData.recalculationCompoundingFrequencyOnDay &&
loansAccountTermsData.interestRecalculationData.recalculationCompoundingFrequencyNthDay
"
>on
{{ loansAccountTermsData.interestRecalculationData.recalculationCompoundingFrequencyNthDay.value }}
{{ loansAccountTermsData.interestRecalculationData.recalculationCompoundingFrequencyWeekday.value }}
</span>
</span>
</div>
</ng-container>
<div fxFlexFill
*ngIf="loansAccountTermsData?.isInterestRecalculationEnabled && loansAccountTermsData.interestRecalculationData.interestRecalculationCompoundingType.id !== 0 && loansAccountTermsData.interestRecalculationData.recalculationCompoundingFrequencyType.id !== 1">
<span fxFlex="40%">{{"labels.inputs.Frequency Interval for compounding" | translate}}</span>
<div
fxFlexFill
*ngIf="
loansAccountTermsData?.isInterestRecalculationEnabled &&
loansAccountTermsData.interestRecalculationData.interestRecalculationCompoundingType.id !== 0 &&
loansAccountTermsData.interestRecalculationData.recalculationCompoundingFrequencyType.id !== 1
"
>
<span fxFlex="40%">{{ 'labels.inputs.Frequency Interval for compounding' | translate }}</span>
<span fxFlex="60%">{{
loansAccountTermsData.interestRecalculationData.recalculationCompoundingFrequencyInterval}}</span>
loansAccountTermsData.interestRecalculationData.recalculationCompoundingFrequencyInterval
}}</span>
</div>
<mat-divider fxFlex="98%"></mat-divider>
<div fxFlex="50%">
<div fxLayout="column" fxFlex="50%" class="table_name">
<h4 fxFlex="98%" class="mat-h4">{{"labels.heading.Collaterals Data" | translate}}</h4>
<h4 fxFlex="98%" class="mat-h4">{{ 'labels.heading.Collaterals Data' | translate }}</h4>
</div>
<div fxLayout="column" fxFlex="50%">
<div fxLayout="row" fxLayoutAlign="flex-end">
<button mat-raised-button color="primary" (click)="addCollateral()">
<fa-icon icon="plus" class="m-r-10"></fa-icon>{{"labels.buttons.Add" | translate}}
<fa-icon icon="plus" class="m-r-10"></fa-icon>{{ 'labels.buttons.Add' | translate }}
</button>
</div>
</div>
</div>
<table mat-table class="mat-elevation-z1" [dataSource]="collateralDataSource">
<ng-container matColumnDef="type">
<th mat-header-cell *matHeaderCellDef> {{"labels.inputs.name" | translate}} </th>
<td mat-cell *matCellDef="let ele"> {{ ele.type.name }} </td>
<th mat-header-cell *matHeaderCellDef>{{ 'labels.inputs.name' | translate }}</th>
<td mat-cell *matCellDef="let ele">{{ ele.type.name }}</td>
</ng-container>
<ng-container matColumnDef="value">
<th mat-header-cell *matHeaderCellDef> {{"labels.inputs.Quantity" | translate}} </th>
<td mat-cell *matCellDef="let ele"> {{ ele.value }} </td>
<th mat-header-cell *matHeaderCellDef>{{ 'labels.inputs.Quantity' | translate }}</th>
<td mat-cell *matCellDef="let ele">{{ ele.value }}</td>
</ng-container>
<ng-container matColumnDef="totalValue">
<th mat-header-cell *matHeaderCellDef> {{"labels.inputs.Total Value" | translate}} </th>
<td mat-cell *matCellDef="let ele"> {{ ele.type.basePrice*ele.value }} </td>
<th mat-header-cell *matHeaderCellDef>{{ 'labels.inputs.Total Value' | translate }}</th>
<td mat-cell *matCellDef="let ele">{{ ele.type.basePrice * ele.value }}</td>
</ng-container>
<ng-container matColumnDef="totalCollateralValue">
<th mat-header-cell *matHeaderCellDef> {{"labels.inputs.Total Collateral Value" | translate}} </th>
<td mat-cell *matCellDef="let ele"> {{ ele.type.pctToBase*ele.type.basePrice*ele.value/100 }} </td>
<th mat-header-cell *matHeaderCellDef>{{ 'labels.inputs.Total Collateral Value' | translate }}</th>
<td mat-cell *matCellDef="let ele">{{ (ele.type.pctToBase * ele.type.basePrice * ele.value) / 100 }}</td>
</ng-container>
<ng-container matColumnDef="action">
<th mat-header-cell *matHeaderCellDef> {{"labels.inputs.Actions" | translate}} </th>
<th mat-header-cell *matHeaderCellDef>{{ 'labels.inputs.Actions' | translate }}</th>
<td mat-cell *matCellDef="let ele; let collateralIndex = index">
<button mat-icon-button color="warn" (click)="deleteCollateral(collateralIndex)">
<fa-icon icon="trash"></fa-icon>
@@ -479,22 +637,21 @@
</ng-container>
<tr mat-header-row *matHeaderRowDef="loanCollateralDisplayedColumns"></tr>
<tr mat-row *matRowDef="let row; columns: loanCollateralDisplayedColumns;"></tr>
<tr mat-row *matRowDef="let row; columns: loanCollateralDisplayedColumns"></tr>
</table>
</div>
<div fxLayout="row" class="margin-t" fxLayout.xs="column" fxLayoutAlign="center" fxLayoutGap="2%">
<button mat-raised-button matStepperPrevious>
<fa-icon icon="arrow-left" class="m-r-10"></fa-icon>
{{"labels.buttons.Previous" | translate}}
{{ 'labels.buttons.Previous' | translate }}
</button>
<button mat-raised-button matStepperNext>
{{"labels.buttons.Next" | translate}}
{{ 'labels.buttons.Next' | translate }}
<fa-icon icon="arrow-right" class="m-l-10"></fa-icon>
</button>
<button mat-raised-button *ngIf="loanId" [routerLink]="['../', 'general']">
{{"labels.buttons.Cancel" | translate}}
{{ 'labels.buttons.Cancel' | translate }}
</button>
</div>
</form>