94 lines
3.5 KiB
HTML
94 lines
3.5 KiB
HTML
<mat-card>
|
|
<mat-card-title-group>
|
|
<mat-card-title>Product Sale Report</mat-card-title>
|
|
<span class="spacer"></span>
|
|
<button mat-button mat-icon-button (click)="exportCsv()">
|
|
<mat-icon>save_alt</mat-icon>
|
|
</button>
|
|
<button mat-button mat-icon-button (click)="print()">
|
|
<mat-icon>print</mat-icon>
|
|
</button>
|
|
</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" aria-label="Elements">
|
|
<!-- Name Column -->
|
|
<ng-container matColumnDef="name">
|
|
<mat-header-cell *matHeaderCellDef>Name</mat-header-cell>
|
|
<mat-cell *matCellDef="let row">{{ row.name }}</mat-cell>
|
|
</ng-container>
|
|
|
|
<!-- Unbilled Column -->
|
|
<ng-container matColumnDef="unbilled">
|
|
<mat-header-cell *matHeaderCellDef class="right">Unbilled</mat-header-cell>
|
|
<mat-cell *matCellDef="let row" class="right">{{ row.kot | number: '1.2-2' }}</mat-cell>
|
|
</ng-container>
|
|
|
|
<!-- Sale Column -->
|
|
<ng-container matColumnDef="sale">
|
|
<mat-header-cell *matHeaderCellDef class="right">Sale</mat-header-cell>
|
|
<mat-cell *matCellDef="let row" class="right">{{
|
|
row.regularBill | number: '1.2-2'
|
|
}}</mat-cell>
|
|
</ng-container>
|
|
|
|
<!-- No Charge Column -->
|
|
<ng-container matColumnDef="noCharge">
|
|
<mat-header-cell *matHeaderCellDef class="right">No Charge</mat-header-cell>
|
|
<mat-cell *matCellDef="let row" class="right">{{
|
|
row.noCharge | number: '1.2-2'
|
|
}}</mat-cell>
|
|
</ng-container>
|
|
|
|
<!-- Staff Column -->
|
|
<ng-container matColumnDef="staff">
|
|
<mat-header-cell *matHeaderCellDef class="right">Staff</mat-header-cell>
|
|
<mat-cell *matCellDef="let row" class="right">{{ row.staff | number: '1.2-2' }}</mat-cell>
|
|
</ng-container>
|
|
|
|
<!-- Void Column -->
|
|
<ng-container matColumnDef="void">
|
|
<mat-header-cell *matHeaderCellDef class="right">Void</mat-header-cell>
|
|
<mat-cell *matCellDef="let row" class="right">{{ row.void | number: '1.2-2' }}</mat-cell>
|
|
</ng-container>
|
|
|
|
<mat-header-row *matHeaderRowDef="displayedColumns"></mat-header-row>
|
|
<mat-row *matRowDef="let row; columns: displayedColumns"></mat-row>
|
|
</mat-table>
|
|
</mat-card-content>
|
|
</mat-card>
|