1 line
12 KiB
Plaintext
1 line
12 KiB
Plaintext
{"Name":"Purchase Order Detailed","Active":true,"Notes":"custom Prepare for deriving net totals and grand total \n","Roles":49250,"AType":26,"IncludeWoItemDescendants":false,"Template":"<html>\n\n<body>\n\t<div>\n\t\t{{#each ayReportData}}\n\t\t<!-- the #each aspect MUST encompass the section where the class is that forces page break -->\n\t\t<table class=\"singlePage\">\n\t\t\t<!-- the css to start a new page when a new object -->\n\t\t\t<thead>\n\t\t\t\t<!--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 -->\n\t\t\t\t<tr>\n\t\t\t\t\t<th colspan=\"3\" class=\"leftlean\">{{ayT 'PurchaseOrderPONumber'}}</th>\n\t\t\t\t\t<td colspan=\"6\">{{Serial}}</td>\n\t\t\t\t\t{{#if DropShipToCustomerViz}}<th colspan=\"7\">{{ayT 'PurchaseOrderDropShipToCustomerID'}}</th>{{else}} <td colspan=\"7\"></td>{{/if}}\n\t\t\t\t\t{{#if DropShipToCustomerViz}}<th colspan=\"8\" class=\"rightlean \">Bill To</th>{{else}} <th colspan=\"8\" class=\"rightlean \">Bill To & Ship To</th>{{/if}}\n\t\t\t\t</tr>\n\t\t\t\t<tr>\n\t\t\t\t\t<th colspan=\"3\" class=\"leftlean\">{{ayT 'PurchaseOrderOrderedDate'}}</th>\n\t\t\t\t\t<td colspan=\"6\">{{ayDate OrderedDate}}</td>\n\t\t\t\t\t{{#if DropShipToCustomerViz}}<td colspan=\"7\" class=\"centerlean\">{{DropShipToCustomerViz}}</td>{{else}}<td colspan=\"7\" class=\"centerlean\"></td>{{/if}}\n\t\t\t\t\t<td colspan=\"8\" class=\"rightlean\">{{../ayServerMetaData.CompanyName}}</td><!-- displays your company name from your license -->\n\t\t\t\t</tr>\n\t\t\t\t<tr>\n\t\t\t\t\t<td colspan=\"9\"> </td>\n\t\t\t\t\t{{#if DropShipToCustomerViz}}<td colspan=\"7\" class=\"centerlean\">{{DropShipToCustomerAddressViz}} {{DropShipToCustomerCityViz}}</td>{{else}} <td colspan=\"7\" class=\"centerlean\"></td>{{/if}}\n\t\t\t\t\t<td colspan=\"8\" class=\"rightlean\">{{../ayServerMetaData.CompanyPostAddress}}</td><!-- displays your company email address as entered via in your Global Settings -->\n\t\t\t\t</tr>\n\t\t\t\t<tr>\n\t\t\t\t\t<th colspan=\"2\" class=\"leftlean\">{{ayT 'Vendor'}}</th>\n\t\t\t\t\t<td colspan=\"7\" class=\"reporttitle\" >{{VendorViz}}</td>\n\t\t\t\t\t{{#if DropShipToCustomerViz}}<td colspan=\"7\" class=\"centerlean\"> {{DropShipToCustomerRegionViz}} {{DropShipToCustomerPostCodeViz}}</td>{{else}} <td\tcolspan=\"7\" class=\"centerlean\"></td>{{/if}}\n\t\t\t\t\t<td colspan=\"8\" class=\"rightlean\">{{../ayServerMetaData.CompanyPostCity}} {{../ayServerMetaData.CompanyPostRegion}} {{../ayServerMetaData.CompanyPostCode}}</td> <!-- displays your company address as entered via in your Global Settings -->\n\t\t\t\t</tr>\n\t\t\t\t<tr>\n\t\t\t\t\t<td colspan=\"9\">{{VendorAddressViz}} {{VendorCityViz}} {{VendorRegionViz}}</td>\n\t\t\t\t\t{{#if DropShipToCustomerViz}}<td colspan=\"7\" class=\"centerlean\">{{DropShipToCustomerPhone1Viz}}</td>{{else}} <td\tcolspan=\"7\" class=\"centerlean\"></td>{{/if}}\n\t\t\t\t\t<td colspan=\"8\" class=\"rightlean\">{{../ayServerMetaData.CompanyPhone1}} {{../ayServerMetaData.CompanyEmailAddress}}</td>\n\t\t\t\t</tr>\n\t\t\t\t<tr>\n\t\t\t\t\t<td colspan=\"16\">{{VendorContactViz}} {{VendorPhone1Viz}} {{VendorEmailAddressViz}}</td>\n\t\t\t\t\t<th colspan=\"5\" class=\"rightlean\">{{ayT 'VendorAccountNumber'}}</th>\n\t\t\t\t\t<td colspan=\"3\" class=\"rightlean\">{{VendorAccountNumberViz}}</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</thead>\n\n\t\t\t<tbody>\n\t\t\t\t<tr>\n\t\t\t\t\t<th colspan=\"1\" class=\"leftlean\">Qty</th>\n\t\t\t\t\t<th colspan=\"2\" class=\"leftlean\">UOM</th>\n\t\t\t\t\t<th colspan=\"5\">Our Part#</th>\n\t\t\t\t\t<th colspan=\"3\">MFG#</th>\n\t\t\t\t\t<th colspan=\"3\">Vendor#</th>\n\t\t\t\t\t<th colspan=\"2\" class=\"rightlean\">Price Per</th>\n\t\t\t\t\t<th colspan=\"2\" class=\"rightlean\">Net</th>\n\t\t\t\t\t<th colspan=\"2\" class=\"rightlean\">{{ayT 'TaxCodeTaxA'}}</th>\n\t\t\t\t\t<th colspan=\"2\" class=\"rightlean\">{{ayT 'TaxCodeTaxB'}}</th>\n\t\t\t\t\t<th colspan=\"2\" class=\"rightlean\">{{ayT 'PurchaseOrderItemLineTotal'}}</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=\"1\" class=\"leftlean\">{{QuantityOrdered}}</td>\n\t\t\t\t\t<td colspan=\"2\" class=\"leftlean\">{{PartUnitOfMeasureViz}}</td>\n\t\t\t\t\t<td colspan=\"5\">{{PartNameViz}}</td>\n\t\t\t\t\t<td colspan=\"3\">{{PartManufacturerNumberViz}} </td>\n\t\t\t\t\t<td colspan=\"3\">{{VendorPartNumber}} </td>\n\t\t\t\t\t<td colspan=\"2\" class=\"rightlean\">{{ayCurrency PurchaseOrderCost}}</td>\n\t\t\t\t\t<td colspan=\"2\" class=\"rightlean\">{{ayCurrency NetTotalViz}}</td>\n\t\t\t\t\t{{#if TaxAViz}}<td colspan=\"2\" class=\"rightlean\">{{ayCurrency TaxAViz}}</td>{{else}}<td colspan=\"2\" class=\"rightlean\">0.00</td>{{/if}}\n\t\t\t\t\t{{#if TaxBViz}}<td colspan=\"2\" class=\"rightlean\">{{ayCurrency TaxBViz}}</td>{{else}}<td colspan=\"2\" class=\"rightlean\">0.00</td>{{/if}}\n\t\t\t\t\t<td colspan=\"2\" class=\"rightlean\">{{ayCurrency LineTotalViz}}</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<td colspan=\"24\"> </td>\n\t\t\t\t</tr>\n\t\t\t</tbody>\n\n\n\t\t\t<tfoot>\n\t\t\t\t<!--this footer will repeat for each page that a PO expands over. To have footer display at bottom of po and not repeat, place within its own table. -->\n\n\t\t\t\t<tr>\n\t\t\t\t\t<th colspan=\"16\"></th>\n\t\t\t\t\t<th colspan=\"6\" class=\"rightlean\">Total Qty of Parts Ordered</th>\n\t\t\t\t\t<td colspan=\"2\" class=\"rightlean\">{{ThisPOTotalQty}} </td>\n\n\t\t\t\t<tr>\n\t\t\t\t\t<td colspan=\"18\"></td>\n\t\t\t\t\t<th colspan=\"4\" class=\"rightlean\">{{ayT 'PurchaseOrderItemNetTotal'}}</th>\n\t\t\t\t\t<td colspan=\"2\" class=\"rightlean\">{{ayCurrency ThisPONet}}</td>\n\t\t\t\t</tr>\n\t\t\t\t<tr>\n\t\t\t\t\t<th colspan=\"3\" class=\"leftlean\">{{ayT 'PurchaseOrderVendorMemo'}}</th>\n\t\t\t\t\t<td colspan=\"15\">{{VendorMemo}} </td>\n\t\t\t\t\t<th colspan=\"4\" class=\"rightlean\">{{ayT 'TaxCodeTaxA'}}</th>\n\t\t\t\t\t{{#if ThisPOTaxA}}<td colspan=\"2\" class=\"rightlean\">{{ ayCurrency ThisPOTaxA }}</td>{{else}} <td colspan=\"2\" class=\"rightlean\">0.00</td>{{/if}}\n\t\t\t\t</tr>\n\t\t\t\t<tr>\n\t\t\t\t\t<td colspan=\"8\"></td>\n\t\t\t\t\t<th colspan=\"14\" class=\"rightlean\">{{ayT 'TaxCodeTaxB'}}</th>\n\t\t\t\t\t{{#if ThisPOTaxB}}<td colspan=\"2\" class=\"rightlean\">{{ ayCurrency ThisPOTaxB }}</td>{{else}} <td colspan=\"2\" class=\"rightlean\">0.00</td>{{/if}}\n\t\t\t\t</tr>\n\n\t\t\t\t<tr>\n\t\t\t\t\t<td colspan=\"24\"> </td>\n\t\t\t\t</tr>\n\n\t\t\t\t<tr> <!-- displays your company name from your license, displays your company email address as entered via in your Global Settings -->\n\t\t\t\t\t<th colspan=\"16\" class=\"leftlean\">Direct all inquiries to {{../ayServerMetaData.CompanyName}} {{../ayServerMetaData.CompanyPhone1}} or {{../ayServerMetaData.CompanyEmailAddress}}</th>\n\t\t\t\t\t<th colspan=\"6\" class=\"rightlean\">Purchase Order Total</th>\n\t\t\t\t\t<td colspan=\"2\" class=\"rightlean\">{{ ayCurrency ThisPOTotalDollar}}</td>\n\t\t\t\t</tr>\n\n\t\t\t</tfoot>\n\n\t\t</table>\n\t\t{{/each}}\n\n\t</div>\n</body>\n\n</html>","Style":"\n.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} \n\ntable { \n border-collapse: collapse;\n white-space: pre-wrap;\n font-size: 10pt;\n width: 100%;\n table-layout: fixed; \n }\n\nth {\n height: 25px; \n color: #9e9e9e;\n}\n\ntbody td {\n padding: 7px;\n word-wrap: break-word;\n font-size: 9pt;\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","JsPrerender":"async function ayPrepareData(ayData) {\n //Example of both manipulating the ayData before rendering the report (by adding a running total field)\n //and adding fields to the overall data such as calculating the total dollar amount for all records\n\n await ayGetTranslations([\"PurchaseOrderPONumber\", \"PurchaseOrderOrderedDate\", \"PurchaseOrderDropShipToCustomerID\", \"Vendor\", \"Part\", \"VendorAccountNumber\", \"PurchaseOrderItemNetTotal\", \"PurchaseOrderVendorMemo\", \"TaxCodeTaxA\", \"TaxCodeTaxB\", \"PurchaseOrderItemLineTotal\" ]);\n\n\n //Iterate through all the records in the ayData adding the dollar amount of each specified property to the appropriate declared variable\n\n for (const EachPO of ayData.ayReportData) \n {\n EachPO.ThisPONet = 0; //Declare a temporary variable to hold the running net total for THIS po\n EachPO.ThisPOTaxA = 0; //Declare a temporary variable to hold the running Tax A total for THIS po \n EachPO.ThisPOTaxB = 0; //Declare a temporary variable to hold the running Tax B total for THIS po\n EachPO.ThisPOTotalDollar = 0; //Declare a temporary variable to hold the running total of THIS PO \n EachPO.ThisPOTotalQty = 0; //Declare a temporary variable to hold the running Qty total for THIS po\n\n for (const 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 EachPO.ThisPONet += Item.NetTotalViz;\n }\n }\n \n for (const 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 EachPO.ThisPOTaxA += Item.TaxAViz;\n }\n }\n \n for (const 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 EachPO.ThisPOTaxB += Item.TaxBViz;\n }\n }\n\n\n for (const 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 EachPO.ThisPOTotalDollar += Item.LineTotalViz;\n }\n }\n \n\n \n \n for (const 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 EachPO.ThisPOTotalQty += Item.QuantityOrdered;\n }\n }\n\n }\n\n return ayData;\n}","JsHelpers":"","RenderType":0,"HeaderTemplate":"<span> </span>","FooterTemplate":"\n<span style=\"font-size:6pt;width: 100%; text-align:left; \"> Printed date: <span class=\"date\"></span></span>\n<span style=\"font-size:6pt;width: 96%; text-align: right; \"> Page <span class=\"pageNumber\"></span> of <span class=\"totalPages\"></span> </span>","DisplayHeaderFooter":false,"PaperFormat":10,"Landscape":true,"MarginOptionsBottom":"20mm","MarginOptionsLeft":"20mm","MarginOptionsRight":"15mm","MarginOptionsTop":"10mm","PageRanges":null,"PreferCSSPageSize":false,"PrintBackground":true,"Scale":1.00000} |