club_account_details.jinja 1.92 KB
Newer Older
Skia's avatar
Skia committed
1 2 3
{% extends "core/base.jinja" %}

{% block content %}
Skia's avatar
Skia committed
4 5 6 7
    <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> >
    {{ object }}
Skia's avatar
Skia committed
8
    <h2>{% trans %}Club account:{% endtrans %} {{ object.name }}</h2>
Skia's avatar
Skia committed
9
    {% if not object.has_open_journal() %}
Skia's avatar
Skia committed
10
    <p><a href="{{ url('accounting:journal_new') }}?parent={{ object.id }}">{% trans %}New journal{% endtrans %}</a></p>
Skia's avatar
Skia committed
11
    {% else %}
Skia's avatar
Skia committed
12
    <p>{% trans %}You can not create new journal while you still have one opened{% endtrans %}</p>
Skia's avatar
Skia committed
13 14
    {% endif %}
    <table>
15
        <thead>
Skia's avatar
Skia committed
16
        <tr>
Skia's avatar
Skia committed
17 18 19 20 21 22
            <td>{% trans %}Name{% endtrans %}</td>
            <td>{% trans %}Start{% endtrans %}</td>
            <td>{% trans %}End{% endtrans %}</td>
            <td>{% trans %}Amount{% endtrans %}</td>
            <td>{% trans %}Effective amount{% endtrans %}</td>
            <td>{% trans %}Closed{% endtrans %}</td>
23
            <td>{% trans %}Actions{% endtrans %}</td>
Skia's avatar
Skia committed
24
        </tr>
25 26
        </thead>
        <tbody>
Skia's avatar
Skia committed
27 28 29 30 31
        {% for j in object.journals.all() %}
        <tr>
            <td>{{ j.name }}</td>
            <td>{{ j.start_date }}</td>
            {% if j.end_date %}
Skia's avatar
Skia committed
32
            <td>{{ j.end_date }}</td>
Skia's avatar
Skia committed
33
            {% else %}
Skia's avatar
Skia committed
34
            <td> - </td>
Skia's avatar
Skia committed
35 36 37 38 39 40 41 42 43 44 45 46
            {% endif %}
            <td>{{ j.amount }}</td>
            <td>{{ j.effective_amount }}</td>
            {% if j.closed %}
            <td>{% trans %}Yes{% endtrans %}</td>
            {% else %}
            <td>{% trans %}No{% endtrans %}</td>
            {% endif %}
            <td> <a href="{{ url('accounting:journal_details', j_id=j.id) }}">{% trans %}View{% endtrans %}</a>
                <a href="{{ url('accounting:journal_edit', j_id=j.id) }}">{% trans %}Edit{% endtrans %}</a> </td>
        </tr>
        {% endfor %}
47
        </tbody>
Skia's avatar
Skia committed
48
    </table>
Skia's avatar
Skia committed
49
{% endblock %}