Guest User

Untitled

a guest
Sep 30th, 2014
553
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 5.94 KB | None | 0 0
  1. {%- macro add_header(page_num, max_pages, doc, letter_head, no_letterhead) -%}
  2. {% if letter_head and not no_letterhead %}
  3. <div class="letter-head">{{ letter_head }}</div>
  4. {% endif %}
  5. {%- if doc.meta.is_submittable and doc.docstatus==0-%}
  6. <div class="alert alert-info text-center">
  7. <h4 style="margin: 0px;">{{ _("DRAFT") }}</h4></div>
  8. {%- endif -%}
  9. {%- if doc.meta.is_submittable and doc.docstatus==2-%}
  10. <div class="alert alert-danger text-center">
  11. <h4 style="margin: 0px;">{{ _("CANCELLED") }}</h4></div>
  12. {%- endif -%}
  13. {% if max_pages > 1 %}
  14. <p class="text-right">{{ _("Page #{0} of {1}").format(page_num, max_pages) }}</p>
  15. {% endif %}
  16. {%- endmacro -%}
  17.  
  18. <style>
  19. .table-hover>tbody>tr:hover>td, .table-hover>tbody>tr:hover>th {
  20. background-color: #B7CCF2;
  21. color:#000000;
  22. font-size:16px;
  23. }
  24. .print-format table, .print-format tr,
  25. .print-format td, .print-format div, .print-format p {
  26. font-family: sans-serif;
  27. line-height: 90%;
  28. vertical-align: middle;
  29. }
  30. @media screen {
  31. .print-format {
  32. width: 210mm;
  33. padding: 10mm;
  34. min-height: 297mm;
  35. footer {page-break-after: always;}
  36. }
  37. }
  38. </style>
  39.  
  40. <small>
  41. {{ add_header(0,1,doc,letter_head, no_letterhead) }}
  42. <table class="table table-condensed table-bordered">
  43. <tr>
  44. <td colspan="2">
  45. <b style="font-size:16px;">{{ doc.select_print_heading or (doc.print_heading if doc.print_heading != None
  46. else _(doc.doctype)) }}</b>
  47. </td>
  48. <td style="width:34%">
  49. <b style="font-size:16px; text-align:left; vertical-align:middle;">{{ _("#") }}{{ doc.name }}</b><br>
  50. </td>
  51. </tr>
  52. </table>
  53.  
  54. <table class = "table table-condensed table-bordered">
  55. <tr>
  56. <td style="width: 33%;">
  57. <b>{{ _("To") }}:</b> {{ doc.customer_name }}<br>
  58. <b>{{ _("Address") }}:</b> {{ doc.address_display }}
  59. </td>
  60. <td style="width: 33%;">
  61. <b>{{ _("Ship To") }}:</b> {{ doc.shipping_address_title }}<br>
  62. <b>{{ _("Address") }}:</b> {{ doc.shipping_address }}
  63. </td>
  64. <td style="width: 34%;">
  65. <b>{{ _("Date") }}:</b> {{ doc.get_formatted("transaction_date") }}<br>
  66. <b>{{ _("PO #") }}:</b> {{ doc.po_no }} <br>
  67. <b>{{ _("PO Date") }}:</b> {{ doc.get_formatted("po_date") }}
  68. </td>
  69. </tr>
  70. </table>
  71.  
  72. <table class="table table-condensed table-hover table-bordered">
  73. <tr>
  74. <th>Sr</th>
  75. <th>Description</th>
  76. <th class="text-right">Qty</th>
  77. <th class="text-right">Rate</th>
  78. <th class="text-right">Amount</th>
  79. </tr>
  80. {%- for row in doc.sales_order_details -%}
  81. <tr>
  82. <td style="width: 3%;">{{ row.idx }}</td>
  83. <td style="width: 57%;">{{ row.description }} {% if row.discount_percentage %} <br>
  84. {{ _("Discount") }}: {{ row.discount_percentage }}% on {{ row.get_formatted("price_list_rate", doc) }}
  85. {%- endif -%}
  86. </td>
  87. <td style="width: 10%; text-align: right;">{{ row.qty }} {{ row.uom or row.stock_uom }}</td>
  88. <td style="width: 15%; text-align: right;">{{
  89. row.get_formatted("rate", doc) }}</td>
  90. <td style="width: 15%; text-align: right;">{{
  91. row.get_formatted("amount", doc) }}</td>
  92. </tr>
  93. {%- endfor -%}
  94. </tbody>
  95. </table>
  96. <table class="table table-condensed table-bordered">
  97. <tr>
  98. <td width="50%">
  99. <p>{% if doc.terms %} <b>{{ _("Auxiliary Information") }}: </b>{{ doc.terms or "" }}
  100. {%- endif -%}
  101. </p>
  102. <p style="font-size:12px">{% if doc.in_words_export %}
  103. <b>{{ _("Total Amount (In Words)") }}: </b><br>
  104. {{ doc.in_words_export }}
  105. {%- endif -%}
  106. </p><br><br>
  107. <table class="table table-condensed">
  108. <tr>
  109. <td height="100px"; valign="top">
  110. <b>{{ _("Received By:") }}</b>
  111. </td>
  112. </tr>
  113. <tr>
  114. <td>
  115. <b>{{ _("Customer Sign") }}</b>
  116. </td>
  117. </tr>
  118. </table>
  119.  
  120. </td>
  121. <td>
  122. <table class="table table-condensed">
  123. <tr>
  124. <td class="text-right" style="width: 30%">
  125. {{ _("Net Total") }}
  126. </td>
  127. <td class="text-right">
  128. {{ doc.get_formatted("net_total_export") }}
  129. </td>
  130. </tr>
  131. {%- for row in doc.other_charges -%}
  132. {%- if not row.included_in_print_rate -%}
  133. {%- if row.tax_amount -%}
  134. <tr height:100%>
  135. <td class="text-right" style="width: 70%">
  136. {{ row.description }}
  137. </td>
  138. <td class="text-right">
  139. {{ row.get_formatted("tax_amount", doc) }}
  140. </td>
  141. </tr>
  142. {%- endif -%}
  143. {%- endif -%}
  144. {%- endfor -%}
  145. {%- if doc.discount_amount -%}
  146. <tr>
  147. <td class="text-right" style="width: 70%">
  148. {{ _("Discount") }}
  149. </td>
  150. <td class="text-right">
  151. {{ doc.get_formatted("discount_amount") }}
  152. </td>
  153. </tr>
  154. {%- endif -%}
  155. <tr>
  156. <td class="text-right" style="width: 70%">
  157. <big><b>{{ _("Grand Total") }}</b></big>
  158. </td>
  159. <td class="text-right">
  160. <big><b>{{ doc.get_formatted("grand_total_export") }}</b></big>
  161. </td>
  162. </tr>
  163. </td>
  164.  
  165. </table>
  166.  
  167. </td>
  168. </tr>
  169. </table>
  170. {% if doc.get("other_charges", filters={"included_in_print_rate": 1}) %}
  171. <hr>
  172. <p><b>Taxes Included:</b></p>
  173. <table class="table table-condensed no-border">
  174. <tbody>
  175. {%- for row in doc.other_charges -%}
  176. {%- if row.included_in_print_rate -%}
  177. <tr>
  178. <td class="text-right" style="width: 70%">
  179.  
  180. {{ row.description }}
  181. </td>
  182. <td class="text-right">
  183. {{ row.get_formatted("tax_amount", doc) }}
  184. </td>
  185. <tr>
  186. {%- endif -%}
  187. {%- endfor -%}
  188. </tbody>
  189. </table>
  190. {%- endif -%}
  191. <hr>
  192. </small>
Advertisement
Add Comment
Please, Sign In to add comment