2014-03-27 12:24:18 +00:00
|
|
|
{
|
2014-05-13 10:42:03 +00:00
|
|
|
"creation": "2011-12-21 11:08:55",
|
2014-03-27 12:24:18 +00:00
|
|
|
"doc_type": "Sales Invoice",
|
|
|
|
"docstatus": 0,
|
|
|
|
"doctype": "Print Format",
|
2014-05-26 10:31:01 +00:00
|
|
|
"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 items = getchildren('Sales Invoice Item', doc.name, 'entries');\n\t\t\t\tfor (var x=0; x<items.length; x++) {\n\t\t\t\t\trows += '<tr>\\\n\t\t\t\t\t\t<td align=\"left\">' + items[x].item_code + '<br>' + items[x].item_name + '</td>\\\n\t\t\t\t\t\t<td align=\"right\" style=\"vertical-align:top;\">' + items[x].qty + '</td>\\\n\t\t\t\t\t\t<td align=\"right\" style=\"vertical-align:top;\">' + format_currency(items[x].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 = doc.other_charges;\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// show discount amount\n\t\t\t\tif (doc.discount_amount) {\n\t\t\t\t\ttotals += '<tr>\\\n\t\t\t\t\t\t<td align=\"right\">Discount Amount</td>\\\n\t\t\t\t\t\t<td align=\"right\">' + format_currency(doc.discount_amount) + '</td>\\\n\t\t\t\t\t<tr>';\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 count = 0;\n\t\t\t\tvar inc_tax = '';\n\t\t\t\tvar taxes = doc.other_charges;\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 (count == 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\tcount += 1;\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
|
2014-03-27 12:24:18 +00:00
|
|
|
"idx": 1,
|
2014-05-26 10:31:01 +00:00
|
|
|
"modified": "2014-05-26 06:29:57.220753",
|
2014-03-27 12:24:18 +00:00
|
|
|
"modified_by": "Administrator",
|
|
|
|
"module": "Accounts",
|
|
|
|
"name": "POS Invoice",
|
|
|
|
"owner": "Administrator",
|
|
|
|
"print_format_type": "Client",
|
|
|
|
"standard": "Yes"
|
|
|
|
}
|