Files
raven/server/AyaNova/resource/rpt/stock-report-templates/Nets Taxes LineTotals for each Quote Part.ayrt
2022-02-17 01:45:45 +00:00

1 line
6.7 KiB
Plaintext

{"Name":"Nets Taxes LineTotals for each Quote Part","Active":true,"Notes":"","Roles":50538,"AType":30,"IncludeWoItemDescendants":false,"Template":"<html>\n\n<body>\n <div>\n <div class=\"reporttitle\">\n <p>{{ayT 'Quote'}} {{ayT 'WorkOrderItemPartList'}} Nets Taxes LineTotals and Grand Totals for each </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=\"1\">{{ayT 'QuoteQuoteRequestDate'}}</th> \n <th colspan=\"3\">{{ayT 'WorkOrderItemPartList'}}</th>\n <th colspan=\"2\" class=\"rightlean\">{{ayT 'ListPrice'}}</th>\n <th colspan=\"1\">{{ayT 'WorkOrderItemPartQuantity'}}</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 Parts}}\n <tr>\n <td colspan=\"1\" class=\"centerlean\">{{../../Serial}}</td>\n <td colspan=\"2\" class=\"centerlean\">{{../../CustomerViz}}</td>\n <td colspan=\"1\" class=\"centerlean\">{{ayDate ../../Requested}}</td> \n <td colspan=\"3\">{{PartNameViz}} {{PartDescriptionViz}}</td>\n <td colspan=\"2\" class=\"rightlean\">{{ayCurrency PriceViz}}</td>\n <td colspan=\"1\" class=\"centerlean\">{{Quantity}}</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 'WorkOrderItemPartList'}} in this report</th>\n <th colspan=\"1\">&nbsp;</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 AllWOPartsNetViz}}</td>\n <td colspan=\"1\" class=\"rightlean\">{{ayCurrency AllWOPartsTaxAs}}</td>\n <td colspan=\"1\" class=\"rightlean\">{{ayCurrency AllWOPartsTaxBs}}</td>\n <td colspan=\"2\" class=\"rightlean\">{{ayCurrency AllWOPartsTotalGrand}}</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\", \"WorkOrderItemPartList\", \"WorkOrderItemPartQuantity\", \"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 parts so it exists\n\treportData.AllWOPartsNetViz = 0;\n\treportData.AllWOPartsTaxAs = 0;\n\treportData.AllWOPartsTaxBs = 0;\n\treportData.AllWOPartsTotalGrand = 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 Part record of the wo's Item\n\t\t\tfor (const Part of Item.Parts) {\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 (Part.NetViz != null) {\n\t\t\t\t\treportData.AllWOPartsNetViz += Part.NetViz; //this IS where the actual adding to running total for this WOItem's Net Parts\n\t\t\t\t\treportData.AllWOPartsTaxAs += Part.TaxAViz;\n\t\t\t\t\treportData.AllWOPartsTaxBs += Part.TaxBViz;\n\t\t\t\t\treportData.AllWOPartsTotalGrand += Part.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>&nbsp; </span>","FooterTemplate":"<span style=\"font-size:6pt; width: 96%;text-align:left; \">&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; &nbsp; &nbsp;&nbsp;&nbsp; &nbsp;&nbsp; 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>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; &nbsp; &nbsp;&nbsp;&nbsp; &nbsp;&nbsp;</span>","DisplayHeaderFooter":true,"PaperFormat":10,"Landscape":true,"MarginOptionsBottom":"15mm","MarginOptionsLeft":"15mm","MarginOptionsRight":"15mm","MarginOptionsTop":"10mm","PageRanges":null,"PreferCSSPageSize":false,"PrintBackground":true,"Scale":1.00000}