journal_details.jinja 3.43 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 %}General journal:{% endtrans %} {{ object.name }}
{% endblock %}

Skia's avatar
Skia committed
7
{% block content %}
Skia's avatar
Skia committed
8 9 10 11 12 13
    <p>
    <a href="{{ url('accounting:bank_list') }}">{% trans %}Accounting{% endtrans %}</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>
Skia's avatar
Skia committed
14 15
    <hr>
    <h2>{% trans %}General journal:{% endtrans %} {{ object.name }}</h2>
Skia's avatar
Skia committed
16 17
    <p><a href="{{ url('accounting:label_new') }}?parent={{ object.club_account.id }}">{% trans %}New label{% endtrans %}</a></p>
    <p><a href="{{ url('accounting:label_list', clubaccount_id=object.club_account.id) }}">{% trans %}Label list{% endtrans %}</a></p>
Skia's avatar
Skia committed
18 19
    <p><strong>{% trans %}Amount: {% endtrans %}</strong>{{ object.amount }} € -
    <strong>{% trans %}Effective amount: {% endtrans %}</strong>{{ object.effective_amount }}</p>
Skia's avatar
Skia committed
20
    {% if object.closed %}
Skia's avatar
Skia committed
21
    <p>{% trans %}Journal is closed, you can not create operation{% endtrans %}</p>
Skia's avatar
Skia committed
22
    {% else %}
Skia's avatar
Skia committed
23
    <p><a href="{{ url('accounting:op_new', j_id=object.id) }}">{% trans %}New operation{% endtrans %}</a></p>
Skia's avatar
Skia committed
24
    {% endif %}
Skia's avatar
Skia committed
25
    <table>
26
        <thead>
Skia's avatar
Skia committed
27
        <tr>
Skia's avatar
Skia committed
28 29
            <td>{% trans %}Nb{% endtrans %}</td>
            <td>{% trans %}Date{% endtrans %}</td>
Skia's avatar
Skia committed
30
            <td>{% trans %}Label{% endtrans %}</td>
Skia's avatar
Skia committed
31 32
            <td>{% trans %}Amount{% endtrans %}</td>
            <td>{% trans %}Payment mode{% endtrans %}</td>
Skia's avatar
Skia committed
33
            <td>{% trans %}Target{% endtrans %}</td>
Skia's avatar
Skia committed
34 35 36 37
            <td>{% trans %}Code{% endtrans %}</td>
            <td>{% trans %}Nature{% endtrans %}</td>
            <td>{% trans %}Done{% endtrans %}</td>
            <td>{% trans %}Comment{% endtrans %}</td>
Skia's avatar
Skia committed
38
            <td>{% trans %}File{% endtrans %}</td>
Skia's avatar
Skia committed
39
            <td>{% trans %}Actions{% endtrans %}</td>
Krophil's avatar
Krophil committed
40
            <td>{% trans %}PDF{% endtrans %}</td>
Skia's avatar
Skia committed
41
        </tr>
42 43
        </thead>
        <tbody>
Skia's avatar
Skia committed
44
        {% for o in object.operations.all() %}
Skia's avatar
Skia committed
45
        <tr>
46
            <td>{{ o.number }}</td>
Skia's avatar
Skia committed
47
            <td>{{ o.date }}</td>
Skia's avatar
Skia committed
48
            <td>{{ o.label or "" }}</td>
Skia's avatar
Skia committed
49
            <td>{{ o.amount }}</td>
Skia's avatar
Skia committed
50 51 52 53 54 55
            <td>{{ o.get_mode_display() }}</td>
            {% if o.target_type == "OTHER" %}
            <td>{{ o.target_label }}</td>
            {% else %}
            <td><a href="{{ o.target.get_absolute_url() }}">{{ o.target.get_display_name() }}</a></td>
            {% endif %}
Skia's avatar
Skia committed
56 57 58
            <td>{{ o.accounting_type.code }}</td>
            <td>{{ o.accounting_type.label }}</td>
            {% if o.done %}
Skia's avatar
Skia committed
59
            <td>{% trans %}Yes{% endtrans %}</td>
Skia's avatar
Skia committed
60
            {% else %}
Skia's avatar
Skia committed
61
            <td>{% trans %}No{% endtrans %}</td>
Skia's avatar
Skia committed
62 63
            {% endif %}
            <td>{{ o.remark }}</td>
Skia's avatar
Skia committed
64
            {% if o.invoice %}
65
            <td><a href="{{ url('core:download', file_id=o.invoice.id) }}">{{ o.invoice.name }}</a></td>
Skia's avatar
Skia committed
66 67 68
            {% else %}
            <td>-</td>
            {% endif %}
Skia's avatar
Skia committed
69 70
            <td>
                {% if not o.journal.closed %}
Skia's avatar
Skia committed
71
                <a href="{{ url('accounting:op_edit', op_id=o.id) }}">{% trans %}Edit{% endtrans %}</a>
Skia's avatar
Skia committed
72 73
                {% endif %}
            </td>
Krophil's avatar
Krophil committed
74
            <td><a href="{{ url('accounting:op_pdf', op_id=o.id) }}">{% trans %}Generate{% endtrans %}</a></td>
Skia's avatar
Skia committed
75
        </tr>
Skia's avatar
Skia committed
76
        {% endfor %}
77
        </tbody>
Skia's avatar
Skia committed
78
    </table>
Skia's avatar
Skia committed
79
{% endblock %}