| <!-- |
| Licensed to the Apache Software Foundation (ASF) under one or more |
| contributor license agreements. See the NOTICE file distributed with |
| this work for additional information regarding copyright ownership. |
| The ASF licenses this file to You under the Apache License, Version 2.0 |
| (the "License"); you may not use this file except in compliance with |
| the License. You may obtain a copy of the License at |
| |
| http://www.apache.org/licenses/LICENSE-2.0 |
| |
| Unless required by applicable law or agreed to in writing, software |
| distributed under the License is distributed on an "AS IS" BASIS, |
| WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. |
| See the License for the specific language governing permissions and |
| limitations under the License. |
| --> |
| |
| <form [formGroup]="form"> |
| <div layout="row"> |
| <mat-slide-toggle formControlName="interestRangeEnabled" layout-margin translate> |
| Interest range? |
| </mat-slide-toggle> |
| </div> |
| <div layout="row" *ngIf="form.get('interestRangeEnabled').value === false"> |
| <fims-number-input [form]="form" controlName="minimum" placeholder="{{'Interest rate' | translate}}"></fims-number-input> |
| </div> |
| <div layout="row" *ngIf="form.get('interestRangeEnabled').value === true"> |
| <fims-min-max minPlaceholder="{{'Minimum interest rate' | translate}}" maxPlaceholder="{{'Maximum interest rate' | translate}}" [form]="form" minControlName="minimum" maxControlName="maximum"></fims-min-max> |
| </div> |
| <fims-account-select title="{{'Interest income account(Revenue accounts only)' | translate}}" formControlName="incomeAccount" [type]="'REVENUE'"> |
| <ng-container *ngIf="!form.get('incomeAccount').pristine && form.get('incomeAccount').hasError('required')"> |
| Required |
| </ng-container> |
| <ng-container *ngIf="form.get('incomeAccount').hasError('invalidAccount')"> |
| Invalid account |
| </ng-container> |
| </fims-account-select> |
| <fims-account-select title="{{'Interest accrual account(Asset accounts only)' | translate}}" formControlName="accrualAccount" [type]="'ASSET'"> |
| <ng-container *ngIf="!form.get('accrualAccount').pristine && form.get('accrualAccount').hasError('required')"> |
| Required |
| </ng-container> |
| <ng-container *ngIf="form.get('accrualAccount').hasError('invalidAccount')"> |
| Invalid account |
| </ng-container> |
| </fims-account-select> |
| <p class="text-md" translate>Interests will be calculated on a daily basis</p> |
| </form> |