gestion/factures/2019/reçu-logilab.html.jinja2
2019-07-04 17:41:12 +02:00

80 lines
1.8 KiB
Django/Jinja
Raw Blame History

This file contains ambiguous Unicode characters

This file contains Unicode characters that might be confused with other characters. If you think that this is intentional, you can safely ignore this warning. Use the Escape button to reveal them.

{% set lines = [
['Don', 600, 1],
] %}
<!DOCTYPE html>
<html lang="fr">
<head>
<meta charset="UTF-8"/>
<title>AFPy Attestation de don</title>
<link type="text/css" rel="stylesheet" href="../commun/style.css" />
</head>
<body>
<header>
<address id="from">
{%- block address_from -%}
Association Francophone Python
2, rue Professeur Zimmermann
69007 LYON
FRANCE
504 398 355 00017
{%- endblock address_from -%}
</address>
<address id="to">
{%- block address_to -%}
Logilab
104 boulevard Louis-Auguste Blanqui
75013 Paris
{%- endblock address_to -%}
</address>
</header>
{% block content %}
<dl>
<dt>Objet</dt>
<dd>Attestation de don</dd>
<dt>Date</dt>
<dd>{{ date }}</dd>
</dl>
<table>
{% set total = [0] %}
{% for designation, price, quantity in lines %}
{% if loop.first %}
<thead>
<th>Désignation</th>
<th>Prix unitaire</th>
<th>Quantité</th>
<th>Total</th>
</thead>
<tbody>
{% endif %}
<tr>
<td>{{ designation }}</td>
<td>{{ price }} €</td>
<td>{{ quantity }}</td>
<td>{{ quantity * price }} €</td>
</tr>
{{ total.append(quantity * price) or '' }}
{% if loop.last %}
</tbody>
<tfoot>
<th colspan="3">Total</th>
<td>{{ total | sum }} €</td>
</tfoot>
{% endif %}
{% endfor %}
</table>
<footer>
<p>
Taxe sur la valeur ajoutée non applicable.
</p>
</footer>
{% endblock content %}
</body>
</html>