1 line
15 KiB
Plaintext
1 line
15 KiB
Plaintext
{"Name":"Example Purchase Order Detailed","Active":true,"Notes":"AS OF 131: why is it called VendorPartNumber?\nIncludes IF/ELSE ship to client; ","Roles":98,"AType":26,"IncludeWoItemDescendants":false,"Template":"<html>\n<body>\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=\"24\"> </td>\n </tr>\n <tr>\n <td colspan=\"9\" class=\"leftlean bkyellow bold13\">PO#: {{Serial}}</td> \n {{#if DropShipToCustomerViz}}<td colspan=\"7\" class=\"centerlean bkyellow bold12\">SHIP TO CLIENT:</td>{{else}} <td colspan=\"7\" class=\"centerlean bkyellow\"></td>{{/if}}\n {{#if DropShipToCustomerViz}}<td colspan=\"8\" class=\"rightlean bkyellow bold12\">BILL TO:</td>{{else}} <td colspan=\"8\" class=\"rightlean bkyellow bold12\">BILL TO & SHIP TO:</td>{{/if}}\n </tr>\n <tr>\n <td colspan=\"9\" class=\"leftlean bold13\">Ref#: {{ReferenceNumber}}</td>\n {{#if DropShipToCustomerViz}}<td colspan=\"7\" class=\"centerlean bold12\">{{DropShipToCustomerViz}}</td>{{else}} <td colspan=\"7\" class=\"centerlean\"></td>{{/if}}\n <td colspan=\"8\" class=\"rightlean bold12\">My Company Name</td><!-- replace this static text with your actual company name--> \n </tr>\n <tr> \n <td colspan=\"9\" class=\"leftlean bold13\">Ordered Date: {{ayDate OrderedDate}}</td> \n {{#if DropShipToCustomerViz}}<td colspan=\"7\" class=\"centerlean\">{{DropShipToCustomerAddressViz}} {{DropShipToCustomerCityViz}} {{DropShipToCustomerRegionViz}} </td>{{else}} <td colspan=\"7\" class=\"centerlean\"></td>{{/if}} \n <td colspan=\"8\" class=\"rightlean\" >123 - 123 MyStreetname Ave</td> <!-- replace this static text with your actual company address and contact details-->\n </tr>\n <tr>\n <td colspan=\"9\"> </td>\n {{#if DropShipToCustomerViz}}<td colspan=\"7\" class=\"centerlean\">{{DropShipToCustomerEmailAddressViz}} {{DropShipToCustomerPhone1Viz}} </td>{{else}} <td colspan=\"7\" class=\"centerlean\"></td>{{/if}} \n <td colspan=\"8\" class=\"rightlean\" >My City, My State, My Postal</td> <!-- replace this static text with your actual company address and contact details-->\n </tr>\n <tr> \n <td colspan=\"9\" class=\"leftlean bkyellow bold13\">VENDOR: {{VendorViz}}</td>\n <td colspan=\"15\" class=\"rightlean\" >TEL: My telephone</td> \n </tr>\n <tr>\n <td colspan=\"9\" class=\"leftlean\">{{VendorPostAddressViz}} {{VendorPostCityViz}} {{VendorPostRegionViz}} {{VendorPostCodeViz}}</td> \n <td colspan=\"15\" class=\"rightlean\" >Email: My email address</td>\n \n </tr> \n <tr>\n <td colspan=\"16\" class=\"leftlean\" >{{VendorContactViz}} {{VendorPhone1Viz}} {{VendorEmailAddressViz}} </td> \n <td colspan=\"8\" class=\"rightlean\">Acct#: VendorAccountNumberViz</td>\n </tr>\n\n <tr>\n <td colspan=\"24\"> </td>\n </tr>\n \n <tr > \n <td colspan=\"1\" class=\"leftlean bodyhead\" >Qty</td> \n <td colspan=\"1\" class=\"leftlean bodyhead\" >UOM</td> \n <td colspan=\"10\" class=\"centerlean bodyhead\" >Our Part#</td>\n <td colspan=\"2\" class=\"centerlean bodyhead\" >MFG#</td>\n <td colspan=\"2\" class=\"centerlean bodyhead\" >Vendor#</td>\n <td colspan=\"2\" class=\"centerlean bodyhead\" >Price Per</td>\n <td colspan=\"2\" class=\"centerlean bodyhead\" >Net</td>\n <td colspan=\"1\" class=\"centerlean bodyhead\" >TaxA</td>\n <td colspan=\"1\" class=\"centerlean bodyhead\" >TaxB</td>\n <td class=\"rightlean bodyhead\" colspan=\"2\" >Line Total</td> \n </tr> \n </thead>\n \n \t\t<tbody >\n\t\t\t\t{{#each Items}} \n\t\t\t\t<tr > \n <td colspan=\"1\" class=\"leftlean \" >{{QuantityOrdered}}</td> \n <td colspan=\"1\" class=\"leftlean \" >{{PartUnitOfMeasureViz}}</td> \n <td colspan=\"10\" class=\"centerlean \" >{{PartViz}} {{PartNameViz}}</td>\n <td colspan=\"2\" class=\"centerlean \" >{{PartManufacturerNumberViz}} </td>\n <td colspan=\"2\" class=\"centerlean \" >{{VendorPartNumber}} </td>\n <td colspan=\"2\" class=\"centerlean \" >{{ayCurrency PurchaseOrderCost}}</td>\n <td colspan=\"2\" class=\"centerlean \" >{{ayCurrency NetTotalViz}}</td>\n {{#if TaxAViz}}<td colspan=\"1\" class=\"centerlean \">{{ayCurrency TaxAViz}}</td>{{else}}<td colspan=\"1\" class=\"centerlean \">0.00</td>{{/if}}\n {{#if TaxBViz}}<td colspan=\"1\" class=\"centerlean \">{{ayCurrency TaxBViz}}</td>{{else}}<td colspan=\"1\" class=\"centerlean \">0.00</td>{{/if}}\n <td class=\"rightlean \" colspan=\"2\" >{{ayCurrency LineTotalViz}}</td> \n </tr> \n\t\t\t \t{{/each}}\n\t\t\t</tbody>\n \n <tfoot> <!--to have footer ONLY display on last page, place within its own table. otherwise have tfoot part of existing table. note css to have repeating footer -->\n <tr>\n\t\t\t\t<td colspan=\"24\"> </td>\n\t\t\t\t</tr>\n <tr>\t\t\t\n <td colspan=\"16\" class=\"leftlean bold10\">**Please note all packing slips and invoices REQUIRE line pricing**</td>\n\t\t\t\t<td colspan=\"8\" class=\"rightlean bold12 italic\">Total Qty of Parts Ordered: {{ThisPOTotalQty}} </td>\n\t\t\t\t</tr>\n <tr>\t\t\t\n <td colspan=\"16\" class=\"leftlean bold10\">**Approval for off-specification items or changes MUST be obtained via a NEW purchase order**</td>\n <td colspan=\"8\"> </td>\n\t\t\t\t</tr>\n <tr>\n\t\t\t\t<td colspan=\"24\"> </td>\n\t\t\t\t</tr>\n\t\t\t\t<tr>\n\t\t\t\t<td colspan=\"3\" class=\"leftlean bold10\" >PO VENDOR MEMO:</td>\n <td colspan=\"13\" class=\"leftlean bold10\">{{VendorMemo}} </td>\n <td colspan=\"2\" ></td>\n\t\t\t\t<td colspan=\"4\" class=\"rightlean bold10\">Net Total:</td>\n\t\t\t\t<td colspan=\"2\" class=\"rightlean bold10\" >{{ ayCurrency ThisPONet }}</td>\n\t\t\t\t</tr>\n <tr>\n\t\t\t\t<td colspan=\"24\"> </td>\n\t\t\t\t</tr>\n\t\t\t\t<tr>\n\t\t\t\t<td colspan=\"3\" class=\"leftlean bold10\" >VENDOR ALERT MEMO:</td>\n <td colspan=\"13\" class=\"leftlean bold10\">{{VendorAlertNotesViz}} </td>\n <td colspan=\"2\" ></td>\n\t\t\t\t<td colspan=\"4\" class=\"rightlean bold10\">TaxA Total:</td>\n {{#if ThisPOTaxA}}<td colspan=\"2\" class=\"rightlean bold10\" >{{ ayCurrency ThisPOTaxA }}</td>{{else}} <td colspan=\"2\" class=\"rightlean bold10\" >0.00</td>{{/if}}\n\t\t\t\t</tr>\n\t\t\t\t<tr>\n\t\t\t\t<td colspan=\"18\"></td>\n\t\t\t\t<td colspan=\"4\" class=\"rightlean bold10\">TaxB Total:</td>\n\t\t\t\t{{#if ThisPOTaxB}}<td colspan=\"2\" class=\"rightlean bold10\" >{{ ayCurrency ThisPOTaxB }}</td>{{else}} <td colspan=\"2\" class=\"rightlean bold10\" >0.00</td>{{/if}}\n\t\t\t\t</tr>\n\n <tr>\n\t\t\t\t<td colspan=\"24\"> </td>\n\t\t\t\t</tr>\n\n <tr>\n\t\t\t\t<td colspan=\"16\">Direct all inquiries to My Company 1-888-555-5555 or mycompany@mycompany.com</td>\n\t\t\t\t<td colspan=\"6\" class=\"rightlean bold12\">Purchase Order Total:</td>\n\t\t\t\t<td colspan=\"2\" class=\"rightlean bold12\" >{{ ayCurrency ThisPOTotalDollar }}</td>\n\t\t\t\t</tr>\n \n </tfoot>\n \n\t\t</table>\n {{/each}}\n\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 table-layout: fixed;\n }\n\nthead {\n display: table-header-group; /* so as to print the table-header on all subsequent pages */\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.bold13 {\n font-size: 13pt;\n font-weight: bold;\n}\n.bold12 {\n font-size: 12pt;\n font-weight: bold;\n}\n.bold10 {\n font-size: 10;\n font-weight: bold;\n}\n\n.bkyellow {\n background-color: lightyellow;\n}\n\n.italic {\n font-style: italic;\n}\n\n.bodyhead {\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 font-weight: bold; \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; /* so as to print the table-footer on all subsequent pages */\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","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\n\n//remove statements not needed, for example ALLPOxxx are not needed\n//let AllPONet = 0; //Declare a temporary variable to hold the running net total for all POs in this list\n//let AllPOTaxA = 0; //Declare a temporary variable to hold the running Tax A total for all POs in the list\n//let AllPOTaxB = 0; //Declare a temporary variable to hold the running Tax B total for all POs in the list\n\n\n //Iterate through all the records in the reportData adding the dollar amount of each specified property to the appropriate declared 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; //remove statements not needed, for example ALLPOxxx are not needed\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; //remove statements not needed, for example ALLPOxxx are not needed\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; //remove statements not needed, for example ALLPOxxx are not needed\n\n let ThisPOTotalDollar = 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 ThisPOTotalDollar += Item.LineTotalViz;\n }\n Item.PORunningTotal=ThisPOTotalDollar;\n }\n \n EachPO.ThisPOTotalDollar =ThisPOTotalDollar; // \n \n \n // ThisPOTotalDollar += AllPOTotalDollar; //remove statements not needed, for example ALLPOxxx are not needed\n \n let ThisPOTotalQty = 0; //Declare a temporary variable to hold the running Qty total for THIS po\n for (Item of EachPO.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.QuantityOrdered != null) \n {\n ThisPOTotalQty += Item.QuantityOrdered;\n }\n Item.QuantityOrderedRunning=ThisPOTotalQty;\n }\n EachPO.ThisPOTotalQty=ThisPOTotalQty;\n\n\n }\n \n // reportData.AllPONetRunning=AllPONet; //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.AllPOTaxARunning=AllPOTaxA; //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.AllPOTaxBRunning=AllPOTaxB; //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.AllPORunningTotal=AllPODollarAmount; \n\n \n\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})","RenderType":0,"HeaderTemplate":"<span style=\"font-size:6pt;width: 100%; text-align:left; \"> (set in report template's PDF Options) Printed date: <span class=\"date\"></span></span>\n","FooterTemplate":"\n<span style=\"font-size:6pt;width: 96%; text-align: right; \"> (set in report template's PDF Options showing x of ALL pages printed) Page <span class=\"pageNumber\"></span> of <span class=\"totalPages\"></span></span>","DisplayHeaderFooter":true,"PaperFormat":10,"Landscape":true,"MarginOptionsBottom":"10mm","MarginOptionsLeft":"10mm","MarginOptionsRight":"10mm","MarginOptionsTop":"10mm","PageRanges":null,"PreferCSSPageSize":false,"PrintBackground":true,"Scale":1.00000} |