Sith/accounting/templates/accounting/club_account_details.jinja
2016-06-24 21:55:52 +02:00

54 lines
1.5 KiB
Django/Jinja

{% extends "core/base.jinja" %}
{% block content %}
<p>
<a href="{{ url('accounting:bank_list') }}">Accounting</a> >
<a href="{{ url('accounting:bank_details', b_account_id=object.bank_account.id) }}">{{object.bank_account }}</a> >
{{ object }}
<h2>View account: {{ object.name }}</h2>
<ul>
{% for k,v in object.__dict__.items() %}
<li>{{ k }} - {{ v }}</li>
{% endfor %}
</ul>
{% if not object.has_open_journal() %}
<p><a href="{{ url('accounting:journal_new') }}?parent={{ object.id }}">New journal</a></p>
{% else %}
<p>You can not create new journal while you still have one opened</p>
{% endif %}
<table>
<tr>
<td>Name</td>
<td>Start</td>
<td>End</td>
<td>Amount</td>
<td>Effective amount</td>
<td>Closed</td>
</tr>
{% for j in object.journals.all() %}
<tr>
<td>{{ j.name }}</td>
<td>{{ j.start_date }}</td>
{% if j.end_date %}
<td>{{ j.end_date }}</td>
{% else %}
<td> - </td>
{% endif %}
<td>{{ j.amount }} €</td>
<td>{{ j.effective_amount }} €</td>
{% if j.closed %}
<td>Yes</td>
{% else %}
<td>No</td>
{% endif %}
<td> <a href="{{ url('accounting:journal_details', j_id=j.id) }}">View</a>
<a href="{{ url('accounting:journal_edit', j_id=j.id) }}">Edit</a> </td>
</tr>
{% endfor %}
</table>
{% endblock %}