Files
cbsnexora/src/app/shares/shares-account-view/transactions-tab/transactions-tab.component.html
T

88 lines
3.9 KiB
HTML

<!--
Copyright since 2025 Mifos Initiative
This Source Code Form is subject to the terms of the Mozilla Public
License, v. 2.0. If a copy of the MPL was not distributed with this
file, You can obtain one at http://mozilla.org/MPL/2.0/.
-->
<div class="tab-container mat-typography">
<div class="m-b-10">
<h3>{{ 'labels.heading.All Transactions' | translate }}</h3>
</div>
<div class="mat-elevation-z1 m-b-25">
<table mat-table [dataSource]="dataSource">
<ng-container matColumnDef="transactionDate">
<th mat-header-cell *matHeaderCellDef>{{ 'labels.inputs.Transaction Date' | translate }}</th>
<td mat-cell *matCellDef="let transaction">{{ transaction.purchasedDate | 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.type.value }}
{{ transaction.type.value !== 'Charge Payment' ? '(' + transaction.status.value + ')' : '' }}
</td>
</ng-container>
<ng-container matColumnDef="totalShares">
<th mat-header-cell *matHeaderCellDef>{{ 'labels.inputs.Total Shares' | translate }}</th>
<td mat-cell *matCellDef="let transaction">{{ transaction.numberOfShares }}</td>
</ng-container>
<ng-container matColumnDef="purchasedOrRedeemedPrice">
<th mat-header-cell *matHeaderCellDef>{{ 'labels.inputs.Purhcased/Redeemed Price' | translate }}</th>
<td mat-cell *matCellDef="let transaction">
{{ shareAccountData.currency.displaySymbol }}&nbsp;{{ transaction.purchasedPrice }}
</td>
</ng-container>
<ng-container matColumnDef="chargeAmount">
<th mat-header-cell *matHeaderCellDef>{{ 'labels.inputs.Charge Amount' | translate }}</th>
<td mat-cell *matCellDef="let transaction">
{{ shareAccountData.currency.displaySymbol }}&nbsp;{{
transaction.type.value === 'Charge Payment' ? transaction.amount : transaction.chargeAmount
}}
</td>
</ng-container>
<ng-container matColumnDef="amountRecievedOrReturned">
<th mat-header-cell *matHeaderCellDef>{{ 'labels.inputs.Amount Recieved/Returned' | translate }}</th>
<td mat-cell *matCellDef="let transaction">
{{ shareAccountData.currency.displaySymbol }}&nbsp;{{ transaction.amount }}
</td>
</ng-container>
<ng-container matColumnDef="runningBalance">
<th mat-header-cell *matHeaderCellDef>Share Balance</th>
<td mat-cell *matCellDef="let transaction">{{ transaction.runningBalance }}</td>
</ng-container>
<ng-container matColumnDef="resolutionMeeting">
<th mat-header-cell *matHeaderCellDef>Resolution No. / Meeting Date</th>
<td mat-cell *matCellDef="let transaction">
<!-- The transaction's own resolution wherever it has one: a redeem always carries one, and
so does an additional-share purchase, which is authorised by its own board meeting
rather than the one the account was opened under. Only the original application falls
back to the account's resolution, having none of its own. -->
@if (transaction.resolutionNumber) {
{{ transaction.resolutionNumber }}
@if (transaction.meetingDate) {
({{ transaction.meetingDate | dateFormat }})
}
} @else {
{{ shareAccountData.resolutionNumber || '—' }}
@if (shareAccountData.resolutionDate) {
({{ shareAccountData.resolutionDate | dateFormat }})
}
}
</td>
</ng-container>
<tr mat-header-row *matHeaderRowDef="displayedColumns"></tr>
<tr mat-row *matRowDef="let row; columns: displayedColumns"></tr>
</table>
</div>
</div>