92 lines
3.9 KiB
HTML
92 lines
3.9 KiB
HTML
<div class="container">
|
|
<mat-card>
|
|
<form [formGroup]="editTransactionForm" (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="editTransactionForm.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]="editTransactionForm.controls.transactionAmount"
|
|
[inputLabel]="'Transaction Amount'"
|
|
>
|
|
</mifosx-input-amount>
|
|
|
|
<mat-form-field>
|
|
<mat-label>{{ 'labels.inputs.External Id' | translate }}</mat-label>
|
|
<input matInput formControlName="externalId" />
|
|
</mat-form-field>
|
|
|
|
<mat-form-field>
|
|
<mat-label>{{ 'labels.inputs.Payment Type' | translate }}</mat-label>
|
|
<mat-select 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]="showPaymentDetails ? 'enabled' : 'disabled'">
|
|
<span class="m-l-10">{{ 'labels.inputs.Show Payment Details' | translate }}</span>
|
|
</div>
|
|
</mat-slide-toggle>
|
|
</span>
|
|
</div>
|
|
|
|
<mat-form-field *ngIf="editTransactionForm.controls['accountNumber']">
|
|
<mat-label>{{ 'labels.inputs.Account Number' | translate }}</mat-label>
|
|
<input type="number" formControlName="accountNumber" matInput />
|
|
</mat-form-field>
|
|
|
|
<mat-form-field *ngIf="editTransactionForm.controls['checkNumber']">
|
|
<mat-label>{{ 'labels.inputs.Cheque' | translate }}</mat-label>
|
|
<input type="number" formControlName="checkNumber" matInput />
|
|
</mat-form-field>
|
|
|
|
<mat-form-field *ngIf="editTransactionForm.controls['routingCode']">
|
|
<mat-label>{{ 'labels.inputs.Routing Code' | translate }}</mat-label>
|
|
<input formControlName="routingCode" matInput />
|
|
</mat-form-field>
|
|
|
|
<mat-form-field *ngIf="editTransactionForm.controls['receiptNumber']">
|
|
<mat-label>{{ 'labels.inputs.Receipt Number' | translate }}</mat-label>
|
|
<input formControlName="receiptNumber" matInput />
|
|
</mat-form-field>
|
|
|
|
<mat-form-field *ngIf="editTransactionForm.controls['bankNumber']">
|
|
<mat-label>{{ 'labels.inputs.Bank' | translate }}</mat-label>
|
|
<input formControlName="bankNumber" matInput />
|
|
</mat-form-field>
|
|
|
|
<mat-card-actions fxLayoutGap="5px" fxLayout="row" fxLayout.xs="column" fxLayoutAlign="center">
|
|
<button type="button" mat-raised-button [routerLink]="['../']">
|
|
{{ 'labels.buttons.Cancel' | translate }}
|
|
</button>
|
|
<button mat-raised-button color="primary" [disabled]="!editTransactionForm.valid">
|
|
{{ 'labels.buttons.Submit' | translate }}
|
|
</button>
|
|
</mat-card-actions>
|
|
</mat-card-content>
|
|
</form>
|
|
</mat-card>
|
|
</div>
|