aff_cotisations.html 3.93 KB
Newer Older
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24
{% comment %}
Re2o est un logiciel d'administration développé initiallement au rezometz. Il
se veut agnostique au réseau considéré, de manière à être installable en
quelques clics.

Copyright © 2017  Gabriel Détraz
Copyright © 2017  Goulven Kermarec
Copyright © 2017  Augustin Lemesle

This program is free software; you can redistribute it and/or modify
it under the terms of the GNU General Public License as published by
the Free Software Foundation; either version 2 of the License, or
(at your option) any later version.

This program is distributed in the hope that it will be useful,
but WITHOUT ANY WARRANTY; without even the implied warranty of
MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
GNU General Public License for more details.

You should have received a copy of the GNU General Public License along
with this program; if not, write to the Free Software Foundation, Inc.,
51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA.
{% endcomment %}

25
{% load acl %}
26
{% load i18n %}
27
{% load logs_extra %}
28

29
<div class="table-responsive">
Dalahro's avatar
Dalahro committed
30
{% if facture_list.paginator %}
31
    {% include 'pagination.html' with list=facture_list %}
Dalahro's avatar
Dalahro committed
32
{% endif %}
33

root's avatar
root committed
34 35 36
    <table class="table table-striped">
        <thead>
            <tr>
37 38 39 40 41 42 43 44 45 46 47 48 49 50
                <th>
                    {% trans "User" as tr_user %}
                    {% include 'buttons/sort.html' with prefix='cotis' col='user' text=tr_user %}
                </th>
                <th>{% trans "Designation" %}</th>
                <th>{% trans "Total price" %}</th>
                <th>
                    {% trans "Payment method" as tr_payment_method %}
                    {% include 'buttons/sort.html' with prefix='cotis' col='paiement' text=tr_payment_method %}
                </th>
                <th>
                    {% trans "Date" as tr_date %}
                    {% include 'buttons/sort.html' with prefix='cotis' col='date' text=tr_date %}
                </th>
Hugo LEVY-FALK's avatar
Hugo LEVY-FALK committed
51
                <th>
52
                    {% trans "Invoice ID" as tr_invoice_id %}
53 54
                    {% include 'buttons/sort.html' with prefix='cotis' col='id' text=tr_invoice_id %}
                </th>
lhark's avatar
lhark committed
55
                <th></th>
56
                <th></th>
root's avatar
root committed
57 58 59 60
            </tr>
        </thead>
        {% for facture in facture_list %}
        <tr>
lhark's avatar
lhark committed
61
            <td><a href="{% url 'users:profil' userid=facture.user.id %}">{{ facture.user }}</a></td>
root's avatar
root committed
62
            <td>{{ facture.name }}</td>
Dalahro's avatar
Dalahro committed
63
            <td>{{ facture.prix_total }}</td>
root's avatar
root committed
64 65
            <td>{{ facture.paiement }}</td>
            <td>{{ facture.date }}</td>
Hugo LEVY-FALK's avatar
Hugo LEVY-FALK committed
66
            <td>{{ facture.id }}</td>
lhark's avatar
lhark committed
67
            <td>
68
                {% can_edit facture %}
Hugo LEVY-FALK's avatar
Hugo LEVY-FALK committed
69
                {% include 'buttons/edit.html' with href='cotisations:edit-facture' id=facture.id %}
70 71 72 73
                {% acl_else %}
                {% trans "Controlled invoice" %}
                {% acl_end %}
                {% can_delete facture %}
Hugo LEVY-FALK's avatar
Hugo LEVY-FALK committed
74
                {% include 'buttons/suppr.html' with href='cotisations:del-facture' id=facture.id %}
75
                {% acl_end %}
Hugo LEVY-FALK's avatar
Hugo LEVY-FALK committed
76
                {% history_button facture %}
lhark's avatar
lhark committed
77 78
            </td>
            <td>
79
                {% if facture.valid %}
lhark's avatar
lhark committed
80
                <a class="btn btn-primary btn-sm" role="button" href="{% url 'cotisations:facture-pdf' facture.id %}">
erdnaxe's avatar
erdnaxe committed
81
                    <i class="fa fa-file-pdf-o"></i> {% trans "PDF" %}
lhark's avatar
lhark committed
82
                </a>
83 84 85
                {% else %}
                <i class="text-danger">{% trans "Invalidated invoice" %}</i>
                {% endif %}
Hugo LEVY-FALK's avatar
Hugo LEVY-FALK committed
86 87 88 89 90
                {% if facture.control and facture.is_subscription %}
                <a class="btn btn-primary btn-sm" role="button" href="{% url 'cotisations:voucher-pdf' facture.id %}">
                    <i class="fa fa-file-pdf-o"></i> {% trans "Voucher" %}
                </a>
                {% endif %}
lhark's avatar
lhark committed
91
            </td>
root's avatar
root committed
92 93 94 95
        </tr>
        {% endfor %}
    </table>

Hugo LEVY-FALK's avatar
Hugo LEVY-FALK committed
96
    {% if facture_list.paginator %}
97
    {% include 'pagination.html' with list=facture_list %}
Hugo LEVY-FALK's avatar
Hugo LEVY-FALK committed
98
    {% endif %}
99
</div>
100