1 line
9.1 KiB
Plaintext
1 line
9.1 KiB
Plaintext
{"Name":"SAMPLE widgets invoice rpt head footer repeats","Active":true,"Notes":"","Roles":124927,"ObjectType":2,"Template":"<html>\n\n<body>\n\n\n\n\t<div>\t\t\n\t\t<table >\n\t\t\t<thead> <!--table header will repeat on multiple pages if total thead content is less than 25% of page -->\n <tr>\n <td colspan=\"4\" rowspan=\"3\" class=\"leftlean\">{{ ayLogo \"small\" }}</td> \n <td colspan=\"4\" class=\"rightlean fontsizeBig\">PO#: A1A1G43</td>\n <td colspan=\"4\" class=\"rightlean\">Our Account #: 198453</td>\n </tr>\n <tr>\n \n <td colspan=\"4\" class=\"centerlean\"></td>\n <td colspan=\"4\" class=\"rightlean\">Ordered Date: 2020-09-13</td> \n </tr>\n <tr>\n \n <td colspan=\"4\" class=\"centerlean\"></td>\n <td colspan=\"4\" class=\"rightlean\">ETA Date: 2020-09-19</td> \n </tr>\n \n <tr> \n <td colspan=\"4\" class=\"heading\">VENDOR:</td>\n <td colspan=\"4\" class=\"centerlean heading\"></td>\n <td colspan=\"4\" class=\"rightlean heading\">DELIVER TO:</td>\n </tr>\n <tr>\n <td colspan=\"4\" >vendorName</td> \n <td colspan=\"4\" class=\"centerlean\"></td> \n <td colspan=\"4\" class=\"rightlean\">My Company Name</td>\n </tr> \n <tr>\n <td colspan=\"4\" >vstaddress</td> \n <td colspan=\"4\" class=\"centerlean\"></td> \n <td colspan=\"4\"class=\"rightlean\" >123 - 123 MyStreetname Ave</td>\n </tr>\n <tr>\n <td colspan=\"4\" >vstcity vststate vstpostal</td> \n <td colspan=\"4\" class=\"centerlean\"></td> \n <td colspan=\"4\" class=\"rightlean\">My City, My State, My Postal</td>\n </tr>\n <tr>\n <td colspan=\"4\" >Contact: vcontact vphone vemail</td>\n <td colspan=\"3\" class=\"centerlean\"></td>\n <td colspan=\"5\" class=\"rightlean\">Ordered By: creator Phone: creatorphone</td>\n </tr>\n\n <tr>\n <td colspan=\"12\"> </td>\n </tr>\n \n <tr > \n <td colspan=\"6\" class=\"heading\" >Our Part#:</td>\n <td colspan=\"1\" class=\"centerlean heading\" >Serial#</td> \n <td colspan=\"1\" class=\"centerlean heading\" >Price Per:</td>\n <td colspan=\"1\" class=\"centerlean heading\" >Net:</td>\n <td colspan=\"1\" class=\"centerlean heading\" >Tax A:</td>\n <td colspan=\"1\" class=\"centerlean heading\" >Tax B:</td>\n <td class=\"rightlean heading\" colspan=\"1\" >Line Total:</td> \n </tr> \n </thead>\n <tfoot> <!--to have footer display on every page place before tbody AND note css tfoot {display: table-footer-group; }-->\n <tr>\n\t\t\t\t<td colspan=\"12\"> </td>\n\t\t\t\t</tr> \n\t\t\t\t<tr>\n\t\t\t\t<td colspan=\"6\" ></td>\n\t\t\t\t<td colspan=\"4\" class=\"rightlean heading\">Net Total for all pages:</td>\n\t\t\t\t<td colspan=\"2\" class=\"rightlean heading\" > $xxx.xx</td>\n\t\t\t\t</tr>\n\t\t\t\t<tr>\n\t\t\t\t<td colspan=\"6\"> </td>\n\t\t\t\t<td colspan=\"4\" class=\"rightlean heading\">Tax A Total for all pages:</td>\n\t\t\t\t<td colspan=\"2\" class=\"rightlean heading\" > $xx.xx</td>\n\t\t\t\t</tr>\n\t\t\t\t<tr>\n\t\t\t\t<td colspan=\"6\">Direct all inquiries to My Company 1-888-555-5555</td>\n\t\t\t\t<td colspan=\"4\" class=\"rightlean heading\">Tax B Total for all pages:</td>\n\t\t\t\t<td colspan=\"2\" class=\"rightlean heading\" >$xx.xx</td>\n\t\t\t\t</tr>\n \t\t\t<tr>\n \t\t\t<td colspan=\"6\">Approval for off-specification goods must be obtained via a new purchase order</td>\n \t\t\t<td colspan=\"4\" class=\"rightlean heading\">PO Total for all pages:</td>\n \t\t\t<td colspan=\"2\" class=\"rightlean heading\" >{{ ayCurrency MyTotalDollarAmount }}</td>\n \t\t\t</tr>\n </tfoot>\n\t\t\t<tbody >\n\t\t\t\t{{#each ayReportData}}\n\t\t\t\t<tr>\t\t\t\t\n\t\t\t\t<td colspan=\"6\" >{{Name}}</td>\n \t\t<td colspan=\"1\" class=\"centerlean\" >{{Serial}}</td> \n \t\t<td colspan=\"1\" class=\"centerlean\" >{{ayCurrency DollarAmount}}</td>\n \t\t<td colspan=\"1\" class=\"centerlean\" >xx.xx</td>\n \t\t<td colspan=\"1\" class=\"centerlean\" >x.xx</td>\n \t\t<td colspan=\"1\" class=\"centerlean\" >x.xx</td>\n \t\t<td class=\"rightlean\" colspan=\"1\" >{{ayCurrency DollarAmount}}</td> \t\t\n\t\t\t\t</tr>\n\t\t\t \t{{/each}}\n\t\t\t</tbody>\n\t\t</table>\n\n\n\n\t</div>\n \n\n\n</body>\n\n</html>","Style":"\ntable { \n font-family: 'Helvetica Neue', 'Helvetica', Helvetica, Arial, sans-serif;\n border-collapse: collapse;\n white-space: pre-wrap;\n font-size: 9pt;\n width: 100%;\n }\n\nthead {\n display: table-header-group; /* so as to print the table-header on all subsequent pages */\n}\ntfoot {\n display: table-footer-group; /* so as to print the table-footer on all subsequent pages */\n page-break-inside: avoid;\n}\n\n.heading {\n border-style: solid;\n border-width: 1pt;\n border-color: #e8e5e5; \n margin: 10pt;\n background-color: #e8e5e5;\n padding: 5pt; \n font-size: 11pt; \n} \n.fontsizeBig {\n font-size: 10pt;\n font-weight: bold ;\n\n}\n\n.rightlean {\n text-align: right;\n}\n.leftlean {\n text-align: left;\n}\n.centerlean {\n text-align: center;\n}\n\ntbody tr:nth-child(even) {\n background-color: lightgray; /* MUST checkmark Print background in PDF Options for this to show */\n} \n\n\n","JsPrerender":"async function ayPrepareData(reportData) {\n //this function (if present) is called with the report data \n //before the report is rendered\n //modify data as required here and return it to change the data before the report renders \n\n\n//Example of both manipulating the reportData before rendering the report (by adding a running total field)\n //and adding a field to the overall data calculating the total dollar amount for all records\n\n let TotalDollarAmount = 0; //Declare a temporary variable to hold the running total\n\n //Iterate through all the records in the reportData\n //adding the dollar amount of each item to the TotalDollarAmount variable\n for (EachItem of reportData.ayReportData) { //EachItem is name i've give, reportData.ayReportData is set\n\n //make sure it has a value before attempting to add it to the running total\n if (EachItem.DollarAmount != null) { //EachItem is name I've given, DollarAmount is the \n TotalDollarAmount += EachItem.DollarAmount;\n }\n\n //add a new key to each record in the reportData object named \"MyRunningTotal\" with the running total so far\n EachItem.MyRunningTotal=TotalDollarAmount;\n }\n\n //Add the TotalDollarAmount variable to the reportData so it can be \n //accessed in the report template\n reportData.MyTotalDollarAmount=TotalDollarAmount;\n\n\n\n//below gets your translations for the following field labels\nawait ayGetTranslations([\n \"Widget\",\n \"WidgetName\",\n \"WidgetSerial\",\n \"WidgetDollarAmount\",\n \"WidgetCount\",\n \"WidgetStartDate\",\n \"WidgetEndDate\",\n \"WidgetNotes\",\n \"WidgetCustom1\",\n \"WidgetCustom2\",\n \"WidgetCustom3\",\n \"WidgetCustom4\",\n \"WidgetCustom5\",\n \"WidgetCustom6\",\n \"WidgetCustom7\",\n \"WidgetCustom8\",\n \"WidgetCustom9\",\n \"WidgetCustom10\",\n \"WidgetCustom11\",\n \"WidgetCustom12\",\n \"WidgetCustom13\",\n \"WidgetCustom14\",\n \"WidgetCustom15\",\n \"WidgetCustom16\",\n ]);\n\n return reportData;\n}\n","JsHelpers":"//Register custom Handlebars helpers here to use in your report script\n//https://handlebarsjs.com/guide/#custom-helpers\nHandlebars.registerHelper('loud', function (aString) {\n return aString.toUpperCase()\n})\nHandlebars.registerHelper('words', function() {\n return \"stuff and text\"\n})\n\n\nHandlebars.registerHelper('todaysMonthDDYYYYDate', function() {\n var dt3=new Date();\n return dt3.toLocaleDateString(\n AYMETA.ayClientMetaData.LanguageName,//use Client browser default Language, change this setting here to force an alternative language\n {\n timeZone: AYMETA.ayClientMetaData.TimeZoneName,//use Client browser's default TimeZone, change this setting here to force a specific time zone\n dateStyle: \"long\"\n }\n ) ;\n});// today's date displayed in MONTH DD, YYYY format\n\n","RenderType":0,"HeaderTemplate":"<span style=\"font-size:6pt;width: 94%; text-align:left; \"> Todays date: <span class=\"date\"></span></span>\n<span style=\"font-size:6pt;width: 94%; text-align: right; \">Page <span class=\"pageNumber\"></span> of <span class=\"totalPages\"></span> </span>\n","FooterTemplate":" <span> </span>","DisplayHeaderFooter":true,"PaperFormat":10,"Landscape":false,"MarginOptionsBottom":"15mm","MarginOptionsLeft":"10mm","MarginOptionsRight":"10mm","MarginOptionsTop":"15mm","PageRanges":null,"PreferCSSPageSize":false,"PrintBackground":true,"Scale":1.0000} |