blob: 4710a4e562de491e9903b0ac8ba8e3d31b1b7259 [file] [log] [blame]
[
{
"creation": "2011-12-21 11:08:55",
"docstatus": 0,
"modified": "2014-01-07 19:44:47",
"modified_by": "Administrator",
"owner": "Administrator"
},
{
"doc_type": "Sales Invoice",
"doctype": "Print Format",
"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>",
"module": "Accounts",
"name": "__common__",
"print_format_type": "Client",
"standard": "Yes"
},
{
"doctype": "Print Format",
"name": "POS Invoice"
}
]