89 lines
3.9 KiB
HTML
89 lines
3.9 KiB
HTML
<div class="container mat-elevation-z8">
|
|
|
|
<mat-card>
|
|
|
|
<h2 mat-title *ngIf="transactionType.withdrawal">{{'labels.heading.Withdraw Money From Saving Account' | translate}}</h2>
|
|
<h2 mat-title *ngIf="transactionType.deposit">{{'labels.heading.Deposit Money To Saving Account' | translate}}</h2>
|
|
|
|
<form [formGroup]="savingAccountTransactionForm" (ngSubmit)="submit()">
|
|
|
|
<mat-card-content fxLayout="column">
|
|
|
|
<mat-form-field (click)="dueDatePicker.open()">
|
|
<mat-label>{{'labels.inputs.Transaction Date' | translate}}</mat-label>
|
|
<input matInput [min]="minDate" [max]="maxDate" [matDatepicker]="dueDatePicker"
|
|
formControlName="transactionDate" required>
|
|
<mat-datepicker-toggle matSuffix [for]="dueDatePicker"></mat-datepicker-toggle>
|
|
<mat-datepicker #dueDatePicker></mat-datepicker>
|
|
<mat-error *ngIf="savingAccountTransactionForm.controls.transactionDate.hasError('required')">
|
|
{{'labels.inputs.Transaction Date' | translate}} {{ "labels.commons.is" | translate}} <strong>{{ "labels.commons.required" | translate}}</strong>
|
|
</mat-error>
|
|
</mat-form-field>
|
|
|
|
<mifosx-input-amount [currency]="currency" [isRequired]="true"
|
|
[inputFormControl]="savingAccountTransactionForm.controls.transactionAmount"
|
|
[inputLabel]="'Transaction Amount'">
|
|
</mifosx-input-amount>
|
|
|
|
<mat-form-field>
|
|
<mat-label>{{'labels.inputs.Payment Type' | translate}}</mat-label>
|
|
<mat-select required formControlName="paymentTypeId">
|
|
<mat-option *ngFor="let paymentType of paymentTypeOptions" [value]="paymentType.id">
|
|
{{ paymentType.name }}
|
|
</mat-option>
|
|
</mat-select>
|
|
</mat-form-field>
|
|
|
|
<div fxFlexFill>
|
|
<span fxFlex="75%" class="expandcollapsebutton m-l-10 m-t-40" (click)="addPaymentDetails()">
|
|
<mat-slide-toggle>
|
|
<div [className]="addPaymentDetailsFlag ? 'enabled' : 'disabled'">
|
|
<span class="m-l-10">{{'labels.inputs.Show Payment Details' | translate}}</span>
|
|
</div>
|
|
</mat-slide-toggle>
|
|
</span>
|
|
</div>
|
|
|
|
<mat-form-field *ngIf="addPaymentDetailsFlag">
|
|
<mat-label>{{'labels.inputs.Account Number' | translate}}</mat-label>
|
|
<input type="number" formControlName="accountNumber" matInput />
|
|
</mat-form-field>
|
|
|
|
<mat-form-field *ngIf="addPaymentDetailsFlag">
|
|
<mat-label>{{'labels.inputs.Cheque' | translate}}</mat-label>
|
|
<input type="number" formControlName="checkNumber" matInput />
|
|
</mat-form-field>
|
|
|
|
<mat-form-field *ngIf="addPaymentDetailsFlag">
|
|
<mat-label>{{'labels.inputs.Routing Code' | translate}}</mat-label>
|
|
<input formControlName="routingCode" matInput />
|
|
</mat-form-field>
|
|
|
|
<mat-form-field *ngIf="addPaymentDetailsFlag">
|
|
<mat-label>{{'labels.inputs.Receipt Number' | translate}}</mat-label>
|
|
<input formControlName="receiptNumber" matInput />
|
|
</mat-form-field>
|
|
|
|
<mat-form-field *ngIf="addPaymentDetailsFlag">
|
|
<mat-label>{{'labels.inputs.Bank' | translate}}</mat-label>
|
|
<input formControlName="bankNumber" matInput />
|
|
</mat-form-field>
|
|
|
|
<mat-form-field>
|
|
<mat-label>{{'labels.inputs.Notes' | translate}}</mat-label>
|
|
<textarea formControlName="note" matInput cdkTextareaAutosize cdkAutosizeMinRows="2"></textarea>
|
|
</mat-form-field>
|
|
|
|
<mat-card-actions fxLayoutGap="5px" fxLayout="row" fxLayout.xs="column" fxLayoutAlign="center">
|
|
<button type="button" mat-raised-button [routerLink]="['../../transactions']">{{'labels.buttons.Cancel' | translate}}</button>
|
|
<button mat-raised-button color="primary" [disabled]="!savingAccountTransactionForm.valid">{{'labels.buttons.Submit' | translate}}</button>
|
|
</mat-card-actions>
|
|
|
|
</mat-card-content>
|
|
|
|
</form>
|
|
|
|
</mat-card>
|
|
|
|
</div>
|