1 line
6.8 KiB
Plaintext
1 line
6.8 KiB
Plaintext
{"Name":"Nets Taxes LineTotals for each Quote Labor","Active":true,"Notes":"","Roles":50538,"AType":24,"IncludeWoItemDescendants":false,"Template":"<html>\n\n<body>\n <div>\n <div class=\"reporttitle\">\n <p>{{ayT 'Quote'}} {{ayT 'WorkOrderItemLaborList'}} 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=\"2\">{{ayT 'Customer'}}</th>\n <th colspan=\"2\">{{ayT 'QuoteQuoteRequestDate'}}</th> \n <th colspan=\"3\">{{ayT 'WorkOrderItemLaborServiceRateID'}}</th>\n <th colspan=\"1\" class=\"rightlean\">{{ayT 'ListPrice'}}</th>\n <th colspan=\"1\">{{ayT 'WorkOrderItemLaborServiceRateQuantity'}}</th>\n <th colspan=\"2\" class=\"rightlean\">{{ayT 'NetPrice'}}</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 Labors}}\n <tr>\n <td colspan=\"1\" class=\"centerlean\">{{../../Serial}}</td>\n <td colspan=\"2\" class=\"centerlean\">{{../../CustomerViz}}</td>\n <td colspan=\"2\" class=\"centerlean\">{{ayDate ../../Requested}}</td> \n <td colspan=\"3\">{{ServiceRateViz}}</td>\n <td colspan=\"1\" class=\"rightlean\">{{ayCurrency PriceViz}}</td>\n <td colspan=\"1\" class=\"centerlean\">{{ServiceRateQuantity}}</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 <td colspan=\"16\"></td>\n </tr>\n <tr>\n <th colspan=\"9\" class=\"rightlean\">Totals for all {{ayT 'WorkOrderItemLaborList'}} in this report</th>\n <th colspan=\"1\"> </th>\n <th colspan=\"2\" class=\"rightlean\">{{ayT 'NetPrice'}}</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 AllWOLaborsNetViz}}</td>\n <td colspan=\"1\" class=\"rightlean\">{{ayCurrency AllWOLaborsTaxAs}}</td>\n <td colspan=\"1\" class=\"rightlean\">{{ayCurrency AllWOLaborsTaxBs}}</td>\n <td colspan=\"2\" class=\"rightlean\">{{ayCurrency AllWOLaborsTotalGrand}}</td>\n </tr>\n </tfoot>\n </table>\n </div>\n</body>\n\n</html>","Style":"\ntfoot {\n border-top: 2px solid #9e9e9e;\n font-size: 7pt;\n text-align: center;\n}\n\n.singlePage\n{\npage-break-after: always;\n}\n\nbody {\n font-family: 'Helvetica', 'Helvetica Neue', Arial, sans-serif; \n}\n\n.reporttitle { \n margin-bottom: 20pt; \n font-weight: bold; \n font-size: 13pt; \n color: #9e9e9e;\n} \n\ntable { \n border-collapse: collapse;\n white-space: pre-wrap;\n width: 100%;\n table-layout: fixed; \n }\n\nth {\n height: 30px;\n font-size: 9pt; \n color: #9e9e9e;\n}\n\ntbody td {\n padding: 10px;\n word-wrap: break-word;\n font-size: 7pt;\n}\n\n\ntbody tr:nth-child(even) {\n background-color: #f8f8f8; /* MUST checkmark Print background in PDF Options for this to show */\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\n\n.fontgreen {\n color: green;\n}\n.fontblue {\n color: blue;\n}\n.fontred {\n color:red;\n}\n\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\", \"QuoteQuoteRequestDate\", \"NetPrice\", \"WorkOrderItemLaborList\", \"WorkOrderItemLaborServiceRateID\", \"WorkOrderItemLaborServiceRateQuantity\", \"ListPrice\", \"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 labors so it exists\n\treportData.AllWOLaborsNetViz = 0;\n\treportData.AllWOLaborsTaxAs = 0;\n\treportData.AllWOLaborsTaxBs = 0;\n\treportData.AllWOLaborsTotalGrand = 0;\n\n\n\n\tfor (const EachWO of reportData.ayReportData) {\n\n\t\t//below is to Iterate through each item of the wo's Items\n\t\tfor (const Item of EachWO.Items) {\n\t\t\t//below is to Iterate through each Labor record of the wo's Item\n\t\t\tfor (const Labor of Item.Labors) {\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 (Labor.NetViz != null) {\n\t\t\t\t\treportData.AllWOLaborsNetViz += Labor.NetViz; //this IS where the actual adding to running total for this WOItem's Net labor\n\t\t\t\t\treportData.AllWOLaborsTaxAs += Labor.TaxAViz;\n\t\t\t\t\treportData.AllWOLaborsTaxBs += Labor.TaxBViz;\n\t\t\t\t\treportData.AllWOLaborsTotalGrand += Labor.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} |