ploughshares/docker/ploughshares/templates/view_transaction.html

95 lines
4.8 KiB
HTML

{% extends "base.html" %}
{% block title %}Transaction {{ transaction.transaction_no }} - Project Ploughshares{% endblock %}
{% block content %}
<div class="container-fluid mt-4">
<div class="card">
<div class="card-header d-flex justify-content-between align-items-center">
<h2>Transaction #{{ transaction.transaction_no }} - Project Ploughshares</h2>
<div>
<a href="{{ url_for('update_transaction', id=transaction.id) }}" class="btn btn-warning">
<i class="bi bi-pencil"></i> Edit
</a>
<a href="{{ url_for('index') }}" class="btn btn-secondary">
<i class="bi bi-arrow-left"></i> Back to List
</a>
</div>
</div>
<div class="card-body">
<ul class="nav nav-tabs" id="myTab" role="tablist">
<li class="nav-item" role="presentation">
<button class="nav-link active" id="details-tab" data-bs-toggle="tab" data-bs-target="#details" type="button" role="tab" aria-controls="details" aria-selected="true">Details</button>
</li>
</ul>
<div class="tab-content" id="myTabContent">
<div class="tab-pane fade show active" id="details" role="tabpanel" aria-labelledby="details-tab">
<div class="p-3">
<table class="table table-bordered">
<tbody>
<tr>
<th style="width: 20%;">Transaction Type:</th>
<td>{{ transaction.transaction_type }}</td>
</tr>
<tr>
<th>Company/Division:</th>
<td>{{ transaction.company_division }}</td>
</tr>
<tr>
<th>Address:</th>
<td>
{{ transaction.address_1 }}<br>
{% if transaction.address_2 %}{{ transaction.address_2 }}<br>{% endif %}
{{ transaction.city }}, {{ transaction.province }}, {{ transaction.postal_code }}<br>
{{ transaction.region }}
</td>
</tr>
<tr>
<th>Primary:</th>
<td>{{ 'Yes' if transaction.is_primary else 'No' }}</td>
</tr>
<tr>
<th>Source Date:</th>
<td>{{ transaction.source_date.strftime('%Y-%m-%d') if transaction.source_date else 'N/A' }}</td>
</tr>
<tr>
<th>Source Description:</th>
<td>{{ transaction.source_description }}</td>
</tr>
<tr>
<th>Grant Type:</th>
<td>{{ transaction.grant_type }}</td>
</tr>
<tr>
<th>Description:</th>
<td>{{ transaction.description }}</td>
</tr>
<tr>
<th>Amount:</th>
<td class="amount-cell"><span class="currency-value">{{ transaction.amount|currency }}</span></td>
</tr>
<tr>
<th>Recipient:</th>
<td>{{ transaction.recipient }}</td>
</tr>
<tr>
<th>Commodity Class:</th>
<td>{{ transaction.commodity_class }}</td>
</tr>
<tr>
<th>Contract Number:</th>
<td>{{ transaction.contract_number }}</td>
</tr>
<tr>
<th>Comments:</th>
<td>{{ transaction.comments }}</td>
</tr>
</tbody>
</table>
</div>
</div>
</div>
</div>
</div>
</div>
{% endblock %}