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

58 lines
1.8 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.club_account.bank_account.id) }}">{{object.club_account.bank_account }}</a> >
<a href="{{ url('accounting:club_details', c_account_id=object.club_account.id) }}">{{ object.club_account }}</a> >
{{ object.name }}
</p>
<p><strong>Amount: </strong>{{ object.amount }} € - <strong>Effective amount: </strong>{{ object.effective_amount }} €</p>
{% if object.closed %}
<p>Journal is closed, you can not create operation</p>
{% else %}
<p><a href="{{ url('accounting:op_new') }}?parent={{ object.id }}">New operation</a></p>
{% endif %}
<table>
<tr>
<td>Nb</td>
<td>Date</td>
<td>Label</td>
<td>Amount</td>
<td>Payment mode</td>
<!-- TODO: <td>Target</td> -->
<td>Code</td>
<td>Nature</td>
<td>Done</td>
<td>Comment</td>
<td>Actions</td>
</tr>
{% for o in object.operations.all() %}
<tr>
<td>{{ o.id }}</td>
<td>{{ o.date }}</td>
<td>{{ o.label }}</td>
<td>{{ o.amount }} €</td>
<td>{{ o.mode }}</td>
<td>{{ o.accounting_type.code }}</td>
<td>{{ o.accounting_type.label }}</td>
{% if o.done %}
<td>Yes</td>
{% else %}
<td>No</td>
{% endif %}
<td>{{ o.remark }}</td>
<td>
{% if not o.journal.closed %}
<a href="{{ url('accounting:op_edit', op_id=o.id) }}">Edit</a>
{% endif %}
</td>
</tr>
{% endfor %}
</table>
{% endblock %}