103 lines
3.7 KiB
HTML
103 lines
3.7 KiB
HTML
<div class="container">
|
|
|
|
<mat-card>
|
|
|
|
<form [formGroup]="disbursementLoanForm" (ngSubmit)="submit()">
|
|
|
|
<mat-card-content>
|
|
|
|
<div fxLayout="column">
|
|
|
|
<mat-form-field (click)="actualDisbursementDatePicker.open()">
|
|
<mat-label>Disbursed On</mat-label>
|
|
<input matInput [min]="minDate" [max]="maxDate" [matDatepicker]="actualDisbursementDatePicker" required
|
|
formControlName="actualDisbursementDate">
|
|
<mat-datepicker-toggle matSuffix [for]="actualDisbursementDatePicker"></mat-datepicker-toggle>
|
|
<mat-datepicker #actualDisbursementDatePicker></mat-datepicker>
|
|
<mat-error *ngIf="disbursementLoanForm.controls.actualDisbursementDate.hasError('required')">
|
|
Disbursed On 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="disbursementLoanForm.controls.transactionAmount.hasError('required')">
|
|
Transaction Amount <strong>is required</strong>
|
|
</mat-error>
|
|
</mat-form-field>
|
|
|
|
<mat-form-field>
|
|
<mat-label>External Id</mat-label>
|
|
<input matInput formControlName="externalId">
|
|
</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]="!disbursementLoanForm.valid"
|
|
*mifosxHasPermission="'DISBURSE_LOAN'">Submit</button>
|
|
</mat-card-actions>
|
|
|
|
</mat-card-content>
|
|
|
|
</form>
|
|
|
|
</mat-card>
|
|
|
|
</div>
|