Ajout de factures en HTML

This commit is contained in:
Guillaume Ayoub 2018-06-06 00:01:52 +02:00
parent f829629609
commit df8821736c
23 changed files with 359 additions and 16 deletions

1
.gitignore vendored Normal file
View File

@ -0,0 +1 @@
.venv

View File

@ -0,0 +1,11 @@
{% extends '_layout.jinja2' %}
{% set lines = [
['Soutien financier « Bronze » à PyConFr 2018', 500, 1],
] %}
{% block address_to %}
TeMPO Consulting
20, avenue de la Paix
67000 Strasbourg
{% endblock address_to %}

BIN
factures/2018/1169.pdf Normal file

Binary file not shown.

View File

@ -0,0 +1,13 @@
{% extends '_layout.jinja2' %}
{% set lines = [
['Soutien financier « Bronze » à PyConFr 2018', 500, 1],
] %}
{% block address_to %}
Odoo Community Association (OCA)
c/o Camptocamp SA
EPFL Innovation Park, Bat. A
1015 Lausanne
Switzerland
{% endblock address_to %}

BIN
factures/2018/1170.pdf Normal file

Binary file not shown.

View File

@ -0,0 +1,11 @@
{% extends '_layout.jinja2' %}
{% set lines = [
['Soutien financier « Argent » à PyConFr 2018', 1000, 1],
] %}
{% block address_to %}
Sewan
2, cité Paradis
75010 PARIS
{% endblock address_to %}

BIN
factures/2018/1171.pdf Normal file

Binary file not shown.

View File

@ -0,0 +1,11 @@
{% extends '_layout.jinja2' %}
{% set lines = [
['Soutien financier « Argent » à PyConFr 2018', 1000, 1],
] %}
{% block address_to %}
PeopleDoc
53, rue dHauteville
75010 PARIS
{% endblock address_to %}

BIN
factures/2018/1172.pdf Normal file

Binary file not shown.

View File

@ -0,0 +1,11 @@
{% extends '_layout.jinja2' %}
{% set lines = [
['Soutien financier « Bronze » à PyConFr 2018', 500, 1],
] %}
{% block address_to %}
Algoo SAS
340, rue de lEygala
38430 Moirans
{% endblock address_to %}

BIN
factures/2018/1173.pdf Normal file

Binary file not shown.

View File

@ -0,0 +1,11 @@
{% extends '_layout.jinja2' %}
{% set lines = [
['Soutien financier « Argent » à PyConFr 2018', 1000, 1],
] %}
{% block address_to %}
Anybox
1, rue de Stockholm
75008 Paris
{% endblock address_to %}

BIN
factures/2018/1174.pdf Normal file

Binary file not shown.

Binary file not shown.

Binary file not shown.

1
factures/2018/Makefile Symbolic link
View File

@ -0,0 +1 @@
../commun/Makefile

View File

@ -0,0 +1 @@
../commun/_layout.jinja2

View File

