87 lines
3.8 KiB
HTML
87 lines
3.8 KiB
HTML
<mat-card>
|
|
<mat-card-title-group>
|
|
<mat-card-title>Purchase Entries</mat-card-title>
|
|
</mat-card-title-group>
|
|
<mat-card-content>
|
|
<form [formGroup]="form" fxLayout="column">
|
|
<div fxLayout="row" fxLayout.lt-md="column" fxLayoutGap="20px" fxLayoutGap.lt-md="0px"
|
|
fxLayoutAlign="space-around start">
|
|
<mat-form-field fxFlex="40">
|
|
<input matInput [matDatepicker]="startDate" (focus)="startDate.open()" placeholder="Start Date"
|
|
formControlName="startDate" autocomplete="off">
|
|
<mat-datepicker-toggle matSuffix [for]="startDate"></mat-datepicker-toggle>
|
|
<mat-datepicker #startDate></mat-datepicker>
|
|
</mat-form-field>
|
|
<mat-form-field fxFlex="40">
|
|
<input matInput [matDatepicker]="finishDate" (focus)="finishDate.open()" placeholder="Finish Date"
|
|
formControlName="finishDate" autocomplete="off">
|
|
<mat-datepicker-toggle matSuffix [for]="finishDate"></mat-datepicker-toggle>
|
|
<mat-datepicker #finishDate></mat-datepicker>
|
|
</mat-form-field>
|
|
<button fxFlex="20" mat-raised-button color="primary" (click)="show()">Show</button>
|
|
</div>
|
|
</form>
|
|
<mat-table #table [dataSource]="dataSource" matSort aria-label="Elements">
|
|
|
|
<!-- Date Column -->
|
|
<ng-container matColumnDef="date">
|
|
<mat-header-cell *matHeaderCellDef mat-sort-header>Date</mat-header-cell>
|
|
<mat-cell *matCellDef="let row">{{row.date}}</mat-cell>
|
|
</ng-container>
|
|
|
|
<!-- Supplier Column -->
|
|
<ng-container matColumnDef="supplier">
|
|
<mat-header-cell *matHeaderCellDef mat-sort-header>Supplier</mat-header-cell>
|
|
<mat-cell *matCellDef="let row"><a [routerLink]="row.url">{{row.supplier}}</a></mat-cell>
|
|
</ng-container>
|
|
|
|
<!-- Product Column -->
|
|
<ng-container matColumnDef="product">
|
|
<mat-header-cell *matHeaderCellDef mat-sort-header>Product</mat-header-cell>
|
|
<mat-cell *matCellDef="let row">{{row.product}}</mat-cell>
|
|
</ng-container>
|
|
|
|
|
|
<!-- Quantity Column -->
|
|
<ng-container matColumnDef="quantity">
|
|
<mat-header-cell *matHeaderCellDef class="right">Quantity</mat-header-cell>
|
|
<mat-cell *matCellDef="let row" class="right">{{row.quantity | number:'1.2-2'}}</mat-cell>
|
|
</ng-container>
|
|
|
|
<!-- Rate Column -->
|
|
<ng-container matColumnDef="rate">
|
|
<mat-header-cell *matHeaderCellDef class="right">Rate</mat-header-cell>
|
|
<mat-cell *matCellDef="let row" class="right">{{row.rate | currency:'INR'}}</mat-cell>
|
|
</ng-container>
|
|
|
|
<!-- Tax Column -->
|
|
<ng-container matColumnDef="tax">
|
|
<mat-header-cell *matHeaderCellDef class="right">Tax</mat-header-cell>
|
|
<mat-cell *matCellDef="let row" class="right">{{row.tax | percent:'1.2-2'}}</mat-cell>
|
|
</ng-container>
|
|
|
|
<!-- Discount Column -->
|
|
<ng-container matColumnDef="discount">
|
|
<mat-header-cell *matHeaderCellDef class="right">Discount</mat-header-cell>
|
|
<mat-cell *matCellDef="let row" class="right">{{row.discount | percent:'1.2-2'}}</mat-cell>
|
|
</ng-container>
|
|
|
|
<!-- Amount Column -->
|
|
<ng-container matColumnDef="amount">
|
|
<mat-header-cell *matHeaderCellDef class="right">Amount</mat-header-cell>
|
|
<mat-cell *matCellDef="let row" class="right">{{row.amount | currency:'INR'}}</mat-cell>
|
|
</ng-container>
|
|
|
|
<mat-header-row *matHeaderRowDef="displayedColumns"></mat-header-row>
|
|
<mat-row *matRowDef="let row; columns: displayedColumns;"></mat-row>
|
|
</mat-table>
|
|
|
|
<mat-paginator #paginator
|
|
[length]="dataSource.data.length"
|
|
[pageIndex]="0"
|
|
[pageSize]="50"
|
|
[pageSizeOptions]="[25, 50, 100, 250, 300]">
|
|
</mat-paginator>
|
|
</mat-card-content>
|
|
</mat-card>
|