Files
raven/server/AyaNova/resource/rpt/stock-report-templates/Customer Service Requests grouped by Customer.ayrt
2022-01-11 23:23:41 +00:00

1 line
4.6 KiB
Plaintext

{"Name":"Customer Service Requests grouped by Customer","Active":true,"Notes":"","Roles":50666,"AType":54,"IncludeWoItemDescendants":false,"Template":"<html>\n\n<body>\n\t<div>\n\t\t<div class=\"reporttitle\">\n\t\t\t<p>{{ayT 'CustomerServiceRequestList'}} grouped by {{ayT 'Customer'}}</p>\n\t\t</div>\n\t\t<table>\n\t\t\t<thead>\n\t\t\t</thead>\n\n\t\t\t<tbody>\n\t\t\t\t{{#each ayReportData}}\n\t\t\t\t<tr>\n\t\t\t\t\t<th colspan=\"3\" class=\"bigfont leftlean\">{{ayT 'Customer'}}: </th>\n\t\t\t\t\t<td colspan=\"14\" class=\"bigfont leftlean\"> {{group}}</td>\n\t\t\t\t</tr>\n\t\t\t\t<tr>\n\t\t\t\t\t<th colspan=\"2\">&nbsp;</th>\n\t\t\t\t\t<th colspan=\"3\">Date Requested</th>\n\t\t\t\t\t<th colspan=\"3\">{{ayT 'CustomerServiceRequestStatus'}}</th>\n\t\t\t\t\t<th colspan=\"3\">{{ayT 'CustomerServiceRequestPriority'}}</th>\n\t\t\t\t\t<th colspan=\"3\">{{ayT 'WorkOrder'}}</th>\n\t\t\t\t\t<th colspan=\"3\">{{ayT 'CustomerServiceRequestRequestedBy'}}</th>\n\t\t\t\t</tr>\n\t\t\t\t{{#each items}}\n\t\t\t\t<tr>\n\t\t\t\t\t<td colspan=\"2\">&nbsp;</td>\n\t\t\t\t\t<td colspan=\"3\">{{ayDateTime DateRequested}}</td>\n\t\t\t\t\t{{#if_eq Status \"0\"}}<td colspan=\"3\" class=\"fontred\">{{StatusViz}}</td>{{else}}<td colspan=\"3\">{{StatusViz}}</td>{{/if_eq}} <!-- this if_eq is from the custom Helper -->\n\t\t\t\t\t<td colspan=\"3\">{{PriorityViz}}</td>\n\t\t\t\t\t{{#if WorkOrderSerialViz}}<td colspan=\"3\">{{WorkOrderSerialViz}}</td>{{else}}<td colspan=\"3\" class=\"fontred\">Not yet assigned</td>{{/if}}\n\t\t\t\t\t<td colspan=\"3\">{{RequestedByUserViz}}</td>\n\t\t\t\t</tr>\n\t\t\t\t{{/each}}\n\t\t\t\t<tr>\n\t\t\t\t\t<th colspan=\"17\" class=\"rightlean\">{{count}} {{ayT 'CustomerServiceRequestList'}} for {{ayT 'Customer'}} {{group}}</th>\n\t\t\t\t</tr>\n\t\t\t\t<tr>\n\t\t\t\t\t<td colspan=\"17\">&nbsp;</td>\n\t\t\t\t</tr>\n\t\t\t\t\n\t\t\t\t{{/each}}\n\t\t\t</tbody>\n\t\t</table>\n\t</div>\n</body>\n</html>","Style":".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.bigfont {\r\n font-size: 13pt;\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; \r\n }\r\n\r\nth {\r\n height: 10px;\r\n font-size: 11pt; \r\n color: #9e9e9e;\r\n \r\n}\r\n\r\ntbody td {\r\n padding: 5px;\r\n word-wrap: break-word;\r\n font-size: 10pt;\r\n text-align: center;\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 font-size: 16pt;\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(ayData) {\n\n //send the raw report data to the groupByKey function which will return a new array grouped by the key name provided\n ayData.ayReportData = ayGroupByKey(ayData.ayReportData, 'CustomerViz')\n\n await ayGetTranslations([\"CustomerServiceRequestList\", \"Customer\", \"CustomerServiceRequestRequestedBy\", \"WorkOrder\", \"CustomerServiceRequestPriority\", \"CustomerServiceRequestStatus\" ]);\n\n\n //return the data into the pipeline to send to the report template\n return ayData;\n}","JsHelpers":"//custom helper so can do a direct comparison - i.e. if value equals xxxx, then show, else show yyyyy\r\n//note that this HAS to be added here in Helpers, is NOT built in\r\nHandlebars.registerHelper('if_eq', function(a, b, opts) {\r\n if(a == b) // Or === depending on your needs\r\n return opts.fn(this);\r\n else\r\n return opts.inverse(this);\r\n});\r\n","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":"20mm","MarginOptionsLeft":"20mm","MarginOptionsRight":"15mm","MarginOptionsTop":"10mm","PageRanges":null,"PreferCSSPageSize":false,"PrintBackground":true,"Scale":1.00000}