@ -4,7 +4,7 @@ Tableau de suivi du sponsoring PyCon 2018
+--------------------------+-------------------+--------------------------------------+-------------+------------+-----------------------------+
|Société | Contact | mail | réponse | Fact sent | Note |
| Société | Contact | Mail | Réponse | Facture | Note |
+==========================+===================+======================================+=============+============+=============================+
| Alter Way | Stéphane Vincent | stephane.vincent@alterway.fr | | | |
+--------------------------+-------------------+--------------------------------------+-------------+------------+-----------------------------+
@ -20,11 +20,11 @@ Tableau de suivi du sponsoring PyCon 2018
+--------------------------+-------------------+--------------------------------------+-------------+------------+-----------------------------+
| Capensis | D. Vandenbroucke | dvandenbroucke@capensis.fr | | | |
+--------------------------+-------------------+--------------------------------------+-------------+------------+-----------------------------+
| Tempo consulting | Maurice Moretti | mm@tempo-consulting.fr | Bronze | 500 (1169) | |
| Tempo consulting | Maurice Moretti | mm@tempo-consulting.fr | Bronze | 500 (1169) | En attente de paiement |
+--------------------------+-------------------+--------------------------------------+-------------+------------+-----------------------------+
| hackcendo | Alexandre Franke | af@hackcendo.com | | | |
| Hackcendo | Alexandre Franke | af@hackcendo.com | | | |
+--------------------------+-------------------+--------------------------------------+-------------+------------+-----------------------------+
| VODATA | Rémy Sabatier | contact@vodata.fr | | | |
| Vodata | Rémy Sabatier | contact@vodata.fr | | | |
+--------------------------+-------------------+--------------------------------------+-------------+------------+-----------------------------+
| Akretion France | Sebastien Beau | sebastien.beau@akretion.com | | | |
+--------------------------+-------------------+--------------------------------------+-------------+------------+-----------------------------+
@ -35,9 +35,9 @@ Tableau de suivi du sponsoring PyCon 2018
+--------------------------+-------------------+--------------------------------------+-------------+------------+-----------------------------+
| Sysnove | Guillaume Subiron | guillaume@sysnove.fr | | | |
+--------------------------+-------------------+--------------------------------------+-------------+------------+-----------------------------+
| tinyclues | Boris Feld | lothiraldan@gmail.com | | | |
| Tinyclues | Boris Feld | lothiraldan@gmail.com | | | |
+--------------------------+-------------------+--------------------------------------+-------------+------------+-----------------------------+
| d2si | Mohini JAGANATHEN | mohini.jaganathen@d2-si.eu | | | |
| D2SI | Mohini Jaganathen | mohini.jaganathen@d2-si.eu | | | |
+--------------------------+-------------------+--------------------------------------+-------------+------------+-----------------------------+
| Net-ng | Jean-Luc Carre | jean.luc.carre@net-ng.com | | | |
+--------------------------+-------------------+--------------------------------------+-------------+------------+-----------------------------+
@ -46,19 +46,19 @@ Tableau de suivi du sponsoring PyCon 2018
+--------------------------+-------------------+--------------------------------------+-------------+------------+-----------------------------+
| Planet work | Hadrien Devallez | h.devallez@planet-work.com | | | |
+--------------------------+-------------------+--------------------------------------+-------------+------------+-----------------------------+
| ORANGE IMPT/OLPS | Franck Guillaud | franck.guillaud@orange.com | | | |
| Orange IMPT/OLPS | Franck Guillaud | franck.guillaud@orange.com | | | |
+--------------------------+-------------------+--------------------------------------+-------------+------------+-----------------------------+
| Mozilla Foundation | Rémy Hubscher | rhubscher@mozilla.com | | | BOUNCED |
+--------------------------+-------------------+--------------------------------------+-------------+------------+-----------------------------+
| Lengow | Thomas Loiret | thomas.loiret@lengow.com | | | |
+--------------------------+-------------------+--------------------------------------+-------------+------------+-----------------------------+
| Lexsi | Linda VERZELE | lverzele@lexsi.com | | | |
| Lexsi | Linda Verzele | lverzele@lexsi.com | | | |
+--------------------------+-------------------+--------------------------------------+-------------+------------+-----------------------------+
| alwaysdata | Nicolas Ferrari | nferrari@alwaysdata.com | | | |
+--------------------------+-------------------+--------------------------------------+-------------+------------+-----------------------------+
| Ecreall | Michaël Launay | michaellaunay@ecreall.com | | | |
+--------------------------+-------------------+--------------------------------------+-------------+------------+-----------------------------+
| Anybox | Christ. Combelles | contact@anybox.fr | | | |
| Anybox | Christ. Combelles | contact@anybox.fr | Argent | 1000 (1174)| Payé |
+--------------------------+-------------------+--------------------------------------+-------------+------------+-----------------------------+
| Makina-Corpus | Catherine Tillous | catherine.tillous@makina-corpus.com | | | |
+--------------------------+-------------------+--------------------------------------+-------------+------------+-----------------------------+
@ -67,22 +67,25 @@ Tableau de suivi du sponsoring PyCon 2018
| Netsach | Pierre Alexandre | pa.schembri@netsach.com | | | |
| | SCHEMBRI | | | | |
+--------------------------+-------------------+--------------------------------------+-------------+------------+-----------------------------+
| Bearstech | G Pasgrimaud | gpasgrimaud@bearstech.com | | | |
| Bearstech | Gaël Pasgrimaud | gpasgrimaud@bearstech.com | | | |
+--------------------------+-------------------+--------------------------------------+-------------+------------+-----------------------------+
| Yaal | Arthur Ledard | arthur@yaal.fr | | | |
+--------------------------+-------------------+--------------------------------------+-------------+------------+-----------------------------+
| Itlink | Matthieu GIRARD | mgirard@itlink.fr | | | |
| Itlink | Matthieu Girard | mgirard@itlink.fr | | | En attente d'informations |
+--------------------------+-------------------+--------------------------------------+-------------+------------+-----------------------------+
| Algoo | Damien Accorsi | damien.accorsi@algoo.fr | | | |
| Algoo | Damien Accorsi | damien.accorsi@algoo.fr | Bronze | 500 (1173) | En attente d'informations |
+--------------------------+-------------------+--------------------------------------+-------------+------------+-----------------------------+
| People doc | Laureline Guerin | laureline.guerin@people-doc.com | Argent | | En attente d'informations |
| PeopleDoc | Laureline Guerin | laureline.guerin@people-doc.com | Argent | 1000 (1172)| En attente de paiement |
+--------------------------+-------------------+--------------------------------------+-------------+------------+-----------------------------+
| Toucantoco | Kevin Duchier | kevin.duchier@toucantoco.com | | | |
+--------------------------+-------------------+--------------------------------------+-------------+------------+-----------------------------+
| Majerti | Feth Arezki | feth.arezki@majerti.fr | | | |
+--------------------------+-------------------+--------------------------------------+-------------+------------+-----------------------------+
| Odoo Community | Rebecca Gellatly | rebecca.gelatly@o4sb.com | Bronze | | Nouveau sponsor |
| Association | | | | | En attente d'informations |
| Odoo Community | Rebecca Gellatly | rebecca.gelatly@o4sb.com | Bronze | 500 (1170) | Nouveau sponsor |
| | | | | | En attente de paiement |
+--------------------------+-------------------+--------------------------------------+-------------+------------+-----------------------------+
| **Total** | | | | 500 | |
| Sewan | Jean-Baptiste | jbaptiste.braun@gmail.com | Argent | 1000 (1171)| Nouveau sponsor |
| | Braun | | | | En attente d'informations |
+--------------------------+-------------------+--------------------------------------+-------------+------------+-----------------------------+
| **Total** | | | | 4500 | |
+--------------------------+-------------------+--------------------------------------+-------------+------------+-----------------------------+

