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

Skia's avatar
Skia committed
3
4
5
6
{% block title %}
{% trans %}Club account:{% endtrans %} {{ object.name }}
{% endblock %}

Skia's avatar
Skia committed
7
{% block content %}
Skia's avatar
Skia committed
8
9
10
11
    <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
12
13
    </p>
    <hr>
Skia's avatar
Skia committed
14
    <h2>{% trans %}Club account:{% endtrans %} {{ object.name }}</h2>
Skia's avatar
Skia committed
15
16
17
    {% 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 %}
Skia's avatar
Skia committed
18
    {% if not object.has_open_journal() %}
Skia's avatar
Skia committed
19
    <p><a href="{{ url('accounting:journal_new') }}?parent={{ object.id }}">{% trans %}New journal{% endtrans %}</a></p>
Skia's avatar
Skia committed
20
    {% else %}
Skia's avatar
Skia committed
21
    <p>{% trans %}You can not create new journal while you still have one opened{% endtrans %}</p>
Skia's avatar
Skia committed
22
23
    {% endif %}
    <table>
24
        <thead>
Skia's avatar
Skia committed
25
        <tr>
Skia's avatar
Skia committed
26
27
28
29
30
31
            <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>
32
            <td>{% trans %}Actions{% endtrans %}</td>
Skia's avatar
Skia committed
33
        </tr>
34
35
        </thead>
        <tbody>
Skia's avatar
Skia committed
36
37
38
39
40
        {% 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
41
            <td>{{ j.end_date }}</td>
Skia's avatar
Skia committed
42
            {% else %}
Skia's avatar
Skia committed
43
            <td> - </td>
Skia's avatar
Skia committed
44
45
46
47
48
49
50
51
52
53
54
55
            {% 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 %}
56
        </tbody>
Skia's avatar
Skia committed
57
    </table>
Skia's avatar
Skia committed
58
{% endblock %}