blob: 7f1bba4c9611223db818f6d8411c23bcb76138c7 [file] [log] [blame]
[
{
"creation": "2011-12-21 11:08:55",
"docstatus": 0,
"modified": "2014-01-08 19:32:16",
"modified_by": "Administrator",
"owner": "Administrator"
},
{
"doc_type": "Sales Invoice",
"doctype": "Print Format",
"html": "<html>\n\t<head>\n\n\t\t<!-- Style Settings -->\n\t\t<style>\n\t\t\ttable, tr, td, div, p {\n\t\t\t\tfont-family: Monospace;\n\t\t\t\tline-height: 200%;\n\t\t\t\tvertical-align: middle;\n\t\t\t}\n\t\t\t@media screen {\n\t\t\t\tbody {\n\t\t\t\t\twidth: 4in;\n\t\t\t\t}\n\t\t\t}\n\t\t</style>\n\n\t\t<!-- Javascript -->\n\t\t<script>\n\t\t\tfunction print_header() {\n\t\t\t\tvar header = '<table width=\"100%\" cellpadding=\"4\">';\n\n\t\t\t\theader += '<tr>\\\n\t\t\t\t\t<td colspan=\"2\" align=\"center\"><h3>' + (doc.select_print_heading || \"Invoice\") + '</h3></td>\\\n\t\t\t\t</tr>';\n\n\t\t\t\theader += '<tr>\\\n\t\t\t\t\t<td align=\"left\"><b>RECEIPT NO:</b> ' + doc.name + '</td>\\\n\t\t\t\t\t<td align=\"right\"><b>DATE:</b> ' + date.str_to_user(doc.posting_date) + '</td>\\\n\t\t\t\t</tr>\\\n\t\t\t\t<tr>\\\n\t\t\t\t\t<td colspan=\"2\"><b>M/s.</b> ' + doc.customer + '</td>\\\n\t\t\t\t</tr>';\n\n\t\t\t\treturn header + '</table>';\n\t\t\t}\n\n\t\t\tfunction print_items() {\n\t\t\t\tvar rows = '<table width=\"100%\" cellpadding=\"0\" class=\"cart\">';\n\n\t\t\t\trows += '<tr>\\\n\t\t\t\t\t<td colspan=\"3\"><hr></td>\\\n\t\t\t\t</tr>\\\n\t\t\t\t<tr>\\\n\t\t\t\t\t<td width=\"60%\" align=\"left\"><b>ITEM CODE / DESC.</b></td>\\\n\t\t\t\t\t<td width=\"10%\" align=\"right\"><b>QTY</b></td>\\\n\t\t\t\t\t<td width=\"30%\" align=\"right\"><b>RATE</b></td>\\\n\t\t\t\t</tr>\\\n\t\t\t\t<tr>\\\n\t\t\t\t\t<td colspan=\"3\"><hr></td>\\\n\t\t\t\t</tr>';\n\n\t\t\t\t// print items\n\t\t\t\tvar oc = getchildren('Sales Invoice Item', doc.name, 'entries');\n\t\t\t\tfor (var x=0; x<oc.length; x++) {\n\t\t\t\t\trows += '<tr>\\\n\t\t\t\t\t\t<td align=\"left\">' + oc[x].item_code + '<br>' + oc[x].item_name + '</td>\\\n\t\t\t\t\t\t<td align=\"right\" style=\"vertical-align:top;\">' + oc[x].qty + '</td>\\\n\t\t\t\t\t\t<td align=\"right\" style=\"vertical-align:top;\">' + format_currency(oc[x].export_amount) + '</td>\\\n\t\t\t\t\t</tr>';\n\t\t\t\t}\n\n\t\t\t\trows += '<tr>\\\n\t\t\t\t\t<td colspan=\"3\"><hr></td>\\\n\t\t\t\t</tr>';\n\n\t\t\t\treturn rows + '</table>';\n\t\t\t}\n\n\t\t\tfunction print_other_charges_and_totals() {\n\t\t\t\tvar totals = '<table width=\"100%\">';\n\t\t\t\t// print net total\n\t\t\t\ttotals +='<tr>\\\n\t\t\t\t\t<td align=\"right\" width=\"70%\">Net Total</td>\\\n\t\t\t\t\t<td align=\"right\">' + format_currency(doc.net_total_export) + '</td>\\\n\t\t\t\t</tr>';\n\n\t\t\t\t// print exclusive taxes\n\t\t\t\tvar taxes = wn.model.get_children(\"Sales Taxes and Charges\", doc.name, \"other_charges\", \"Sales Invoice\");\n\t\t\t\tif (taxes) {\n\t\t\t\t\t$.each(taxes, function(i, d) {\n\t\t\t\t\t\tif (!d.included_in_print_rate && d.tax_amount) {\n\t\t\t\t\t\t\ttotals += '<tr>\\\n\t\t\t\t\t\t\t\t<td align=\"right\">' + d.description + '</td>\\\n\t\t\t\t\t\t\t\t<td align=\"right\">' + format_currency(d.tax_amount) + '</td>\\\n\t\t\t\t\t\t\t<tr>';\n\t\t\t\t\t\t}\n\t\t\t\t\t});\n\t\t\t\t}\n\n\t\t\t\t// print grand total\n\t\t\t\ttotals += '<tr>\\\n\t\t\t\t\t<td align=\"right\">Grand Total</td>\\\n\t\t\t\t\t<td align=\"right\"><hr width=\"90%\" align=\"right\">' + format_currency(doc.grand_total_export) + '<br>\\\n\t\t\t\t\t<hr width=\"90%\" align=\"right\"></td>\\\n\t\t\t\t</tr>';\n\n\t\t\t\treturn totals + '</table>';\n\t\t\t}\n\n\t\t\tfunction print_inclusive_taxes() {\n\t\t\t\tvar inc_tax = '';\n\t\t\t\tvar taxes = wn.model.get_children(\"Sales Taxes and Charges\", doc.name, \"other_charges\", \"Sales Invoice\");\n\t\t\t\tif (taxes) {\n\t\t\t\t\t$.each(taxes, function(i, d) {\n\t\t\t\t\t\tif (d.included_in_print_rate && d.tax_amount) {\n\t\t\t\t\t\t\tif (i == 0) {\n\t\t\t\t\t\t\t\tinc_tax = '<table width=\"100%\">\\\n\t\t\t\t\t\t\t\t\t<tr>\\\n\t\t\t\t\t\t\t\t\t\t<td colspan=\"2\"><b>Inclusive Taxes</b></td>\\\n\t\t\t\t\t\t\t\t\t</tr>';\n\t\t\t\t\t\t\t}\n\n\t\t\t\t\t\t\tinc_tax += '<tr>\\\n\t\t\t\t\t\t\t\t<td width=\"60%\">' + d.description + '</td>\\\n\t\t\t\t\t\t\t\t<td>' + format_currency(d.tax_amount) + '</td>\\\n\t\t\t\t\t\t\t<tr>';\n\t\t\t\t\t\t}\n\t\t\t\t\t});\n\t\t\t\t}\n\n\t\t\t\tif (inc_tax) {\n\t\t\t\t\tinc_tax += '<tr>\\\n\t\t\t\t\t\t<td colspan=\"2\"><hr></td>\\\n\t\t\t\t\t</tr></table>';\n\t\t\t\t}\n\n\t\t\t\treturn inc_tax;\n\t\t\t}\n\n\t\t\tfunction print_footer() {\n\t\t\t\tvar footer = '<table width=\"100%\">';\n\n\t\t\t\t// print terms\n\t\t\t\tif (doc.terms) {\n\t\t\t\t\tfooter += '<tr>\\\n\t\t\t\t\t\t<td align=\"center\">' + doc.terms + '</td>\\\n\t\t\t\t\t</tr>';\n\t\t\t\t}\n\n\t\t\t\tfooter +='<tr>\\\n\t\t\t\t\t<td align=\"center\">Thank You. Please visit again.</td>\\\n\t\t\t\t</tr>';\n\n\t\t\t\treturn footer + '</table>';\n\t\t\t}\n\t\t</script>\n\t</head>\n\n\t<body>\n\t\t<!--Headers, Item Table, Totals & Footer-->\n\t\t<div><script>print_header();</script></div>\n\t\t<div><script>print_items();</script></div>\n\t\t<div><script>print_inclusive_taxes();</script></div>\n\t\t<div><script>print_other_charges_and_totals();</script></div>\n\t\t<div><script>print_footer();</script></div>\n\t</body>\n</html>",
"module": "Accounts",
"name": "__common__",
"print_format_type": "Client",
"standard": "Yes"
},
{
"doctype": "Print Format",
"name": "POS Invoice"
}
]