]> git.parisson.com Git - teleforma.git/commitdiff
Fix AE pdf receipt : https://trackers.pilotsystems.net/prebarreau/0657
authorYoan Le Clanche <yoanl@pilotsystems.net>
Mon, 15 May 2023 13:35:04 +0000 (15:35 +0200)
committerYoan Le Clanche <yoanl@pilotsystems.net>
Mon, 15 May 2023 13:35:04 +0000 (15:35 +0200)
teleforma/static/teleforma/css/teleforma_receipt_pdf.css
teleforma/static/teleforma/images/signature.png [new file with mode: 0644]
teleforma/templates/receipt/receipt_pdf.html
teleforma/views/crfpa.py

index 52d7d96115e1b54fc2f3f2644ea30816386895aa..a2992a478d6eb79bfa68584bb02722188cbd549f 100644 (file)
@@ -1,6 +1,6 @@
 @page {
   margin: 1cm;
-  margin-bottom: 2.5cm;
+  margin-bottom: 1cm;
   @frame footer {
     -pdf-frame-content: footer;
     bottom: 0cm;
@@ -63,7 +63,7 @@
 
 #content table tr th{
     padding: 5px;
-    font-size: 14px;
+    font-size: 12px;
     border: 1px solid #000;
 }
 
@@ -72,7 +72,7 @@
 }
 
 #content table tr th:first-child{
-    width: 60%;
+    width: 50%;
 }
 
 #content table tr td{
@@ -80,7 +80,7 @@
     border-left: 1px solid #000;
     border-right: 1px solid #000;
     line-height: 24px;
-    font-size: 14px;
+    font-size: 12px;
     font-weight: bold;
 }
 #content table tr td:first-child{
     font-size: 2em;
 }
 
+#signature {
+    margin-left: auto;
+    display: block;
+    width:200px;
+    margin-bottom:20px;
+}
 
 #footer{
     text-align: center;
diff --git a/teleforma/static/teleforma/images/signature.png b/teleforma/static/teleforma/images/signature.png
new file mode 100644 (file)
index 0000000..ea7991f
Binary files /dev/null and b/teleforma/static/teleforma/images/signature.png differ
index c35ffd1e335169399b93e60209b7ee597c5697c8..fc361fe34a3376be8ce84148cd054f91dccfd614 100644 (file)
@@ -68,7 +68,7 @@
         </div>
 
 
-        <table style="margin-top: 15pt; border-spacing : 0; border-collapse : collapse; table-layout: fixed">
+        <table style="margin-top: 15pt; border-spacing : 0; border-collapse : collapse; table-layout: fixed;">
           <thead>
             <tr style="border: 1px solid #000;">
               <th style="padding-top: 3pt; width: 300pt;">DESCRIPTION</th>
@@ -98,6 +98,8 @@
           </tbody>
         </table>
 
+        <img id="signature" src="https://{{ site.domain }}/static/teleforma/images/signature.png" alt="Signature">
+
         {% block footer %}
         <div id="footer" style="line-height: 15px; font-size: 10px; color: #000">
           <hr />
index f8c695f88c72c3edf69e653e44adb9ec4c50f633..e9568e530fbedb67e9a343dbc04931ae95774977 100644 (file)
@@ -747,7 +747,7 @@ class ReceiptPDFViewDownload(ReceiptPDFView):
         prefix = "crfpa_facture"
         filename = '_'.join([prefix, self.receipt_id, student.user.first_name, student.user.last_name])
         filename += '.pdf'
-        return filename.encode('utf-8')
+        return filename
 
     
 class CorrectorRegistrationPDFView(PDFTemplateResponseMixin, TemplateView):