Guest User

[Custom Invoice Theme] export to PDF is blank

a guest
Oct 21st, 2019
108
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 8.90 KB | None | 0 0
  1. <table style="margin:5px; padding:30px 30px 0px 30px;">
  2. <thead style="padding:5px">
  3. <tr>
  4. <td colspan="99" style="text-align:center;">
  5. <div style="font-weight:bold; font-size:20px;">TAX INVOICE</div>
  6. </td>
  7. </tr>
  8. <tr>
  9. <td colspan="99" style="text-align:center;">
  10. <div style="font-weight:bold; font-size:12px;">&nbsp;</div>
  11. </td>
  12. </tr>
  13. <tr>
  14. <td colspan="24" style="text-align:left;">
  15. <div>
  16. <div style="font-weight:bold; font-size:12px;">{{ business.name }} ( <span style="font-size:10px;">{% for field in business.custom_fields %}{% if field.label == "GSTIN" %}{{ field.label }} : {{ field.text }}{% endif %}{% endfor %}</span>) </div>
  17. <div style="font-weight:normal; font-size:12px;">{{ business.address | newline_to_br }}</div>
  18. </div>
  19. </td>
  20. <td colspan="75" style="text-align:left;">
  21. <table>
  22. <tr>
  23. <td colspan="24" style="text-align:left;">
  24. <div style="font-weight:bold; font-size:12px;">Invoice Number</div>
  25. </td>
  26. <td colspan="25" style="text-align:left;">
  27. {% for field in fields %}{% if field.label == "Invoice number" %} <div style="font-weight:bold;">{{ field.text }}</div> {% endif %}{% endfor %}
  28. </td>
  29. <td colspan="25" style="text-align:left;">
  30. <div style="font-weight:bold; font-size:12px;">Quote Number</div>
  31. </td>
  32. <td colspan="25" style="text-align:left;">
  33. {% for field in fields %}{% if field.label == "Quote number" %} <div>{{ field.text }}</div> {% endif %}{% endfor %}
  34. </td>
  35. </tr>
  36.  
  37. <tr>
  38. <td colspan="24" style="text-align:left;">
  39. <div style="font-weight:bold; font-size:12px;">Invoice Date</div>
  40. </td>
  41. <td colspan="25" style="text-align:left;">
  42. {% for field in fields %}{% if field.label == "Invoice date" %} <div>{{ field.text }}</div> {% endif %}{% endfor %}
  43. </td>
  44. <td colspan="25" style="text-align:left;">
  45. <div style="font-weight:bold; font-size:12px;">Invoice Due Date</div>
  46. </td>
  47. <td colspan="25" style="text-align:left;">
  48. {% for field in fields %}{% if field.label == "Due date" %} <div style="color:red;">{{ field.text }}</div> {% endif %}{% endfor %}
  49. </td>
  50. </tr>
  51.  
  52. <tr>
  53. <td colspan="24" style="text-align:left;">
  54. <div style="font-weight:bold; font-size:12px;">Place of Supply</div>
  55. </td>
  56. <td colspan="25" style="text-align:left;">
  57. {% for field in custom_fields %} {% if field.label == "Place Of Supply" %} <div style="font-weight: normal;font-size: 12px;">{{ field.text }}</div> {% endif %} {% endfor %}
  58. </td>
  59. <td colspan="25" style="text-align:left;">
  60. <div style="font-weight:bold; font-size:12px;">Service from</div>
  61. </td>
  62. <td colspan="25" style="text-align:left;">
  63. <div style="font-weight: normal;font-size: 12px;">State Name</div>
  64. </td>
  65. </tr>
  66. <tr>
  67. <td colspan="24" style="text-align:left;">
  68. <div style="font-weight: bold;">Project Category:</div>
  69. </td>
  70. <td colspan="25" style="text-align:left;">
  71. {% for field in custom_fields %} {% if field.label == "Project Category" %} <div style="font-weight: normal;font-size: 12px;">{{ field.text }}</div> {% endif %} {% endfor %}
  72. </td>
  73. <td colspan="25" style="text-align:left;">
  74. <div style="font-weight: bold;">Notes:</div>
  75. </td>
  76. <td colspan="25" style="text-align:left;">
  77. {% for field in custom_fields %} {% if field.label == "Notes" %} <div style="font-weight: normal;font-size: 12px;">{{ field.text }}</div> {% endif %} {% endfor %}
  78. </td>
  79. </tr>
  80. </table>
  81. </td>
  82. <tr>
  83. <tr><td><br></td></tr>
  84. <tr>
  85. <td colspan="99" style="text-align:left;">
  86. <div style="font-weight: bold;">Billing Address : {{ recipient.name }} (<span style="font-weight: bold;font-size: 10px;">{{ recipient.identifier }}</span>)</div>
  87. <div>{{recipient.address }}</div><br>
  88. <div style="font-weight: bold;">Shipping Address : {{ recipient.name }} (<span style="font-weight: bold;font-size: 10px;">{{ recipient.identifier }})</span></div>
  89. <div>{{recipient.address }}</div>
  90. </td>
  91. </tr>
  92. <tr><td><br></td></tr>
  93. <tr style="text-align:left;">
  94. <td colspan="99">
  95. <div style="font-size: 12px;font-weight: bold;">{{ description }}</div>
  96. <td>
  97. </tr>
  98.  
  99. </thead>
  100. </table>
  101. <table style="padding: 0px 30px 30px 30px;">
  102. <thead>
  103. <tr>
  104. {% for column in table.columns %}
  105. <td style="font-weight: bold; padding: 5px 10px; text-align: {{ column.align }}; border-left-width: 1px; border-bottom-width: 1px; border-top-width: 1px{% if forloop.last == true %}; border-right-width: 1px{% endif %}{% if column.nowrap %}; width: 80px{% endif %}">{{ column.label }}</td>
  106. {% endfor %}
  107. </tr>
  108. </thead>
  109. <tbody>
  110. {% for row in table.rows %}
  111. <tr>
  112. {% for cell in row.cells %}
  113. <td style="padding: 5px 10px; text-align: {{ table.columns[forloop.index0].align }}; border-left-width: 1px{% if forloop.last == true %}; border-right-width: 1px{% endif %}{% if table.columns[forloop.index0].nowrap %}; white-space: nowrap; width: 80px{% endif %}">{{ cell.text | newline_to_br }}</td>
  114. {% endfor %}
  115. </tr>
  116. {% endfor %}
  117. <tr>
  118. {% for column in table.columns %}
  119. <td style="border-bottom-width: 1px; border-left-width: 1px{% if forloop.last == true %}; border-right-width: 1px{% endif %}">&nbsp;</td>
  120. {% endfor %}
  121. </tr>
  122. {% for total in table.totals %}
  123. <tr>
  124. <td colspan="{{ table.columns | size | minus:1 }}" style="padding: 5px 10px; text-align: right{% if total.emphasis == true %}; font-weight: bold{% endif %}">{{ total.label }}</td>
  125. <td style="border-left-width: 1px; white-space: nowrap; border-right-width: 1px; border-bottom-width: 1px; padding: 5px 10px; text-align: right{% if total.emphasis == true %}; font-weight: bold{% endif %}">{{ total.text }}</td>
  126. </tr>
  127. {% endfor %}
  128.  
  129. {% for field in custom_fields %}
  130. <tr>
  131. <td colspan="99">
  132. <div style="font-weight: bold; padding-top: 20px">{{ field.label }}</div>
  133. <div>{{ field.text | newline_to_br }}</div>
  134. </td>
  135. </tr>
  136. {% endfor %}
  137. <tr>
  138. <td colspan="99">
  139. <div><b>Bank Details</b> : A/c Name : xxxxxxxxxxx Bank : xxxxxxxxxxxxx Current A/c No.: xxxxxxxxxxxx, IFSC Code : xxxxxxxxxxxx, Branch : xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx</div>
  140. <div><b>Terms</b> : All matters subject to xxxxxxxxxxxx jurisdiction. Interest at the rate of 18% per annum for delayed payments. Tax Invoice not valid without the seal.</div>
  141. </td>
  142. </tr>
  143.  
  144.  
  145. <tr>
  146. <td colspan="99">
  147. {% if emphasis.text != null and emphasis.positive %}
  148. <div style="text-align: center; margin-top: 40px"><span style="color: #006400; border-width: 5px; border-color: #006400; padding: 10px; font-size: 20px">{{ emphasis.text | upcase }}</span></div>
  149. {% endif %}
  150.  
  151. {% if emphasis.text != null and emphasis.negative %}
  152. <div style="text-align: center; margin-top: 40px"><span style="color: #FF0000; border-width: 5px; border-color: #FF0000; padding: 10px; font-size: 20px">{{ emphasis.text | upcase }}</span></div>
  153. {% endif %}
  154. </td>
  155. </tr>
  156. </tbody>
  157. </table>
Add Comment
Please, Sign In to add comment