{"Name":"Purchase Order Detailed","Active":true,"Notes":"custom Prepare for deriving net totals and grand total \n","Roles":49250,"AType":26,"IncludeWoItemDescendants":false,"Template":"\n\n\n\t
\n\t\t{{#each ayReportData}}\n\t\t\n\t\t\n\t\t\t\n\t\t\t\n\t\t\t\t\n\t\t\t\t\n\t\t\t\t\t\n\t\t\t\t\t\n\t\t\t\t\t{{#if DropShipToCustomerViz}}{{else}} {{/if}}\n\t\t\t\t\t{{#if DropShipToCustomerViz}}{{else}} {{/if}}\n\t\t\t\t\n\t\t\t\t\n\t\t\t\t\t\n\t\t\t\t\t\n\t\t\t\t\t{{#if DropShipToCustomerViz}}{{else}}{{/if}}\n\t\t\t\t\t\n\t\t\t\t\n\t\t\t\t\n\t\t\t\t\t\n\t\t\t\t\t{{#if DropShipToCustomerViz}}{{else}} {{/if}}\n\t\t\t\t\t\n\t\t\t\t\n\t\t\t\t\n\t\t\t\t\t\n\t\t\t\t\t\n\t\t\t\t\t{{#if DropShipToCustomerViz}}{{else}} {{/if}}\n\t\t\t\t\t\n\t\t\t\t\n\t\t\t\t\n\t\t\t\t\t\n\t\t\t\t\t{{#if DropShipToCustomerViz}}{{else}} {{/if}}\n\t\t\t\t\t\n\t\t\t\t\n\t\t\t\t\n\t\t\t\t\t\n\t\t\t\t\t\n\t\t\t\t\t\n\t\t\t\t\n\t\t\t\t\n\t\t\t\t\t\n\t\t\t\t\n\t\t\t\t\n\t\t\t\n\n\t\t\t\n\t\t\t\t\n\t\t\t\t\t\n\t\t\t\t\t\n\t\t\t\t\t\n\t\t\t\t\t\n\t\t\t\t\t\n\t\t\t\t\t\n\t\t\t\t\t\n\t\t\t\t\t\n\t\t\t\t\t\n\t\t\t\t\t\n\t\t\t\t\n\t\t\t\t{{#each Items}}\n\t\t\t\t\n\t\t\t\t\t\n\t\t\t\t\t\n\t\t\t\t\t\n\t\t\t\t\t\n\t\t\t\t\t\n\t\t\t\t\t\n\t\t\t\t\t\n\t\t\t\t\t{{#if TaxAViz}}{{else}}{{/if}}\n\t\t\t\t\t{{#if TaxBViz}}{{else}}{{/if}}\n\t\t\t\t\t\n\t\t\t\t\n\t\t\t\t{{/each}}\n\t\t\t\t\n\t\t\t\t\t\n\t\t\t\t\n\t\t\t\n\n\n\t\t\t\n\t\t\t\t\n\n\t\t\t\t\n\t\t\t\t\t\n\t\t\t\t\t\n\t\t\t\t\t\n\n\t\t\t\t\n\t\t\t\t\t\n\t\t\t\t\t\n\t\t\t\t\t\n\t\t\t\t\n\t\t\t\t\n\t\t\t\t\t\n\t\t\t\t\t\n\t\t\t\t\t\n\t\t\t\t\t{{#if ThisPOTaxA}}{{else}} {{/if}}\n\t\t\t\t\n\t\t\t\t\n\t\t\t\t\t\n\t\t\t\t\t\n\t\t\t\t\t{{#if ThisPOTaxB}}{{else}} {{/if}}\n\t\t\t\t\n\n\t\t\t\t\n\t\t\t\t\t\n\t\t\t\t\n\n\t\t\t\t\n\t\t\t\t\t\n\t\t\t\t\t\n\t\t\t\t\t\n\t\t\t\t\n\n\t\t\t\n\n\t\t
{{ayT 'PurchaseOrderPONumber'}}{{Serial}}{{ayT 'PurchaseOrderDropShipToCustomerID'}}Bill ToBill To & Ship To
{{ayT 'PurchaseOrderOrderedDate'}}{{ayDate OrderedDate}}{{DropShipToCustomerViz}}{{../ayServerMetaData.CompanyName}}
 {{DropShipToCustomerAddressViz}} {{DropShipToCustomerCityViz}}{{../ayServerMetaData.CompanyPostAddress}}
{{ayT 'Vendor'}}{{VendorViz}} {{DropShipToCustomerRegionViz}} {{DropShipToCustomerPostCodeViz}}{{../ayServerMetaData.CompanyPostCity}} {{../ayServerMetaData.CompanyPostRegion}} {{../ayServerMetaData.CompanyPostCode}}
{{VendorAddressViz}} {{VendorCityViz}} {{VendorRegionViz}}{{DropShipToCustomerPhone1Viz}}{{../ayServerMetaData.CompanyPhone1}} {{../ayServerMetaData.CompanyEmailAddress}}
{{VendorContactViz}} {{VendorPhone1Viz}} {{VendorEmailAddressViz}}{{ayT 'VendorAccountNumber'}}{{VendorAccountNumberViz}}
 
QtyUOMOur Part#MFG#Vendor#Price PerNet{{ayT 'TaxCodeTaxA'}}{{ayT 'TaxCodeTaxB'}}{{ayT 'PurchaseOrderItemLineTotal'}}
{{QuantityOrdered}}{{PartUnitOfMeasureViz}}{{PartNameViz}}{{PartManufacturerNumberViz}} {{VendorPartNumber}} {{ayCurrency PurchaseOrderCost}}{{ayCurrency NetTotalViz}}{{ayCurrency TaxAViz}}0.00{{ayCurrency TaxBViz}}0.00{{ayCurrency LineTotalViz}}
 
Total Qty of Parts Ordered{{ThisPOTotalQty}}
{{ayT 'PurchaseOrderItemNetTotal'}}{{ayCurrency ThisPONet}}
{{ayT 'PurchaseOrderVendorMemo'}}{{VendorMemo}} {{ayT 'TaxCodeTaxA'}}{{ ayCurrency ThisPOTaxA }}0.00
{{ayT 'TaxCodeTaxB'}}{{ ayCurrency ThisPOTaxB }}0.00
 
Direct all inquiries to {{../ayServerMetaData.CompanyName}} {{../ayServerMetaData.CompanyPhone1}} or {{../ayServerMetaData.CompanyEmailAddress}}Purchase Order Total{{ ayCurrency ThisPOTotalDollar}}
\n\t\t{{/each}}\n\n\t
\n\n\n","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":" ","FooterTemplate":"\n          Printed date: \n   Page  of         ","DisplayHeaderFooter":false,"PaperFormat":10,"Landscape":true,"MarginOptionsBottom":"20mm","MarginOptionsLeft":"20mm","MarginOptionsRight":"15mm","MarginOptionsTop":"10mm","PageRanges":null,"PreferCSSPageSize":false,"PrintBackground":true,"Scale":1.00000}