Files
raven/server/AyaNova/resource/rpt/stock-report-templates/Inventory Reconciliation Form Grouped By Warehouse.ayrt
2022-01-21 18:49:58 +00:00

1 line
6.0 KiB
Plaintext

{"Name":"Inventory Reconciliation Form Grouped By Warehouse","Active":true,"Notes":"Custom Prepare iterates through all the records in the reportData obtaining a running total of ReOrderQty for each group; \nPrepare uses ayGroupByKey to group by PartWarehouseName","Roles":49258,"AType":90,"IncludeWoItemDescendants":false,"Template":"<html>\n<body>\n\t<div>\n\t\t<div class=\"reporttitle\">\n\t\t\t<p>{{ayServerMetaData.CompanyName}} Inventory Reconciliation Form Grouped By {{ayT 'PartWarehouse'}}</p>\n\t\t</div>\t \n\n\t\t<table> \n\t\t\t<thead>\n\t\t\t\t<tr>\n\t\t\t\t\t<th colspan=\"3\">&nbsp;</th>\n\t\t\t\t\t<th colspan=\"8\">{{ayT 'Part'}}</th>\n\t\t\t\t\t<th colspan=\"4\">{{ayT 'Tags'}}</th>\n\t\t\t\t\t<th colspan=\"3\">{{ayT 'PartRetail'}}</th>\n\t\t\t\t\t<th colspan=\"2\">{{ayT 'PartByWarehouseInventoryQuantityOnHand'}}</th>\n\t\t\t\t\t<th colspan=\"2\">Actual Count</th>\n\t\t\t\t\t<th colspan=\"2\">Difference + / (-)</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<tr>\n\t\t\t\t\t<th colspan=\"4\" >{{ayT 'PartWarehouse'}}:&nbsp;</th>\n\t\t\t\t\t<td colspan=\"20\">&nbsp;&nbsp;&nbsp;{{group}}</td>\n\t\t\t\t</tr>\n\t\t\t\t\t{{#each items}}\n\t\t\t\t\t<tr>\n\t\t\t\t\t\t<td colspan=\"3\"></td>\n\t\t\t\t\t\t<td colspan=\"8\" class=\"centerlean\">{{PartName}} {{PartDescription}}</td>\n\t\t\t\t\t\t<td colspan=\"4\" class=\"centerlean\">{{PartTags}}</td>\n\t\t\t\t\t\t<td colspan=\"3\" class=\"centerlean\">{{ayCurrency PartRetail}}</td>\n\t\t\t\t\t\t<td colspan=\"2\" class=\"centerlean\">{{OnHandQty}}</td>\t\t\t\t\t\n\t\t\t\t\t\t<td colspan=\"2\">&nbsp;</td>\n\t\t\t\t\t\t<td colspan=\"2\">&nbsp;</td>\n\t\t\t\t\t</tr>\n\t\t\t\t\t{{/each}}\n\t\t\t\t<tr>\n\t\t\t\t\t<td colspan=\"24\" class=\"rightlean\">{{count}} different parts in {{ayT 'PartWarehouse'}} {{group}}</td>\n\t\t\t\t</tr>\n\t\t\t\t<tr>\n\t\t\t\t\t<td colspan=\"24\" class=\"rightlean\">Total {{ayT 'PartByWarehouseInventoryQuantityOnHand'}} for {{ayT 'PartWarehouse'}} {{group}}:&emsp;{{ThisGroupTotalQty}}</td>\n\t\t\t\t</tr>\n\t\t\t\t<tr>\n\t\t\t\t\t<td colspan=\"24\">&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\n\t\t\t<tfoot>\n\t\t\t\t<tr>\n\t\t\t\t<td colspan=\"24\">&nbsp;</td>\n\t\t\t\t</tr>\n\t\t\t\t<tr>\n\t\t\t\t<td colspan=\"3\">Count By:</td>\n\t\t\t\t<td colspan=\"9\">________________________________________</td>\n\t\t\t\t<td colspan=\"3\" >Count Date:</td>\n\t\t\t\t<td colspan=\"9\">________________________________________</td>\n\t\t\t\t</tr>\n\t\t\t\t<tr>\n\t\t\t\t<td colspan=\"24\">&nbsp;</td>\n\t\t\t\t</tr>\n\t\t\t\t<tr>\n\t\t\t\t<td colspan=\"24\">&nbsp;</td>\n\t\t\t\t</tr>\n\t\t\t\t<tr>\n\t\t\t\t<td colspan=\"3\">Signature:</td>\n\t\t\t\t<td colspan=\"9\">________________________________________</td>\n\t\t\t\t<td colspan=\"12\"></td>\n\t\t\t\t</tr>\n\t\t\t </tfoot>\n\t\t</table>\n\t</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; \n }\n\nth {\n height: 50px;\n font-size: 11pt; \n color: #9e9e9e;\n}\ntfoot {\n border-top: solid 1pt #9e9e9e; \n height: 30px;\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":"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, 'PartWarehouseName')\n\n await ayGetTranslations([\"PartWarehouse\", \"PartByWarehouseInventoryQuantityOnHand\", \"Tags\", \"PartRetail\", \"Part\" ]);\n\n //Iterate through all the records in the reportData obtaining a running total of ReOrderQty for each group\n for (const EachGroup of ayData.ayReportData) \n { \n let ThisGroupTotalQty = 0; //Declare a temporary variable to hold the running Qty total for THIS group\n for (const 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.OnHandQty != null) \n {\n ThisGroupTotalQty += Item.OnHandQty;\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>&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":"10mm","MarginOptionsRight":"20mm","MarginOptionsTop":"10mm","PageRanges":null,"PreferCSSPageSize":false,"PrintBackground":true,"Scale":1.00000}