1 line
4.8 KiB
Plaintext
1 line
4.8 KiB
Plaintext
{"Name":"Parts with available serial numbers","Active":true,"Notes":"USE: #if_eq custom Helper ONLY displays parts from the datalist that HAVE serial numbers \n","Roles":49514,"AType":20,"IncludeWoItemDescendants":false,"Template":"<html>\n<body>\n <div>\n <div class=\"reporttitle\">\n <p>Parts with Serials Report</p>\n </div>\n\n <table>\n <thead>\n <tr>\n <td colspan=\"24\"> </td>\n </tr>\n <tr>\n <th colspan=\"6\" class=\"leftlean\">{{ayT 'Part'}}</th>\n <th colspan=\"4\">{{ayT 'PartManufacturerID'}}</th>\n <th colspan=\"2\">{{ayT 'PartCost'}}</th>\n <th colspan=\"2\">{{ayT 'PartRetail'}}</th>\n <th colspan=\"10\">{{ayT 'PartSerialNumbersAvailable'}}</th>\n </tr>\n <tr>\n <td colspan=\"24\"> </td>\n </tr>\n </thead>\n\n <tbody>\n {{#each ayReportData}}\n <!-- the #each for the Sample Data MUST encompass the section where its gonna show - in this case the tbody, so needs to be placed within -->\n <!-- to get alternating coloured rows when one PO per line, need CSS statements PLUS this # each MUST be placed BEFORE the tr /tr -->\n {{#if_eq PartSerialsViz \"\"}}\n <!--this #if_eq from a custom Helpers - if PartSerialsViz specifically is \"\"\" then no row is printed... -->\n {{else}}\n <!-- ... anything else, then shows the row of columns below-->\n <tr>\n <td colspan=\"6\">{{Name}}</td>\n <td colspan=\"4\" class=\"centerlean\">{{ManufacturerViz}}</td>\n <td colspan=\"2\" class=\"centerlean\">{{ayCurrency Cost}}</td>\n <td colspan=\"2\" class=\"centerlean\">{{ayCurrency Retail}}</td>\n <td colspan=\"10\" class=\"centerlean\">{{PartSerialsViz}}</td>\n </tr>\n {{/if_eq}}\n {{/each}}\n </tbody>\n\n </table>\n </div>\n</body>\n</html>","Style":".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; /* the # of columns set in the first row of the thead will be fixed and applied throughout table and rows */\n }\n\nth {\n border-bottom: solid 1pt #9e9e9e;\n height: 50px;\n font-size: 11pt; \n color: #9e9e9e;\n}\n\ntbody td {\n padding: 10px;\n word-wrap: break-word;\n font-size: 9pt;\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 font-size: 16pt;\n}\n.fontblue {\n color: blue;\n}\n.fontred {\n color:red;\n}\n\n","JsPrerender":" \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 //see the help documentation for details\n\nasync function ayPrepareData(ayData) { \n\n await ayGetTranslations([\"Part\", \"PartManufacturerID\", \"PartRetail\", \"PartCost\", \"PartSerialNumbersAvailable\" ]);\n \n return ayData;\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})\n\n//custom helper so can do a direct comparison - i.e. if value equals xxxx, then show, else show yyyyy\n//note that this HAS to be added here in Helpers, is NOT built in\nHandlebars.registerHelper('if_eq', function(a, b, opts) {\n if(a == b) // Or === depending on your needs\n return opts.fn(this);\n else\n return opts.inverse(this);\n});","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":"20mm","MarginOptionsRight":"20mm","MarginOptionsTop":"10mm","PageRanges":null,"PreferCSSPageSize":false,"PrintBackground":true,"Scale":1.00000} |