Nabin Hait | 7762bda | 2011-10-19 15:05:26 +0530 | [diff] [blame] | 1 | [ |
Anand Doshi | c3b9a00 | 2012-12-11 15:20:53 +0530 | [diff] [blame] | 2 | { |
Anand Doshi | c3b9a00 | 2012-12-11 15:20:53 +0530 | [diff] [blame] | 3 | "creation": "2011-12-21 11:08:55", |
Nabin Hait | 176f3af | 2013-08-16 16:17:34 +0530 | [diff] [blame] | 4 | "docstatus": 0, |
Akhilesh Darjee | 8d0ef21 | 2014-01-07 19:45:33 +0530 | [diff] [blame] | 5 | "modified": "2014-01-07 19:44:47", |
Anand Doshi | c3b9a00 | 2012-12-11 15:20:53 +0530 | [diff] [blame] | 6 | "modified_by": "Administrator", |
Nabin Hait | 176f3af | 2013-08-16 16:17:34 +0530 | [diff] [blame] | 7 | "owner": "Administrator" |
Anand Doshi | c3b9a00 | 2012-12-11 15:20:53 +0530 | [diff] [blame] | 8 | }, |
| 9 | { |
| 10 | "doc_type": "Sales Invoice", |
Anand Doshi | c3b9a00 | 2012-12-11 15:20:53 +0530 | [diff] [blame] | 11 | "doctype": "Print Format", |
Akhilesh Darjee | 8d0ef21 | 2014-01-07 19:45:33 +0530 | [diff] [blame] | 12 | "html": "<html>\n<head>\n<!--Item Table, Totals and Other Charges-->\n<script>\nfunction get_print_format() {\n\tvar rows = '<table width=\"100%\" cellpadding=\"0\" class=\"cart\">\\\n\t\t<tr>\\\n\t\t\t<td colspan=\"3\"><hr></td>\\\n\t\t</tr>\\\n\t\t<tr>\\\n\t\t\t<td width=\"60%\" align=\"left\">ITEM CODE/DESC.</td>\\\n\t\t\t<td width=\"10%\" align=\"right\">QTY</td>\\\n\t\t\t<td width=\"30%\" align=\"right\">RATE</td>\\\n\t\t</tr>\\\n\t\t<tr>\\\n\t\t\t<td colspan=\"3\"><hr></td>\\\n\t\t</tr>';\n\n\t// print items\n\tvar oc = getchildren('Sales Invoice Item', doc.name, 'entries');\n\tfor (var x=0; x<oc.length; x++) {\n\t\trows += '<tr>\\\n\t\t\t<td align=\"left\">' + oc[x].item_code + '<br>' + oc[x].item_name + '</td>\\\n\t\t\t<td align=\"right\" style=\"vertical-align:top;\">' + oc[x].qty + '</td>\\\n\t\t\t<td align=\"right\" valign=\"top\">' + format_currency(oc[x].export_amount) + '</td>\\\n\t\t</tr>';\n\t}\n\t\n\t// print net total\n\trows += '<tr>\\\n\t\t<td colspan=\"3\"><hr></td>\\\n\t</tr>\\\n\t<tr>\\\n\t\t<td colspan=\"2\" align=\"right\">Net Total</td>\\\n\t\t<td align=\"right\">' + format_currency(doc.net_total_export) + '</td>\\\n\t</tr>';\n\t\n\t// print taxes\n\tvar taxes = wn.model.get_children(\"Sales Taxes and Charges\", doc.name, \"other_charges\", \"Sales Invoice\");\n\tif (taxes) {\n\t\t$.each(taxes, function(i, d) {\n\t\t\tif (d.tax_amount) {\n\t\t\t\trows += '<tr>\\\n\t\t\t\t\t<td colspan=\"2\" align=\"right\">' + d.description + '</td>\\\n\t\t\t\t\t<td style=\"text-align: right;\">' + format_currency(d.tax_amount) + '</td>\\\n\t\t\t\t<tr>';\n\t\t\t}\n\t\t});\n\t}\n\t\n\t// print grand total\n\trows += '<tr>\\\n\t\t<td colspan=\"2\" align=\"right\" style=\"vertical-align:middle;\">Grand Total</td>\\\n\t\t<td align=\"right\"><hr width=\"90%\" align=\"right\">' + format_currency(doc.grand_total_export) + '<br>\\\n\t\t<hr width=\"90%\" align=\"right\"></td>\\\n\t\t</tr>\\\n\t\t<tr>\\\n\t\t\t<td align=\"center\" colspan=\"3\">Thank You. Please visit again.</td>\\\n\t\t</tr>\\\n\t</table>';\n\t\n\treturn rows;\n}\n</script>\n<style>\n\ttable, tr, td, div, p {\n\t\tfont-family: Monospace;\n\t\tline-height: 200%;\n\t}\n\th1, h2, h3, h4, h5, h6 {\n\t\ttext-align: center;\n\t}\n\t@media screen {\n\t\tbody {\n\t\t\twidth: 4in;\n\t\t}\n\t}\n</style>\n</head>\n\n<body>\n\t<table width=\"100%\" cellpadding=\"4\">\n\t\t<tr>\n\t\t\t<td align=\"left\">RECEIPT NO: <script>doc.name</script></td>\n\t\t\t<td align=\"right\">DATE: <script>date.str_to_user(doc.posting_date)</script></td>\n\t\t</tr>\n\t\t<tr>\n\t\t\t<td>M/s <script>doc.customer</script></td>\n\t\t</tr>\n\t</table>\n\t<!--Item Table & Totals-->\n\t<div><script>get_print_format();</script></div>\n</body>\n</html>", |
Nabin Hait | 176f3af | 2013-08-16 16:17:34 +0530 | [diff] [blame] | 13 | "module": "Accounts", |
| 14 | "name": "__common__", |
| 15 | "print_format_type": "Client", |
Anand Doshi | c3b9a00 | 2012-12-11 15:20:53 +0530 | [diff] [blame] | 16 | "standard": "Yes" |
| 17 | }, |
| 18 | { |
Nabin Hait | 176f3af | 2013-08-16 16:17:34 +0530 | [diff] [blame] | 19 | "doctype": "Print Format", |
| 20 | "name": "POS Invoice" |
Anand Doshi | c3b9a00 | 2012-12-11 15:20:53 +0530 | [diff] [blame] | 21 | } |
Nabin Hait | 7762bda | 2011-10-19 15:05:26 +0530 | [diff] [blame] | 22 | ] |