You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
 
 
 
 
 

34 lines
1.3 KiB

{% extends "base.html" %}
{% block content %}
<h2>Transactions</h2>
<form method="GET" action="{{ url_for('main.transactions') }}">
<input type="text" name="search" placeholder="Search by concept" value="{{ search }}">
<input type="submit" value="Search">
</form>
<br>
<table class="table table-striped">
<thead>
<tr>
<th><a href="{{ url_for('main.transactions', search=search, sort_by='date', sort_order='asc' if sort_order=='desc' else 'desc') }}">Date</a></th>
<th><a href="{{ url_for('main.transactions', search=search, sort_by='amount', sort_order='asc' if sort_order=='desc' else 'desc') }}">Amount</a></th>
<th><a href="{{ url_for('main.transactions', search=search, sort_by='type', sort_order='asc' if sort_order=='desc' else 'desc') }}">Type</a></th>
<th>Source Account</th>
<th>Destination Account</th>
<th>Concept</th>
</tr>
</thead>
<tbody>
{% for row in table.items %}
<tr>
<td>{{ row.date }}</td>
<td>{{ row.amount }}</td>
<td>{{ row.type }}</td>
<td>{{ row.source_account.name }}</td>
<td>{{ row.destination_account.name }}</td>
<td>{{ row.concept }}</td>
</tr>
{% endfor %}
</tbody>
</table>
{% endblock %}