Files
raven/server/AyaNova/resource/rpt/stock-report-templates/109x EXAMPLE PO showing ordered received including serial numbers.ayrt
2021-11-23 00:06:39 +00:00

1 line
16 KiB
Plaintext

{"Name":"💡109x EXAMPLE PO showing ordered received including serial numbers","Active":true,"Notes":"TO DO: PartName property as not yet in Sample Data; example Prepare for running nets and total\n","Roles":124927,"AType":26,"IncludeWoItemDescendants":false,"Template":"<html>\n<body>\n\n\n\n\t<div >\t\n {{#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<!-- the css to start a new page when a new object -->\n \t\t<thead> <!--table header will repeat on multiple pages if total thead content is less than 25% of page - IF NOT SHOWING ON 2nd PAGE of PO, is because is too high - note css -->\n <tr>\n <td colspan=\"3\" class=\"centerlean heading\">{{ayLogo 'small'}} </td>\n <td colspan=\"2\" class=\"rightlean heading\">Our Internal PO#:</td>\n <td colspan=\"2\" class=\"leftlean heading fontgreen\">{{Serial}}</td>\n <td colspan=\"3\" class=\"rightlean heading\">Addt'l Ref #:</td>\n <td colspan=\"2\" class=\"rightlean heading fontgreen\"> {{ReferenceNumber}}</td>\n </tr>\n <tr> \n <td colspan=\"7\" class=\"fontgreen\" >data from ayReportData shows in greenfont </td>\n <td colspan=\"3\" class=\"rightlean\">Ordered Date:</td> \n <td colspan=\"2\" class=\"rightlean fontgreen\"> {{ayDate OrderedDate}}</td> \n </tr>\n <tr>\n <td colspan=\"7\" class=\"fontblue\" >data derived from Prepare shows in bluefont</td>\n <td colspan=\"3\" class=\"rightlean\">ETA Date: {{ayDate ExpectedReceiveDate}}</td> \n <td colspan=\"2\" class=\"rightlean fontgreen\">{{ayDate ExpectedReceiveDate}}</td> \n </tr>\n <tr> \n <td colspan=\"7\" class=\"fontred\" >data derived from Helper shows in redfont</td>\n <td colspan=\"3\" class=\"rightlean\">Todays date from Helper:</td> \n <td colspan=\"2\" class=\"rightlean fontred\"> {{todaysMonthDDYYYYDate}}</td> \n </tr>\n <tr> \n <td colspan=\"5\" class=\"heading\">VENDOR:</td>\n <td colspan=\"2\" class=\"centerlean heading\"></td>\n <td colspan=\"5\" class=\"rightlean heading\">DELIVER TO:</td>\n </tr>\n <tr>\n <td colspan=\"5\" class=\"fontgreen\" >{{VendorViz}}</td> \n <td colspan=\"2\" class=\"centerlean\"></td> \n {{#if DropShipToCustomerViz}}<td colspan=\"5\" class=\"rightlean fontgreen\">{{DropShipToCustomerViz}}</td>{{else}} <td colspan=\"5\" class=\"rightlean\">My Company Name</td>{{/if}}\n <!-- above if else checks to see if DropShipToCustomerViz is null or not. If not null, shows value. Else (as is null) shows static My Company Name -->\n </tr> \n <tr>\n <td colspan=\"5\" >unsure where to get vendor contact information</td> <!-- unsure where to get this from? --> \n <td colspan=\"2\" class=\"centerlean\"></td> \n {{#if DropShipToCustomerViz}}<td colspan=\"5\"class=\"rightlean fontgreen\" >customer contact data unknown how to get</td>{{else}} <td colspan=\"5\"class=\"rightlean\" >123 - 123 MyStreetname Ave My City, My State, My Postal</td>{{/if}} \n <!-- above if else checks to see if DropShipToCustomerViz is null or not. If not null, shows value - at this time unsure where to get customer's address etc from. Else if null shows static My Company Name -->\n </tr>\n\n <tr>\n <td colspan=\"5\" >vendor contact not part of dataset</td>\n <td colspan=\"2\" class=\"centerlean\"></td>\n {{#if DropShipToCustomerViz}}<td colspan=\"5\" class=\"rightlean fontgreen\">customer contact data unknown how to get</td>{{else}} <td colspan=\"5\" class=\"rightlean\">Ordered By: creator Phone: creatorphone</td>{{/if}}\n </tr>\n\n <tr>\n <td colspan=\"12\">&nbsp;</td>\n </tr>\n \n <tr > \n\t\t\t<td colspan=\"1\" class=\"centerlean heading\" >Part#:</td>\n\t\t\t<td colspan=\"1\" class=\"centerlean heading\" >Part Name:</td>\n\t\t\t<td colspan=\"4\" class=\"centerlean heading\" >Serials Received#:</td>\n\t\t\t<td colspan=\"1\" class=\"centerlean heading\" >Qty</td> \n\t\t\t<td colspan=\"1\" class=\"centerlean heading\" >Price Per:</td>\n\t\t\t<td colspan=\"1\" class=\"centerlean heading\" >Net:</td>\n\t\t\t<td colspan=\"1\" class=\"centerlean heading\" >Tax A:</td>\n\t\t\t<td colspan=\"1\" class=\"centerlean heading\" >Tax B:</td>\n\t\t\t<td class=\"rightlean heading\" colspan=\"1\" >Line Total:</td> \n </tr> \n </thead>\n \n \t\t<tbody >\n\t\t\t\t{{#each Items}} <!-- place the # each within the tbody before the tr - basically, for each row display the following -->\n\t\t\t\t<tr>\t\t\t\t\n\t\t\t\t <td colspan=\"1\" class=\"fontgreen\" >{{PartNameViz}}</td>\n {{#if PartNameViz}}<td colspan=\"1\" class=\"fontgreen\" >{{PartNameViz}}</td>{{else}}<td class=\" fontsmall\" >no part name has been entered</td> {{/if}}\n <!-- below explanation of #if helper - if xxx has a value then display the value, else display the text-->\n {{#if Serials}}<td colspan=\"4\" class=\"fontgreen fontsmall\" >{{Serials}}</td>{{else}}<td colspan=\"4\" class=\" fontsmall\" >no serials entered as received</td> {{/if}}\n \t\t<td colspan=\"1\" class=\"centerlean fontgreen\" >{{QuantityOrdered}}</td> \n \t\t<td colspan=\"1\" class=\"centerlean fontgreen\" >{{ayCurrency PurchaseOrderCost}}</td>\n \t\t<td colspan=\"1\" class=\"centerlean fontgreen\" >{{ayCurrency NetTotalViz}}</td>\n <!-- below explanation of #if helper - if xxx has a value then display the value, else display 0.00-->\n \t\t{{#if TaxAViz}}<td colspan=\"1\" class=\"centerlean fontgreen\" >{{ayCurrency TaxAViz}}</td>{{else}} <td colspan=\"1\" class=\"centerlean fontgreen\" >0.00</td>{{/if}} \n \t\t{{#if TaxBViz}}<td colspan=\"1\" class=\"centerlean fontgreen\" >{{ayCurrency TaxBViz}}</td>{{else}} <td colspan=\"1\" class=\"centerlean fontgreen\" >0.00</td>{{/if}}\n \t\t<td colspan=\"1\" class=\"rightlean fontgreen\">{{ayCurrency LineTotalViz}}</td> \t\t\n\t\t\t\t</tr>\n\t\t\t \t{{/each}}\n\t\t\t</tbody>\n \n <tfoot> \n <tr>\n\t\t\t<td colspan=\"12\">&nbsp;</td>\n\t\t</tr>\n\t\t<tr > \n\t\t\t<td colspan=\"6\" ></td>\n\t\t\t<td colspan=\"1\" class=\"centerlean heading\" >Total Qty Count</td> \n\t\t\t<td colspan=\"1\" class=\"centerlean heading\" ></td>\n\t\t\t<td colspan=\"1\" class=\"centerlean heading\" >Total Net</td>\n\t\t\t<td colspan=\"1\" class=\"centerlean heading\" >Total Tax A:</td>\n\t\t\t<td colspan=\"1\" class=\"centerlean heading\" >Total Tax B:</td>\n\t\t\t<td class=\"rightlean heading\" colspan=\"1\" >PO Total:</td> \n </tr> \n\t\t <tr > \n\t\t\t<td colspan=\"6\" ></td>\n\t\t\t<td colspan=\"1\" class=\"centerlean fontblue\" >{{ThisPOQty}}</td> \n\t\t\t<td colspan=\"1\" ></td>\n\t\t\t<td colspan=\"1\" class=\"centerlean fontblue\" >{{ ayCurrency ThisPONet }}</td>\n\t\t\t{{#if ThisPOTaxA}}<td colspan=\"1\" class=\"centerlean fontblue\">{{ ayCurrency ThisPOTaxA }}</td>{{else}} <td class=\"centerlean\" >0.00</td>{{/if}}\n\t\t\t{{#if ThisPOTaxB}}<td colspan=\"1\" class=\"centerlean fontblue\">{{ ayCurrency ThisPOTaxB }}</td>{{else}} <td class=\"centerlean\" >0.00</td>{{/if}}\n\t\t\t<td colspan=\"1\" class=\"rightlean fontblue\" >{{ ayCurrency ThisPODollarAmount }}</td> \n </tr>\n\t\t\n </tfoot>\n \n\t\t</table>\n {{/each}}\n\t</div>\n</body>\n</html>","Style":".singlePage\n{\npage-break-after: always;\n}\n\ntable { \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}\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: 12pt; \n} \n\ntbody tr:nth-child(even) {\n font-size: 14pt;\n background-color: lightgray; /* MUST checkmark Print background in PDF Options for this to show */\n} \ntbody tr:nth-child(odd) {\n font-size: 14pt;\n background-color: lightgoldenrodyellow; /* MUST checkmark Print background in PDF Options for this to show */\n} \n\ntfoot {\n display: table-footer-group; /* so as to print the table-footer on all subsequent pages */\n page-break-inside: avoid;\n font-size: 12pt; \n bottom: 0;\n width: 90%;\n border-top: 1px solid black;\n\n}\n\n.fontsmall {\n font-size: 8px;\n}\n.fontgreen {\n color: green;\n}\n.fontblue {\n color: blue;\n}\n.fontred {\n color:red;\n}\n.rightlean {\n text-align: right;\n}\n.leftlean {\n text-align: left;\n}\n.centerlean {\n text-align: center;\n}\n","JsPrerender":"async function ayPrepareData(reportData) {\n //Example of both manipulating the reportData before rendering the report (by adding a running total field)\n //and adding a field to the overall data calculating the total dollar amount for all records\n\nlet AllPONet = 0; //Declare a temporary variable to hold the running net total for all POs in this list\n //Iterate through all the records in the reportData adding the dollar amount of each item to the AllPONet variable\n for (EachPO of reportData.ayReportData) \n {\n let ThisPONet = 0; //Declare a temporary variable to hold the running net total for THIS po\n for (Item of EachPO.Items) //Iterate through all the poitems of THIS po adding the dollar amount of each item to the ThisPONet variable\n {\n //make sure it has a value before attempting to add it to the running total\n if (Item.NetTotalViz != null) \n {\n ThisPONet += Item.NetTotalViz;\n }\n Item.PONetRunning=ThisPONet;\n }\n EachPO.ThisPONet=ThisPONet;\n AllPONet += ThisPONet; //Use ThisPONet to display the running Net total for THIS PO\n }\n //Add the AllPONet variable to the reportData so it can be accessed in the report template i.e. a final running total of ALL PO's Net\n reportData.AllPONetRunning=AllPONet;\n \nlet AllPOTaxA = 0; //Declare a temporary variable to hold the running Tax A total for all POs in the list\n //Iterate through all the records in the reportData adding the Tax A dollar amount of each item to the AllPOTaxA variable\n for (EachPO of reportData.ayReportData) \n {\n let ThisPOTaxA = 0; //Declare a temporary variable to hold the running Tax A total for THIS po\n for (Item of EachPO.Items) //Iterate through all the poitems of THIS po adding the dollar amount of each item to the ThisPOTaxA variable\n {\n //make sure it has a value before attempting to add it to the running total\n if (Item.TaxAViz != null) \n {\n ThisPOTaxA += Item.TaxAViz;\n }\n Item.POTaxARunning=ThisPOTaxA;\n }\n EachPO.ThisPOTaxA=ThisPOTaxA;\n AllPOTaxA += ThisPOTaxA; // Use ThisPOTaxA to display the running Tax A total for THIS PO\n }\n //Add the AllPONet variable to the reportData so it can be accessed in the report template i.e. a final running total of ALL PO's Tax A\n reportData.AllPOTaxARunning=AllPOTaxA; \n \nlet AllPOTaxB = 0; //Declare a temporary variable to hold the running Tax B total for all POs in the list\n //Iterate through all the records in the reportData adding the Tax B dollar amount of each item to the AllPOTaxA variable\n for (EachPO of reportData.ayReportData) \n {\n let ThisPOTaxB = 0; //Declare a temporary variable to hold the running Tax B total for THIS po\n for (Item of EachPO.Items) //Iterate through all the poitems of THIS po adding the dollar amount of each item to the ThisPOTaxB variable\n {\n //make sure it has a value before attempting to add it to the running total\n if (Item.TaxBViz != null) \n {\n ThisPOTaxB += Item.TaxBViz;\n }\n Item.POTaxBRunning=ThisPOTaxB;\n }\n EachPO.ThisPOTaxB=ThisPOTaxB;\n AllPOTaxB += ThisPOTaxB; // Use ThisPOTaxB to display the running Tax B total for THIS PO\n }\n //Add the AllPOTaxB variable to the reportData so it can be accessed in the report template i.e. a final running total of ALL PO's Tax B\n reportData.AllPOTaxBRunning=AllPOTaxB; \n\nlet AllPOQty = 0; //Declare a temporary variable to hold the running Tax B total for all POs in the list\n //Iterate through all the records in the reportData adding the Tax B dollar amount of each item to the AllPOTaxA variable\n for (EachPO of reportData.ayReportData) \n {\n let ThisPOQty = 0; //Declare a temporary variable to hold the running Tax B total for THIS po\n for (Item of EachPO.Items) //Iterate through all the poitems of THIS po adding the dollar amount of each item to the ThisPOTaxB variable\n {\n //make sure it has a value before attempting to add it to the running total\n if (Item.QuantityOrdered != null) \n {\n ThisPOQty += Item.QuantityOrdered;\n }\n Item.POTaxQtyRunning=ThisPOQty;\n }\n EachPO.ThisPOQty=ThisPOQty;\n AllPOQty += ThisPOQty; // Use ThisPOTaxB to display the running Tax B total for THIS PO\n }\n //Add the AllPOTaxB variable to the reportData so it can be accessed in the report template i.e. a final running total of ALL PO's Tax B\n reportData.AllPOQtyRunning=AllPOQty; \n \n\nlet AllPODollarAmount = 0; //Declare a temporary variable to hold the running total of all POs in this list\n //Iterate through all the records in the reportData\n //adding the dollar amount of each item to the AllPODollarAmount variable\n for (EachPO of reportData.ayReportData) \n {\n let ThisPODollarAmount = 0; //Declare a temporary variable to hold the running total of THIS PO\n for (Item of EachPO.Items)\n {\n //make sure it has a value before attempting to add it to the running total\n if (Item.LineTotalViz != null) \n {\n ThisPODollarAmount += Item.LineTotalViz;\n }\n Item.PORunningTotal=ThisPODollarAmount;\n }\n EachPO.ThisPODollarAmount=ThisPODollarAmount;\n AllPODollarAmount += ThisPODollarAmount; // Use ThisPODoallarAmount to display the running Total for THIS PO\n }\n //Add the AllPODollarAmount variable to the reportData so it can be accessed in the report template \n reportData.AllPORunningTotal=AllPODollarAmount;\n\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})\nHandlebars.registerHelper('words', function() {\n return \"stuff and text\"\n})\n\n\nHandlebars.registerHelper('todaysMonthDDYYYYDate', function() {\n var dt3=new Date();\n return dt3.toLocaleDateString(\n AYMETA.ayClientMetaData.LanguageName,//use Client browser default Language, change this setting here to force an alternative language\n {\n timeZone: AYMETA.ayClientMetaData.TimeZoneName,//use Client browser's default TimeZone, change this setting here to force a specific time zone\n dateStyle: \"long\"\n }\n ) ;\n});// today's date displayed in MONTH DD, YYYY format\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":null,"DisplayHeaderFooter":true,"PaperFormat":10,"Landscape":false,"MarginOptionsBottom":"15mm","MarginOptionsLeft":"10mm","MarginOptionsRight":"10mm","MarginOptionsTop":"15mm","PageRanges":null,"PreferCSSPageSize":false,"PrintBackground":true,"Scale":1.00000}