aff_cotisations.html 3.62 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
<div class="table-responsive">
Dalahro's avatar
Dalahro committed
27
{% if facture_list.paginator %}
lhark's avatar
lhark committed
28
{% include "pagination.html" with list=facture_list %}
Dalahro's avatar
Dalahro committed
29
{% endif %}
30

root's avatar
root committed
31 32 33
    <table class="table table-striped">
        <thead>
            <tr>
34
                <th>{% include "buttons/sort.html" with prefix='cotis' col='user' text='Utilisateur' %}</th>
root's avatar
root committed
35
                <th>Designation</th>
Dalahro's avatar
Dalahro committed
36
                <th>Prix total</th>
37 38
                <th>{% include "buttons/sort.html" with prefix='cotis' col='paiement' text='Moyen de paiement' %}</th>
                <th>{% include "buttons/sort.html" with prefix='cotis' col='date' text='Date' %}</th>
39
		<th>{% include "buttons/sort.html" with prefix='cotis' col='id' text='Id facture' %}</th>
lhark's avatar
lhark committed
40
                <th></th>
41
                <th></th>
root's avatar
root committed
42 43 44 45
            </tr>
        </thead>
        {% for facture in facture_list %}
        <tr>
lhark's avatar
lhark committed
46
            <td><a href="{% url 'users:profil' userid=facture.user.id %}">{{ facture.user }}</a></td>
root's avatar
root committed
47
            <td>{{ facture.name }}</td>
Dalahro's avatar
Dalahro committed
48
            <td>{{ facture.prix_total }}</td>
root's avatar
root committed
49 50
            <td>{{ facture.paiement }}</td>
            <td>{{ facture.date }}</td>
51
	    <td>{{ facture.id }}</td>
lhark's avatar
lhark committed
52 53
            <td>
            <div class="dropdown">
54
            <button class="btn btn-default dropdown-toggle" type="button" id="editionfacture" data-toggle="dropdown" aria-haspopup="true" aria-expanded="true">
55
            Edition
56 57 58
            <span class="caret"></span>
            </button>
            <ul class="dropdown-menu" aria-labelledby="editionfacture">
59
            {% can_edit facture %}
60
                <li><a href="{% url 'cotisations:edit-facture' facture.id %}"><i class="fa fa-dollar-sign"></i> Modifier</a></li>
61
            {% acl_else %}
lhark's avatar
lhark committed
62
                <li>Facture controlée</li>
63 64
            {% acl_end %}
            {% can_delete facture %}
65
                <li><a href="{% url 'cotisations:del-facture' facture.id %}"><i class="fa fa-trash"></i> Supprimer</a></li>
66
            {% acl_end %}
67
                <li><a href="{% url 'cotisations:history' 'facture' facture.id %}"><i class="fa fa-history"></i> Historique</a></li>
lhark's avatar
lhark committed
68 69 70 71 72 73
            </ul>
            </div>
            </td>
            <td>
            {% if facture.valid %}
                <a class="btn btn-primary btn-sm" role="button" href="{% url 'cotisations:facture-pdf' facture.id %}">
74
                    <i class="fa fa-file-pdf"></i>
lhark's avatar
lhark committed
75 76 77
                    PDF
                </a>
            {% else %}
78
                <i class="text-danger">Facture invalide</i>
79
            {% endif %}
lhark's avatar
lhark committed
80
            </td>
root's avatar
root committed
81 82 83 84
        </tr>
        {% endfor %}
    </table>

85 86 87
{% if facture_list.paginator %}
{% include "pagination.html" with list=facture_list %}
{% endif %}
88
</div>