mirror of
https://github.com/ae-utbm/sith.git
synced 2025-07-11 04:19:25 +00:00
Finish labels in accounting
This commit is contained in:
@ -15,6 +15,8 @@
|
||||
{% if user.is_root and not object.journals.exists() %}
|
||||
<a href="{{ url('accounting:club_delete', c_account_id=object.id) }}">{% trans %}Delete{% endtrans %}</a>
|
||||
{% endif %}
|
||||
<p><a href="{{ url('accounting:label_new') }}?parent={{ object.id }}">{% trans %}New label{% endtrans %}</a></p>
|
||||
<p><a href="{{ url('accounting:label_list', clubaccount_id=object.id) }}">{% trans %}Label list{% endtrans %}</a></p>
|
||||
{% if not object.has_open_journal() %}
|
||||
<p><a href="{{ url('accounting:journal_new') }}?parent={{ object.id }}">{% trans %}New journal{% endtrans %}</a></p>
|
||||
{% else %}
|
||||
|
@ -25,6 +25,7 @@
|
||||
<tr>
|
||||
<td>{% trans %}Nb{% endtrans %}</td>
|
||||
<td>{% trans %}Date{% endtrans %}</td>
|
||||
<td>{% trans %}Label{% endtrans %}</td>
|
||||
<td>{% trans %}Amount{% endtrans %}</td>
|
||||
<td>{% trans %}Payment mode{% endtrans %}</td>
|
||||
<td>{% trans %}Target{% endtrans %}</td>
|
||||
@ -41,6 +42,7 @@
|
||||
<tr>
|
||||
<td>{{ o.number }}</td>
|
||||
<td>{{ o.date }}</td>
|
||||
<td>{{ o.label or "" }}</td>
|
||||
<td>{{ o.amount }} €</td>
|
||||
<td>{{ o.get_mode_display() }}</td>
|
||||
{% if o.target_type == "OTHER" %}
|
||||
|
29
accounting/templates/accounting/label_list.jinja
Normal file
29
accounting/templates/accounting/label_list.jinja
Normal file
@ -0,0 +1,29 @@
|
||||
{% extends "core/base.jinja" %}
|
||||
|
||||
{% block title %}
|
||||
{% trans %}Label list{% endtrans %}
|
||||
{% endblock %}
|
||||
|
||||
{% block content %}
|
||||
<p>
|
||||
<a href="{{ url('accounting:bank_list') }}">{% trans %}Accounting{% endtrans %}</a> >
|
||||
<a href="{{ url('accounting:bank_details', b_account_id=object.bank_account.id) }}">{{object.bank_account }}</a> >
|
||||
<a href="{{ url('accounting:club_details', c_account_id=object.id) }}">{{ object }}</a>
|
||||
</p>
|
||||
<hr>
|
||||
<p><a href="{{ url('accounting:club_details', c_account_id=object.id) }}">{% trans %}Back to club account{% endtrans %}</a></p>
|
||||
<p><a href="{{ url('accounting:label_new') }}?parent={{ object.id }}">{% trans %}New label{% endtrans %}</a></p>
|
||||
{% if object.labels.all() %}
|
||||
<h3>{% trans %}Label list{% endtrans %}</h3>
|
||||
<ul>
|
||||
{% for l in object.labels.all() %}
|
||||
<li><a href="{{ url('accounting:label_edit', label_id=l.id) }}">{{ l }}</a> -
|
||||
<a href="{{ url('accounting:label_delete', label_id=l.id) }}">{% trans %}Delete{% endtrans %}</a>
|
||||
</li>
|
||||
{% endfor %}
|
||||
</ul>
|
||||
{% else %}
|
||||
{% trans %}There is no label in this club account.{% endtrans %}
|
||||
{% endif %}
|
||||
{% endblock %}
|
||||
|
@ -35,6 +35,7 @@
|
||||
form.simpleaccounting_type.label }}</label> {{ form.simpleaccounting_type }}</p>
|
||||
<p>{{ form.accounting_type.errors }}<label for="{{ form.accounting_type.name }}">{{ form.accounting_type.label }}</label> {{
|
||||
form.accounting_type }}</p>
|
||||
<p>{{ form.label.errors }}<label for="{{ form.label.name }}">{{ form.label.label }}</label> {{ form.label }}</p>
|
||||
<p>{{ form.done.errors }}<label for="{{ form.done.name }}">{{ form.done.label }}</label> {{ form.done }}</p>
|
||||
<p><input type="submit" value="{% trans %}Save{% endtrans %}" /></p>
|
||||
</form>
|
||||
|
Reference in New Issue
Block a user