Advertisement
Guest User

Untitled

a guest
Jan 27th, 2014
235
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 7.11 KB | None | 0 0
  1. <!--
  2. Sample Print Format for ERPNext
  3. Please use at your own discretion
  4. For suggestions and contributions:
  5. https://github.com/webnotes/erpnext-print-templates
  6.  
  7. Freely usable under MIT license
  8. -->
  9.  
  10. <!-- Style Settings -->
  11. <style>
  12. /*
  13. common style for whole page
  14. This should include:
  15. + page size related settings
  16. + font family settings
  17. + line spacing settings
  18. */
  19. @media screen {
  20. body {
  21. width: 8.3in;
  22. }
  23. }
  24.  
  25. html, body, div, span, td {
  26. font-family: "Arial", sans-serif;
  27. font-size: 10px;
  28. }
  29.  
  30. body {
  31. padding: 10px;
  32. margin: auto;
  33. font-size: 10px;
  34. line-height: 150%;
  35. }
  36.  
  37. .common {
  38. font-family: "Arial", sans-serif !important;
  39. font-size: 10px;
  40. padding: 10px 0px;
  41. }
  42.  
  43. table {
  44. border-collapse: collapse;
  45. width: 100%;
  46. vertical-align: top;
  47. }
  48.  
  49. table td {
  50. padding: 2px 0px;
  51. }
  52.  
  53. table h1, h2, h3, h4, h5, h6 {
  54. padding: 0px;
  55. margin: 0px;
  56. }
  57.  
  58. table.header-table td {
  59. vertical-align: top;
  60. }
  61.  
  62. table.header-table thead {
  63. border-bottom: 1px solid black;
  64. }
  65.  
  66. table.header-table h3 {
  67. color: gray;
  68. }
  69.  
  70. table.header-table thead td {
  71. padding: 5px 0px;
  72. }
  73.  
  74. div.page-body table td:nth-child(6),
  75. div.page-body table td:nth-child(7) {
  76. text-align: right;
  77. }
  78.  
  79. table.footer-table td {
  80. vertical-align: top;
  81. }
  82.  
  83. table.footer-table td table td:nth-child(2),
  84. table.footer-table td table td:nth-child(3) {
  85. text-align: right;
  86. }
  87. </style>
  88.  
  89.  
  90. <!-- Javascript -->
  91. <script>
  92. si_std = {
  93. print_item_table: function() {
  94. var items = getchildren('Sales Invoice Item', doc.name, 'entries');
  95. var rows = '<table width=100% class="table table-bordered">\n';
  96.  
  97. rows += '<tr class="active">\
  98. <th>Sr</th>\
  99. <th>Item</th>\
  100. <th>Description</th>\
  101. <th>Quantity</th>\
  102. <th>Basic Rate</th>\
  103. <th>Amount</th>';
  104.  
  105. for(var i=0; i<items.length; i++) {
  106. rows +=
  107. '<tr>' +
  108. '<td>' + (i + 1) + '</td>\n' +
  109. '<td>' + items[i].item_name + '</td>\n' +
  110. '<td>' + items[i].description + '</td>\n' +
  111. '<td style="text-align: right;">' + format_number(items[i].qty, null, 2) + '</td>\n' +
  112. '<td style="text-align: right;">' + format_currency(items[i].basic_rate) + '</td>\n' +
  113. '<td style="text-align: right;">' + format_currency(items[i].amount) + '</td>\n' +
  114. '</tr>';
  115. }
  116. return rows + '</table>\n';
  117. },
  118.  
  119.  
  120. print_other_charges: function(parent) {
  121. var oc = getchildren('Sales Taxes and Charges', doc.name, 'other_charges');
  122. var rows = '<table width=100%>\n';
  123. for(var i=0; i<oc.length; i++) {
  124. if(!oc[i].included_in_print_rate) {
  125. rows +=
  126. '<tr>\n' +
  127. '\t<td>' + oc[i].description + '</td>\n' +
  128. '\t<td>AR$</td>\n' +
  129. '\t<td width=39%, align="right">' + format_number(oc[i].tax_amount,null,2) + '</td>\n' +
  130. '</tr>\n';
  131. }
  132. }
  133. return rows + '</table>\n';
  134. }
  135. };
  136. </script>
  137.  
  138.  
  139. <!-- Page Layout Settings -->
  140. <div class='common page-header'>
  141. <!--
  142. Page Header will contain
  143. + table 1
  144. + table 1a
  145. - Name
  146. - Address
  147. - Contact
  148. - Mobile No
  149. + table 1b
  150. - Voucher Date
  151. - Due Date
  152. -->
  153. <table class='header-table' cellspacing=0>
  154. <thead>
  155.  
  156. <!-- <tr><td><script>cur_frm.docname</script></td></tr> -->
  157. </thead>
  158. <tbody>
  159. <tr><td height="100"></td>
  160. <tr>
  161. <td width=70%><table width=100% cellspacing=0><tbody>
  162. <tr>
  163. <td width=22%><b>R.Social</b></td>
  164. <td><script>doc.customer_name</script></td>
  165. </tr>
  166. <tr>
  167. <td><b>CUIT</b></td>
  168. <td><script>doc.customer_cuit</script></td>
  169. </tr>
  170. <tr>
  171. <td><b>IVA</b></td>
  172. <td><script>doc.customer_cond</script></td>
  173. </tr>
  174. <tr>
  175. <td><b>Dirección</b></td>
  176. <td><script>replace_newlines(doc.address_display)</script></td>
  177. </tr>
  178. <tr>
  179. <td><b>Contacto</b></td>
  180. <td><script>doc.contact_display</script></td>
  181. </tr>
  182. </tbody></table></td>
  183. <td><table width=100% cellspacing=0><tbody>
  184. <tr>
  185. <td><b>DOC</b></td>
  186. <td><script>cur_frm.docname</script></td>
  187. <tr>
  188. <tr>
  189. <td><b>Factura</b></td>
  190. <td><script>doc.factura_nro</script></td>
  191. <tr>
  192. <tr>
  193. <td width=50%><b>Fecha</b></td>
  194. <td><script>date.str_to_user(doc.posting_date)</script></td>
  195. <tr>
  196. <tr>
  197. <td><script>
  198. (doc.convert_into_recurring_invoice && doc.recurring_id)
  199. ?"<b>Invoice Period</b>"
  200. :"";
  201. </script></td>
  202. <td><script>
  203. (doc.convert_into_recurring_invoice && doc.recurring_id)
  204. ?(date.str_to_user(doc.invoice_period_from_date) +
  205. ' to ' + date.str_to_user(doc.invoice_period_to_date))
  206. :"";
  207. </script></td>
  208. <tr>
  209. <tr>
  210. <td><b>Vencimiento</b></td>
  211. <td><script>date.str_to_user(doc.due_date)</script></td>
  212. <tr>
  213. <tr>
  214. <td><b>Forma de Pago</b></td>
  215. <td><script>doc.mode_of_payment</script></td>
  216. <tr>
  217. </tbody></table></td>
  218. </tr>
  219. </tbody>
  220. <tfoot>
  221.  
  222. </tfoot>
  223. </table>
  224. </div>
  225. <div class='common page-body'>
  226. <!--
  227. Page Body will contain
  228. + table 2
  229. - Sales Invoice Data
  230. -->
  231. <script>si_std.print_item_table()</script>
  232. </div>
  233. <div class='common page-footer'>
  234. <!--
  235. Page Footer will contain
  236. + table 3
  237. - Terms and Conditions
  238. - Total Rounded Amount Calculation
  239. - Total Rounded Amount in Words
  240. -->
  241. <table class='footer-table' width=100% cellspacing=0>
  242. <thead>
  243.  
  244. </thead>
  245. <tbody>
  246. <tr>
  247. <td width=60% style='padding-right: 10px;'>
  248. <!-- <b>Terms, Conditions &amp; Other Information:</b><br />
  249. <script>doc.terms</script> -->
  250. </td>
  251. <td>
  252. <table cellspacing=0 width=100%><tbody>
  253. <tr>
  254. <td>Sub Total</td>
  255. <td>AR$</td>
  256. <td width=38%, align="right"><script>
  257. format_number(doc.net_total,null,2)
  258. </script></td>
  259. </tr>
  260. <tr><td colspan=3><script>si_std.print_other_charges()</script></td></tr>
  261. <tr>
  262. <td><b>Total</b></td>
  263. <td><b>AR$</b></td>
  264. <td align="right"><b><script>
  265. format_number(doc.grand_total,null,2)
  266. </script></b></td>
  267. </tr>
  268. <!-- <tr style='font-weight: bold'>
  269. <td>Rounded Total</td>
  270. <td align="left">AR$</td>
  271. <td align="right"><script>
  272. format_number(doc.rounded_total,null,2)
  273. </script></td>
  274. </tr> -->
  275. </tbody></table>
  276. <!-- <br /><b>In Words</b><br />
  277. <i><script>doc.in_words_export</script></i> -->
  278. </td>
  279. </tr>
  280. <tr>
  281. <td>Emitir cheque a nombre de AGEKA SRL NO A LA ORDEN</td>
  282. </tr>
  283. </tbody>
  284. <tfoot>
  285.  
  286. </tfoot>
  287. </table>
  288. </div>
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement