Migrate accounting

This commit is contained in:
Skia
2016-08-24 19:50:22 +02:00
parent a4df1ae9a5
commit 078b63d970
22 changed files with 904 additions and 200 deletions

View File

@ -8,7 +8,7 @@
<li><a href="{{ url('club:club_view', club_id=club.id) }}">{{ club.name }}</a>
{%- if club.children.all()|length != 0 %}
<ul>
{%- for c in club.children.all() %}
{%- for c in club.children.order_by('name') %}
{{ display_club(c) }}
{%- endfor %}
</ul>
@ -23,7 +23,7 @@
{% if club_list %}
<h3>{% trans %}Club list{% endtrans %}</h3>
<ul>
{%- for c in club_list if c.parent is none %}
{%- for c in club_list.order_by('name') if c.parent is none %}
{{ display_club(c) }}
{%- endfor %}
</ul>

View File

@ -3,11 +3,11 @@
{% block content %}
<h3>{% trans %}Club tools{% endtrans %}</h3>
<p><a href="{{ url('club:club_view', club_id=object.id) }}">Back to club</a></p>
<ul>
{% if object.counters.all()|count > 0 %}
<div>
{% if object.counters.filter(type="OFFICE")|count > 0 %}
<h4>{% trans %}Counters:{% endtrans %}</h4>
<ul>
{% for c in object.counters.all() %}
{% for c in object.counters.filter(type="OFFICE") %}
<li>{{ c }}:
<a href="{{ url('counter:details', counter_id=c.id) }}">View</a>
<a href="{{ url('counter:admin', counter_id=c.id) }}">Edit</a>
@ -15,13 +15,18 @@
{% endfor %}
</ul>
{% endif %}
{% if object.club_account %}
<li>Accouting: <a href="{{ url('accounting:club_details', c_account_id=object.club_account.id) }}">{{ object }}</a></li>
{% if object.club_account.exists() %}
<h4>{% trans %}Accouting: {% endtrans %}</h4>
<ul>
{% for ca in object.club_account.all() %}
<li><a href="{{ url('accounting:club_details', c_account_id=ca.id) }}">{{ ca }}</a></li>
{% endfor %}
</ul>
{% endif %}
{% if object.unix_name == settings.SITH_LAUNDERETTE_MANAGER['unix_name'] %}
<li><a href="{{ url('launderette:launderette_list') }}">{% trans %}Manage launderettes{% endtrans %}</a></li>
{% endif %}
</ul>
</div>
{% endblock %}