journal_details.jinja 4.08 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>
Krophil's avatar
Krophil committed
18
    <p><a href="{{ url('accounting:co_list') }}">{% trans %}Company list{% endtrans %}</a></p>
Skia's avatar
Skia committed
19
20
    <p><strong>{% trans %}Amount: {% endtrans %}</strong>{{ object.amount }} € -
    <strong>{% trans %}Effective amount: {% endtrans %}</strong>{{ object.effective_amount }}</p>
Skia's avatar
Skia committed
21
    {% if object.closed %}
Skia's avatar
Skia committed
22
    <p>{% trans %}Journal is closed, you can not create operation{% endtrans %}</p>
Skia's avatar
Skia committed
23
    {% else %}
Skia's avatar
Skia committed
24
    <p><a href="{{ url('accounting:op_new', j_id=object.id) }}">{% trans %}New operation{% endtrans %}</a></p>
Krophil's avatar
Krophil committed
25
    </br>
Skia's avatar
Skia committed
26
    {% endif %}
Skia's avatar
Skia committed
27
    <table>
28
        <thead>
Skia's avatar
Skia committed
29
        <tr>
Skia's avatar
Skia committed
30
31
            <td>{% trans %}Nb{% endtrans %}</td>
            <td>{% trans %}Date{% endtrans %}</td>
Skia's avatar
Skia committed
32
            <td>{% trans %}Label{% endtrans %}</td>
Skia's avatar
Skia committed
33
34
            <td>{% trans %}Amount{% endtrans %}</td>
            <td>{% trans %}Payment mode{% endtrans %}</td>
Skia's avatar
Skia committed
35
            <td>{% trans %}Target{% endtrans %}</td>
Skia's avatar
Skia committed
36
37
38
39
            <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
40
            <td>{% trans %}File{% endtrans %}</td>
Skia's avatar
Skia committed
41
            <td>{% trans %}Actions{% endtrans %}</td>
Krophil's avatar
Krophil committed
42
            <td>{% trans %}PDF{% endtrans %}</td>
Skia's avatar
Skia committed
43
        </tr>
44
45
        </thead>
        <tbody>
Skia's avatar
Skia committed
46
        {% for o in object.operations.all() %}
Skia's avatar
Skia committed
47
        <tr>
48
            <td>{{ o.number }}</td>
Skia's avatar
Skia committed
49
            <td>{{ o.date }}</td>
Skia's avatar
Skia committed
50
            <td>{{ o.label or "" }}</td>
Skia's avatar
Skia committed
51
            <td>{{ o.amount }}</td>
Skia's avatar
Skia committed
52
53
54
55
56
57
            <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
58
59
60
            <td>{{ o.accounting_type.code }}</td>
            <td>{{ o.accounting_type.label }}</td>
            {% if o.done %}
Skia's avatar
Skia committed
61
            <td>{% trans %}Yes{% endtrans %}</td>
Skia's avatar
Skia committed
62
            {% else %}
Skia's avatar
Skia committed
63
            <td>{% trans %}No{% endtrans %}</td>
Skia's avatar
Skia committed
64
            {% endif %}
65
66
67
68
69
70
71
72
73
74
            <td>{{ o.remark }}
            {% if not o.linked_operation and o.target_type == "ACCOUNT" and not o.target.has_open_journal() %}
                <p><strong>
{% trans %}Warning: this operation has no linked operation because the targeted club account has no opened journal.{% endtrans %}
            </strong></p>
            <p><strong>
{% trans url=o.target.get_absolute_url() %}Open a journal in <a href="{{ url }}">this club account</a>, then save this operation again to make the linked operation.{% endtrans %}
        </strong></p>
            {% endif %}
            </td>
Skia's avatar
Skia committed
75
            {% if o.invoice %}
76
            <td><a href="{{ url('core:download', file_id=o.invoice.id) }}">{{ o.invoice.name }}</a></td>
Skia's avatar
Skia committed
77
78
79
            {% else %}
            <td>-</td>
            {% endif %}
Skia's avatar
Skia committed
80
81
            <td>
                {% if not o.journal.closed %}
Skia's avatar
Skia committed
82
                <a href="{{ url('accounting:op_edit', op_id=o.id) }}">{% trans %}Edit{% endtrans %}</a>
Skia's avatar
Skia committed
83
84
                {% endif %}
            </td>
Krophil's avatar
Krophil committed
85
            <td><a href="{{ url('accounting:op_pdf', op_id=o.id) }}">{% trans %}Generate{% endtrans %}</a></td>
Skia's avatar
Skia committed
86
        </tr>
Skia's avatar
Skia committed
87
        {% endfor %}
88
        </tbody>
Skia's avatar
Skia committed
89
    </table>
Skia's avatar
Skia committed
90
{% endblock %}