92 lines
3.3 KiB
HTML
92 lines
3.3 KiB
HTML
<div class="container">
|
|
|
|
<form [formGroup]="repaymentLoanForm" (ngSubmit)="submit()">
|
|
|
|
<mat-card-content>
|
|
|
|
<div fxLayout="column">
|
|
|
|
<mat-form-field>
|
|
<mat-label>Transaction Date</mat-label>
|
|
<input matInput [min]="minDate" [max]="maxDate" [matDatepicker]="transactionDatePicker" required formControlName="transactionDate">
|
|
<mat-datepicker-toggle matSuffix [for]="transactionDatePicker"></mat-datepicker-toggle>
|
|
<mat-datepicker #transactionDatePicker></mat-datepicker>
|
|
<mat-error *ngIf="repaymentLoanForm.controls.transactionDate.hasError('required')">
|
|
Transaction Date <strong>is required</strong>
|
|
</mat-error>
|
|
</mat-form-field>
|
|
|
|
<mat-form-field>
|
|
<mat-label>Transaction Amount</mat-label>
|
|
<input matInput required formControlName="transactionAmount">
|
|
<mat-error *ngIf="repaymentLoanForm.controls.transactionAmount.hasError('required')">
|
|
Transaction Amount <strong>is required</strong>
|
|
</mat-error>
|
|
</mat-form-field>
|
|
|
|
<mat-form-field>
|
|
<mat-label>Payment Type</mat-label>
|
|
<mat-select formControlName="paymentTypeId">
|
|
<mat-option *ngFor="let paymentType of paymentTypes" [value]="paymentType.id">
|
|
{{ paymentType.name }}
|
|
</mat-option>
|
|
</mat-select>
|
|
</mat-form-field>
|
|
|
|
<div fxFlexFill>
|
|
<span fxFlex="25%">Show Payment Details</span>
|
|
<span fxFlex="75%" class="expandCollapsebutton" (click)="addPaymentDetails()">
|
|
<button mat-raised-button color="primary" *ngIf="showPaymentDetails">
|
|
<i class="fa fa-minus"></i>
|
|
</button>
|
|
<button mat-raised-button color="primary" *ngIf="!showPaymentDetails">
|
|
<i class="fa fa-plus"></i>
|
|
</button>
|
|
</span>
|
|
</div>
|
|
|
|
<ng-container *ngIf="showPaymentDetails">
|
|
<mat-form-field>
|
|
<mat-label> Account #</mat-label>
|
|
<input matInput formControlName="accountNumber">
|
|
</mat-form-field>
|
|
|
|
<mat-form-field>
|
|
<mat-label>Cheque #</mat-label>
|
|
<input matInput formControlName="checkNumber">
|
|
</mat-form-field>
|
|
|
|
<mat-form-field>
|
|
<mat-label>Routing Code</mat-label>
|
|
<input matInput formControlName="routingCode">
|
|
</mat-form-field>
|
|
|
|
<mat-form-field>
|
|
<mat-label>Reciept #</mat-label>
|
|
<input matInput formControlName="receiptNumber">
|
|
</mat-form-field>
|
|
|
|
<mat-form-field>
|
|
<mat-label>Bank #</mat-label>
|
|
<input matInput formControlName="bankNumber">
|
|
</mat-form-field>
|
|
</ng-container>
|
|
|
|
<mat-form-field>
|
|
<mat-label>Note</mat-label>
|
|
<textarea matInput formControlName="note"></textarea>
|
|
</mat-form-field>
|
|
|
|
</div>
|
|
|
|
<mat-card-actions fxLayout="row" fxLayout.xs="column" fxLayoutAlign="center" fxLayoutGap="5px">
|
|
<button type="button" mat-raised-button [routerLink]="['../../../general']">Cancel</button>
|
|
<button mat-raised-button color="primary" [disabled]="!repaymentLoanForm.valid" *mifosxHasPermission="'REPAYMENT_LOAN'">Submit</button>
|
|
</mat-card-actions>
|
|
|
|
</mat-card-content>
|
|
|
|
</form>
|
|
|
|
</div>
|