Advertisement
Guest User

ERPNEXT PO Format

a guest
Feb 12th, 2015
264
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 9.77 KB | None | 0 0
  1.  
  2. <style>
  3. /*
  4. common style for whole page
  5. This should include:
  6. + page size related settings
  7. + font family settings
  8. + line spacing settings
  9. */
  10. @media screen {
  11. body {
  12. width: 8.3in;
  13. }
  14. }
  15.  
  16. html, body, div, span, td {
  17. font-family: "Georgia", serif;
  18. font-size: 12px;
  19. }
  20.  
  21. body {
  22. padding: 10px;
  23. margin: auto;
  24. font-size: 12px;
  25. }
  26.  
  27. .common {
  28. font-family: "Georgia", serif !important;
  29. font-size: 12px;
  30. padding: 10px 0px;
  31. }
  32.  
  33. table {
  34. border-collapse: collapse;
  35. width: 100%;
  36. vertical-align: top;
  37. }
  38.  
  39. table td {
  40. padding: 2px 0px;
  41. }
  42.  
  43. table h1, h2, h3, h4, h5, h6 {
  44. padding: 0px;
  45. margin: 0px;
  46. }
  47.  
  48. table.header-table td {
  49. vertical-align: top;
  50. }
  51.  
  52. table.header-table thead {
  53. border-bottom: 1px solid black;
  54. }
  55.  
  56. table.header-table h3 {
  57. color: gray;
  58. }
  59.  
  60. table.header-table thead td {
  61. padding: 5px 0px;
  62. }
  63.  
  64. div.page-body table td:nth-child(6),
  65. div.page-body table td:nth-child(7) {
  66. text-align: right;
  67. }
  68.  
  69. table.footer-table td {
  70. vertical-align: top;
  71. }
  72.  
  73. table.footer-table td table td:nth-child(2),
  74. table.footer-table td table td:nth-child(3) {
  75. text-align: right;
  76. }
  77. </style>
  78.  
  79.  
  80. <!-- Javascript -->
  81. <script>
  82. si_std = {
  83. print_item_table: function() {
  84. var table = print_table(
  85. 'Purchase Order',
  86. doc.name,
  87. 'po_details',
  88. 'Purchase Order Item',
  89. [// Here specify the table columns to be displayed
  90. 'SR','description','uom','qty',
  91. 'rate','discount_percentage', 'amount'
  92. ],
  93. [// Here specify the labels of column headings
  94. 'Sr','Description', 'Unit','Qty',
  95. 'Basic Rate', 'Disc','Amount',
  96. ],
  97. [// Here specify the column widths
  98. '3%','42%', '8%','7%',
  99. '11%', '9%','20%'
  100. ]
  101. );
  102.  
  103. // This code takes care of page breaks
  104. if(table.appendChild) {
  105. out = table.innerHTML;
  106. } else {
  107. out = '';
  108. for(var i=0; i < (table.length-1); i++) {
  109. out += table[i].innerHTML +
  110. '<div style = "page-break-after: always;" \
  111. class = "page_break"></div>\
  112. <div class="page-settings"></div>';
  113. }
  114. out += table[table.length-1].innerHTML;
  115. }
  116. return out;
  117. },
  118.  
  119.  
  120. print_other_charges: function(parent) {
  121. var oc = getchildren('Purchase Taxes and Charges', doc.name, 'other_charges');
  122. var rows = '<table width=100%>\n';
  123. for(var i=0; i<oc.length; i++) {
  124. rows +=
  125. '<tr>\n' +
  126. '\t<td>' + oc[i].description + '</td>\n' +
  127. '\t<td style="width: 38%; text-align: right;">' + format_currency(oc[i].tax_amount / (doc.conversion_rate || 1), doc.currency) + '</td>\n' +
  128. '</tr>\n';
  129. }
  130. return rows + '</table>\n';
  131. }
  132. };
  133. </script>
  134.  
  135.  
  136. <!-- Page Layout Settings -->
  137. <div class='common page-header'>
  138.  
  139. <center><h1>GREEN EARTH PROJECTS</h1><br>
  140. <h5>Basement,#159 TGR Corner,Bethel Nagar,3rd Main,Kodigehalli Main Road,
  141. <br>K R Puram,Bangalore-560036,Ph-080 25610049,E-Mail-greenearthproject@gmail.com.
  142. </h5>
  143. &nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;
  144. &nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;
  145. &nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;
  146. &nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;
  147. <h4>PURCHASE/WORK ORDER</h4>
  148.  
  149. </center>
  150.  
  151. Tin No:29941207921
  152. &nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;
  153. &nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;
  154. &nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;
  155. &nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;
  156. &nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;
  157. &nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;
  158. &nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;
  159. &nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;
  160. &nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;
  161. Sr. No.<script>cur_frm.docname</script><br>
  162. Ref. Indent No:
  163. &nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;
  164. &nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;
  165. &nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;
  166. &nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;
  167. &nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;
  168. &nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;
  169. &nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;
  170. &nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;
  171. &nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;
  172. &nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;
  173.  
  174. Date:<script>date.str_to_user(doc.transaction_date)</script><br>
  175. Project:
  176. <br> <br><p>To,<br><script>doc.supplier_name</script><br>Consignee Tin No<br><script>doc.newfield</script><br>Dear Sir,<br>Reference to your quotation No.___________
  177. and as per telephonic talk with Mr.____________________ kindly supply the under mentioned goods at prices quoted by you as given below, Kindly acknowledge receipt of the order.</p>
  178. <br><h4><hr></h4>
  179.  
  180.  
  181.  
  182. <table class='header-table' cellspacing=0>
  183. <!-- <thead>
  184. <tr><td><script>'<h1>' + (doc.select_print_heading || 'Purchase Order') + '</h1>'</script></td></tr>
  185. <tr><td><h3><script>cur_frm.docname</script></h3></td></tr>
  186. </thead> -->
  187. <!-- <tbody>
  188. <tr>
  189. <td width=60%><table width=100% cellspacing=0><tbody>
  190. <tr>
  191. <td width=22%><b>Name</b></td>
  192. <td><script>doc.supplier_name</script></td>
  193. </tr>
  194. <tr>
  195. <td><b>Address</b></td>
  196. <td><script>replace_newlines(doc.address_display)</script></td>
  197. </tr>
  198. <tr>
  199. <td><b>Contact</b></td>
  200. <td><script>doc.contact_display</script></td>
  201. </tr>
  202. </tbody></table></td>
  203. <td><table width=100% cellspacing=0><tbody>
  204. <tr>
  205. <td width=63%><b>Purchase Order Date</b></td>
  206. <td><script>date.str_to_user(doc.transaction_date)</script></td>
  207. <tr>
  208. </tbody></table></td>
  209. </tr>
  210. </tbody> -->
  211. <tfoot>
  212.  
  213. </tfoot>
  214. </table>
  215. </div>
  216. <div class='common page-body'>
  217. <!--
  218. Page Body will contain
  219. + table 2
  220. - Sales Invoice Data
  221. -->
  222. <script>si_std.print_item_table()</script>
  223. </div>
  224. <div class='common page-footer'>
  225. <!--
  226. Page Footer will contain
  227. + table 3
  228. - Terms and Conditions
  229. - Total Rounded Amount Calculation
  230. - Total Rounded Amount in Words
  231. -->
  232. <table class='footer-table' width=100% cellspacing=0>
  233. <thead>
  234.  
  235. </thead>
  236. <tbody>
  237. <tr>
  238. <td width=60% style='padding-right: 10px;'>
  239. <!--<b>Terms, Conditions &amp; Other Information:</b><br />
  240. <script>doc.terms</script> -->
  241. </td>
  242. <td>
  243. <table cellspacing=0 width=100%><tbody>
  244. <tr>
  245. <td>Net Total</td>
  246. <td style="width: 38%; text-align: right;"><script>
  247. format_currency(doc.net_total_import, doc.currency)
  248. </script></td>
  249. </tr>
  250. <tr><td colspan=3><script>si_std.print_other_charges()</script></td></tr>
  251. <tr style='font-weight: bold'>
  252. <td>Grand Total</td>
  253. <td style="width: 38%; text-align: right;"><script>
  254. format_currency(doc.grand_total_import, doc.currency)
  255. </script></td>
  256. </tr>
  257. </tbody></table>
  258. <br /><b>In Words</b><br />
  259. <i><script>doc.in_words_import</script></i>
  260. </td>
  261. </tr>
  262. </tbody>
  263. <tfoot>
  264.  
  265. </tfoot>
  266. </table>
  267.  
  268. Rate terms:<br>Payment Schedule:<br>Place Of Delivery:<br>Delivery Schedule:<br>Contact:<br>Prepared by:
  269. &nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;
  270. &nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;
  271. &nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;
  272. &nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;
  273. &nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;
  274. &nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;
  275. &nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;
  276. &nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;
  277. &nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;
  278. &nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;
  279. &nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;
  280. &nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;
  281. Your faithfully,<br>Checked by:
  282. </div>
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement