1 line
5.8 KiB
Plaintext
1 line
5.8 KiB
Plaintext
{"Name":"Part Requests Grouped By Wholesaler","Active":true,"Notes":"","Roles":124927,"AType":91,"IncludeWoItemDescendants":false,"Template":"<html>\n\n<body>\n\t<div>\n\t\t<div class=\"reporttitle\">\n\t\t\t<p>{{ayT 'WorkOrderItemPartRequests'}} grouped by {{ayT 'PartWholesalerID'}}</p>\n\t\t</div>\n\t\t<table>\n\t\t\t<thead>\n\t\t\t\t<tr>\n\t\t\t\t\t<th colspan=\"1\"></th>\n\t\t\t\t\t<th colspan=\"4\">{{ayT 'Part'}}</th>\n\t\t\t\t\t<th colspan=\"2\">{{ayT 'QuantityRequired'}}</th>\n\t\t\t\t\t<th colspan=\"3\">{{ayT 'WorkOrderItemPartPartWarehouseID'}}</th>\n\t\t\t\t\t<th colspan=\"3\">Date Requested</th>\n\t\t\t\t\t<th colspan=\"2\">{{ayT 'PurchaseOrderPONumber'}}</th>\n\t\t\t\t\t<th colspan=\"3\">{{ayT 'PurchaseOrderOrderedDate'}}</th>\n\t\t\t\t\t<th colspan=\"4\">{{ayT 'PurchaseOrderItemUIOrderedFrom'}}</th>\n\t\t\t\t\t<th colspan=\"2\">{{ayT 'PurchaseOrderExpectedReceiveDate'}}</th>\n\t\t\t\t</tr>\n\t\t\t</thead>\n\n\t\t\t<tbody>\n\t\t\t\t{{#each ayReportData}}\n\t\t\t\t<!-- 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\t\t\t\t<!-- to get alternating coloured rows when one PO per line, need CSS statements PLUS this # each MUST be placed BEFORE the tr /tr -->\n\t\t\t\t<tr>\n\t\t\t\t\t<th colspan=\"3\" >{{ayT 'PartWholesalerID'}}: </th>\n\t\t\t\t\t<td colspan=\"21\"> {{group}}</td>\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=\"1\"> </td>\n\t\t\t\t\t<td colspan=\"4\">{{PartName}}</td>\n\t\t\t\t\t<td colspan=\"2\">{{Quantity}}</td>\n\t\t\t\t\t<td colspan=\"3\">{{PartWarehouseName}}</td>\n\t\t\t\t\t<td colspan=\"3\">{{ayDate RequestDate}}</td>\n\t\t\t\t\t<td colspan=\"2\">{{PurchaseOrderSerial}}</td>\n\t\t\t\t\t<td colspan=\"3\">{{ayDate OrderedDate}}</td>\n\t\t\t\t\t<td colspan=\"4\">{{PurchaseOrderVendor}}</td>\n\t\t\t\t\t<td colspan=\"2\">{{ayDate ExpectedReceiveDate}}</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=\"22\" class=\"rightlean\"># of {{ayT 'WorkOrderItemPartRequests'}} for {{ayT 'PartWholesalerID'}} {{group}}: </th>\n\t\t\t\t\t<td colspan=\"2\">{{count}}</td>\n\t\t\t\t</tr>\n\t\t\t\t<tr>\n\t\t\t\t\t<th colspan=\"22\" class=\"rightlean\">Total {{ayT 'QuantityRequired'}} of {{ayT 'PartList'}} for {{ayT 'PartWholesalerID'}} {{group}}: </th>\n\t\t\t\t\t<td colspan=\"2\">{{ThisGroupTotalQty}}</td>\n\t\t\t\t</tr>\n\t\t\t\t<tr>\n\t\t\t\t\t<td colspan=\"24\"> </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.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; /* the # of columns set in the first row of the thead will be fixed and applied throughout table and rows */\r\n }\r\n\r\nth {\r\n /* border-bottom: solid 1pt #9e9e9e; */\r\n height: 50px;\r\n font-size: 11pt; \r\n color: #9e9e9e;\r\n}\r\n\r\ntbody td {\r\n padding: 10px;\r\n word-wrap: break-word;\r\n font-size: 9pt;\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, 'WholesalerName')\n\n await ayGetTranslations([\"WorkOrderItemPartRequests\", \"PartWholesalerID\", \"Part\", \"QuantityRequired\", \"WorkOrderItemPartPartWarehouseID\", \"PurchaseOrderPONumber\", \"PurchaseOrderOrderedDate\", \"PurchaseOrderItemUIOrderedFrom\", \"PurchaseOrderExpectedReceiveDate\", \"PartList\" ]);\n\n //Iterate through all the records in the reportData obtaining a running total of Quantity for each group\n for (EachGroup of ayData.ayReportData) \n { \n let ThisGroupTotalQty = 0; //Declare a temporary variable to hold the running Qty total for THIS group\n for (Item of EachGroup.items) //Iterate through all the poitems of THIS po adding the Qty amount of each item to the ThisPOTotalQty variable\n {\n //make sure it has a value before attempting to add it to the running total\n if (Item.Quantity != null) \n {\n ThisGroupTotalQty += Item.Quantity;\n }\n Item.QuantityRunning=ThisGroupTotalQty;\n }\n EachGroup.ThisGroupTotalQty=ThisGroupTotalQty;\n\n\n }\n\n //return the data into the pipeline to send to the report template\n return ayData;\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":"20mm","MarginOptionsLeft":"20mm","MarginOptionsRight":"15mm","MarginOptionsTop":"10mm","PageRanges":null,"PreferCSSPageSize":false,"PrintBackground":true,"Scale":1.00000} |