51 lines
1.6 KiB
HTML
51 lines
1.6 KiB
HTML
{% extends 'base.html' %}
|
|
{% load humanize %}
|
|
{% load 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/>
|
|
<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 %}
|
|
<tr>
|
|
<td>{{ transaction.date_valid }}</td>
|
|
<td>{{ transaction.crypto_amount|floatformat:3 }}
|
|
{% if transaction.crypto_fee > 0 %}Fee: {{ transaction.crypto_fee|floatformat:3 }}{% endif %}
|
|
{{ transaction.crypto_currency }}
|
|
</td>
|
|
<td>{{ transaction.fiat_amount|formatcurrency }}
|
|
{% if transaction.fiat_fee > 0 %}Fee: {{ transaction.fiat_fee|floatformat:2 }}{% endif %}
|
|
{{ transaction.fiat_currency }}
|
|
</td>
|
|
<td>{% if transaction.transaction_type == 'S' %}
|
|
{{ transaction.exchange_rate|formatcurrency }} {{ transaction.crypto_currency }}/{{ transaction.fiat_currency }}
|
|
{% endif %}
|
|
</td>
|
|
<td>{% if transaction.transaction_type == 'B' %}
|
|
{{ transaction.exchange_rate|formatcurrency }} {{ 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 %}
|