-
Notifications
You must be signed in to change notification settings - Fork 13
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Change BVR to QR bills #41
base: master
Are you sure you want to change the base?
Changes from all commits
02bf9a2
827c4f1
43f4103
c169cdb
4f5d25c
e20b043
File filter
Filter by extension
Conversations
Jump to
Diff view
Diff view
There are no files selected for viewing
Large diffs are not rendered by default.
Large diffs are not rendered by default.
Large diffs are not rendered by default.
Large diffs are not rendered by default.
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -4,16 +4,36 @@ | |
{% block bonus_css_pdf %} | ||
@page { | ||
size: a4 portrait; | ||
margin: 1cm; | ||
margin-bottom: 2cm; | ||
margin-top: 5cm; | ||
@frame { | ||
margin-left: 1cm; | ||
margin-right: 1cm; | ||
margin-bottom: 2cm; | ||
margin-top: 5cm; | ||
} | ||
|
||
@frame footer { | ||
-pdf-frame-content: footerContent; | ||
bottom: 0cm; | ||
@frame logoFrame { | ||
-pdf-frame-content: logoFrameContent; | ||
top: 1.0cm; | ||
right: 1.2cm; | ||
width: 35%; | ||
} | ||
|
||
@frame headerFrame { | ||
-pdf-frame-content: headerFrameContent; | ||
top: 1.1cm; | ||
left: 1.2cm; | ||
width: 50%; | ||
} | ||
|
||
} | ||
|
||
@page qr { | ||
size: a4 portrait; | ||
@frame { | ||
margin-left: 1cm; | ||
margin-right: 1cm; | ||
height: 1cm; | ||
margin-bottom: 107.5mm; | ||
margin-top: 5cm; | ||
} | ||
|
||
@frame logoFrame { | ||
|
@@ -29,6 +49,23 @@ | |
left: 1.2cm; | ||
width: 50%; | ||
} | ||
|
||
@frame qr { | ||
-pdf-frame-content: qr; | ||
bottom: 0cm; | ||
left: 0cm; | ||
width: 100%; | ||
height: 105.5mm; | ||
} | ||
|
||
@frame qr_comments { | ||
-pdf-frame-content: qr_comments; | ||
margin-left: 1cm; | ||
margin-right: 1cm; | ||
margin-bottom: 115.5mm; | ||
margin-top: 5cm; | ||
} | ||
|
||
} | ||
|
||
.maintable .tr-a { | ||
|
@@ -69,6 +106,16 @@ | |
body { | ||
font-size: 12px; | ||
} | ||
|
||
#qr img { | ||
zoom: 150%; | ||
} | ||
|
||
.pay_title | ||
{ | ||
-pdf-keep-with-next: true; | ||
font-size: 120%; | ||
} | ||
{% endblock %} | ||
|
||
{% block content %} | ||
|
@@ -83,68 +130,80 @@ | |
</tr> | ||
<tr> | ||
<td><b>G</b>énérale des</td> | ||
<td>Fax :</td> | ||
<td>+41 21 693 2097</td> | ||
<td>Email :</td> | ||
<td>contact@agepoly.ch</td> | ||
</tr> | ||
<tr> | ||
<td><b>E</b>tudiants de l’école</td> | ||
<td>Email :</td> | ||
<td>agepoly@epfl.ch</td> | ||
<td>Web :</td> | ||
<td>agepoly.ch</td> | ||
</tr> | ||
<tr> | ||
<td><b>Poly</b>technique Fédérale</td> | ||
<td>Web :</td> | ||
<td>http://agepoly.epfl.ch</td> | ||
<td>IBAN :</td> | ||
<td>CH19 0483 5028 7897 7100 0</td> | ||
</tr> | ||
<tr> | ||
<td>de Lausanne</td> | ||
<td>Banque :</td> | ||
<td>Credit Suisse - Zürich</td> | ||
<td>TVA :</td> | ||
<td>CHE-113.397.612</td> | ||
</tr> | ||
<tr> | ||
<td>CASE POSTALE 16</td> | ||
<td>Compte :</td> | ||
<td>0425-287897-71</td> | ||
<td></td> | ||
<td>Addr : </td> | ||
<td>Case Postale 16</td> | ||
</tr> | ||
<tr> | ||
<td>CH - 1015 LAUSANNE EPFL</td> | ||
<td>TVA :</td> | ||
<td>CHE-113.397.612</td> | ||
<td></td> | ||
<td></td> | ||
<td>CH-1015 LAUSANNE EPFL</td> | ||
</tr> | ||
</table> | ||
</div> | ||
|
||
<div id="logoFrameContent"> | ||
<img src="{{MEDIA_ROOT}}img/logo_factures.png" style="text-align: right;" width="260"> | ||
<div style="font-size: 170%; text-align:right; white-space: nowrap; overflow: hidden; text-overflow: clip; "> | ||
<b>{% if invoice.costcenter.unit.pk != 1 %}{{ invoice.costcenter.unit }} {% endif %}</b> | ||
</div> | ||
</div> | ||
|
||
<div style="margin-left: 12cm; font-size: 140%;"> | ||
|
||
{% if invoice.add_to %} | ||
<small>{% trans "À l'attention de" %}</small><br /> | ||
{% endif %} | ||
{{invoice.address|linebreaksbr}} | ||
|
||
{% if invoice.date_and_place %} | ||
{% if invoice.address %}<br /><br />{% endif %} | ||
|
||
{{invoice.date_and_place}} | ||
{% endif %} | ||
</div> | ||
<table width="100%"> | ||
<tr> | ||
<td width="12cm"> | ||
</td> | ||
<td style="vertical-align: top;"> | ||
<div style="font-size: 130%;""> | ||
{% if invoice.add_to %} | ||
<small>{% trans "À l'attention de" %}</small><br /> | ||
{% endif %} | ||
|
||
{{ invoice.client_name }} | ||
<br /> | ||
{{invoice.multiline_address|linebreaksbr}} | ||
<br /> | ||
<br /> | ||
{% if invoice.date_and_place %} | ||
{{invoice.date_and_place}} | ||
{% endif %} | ||
</div> | ||
</td> | ||
</tr> | ||
</table> | ||
|
||
<h3 style="text-align: center; font-size: 20px;">{% trans "Facture" %}<br />{% trans "N°" %} <b>{{invoice.get_reference}}</b></h3> | ||
<h3 style="text-align: center; font-size: 18px;">{% trans "Facture" %} {% trans "N°" %}<b>{{invoice.get_reference}}</b></h3> | ||
|
||
<div style="text-align: left;"> | ||
{{invoice.preface|linebreaksbr}} | ||
</div> | ||
|
||
<table class="liste-c maintable"> | ||
<tr class="tr-a noright"> | ||
<td width="51%" class="noright"> {% trans "Description" %}</td> | ||
<td width="50%" class="noright"> {% trans "Description" %}</td> | ||
<td width="15%">{% trans "Prix unitaire" %}</td> | ||
<td width="8%">{% trans "% TVA" %}</td> | ||
<td width="15%">{% trans "TVA" %}</td> | ||
<td width="15%">{% trans "Total" %}</td> | ||
<td width="16%">{% trans "Total" %}</td> | ||
</tr> | ||
{% for line in invoice.get_lines %} | ||
<tr> | ||
|
@@ -174,73 +233,59 @@ <h3 style="text-align: center; font-size: 20px;">{% trans "Facture" %}<br />{% t | |
|
||
{% if invoice.ending %} | ||
{{invoice.ending}} | ||
<br /><br /> | ||
<br /> | ||
{% endif %} | ||
|
||
{% if invoice.display_bvr %} | ||
{% if invoice.display_qr %} | ||
<p style="-pdf-keep-with-next: true;"> | ||
{% if invoice.delay > 0 %} | ||
{% blocktrans with d=invoice.delay %} | ||
Nous vous remercions de bien vouloir payer ce montant à {{d}} jours sur le compte de l'AGEPoly au moyen de bulletin de versement annexé. | ||
{% endblocktrans %} | ||
{% blocktrans with d=invoice.delay %}Nous vous remercions de bien vouloir payer ce montant à {{d}} jours avec les informations de paiement à la page suivante.{% endblocktrans %} | ||
{% else %} | ||
{% trans "Nous vous remercions de bien vouloir payer ce montant sur le compte de l'AGEPoly au moyen de bulletin de versement annexé." %} | ||
{% trans "Nous vous remercions de bien vouloir payer ce montant avec les informations de paiement à la page suivante." %} | ||
{% endif %} | ||
<br /><br /> | ||
</p> | ||
<br /> | ||
|
||
{% endif %} | ||
|
||
{% if invoice.display_account %} | ||
{% if invoice.display_bvr %} | ||
{% trans "Vous pouvez aussi effectuer le paiement sur le compte suivant :" %}<br /> | ||
{% else %} | ||
|
||
{% if not invoice.display_qr %} | ||
<p style="-pdf-keep-with-next: true;"> | ||
{% if invoice.delay > 0 %} | ||
{% blocktrans with d=invoice.delay %} | ||
Nous vous remercions de bien vouloir payer ce montant à {{d}} jours sur le compte suivant : | ||
{% endblocktrans %} | ||
{% blocktrans with d=invoice.delay %}Nous vous remercions de bien vouloir payer ce montant à {{d}} jours sur le compte suivant :{% endblocktrans %} | ||
{% else %} | ||
{% trans "Nous vous remercions de bien vouloir payer ce montant sur le compte suivant :" %} | ||
{% endif %} | ||
{% endif %} | ||
</p> | ||
|
||
<br /> | ||
<br style="-pdf-keep-with-next: true;"/> | ||
|
||
<table style="margin-left: 5.5cm;" width="50%"> | ||
<tr> | ||
<td width="50%">{% trans "Banque" %} :</td> | ||
<td>Credit Suisse - Zürich</td> | ||
</tr> | ||
<tr> | ||
<td>CCP :</td> | ||
<td>80 500 4</td> | ||
</tr> | ||
<tr> | ||
<td>{% trans "Compte" %} :</td> | ||
<td>No. 0425-287897-71</td> | ||
</tr> | ||
<table width="100%" style="-pdf-keep-with-next: false;"> | ||
<tr> | ||
<td>Clearing :</td> | ||
<td>4835</td> | ||
<td width="30%"></td> | ||
<td width="30%">{% trans "Banque" %} :</td> | ||
<td width="40%">Credit Suisse - Zürich</td> | ||
</tr> | ||
<tr> | ||
<td></td> | ||
<td>IBAN :</td> | ||
<td>CH19 0483 5028 7897 7100 0</td> | ||
</tr> | ||
<tr> | ||
<td></td> | ||
<td>BIC/SWIFT :</td> | ||
<td>CRESCHZZ80A</td> | ||
</tr> | ||
<tr> | ||
<td></td> | ||
<td>{% trans "Mention/Référence" %} :</td> | ||
<td><b>{{invoice.get_reference}}</b></td> | ||
<td>{{invoice.get_qr_ref}}</td> | ||
</tr> | ||
|
||
</table> | ||
|
||
<br /><br /> | ||
|
||
{% endif %} | ||
|
||
{% if invoice.greetings %} | ||
{{invoice.greetings|linebreaksbr}} | ||
<br /><br /> | ||
|
@@ -262,35 +307,72 @@ <h3 style="text-align: center; font-size: 20px;">{% trans "Facture" %}<br />{% t | |
{% trans "Annexe(s): ment." %} | ||
{% endif %} | ||
|
||
{% if invoice.display_qr %} | ||
<pdf:nexttemplate name="qr" /> | ||
<pdf:nextpage> | ||
<div id=qr_comments> | ||
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. guimmets |
||
|
||
<div style="margin-left: 12cm; font-size: 140%;"> | ||
<p>{% trans "Facture" %} {% trans "N°" %} <b>{{invoice.get_reference}}</b></p> | ||
</div> | ||
|
||
<br /><br /><br /> | ||
|
||
<center> | ||
<p class="pay_title"> | ||
<b>{% trans "Virement Bancaire" %}</b> | ||
</p> | ||
|
||
<br style="-pdf-keep-with-next: true;"/> | ||
|
||
<div width="130mm" style="margin-left: 45mm;"> | ||
<table width="100%" style="text-align: left; -pdf-keep-with-next: false;"> | ||
<tr> | ||
<td width="20%">{% trans "Banque" %} :</td> | ||
<td width="80%">Credit Suisse - Zürich</td> | ||
</tr> | ||
<tr> | ||
<td>IBAN :</td> | ||
<td>CH19 0483 5028 7897 7100 0</td> | ||
</tr> | ||
<tr> | ||
<td>BIC/SWIFT :</td> | ||
<td>CRESCHZZ80A</td> | ||
</tr> | ||
<tr> | ||
<td>{% trans "Mention/Référence" %} :</td> | ||
<td>{{invoice.get_qr_ref}}</td> | ||
</tr> | ||
<tr> | ||
<td>{% trans "Adresse" %} :</td> | ||
<td>Case Postale 16</td> | ||
</tr> | ||
<tr> | ||
<td></td> | ||
<td>CH-1015 LAUSANNE EPFL</td> | ||
</tr> | ||
</table> | ||
</div> | ||
|
||
<br /><br /><br /><br /><br /><br /><br /><br /><br /> | ||
|
||
<p class="pay_title"> | ||
<b>{% trans "QR Facture" %}</b> | ||
</p> | ||
</center> | ||
</div> | ||
|
||
{% if invoice.display_bvr %} | ||
<pdf:nextpage/> | ||
|
||
<br /> | ||
<br /> | ||
<br /> | ||
<br /> | ||
<br /> | ||
<br /> | ||
<br /> | ||
<br /> | ||
<br /> | ||
<br /> | ||
<br /> | ||
<br /> | ||
<br /> | ||
|
||
<center> | ||
<img src="{{MEDIA_ROOT}}cache/bvr/{{invoice.pk}}.png" width="212mm"> | ||
<br /> | ||
|
||
<small>{% trans "Attention: Ce BVR ne peut pas être utilisé pour un paiement aux guichets de la poste ou d'une banque" %}</small> | ||
</center> | ||
<p style="color: white">This is a fake placeholder</p> | ||
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. ? |
||
|
||
<div id="qr"> | ||
<img src="{{MEDIA_ROOT}}cache/bvr/qr-{{invoice.pk}}.png"> | ||
</div> | ||
|
||
{% endif %} | ||
{% endlanguage %} | ||
{% endblock %} | ||
|
||
{% block footer %} | ||
<div id="footerContent">{% trans "Page" %} <pdf:pagenumber/> - {% trans "Généré le" %} {{cdate|date:"d/m/Y"}} <small><small>[{{user.pk}}]</small></small></div> | ||
{% endblock %} |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
c'est pas très consistant avec le reste (aka met le { sur la ligne d'en dessus)