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.

138 lines
3.4 KiB

{% extends "base.html" %}
{% block "content" %}
{% if transacted %}
{% if error %}
<font color="red"><h1>Es ist beim Aufladen ein Fehler aufgetreten.</h1></font>
{% else %}
<font color="green"><h1>Du hast Geld aufgeladen.</h1></font>
{% endif %}
{% endif %}
<h2>Konto aufladen</h2>
<form method="POST" class="transaction" action="/transaction/">
{% csrf_token %}
<input type="hidden" name="_formtype" value="normal" />
{{ form.as_table }}
<input type="submit" class="button" value="Einzahlen" />
</form>
<h3>Kontodaten:</h3>
<table>
<tr>
<td>Konto-Inhaber:</td> <td>Alexander Eichner</td>
</tr>
<tr>
<td>Konto-No.::</td> <td>3854536</td>
</tr>
<tr>
<td>BLZ:</td> <td>20041155</td>
</tr>
<tr>
<td><b>Betreff:</b></td> <td><b>{{ user.username }}</b></td>
</tr>
</table>
<h2>Geld &uuml;berweisen</h2>
{% if transacted %}
{% if error %}
<font color="red"><h1>Beim &uuml;berweisen ist ein Fehler aufgetreten..</h1></font>
{% else %}
<font color="green"><h1>Du hast Geld &uuml;berwiesen.</h1></font>
{% endif %}
{% endif %}
<form method="POST" class="transaction" action="/transaction/">
{% csrf_token %}
<input type="hidden" name="_formtype" value="virtual" />
{{ vform.as_table }}
<input type="submit" class="button" value="&Uuml;berweisen" />
</form>
<h2>Vergangene Transaktionen</h2>
<table class="textData">
<thead>
<tr>
<th>Datum</th>
<th>Uhrzeit</th>
<th>Betrag</th>
<th>Typ</th>
<th>Status</th>
</tr>
</thead>
<tbody>
{% for transaction in history %}
<tr>
<td>{{ transaction.dateTime|date:"j. F Y" }}</td>
<td>{{ transaction.dateTime|date:"H:i" }} Uhr</td>
<td>{{ transaction.amount|floatformat:2 }}€</td>
<td>{{ transaction.transactionType }}</td>
<td>
{% if not transaction.transactionType.needsCheck or transaction.checked %}
<span class="icon approved" title="Zahlung eingegangen">Zahlung eingegangen</span>
{% else %}
<span class="icon pending" title="Zahlungsbestätigung steht noch aus">Zahlungsbestätigung steht noch aus</span>
{% endif %}
</td>
</tr>
{% endfor %}
</tbody>
<tfoot>
<tr>
<th>Datum</th>
<th>Uhrzeit</th>
<th>Betrag</th>
<th>Typ</th>
<th>Status</th>
</tr>
</tfoot>
</table>
<h2>Vergangene virtuelle Transaktionen</h2>
<table class="textData">
<thead>
<tr>
<th>Datum</th>
<th>Uhrzeit</th>
<th>Betrag</th>
<th>Sender</th>
<th>Typ</th>
<th>Recipient</th>
<th>Comment</th>
</tr>
</thead>
<tbody>
{% for transaction in vhistory %}
<tr>
<td>{{ transaction.dateTime|date:"j. F Y" }}</td>
<td>{{ transaction.dateTime|date:"H:i" }} Uhr</td>
<td>{{ transaction.amount|floatformat:2 }}€</td>
<td>{{ transaction.user }}</td>
<td><script type="text/javascript">
if ('{{ user.username }}' == '{{ transaction.user }}'){
document.write('<span class="icon cashOut" title="Zahlung abgebucht">Zahlung abgebucht</span>');
} else {
document.write('<span class="icon cashIn" title="Zahlung eingegangen">Zahlung eingegangen</span>');
}
</script></td>
<td>{{ transaction.recipient }}</td>
<td>{{ transaction.comment }}</td>
</tr>
{% endfor %}
</tbody>
<tfoot>
<tr>
<th>Datum</th>
<th>Uhrzeit</th>
<th>Betrag</th>
<th>Sender</th>
<th>Typ</th>
<th>Recipient</th>
<th>Comment</th>
</tr>
</tfoot>
</table>
{% endblock %}