4
factures/README Normal file
View File

@ -0,0 +1,4 @@
Jusqu'à 2017, les factures sont stockées en ODT et en PDF.
À partir de 2018, les factures sont stockées en HTML/Jinja2 et peuvent être
générées avec la commande "make".

15
factures/commun/Makefile Normal file
View File

@ -0,0 +1,15 @@
.PHONY: clean
all: $(addsuffix .pdf,$(basename $(basename $(wildcard *.html.jinja2))))
../commun/.venv:
virtualenv -p python3 $(PWD)/../commun/.venv
$(PWD)/../commun/.venv/bin/pip install jinja2-cli weasyprint
clean:
rm -rf $(PWD)/../commun/.venv
%.pdf: %.html ../commun/.venv
$(PWD)/../commun/.venv/bin/weasyprint $< $@
%.html: %.html.jinja2 ../commun/.venv
$(PWD)/../commun/.venv/bin/jinja2 $< -D number=$* -D date=$(shell date +%x) > $@

View File

@ -0,0 +1,86 @@
<!DOCTYPE html>
<html lang="fr">
<head>
<meta charset="UTF-8"/>
<title>AFPy Facture n°{{ number }}</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 -%}
{%- endblock address_to -%}
</address>
</header>
<dl>
<dt>Date</dt>
<dd>{{ date }}</dd>
<dt>N° de facture</dt>
<dd>{{ number }}</dd>
</dl>
<table>
{% 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>
{% set total = 0 %}
{% endif %}
<tr>
<td>{{ designation }}</td>
<td>{{ price }} €</td>
<td>{{ quantity }}</td>
<td>{{ quantity * price }} €</td>
</tr>
{% set total = total + quantity * price %}
{% if loop.last %}
</tbody>
<tfoot>
<th colspan="3">Total T.T.C. à payer</th>
<td>{{ total }} €</td>
</tfoot>
{% endif %}
{% endfor %}
</table>
<footer>
<p>
Taxe sur la valeur ajoutée non applicable, article 293 B du CGI.
</p>
<p>
En votre aimable règlement, au comptant par chèque bancaire ou virement.
</p>
<address>
Société Générale Lyon République
6, rue de la République
69206 LYON
</address>
<dl>
<dt>IBAN</dt>
<dd>FR76 3000 3031 2000 0507 6517 116</dd>
<dt>BIC/SWIFT</dt>
<dd>SOGEFRPPLPC</dd>
</dl>
</footer>
</body>
</html>

49
factures/commun/logo.svg Normal file
View File

@ -0,0 +1,49 @@
<?xml version="1.0" encoding="utf-8"?>
<!DOCTYPE svg PUBLIC "-//W3C//DTD SVG 1.1//EN" "http://www.w3.org/Graphics/SVG/1.1/DTD/svg11.dtd">
<svg version="1.1" id="Calque_1" xmlns="http://www.w3.org/2000/svg" xmlns:xlink="http://www.w3.org/1999/xlink" x="0px" y="0px"
width="50px" height="50px" viewBox="0 0 200 200" enable-background="new 0 0 200 200" xml:space="preserve">
<g id="g2894" transform="matrix(0.6745946,0,0,0.6745946,-109.00393,-38.014)">
<path id="path2896" fill="#FFFFFF" d="
M232.658,307.102c-56.779-42.106-68.673-122.269-26.566-179.048c42.109-56.777,122.27-68.671,179.049-26.564
c56.779,42.106,68.673,122.269,26.568,179.048c-42.106,56.775-122.259,68.673-179.038,26.578"/>
<path id="path2898" fill="#FF6F32" d="M309.282,203.137l-87.73,111.1
c48.834,38.695,114.96,41.116,166.467,6.057L309.282,203.137L309.282,203.137z"/>
<path id="path2900" fill="#84326B" d="M309.282,203.137
l76.913,118.409c52.698-34.653,75.588-97.834,57.316-158.199L309.282,203.137z"/>
<path id="path2902" fill="#32ADA9" d="M309.282,203.137
l134.999-37.289c-17.225-61.021-71.138-102.043-134.542-102.42L309.282,203.137L309.282,203.137z"/>
<path id="path2904" fill="#EBFF32" d="M309.282,203.137L313.2,63.523
c-63.294-1.913-118.602,36.98-138.097,97.228L309.282,203.137z"/>
<path id="path2906" fill="#327BD6" d="M309.282,203.137
l-133.506-44.214c-19.853,58.614-0.277,121.24,49.431,158.102L309.282,203.137L309.282,203.137z"/>
<path id="path2908" fill="#FFFFFF" d="M296.151,83.274c-20.598,0.107-49.162,5.941-52.404,30.453
c-1.665,8.082,0.413,18.038-1.215,25.028c-24.511-2.627-51.848,12.411-55.157,38.309c-6.81,29.067-5.168,66.718,20.653,85.775
c10.108,6.897,25.056,4.019,34.422,6.315c-2.613,20.801,6.443,44.468,28.673,49.733c31.432,11.943,72.42,10.254,96.95-14.825
c8.516-9.855,5.253-26.06,7.616-35.719c19.698,2.507,44.072-3.946,49.891-25.187c13.572-30.675,11.665-71.89-12.231-96.869
c-10.615-9.098-27.766-5.859-38.391-8.099c2.791-20.97-6.322-45.369-28.594-50.946C330.359,82.006,312.806,82.582,296.151,83.274z"
/>
<g id="g2910" transform="matrix(0.7960788,0,0,0.7636835,323.11888,330.11106)">
<linearGradient id="path2912_1_" gradientUnits="userSpaceOnUse" x1="697.1569" y1="-1591.3921" x2="979.7098" y2="-1834.491" gradientTransform="matrix(0.3021 0 0 -0.2926 -379.5969 -767.7481)">
<stop offset="0" style="stop-color:#5A9FD4"/>
<stop offset="1" style="stop-color:#306998"/>
</linearGradient>
<path id="path2912" fill="url(#path2912_1_)" d="M-19.578-310.392
c-11.879,0.057-23.223,1.069-33.206,2.835c-29.408,5.196-34.748,16.071-34.748,36.126v26.483h69.492v8.829h-69.492h-26.08
c-20.198,0-37.881,12.14-43.412,35.234c-6.382,26.469-6.665,42.987,0,70.627c4.939,20.577,16.736,35.231,36.932,35.231h23.893
v-31.747c0-22.939,19.847-43.171,43.415-43.171h69.41c19.323,0,34.749-15.911,34.749-35.315v-66.171
c0-18.835-15.888-32.981-34.749-36.126C4.692-309.544-7.693-310.446-19.578-310.392z M-57.158-289.088
c7.178,0,13.039,5.957,13.039,13.282c0,7.301-5.861,13.201-13.039,13.201c-7.204,0-13.041-5.9-13.041-13.201
C-70.199-283.132-64.362-289.088-57.158-289.088z"/>
<linearGradient id="path2914_1_" gradientUnits="userSpaceOnUse" x1="1426.6962" y1="-2348.8525" x2="1325.799" y2="-2206.1003" gradientTransform="matrix(0.3021 0 0 -0.2926 -379.5969 -767.7481)">
<stop offset="0" style="stop-color:#FFD43B"/>
<stop offset="1" style="stop-color:#FFE873"/>
</linearGradient>
<path id="path2914" fill="url(#path2914_1_)" d="M60.044-236.119v30.859
c0,23.924-20.287,44.06-43.417,44.06h-69.41c-19.013,0-34.748,16.277-34.748,35.315v66.173c0,18.833,16.376,29.91,34.748,35.311
c21.996,6.47,43.092,7.639,69.41,0c17.495-5.061,34.749-15.259,34.749-35.311v-26.485h-69.415v-8.83h69.415H86.12
c20.196,0,27.722-14.084,34.751-35.231c7.254-21.769,6.946-42.704,0-70.627c-4.997-20.106-14.526-35.234-34.751-35.234H60.044z
M21-68.54c7.206,0,13.04,5.905,13.04,13.201c0,7.326-5.834,13.28-13.04,13.28c-7.174,0-13.036-5.954-13.036-13.28
C7.963-62.635,13.826-68.54,21-68.54z"/>
</g>
</g>
</svg>

After

Width:  |  Height:  |  Size: 3.9 KiB

115
factures/commun/style.css Normal file
View File

@ -0,0 +1,115 @@
html {
color: #222;
font-family: "Cantarell";
font-weight: 300;
line-height: 1.4;
}
body::before {
background: url(logo.svg) 0 50% no-repeat;
content: "afpy";
display: block;
font-size: 28pt;
padding: 0.5cm 0.5cm 0.5cm 1.5cm;
}
body::after {
background: url(logo.svg) 50% 50% / cover no-repeat;
bottom: -5cm;
content: '';
height: 20cm;
opacity: 0.05;
position: absolute;
right: -5cm;
width: 20cm;
}
address {
font-style: normal;
white-space: pre-line;
}
header {
display: table;
margin-bottom: 3em;
width: 100%;
}
#from, #to {
display: table-cell;
width: 50%;
}
#from {
font-size: 0.8em;
vertical-align: top;
}
#to {
vertical-align: bottom;
}
table {
border-collapse: collapse;
margin: 3em 0;
width: 100%;
}
thead {
font-size: 0.8em;
}
thead th {
padding: 0.7em;
}
th, td {
font-weight: inherit;
padding: 0.5em;
}
tbody tr {
border-top: 0.2mm solid #ddd;
}
tfoot * {
padding-top: 1.5em;
}
tfoot th {
text-align: right;
}
tfoot th::after {
content: ' :';
}
footer {
font-size: 0.8em;
}
dl {
margin: 0;
}
dt {
display: inline;
}
dt::after {
content: ' :';
}
dd {
display: inline;
margin: 0;
}
dd::after {
content: '\A';
white-space: pre;
}
p {
margin: 0.5em 0;
}