Files
walletmonitor/apps/transactions/templates/show.html
T

60 lines
2.3 KiB
HTML

{% extends 'base.html' %}
{% load humanize %}
{% load transaction_filter %}
{% block content %}
<div class="form-box">
<center><a href="/transactions/add" class="button button-primary">Add New Record</a></center>
<br/>
<center><a href="/transactions/import" class="button button-primary">Import from Bitcoin.de</a></center>
<br/>
<center><a href="/transactions/export{% if crypto %}?crypto={{ crypto }}{% endif %}" class="button button-primary">Export Transactions</a></center>
<br/>
<table class="table table-striped table-bordered table-sm">
<thead class="thead-dark">
<tr>
<th>Date</th>
<th>Amount</th>
<th>Value</th>
<th colspan="2">Rate</th>
<th>Actions</th>
</tr>
</thead>
<tbody>
{% for transaction in transactions %}
{% if transaction.description and transaction.description != '' %}
<tr>
<td colspan="5">{{ transaction.description }}:</td>
</tr>
{% endif %}
<tr {% if transaction.date_valid|date:"Y-m-d" < tax_limit_day|date:"Y-m-d" %}class="green"{% endif %}>
<td>{{ transaction.date_valid }}</td>
<td><span title="{% if transaction.crypto_fee and transaction.crypto_fee > 0 %}Fee: {{ transaction.crypto_fee }}{% else %}{{ transaction.crypto_total }}{% endif %}">
{{ transaction.crypto_total|floatformat:3 }}
{{ transaction.crypto_currency }}
</span>
</td>
<td><span title="{% if transaction.fiat_fee and transaction.fiat_fee > 0 %}Fee: {{ transaction.fiat_fee }}{% else %}{{ transaction.fiat_total }}{% endif %}">
{{ transaction.fiat_total|transactionformatcurrency }}
{{ transaction.fiat_currency }}
</span>
</td>
<td>{% if transaction.transaction_type == 'S' %}
{{ transaction.exchange_rate|transactionformatcurrency }} {{ transaction.crypto_currency }}/{{ transaction.fiat_currency }}
{% endif %}
</td>
<td>{% if transaction.transaction_type == 'B' %}
{{ transaction.exchange_rate|transactionformatcurrency }} {{ transaction.crypto_currency }}/{{ transaction.fiat_currency }}
{% endif %}
</td>
<td>
<a href="/transactions/edit/{{ transaction.id }}"><span class="glyphicon glyphicon-pencil" >Edit</span></a>
<a href="/transactions/delete/{{ transaction.id }}" onclick="return confirm('Are you sure?')">Delete</a>
</td>
</tr>
{% endfor %}
</tbody>
</table>
</div>
{% endblock %}