65 lines
2.9 KiB
HTML
65 lines
2.9 KiB
HTML
<div class="tab-container mat-typography">
|
|
|
|
<div fxLayoutAlign="start">
|
|
<div class="m-b-20">
|
|
<h3>{{"labels.heading.All Transactions" | translate }}</h3>
|
|
</div>
|
|
</div>
|
|
|
|
<div class="mat-elevation-z1 m-b-25">
|
|
|
|
<table mat-table [dataSource]="dataSource">
|
|
|
|
<ng-container matColumnDef="id">
|
|
<th mat-header-cell *matHeaderCellDef> {{"labels.inputs.ID" | translate }} </th>
|
|
<td mat-cell *matCellDef="let transaction"> {{ transaction.id }} </td>
|
|
</ng-container>
|
|
|
|
<ng-container matColumnDef="transactionDate">
|
|
<th mat-header-cell *matHeaderCellDef> {{"labels.inputs.Transaction Date" | translate }} </th>
|
|
<td mat-cell *matCellDef="let transaction"> {{ transaction.date | dateFormat }} </td>
|
|
</ng-container>
|
|
|
|
<ng-container matColumnDef="transactionType">
|
|
<th mat-header-cell *matHeaderCellDef> {{"labels.inputs.Transaction Type" | translate }} </th>
|
|
<td mat-cell *matCellDef="let transaction"> {{ transaction.transactionType.value }} </td>
|
|
</ng-container>
|
|
|
|
<ng-container matColumnDef="debit">
|
|
<th mat-header-cell *matHeaderCellDef> {{"labels.inputs.Debit" | translate }} </th>
|
|
<td mat-cell *matCellDef="let transaction"> {{ isDebit(transaction.transactionType) ? transaction.amount : 'N/A'}} </td>
|
|
</ng-container>
|
|
|
|
<ng-container matColumnDef="credit">
|
|
<th mat-header-cell *matHeaderCellDef> {{"labels.inputs.Credit" | translate }} </th>
|
|
<td mat-cell *matCellDef="let transaction"> {{ !isDebit(transaction.transactionType) ? transaction.amount : 'N/A' }} </td>
|
|
</ng-container>
|
|
|
|
<ng-container matColumnDef="balance">
|
|
<th mat-header-cell *matHeaderCellDef> {{"labels.inputs.Balance" | translate }} </th>
|
|
<td mat-cell *matCellDef="let transaction"> {{ transaction.runningBalance }} </td>
|
|
</ng-container>
|
|
|
|
<ng-container matColumnDef="actions">
|
|
<th mat-header-cell *matHeaderCellDef> {{"labels.inputs.Actions" | translate }} </th>
|
|
<td mat-cell class="center" *matCellDef="let transaction">
|
|
<button class="account-action-button" mat-raised-button color="primary" (click)="routeEdit($event)" [routerLink]="[transaction.id, 'reciept']">
|
|
<i class="fa fa-file" matTooltip="View Reciept"></i>
|
|
</button>
|
|
<button class="account-action-button" mat-raised-button color="primary" matTooltip="View Journal Entries"
|
|
matTooltipPosition="left" (click)="routeEdit($event)"
|
|
[routerLink]="['/','journal-entry', 'view', 'S'+transaction.id ]">
|
|
<i class="fa fa-arrow-circle-right"></i>
|
|
</button>
|
|
</td>
|
|
</ng-container>
|
|
|
|
<tr mat-header-row *matHeaderRowDef="displayedColumns"></tr>
|
|
<tr mat-row *matRowDef="let row; columns: displayedColumns;" class="select-row" (click)="showTransactions(row)"></tr>
|
|
|
|
</table>
|
|
|
|
</div>
|
|
|
|
</div>
|