invoice_pdf.html 3.7 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136
  1. {% load static %}
  2. <html>
  3. <head>
  4. <title>Facture N°{{ invoice.number }}</title>
  5. <style>
  6. @page {
  7. size: a4 portrait;
  8. @frame header_frame {
  9. -pdf-frame-content: header_content;
  10. left: 50pt; width: 512pt; top: 50pt; height: 70pt;
  11. }
  12. @frame content_frame {
  13. left: 50pt; width: 512pt; top: 120pt; height: 632pt;
  14. }
  15. @frame footer_frame {
  16. -pdf-frame-content: footer_content;
  17. left: 50pt; width: 512pt; top: 772pt; height: 30pt;
  18. }
  19. }
  20. body {
  21. font-size: 9pt;
  22. }
  23. #coordonnees_isp {
  24. font-size:9pt;
  25. }
  26. #coordonnees_client {
  27. vertical-align: top;
  28. }
  29. table#details {
  30. width:100%;
  31. }
  32. th.cell {border:0px;}
  33. .cell.result {border:0px; font-weight: bold}
  34. .cell { padding:2pt; border:1px solid #DDD; }
  35. .cell.label { width:400pt;}
  36. .cell.quantity {width:50pt;}
  37. .cell.amount {width:50pt;}
  38. .cell.total {width:50pt;}
  39. .period {color:#888;}
  40. #paiements {
  41. background-color:#EEE;
  42. padding:5pt;
  43. font-size:80%;
  44. }
  45. #page_number {
  46. float:right;
  47. }
  48. </style>
  49. </head>
  50. <body>
  51. <div id="header_content">
  52. <table widht="100%">
  53. <tr>
  54. <td><img id="logo" src="{{ branding.logoURL }}" height="70" /></td>
  55. <td><h1>Facture N°{{ invoice.number }}</h1>
  56. Le {{ invoice.date }}</td>
  57. </tr>
  58. </table>
  59. </div>
  60. <div id="footer_content">
  61. <hr />
  62. <table widht="100%">
  63. <tr>
  64. <td width="50"><img id="logo" src="{{ branding.logoURL }}" height="20" /></td>
  65. <td>{{ branding.shortname|upper }}, association loi de 1901 à but non lucratif - SIRET : 539 453 191 00014</td>
  66. <td width="20"><pdf:pagenumber>
  67. /<pdf:pagecount>
  68. </td>
  69. </tr>
  70. </table>
  71. </div>
  72. <table>
  73. <tr>
  74. <td id="coordonnees_isp">
  75. {% with address=branding.registeredoffice %}
  76. <p>
  77. Association {{ branding.shortname|upper }}<br />
  78. {{ address.extended_address }}<br />
  79. {{ address.street_address }}<br />
  80. {{ address.postal_code }}</p>
  81. <p>{{ branding.email }}<br/>
  82. <a href="{{ branding.website }}">{{ branding.website }}</a></p>
  83. {% endwith %}
  84. </td>
  85. <td id="coordonnees_client">
  86. <strong>Facturé à :</strong><br/>
  87. {% with member=invoice.member %}
  88. {{ member.last_name }} {{ member.first_name }}<br />
  89. {% if member.organization_name != "" %}{{ member.organization_name }}<br />{% endif %}
  90. {{ member.address }}<br />
  91. {{ member.postal_code }} {{ member.city}}
  92. {% endwith %}
  93. </td>
  94. </tr>
  95. </table>
  96. <hr />
  97. Facture N°{{ invoice.number }}
  98. <table id="details" repeat="1">
  99. <thead>
  100. <tr>
  101. <th class="cell label"></th>
  102. <th class="cell quantity">Quantité</th>
  103. <th class="cell amount">PU</th>
  104. <th class="cell total">Total</th>
  105. </tr>
  106. </thead>
  107. <tbody>
  108. {% for detail in invoice.details.all %}
  109. <tr>
  110. <td class="cell label">{{ detail.label }}
  111. {% if detail.period_from and detail.period_to %}<br/><span class="period">Pour la période du {{ detail.period_from }} au {{ detail.period_to }}{% endif %}</span></td>
  112. <td class="cell quantity">{{ detail.quantity }}</td>
  113. <td class="cell amount">{{ detail.amount }}€</td>
  114. <td class="cell total">{{ detail.total }}€</td>
  115. </tr>
  116. {% endfor %}
  117. <tr>
  118. <td class="cell result"></td>
  119. <td class="cell result total_ttc" colspan="2">Total TTC</td>
  120. <td class="cell result invoice_amount">{{ invoice.amount }}€</td>
  121. </tr>
  122. </tbody>
  123. </table>
  124. <div id="paiements">
  125. {% include "billing/payment_howto.html" %}
  126. </div>
  127. </body>
  128. </html>