1 line
7.3 KiB
Plaintext
1 line
7.3 KiB
Plaintext
{"Name":"Outside Service via Quotes","Active":true,"Notes":"","Roles":50538,"AType":79,"IncludeWoItemDescendants":false,"Template":"<html>\n\n<body>\n <div>\n <div class=\"reporttitle\">\n <p>{{ayT 'Quote'}} {{ayT 'WorkOrderItemOutsideServiceList'}} Nets Taxes LineTotals and Grand Totals </p>\n </div>\n <table>\n <thead>\n <tr>\n <th colspan=\"1\">{{ayT 'Quote'}}</th>\n <th colspan=\"1\">{{ayT 'WorkOrderItemOutsideServiceDateSent'}}</th>\n <th colspan=\"3\">{{ayT 'Unit'}}</th> \n <th colspan=\"3\">{{ayT 'WorkOrderItemOutsideServiceVendorSentToID'}}</th>\n <th colspan=\"1\">{{ayT 'WorkOrderItemOutsideServiceRMANumber'}}</th>\n <th colspan=\"1\">{{ayT 'WorkOrderItemOutsideServiceDateReturned'}}</th>\n <th colspan=\"2\" class=\"rightlean\">{{ayT 'NetValue'}}</th>\n <th colspan=\"1\" class=\"rightlean\">{{ayT 'TaxCodeTaxA'}}</th>\n <th colspan=\"1\" class=\"rightlean\">{{ayT 'TaxCodeTaxB'}}</th>\n <th colspan=\"2\" class=\"rightlean\">{{ayT 'Total'}}</th>\n </tr>\n </thead>\n <tbody>\n {{#each ayReportData}}\n {{#each Items}}\n {{#each OutsideServices}}\n <tr>\n <td colspan=\"1\" class=\"centerlean\">{{../../Serial}}</td>\n <td colspan=\"1\" class=\"centerlean\">{{ayDate SentDate}}</td>\n <td colspan=\"3\" class=\"centerlean\">{{UnitViz}}</td> \n <td colspan=\"3\" class=\"centerlean\">{{VendorSentToViz}}</td>\n <td colspan=\"1\" class=\"rightlean\">{{RMANumber}}</td>\n <td colspan=\"1\" class=\"centerlean\">{{ayDate ReturnDate}}</td>\n <td colspan=\"2\" class=\"rightlean\">{{ayCurrency NetViz}}</td>\n <td colspan=\"1\" class=\"rightlean\">{{ayCurrency TaxAViz}}</td>\n <td colspan=\"1\" class=\"rightlean\">{{ayCurrency TaxBViz}}</td>\n <td colspan=\"2\" class=\"rightlean\">{{ayCurrency LineTotalViz}}</td>\n </tr>\n {{/each}}\n {{/each}}\n {{/each}}\n </tbody>\n </table>\n\n <table>\n <!-- footer is in its own table so displays once at end of report-->\n <tfoot>\n <tr>\n <th colspan=\"9\" class=\"rightlean\">Totals for all {{ayT 'WorkOrderItemOutsideServiceList'}} in this report</th>\n <th colspan=\"1\"> </th>\n <th colspan=\"2\" class=\"rightlean\">{{ayT 'NetValue'}}</th>\n <th colspan=\"1\" class=\"rightlean\">{{ayT 'TaxCodeTaxA'}}</th>\n <th colspan=\"1\" class=\"rightlean\">{{ayT 'TaxCodeTaxB'}}</th>\n <th colspan=\"2\" class=\"rightlean\">{{ayT 'Total'}}</th>\n </tr>\n <tr>\n <!-- note no #each encompasses here - the data below is obtained through Prepare -->\n <td colspan=\"10\"></td>\n <td colspan=\"2\" class=\"rightlean\">{{ayCurrency AllWOOutsideServicesNetViz}}</td>\n <td colspan=\"1\" class=\"rightlean\">{{ayCurrency AllWOOutsideServicesTaxAs}}</td>\n <td colspan=\"1\" class=\"rightlean\">{{ayCurrency AllWOOutsideServicesTaxBs}}</td>\n <td colspan=\"2\" class=\"rightlean\">{{ayCurrency AllWOOutsideServicesTotalGrand}}</td>\n </tr>\n </tfoot>\n </table>\n </div>\n</body>\n\n</html>","Style":"\r\ntfoot {\r\n border-top: 2px solid #9e9e9e;\r\n font-size: 7pt;\r\n text-align: center;\r\n}\r\n\r\n.singlePage\r\n{\r\npage-break-after: always;\r\n}\r\n\r\nbody {\r\n font-family: 'Helvetica', 'Helvetica Neue', Arial, sans-serif; \r\n}\r\n\r\n.reporttitle { \r\n margin-bottom: 20pt; \r\n font-weight: bold; \r\n font-size: 13pt; \r\n color: #9e9e9e;\r\n} \r\n\r\ntable { \r\n border-collapse: collapse;\r\n white-space: pre-wrap;\r\n width: 100%;\r\n table-layout: fixed; /* the # of columns set in the first row of the thead will be fixed and applied throughout table and rows */\r\n }\r\n\r\nth {\r\n height: 30px;\r\n font-size: 9pt; \r\n color: #9e9e9e;\r\n}\r\n\r\ntbody td {\r\n padding: 10px;\r\n word-wrap: break-word;\r\n font-size: 7pt;\r\n}\r\n\r\n\r\ntbody tr:nth-child(even) {\r\n background-color: #f8f8f8; /* MUST checkmark Print background in PDF Options for this to show */\r\n}\r\n\r\n\r\n.rightlean {\r\n text-align: right;\r\n}\r\n.leftlean {\r\n text-align: left;\r\n}\r\n.centerlean {\r\n text-align: center;\r\n}\r\n\r\n\r\n.fontgreen {\r\n color: green;\r\n}\r\n.fontblue {\r\n color: blue;\r\n}\r\n.fontred {\r\n color:red;\r\n}\r\n\r\n","JsPrerender":"async function ayPrepareData(reportData) {\n\t//this function (if present) is called with the report data \n\t//before the report is rendered\n\t//modify data as required here and return it to change the data before the report renders \n\t//see the help documentation for details\n\n\tawait ayGetTranslations([ \"Quote\", \"Customer\", \"Unit\", \"NetValue\", \"WorkOrderItemOutsideServiceList\", \"WorkOrderItemOutsideServiceDateSent\", \"WorkOrderItemOutsideServiceVendorSentToID\", \"WorkOrderItemOutsideServiceRMANumber\", \"WorkOrderItemOutsideServiceDateReturned\", \"TaxCodeTaxA\", \"TaxCodeTaxB\", \"Total\"]);\n\n\n\t//********************//NOTE if you customize this report template and do NOT need a function or key identified below, remove to increase report performance\n\n\n\t//below declares keys to hold for all OutsideServices so it exists\n\treportData.AllWOOutsideServicesNetViz = 0;\n\treportData.AllWOOutsideServicesTaxAs = 0;\n\treportData.AllWOOutsideServicesTaxBs = 0;\n\treportData.AllWOOutsideServicesTotalGrand = 0;\n\n\n\n\tfor (EachWO of reportData.ayReportData) {\n\n\t\t//below is to Iterate through each item of the wo's Items\n\t\tfor (Item of EachWO.Items) {\n\t\t\t//below is to Iterate through each OutsideService record of the wo's Item\n\t\t\tfor (OutsideService of Item.OutsideServices) {\n\t\t\t\t//make sure it has a value before attempting to add it to the running total\n\t\t\t\tif (OutsideService.NetViz != null) {\n\t\t\t\t\treportData.AllWOOutsideServicesNetViz += OutsideService.NetViz; //this IS where the actual adding to running total for this WOItem's Net OutsideService\n\t\t\t\t\treportData.AllWOOutsideServicesTaxAs += OutsideService.TaxAViz;\n\t\t\t\t\treportData.AllWOOutsideServicesTaxBs += OutsideService.TaxBViz;\n\t\t\t\t\treportData.AllWOOutsideServicesTotalGrand += OutsideService.LineTotalViz;\n\n\t\t\t\t}\n\t\t\t}\n\t\t}\n\t}\n\n\n\treturn reportData;\n}","JsHelpers":"","RenderType":0,"HeaderTemplate":"<span> </span>","FooterTemplate":"<span style=\"font-size:6pt; width: 96%;text-align:left; \"> Printed date: PDFDate</span>\n<span style=\"font-size:6pt;width: 96%; text-align: right; \">Page <span class=\"pageNumber\"></span> of <span class=\"totalPages\"></span> </span>","DisplayHeaderFooter":true,"PaperFormat":10,"Landscape":true,"MarginOptionsBottom":"15mm","MarginOptionsLeft":"15mm","MarginOptionsRight":"15mm","MarginOptionsTop":"10mm","PageRanges":null,"PreferCSSPageSize":false,"PrintBackground":true,"Scale":1.00000} |