Files
raven/server/AyaNova/resource/rpt/stock-report-templates/112 unfinished WO Dispatch example.ayrt
2021-07-09 17:33:09 +00:00

1 line
13 KiB
Plaintext

{"Name":"112 unfinished WO Dispatch example","Active":true,"Notes":"#if_eq example custom Helper - if status is Completed show checkmark in checkbox\nHTML if examples - if part has serial numbers then show partviz + serials, else show only part\nREQUIRES ADDITIONAL EDITING - each workorder item to a single page, room for manual entry, ","Roles":124927,"AType":34,"IncludeWoItemDescendants":false,"Template":"<html>\n\t<body>\n\t\t<div >\t\n\n\t\t\n \t\n\t\t{{#each ayReportData}}\t <!-- the #each aspect MUST encompass the section where the class is that forces page break -->\n\t\t<table class=\"singlePage\"> \t\n \t\t<thead> <!--table header will repeat on multiple pages if total thead content is less t han 25% of page - IF NOT SHOWING ON 2nd PAGE of WO, is because is too high - note css -->\n\t\t\t\t<tr>\n\t\t\t\t\t<td rowspan=\"2\" colspan=\"7\" class=\"leftlean heading\">{{ ayLogo \"small\" }}</td>\n\t\t\t\t\t<td colspan=\"3\" class=\"rightlean heading\">Internal WO#:</td>\n\t\t\t\t\t<td colspan=\"2\" class=\"rightlean heading\">{{Serial}}</td>\n\t\t\t\t</tr>\n\t\t\t\t<tr> \n\t\t\t\t\t\n\t\t\t\t\t<td colspan=\"3\" class=\"rightlean heading\" >Service To Be Completed By:</td>\n\t\t\t\t\t<td colspan=\"2\" class=\"rightlean heading\" >{{ayDateTime CompleteByDate}}</td>\n\t\t\t\t</tr>\n\t\t\t\t<tr> \n\t\t\t\t\t<td colspan=\"12\" >&nbsp;</td>\n\t\t\t\t</tr>\n\t\t\t\t<tr> \n\t\t\t\t\t<td colspan=\"4\" class=\"heading\">Customer: {{CustomerViz}}</td>\n\t\t\t\t\t<td colspan=\"8\" class=\"leftlean\">{{Address}}, {{City}} PHONE ETC NOT YET EXPOSED IN SAMPLE DATA</td>\t\t\t\t\t\n\t\t\t\t</tr>\n\t\t\t\t<tr>\n\t\t\t\t\t<td colspan=\"12\">&nbsp;</td>\n\t\t\t\t</tr> \t\n\t\t\t\t<tr> \n\t\t\t\t\t<td colspan=\"3\" class=\"leftlean heading\">Summary of work: </td>\n\t\t\t\t\t<td colspan=\"9\" class=\"leftlean\">{{Notes}}</td>\n\t\t\t\t</tr>\n\t\t\t\t<tr> \n\t\t\t\t\t<td colspan=\"3\" class=\"leftlean heading\">Scheduleable User Notes:</td>\n\t\t\t\t\t<td colspan=\"9\" class=\"leftlean\">PROPERTY FOR Scheduleable User Notes NOT YET EXPOSED IN SAMPLE DATA??</td>\n\t\t\t\t</tr>\n\t\t\t\t<tr>\n\t\t\t\t\t<td colspan=\"12\">&nbsp;</td>\n\t\t\t\t</tr> \t \n \t\t</thead>\n \n \t\t<tbody >\n\t\t\t\t{{#each Items}}\n\t\t\t\t\t<tr>\t\t\t\t \n\t\t\t\t\t\t<td colspan=\"12\" class=\"leftlean\" >TechNotes for this work item: {{TechNotes}}</td> \t\n \t\t</tr>\n\n\t\t\t\t\t{{#each Units}}\t\t\t\t\t\t\n\t\t\t\t\t\t<tr>\t\t\t\t \n\t\t\t\t\t\t\t<td colspan=\"12\" class=\"leftlean\" >Unit to be serviced in this work item: {{UnitViz}}</td> \t\n \t\t\t</tr>\n \t\t\t{{/each}}<!--closes the Units -->\n\n\t\t\t\t\t\t<tr>\n\t\t\t\t\t\t\t<td colspan=\"12\">&nbsp;</td>\n\t\t\t\t\t\t</tr>\n\t\t\t\t\t\t<tr>\t\t\t\t \n\t\t\t\t\t\t\t<td colspan=\"3\" class=\"centerlean\" >Scheduled:</td> \n\t\t\t\t\t\t\t<td colspan=\"9\" class=\"centerlean\" >Actual:</td> \t\t\n \t\t\t</tr>\n \t\t\t{{#each ScheduledUsers}}\n \t\t\t\n\t\t\t\t\t\t<tr>\t\t\t\t \n\t\t\t\t\t\t\t<td colspan=\"4\" class=\"leftlean\" >Tech: {{UserViz}}</td>\n\t\t\t\t\t\t\t<td colspan=\"8\" class=\"centerlean\" ></td>\t\t\n \t\t\t</tr>\n\t\t\t\t\t\t<tr>\t\t\t\t \n\t\t\t\t\t\t\t<td colspan=\"1\">&nbsp;</td>\n\t\t\t\t\t\t\t<td colspan=\"3\" class=\"leftlean\" >Expected Start: {{ayDateTime StartDate}}</td>\n\t\t\t\t\t\t\t<td colspan=\"2\" class=\"rightlean\" >Actual Start:</td>\n\t\t\t\t\t\t\t<td colspan=\"6\" class=\"rightlean\" ></td>\t\t\n \t\t\t</tr>\n\t\t\t\t\t\t<tr>\t\t\t\t \n\t\t\t\t\t\t\t<td colspan=\"1\">&nbsp;</td>\n\t\t\t\t\t\t\t<td colspan=\"3\" class=\"leftlean\" >Expected Stop: {{ayDateTime StopDate}}</td>\n\t\t\t\t\t\t\t<td colspan=\"2\" class=\"rightlean\" >Actual Stop:</td>\n\t\t\t\t\t\t\t<td colspan=\"6\" class=\"rightlean\" ></td>\t\t\n \t\t\t</tr>\n\t\t\t\t\t\t<tr>\t\t\t\t \n\t\t\t\t\t\t\t<td colspan=\"1\">&nbsp;</td>\n\t\t\t\t\t\t\t<td colspan=\"3\" class=\"leftlean\" >Expected Rate: {{ServiceRateViz}}</td>\n\t\t\t\t\t\t\t<td colspan=\"2\" class=\"rightlean\" >Actual Rate:</td>\n\t\t\t\t\t\t\t<td colspan=\"6\" class=\"rightlean\" ></td>\t\t\n \t\t\t</tr>\n\t\t\t\t\t\t<tr>\t\t\t\t \n\t\t\t\t\t\t\t<td colspan=\"1\">&nbsp;</td>\n\t\t\t\t\t\t\t<td colspan=\"3\" class=\"leftlean\" >Expected Qty: {{EstimatedQuantity}}</td>\n\t\t\t\t\t\t\t<td colspan=\"2\" class=\"rightlean\" >Actual Qty:</td>\n\t\t\t\t\t\t\t<td colspan=\"6\" class=\"rightlean\" ></td>\t\t\n \t\t\t</tr>\n\t\t\t\t\t\t<tr> \n\t\t\t\t\t\t\t<td colspan=\"12\" >&nbsp;</td>\n\t\t\t\t\t\t</tr>\n \t\t\t{{/each}}<!--closes the ScheduledUsers -->\n\t\t\t\t\t\t\n\t\t\t\t\t\t<tr>\t\t\t\t \n\t\t\t\t\t\t\t<td colspan=\"2\" class=\"centerlean\" >Task Status:</td>\n\t\t\t\t\t\t\t<td colspan=\"1\" class=\"centerlean\" >TickBox:</td> \t\n\t\t\t\t\t\t\t<td colspan=\"9\" class=\"leftlean\" >Task:</td>\t\n \t\t\t</tr>\n\t\t\t\t\t{{#each Tasks}}\t\t\t\t\t\t\n\t\t\t\t\t\t<tr>\t\t\t\t \n\t\t\t\t\t\t\t<td colspan=\"2\" class=\"centerlean\" >{{StatusViz}}</td>\n\t\t\t\t\t\t\t<!-- note that if_eq REQUIRES custom Helper -->\n\t\t\t\t\t\t\t{{#if_eq Status 2}}<td colspan=\"1\" class=\"centerlean\"><input type=\"checkbox\" id=\"manual1\" checked> <label for=\"manual1\"> </label></td>{{else}}<td colspan=\"1\" class=\"centerlean\"><input type=\"checkbox\" id=\"manual1\" > <label for=\"manual1\"> </label></td>{{/if_eq}} <!-- need some way to have this displayed checked IF status is Completed () -->\t\n\t\t\t\t\t\t\t<td colspan=\"9\" class=\"leftlean\" >{{Task}}</td>\t\n \t\t\t</tr>\n \t\t\t{{/each}}<!--closes the Tasks -->\n\n\t\t\t\t\t \t<tr>\t\t\t\t \n\t\t\t\t\t\t\t<td colspan=\"2\" class=\"centerlean\" ></td>\n\t\t\t\t\t\t\t<td colspan=\"1\" class=\"centerlean\"><input type=\"checkbox\" id=\"manual1\"> <label for=\"manual1\"> </label></td> \n\t\t\t\t\t\t\t<td colspan=\"9\" class=\"leftlean\" ></td>\t\n \t\t\t</tr>\n\t\t\t\t\t\t<tr>\t\t\t\t \n\t\t\t\t\t\t\t<td colspan=\"2\" class=\"centerlean\" ></td>\n\t\t\t\t\t\t\t<td colspan=\"1\" class=\"centerlean\"><input type=\"checkbox\" id=\"manual1\"> <label for=\"manual1\"> </label></td> \n\t\t\t\t\t\t\t<td colspan=\"9\" class=\"leftlean\" ></td>\t\n \t\t\t</tr>\n\n\t\t\t\t\t\t<tr> \n\t\t\t\t\t\t\t<td colspan=\"12\" >&nbsp;</td>\n\t\t\t\t\t\t</tr>\n\t\t\t\t\t\t<tr>\n\t\t\t\t\t\t\t<td colspan=\"1\" class=\"centerlean\" >Need to add to wo?</td>\n\t\t\t\t\t\t\t<td colspan=\"1\" class=\"centerlean\" >Qty</td> \n\t\t\t\t\t\t\t<td colspan=\"2\" class=\"centerlean\" >Warehouse</td>\n\t\t\t\t\t\t\t<td colspan=\"8\" class=\"leftlean\"> Part:</td>\t\t\n \t\t\t</tr>\n\t\t\t\t\t{{#each Parts}}\n \t\t\t<tr>\n\t\t\t\t\t\t\t<td colspan=\"1\" >&nbsp;</td>\n\t\t\t\t\t\t\t<td colspan=\"1\" class=\"centerlean\" >{{Quantity}}</td> \n\t\t\t\t\t\t\t<td colspan=\"2\" class=\"centerlean\" >{{PartWarehouseViz}}</td>\t\n\t\t\t\t\t\t\t<!--below if includes a label Seria#: and displays serial numbers IF they are present, else only shows the displayed Part -->\n\t\t\t\t\t\t\t{{#if Serials}} <td colspan=\"8\" class=\"leftlean\">{{PartViz}} &nbsp;&nbsp; Serial#: {{Serials}} </td> {{else}}\t <td colspan=\"8\" class=\"leftlean\">{{PartViz}}</td> {{/if}}\n \t\t\t</tr>\n \t\t\t{{/each}} <!--closes the Parts -->\n\t\t\t\t\t \n\t\t\t\t\t \n\t\t\t\t\t <tr>\n\t\t\t\t\t\t\t<td colspan=\"1\" class=\"centerlean\"><input type=\"checkbox\" id=\"manual2\"> <label for=\"manual2\"> </label></td>\n\t\t\t\t\t\t\t<td colspan=\"1\" class=\"centerlean\" ></td> \n\t\t\t\t\t\t\t<td colspan=\"2\" class=\"centerlean\" ></td>\t\n\t\t\t\t\t\t\t<td colspan=\"8\" class=\"leftlean\"></td>\t\n \t\t\t</tr>\n\t\t\t\t\t\t<tr>\n\t\t\t\t\t\t\t<td colspan=\"1\" class=\"centerlean\"><input type=\"checkbox\" id=\"manual2\"> <label for=\"manual2\"> </label></td>\n\t\t\t\t\t\t\t<td colspan=\"1\" class=\"centerlean\" ></td> \n\t\t\t\t\t\t\t<td colspan=\"2\" class=\"centerlean\" ></td>\t\n\t\t\t\t\t\t\t<td colspan=\"8\" class=\"leftlean\"></td>\t\n \t\t\t</tr>\n\t\t\t\t\t\t<tr> \n\t\t\t\t\t\t\t<td colspan=\"12\" >&nbsp;</td>\n\t\t\t\t\t\t</tr>\n\t\t\t\t\t\t<tr>\n\t\t\t\t\t\t\t<td colspan=\"3\" class=\"leftlean\">Additional Details of service:</td>\n\t\t\t\t\t\t\t<td colspan=\"9\" class=\"centerlean\" ></td>\n \t\t\t</tr>\n\t\t\t\t\t\t<tr> \n\t\t\t\t\t\t\t<td colspan=\"12\" >&nbsp;</td>\n\t\t\t\t\t\t</tr>\n\t\t\t\t\t\t<tr> \n\t\t\t\t\t\t\t<td colspan=\"12\" >&nbsp;</td>\n\t\t\t\t\t\t</tr>\n\n\t\t\t\t{{/each}} <!--closes the Items -->\n\t\t\t</tbody> \n\n\t\t\t<tfoot> \n\t\t\t\t<tr>\n\t\t\t\t\t<td colspan=\"12\">&nbsp;</td>\n\t\t\t\t</tr>\n\t\t\t\t<tr>\n\t\t\t\t\t<td colspan=\"12\">&nbsp;</td>\n\t\t\t\t</tr> \n\t\t\t\t<tr > \n\t\t\t\t\t<td colspan=\"2\">Tech Signature:</td>\n\t\t\t\t\t{{#if TechSignature}} <td colspan=\"4\" class=\"leftlean\" > {{TechSignature}} </td> {{else}} <td colspan=\"4\" class=\"leftlean\"> ________________________________________</td> {{/if}}\n\t\t\t\t\t<td colspan=\"2\">Client Signature:</td> \n\t\t\t\t\t{{#if CustomerSignature}} <td colspan=\"4\"> {{CustomerSignature}} </td> {{else}} <td colspan=\"4\"> __________________________________________</td> {{/if}}\n\t\t\t\t</tr> \n\t\t\t\t<tr>\n\t\t\t\t\t<td colspan=\"12\">&nbsp;</td>\n\t\t\t\t</tr>\n\t\t\t\t<tr>\n\t\t\t\t\t<td colspan=\"12\">&nbsp;</td>\n\t\t\t\t</tr> \n\t\t\t\t<tr > \n\t\t\t\t\t<td colspan=\"2\">Date:</td>\n\t\t\t\t\t{{#if TechSignatureCaptured}} <td colspan=\"4\" class=\"leftlean\"> {{TechSignatureCaptured}} </td> {{else}} <td colspan=\"4\" class=\"leftlean\"> ________________________________________</td> {{/if}} \n\t\t\t\t\t<td colspan=\"2\">Date:</td> \n\t\t\t\t\t{{#if CustomerSignatureCaptured}} <td colspan=\"4\"> {{CustomerSignatureCaptured}} </td> {{else}} <td colspan=\"4\"> __________________________________________</td> {{/if}} \n\t\t\t\t</tr> \n\t\t\t\t<tr>\n\t\t\t\t\t<td colspan=\"12\">&nbsp;</td>\n\t\t\t\t</tr> \n \t</tfoot>\n </table>\n\n {{/each}}\n\n\n\t\t</div>\n\t</body>\n</html>","Style":"/* if not using a rule set or specific property it is recommended to comment out or delete fully for report performance*/\n\n.singlePage\n{\npage-break-after: always;\n}\n\ntable { \n table-layout: fixed; //setting this to fixed causes columns to be evenly spaced for the entire table regardless of cell content, and then colspan then \"works\" as expected\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 /* NOTE if this IS here in your CSS but your thead contents are NOT displaying on subsequent pages (i.e. page 2 of a wo), you NEED to edit your thead so it is NO MORE than approx 20% of the page */\n}\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: 10pt; \n} \n\ntbody tr:nth-child(even) {\n font-size: 9pt;\n background-color: lightgray; /* MUST checkmark Print background in PDF Options for this to show */\n} \ntbody tr:nth-child(odd) {\n font-size: 9pt;\n background-color: lightgoldenrodyellow; /* MUST checkmark Print background in PDF Options for this to show */\n} \n\ntfoot {\n display: table-footer-group; \n page-break-inside: avoid; \n font-size: 8pt; \n bottom: 0;\n width: 100%;\n border-top: 1px solid black; \n}\n\n.fontgreen {\n color: green;\n}\n.fontblue {\n color: blue;\n}\n.fontred {\n color:red;\n}\n\n\n.rightlean {\n text-align: right;\n}\n.leftlean {\n text-align: left;\n}\n.centerlean {\n text-align: center;\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 //see the help documentation for details\n return reportData;\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});\n","RenderType":0,"HeaderTemplate":"<span style=\"font-size:6pt;width: 94%; text-align:left; \">&nbsp;&nbsp;&nbsp;&nbsp;(from PDF Options) Printed date:&nbsp;<span class=\"date\"></span></span>","FooterTemplate":"<span style=\"font-size:6pt;width: 94%; text-align: right; \">&nbsp; this is set in PDF Options&nbsp;&nbsp;Note this is all pages of report&nbsp;&nbsp;Page&nbsp;<span class=\"pageNumber\"></span>&nbsp;of&nbsp;<span class=\"totalPages\"></span>&nbsp;&nbsp;&nbsp;&nbsp;</span>","DisplayHeaderFooter":true,"PaperFormat":10,"Landscape":false,"MarginOptionsBottom":"10mm","MarginOptionsLeft":"10mm","MarginOptionsRight":"10mm","MarginOptionsTop":"10mm","PageRanges":null,"PreferCSSPageSize":false,"PrintBackground":true,"Scale":1.00000}