diff --git a/server/AyaNova/resource/rpt/stock-report-templates/Customer Invoice.ayrt b/server/AyaNova/resource/rpt/stock-report-templates/Customer Invoice.ayrt index 20de59bf..5f9434fd 100644 --- a/server/AyaNova/resource/rpt/stock-report-templates/Customer Invoice.ayrt +++ b/server/AyaNova/resource/rpt/stock-report-templates/Customer Invoice.ayrt @@ -1 +1 @@ -{"Name":"Customer Invoice","Active":true,"Notes":"Displays small logo if present. Displays digital Signature fields if present. Heading and Signature lines display once per WO regardless number of pages for the work order. \nPrepare functions to derive nets and grand totals\n","Roles":124927,"AType":34,"IncludeWoItemDescendants":false,"Template":"\n\n\n
\n {{#each ayReportData}}\n \n \n \n\n\n \n {{#if ../ayServerMetaData.HasSmallLogo}} \n \n \n \n \n \n \n \n \n \n \n \n\n {{else}} \n\n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n {{/if}} \n\n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n {{#each Items}}\n \n \n \n \n {{#each Units}}\n \n \n \n \n {{/each}}\n\n \n \n \n \n \n \n \n \n \n\n {{#each Expenses}}\n {{#if ChargeToCustomer}}\n \n \n \n \n \n \n \n \n \n \n {{#if ChargeTaxCodeId}}{{else}} {{/if}}\n {{#if ChargeTaxCodeId}}{{else}} {{/if}}\n \n \n {{else}} \n \n {{/if}}\n {{/each}}\n {{#each Loans}}\n \n \n \n \n \n \n {{#if TaxAViz}}{{else}}{{/if}}\n {{#if TaxBViz}}{{else}}{{/if}}\n \n \n {{/each}}\n {{#each Labors}}\n \n \n \n \n \n \n {{#if TaxAViz}}{{else}}{{/if}}\n {{#if TaxBViz}}{{else}}{{/if}}\n \n \n {{/each}}\n {{#each Parts}}\n \n \n \n \n \n \n {{#if TaxAViz}}{{else}}{{/if}}\n {{#if TaxBViz}}{{else}}{{/if}}\n \n \n {{/each}}\n {{#each Travels}}\n \n \n \n \n \n \n {{#if TaxAViz}}{{else}}{{/if}}\n {{#if TaxBViz}}{{else}}{{/if}}\n \n \n {{/each}}\n {{#each OutsideServices}}\n \n \n \n \n {{#if TaxAViz}}{{else}}{{/if}}\n {{#if TaxBViz}}{{else}}{{/if}}\n \n \n {{/each}}\n \n \n \n {{/each}}\n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n {{#if ThisWOTotalTaxAs}}{{else}}{{/if}}\n {{#if ThisWOTotalTaxBs}}{{else}}{{/if}}\n \n \n\n \n \n \n \n \n \n \n \n \n \n\n \n \n \n \n \n \n \n {{#if CustomerSignature}}{{else}} {{/if}}\n {{#if CustomerSignature}}{{else}} {{/if}}\n\n {{#if CustomerSignatureCaptured}}{{else}} {{/if}}\n {{#if CustomerSignatureCaptured}}{{else}} {{/if}}\n\n {{#if CustomerSignatureName}}{{else}} {{/if}}\n {{#if CustomerSignatureName}}{{else}} {{/if}}\n \n\n \n\n\n
{{ ayLogo \"small\" }}{{ayT 'WorkOrderInvoiceNumber'}}{{InvoiceNumber}}
{{ayT 'WorkOrderServiceDate'}}{{myDate ServiceDate}}
{{../ayServerMetaData.CompanyName}}{{ayT 'WorkOrderInvoiceNumber'}}{{InvoiceNumber}}
{{../ayServerMetaData.CompanyPostAddress}} {{../ayServerMetaData.CompanyPostCity}}{{ayT 'WorkOrderServiceDate'}}{{myDate ServiceDate}}
 
Service performed for{{ayT 'WorkOrderServiceNumber'}}{{Serial}}
{{CustomerViz}}{{ayT 'WorkOrderCustomerReferenceNumber'}}{{CustomerReferenceNumber}}
 {{PostAddress}}, {{PostCity}} {{PostCode}} 
 
 
{{ayT 'WorkOrderItemSummary'}}{{Notes}}
{{ayT 'Unit'}}{{UnitViz}} - {{UnitModelNameViz}}
 {{ayT 'WorkOrderItemPartQuantity'}}{{ayT 'Price'}}{{ayT 'NetPrice'}}{{ayT 'TaxCodeTaxA'}}{{ayT 'TaxCodeTaxB'}}{{ayT 'LineTotal'}}
  {{ayT 'WorkOrderItemExpenseList'}}: {{Name}}{{ayCurrency ChargeAmount}}{{ayCurrency TaxAViz}}{{ayCurrency TaxPaid}}{{ayCurrency TaxBViz}} {{ayCurrency LineTotalViz}}
{{ayT 'WorkOrderItemExpenseList'}}: {{Name}} at no charge to customer
 {{ayT 'WorkOrderItemLoanList'}}: {{LoanUnitViz}} / {{UnitOfMeasureViz}}{{Quantity}}{{ayCurrency PriceViz}}{{ayCurrency NetViz}}{{ayCurrency TaxAViz}}$0.00{{ayCurrency TaxBViz}}{{ayCurrency 0.00}}{{ayCurrency LineTotalViz}}
 {{ayT 'WorkOrderItemLaborList'}} performed {{ayDateTime ServiceStartDate}} with {{ayT 'WorkOrderItemLaborServiceRateID'}} of {{ServiceRateViz}}{{ServiceRateQuantity}}{{ayCurrency PriceViz}}{{ayCurrency NetViz}}{{ayCurrency TaxAViz}}$0.00{{ayCurrency TaxBViz}}$0.00{{ayCurrency LineTotalViz}}
 {{ayT 'WorkOrderItemPartPartID'}}: {{PartNameViz}} {{PartDescriptionViz}}{{Quantity}}{{ayCurrency PriceViz}}{{ayCurrency NetViz}}{{ayCurrency TaxAViz}}$0.00{{ayCurrency TaxBViz}}$0.00{{ayCurrency LineTotalViz}}
 {{ayT 'WorkOrderItemTravelList'}} performed {{ayDate TravelStartDate}} with {{ayT 'WorkOrderItemTravelServiceRateID'}} of {{TravelRateViz}}{{TravelRateQuantity}}{{ayCurrency PriceViz}}{{ayCurrency NetViz}}{{ayCurrency TaxAViz}}$0.00{{ayCurrency TaxBViz}}$0.00{{ayCurrency LineTotalViz}}
 {{ayT 'WorkOrderItemOutsideService'}} performed on Unit: {{UnitViz}}{{ayCurrency NetViz}}{{ayCurrency TaxAViz}}$0.00{{ayCurrency TaxBViz}}$0.00{{ayCurrency LineTotalViz}}
 
 
Total NetsTotal TaxATotal TaxBGrand Total
{{ayCurrency ThisWOTotalNets}}{{ayCurrency ThisWOTotalTaxAs}}$0.00{{ayCurrency ThisWOTotalTaxBs}}$0.00{{ayCurrency ThisWOTotalGrand}}
 
Thank you for your business!Terms: Net 30 days
 
I acknowledge the satisfactory provision and completion of the above for {{ayT 'WorkOrderServiceNumber'}} {{Serial}}
 
Digital {{ayT 'CustomerSignature'}}{{ayT 'CustomerSignature'}} ___________________Digital Signature DateSignature Date{{ayDateTime CustomerSignatureCaptured}}____________________Digital Print of NamePrint of Name{{CustomerSignatureName}}____________________
\n\n\n {{/each}}\n
\n\n\n\n","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} \n\ntable { \n table-layout: fixed; \n border-collapse: collapse;\n white-space: pre-wrap;\n font-size: 9pt;\n width: 100%;\n }\n\n\nth {\n height: 20px;\n color: #9e9e9e;\n}\n\ntbody tr {\n height: 10px;\n word-wrap: break-word;\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.fontgreen {\n color: green;\n}\n.fontblue {\n color: blue;\n}\n.fontred {\n color:red;\n}\n\n\n.rightlean {\n text-align: right;\n}\n.leftlean {\n text-align: left;\n}\n.centerlean {\n text-align: center;\n}","JsPrerender":"async function ayPrepareData(reportData){ \n //this function (if present) is called with the report data \n //before the report is rendered\n //modify data as required here and return it to change the data before the report renders\n //see the help documentation for details\n\n\tawait ayGetTranslations([\"WorkOrderInvoiceNumber\", \"WorkOrderServiceDate\", \"WorkOrderServiceNumber\", \"WorkOrderCustomerReferenceNumber\", \"Unit\", \"WorkOrderItemSummary\", \"WorkOrderItemPartQuantity\", \"Price\", \"NetPrice\", \"TaxCodeTaxA\", \"TaxCodeTaxB\", \"LineTotal\", \"WorkOrderItemExpenseList\", \"WorkOrderItemLoanList\", \"WorkOrderItemPartPartID\", \"WorkOrderItemLaborList\", \"WorkOrderItemLaborServiceRateID\", \"WorkOrderItemTravelList\", \"WorkOrderItemTravelServiceRateID\", \"WorkOrderItemOutsideService\", \"CustomerSignature\" ]);\n\n\n\n\n//********************//NOTE if you customize this report template and do NOT need a function or key identified below, remove to increase report performance\n\n\nfor (const EachWO of reportData.ayReportData) \n\t{\n\t//below declares a key on the entire wo to hold all Labor Net Viz from all Items in this wo so it exists\n\tEachWO.ThisWOAllLaborsNetViz = 0;\n\t//below declares a key on the entire wo to hold all Part Net Viz from all Items in this wo so it exists\n\tEachWO.ThisWOAllPartsNetViz = 0;\n\t//below declares a key on the entire wo to hold all Travel Net Viz from all Items in this wo so it exists\n\tEachWO.ThisWOAllTravelsNetViz = 0;\n\t//below declares a key on the entire wo to hold all Exp Net ChargeAmount from all Items in this wo so it exists\n\tEachWO.ThisWOAllExpsNetChargeAmount = 0;\n\t//below declares a key on the entire wo to hold all Loan Net Viz from all Items in this wo so it exists\n\tEachWO.ThisWOAllLoansNetViz = 0;\n\t//below declares a key on the entire wo to hold all Outside Net Viz from all Items in this wo so it exists\n\tEachWO.ThisWOAllOutsidesNetViz = 0;\t\n\n\t//below declares a key on the entire wo to hold ALL of THIS workorder's Nets so it exists\n\tEachWO.ThisWOTotalNets = 0;\n\n\t//below declares a key on the entire wo to hold THIS workorder's Tax A (for all items) so it exists \n\tEachWO.ThisWOTotalTaxAs = 0;\n\t//below declares a key on the entire wo to hold THIS workorder's Tax B (for all items) so it exists\n\tEachWO.ThisWOTotalTaxBs = 0;\t\n\t//below declares a key on the entire wo to hold THIS workorder's Grand Total so it exists\n\tEachWO.ThisWOTotalGrand = 0;\n\n\t//below is to Iterate through each item of the wo's Items\n\tfor (const Item of EachWO.Items)\n\t\t{\n\t\t\tItem.ThisItemAllLaborsNetViz = 0; //declare a key on the Item to hold all of this item's labor nets and set it initially to 0 \n\t\t\t\n\t\t\t//below is to Iterate through each labor record of the wo's Item\n\t\t\tfor (const Labor of Item.Labors)\n\t\t\t{\n\t\t\t//make sure it has a value before attempting to add it to the running total\n \tif (Labor.NetViz != null) \n \t \t{\n \t \tItem.ThisItemAllLaborsNetViz += Labor.NetViz; //this IS where the actual adding to running total for this WOItem's Net Labors\n\t\t\t\t\t\tEachWO.ThisWOAllLaborsNetViz += Labor.NetViz; //this IS where the actual adding to the running total for this entire WO's Net Labors\n\t\t\t\t\t\tEachWO.ThisWOTotalNets += Labor.NetViz; //this IS where the actual adding to the running total for ALL NETS for THIS workorders in this report data\n\t\t\t\t\t\tEachWO.ThisWOTotalGrand += Labor.NetViz; //this IS where the actual adding to the running total for GrandTotal for THIS workorders in this report data\t\n\t\t\t\t\t\t\n\t\t\t\t\t\tEachWO.ThisWOTotalTaxAs += Labor.TaxAViz; //this IS where the actual adding of Labor's Tax A to the running total for ALL Tax A for THIS workorders in this report data\n\t\t\t\t\t\tEachWO.ThisWOTotalGrand += Labor.TaxAViz; //this IS where the actual adding of Labor's Tax A to the running total for GrandTotal for THIS workorders in this report data\n\t\t\t\t\t\t\n\t\t\t\t\t\tEachWO.ThisWOTotalTaxBs += Labor.TaxBViz; //this IS where the actual adding of Labor's Tax B to the running total for ALL Tax B for THIS workorders in this report data\n\t\t\t\t\t\tEachWO.ThisWOTotalGrand += Labor.TaxBViz; //this IS where the actual adding of Labor's Tax B to the running total for GrandTotal for THIS workorders in this report data\n \t \t\t}\t\t//NOTE if you customize this report template and do NOT need a key above, remove it to increase report performance\t\t\n\t\t\t}\n\n\t\t\tItem.ThisItemAllPartsNetViz = 0; //declare a key on the Item to hold all of this item's parts nets and set it initially to 0 \n\t\t\t\n\t\t\t//below is to Iterate through each Part record of the wo's Item\n\t\t\tfor (const Part of Item.Parts)\n\t\t\t{\n\t\t\t//make sure it has a value before attempting to add it to the running total\n \tif (Part.NetViz != null) \n \t \t{\n \t \tItem.ThisItemAllPartsNetViz += Part.NetViz; //this IS where the actual adding to running total for this WOItem's Net Parts\n\t\t\t\t\t\tEachWO.ThisWOAllPartsNetViz += Part.NetViz;//this IS where the actual adding to the running total for this entire WO's Net Parts\n\t\t\t\t\t\tEachWO.ThisWOTotalNets += Part.NetViz; //this IS where the actual adding to the running total for ALL NETS for THIS workorders in this report data\n\t\t\t\t\t\tEachWO.ThisWOTotalGrand += Part.NetViz; //this IS where the actual adding to the running total for GrandTotal for THIS workorders in this report data\t\t\t\t\t\t\n\n\t\t\t\t\t\tEachWO.ThisWOTotalTaxAs += Part.TaxAViz; //this IS where the actual adding of Part's Tax A to the running total for ALL Tax A for THIS workorders in this report data\n\t\t\t\t\t\tEachWO.ThisWOTotalGrand += Part.TaxAViz; //this IS where the actual adding of Part's Tax A to the running total for GrandTotal for THIS workorders in this report data\n\t\t\t\t\t\t\n\t\t\t\t\t\tEachWO.ThisWOTotalTaxBs += Part.TaxBViz; //this IS where the actual adding of Part's Tax B to the running total for ALL Tax B for THIS workorders in this report data\n\t\t\t\t\t\tEachWO.ThisWOTotalGrand += Part.TaxBViz; //this IS where the actual adding of Part's Tax B to the running total for GrandTotal for THIS workorders in this report data\n \t \t\t}\t\t\t\t//NOTE if you customize this report template and do NOT need a key above, remove it to increase report performance\t\n\t\t\t}\n\n\t\t\tItem.ThisItemAllTravelsNetViz = 0; //declare a key on the Item to hold all of this item's travel nets and set it initially to 0 \n\t\t\t\n\t\t\t//below is to Iterate through each Travel record of the wo's Item\n\t\t\tfor (const Travel of Item.Travels)\n\t\t\t{\n\t\t\t//make sure it has a value before attempting to add it to the running total\n \tif (Travel.NetViz != null) \n \t \t{\n\t\t\t\t\t\t\n \t \tItem.ThisItemAllTravelsNetViz += Travel.NetViz;//this IS where the actual adding to running total for this WOItem's Net Travels\n\t\t\t\t\t\tEachWO.ThisWOAllTravelsNetViz += Travel.NetViz;//this IS where the actual adding to the running total for this entire WO's Net Travels\n\t\t\t\t\t\tEachWO.ThisWOTotalNets += Travel.NetViz;//this IS where the actual adding to the running total for ALL NETS for THIS workorders in this report data\n\t\t\t\t\t\tEachWO.ThisWOTotalGrand += Travel.NetViz; //this IS where the actual adding to the running total for GrandTotal for THIS workorders in this report data\n\n\t\t\t\t\t\tEachWO.ThisWOTotalTaxAs += Travel.TaxAViz; //this IS where the actual adding of Travel's Tax A to the running total for ALL Tax A for THIS workorders in this report data\n\t\t\t\t\t\tEachWO.ThisWOTotalGrand += Travel.TaxAViz; //this IS where the actual adding of Travel's Tax A to the running total for GrandTotal for THIS workorders in this report data\n\t\t\t\t\t\t\n\t\t\t\t\t\tEachWO.ThisWOTotalTaxBs += Travel.TaxBViz; //this IS where the actual adding of Travel's Tax B to the running total for ALL Tax B for THIS workorders in this report data\n\t\t\t\t\t\tEachWO.ThisWOTotalGrand += Travel.TaxBViz; //this IS where the actual adding of Travel's Tax B to the running total for GrandTotal for THIS workorders in this report data\n \t \t\t}\t\t\t\t//NOTE if you customize this report template and do NOT need a key above, remove it to increase report performance\t\n\t\t\t}\n\n\t\t\t//note additional statements for misc expense to ONLY add to running totals if ChargeToCustomer is true\n\t\t\t\n\t\t\tItem.ThisItemAllExpsNetChargeAmount = 0; //declare a key on the Item to hold all of this item's misc nets and set it initially to 0 \n\t\t\t\n\t\t\t//below is to Iterate through each Exp record of the wo's Item\n\t\t\tfor (const Exp of Item.Expenses)\n\t\t\t{\n\t\t\t//if this expense has a ChargeAmount value AND the ChargeToCustomer is true then adds the ChargeAmount to running totals\n \tif (Exp.ChargeAmount != null && Exp.ChargeToCustomer == true) \n \t \t{\n\t\t\t\t\t\t\n \t \tItem.ThisItemAllExpsNetChargeAmount += Exp.ChargeAmount;//this IS where the actual adding to running total for this WOItem's Net Exps\n\t\t\t\t\t\tEachWO.ThisWOAllExpsNetChargeAmount += Exp.ChargeAmount;//this IS where the actual adding to the running total for this entire WO's Net ChargeAmounts\n\t\t\t\t\t\tEachWO.ThisWOTotalNets += Exp.ChargeAmount;//this IS where the actual adding to the running total for ALL NET ChargeAmountS for THIS workorders in this report data\n\t\t\t\t\t\tEachWO.ThisWOTotalGrand += Exp.ChargeAmount; //this IS where the actual adding to the running total for GrandTotal for THIS workorders in this report data\n \t \t\t}\t\t\t\t//NOTE if you customize this report template and do NOT need a key above, remove it to increase report performance\t\n\n\t\t\t//if this expense the ChargeToCustomer is true AND ChargeTaxCode has a value then adds the TaxAViz and TaxBViz to running totals\t\t\n\t\t\t\t\tif (Exp.ChargeToCustomer == true && Exp.ChargeTaxCodeId != null ) \n \t \t{\n\t\t\t\t\t\tEachWO.ThisWOTotalTaxAs += Exp.TaxAViz; //this IS where the actual adding of Exp's Tax A to the running total for ALL Tax A for THIS workorders in this report data\n\t\t\t\t\t\tEachWO.ThisWOTotalGrand += Exp.TaxAViz; //this IS where the actual adding of Exp's Tax A to the running total for GrandTotal for THIS workorders in this report data\n\t\t\t\t\t\t\n\t\t\t\t\t\tEachWO.ThisWOTotalTaxBs += Exp.TaxBViz; //this IS where the actual adding of Exp's Tax B to the running total for ALL Tax B for THIS workorders in this report data\n\t\t\t\t\t\tEachWO.ThisWOTotalGrand += Exp.TaxBViz; //this IS where the actual adding of Exp's Tax B to the running total for GrandTotal for THIS workorders in this report data\n \t \t\t}\t\t\t\t//NOTE if you customize this report template and do NOT need a key above, remove it to increase report performance\t\n\t\t\t\t\telse if (Exp.ChargeToCustomer == true && Exp.ChargeTaxCodeId == null ) //else if ChargeToCustomer is true AND ChargeTaxCodeID is null, then add TaxPaid to TaxA running total and Grand Total\t\t\n\t\t\t\t\t\t{\n\t\t\t\t\t\tEachWO.ThisWOTotalTaxAs += Exp.TaxPaid; //this IS where the actual adding of Exp's TaxPaid to the running total for ALL Tax A for THIS workorders in this report data\n\t\t\t\t\t\tEachWO.ThisWOTotalGrand += Exp.TaxPaid; //this IS where the actual adding of Exp's TaxPaid to the running total for GrandTotal for THIS workorders in this report data\n\t\t\t\t\t\t}\n\n\t\t\t}\n\n\t\t\t\n\t\t\tItem.ThisItemAllLoansNetViz = 0; //declare a key on the Item to hold all of this item's loans nets and set it initially to 0 \n\t\t\t\n\t\t\t//below is to Iterate through each Loan record of the wo's Item\n\t\t\tfor (const Loan of Item.Loans)\n\t\t\t{\n\t\t\t//make sure it has a value before attempting to add it to the running total\n \tif (Loan.NetViz != null) \n \t \t{\n \t \tItem.ThisItemAllLoansNetViz += Loan.NetViz;//this IS where the actual adding to running total for this WOItem's Net Loans\n\t\t\t\t\t\tEachWO.ThisWOAllLoansNetViz += Loan.NetViz;//this IS where the actual adding to the running total for this entire WO's Net Loans\n\t\t\t\t\t\tEachWO.ThisWOTotalNets += Loan.NetViz;//this IS where the actual adding to the running total for ALL NETS for THIS workorders in this report data\n\t\t\t\t\t\tEachWO.ThisWOTotalGrand += Loan.NetViz; //this IS where the actual adding to the running total for GrandTotal for THIS workorders in this report data\n\n\t\t\t\t\t\tEachWO.ThisWOTotalTaxAs += Loan.TaxAViz; //this IS where the actual adding of Loan's Tax A to the running total for ALL Tax A for THIS workorders in this report data\n\t\t\t\t\t\tEachWO.ThisWOTotalGrand += Loan.TaxAViz; //this IS where the actual adding of Loan's Tax A to the running total for GrandTotal for THIS workorders in this report data\n\t\t\t\t\t\t\n\t\t\t\t\t\tEachWO.ThisWOTotalTaxBs += Loan.TaxBViz; //this IS where the actual adding of Loan's Tax B to the running total for ALL Tax B for THIS workorders in this report data\n\t\t\t\t\t\tEachWO.ThisWOTotalGrand += Loan.TaxBViz; //this IS where the actual adding of Loan's Tax B to the running total for GrandTotal for THIS workorders in this report data\n \t \t\t}\t\t\t\t//NOTE if you customize this report template and do NOT need a key above, remove it to increase report performance\t\n\t\t\t}\n\n\t\t\tItem.ThisItemAllOutsidesNetViz = 0; //declare a key on the Item to hold all of this item's Outsie nets and set it initially to 0 \n\t\t\t\n\t\t\t//below is to Iterate through each Outside record of the wo's Item\n\t\t\tfor (const Outside of Item.OutsideServices)\n\t\t\t{\n\t\t\t//make sure it has a value before attempting to add it to the running total\n \tif (Outside.NetViz != null) \n \t \t{\n\t\t\t\t\t\t\n \t \tItem.ThisItemAllOutsidesNetViz += Outside.NetViz;//this IS where the actual adding to running total for this WOItem's Net Outside\n\t\t\t\t\t\tEachWO.ThisWOAllOutsidesNetViz += Outside.NetViz;//this IS where the actual adding to the running total for this entire WO's Net Outsides\n\t\t\t\t\t\tEachWO.ThisWOTotalNets += Outside.NetViz;//this IS where the actual adding to the running total for ALL NETS for THIS workorders in this report data\n\t\t\t\t\t\tEachWO.ThisWOTotalGrand += Outside.NetViz; //this IS where the actual adding to the running total for GrandTotal for THIS workorders in this report data\n\n\t\t\t\t\t\tEachWO.ThisWOTotalTaxAs += Outside.TaxAViz; //this IS where the actual adding of Outside's Tax A to the running total for ALL Tax A for THIS workorders in this report data\n\t\t\t\t\t\tEachWO.ThisWOTotalGrand += Outside.TaxAViz; //this IS where the actual adding of Outside's Tax A to the running total for GrandTotal for THIS workorders in this report data\n\t\t\t\t\t\t\n\t\t\t\t\t\tEachWO.ThisWOTotalTaxBs += Outside.TaxBViz; //this IS where the actual adding of Outside's Tax B to the running total for ALL Tax B for THIS workorders in this report data\n\t\t\t\t\t\tEachWO.ThisWOTotalGrand += Outside.TaxBViz; //this IS where the actual adding of Outside's Tax B to the running total for GrandTotal for THIS workorders in this report data\n \t \t\t}\t\t\t\t//NOTE if you customize this report template and do NOT need a key above, remove it to increase report performance\t\n\t\t\t}\n\t\t}\n\t}\n\t\n\n return reportData;\n}","JsHelpers":"Handlebars.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 EXAMPLE SHOW: June 9, 2021\n\n/////////////////////////////////////////////////////////////////\n//\n// CUSTOM DATE HELPER\n//\nHandlebars.registerHelper('myDate', function (value) {\n if (!value) {\n return \"\";\n }\n\n //parse the date\n let parsedDate = new Date(value);\n\n //is it a valid date?\n if (!(parsedDate instanceof Date && !Number.isNaN(parsedDate.getTime()))) {\n return \"not valid\";\n }\n\n //Use built in toLocaleDateString method to format the date\n //there are many options that change the displayed format documented here\n //https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Date/toLocaleDateString\n return parsedDate.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});\n\n","RenderType":0,"HeaderTemplate":" ","FooterTemplate":"          Printed date: \n   Page  of         ","DisplayHeaderFooter":false,"PaperFormat":10,"Landscape":false,"MarginOptionsBottom":"15mm","MarginOptionsLeft":"15mm","MarginOptionsRight":"10mm","MarginOptionsTop":"10mm","PageRanges":null,"PreferCSSPageSize":false,"PrintBackground":true,"Scale":1.00000} \ No newline at end of file +{"Name":"Customer Invoice","Active":true,"Notes":"Displays small logo if present. Displays digital Signature fields if present. Heading and Signature lines display once per WO regardless number of pages for the work order. \nPrepare functions to derive nets and grand totals\n","Roles":124927,"AType":34,"IncludeWoItemDescendants":false,"Template":"\n\n\n
\n {{#each ayReportData}}\n \n \n \n\n\n \n {{#if ../ayServerMetaData.HasSmallLogo}} \n \n \n \n \n \n \n \n \n \n \n \n\n {{else}} \n\n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n {{/if}} \n\n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n {{#each Items}}\n \n \n \n \n {{#each Units}}\n \n \n \n \n {{/each}}\n\n \n \n \n \n \n \n \n \n \n\n {{#each Expenses}}\n {{#if ChargeToCustomer}}\n \n \n \n \n \n \n \n \n \n \n {{#if ChargeTaxCodeId}}{{else}} {{/if}}\n {{#if ChargeTaxCodeId}}{{else}} {{/if}}\n \n \n {{else}} \n \n {{/if}}\n {{/each}}\n {{#each Loans}}\n \n \n \n \n \n \n {{#if TaxAViz}}{{else}}{{/if}}\n {{#if TaxBViz}}{{else}}{{/if}}\n \n \n {{/each}}\n {{#each Labors}}\n \n \n \n \n \n \n {{#if TaxAViz}}{{else}}{{/if}}\n {{#if TaxBViz}}{{else}}{{/if}}\n \n \n {{/each}}\n {{#each Parts}}\n \n \n \n \n \n \n {{#if TaxAViz}}{{else}}{{/if}}\n {{#if TaxBViz}}{{else}}{{/if}}\n \n \n {{/each}}\n {{#each Travels}}\n \n \n \n \n \n \n {{#if TaxAViz}}{{else}}{{/if}}\n {{#if TaxBViz}}{{else}}{{/if}}\n \n \n {{/each}}\n {{#each OutsideServices}}\n \n \n \n \n {{#if TaxAViz}}{{else}}{{/if}}\n {{#if TaxBViz}}{{else}}{{/if}}\n \n \n {{/each}}\n \n \n \n {{/each}}\n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n {{#if ThisWOTotalTaxAs}}{{else}}{{/if}}\n {{#if ThisWOTotalTaxBs}}{{else}}{{/if}}\n \n \n\n \n \n \n \n \n \n \n \n \n \n\n \n \n \n \n \n \n \n {{#if CustomerSignature}}{{else}} {{/if}}\n {{#if CustomerSignature}}{{else}} {{/if}}\n\n {{#if CustomerSignatureCaptured}}{{else}} {{/if}}\n {{#if CustomerSignatureCaptured}}{{else}} {{/if}}\n\n {{#if CustomerSignatureName}}{{else}} {{/if}}\n {{#if CustomerSignatureName}}{{else}} {{/if}}\n \n\n \n\n\n
{{ ayLogo \"small\" }}{{ayT 'WorkOrderInvoiceNumber'}}{{InvoiceNumber}}
{{ayT 'WorkOrderServiceDate'}}{{myDate ServiceDate}}
{{../ayServerMetaData.CompanyName}}{{ayT 'WorkOrderInvoiceNumber'}}{{InvoiceNumber}}
{{../ayServerMetaData.CompanyPostAddress}} {{../ayServerMetaData.CompanyPostCity}}{{ayT 'WorkOrderServiceDate'}}{{myDate ServiceDate}}
 
Service performed for{{ayT 'WorkOrderSerialNumber'}}{{Serial}}
{{CustomerViz}}{{ayT 'WorkOrderCustomerReferenceNumber'}}{{CustomerReferenceNumber}}
 {{PostAddress}}, {{PostCity}} {{PostCode}} 
 
 
{{ayT 'WorkOrderItemSummary'}}{{Notes}}
{{ayT 'Unit'}}{{UnitViz}} - {{UnitModelNameViz}}
 {{ayT 'WorkOrderItemPartQuantity'}}{{ayT 'Price'}}{{ayT 'NetPrice'}}{{ayT 'TaxCodeTaxA'}}{{ayT 'TaxCodeTaxB'}}{{ayT 'LineTotal'}}
  {{ayT 'WorkOrderItemExpenseList'}}: {{Name}}{{ayCurrency ChargeAmount}}{{ayCurrency TaxAViz}}{{ayCurrency TaxPaid}}{{ayCurrency TaxBViz}} {{ayCurrency LineTotalViz}}
{{ayT 'WorkOrderItemExpenseList'}}: {{Name}} at no charge to customer
 {{ayT 'WorkOrderItemLoanList'}}: {{LoanUnitViz}} / {{UnitOfMeasureViz}}{{Quantity}}{{ayCurrency PriceViz}}{{ayCurrency NetViz}}{{ayCurrency TaxAViz}}$0.00{{ayCurrency TaxBViz}}{{ayCurrency 0.00}}{{ayCurrency LineTotalViz}}
 {{ayT 'WorkOrderItemLaborList'}} performed {{ayDateTime ServiceStartDate}} with {{ayT 'WorkOrderItemLaborServiceRateID'}} of {{ServiceRateViz}}{{ServiceRateQuantity}}{{ayCurrency PriceViz}}{{ayCurrency NetViz}}{{ayCurrency TaxAViz}}$0.00{{ayCurrency TaxBViz}}$0.00{{ayCurrency LineTotalViz}}
 {{ayT 'WorkOrderItemPartPartID'}}: {{PartNameViz}} {{PartDescriptionViz}}{{Quantity}}{{ayCurrency PriceViz}}{{ayCurrency NetViz}}{{ayCurrency TaxAViz}}$0.00{{ayCurrency TaxBViz}}$0.00{{ayCurrency LineTotalViz}}
 {{ayT 'WorkOrderItemTravelList'}} performed {{ayDate TravelStartDate}} with {{ayT 'WorkOrderItemTravelServiceRateID'}} of {{TravelRateViz}}{{TravelRateQuantity}}{{ayCurrency PriceViz}}{{ayCurrency NetViz}}{{ayCurrency TaxAViz}}$0.00{{ayCurrency TaxBViz}}$0.00{{ayCurrency LineTotalViz}}
 {{ayT 'WorkOrderItemOutsideService'}} performed on Unit: {{UnitViz}}{{ayCurrency NetViz}}{{ayCurrency TaxAViz}}$0.00{{ayCurrency TaxBViz}}$0.00{{ayCurrency LineTotalViz}}
 
 
Total NetsTotal TaxATotal TaxBGrand Total
{{ayCurrency ThisWOTotalNets}}{{ayCurrency ThisWOTotalTaxAs}}$0.00{{ayCurrency ThisWOTotalTaxBs}}$0.00{{ayCurrency ThisWOTotalGrand}}
 
Thank you for your business!Terms: Net 30 days
 
I acknowledge the satisfactory provision and completion of the above for {{ayT 'WorkOrderSerialNumber'}} {{Serial}}
 
Digital {{ayT 'CustomerSignature'}}{{ayT 'CustomerSignature'}} ___________________Digital Signature DateSignature Date{{ayDateTime CustomerSignatureCaptured}}____________________Digital Print of NamePrint of Name{{CustomerSignatureName}}____________________
\n\n\n {{/each}}\n
\n\n\n\n","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} \n\ntable { \n table-layout: fixed; \n border-collapse: collapse;\n white-space: pre-wrap;\n font-size: 9pt;\n width: 100%;\n }\n\n\nth {\n height: 20px;\n color: #9e9e9e;\n}\n\ntbody tr {\n height: 10px;\n word-wrap: break-word;\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.fontgreen {\n color: green;\n}\n.fontblue {\n color: blue;\n}\n.fontred {\n color:red;\n}\n\n\n.rightlean {\n text-align: right;\n}\n.leftlean {\n text-align: left;\n}\n.centerlean {\n text-align: center;\n}","JsPrerender":"async function ayPrepareData(reportData){ \n //this function (if present) is called with the report data \n //before the report is rendered\n //modify data as required here and return it to change the data before the report renders\n //see the help documentation for details\n\n\tawait ayGetTranslations([\"WorkOrderInvoiceNumber\", \"WorkOrderServiceDate\", \"WorkOrderSerialNumber\", \"WorkOrderCustomerReferenceNumber\", \"Unit\", \"WorkOrderItemSummary\", \"WorkOrderItemPartQuantity\", \"Price\", \"NetPrice\", \"TaxCodeTaxA\", \"TaxCodeTaxB\", \"LineTotal\", \"WorkOrderItemExpenseList\", \"WorkOrderItemLoanList\", \"WorkOrderItemPartPartID\", \"WorkOrderItemLaborList\", \"WorkOrderItemLaborServiceRateID\", \"WorkOrderItemTravelList\", \"WorkOrderItemTravelServiceRateID\", \"WorkOrderItemOutsideService\", \"CustomerSignature\" ]);\n\n\n\n\n//********************//NOTE if you customize this report template and do NOT need a function or key identified below, remove to increase report performance\n\n\nfor (const EachWO of reportData.ayReportData) \n\t{\n\t//below declares a key on the entire wo to hold all Labor Net Viz from all Items in this wo so it exists\n\tEachWO.ThisWOAllLaborsNetViz = 0;\n\t//below declares a key on the entire wo to hold all Part Net Viz from all Items in this wo so it exists\n\tEachWO.ThisWOAllPartsNetViz = 0;\n\t//below declares a key on the entire wo to hold all Travel Net Viz from all Items in this wo so it exists\n\tEachWO.ThisWOAllTravelsNetViz = 0;\n\t//below declares a key on the entire wo to hold all Exp Net ChargeAmount from all Items in this wo so it exists\n\tEachWO.ThisWOAllExpsNetChargeAmount = 0;\n\t//below declares a key on the entire wo to hold all Loan Net Viz from all Items in this wo so it exists\n\tEachWO.ThisWOAllLoansNetViz = 0;\n\t//below declares a key on the entire wo to hold all Outside Net Viz from all Items in this wo so it exists\n\tEachWO.ThisWOAllOutsidesNetViz = 0;\t\n\n\t//below declares a key on the entire wo to hold ALL of THIS workorder's Nets so it exists\n\tEachWO.ThisWOTotalNets = 0;\n\n\t//below declares a key on the entire wo to hold THIS workorder's Tax A (for all items) so it exists \n\tEachWO.ThisWOTotalTaxAs = 0;\n\t//below declares a key on the entire wo to hold THIS workorder's Tax B (for all items) so it exists\n\tEachWO.ThisWOTotalTaxBs = 0;\t\n\t//below declares a key on the entire wo to hold THIS workorder's Grand Total so it exists\n\tEachWO.ThisWOTotalGrand = 0;\n\n\t//below is to Iterate through each item of the wo's Items\n\tfor (const Item of EachWO.Items)\n\t\t{\n\t\t\tItem.ThisItemAllLaborsNetViz = 0; //declare a key on the Item to hold all of this item's labor nets and set it initially to 0 \n\t\t\t\n\t\t\t//below is to Iterate through each labor record of the wo's Item\n\t\t\tfor (const Labor of Item.Labors)\n\t\t\t{\n\t\t\t//make sure it has a value before attempting to add it to the running total\n \tif (Labor.NetViz != null) \n \t \t{\n \t \tItem.ThisItemAllLaborsNetViz += Labor.NetViz; //this IS where the actual adding to running total for this WOItem's Net Labors\n\t\t\t\t\t\tEachWO.ThisWOAllLaborsNetViz += Labor.NetViz; //this IS where the actual adding to the running total for this entire WO's Net Labors\n\t\t\t\t\t\tEachWO.ThisWOTotalNets += Labor.NetViz; //this IS where the actual adding to the running total for ALL NETS for THIS workorders in this report data\n\t\t\t\t\t\tEachWO.ThisWOTotalGrand += Labor.NetViz; //this IS where the actual adding to the running total for GrandTotal for THIS workorders in this report data\t\n\t\t\t\t\t\t\n\t\t\t\t\t\tEachWO.ThisWOTotalTaxAs += Labor.TaxAViz; //this IS where the actual adding of Labor's Tax A to the running total for ALL Tax A for THIS workorders in this report data\n\t\t\t\t\t\tEachWO.ThisWOTotalGrand += Labor.TaxAViz; //this IS where the actual adding of Labor's Tax A to the running total for GrandTotal for THIS workorders in this report data\n\t\t\t\t\t\t\n\t\t\t\t\t\tEachWO.ThisWOTotalTaxBs += Labor.TaxBViz; //this IS where the actual adding of Labor's Tax B to the running total for ALL Tax B for THIS workorders in this report data\n\t\t\t\t\t\tEachWO.ThisWOTotalGrand += Labor.TaxBViz; //this IS where the actual adding of Labor's Tax B to the running total for GrandTotal for THIS workorders in this report data\n \t \t\t}\t\t//NOTE if you customize this report template and do NOT need a key above, remove it to increase report performance\t\t\n\t\t\t}\n\n\t\t\tItem.ThisItemAllPartsNetViz = 0; //declare a key on the Item to hold all of this item's parts nets and set it initially to 0 \n\t\t\t\n\t\t\t//below is to Iterate through each Part record of the wo's Item\n\t\t\tfor (const Part of Item.Parts)\n\t\t\t{\n\t\t\t//make sure it has a value before attempting to add it to the running total\n \tif (Part.NetViz != null) \n \t \t{\n \t \tItem.ThisItemAllPartsNetViz += Part.NetViz; //this IS where the actual adding to running total for this WOItem's Net Parts\n\t\t\t\t\t\tEachWO.ThisWOAllPartsNetViz += Part.NetViz;//this IS where the actual adding to the running total for this entire WO's Net Parts\n\t\t\t\t\t\tEachWO.ThisWOTotalNets += Part.NetViz; //this IS where the actual adding to the running total for ALL NETS for THIS workorders in this report data\n\t\t\t\t\t\tEachWO.ThisWOTotalGrand += Part.NetViz; //this IS where the actual adding to the running total for GrandTotal for THIS workorders in this report data\t\t\t\t\t\t\n\n\t\t\t\t\t\tEachWO.ThisWOTotalTaxAs += Part.TaxAViz; //this IS where the actual adding of Part's Tax A to the running total for ALL Tax A for THIS workorders in this report data\n\t\t\t\t\t\tEachWO.ThisWOTotalGrand += Part.TaxAViz; //this IS where the actual adding of Part's Tax A to the running total for GrandTotal for THIS workorders in this report data\n\t\t\t\t\t\t\n\t\t\t\t\t\tEachWO.ThisWOTotalTaxBs += Part.TaxBViz; //this IS where the actual adding of Part's Tax B to the running total for ALL Tax B for THIS workorders in this report data\n\t\t\t\t\t\tEachWO.ThisWOTotalGrand += Part.TaxBViz; //this IS where the actual adding of Part's Tax B to the running total for GrandTotal for THIS workorders in this report data\n \t \t\t}\t\t\t\t//NOTE if you customize this report template and do NOT need a key above, remove it to increase report performance\t\n\t\t\t}\n\n\t\t\tItem.ThisItemAllTravelsNetViz = 0; //declare a key on the Item to hold all of this item's travel nets and set it initially to 0 \n\t\t\t\n\t\t\t//below is to Iterate through each Travel record of the wo's Item\n\t\t\tfor (const Travel of Item.Travels)\n\t\t\t{\n\t\t\t//make sure it has a value before attempting to add it to the running total\n \tif (Travel.NetViz != null) \n \t \t{\n\t\t\t\t\t\t\n \t \tItem.ThisItemAllTravelsNetViz += Travel.NetViz;//this IS where the actual adding to running total for this WOItem's Net Travels\n\t\t\t\t\t\tEachWO.ThisWOAllTravelsNetViz += Travel.NetViz;//this IS where the actual adding to the running total for this entire WO's Net Travels\n\t\t\t\t\t\tEachWO.ThisWOTotalNets += Travel.NetViz;//this IS where the actual adding to the running total for ALL NETS for THIS workorders in this report data\n\t\t\t\t\t\tEachWO.ThisWOTotalGrand += Travel.NetViz; //this IS where the actual adding to the running total for GrandTotal for THIS workorders in this report data\n\n\t\t\t\t\t\tEachWO.ThisWOTotalTaxAs += Travel.TaxAViz; //this IS where the actual adding of Travel's Tax A to the running total for ALL Tax A for THIS workorders in this report data\n\t\t\t\t\t\tEachWO.ThisWOTotalGrand += Travel.TaxAViz; //this IS where the actual adding of Travel's Tax A to the running total for GrandTotal for THIS workorders in this report data\n\t\t\t\t\t\t\n\t\t\t\t\t\tEachWO.ThisWOTotalTaxBs += Travel.TaxBViz; //this IS where the actual adding of Travel's Tax B to the running total for ALL Tax B for THIS workorders in this report data\n\t\t\t\t\t\tEachWO.ThisWOTotalGrand += Travel.TaxBViz; //this IS where the actual adding of Travel's Tax B to the running total for GrandTotal for THIS workorders in this report data\n \t \t\t}\t\t\t\t//NOTE if you customize this report template and do NOT need a key above, remove it to increase report performance\t\n\t\t\t}\n\n\t\t\t//note additional statements for misc expense to ONLY add to running totals if ChargeToCustomer is true\n\t\t\t\n\t\t\tItem.ThisItemAllExpsNetChargeAmount = 0; //declare a key on the Item to hold all of this item's misc nets and set it initially to 0 \n\t\t\t\n\t\t\t//below is to Iterate through each Exp record of the wo's Item\n\t\t\tfor (const Exp of Item.Expenses)\n\t\t\t{\n\t\t\t//if this expense has a ChargeAmount value AND the ChargeToCustomer is true then adds the ChargeAmount to running totals\n \tif (Exp.ChargeAmount != null && Exp.ChargeToCustomer == true) \n \t \t{\n\t\t\t\t\t\t\n \t \tItem.ThisItemAllExpsNetChargeAmount += Exp.ChargeAmount;//this IS where the actual adding to running total for this WOItem's Net Exps\n\t\t\t\t\t\tEachWO.ThisWOAllExpsNetChargeAmount += Exp.ChargeAmount;//this IS where the actual adding to the running total for this entire WO's Net ChargeAmounts\n\t\t\t\t\t\tEachWO.ThisWOTotalNets += Exp.ChargeAmount;//this IS where the actual adding to the running total for ALL NET ChargeAmountS for THIS workorders in this report data\n\t\t\t\t\t\tEachWO.ThisWOTotalGrand += Exp.ChargeAmount; //this IS where the actual adding to the running total for GrandTotal for THIS workorders in this report data\n \t \t\t}\t\t\t\t//NOTE if you customize this report template and do NOT need a key above, remove it to increase report performance\t\n\n\t\t\t//if this expense the ChargeToCustomer is true AND ChargeTaxCode has a value then adds the TaxAViz and TaxBViz to running totals\t\t\n\t\t\t\t\tif (Exp.ChargeToCustomer == true && Exp.ChargeTaxCodeId != null ) \n \t \t{\n\t\t\t\t\t\tEachWO.ThisWOTotalTaxAs += Exp.TaxAViz; //this IS where the actual adding of Exp's Tax A to the running total for ALL Tax A for THIS workorders in this report data\n\t\t\t\t\t\tEachWO.ThisWOTotalGrand += Exp.TaxAViz; //this IS where the actual adding of Exp's Tax A to the running total for GrandTotal for THIS workorders in this report data\n\t\t\t\t\t\t\n\t\t\t\t\t\tEachWO.ThisWOTotalTaxBs += Exp.TaxBViz; //this IS where the actual adding of Exp's Tax B to the running total for ALL Tax B for THIS workorders in this report data\n\t\t\t\t\t\tEachWO.ThisWOTotalGrand += Exp.TaxBViz; //this IS where the actual adding of Exp's Tax B to the running total for GrandTotal for THIS workorders in this report data\n \t \t\t}\t\t\t\t//NOTE if you customize this report template and do NOT need a key above, remove it to increase report performance\t\n\t\t\t\t\telse if (Exp.ChargeToCustomer == true && Exp.ChargeTaxCodeId == null ) //else if ChargeToCustomer is true AND ChargeTaxCodeID is null, then add TaxPaid to TaxA running total and Grand Total\t\t\n\t\t\t\t\t\t{\n\t\t\t\t\t\tEachWO.ThisWOTotalTaxAs += Exp.TaxPaid; //this IS where the actual adding of Exp's TaxPaid to the running total for ALL Tax A for THIS workorders in this report data\n\t\t\t\t\t\tEachWO.ThisWOTotalGrand += Exp.TaxPaid; //this IS where the actual adding of Exp's TaxPaid to the running total for GrandTotal for THIS workorders in this report data\n\t\t\t\t\t\t}\n\n\t\t\t}\n\n\t\t\t\n\t\t\tItem.ThisItemAllLoansNetViz = 0; //declare a key on the Item to hold all of this item's loans nets and set it initially to 0 \n\t\t\t\n\t\t\t//below is to Iterate through each Loan record of the wo's Item\n\t\t\tfor (const Loan of Item.Loans)\n\t\t\t{\n\t\t\t//make sure it has a value before attempting to add it to the running total\n \tif (Loan.NetViz != null) \n \t \t{\n \t \tItem.ThisItemAllLoansNetViz += Loan.NetViz;//this IS where the actual adding to running total for this WOItem's Net Loans\n\t\t\t\t\t\tEachWO.ThisWOAllLoansNetViz += Loan.NetViz;//this IS where the actual adding to the running total for this entire WO's Net Loans\n\t\t\t\t\t\tEachWO.ThisWOTotalNets += Loan.NetViz;//this IS where the actual adding to the running total for ALL NETS for THIS workorders in this report data\n\t\t\t\t\t\tEachWO.ThisWOTotalGrand += Loan.NetViz; //this IS where the actual adding to the running total for GrandTotal for THIS workorders in this report data\n\n\t\t\t\t\t\tEachWO.ThisWOTotalTaxAs += Loan.TaxAViz; //this IS where the actual adding of Loan's Tax A to the running total for ALL Tax A for THIS workorders in this report data\n\t\t\t\t\t\tEachWO.ThisWOTotalGrand += Loan.TaxAViz; //this IS where the actual adding of Loan's Tax A to the running total for GrandTotal for THIS workorders in this report data\n\t\t\t\t\t\t\n\t\t\t\t\t\tEachWO.ThisWOTotalTaxBs += Loan.TaxBViz; //this IS where the actual adding of Loan's Tax B to the running total for ALL Tax B for THIS workorders in this report data\n\t\t\t\t\t\tEachWO.ThisWOTotalGrand += Loan.TaxBViz; //this IS where the actual adding of Loan's Tax B to the running total for GrandTotal for THIS workorders in this report data\n \t \t\t}\t\t\t\t//NOTE if you customize this report template and do NOT need a key above, remove it to increase report performance\t\n\t\t\t}\n\n\t\t\tItem.ThisItemAllOutsidesNetViz = 0; //declare a key on the Item to hold all of this item's Outsie nets and set it initially to 0 \n\t\t\t\n\t\t\t//below is to Iterate through each Outside record of the wo's Item\n\t\t\tfor (const Outside of Item.OutsideServices)\n\t\t\t{\n\t\t\t//make sure it has a value before attempting to add it to the running total\n \tif (Outside.NetViz != null) \n \t \t{\n\t\t\t\t\t\t\n \t \tItem.ThisItemAllOutsidesNetViz += Outside.NetViz;//this IS where the actual adding to running total for this WOItem's Net Outside\n\t\t\t\t\t\tEachWO.ThisWOAllOutsidesNetViz += Outside.NetViz;//this IS where the actual adding to the running total for this entire WO's Net Outsides\n\t\t\t\t\t\tEachWO.ThisWOTotalNets += Outside.NetViz;//this IS where the actual adding to the running total for ALL NETS for THIS workorders in this report data\n\t\t\t\t\t\tEachWO.ThisWOTotalGrand += Outside.NetViz; //this IS where the actual adding to the running total for GrandTotal for THIS workorders in this report data\n\n\t\t\t\t\t\tEachWO.ThisWOTotalTaxAs += Outside.TaxAViz; //this IS where the actual adding of Outside's Tax A to the running total for ALL Tax A for THIS workorders in this report data\n\t\t\t\t\t\tEachWO.ThisWOTotalGrand += Outside.TaxAViz; //this IS where the actual adding of Outside's Tax A to the running total for GrandTotal for THIS workorders in this report data\n\t\t\t\t\t\t\n\t\t\t\t\t\tEachWO.ThisWOTotalTaxBs += Outside.TaxBViz; //this IS where the actual adding of Outside's Tax B to the running total for ALL Tax B for THIS workorders in this report data\n\t\t\t\t\t\tEachWO.ThisWOTotalGrand += Outside.TaxBViz; //this IS where the actual adding of Outside's Tax B to the running total for GrandTotal for THIS workorders in this report data\n \t \t\t}\t\t\t\t//NOTE if you customize this report template and do NOT need a key above, remove it to increase report performance\t\n\t\t\t}\n\t\t}\n\t}\n\t\n\n return reportData;\n}","JsHelpers":"Handlebars.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 EXAMPLE SHOW: June 9, 2021\n\n/////////////////////////////////////////////////////////////////\n//\n// CUSTOM DATE HELPER\n//\nHandlebars.registerHelper('myDate', function (value) {\n if (!value) {\n return \"\";\n }\n\n //parse the date\n let parsedDate = new Date(value);\n\n //is it a valid date?\n if (!(parsedDate instanceof Date && !Number.isNaN(parsedDate.getTime()))) {\n return \"not valid\";\n }\n\n //Use built in toLocaleDateString method to format the date\n //there are many options that change the displayed format documented here\n //https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Date/toLocaleDateString\n return parsedDate.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});\n\n","RenderType":0,"HeaderTemplate":" ","FooterTemplate":"          Printed date: \n   Page  of         ","DisplayHeaderFooter":false,"PaperFormat":10,"Landscape":false,"MarginOptionsBottom":"15mm","MarginOptionsLeft":"15mm","MarginOptionsRight":"10mm","MarginOptionsTop":"10mm","PageRanges":null,"PreferCSSPageSize":false,"PrintBackground":true,"Scale":1.00000} \ No newline at end of file diff --git a/server/AyaNova/resource/rpt/stock-report-templates/Customer Work Order.ayrt b/server/AyaNova/resource/rpt/stock-report-templates/Customer Work Order.ayrt index ae251c20..ea49fd88 100644 --- a/server/AyaNova/resource/rpt/stock-report-templates/Customer Work Order.ayrt +++ b/server/AyaNova/resource/rpt/stock-report-templates/Customer Work Order.ayrt @@ -1 +1 @@ -{"Name":"Customer Work Order","Active":true,"Notes":"Displays small logo if present else displays company name and address as entered in Global Settings. Displays digital Signature fields if present. Heading and Signature lines display once per WO regardless number of pages for the work order. \nPrepare functions to derive nets and grand totals\n","Roles":124927,"AType":34,"IncludeWoItemDescendants":false,"Template":"\n\n\n
\n {{#each ayReportData}}\n \n \n \n \n\n \n {{#if ../ayServerMetaData.HasSmallLogo}} \n \n \n \n \n \n \n \n \n\n {{else}} \n\n \n \n \n \n \n \n \n \n \n \n \n \n {{/if}} \n\n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n {{#each Items}}\n \n \n \n \n {{#each Units}}\n \n \n \n \n {{/each}}\n\n \n \n \n \n \n \n \n \n \n\n {{#each Expenses}}\n {{#if ChargeToCustomer}}\n \n \n \n \n \n \n \n \n \n \n {{#if ChargeTaxCodeId}}{{else}} {{/if}}\n {{#if ChargeTaxCodeId}}{{else}} {{/if}}\n \n \n {{else}} \n \n {{/if}}\n {{/each}}\n {{#each Loans}}\n \n \n \n \n \n \n {{#if TaxAViz}}{{else}}{{/if}}\n {{#if TaxBViz}}{{else}}{{/if}}\n \n \n {{/each}}\n {{#each Labors}}\n \n \n \n \n \n \n {{#if TaxAViz}}{{else}}{{/if}}\n {{#if TaxBViz}}{{else}}{{/if}}\n \n \n {{#if ServiceDetails}}\n \n \n \n \n \n {{else}}{{/if}}\n {{/each}}\n {{#each Parts}}\n \n \n \n \n \n \n {{#if TaxAViz}}{{else}}{{/if}}\n {{#if TaxBViz}}{{else}}{{/if}}\n \n \n {{#if Serials}}\n \n \n \n \n {{else}}{{/if}}\n {{/each}}\n {{#each Travels}}\n \n \n \n \n \n \n {{#if TaxAViz}}{{else}}{{/if}}\n {{#if TaxBViz}}{{else}}{{/if}}\n \n \n {{#if TravelDetails}}\n \n \n \n \n \n {{else}}{{/if}}\n {{/each}}\n {{#each OutsideServices}}\n \n \n \n \n {{#if TaxAViz}}{{else}}{{/if}}\n {{#if TaxBViz}}{{else}}{{/if}}\n \n \n {{/each}}\n \n \n \n {{/each}}\n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n {{#if ThisWOTotalTaxAs}}{{else}}{{/if}}\n {{#if ThisWOTotalTaxBs}}{{else}}{{/if}}\n \n \n\n \n \n \n \n \n \n \n \n \n \n\n \n \n \n \n \n \n \n {{#if CustomerSignature}}{{else}} {{/if}}\n {{#if CustomerSignature}}{{else}} {{/if}}\n\n {{#if CustomerSignatureCaptured}}{{else}} {{/if}}\n {{#if CustomerSignatureCaptured}}{{else}} {{/if}}\n\n {{#if CustomerSignatureName}}{{else}} {{/if}}\n {{#if CustomerSignatureName}}{{else}} {{/if}}\n \n\n \n \n\n
{{ ayLogo \"small\" }}{{ayT 'WorkOrderServiceNumber'}}{{Serial}}
{{../ayServerMetaData.CompanyName}}{{ayT 'WorkOrderServiceNumber'}}{{Serial}}
{{../ayServerMetaData.CompanyPostAddress}} {{../ayServerMetaData.CompanyPostCity}}
 
Service performed forPrinted Date{{todaysMonthDDYYYYDate}}
{{CustomerViz}}
 {{Address}}, {{City}} 
 {{CustomerPhone1Viz}} 
 
{{ayT 'WorkOrderServiceDate'}}{{ayT 'WorkOrderCustomerReferenceNumber'}}{{ayT 'WorkOrderInvoiceNumber'}}
{{myDate ServiceDate}}{{CustomerReferenceNumber}}{{InvoiceNumber}}
 
{{ayT 'WorkOrderItemSummary'}}{{Notes}}
{{ayT 'Unit'}}{{UnitViz}} - {{UnitModelNameViz}}
 {{ayT 'WorkOrderItemPartQuantity'}}{{ayT 'Price'}}{{ayT 'NetPrice'}}{{ayT 'TaxCodeTaxA'}}{{ayT 'TaxCodeTaxB'}}{{ayT 'LineTotal'}}
 {{ayT 'WorkOrderItemExpenseList'}}: {{Name}}{{ayCurrency ChargeAmount}}{{ayCurrency TaxAViz}}{{ayCurrency TaxPaid}}{{ayCurrency TaxBViz}} {{ayCurrency LineTotalViz}}
{{ayT 'WorkOrderItemExpenseList'}}: {{Name}} at no charge to customer
 {{ayT 'WorkOrderItemLoanList'}}: {{LoanUnitViz}} / {{UnitOfMeasureViz}}{{Quantity}}{{ayCurrency PriceViz}}{{ayCurrency NetViz}}{{ayCurrency TaxAViz}}$0.00{{ayCurrency TaxBViz}}{{ayCurrency 0.00}}{{ayCurrency LineTotalViz}}
 {{ayT 'WorkOrderItemLaborList'}} performed {{ayDateTime ServiceStartDate}} with {{ayT 'WorkOrderItemLaborServiceRateID'}} of {{ServiceRateViz}}{{ServiceRateQuantity}}{{ayCurrency PriceViz}}{{ayCurrency NetViz}}{{ayCurrency TaxAViz}}$0.00{{ayCurrency TaxBViz}}$0.00{{ayCurrency LineTotalViz}}
 {{ayT 'WorkOrderItemLaborServiceDetails'}}:{{ServiceDetails}}
 {{ayT 'WorkOrderItemPartPartID'}}: {{PartNameViz}} {{PartDescriptionViz}}{{Quantity}}{{ayCurrency PriceViz}}{{ayCurrency NetViz}}{{ayCurrency TaxAViz}}$0.00{{ayCurrency TaxBViz}}$0.00{{ayCurrency LineTotalViz}}
 {{ayT 'WorkOrderItemPartPartID'}} {{ayT 'PurchaseOrderItemSerialNumbers'}}: {{Serials}}
 {{ayT 'WorkOrderItemTravelList'}} performed {{ayDate TravelStartDate}} with {{ayT 'WorkOrderItemTravelServiceRateID'}} of {{TravelRateViz}}{{TravelRateQuantity}}{{ayCurrency PriceViz}}{{ayCurrency NetViz}}{{ayCurrency TaxAViz}}$0.00{{ayCurrency TaxBViz}}$0.00{{ayCurrency LineTotalViz}}
 {{ayT 'WorkOrderItemTravelDetails'}}:{{TravelDetails}}
 {{ayT 'WorkOrderItemOutsideService'}} performed on Unit: {{UnitViz}}{{ayCurrency NetViz}}{{ayCurrency TaxAViz}}$0.00{{ayCurrency TaxBViz}}$0.00{{ayCurrency LineTotalViz}}
 
 
Total NetsTotal TaxATotal TaxBGrand Total
{{ayCurrency ThisWOTotalNets}}{{ayCurrency ThisWOTotalTaxAs}}$0.00{{ayCurrency ThisWOTotalTaxBs}}$0.00{{ayCurrency ThisWOTotalGrand}}
 
Thank you for your business!Terms: Net 30 days
 
I acknowledge the satisfactory provision and completion of the above for {{ayT 'WorkOrderServiceNumber'}} {{Serial}}
 
Digital {{ayT 'CustomerSignature'}}{{ayT 'CustomerSignature'}} ___________________Digital Signature DateSignature Date{{ayDateTime CustomerSignatureCaptured}}____________________Digital Print of NamePrint of Name{{CustomerSignatureName}}____________________
\n\n\n {{/each}}\n
\n\n\n\n","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} \n\ntable { \n table-layout: fixed; \n border-collapse: collapse;\n white-space: pre-wrap;\n font-size: 9pt;\n width: 100%;\n }\n\n\nth {\n height: 20px;\n color: #9e9e9e;\n}\n\ntbody tr {\n height: 10px;\n word-wrap: break-word;\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.fontgreen {\n color: green;\n}\n.fontblue {\n color: blue;\n}\n.fontred {\n color:red;\n}\n\n\n.rightlean {\n text-align: right;\n}\n.leftlean {\n text-align: left;\n}\n.centerlean {\n text-align: center;\n}","JsPrerender":"async function ayPrepareData(reportData){ \n //this function (if present) is called with the report data \n //before the report is rendered\n //modify data as required here and return it to change the data before the report renders\n //see the help documentation for details\n\n\tawait ayGetTranslations([\"WorkOrderInvoiceNumber\", \"WorkOrderServiceDate\", \"WorkOrderServiceNumber\", \"WorkOrderCustomerReferenceNumber\", \"Unit\", \"WorkOrderItemSummary\", \"WorkOrderItemPartQuantity\", \"Price\", \"NetPrice\", \"TaxCodeTaxA\", \"TaxCodeTaxB\", \"LineTotal\", \"WorkOrderItemExpenseList\", \"WorkOrderItemLoanList\", \"WorkOrderItemPartPartID\", \"PurchaseOrderItemSerialNumbers\", \"WorkOrderItemLaborList\", \"WorkOrderItemLaborServiceRateID\", \"WorkOrderItemLaborServiceDetails\", \"WorkOrderItemTravelList\", \"WorkOrderItemTravelDetails\", \"WorkOrderItemTravelServiceRateID\", \"WorkOrderItemOutsideService\", \"CustomerSignature\" ]);\n\n\t//below checks if any parts have Serials to remove carriage returns so parts serials display on same line\n for (const EachWO of reportData.ayReportData) {\n for (const Item of EachWO.Items) {\n for (const Part of Item.Parts) {\n if (Part.Serials != null) {\n var s = Part.Serials; \n Part.Serials = s.replace(/[\\n\\r]+/g, ' ');\n }\n }\n }\n }\n\n\n//********************//NOTE if you customize this report template and do NOT need a function or key identified below, remove to increase report performance\n\n\nfor (const EachWO of reportData.ayReportData) \n\t{\n\t//below declares a key on the entire wo to hold all Labor Net Viz from all Items in this wo so it exists\n\tEachWO.ThisWOAllLaborsNetViz = 0;\n\t//below declares a key on the entire wo to hold all Part Net Viz from all Items in this wo so it exists\n\tEachWO.ThisWOAllPartsNetViz = 0;\n\t//below declares a key on the entire wo to hold all Travel Net Viz from all Items in this wo so it exists\n\tEachWO.ThisWOAllTravelsNetViz = 0;\n\t//below declares a key on the entire wo to hold all Exp Net ChargeAmount from all Items in this wo so it exists\n\tEachWO.ThisWOAllExpsNetChargeAmount = 0;\n\t//below declares a key on the entire wo to hold all Loan Net Viz from all Items in this wo so it exists\n\tEachWO.ThisWOAllLoansNetViz = 0;\n\t//below declares a key on the entire wo to hold all Outside Net Viz from all Items in this wo so it exists\n\tEachWO.ThisWOAllOutsidesNetViz = 0;\t\n\n\t//below declares a key on the entire wo to hold ALL of THIS workorder's Nets so it exists\n\tEachWO.ThisWOTotalNets = 0;\n\n\t//below declares a key on the entire wo to hold THIS workorder's Tax A (for all items) so it exists \n\tEachWO.ThisWOTotalTaxAs = 0;\n\t//below declares a key on the entire wo to hold THIS workorder's Tax B (for all items) so it exists\n\tEachWO.ThisWOTotalTaxBs = 0;\t\n\t//below declares a key on the entire wo to hold THIS workorder's Grand Total so it exists\n\tEachWO.ThisWOTotalGrand = 0;\n\n\t//below is to Iterate through each item of the wo's Items\n\tfor (const Item of EachWO.Items)\n\t\t{\n\t\t\tItem.ThisItemAllLaborsNetViz = 0; //declare a key on the Item to hold all of this item's labor nets and set it initially to 0 \n\t\t\t\n\t\t\t//below is to Iterate through each labor record of the wo's Item\n\t\t\tfor (const Labor of Item.Labors)\n\t\t\t{\n\t\t\t//make sure it has a value before attempting to add it to the running total\n \tif (Labor.NetViz != null) \n \t \t{\n \t \tItem.ThisItemAllLaborsNetViz += Labor.NetViz; //this IS where the actual adding to running total for this WOItem's Net Labors\n\t\t\t\t\t\tEachWO.ThisWOAllLaborsNetViz += Labor.NetViz; //this IS where the actual adding to the running total for this entire WO's Net Labors\n\t\t\t\t\t\tEachWO.ThisWOTotalNets += Labor.NetViz; //this IS where the actual adding to the running total for ALL NETS for THIS workorders in this report data\n\t\t\t\t\t\tEachWO.ThisWOTotalGrand += Labor.NetViz; //this IS where the actual adding to the running total for GrandTotal for THIS workorders in this report data\t\n\t\t\t\t\t\t\n\t\t\t\t\t\tEachWO.ThisWOTotalTaxAs += Labor.TaxAViz; //this IS where the actual adding of Labor's Tax A to the running total for ALL Tax A for THIS workorders in this report data\n\t\t\t\t\t\tEachWO.ThisWOTotalGrand += Labor.TaxAViz; //this IS where the actual adding of Labor's Tax A to the running total for GrandTotal for THIS workorders in this report data\n\t\t\t\t\t\t\n\t\t\t\t\t\tEachWO.ThisWOTotalTaxBs += Labor.TaxBViz; //this IS where the actual adding of Labor's Tax B to the running total for ALL Tax B for THIS workorders in this report data\n\t\t\t\t\t\tEachWO.ThisWOTotalGrand += Labor.TaxBViz; //this IS where the actual adding of Labor's Tax B to the running total for GrandTotal for THIS workorders in this report data\n \t \t\t}\t\t//NOTE if you customize this report template and do NOT need a key above, remove it to increase report performance\t\t\n\t\t\t}\n\n\t\t\tItem.ThisItemAllPartsNetViz = 0; //declare a key on the Item to hold all of this item's parts nets and set it initially to 0 \n\t\t\t\n\t\t\t//below is to Iterate through each Part record of the wo's Item\n\t\t\tfor (const Part of Item.Parts)\n\t\t\t{\n\t\t\t//make sure it has a value before attempting to add it to the running total\n \tif (Part.NetViz != null) \n \t \t{\n \t \tItem.ThisItemAllPartsNetViz += Part.NetViz; //this IS where the actual adding to running total for this WOItem's Net Parts\n\t\t\t\t\t\tEachWO.ThisWOAllPartsNetViz += Part.NetViz;//this IS where the actual adding to the running total for this entire WO's Net Parts\n\t\t\t\t\t\tEachWO.ThisWOTotalNets += Part.NetViz; //this IS where the actual adding to the running total for ALL NETS for THIS workorders in this report data\n\t\t\t\t\t\tEachWO.ThisWOTotalGrand += Part.NetViz; //this IS where the actual adding to the running total for GrandTotal for THIS workorders in this report data\t\t\t\t\t\t\n\n\t\t\t\t\t\tEachWO.ThisWOTotalTaxAs += Part.TaxAViz; //this IS where the actual adding of Part's Tax A to the running total for ALL Tax A for THIS workorders in this report data\n\t\t\t\t\t\tEachWO.ThisWOTotalGrand += Part.TaxAViz; //this IS where the actual adding of Part's Tax A to the running total for GrandTotal for THIS workorders in this report data\n\t\t\t\t\t\t\n\t\t\t\t\t\tEachWO.ThisWOTotalTaxBs += Part.TaxBViz; //this IS where the actual adding of Part's Tax B to the running total for ALL Tax B for THIS workorders in this report data\n\t\t\t\t\t\tEachWO.ThisWOTotalGrand += Part.TaxBViz; //this IS where the actual adding of Part's Tax B to the running total for GrandTotal for THIS workorders in this report data\n \t \t\t}\t\t\t\t//NOTE if you customize this report template and do NOT need a key above, remove it to increase report performance\t\n\t\t\t}\n\n\t\t\tItem.ThisItemAllTravelsNetViz = 0; //declare a key on the Item to hold all of this item's travel nets and set it initially to 0 \n\t\t\t\n\t\t\t//below is to Iterate through each Travel record of the wo's Item\n\t\t\tfor (const Travel of Item.Travels)\n\t\t\t{\n\t\t\t//make sure it has a value before attempting to add it to the running total\n \tif (Travel.NetViz != null) \n \t \t{\n\t\t\t\t\t\t\n \t \tItem.ThisItemAllTravelsNetViz += Travel.NetViz;//this IS where the actual adding to running total for this WOItem's Net Travels\n\t\t\t\t\t\tEachWO.ThisWOAllTravelsNetViz += Travel.NetViz;//this IS where the actual adding to the running total for this entire WO's Net Travels\n\t\t\t\t\t\tEachWO.ThisWOTotalNets += Travel.NetViz;//this IS where the actual adding to the running total for ALL NETS for THIS workorders in this report data\n\t\t\t\t\t\tEachWO.ThisWOTotalGrand += Travel.NetViz; //this IS where the actual adding to the running total for GrandTotal for THIS workorders in this report data\n\n\t\t\t\t\t\tEachWO.ThisWOTotalTaxAs += Travel.TaxAViz; //this IS where the actual adding of Travel's Tax A to the running total for ALL Tax A for THIS workorders in this report data\n\t\t\t\t\t\tEachWO.ThisWOTotalGrand += Travel.TaxAViz; //this IS where the actual adding of Travel's Tax A to the running total for GrandTotal for THIS workorders in this report data\n\t\t\t\t\t\t\n\t\t\t\t\t\tEachWO.ThisWOTotalTaxBs += Travel.TaxBViz; //this IS where the actual adding of Travel's Tax B to the running total for ALL Tax B for THIS workorders in this report data\n\t\t\t\t\t\tEachWO.ThisWOTotalGrand += Travel.TaxBViz; //this IS where the actual adding of Travel's Tax B to the running total for GrandTotal for THIS workorders in this report data\n \t \t\t}\t\t\t\t//NOTE if you customize this report template and do NOT need a key above, remove it to increase report performance\t\n\t\t\t}\n\n\t\t\t//note additional statements for misc expense to ONLY add to running totals if ChargeToCustomer is true\n\t\t\t\n\t\t\tItem.ThisItemAllExpsNetChargeAmount = 0; //declare a key on the Item to hold all of this item's misc nets and set it initially to 0 \n\t\t\t\n\t\t\t//below is to Iterate through each Exp record of the wo's Item\n\t\t\tfor (const Exp of Item.Expenses)\n\t\t\t{\n\t\t\t//if this expense has a ChargeAmount value AND the ChargeToCustomer is true then adds the ChargeAmount to running totals\n \tif (Exp.ChargeAmount != null && Exp.ChargeToCustomer == true) \n \t \t{\n\t\t\t\t\t\t\n \t \tItem.ThisItemAllExpsNetChargeAmount += Exp.ChargeAmount;//this IS where the actual adding to running total for this WOItem's Net Exps\n\t\t\t\t\t\tEachWO.ThisWOAllExpsNetChargeAmount += Exp.ChargeAmount;//this IS where the actual adding to the running total for this entire WO's Net ChargeAmounts\n\t\t\t\t\t\tEachWO.ThisWOTotalNets += Exp.ChargeAmount;//this IS where the actual adding to the running total for ALL NET ChargeAmountS for THIS workorders in this report data\n\t\t\t\t\t\tEachWO.ThisWOTotalGrand += Exp.ChargeAmount; //this IS where the actual adding to the running total for GrandTotal for THIS workorders in this report data\n \t \t\t}\t\t\t\t//NOTE if you customize this report template and do NOT need a key above, remove it to increase report performance\t\n\n\t\t\t//if this expense the ChargeToCustomer is true AND ChargeTaxCode has a value then adds the TaxAViz and TaxBViz to running totals\t\t\n\t\t\t\t\tif (Exp.ChargeToCustomer == true && Exp.ChargeTaxCodeId != null ) \n \t \t{\n\t\t\t\t\t\tEachWO.ThisWOTotalTaxAs += Exp.TaxAViz; //this IS where the actual adding of Exp's Tax A to the running total for ALL Tax A for THIS workorders in this report data\n\t\t\t\t\t\tEachWO.ThisWOTotalGrand += Exp.TaxAViz; //this IS where the actual adding of Exp's Tax A to the running total for GrandTotal for THIS workorders in this report data\n\t\t\t\t\t\t\n\t\t\t\t\t\tEachWO.ThisWOTotalTaxBs += Exp.TaxBViz; //this IS where the actual adding of Exp's Tax B to the running total for ALL Tax B for THIS workorders in this report data\n\t\t\t\t\t\tEachWO.ThisWOTotalGrand += Exp.TaxBViz; //this IS where the actual adding of Exp's Tax B to the running total for GrandTotal for THIS workorders in this report data\n \t \t\t}\t\t\t\t//NOTE if you customize this report template and do NOT need a key above, remove it to increase report performance\t\n\t\t\t\t\telse if (Exp.ChargeToCustomer == true && Exp.ChargeTaxCodeId == null ) //else if ChargeToCustomer is true AND ChargeTaxCodeID is null, then add TaxPaid to TaxA running total and Grand Total\t\t\n\t\t\t\t\t\t{\n\t\t\t\t\t\tEachWO.ThisWOTotalTaxAs += Exp.TaxPaid; //this IS where the actual adding of Exp's TaxPaid to the running total for ALL Tax A for THIS workorders in this report data\n\t\t\t\t\t\tEachWO.ThisWOTotalGrand += Exp.TaxPaid; //this IS where the actual adding of Exp's TaxPaid to the running total for GrandTotal for THIS workorders in this report data\n\t\t\t\t\t\t}\n\n\t\t\t}\n\n\t\t\t\n\t\t\tItem.ThisItemAllLoansNetViz = 0; //declare a key on the Item to hold all of this item's loans nets and set it initially to 0 \n\t\t\t\n\t\t\t//below is to Iterate through each Loan record of the wo's Item\n\t\t\tfor (const Loan of Item.Loans)\n\t\t\t{\n\t\t\t//make sure it has a value before attempting to add it to the running total\n \tif (Loan.NetViz != null) \n \t \t{\n \t \tItem.ThisItemAllLoansNetViz += Loan.NetViz;//this IS where the actual adding to running total for this WOItem's Net Loans\n\t\t\t\t\t\tEachWO.ThisWOAllLoansNetViz += Loan.NetViz;//this IS where the actual adding to the running total for this entire WO's Net Loans\n\t\t\t\t\t\tEachWO.ThisWOTotalNets += Loan.NetViz;//this IS where the actual adding to the running total for ALL NETS for THIS workorders in this report data\n\t\t\t\t\t\tEachWO.ThisWOTotalGrand += Loan.NetViz; //this IS where the actual adding to the running total for GrandTotal for THIS workorders in this report data\n\n\t\t\t\t\t\tEachWO.ThisWOTotalTaxAs += Loan.TaxAViz; //this IS where the actual adding of Loan's Tax A to the running total for ALL Tax A for THIS workorders in this report data\n\t\t\t\t\t\tEachWO.ThisWOTotalGrand += Loan.TaxAViz; //this IS where the actual adding of Loan's Tax A to the running total for GrandTotal for THIS workorders in this report data\n\t\t\t\t\t\t\n\t\t\t\t\t\tEachWO.ThisWOTotalTaxBs += Loan.TaxBViz; //this IS where the actual adding of Loan's Tax B to the running total for ALL Tax B for THIS workorders in this report data\n\t\t\t\t\t\tEachWO.ThisWOTotalGrand += Loan.TaxBViz; //this IS where the actual adding of Loan's Tax B to the running total for GrandTotal for THIS workorders in this report data\n \t \t\t}\t\t\t\t//NOTE if you customize this report template and do NOT need a key above, remove it to increase report performance\t\n\t\t\t}\n\n\t\t\tItem.ThisItemAllOutsidesNetViz = 0; //declare a key on the Item to hold all of this item's Outsie nets and set it initially to 0 \n\t\t\t\n\t\t\t//below is to Iterate through each Outside record of the wo's Item\n\t\t\tfor (const Outside of Item.OutsideServices)\n\t\t\t{\n\t\t\t//make sure it has a value before attempting to add it to the running total\n \tif (Outside.NetViz != null) \n \t \t{\n\t\t\t\t\t\t\n \t \tItem.ThisItemAllOutsidesNetViz += Outside.NetViz;//this IS where the actual adding to running total for this WOItem's Net Outside\n\t\t\t\t\t\tEachWO.ThisWOAllOutsidesNetViz += Outside.NetViz;//this IS where the actual adding to the running total for this entire WO's Net Outsides\n\t\t\t\t\t\tEachWO.ThisWOTotalNets += Outside.NetViz;//this IS where the actual adding to the running total for ALL NETS for THIS workorders in this report data\n\t\t\t\t\t\tEachWO.ThisWOTotalGrand += Outside.NetViz; //this IS where the actual adding to the running total for GrandTotal for THIS workorders in this report data\n\n\t\t\t\t\t\tEachWO.ThisWOTotalTaxAs += Outside.TaxAViz; //this IS where the actual adding of Outside's Tax A to the running total for ALL Tax A for THIS workorders in this report data\n\t\t\t\t\t\tEachWO.ThisWOTotalGrand += Outside.TaxAViz; //this IS where the actual adding of Outside's Tax A to the running total for GrandTotal for THIS workorders in this report data\n\t\t\t\t\t\t\n\t\t\t\t\t\tEachWO.ThisWOTotalTaxBs += Outside.TaxBViz; //this IS where the actual adding of Outside's Tax B to the running total for ALL Tax B for THIS workorders in this report data\n\t\t\t\t\t\tEachWO.ThisWOTotalGrand += Outside.TaxBViz; //this IS where the actual adding of Outside's Tax B to the running total for GrandTotal for THIS workorders in this report data\n \t \t\t}\t\t\t\t//NOTE if you customize this report template and do NOT need a key above, remove it to increase report performance\t\n\t\t\t}\n\t\t}\n\t}\n\t\n\n return reportData;\n}","JsHelpers":"Handlebars.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 EXAMPLE SHOW: June 9, 2021\n\n/////////////////////////////////////////////////////////////////\n//\n// CUSTOM DATE HELPER\n//\nHandlebars.registerHelper('myDate', function (value) {\n if (!value) {\n return \"\";\n }\n\n //parse the date\n let parsedDate = new Date(value);\n\n //is it a valid date?\n if (!(parsedDate instanceof Date && !Number.isNaN(parsedDate.getTime()))) {\n return \"not valid\";\n }\n \n //Use built in toLocaleDateString method to format the date\n //there are many options that change the displayed format documented here\n //https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Date/toLocaleDateString\n return parsedDate.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});\n\n","RenderType":0,"HeaderTemplate":" ","FooterTemplate":"          Printed date: \n   Page  of         ","DisplayHeaderFooter":false,"PaperFormat":10,"Landscape":false,"MarginOptionsBottom":"15mm","MarginOptionsLeft":"15mm","MarginOptionsRight":"10mm","MarginOptionsTop":"10mm","PageRanges":null,"PreferCSSPageSize":false,"PrintBackground":true,"Scale":1.00000} \ No newline at end of file +{"Name":"Customer Work Order","Active":true,"Notes":"Displays small logo if present else displays company name and address as entered in Global Settings. Displays digital Signature fields if present. Heading and Signature lines display once per WO regardless number of pages for the work order. \nPrepare functions to derive nets and grand totals\n","Roles":124927,"AType":34,"IncludeWoItemDescendants":false,"Template":"\n\n\n
\n {{#each ayReportData}}\n \n \n \n \n\n \n {{#if ../ayServerMetaData.HasSmallLogo}} \n \n \n \n \n \n \n \n \n\n {{else}} \n\n \n \n \n \n \n \n \n \n \n \n \n \n {{/if}} \n\n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n {{#each Items}}\n \n \n \n \n {{#each Units}}\n \n \n \n \n {{/each}}\n\n \n \n \n \n \n \n \n \n \n\n {{#each Expenses}}\n {{#if ChargeToCustomer}}\n \n \n \n \n \n \n \n \n \n \n {{#if ChargeTaxCodeId}}{{else}} {{/if}}\n {{#if ChargeTaxCodeId}}{{else}} {{/if}}\n \n \n {{else}} \n \n {{/if}}\n {{/each}}\n {{#each Loans}}\n \n \n \n \n \n \n {{#if TaxAViz}}{{else}}{{/if}}\n {{#if TaxBViz}}{{else}}{{/if}}\n \n \n {{/each}}\n {{#each Labors}}\n \n \n \n \n \n \n {{#if TaxAViz}}{{else}}{{/if}}\n {{#if TaxBViz}}{{else}}{{/if}}\n \n \n {{#if ServiceDetails}}\n \n \n \n \n \n {{else}}{{/if}}\n {{/each}}\n {{#each Parts}}\n \n \n \n \n \n \n {{#if TaxAViz}}{{else}}{{/if}}\n {{#if TaxBViz}}{{else}}{{/if}}\n \n \n {{#if Serials}}\n \n \n \n \n {{else}}{{/if}}\n {{/each}}\n {{#each Travels}}\n \n \n \n \n \n \n {{#if TaxAViz}}{{else}}{{/if}}\n {{#if TaxBViz}}{{else}}{{/if}}\n \n \n {{#if TravelDetails}}\n \n \n \n \n \n {{else}}{{/if}}\n {{/each}}\n {{#each OutsideServices}}\n \n \n \n \n {{#if TaxAViz}}{{else}}{{/if}}\n {{#if TaxBViz}}{{else}}{{/if}}\n \n \n {{/each}}\n \n \n \n {{/each}}\n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n {{#if ThisWOTotalTaxAs}}{{else}}{{/if}}\n {{#if ThisWOTotalTaxBs}}{{else}}{{/if}}\n \n \n\n \n \n \n \n \n \n \n \n \n \n\n \n \n \n \n \n \n \n {{#if CustomerSignature}}{{else}} {{/if}}\n {{#if CustomerSignature}}{{else}} {{/if}}\n\n {{#if CustomerSignatureCaptured}}{{else}} {{/if}}\n {{#if CustomerSignatureCaptured}}{{else}} {{/if}}\n\n {{#if CustomerSignatureName}}{{else}} {{/if}}\n {{#if CustomerSignatureName}}{{else}} {{/if}}\n \n\n \n \n\n
{{ ayLogo \"small\" }}{{ayT 'WorkOrderSerialNumber'}}{{Serial}}
{{../ayServerMetaData.CompanyName}}{{ayT 'WorkOrderSerialNumber'}}{{Serial}}
{{../ayServerMetaData.CompanyPostAddress}} {{../ayServerMetaData.CompanyPostCity}}
 
Service performed forPrinted Date{{todaysMonthDDYYYYDate}}
{{CustomerViz}}
 {{Address}}, {{City}} 
 {{CustomerPhone1Viz}} 
 
{{ayT 'WorkOrderServiceDate'}}{{ayT 'WorkOrderCustomerReferenceNumber'}}{{ayT 'WorkOrderInvoiceNumber'}}
{{myDate ServiceDate}}{{CustomerReferenceNumber}}{{InvoiceNumber}}
 
{{ayT 'WorkOrderItemSummary'}}{{Notes}}
{{ayT 'Unit'}}{{UnitViz}} - {{UnitModelNameViz}}
 {{ayT 'WorkOrderItemPartQuantity'}}{{ayT 'Price'}}{{ayT 'NetPrice'}}{{ayT 'TaxCodeTaxA'}}{{ayT 'TaxCodeTaxB'}}{{ayT 'LineTotal'}}
 {{ayT 'WorkOrderItemExpenseList'}}: {{Name}}{{ayCurrency ChargeAmount}}{{ayCurrency TaxAViz}}{{ayCurrency TaxPaid}}{{ayCurrency TaxBViz}} {{ayCurrency LineTotalViz}}
{{ayT 'WorkOrderItemExpenseList'}}: {{Name}} at no charge to customer
 {{ayT 'WorkOrderItemLoanList'}}: {{LoanUnitViz}} / {{UnitOfMeasureViz}}{{Quantity}}{{ayCurrency PriceViz}}{{ayCurrency NetViz}}{{ayCurrency TaxAViz}}$0.00{{ayCurrency TaxBViz}}{{ayCurrency 0.00}}{{ayCurrency LineTotalViz}}
 {{ayT 'WorkOrderItemLaborList'}} performed {{ayDateTime ServiceStartDate}} with {{ayT 'WorkOrderItemLaborServiceRateID'}} of {{ServiceRateViz}}{{ServiceRateQuantity}}{{ayCurrency PriceViz}}{{ayCurrency NetViz}}{{ayCurrency TaxAViz}}$0.00{{ayCurrency TaxBViz}}$0.00{{ayCurrency LineTotalViz}}
 {{ayT 'WorkOrderItemLaborServiceDetails'}}:{{ServiceDetails}}
 {{ayT 'WorkOrderItemPartPartID'}}: {{PartNameViz}} {{PartDescriptionViz}}{{Quantity}}{{ayCurrency PriceViz}}{{ayCurrency NetViz}}{{ayCurrency TaxAViz}}$0.00{{ayCurrency TaxBViz}}$0.00{{ayCurrency LineTotalViz}}
 {{ayT 'WorkOrderItemPartPartID'}} {{ayT 'PurchaseOrderItemSerialNumbers'}}: {{Serials}}
 {{ayT 'WorkOrderItemTravelList'}} performed {{ayDate TravelStartDate}} with {{ayT 'WorkOrderItemTravelServiceRateID'}} of {{TravelRateViz}}{{TravelRateQuantity}}{{ayCurrency PriceViz}}{{ayCurrency NetViz}}{{ayCurrency TaxAViz}}$0.00{{ayCurrency TaxBViz}}$0.00{{ayCurrency LineTotalViz}}
 {{ayT 'WorkOrderItemTravelDetails'}}:{{TravelDetails}}
 {{ayT 'WorkOrderItemOutsideService'}} performed on Unit: {{UnitViz}}{{ayCurrency NetViz}}{{ayCurrency TaxAViz}}$0.00{{ayCurrency TaxBViz}}$0.00{{ayCurrency LineTotalViz}}
 
 
Total NetsTotal TaxATotal TaxBGrand Total
{{ayCurrency ThisWOTotalNets}}{{ayCurrency ThisWOTotalTaxAs}}$0.00{{ayCurrency ThisWOTotalTaxBs}}$0.00{{ayCurrency ThisWOTotalGrand}}
 
Thank you for your business!Terms: Net 30 days
 
I acknowledge the satisfactory provision and completion of the above for {{ayT 'WorkOrderSerialNumber'}} {{Serial}}
 
Digital {{ayT 'CustomerSignature'}}{{ayT 'CustomerSignature'}} ___________________Digital Signature DateSignature Date{{ayDateTime CustomerSignatureCaptured}}____________________Digital Print of NamePrint of Name{{CustomerSignatureName}}____________________
\n\n\n {{/each}}\n
\n\n\n\n","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} \n\ntable { \n table-layout: fixed; \n border-collapse: collapse;\n white-space: pre-wrap;\n font-size: 9pt;\n width: 100%;\n }\n\n\nth {\n height: 20px;\n color: #9e9e9e;\n}\n\ntbody tr {\n height: 10px;\n word-wrap: break-word;\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.fontgreen {\n color: green;\n}\n.fontblue {\n color: blue;\n}\n.fontred {\n color:red;\n}\n\n\n.rightlean {\n text-align: right;\n}\n.leftlean {\n text-align: left;\n}\n.centerlean {\n text-align: center;\n}","JsPrerender":"async function ayPrepareData(reportData){ \n //this function (if present) is called with the report data \n //before the report is rendered\n //modify data as required here and return it to change the data before the report renders\n //see the help documentation for details\n\n\tawait ayGetTranslations([\"WorkOrderInvoiceNumber\", \"WorkOrderServiceDate\", \"WorkOrderSerialNumber\", \"WorkOrderCustomerReferenceNumber\", \"Unit\", \"WorkOrderItemSummary\", \"WorkOrderItemPartQuantity\", \"Price\", \"NetPrice\", \"TaxCodeTaxA\", \"TaxCodeTaxB\", \"LineTotal\", \"WorkOrderItemExpenseList\", \"WorkOrderItemLoanList\", \"WorkOrderItemPartPartID\", \"PurchaseOrderItemSerialNumbers\", \"WorkOrderItemLaborList\", \"WorkOrderItemLaborServiceRateID\", \"WorkOrderItemLaborServiceDetails\", \"WorkOrderItemTravelList\", \"WorkOrderItemTravelDetails\", \"WorkOrderItemTravelServiceRateID\", \"WorkOrderItemOutsideService\", \"CustomerSignature\" ]);\n\n\t//below checks if any parts have Serials to remove carriage returns so parts serials display on same line\n for (const EachWO of reportData.ayReportData) {\n for (const Item of EachWO.Items) {\n for (const Part of Item.Parts) {\n if (Part.Serials != null) {\n var s = Part.Serials; \n Part.Serials = s.replace(/[\\n\\r]+/g, ' ');\n }\n }\n }\n }\n\n\n//********************//NOTE if you customize this report template and do NOT need a function or key identified below, remove to increase report performance\n\n\nfor (const EachWO of reportData.ayReportData) \n\t{\n\t//below declares a key on the entire wo to hold all Labor Net Viz from all Items in this wo so it exists\n\tEachWO.ThisWOAllLaborsNetViz = 0;\n\t//below declares a key on the entire wo to hold all Part Net Viz from all Items in this wo so it exists\n\tEachWO.ThisWOAllPartsNetViz = 0;\n\t//below declares a key on the entire wo to hold all Travel Net Viz from all Items in this wo so it exists\n\tEachWO.ThisWOAllTravelsNetViz = 0;\n\t//below declares a key on the entire wo to hold all Exp Net ChargeAmount from all Items in this wo so it exists\n\tEachWO.ThisWOAllExpsNetChargeAmount = 0;\n\t//below declares a key on the entire wo to hold all Loan Net Viz from all Items in this wo so it exists\n\tEachWO.ThisWOAllLoansNetViz = 0;\n\t//below declares a key on the entire wo to hold all Outside Net Viz from all Items in this wo so it exists\n\tEachWO.ThisWOAllOutsidesNetViz = 0;\t\n\n\t//below declares a key on the entire wo to hold ALL of THIS workorder's Nets so it exists\n\tEachWO.ThisWOTotalNets = 0;\n\n\t//below declares a key on the entire wo to hold THIS workorder's Tax A (for all items) so it exists \n\tEachWO.ThisWOTotalTaxAs = 0;\n\t//below declares a key on the entire wo to hold THIS workorder's Tax B (for all items) so it exists\n\tEachWO.ThisWOTotalTaxBs = 0;\t\n\t//below declares a key on the entire wo to hold THIS workorder's Grand Total so it exists\n\tEachWO.ThisWOTotalGrand = 0;\n\n\t//below is to Iterate through each item of the wo's Items\n\tfor (const Item of EachWO.Items)\n\t\t{\n\t\t\tItem.ThisItemAllLaborsNetViz = 0; //declare a key on the Item to hold all of this item's labor nets and set it initially to 0 \n\t\t\t\n\t\t\t//below is to Iterate through each labor record of the wo's Item\n\t\t\tfor (const Labor of Item.Labors)\n\t\t\t{\n\t\t\t//make sure it has a value before attempting to add it to the running total\n \tif (Labor.NetViz != null) \n \t \t{\n \t \tItem.ThisItemAllLaborsNetViz += Labor.NetViz; //this IS where the actual adding to running total for this WOItem's Net Labors\n\t\t\t\t\t\tEachWO.ThisWOAllLaborsNetViz += Labor.NetViz; //this IS where the actual adding to the running total for this entire WO's Net Labors\n\t\t\t\t\t\tEachWO.ThisWOTotalNets += Labor.NetViz; //this IS where the actual adding to the running total for ALL NETS for THIS workorders in this report data\n\t\t\t\t\t\tEachWO.ThisWOTotalGrand += Labor.NetViz; //this IS where the actual adding to the running total for GrandTotal for THIS workorders in this report data\t\n\t\t\t\t\t\t\n\t\t\t\t\t\tEachWO.ThisWOTotalTaxAs += Labor.TaxAViz; //this IS where the actual adding of Labor's Tax A to the running total for ALL Tax A for THIS workorders in this report data\n\t\t\t\t\t\tEachWO.ThisWOTotalGrand += Labor.TaxAViz; //this IS where the actual adding of Labor's Tax A to the running total for GrandTotal for THIS workorders in this report data\n\t\t\t\t\t\t\n\t\t\t\t\t\tEachWO.ThisWOTotalTaxBs += Labor.TaxBViz; //this IS where the actual adding of Labor's Tax B to the running total for ALL Tax B for THIS workorders in this report data\n\t\t\t\t\t\tEachWO.ThisWOTotalGrand += Labor.TaxBViz; //this IS where the actual adding of Labor's Tax B to the running total for GrandTotal for THIS workorders in this report data\n \t \t\t}\t\t//NOTE if you customize this report template and do NOT need a key above, remove it to increase report performance\t\t\n\t\t\t}\n\n\t\t\tItem.ThisItemAllPartsNetViz = 0; //declare a key on the Item to hold all of this item's parts nets and set it initially to 0 \n\t\t\t\n\t\t\t//below is to Iterate through each Part record of the wo's Item\n\t\t\tfor (const Part of Item.Parts)\n\t\t\t{\n\t\t\t//make sure it has a value before attempting to add it to the running total\n \tif (Part.NetViz != null) \n \t \t{\n \t \tItem.ThisItemAllPartsNetViz += Part.NetViz; //this IS where the actual adding to running total for this WOItem's Net Parts\n\t\t\t\t\t\tEachWO.ThisWOAllPartsNetViz += Part.NetViz;//this IS where the actual adding to the running total for this entire WO's Net Parts\n\t\t\t\t\t\tEachWO.ThisWOTotalNets += Part.NetViz; //this IS where the actual adding to the running total for ALL NETS for THIS workorders in this report data\n\t\t\t\t\t\tEachWO.ThisWOTotalGrand += Part.NetViz; //this IS where the actual adding to the running total for GrandTotal for THIS workorders in this report data\t\t\t\t\t\t\n\n\t\t\t\t\t\tEachWO.ThisWOTotalTaxAs += Part.TaxAViz; //this IS where the actual adding of Part's Tax A to the running total for ALL Tax A for THIS workorders in this report data\n\t\t\t\t\t\tEachWO.ThisWOTotalGrand += Part.TaxAViz; //this IS where the actual adding of Part's Tax A to the running total for GrandTotal for THIS workorders in this report data\n\t\t\t\t\t\t\n\t\t\t\t\t\tEachWO.ThisWOTotalTaxBs += Part.TaxBViz; //this IS where the actual adding of Part's Tax B to the running total for ALL Tax B for THIS workorders in this report data\n\t\t\t\t\t\tEachWO.ThisWOTotalGrand += Part.TaxBViz; //this IS where the actual adding of Part's Tax B to the running total for GrandTotal for THIS workorders in this report data\n \t \t\t}\t\t\t\t//NOTE if you customize this report template and do NOT need a key above, remove it to increase report performance\t\n\t\t\t}\n\n\t\t\tItem.ThisItemAllTravelsNetViz = 0; //declare a key on the Item to hold all of this item's travel nets and set it initially to 0 \n\t\t\t\n\t\t\t//below is to Iterate through each Travel record of the wo's Item\n\t\t\tfor (const Travel of Item.Travels)\n\t\t\t{\n\t\t\t//make sure it has a value before attempting to add it to the running total\n \tif (Travel.NetViz != null) \n \t \t{\n\t\t\t\t\t\t\n \t \tItem.ThisItemAllTravelsNetViz += Travel.NetViz;//this IS where the actual adding to running total for this WOItem's Net Travels\n\t\t\t\t\t\tEachWO.ThisWOAllTravelsNetViz += Travel.NetViz;//this IS where the actual adding to the running total for this entire WO's Net Travels\n\t\t\t\t\t\tEachWO.ThisWOTotalNets += Travel.NetViz;//this IS where the actual adding to the running total for ALL NETS for THIS workorders in this report data\n\t\t\t\t\t\tEachWO.ThisWOTotalGrand += Travel.NetViz; //this IS where the actual adding to the running total for GrandTotal for THIS workorders in this report data\n\n\t\t\t\t\t\tEachWO.ThisWOTotalTaxAs += Travel.TaxAViz; //this IS where the actual adding of Travel's Tax A to the running total for ALL Tax A for THIS workorders in this report data\n\t\t\t\t\t\tEachWO.ThisWOTotalGrand += Travel.TaxAViz; //this IS where the actual adding of Travel's Tax A to the running total for GrandTotal for THIS workorders in this report data\n\t\t\t\t\t\t\n\t\t\t\t\t\tEachWO.ThisWOTotalTaxBs += Travel.TaxBViz; //this IS where the actual adding of Travel's Tax B to the running total for ALL Tax B for THIS workorders in this report data\n\t\t\t\t\t\tEachWO.ThisWOTotalGrand += Travel.TaxBViz; //this IS where the actual adding of Travel's Tax B to the running total for GrandTotal for THIS workorders in this report data\n \t \t\t}\t\t\t\t//NOTE if you customize this report template and do NOT need a key above, remove it to increase report performance\t\n\t\t\t}\n\n\t\t\t//note additional statements for misc expense to ONLY add to running totals if ChargeToCustomer is true\n\t\t\t\n\t\t\tItem.ThisItemAllExpsNetChargeAmount = 0; //declare a key on the Item to hold all of this item's misc nets and set it initially to 0 \n\t\t\t\n\t\t\t//below is to Iterate through each Exp record of the wo's Item\n\t\t\tfor (const Exp of Item.Expenses)\n\t\t\t{\n\t\t\t//if this expense has a ChargeAmount value AND the ChargeToCustomer is true then adds the ChargeAmount to running totals\n \tif (Exp.ChargeAmount != null && Exp.ChargeToCustomer == true) \n \t \t{\n\t\t\t\t\t\t\n \t \tItem.ThisItemAllExpsNetChargeAmount += Exp.ChargeAmount;//this IS where the actual adding to running total for this WOItem's Net Exps\n\t\t\t\t\t\tEachWO.ThisWOAllExpsNetChargeAmount += Exp.ChargeAmount;//this IS where the actual adding to the running total for this entire WO's Net ChargeAmounts\n\t\t\t\t\t\tEachWO.ThisWOTotalNets += Exp.ChargeAmount;//this IS where the actual adding to the running total for ALL NET ChargeAmountS for THIS workorders in this report data\n\t\t\t\t\t\tEachWO.ThisWOTotalGrand += Exp.ChargeAmount; //this IS where the actual adding to the running total for GrandTotal for THIS workorders in this report data\n \t \t\t}\t\t\t\t//NOTE if you customize this report template and do NOT need a key above, remove it to increase report performance\t\n\n\t\t\t//if this expense the ChargeToCustomer is true AND ChargeTaxCode has a value then adds the TaxAViz and TaxBViz to running totals\t\t\n\t\t\t\t\tif (Exp.ChargeToCustomer == true && Exp.ChargeTaxCodeId != null ) \n \t \t{\n\t\t\t\t\t\tEachWO.ThisWOTotalTaxAs += Exp.TaxAViz; //this IS where the actual adding of Exp's Tax A to the running total for ALL Tax A for THIS workorders in this report data\n\t\t\t\t\t\tEachWO.ThisWOTotalGrand += Exp.TaxAViz; //this IS where the actual adding of Exp's Tax A to the running total for GrandTotal for THIS workorders in this report data\n\t\t\t\t\t\t\n\t\t\t\t\t\tEachWO.ThisWOTotalTaxBs += Exp.TaxBViz; //this IS where the actual adding of Exp's Tax B to the running total for ALL Tax B for THIS workorders in this report data\n\t\t\t\t\t\tEachWO.ThisWOTotalGrand += Exp.TaxBViz; //this IS where the actual adding of Exp's Tax B to the running total for GrandTotal for THIS workorders in this report data\n \t \t\t}\t\t\t\t//NOTE if you customize this report template and do NOT need a key above, remove it to increase report performance\t\n\t\t\t\t\telse if (Exp.ChargeToCustomer == true && Exp.ChargeTaxCodeId == null ) //else if ChargeToCustomer is true AND ChargeTaxCodeID is null, then add TaxPaid to TaxA running total and Grand Total\t\t\n\t\t\t\t\t\t{\n\t\t\t\t\t\tEachWO.ThisWOTotalTaxAs += Exp.TaxPaid; //this IS where the actual adding of Exp's TaxPaid to the running total for ALL Tax A for THIS workorders in this report data\n\t\t\t\t\t\tEachWO.ThisWOTotalGrand += Exp.TaxPaid; //this IS where the actual adding of Exp's TaxPaid to the running total for GrandTotal for THIS workorders in this report data\n\t\t\t\t\t\t}\n\n\t\t\t}\n\n\t\t\t\n\t\t\tItem.ThisItemAllLoansNetViz = 0; //declare a key on the Item to hold all of this item's loans nets and set it initially to 0 \n\t\t\t\n\t\t\t//below is to Iterate through each Loan record of the wo's Item\n\t\t\tfor (const Loan of Item.Loans)\n\t\t\t{\n\t\t\t//make sure it has a value before attempting to add it to the running total\n \tif (Loan.NetViz != null) \n \t \t{\n \t \tItem.ThisItemAllLoansNetViz += Loan.NetViz;//this IS where the actual adding to running total for this WOItem's Net Loans\n\t\t\t\t\t\tEachWO.ThisWOAllLoansNetViz += Loan.NetViz;//this IS where the actual adding to the running total for this entire WO's Net Loans\n\t\t\t\t\t\tEachWO.ThisWOTotalNets += Loan.NetViz;//this IS where the actual adding to the running total for ALL NETS for THIS workorders in this report data\n\t\t\t\t\t\tEachWO.ThisWOTotalGrand += Loan.NetViz; //this IS where the actual adding to the running total for GrandTotal for THIS workorders in this report data\n\n\t\t\t\t\t\tEachWO.ThisWOTotalTaxAs += Loan.TaxAViz; //this IS where the actual adding of Loan's Tax A to the running total for ALL Tax A for THIS workorders in this report data\n\t\t\t\t\t\tEachWO.ThisWOTotalGrand += Loan.TaxAViz; //this IS where the actual adding of Loan's Tax A to the running total for GrandTotal for THIS workorders in this report data\n\t\t\t\t\t\t\n\t\t\t\t\t\tEachWO.ThisWOTotalTaxBs += Loan.TaxBViz; //this IS where the actual adding of Loan's Tax B to the running total for ALL Tax B for THIS workorders in this report data\n\t\t\t\t\t\tEachWO.ThisWOTotalGrand += Loan.TaxBViz; //this IS where the actual adding of Loan's Tax B to the running total for GrandTotal for THIS workorders in this report data\n \t \t\t}\t\t\t\t//NOTE if you customize this report template and do NOT need a key above, remove it to increase report performance\t\n\t\t\t}\n\n\t\t\tItem.ThisItemAllOutsidesNetViz = 0; //declare a key on the Item to hold all of this item's Outsie nets and set it initially to 0 \n\t\t\t\n\t\t\t//below is to Iterate through each Outside record of the wo's Item\n\t\t\tfor (const Outside of Item.OutsideServices)\n\t\t\t{\n\t\t\t//make sure it has a value before attempting to add it to the running total\n \tif (Outside.NetViz != null) \n \t \t{\n\t\t\t\t\t\t\n \t \tItem.ThisItemAllOutsidesNetViz += Outside.NetViz;//this IS where the actual adding to running total for this WOItem's Net Outside\n\t\t\t\t\t\tEachWO.ThisWOAllOutsidesNetViz += Outside.NetViz;//this IS where the actual adding to the running total for this entire WO's Net Outsides\n\t\t\t\t\t\tEachWO.ThisWOTotalNets += Outside.NetViz;//this IS where the actual adding to the running total for ALL NETS for THIS workorders in this report data\n\t\t\t\t\t\tEachWO.ThisWOTotalGrand += Outside.NetViz; //this IS where the actual adding to the running total for GrandTotal for THIS workorders in this report data\n\n\t\t\t\t\t\tEachWO.ThisWOTotalTaxAs += Outside.TaxAViz; //this IS where the actual adding of Outside's Tax A to the running total for ALL Tax A for THIS workorders in this report data\n\t\t\t\t\t\tEachWO.ThisWOTotalGrand += Outside.TaxAViz; //this IS where the actual adding of Outside's Tax A to the running total for GrandTotal for THIS workorders in this report data\n\t\t\t\t\t\t\n\t\t\t\t\t\tEachWO.ThisWOTotalTaxBs += Outside.TaxBViz; //this IS where the actual adding of Outside's Tax B to the running total for ALL Tax B for THIS workorders in this report data\n\t\t\t\t\t\tEachWO.ThisWOTotalGrand += Outside.TaxBViz; //this IS where the actual adding of Outside's Tax B to the running total for GrandTotal for THIS workorders in this report data\n \t \t\t}\t\t\t\t//NOTE if you customize this report template and do NOT need a key above, remove it to increase report performance\t\n\t\t\t}\n\t\t}\n\t}\n\t\n\n return reportData;\n}","JsHelpers":"Handlebars.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 EXAMPLE SHOW: June 9, 2021\n\n/////////////////////////////////////////////////////////////////\n//\n// CUSTOM DATE HELPER\n//\nHandlebars.registerHelper('myDate', function (value) {\n if (!value) {\n return \"\";\n }\n\n //parse the date\n let parsedDate = new Date(value);\n\n //is it a valid date?\n if (!(parsedDate instanceof Date && !Number.isNaN(parsedDate.getTime()))) {\n return \"not valid\";\n }\n \n //Use built in toLocaleDateString method to format the date\n //there are many options that change the displayed format documented here\n //https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Date/toLocaleDateString\n return parsedDate.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});\n\n","RenderType":0,"HeaderTemplate":" ","FooterTemplate":"          Printed date: \n   Page  of         ","DisplayHeaderFooter":false,"PaperFormat":10,"Landscape":false,"MarginOptionsBottom":"15mm","MarginOptionsLeft":"15mm","MarginOptionsRight":"10mm","MarginOptionsTop":"10mm","PageRanges":null,"PreferCSSPageSize":false,"PrintBackground":true,"Scale":1.00000} \ No newline at end of file diff --git a/server/AyaNova/resource/rpt/stock-report-templates/Service Dispatch.ayrt b/server/AyaNova/resource/rpt/stock-report-templates/Service Dispatch.ayrt index f4e30aaa..3bf9ad40 100644 --- a/server/AyaNova/resource/rpt/stock-report-templates/Service Dispatch.ayrt +++ b/server/AyaNova/resource/rpt/stock-report-templates/Service Dispatch.ayrt @@ -1 +1 @@ -{"Name":"Service Dispatch","Active":true,"Notes":"#if_eq custom Helper - if status is Completed show checkmark in checkbox; custom Prepare to replace carriage returns with spaces; display digital signatures if present","Roles":124927,"AType":34,"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\t\n\t\t\t\t\t\n\t\t\t\t\t\n\t\t\t\t\t\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\n\t\t\t\t\n\t\t\t\t\n\t\t\t\t\t\n\t\t\t\t\t{{#if CustomerContactName}}\n\t\t\t\t\t{{else}}{{/if}}\n\t\t\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\n\t\t\t\t\n\t\t\t\t\t\n\t\t\t\t\n\t\t\t\n\n\t\t\t\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\t\n\t\t\t\t\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\n\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\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\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\n\n\t\t\t\t{{#each Units}}\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{{/each}}\n\t\t\t\t\n\n\t\t\t\t\n\t\t\t\t\t\n\t\t\t\t\n\t\t\t\t{{#each ScheduledUsers}}\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\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\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\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\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\n\t\t\t\t\n\t\t\t\t\t\n\t\t\t\t\n\t\t\t\t{{/each}}\n\n\t\t\t\t{{#if Tasks}}\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{{/if}}\n\t\t\t\t{{#each Tasks}}\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_eq Status 2}}\n\t\t\t\t\t{{else}}{{/if_eq}}\n\t\t\t\t\t\n\t\t\t\t\n\t\t\t\t{{/each}}\n\t\t\t\t{{#if Tasks}}\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{{/if}}\n\n\t\t\t\t{{#if Parts}}\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\n\t\t\t\t{{/if}}\n\t\t\t\t{{#each Parts}}\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{{#if Serials}} \n\t\t\t\t\t{{else}} {{/if}}\n\t\t\t\t\t\n\t\t\t\t\n\t\t\t\t{{/each}}\n\t\t\t\t{{#if Parts}}\t\n\t\t\t\t\n\t\t\t\t\t\n\t\t\t\t\n\t\t\t\t{{/if}}\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\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\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{{/each}}\n\t\t\t\t\n\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\t\t\n\t\t\t\t\t{{#if TechSignature}} \n\t\t\t\t\t{{else}}{{/if}}\n\t\t\t\t\t\n\t\t\t\t\t\n\t\t\t\t\t{{#if CustomerSignature}} \n\t\t\t\t\t{{else}}{{/if}}\n\t\t\t\t\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\t\t\n\t\t\t\t\t{{#if TechSignatureCaptured}} \n\t\t\t\t\t{{else}}{{/if}}\n\t\t\t\t\t\n\t\t\t\t\t\n\t\t\t\t\t{{#if CustomerSignatureCaptured}} \n\t\t\t\t\t{{else}}{{/if}}\n\t\t\t\t\n\t\t\t\n\t\t
{{ayT 'Customer'}}{{CustomerViz}}{{../ayServerMetaData.CompanyName}}
{{ayT 'AddressTypePhysical'}}{{Address}}, {{City}}{{ayT 'WorkOrderServiceNumber'}}{{Serial}}
{{ayT 'WorkOrderCustomerContactName'}}{{CustomerContactName}} {{CustomerPhone1Viz}} {{CustomerEmailAddressViz}}{{CustomerPhone1Viz}} {{CustomerEmailAddressViz}}{{ayT 'WorkOrderServiceDate'}}{{ayDate ServiceDate}}
 
 
{{ayT 'WorkOrderSummary'}}{{Notes}}
{{ayT 'WorkOrderCloseByDate'}}{{ayDateTime CompleteByDate}}
{{ayT 'CustomerTechNotes'}}{{CustomerTechNotesViz}}
{{ayT 'WorkOrderItemPriorityID'}}{{WorkOrderItemPriorityNameViz}}{{ayT 'WorkOrderItemRequestDate'}}{{ayDateTime RequestDate}}{{ayT 'WorkOrderItemWorkOrderStatusID'}}{{WorkOrderItemStatusNameViz}}
{{ayT 'WorkOrderItemSummary'}} #{{Sequence}}{{Notes}}
{{ayT 'WorkOrderItemTechNotes'}}{{TechNotes}}
{{ayT 'Unit'}}{{UnitViz}} {{UnitModelNameViz}}
 
{{ayT 'NotifyEventScheduledOnWorkorder'}}{{UserViz}}As expected?Actual
 {{ayT 'WorkOrderItemScheduledUserStartDate'}}{{ayDateTime StartDate}}
 {{ayT 'WorkOrderItemScheduledUserStopDate'}}{{ayDateTime StopDate}}
 {{ayT 'WorkOrderItemScheduledUserServiceRateID'}}{{ServiceRateViz}}
 {{ayT 'WorkOrderItemScheduledUserEstimatedQuantity'}}{{EstimatedQuantity}}
 
{{ayT 'WorkOrderItemTaskWorkOrderItemTaskCompletionType'}}{{ayT 'WorkOrderItemTasks'}}
{{StatusViz}}{{Task}}
 
{{ayT 'WorkOrderItemPartQuantity'}}{{ayT 'WorkOrderItemPartPartWarehouseID'}}{{ayT 'Part'}}{{ayT 'WorkOrderItemPartUsed'}}
{{Quantity}}{{PartWarehouseViz}}{{PartNameViz}} {{PartDescriptionViz}}   {{ayT 'PurchaseOrderItemSerialNumbers'}}: {{Serials}} {{PartNameViz}} {{PartDescriptionViz}}
 
{{ayT 'WorkOrderItemLaborServiceDetails'}}
 
 
 
 
 
{{ayT 'TechSignature'}}
 {{ayT 'CustomerSignature'}}
 
Date {{ayDateTime TechSignatureCaptured}}
 Date {{ayDateTime CustomerSignatureCaptured}}
\n\t\t{{/each}}\n\t
\n\n","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} \n\n\ntable { \n table-layout: fixed; \n font-family: 'Helvetica Neue', 'Helvetica', Helvetica, Arial, sans-serif;\n border-collapse: collapse;\n white-space: pre-wrap;\n font-size: 8pt;\n width: 100%;\n }\n\n\nth {\n height: 30px;\n text-align: left;\n color: #9e9e9e;\n}\n\n\ntbody tr {\n height: 10px;\n word-wrap: break-word;\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.fontgreen {\n color: green;\n}\n.fontblue {\n color: blue;\n}\n.fontred {\n color:red;\n}\n\n\n.rightlean {\n text-align: right;\n}\n.leftlean {\n text-align: left;\n}\n.centerlean {\n text-align: center;\n}","JsPrerender":"async function ayPrepareData(reportData){ \n //this function (if present) is called with the report data \n //before the report is rendered\n //modify data as required here and return it to change the data before the report renders\n //see the help documentation for details\n\n await ayGetTranslations([ \"WorkOrderCloseByDate\", \"WorkOrderServiceDate\", \"WorkOrderServiceNumber\", \"Customer\", \"WorkOrderSummary\", \"Unit\", \"WorkOrderItemSummary\", \"WorkOrderItemPartQuantity\", \"AddressTypePhysical\", \"WorkOrderCustomerContactName\", \"CustomerTechNotes\", \"WorkOrderItemTechNotes\", \"Part\", \"WorkOrderItemPartUsed\", \"WorkOrderItemPartPartWarehouseID\", \"PurchaseOrderItemSerialNumbers\", \"WorkOrderItemLaborServiceDetails\", \"WorkOrderItemScheduledUser\", \"NotifyEventScheduledOnWorkorder\", \"WorkOrderItemScheduledUserEstimatedQuantity\", \"WorkOrderItemScheduledUserStartDate\", \"WorkOrderItemScheduledUserStopDate\", \"WorkOrderItemScheduledUserServiceRateID\", \"WorkOrderItemTasks\", \"WorkOrderItemTaskWorkOrderItemTaskCompletionType\", \"CustomerSignature\", \"TechSignature\", \"WorkOrderItemPriorityID\", \"WorkOrderItemWorkOrderStatusID\", \"WorkOrderItemRequestDate\" ]);\n\n //below checks if any parts have Serials to remove carriage returns so parts serials display on same line\n for (const EachWO of reportData.ayReportData) {\n for (const Item of EachWO.Items) {\n for (const Part of Item.Parts) {\n if (Part.Serials != null) {\n let s = Part.Serials; \n Part.Serials = s.replace(/[\\n\\r]+/g, ' ');\n }\n }\n }\n }\n\n return reportData; \n}","JsHelpers":"//custom helper so can do a direct comparison - i.e. if value equals xxxx, then show, else show yyyyy\n\nHandlebars.registerHelper('if_eq', function(a, b, opts) {\n if(a == b) // Or === depending on your needs\n return opts.fn(this);\n else\n return opts.inverse(this);\n});\n\n","RenderType":0,"HeaderTemplate":"  ","FooterTemplate":"                Printed date: PDFDate\nPage of                ","DisplayHeaderFooter":true,"PaperFormat":10,"Landscape":false,"MarginOptionsBottom":"15mm","MarginOptionsLeft":"20mm","MarginOptionsRight":"15mm","MarginOptionsTop":"10mm","PageRanges":null,"PreferCSSPageSize":false,"PrintBackground":true,"Scale":1.00000} \ No newline at end of file +{"Name":"Service Dispatch","Active":true,"Notes":"#if_eq custom Helper - if status is Completed show checkmark in checkbox; custom Prepare to replace carriage returns with spaces; display digital signatures if present","Roles":124927,"AType":34,"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\t\n\t\t\t\t\t\n\t\t\t\t\t\n\t\t\t\t\t\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\n\t\t\t\t\n\t\t\t\t\n\t\t\t\t\t\n\t\t\t\t\t{{#if CustomerContactName}}\n\t\t\t\t\t{{else}}{{/if}}\n\t\t\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\n\t\t\t\t\n\t\t\t\t\t\n\t\t\t\t\n\t\t\t\n\n\t\t\t\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\t\n\t\t\t\t\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\n\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\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\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\n\n\t\t\t\t{{#each Units}}\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{{/each}}\n\t\t\t\t\n\n\t\t\t\t\n\t\t\t\t\t\n\t\t\t\t\n\t\t\t\t{{#each ScheduledUsers}}\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\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\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\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\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\n\t\t\t\t\n\t\t\t\t\t\n\t\t\t\t\n\t\t\t\t{{/each}}\n\n\t\t\t\t{{#if Tasks}}\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{{/if}}\n\t\t\t\t{{#each Tasks}}\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_eq Status 2}}\n\t\t\t\t\t{{else}}{{/if_eq}}\n\t\t\t\t\t\n\t\t\t\t\n\t\t\t\t{{/each}}\n\t\t\t\t{{#if Tasks}}\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{{/if}}\n\n\t\t\t\t{{#if Parts}}\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\n\t\t\t\t{{/if}}\n\t\t\t\t{{#each Parts}}\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{{#if Serials}} \n\t\t\t\t\t{{else}} {{/if}}\n\t\t\t\t\t\n\t\t\t\t\n\t\t\t\t{{/each}}\n\t\t\t\t{{#if Parts}}\t\n\t\t\t\t\n\t\t\t\t\t\n\t\t\t\t\n\t\t\t\t{{/if}}\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\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\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{{/each}}\n\t\t\t\t\n\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\t\t\n\t\t\t\t\t{{#if TechSignature}} \n\t\t\t\t\t{{else}}{{/if}}\n\t\t\t\t\t\n\t\t\t\t\t\n\t\t\t\t\t{{#if CustomerSignature}} \n\t\t\t\t\t{{else}}{{/if}}\n\t\t\t\t\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\t\t\n\t\t\t\t\t{{#if TechSignatureCaptured}} \n\t\t\t\t\t{{else}}{{/if}}\n\t\t\t\t\t\n\t\t\t\t\t\n\t\t\t\t\t{{#if CustomerSignatureCaptured}} \n\t\t\t\t\t{{else}}{{/if}}\n\t\t\t\t\n\t\t\t\n\t\t
{{ayT 'Customer'}}{{CustomerViz}}{{../ayServerMetaData.CompanyName}}
{{ayT 'AddressTypePhysical'}}{{Address}}, {{City}}{{ayT 'WorkOrderSerialNumber'}}{{Serial}}
{{ayT 'WorkOrderCustomerContactName'}}{{CustomerContactName}} {{CustomerPhone1Viz}} {{CustomerEmailAddressViz}}{{CustomerPhone1Viz}} {{CustomerEmailAddressViz}}{{ayT 'WorkOrderServiceDate'}}{{ayDate ServiceDate}}
 
 
{{ayT 'WorkOrderSummary'}}{{Notes}}
{{ayT 'WorkOrderCloseByDate'}}{{ayDateTime CompleteByDate}}
{{ayT 'CustomerTechNotes'}}{{CustomerTechNotesViz}}
{{ayT 'WorkOrderItemPriorityID'}}{{WorkOrderItemPriorityNameViz}}{{ayT 'WorkOrderItemRequestDate'}}{{ayDateTime RequestDate}}{{ayT 'WorkOrderItemWorkOrderStatusID'}}{{WorkOrderItemStatusNameViz}}
{{ayT 'WorkOrderItemSummary'}} #{{Sequence}}{{Notes}}
{{ayT 'WorkOrderItemTechNotes'}}{{TechNotes}}
{{ayT 'Unit'}}{{UnitViz}} {{UnitModelNameViz}}
 
{{ayT 'NotifyEventScheduledOnWorkorder'}}{{UserViz}}As expected?Actual
 {{ayT 'WorkOrderItemScheduledUserStartDate'}}{{ayDateTime StartDate}}
 {{ayT 'WorkOrderItemScheduledUserStopDate'}}{{ayDateTime StopDate}}
 {{ayT 'WorkOrderItemScheduledUserServiceRateID'}}{{ServiceRateViz}}
 {{ayT 'WorkOrderItemScheduledUserEstimatedQuantity'}}{{EstimatedQuantity}}
 
{{ayT 'WorkOrderItemTaskWorkOrderItemTaskCompletionType'}}{{ayT 'WorkOrderItemTasks'}}
{{StatusViz}}{{Task}}
 
{{ayT 'WorkOrderItemPartQuantity'}}{{ayT 'WorkOrderItemPartPartWarehouseID'}}{{ayT 'Part'}}{{ayT 'WorkOrderItemPartUsed'}}
{{Quantity}}{{PartWarehouseViz}}{{PartNameViz}} {{PartDescriptionViz}}   {{ayT 'PurchaseOrderItemSerialNumbers'}}: {{Serials}} {{PartNameViz}} {{PartDescriptionViz}}
 
{{ayT 'WorkOrderItemLaborServiceDetails'}}
 
 
 
 
 
{{ayT 'TechSignature'}}
 {{ayT 'CustomerSignature'}}
 
Date {{ayDateTime TechSignatureCaptured}}
 Date {{ayDateTime CustomerSignatureCaptured}}
\n\t\t{{/each}}\n\t
\n\n","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} \n\n\ntable { \n table-layout: fixed; \n font-family: 'Helvetica Neue', 'Helvetica', Helvetica, Arial, sans-serif;\n border-collapse: collapse;\n white-space: pre-wrap;\n font-size: 8pt;\n width: 100%;\n }\n\n\nth {\n height: 30px;\n text-align: left;\n color: #9e9e9e;\n}\n\n\ntbody tr {\n height: 10px;\n word-wrap: break-word;\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.fontgreen {\n color: green;\n}\n.fontblue {\n color: blue;\n}\n.fontred {\n color:red;\n}\n\n\n.rightlean {\n text-align: right;\n}\n.leftlean {\n text-align: left;\n}\n.centerlean {\n text-align: center;\n}","JsPrerender":"async function ayPrepareData(reportData){ \n //this function (if present) is called with the report data \n //before the report is rendered\n //modify data as required here and return it to change the data before the report renders\n //see the help documentation for details\n\n await ayGetTranslations([ \"WorkOrderCloseByDate\", \"WorkOrderServiceDate\", \"WorkOrderSerialNumber\", \"Customer\", \"WorkOrderSummary\", \"Unit\", \"WorkOrderItemSummary\", \"WorkOrderItemPartQuantity\", \"AddressTypePhysical\", \"WorkOrderCustomerContactName\", \"CustomerTechNotes\", \"WorkOrderItemTechNotes\", \"Part\", \"WorkOrderItemPartUsed\", \"WorkOrderItemPartPartWarehouseID\", \"PurchaseOrderItemSerialNumbers\", \"WorkOrderItemLaborServiceDetails\", \"WorkOrderItemScheduledUser\", \"NotifyEventScheduledOnWorkorder\", \"WorkOrderItemScheduledUserEstimatedQuantity\", \"WorkOrderItemScheduledUserStartDate\", \"WorkOrderItemScheduledUserStopDate\", \"WorkOrderItemScheduledUserServiceRateID\", \"WorkOrderItemTasks\", \"WorkOrderItemTaskWorkOrderItemTaskCompletionType\", \"CustomerSignature\", \"TechSignature\", \"WorkOrderItemPriorityID\", \"WorkOrderItemWorkOrderStatusID\", \"WorkOrderItemRequestDate\" ]);\n\n //below checks if any parts have Serials to remove carriage returns so parts serials display on same line\n for (const EachWO of reportData.ayReportData) {\n for (const Item of EachWO.Items) {\n for (const Part of Item.Parts) {\n if (Part.Serials != null) {\n let s = Part.Serials; \n Part.Serials = s.replace(/[\\n\\r]+/g, ' ');\n }\n }\n }\n }\n\n return reportData; \n}","JsHelpers":"//custom helper so can do a direct comparison - i.e. if value equals xxxx, then show, else show yyyyy\n\nHandlebars.registerHelper('if_eq', function(a, b, opts) {\n if(a == b) // Or === depending on your needs\n return opts.fn(this);\n else\n return opts.inverse(this);\n});\n\n","RenderType":0,"HeaderTemplate":"  ","FooterTemplate":"                Printed date: PDFDate\nPage of                ","DisplayHeaderFooter":true,"PaperFormat":10,"Landscape":false,"MarginOptionsBottom":"15mm","MarginOptionsLeft":"20mm","MarginOptionsRight":"15mm","MarginOptionsTop":"10mm","PageRanges":null,"PreferCSSPageSize":false,"PrintBackground":true,"Scale":1.00000} \ No newline at end of file diff --git a/server/AyaNova/resource/rpt/stock-report-templates/z_barcode using built in ayBC.ayrt b/server/AyaNova/resource/rpt/stock-report-templates/z_barcode using built in ayBC.ayrt index 7cb9e9e0..988a3dfa 100644 --- a/server/AyaNova/resource/rpt/stock-report-templates/z_barcode using built in ayBC.ayrt +++ b/server/AyaNova/resource/rpt/stock-report-templates/z_barcode using built in ayBC.ayrt @@ -1 +1 @@ -{"Name":"z_barcode using built in ayBC","Active":true,"Notes":"Example of displaying barcodes \n","Roles":50538,"AType":34,"IncludeWoItemDescendants":false,"Template":"\n\n\n
\n\n

Example: Bar code helper

\n

See Report editor help documentation for additional details

\n\n {{#each ayReportData}}\n \n \n \n\n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n {{#each Items}}\n {{#each Units}}\n \n \n \n \n \n {{/each}}\n\n \n \n \n {{#each Parts}}\n \n \n \n \n \n {{/each}}\n\n \n {{/each}}\n
{{ayT \"WorkOrder\" }} {{ayT \"WorkOrderServiceNumber\" }} {{Serial}} as \"CODE-128\" BarCode with scale 1:{{ ayBC Serial '{ \"bcid\": \"code128\",\"includetext\":true, \"scale\":1}' }}
{{ayT \"WorkOrder\" }} {{ayT \"WorkOrderServiceNumber\" }} {{Serial}} as \"QR\" Code with scale 1:{{ ayBC Serial '{ \"bcid\": \"qrcode\",\"includetext\":true, \"scale\":1}' }}
{{ayT \"WorkOrder\" }} {{ayT \"WorkOrderServiceNumber\" }} {{Serial}} as \"QR\" Code with scale 3:{{ ayBC Serial '{ \"bcid\": \"qrcode\",\"includetext\":true, \"scale\":3}' }}
Sample \"UPC-A\" Code using a hard coded number 712345678904 as example:{{ ayBC \"712345678904\" '{ \"bcid\": \"upca\",\"includetext\":true, \"scale\":1}' }}
 
 {{ayT 'Unit'}} {{UnitViz}} displayed as as \"CODE-128\" BarCode with scale 1:{{ ayBC UnitViz '{ \"bcid\": \"code128\",\"includetext\":true, \"scale\":1}' }}
 
 {{ayT 'WorkOrderItemPartPartID'}}: {{PartNameViz}} displayed as \"CODE-128\" BarCode with scale 1:{{ ayBC PartNameViz '{ \"bcid\": \"code128\",\"includetext\":true, \"scale\":1}' }}
\n {{/each}}\n\n
\n\n\n\n","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} \n\ntable { \n table-layout: fixed; \n border-collapse: collapse;\n white-space: pre-wrap;\n font-size: 9pt;\n width: 100%;\n }\n\n\nth {\n height: 20px;\n color: #9e9e9e;\n}\n\ntbody tr {\n height: 10px;\n word-wrap: break-word;\n}\n\ntd {\n padding: 10px;\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.fontgreen {\n color: green;\n}\n.fontblue {\n color: blue;\n}\n.fontred {\n color:red;\n}\n\n\n.rightlean {\n text-align: right;\n}\n.leftlean {\n text-align: left;\n}\n.centerlean {\n text-align: center;\n}","JsPrerender":"async function ayPrepareData(reportData){ \n //this function (if present) is called with the report data \n //before the report is rendered\n //modify data as required here and return it to change the data before the report renders\n //see the help documentation for details\n\n\tawait ayGetTranslations([ \"WorkOrder\", \"WorkOrderServiceNumber\", \"Unit\", \"WorkOrderItemPartPartID\" ]);\n\n\n\n\t\n\n return reportData;\n}","JsHelpers":"","RenderType":0,"HeaderTemplate":" ","FooterTemplate":"          Printed date: \n   Page  of         ","DisplayHeaderFooter":true,"PaperFormat":10,"Landscape":false,"MarginOptionsBottom":"15mm","MarginOptionsLeft":"15mm","MarginOptionsRight":"10mm","MarginOptionsTop":"10mm","PageRanges":null,"PreferCSSPageSize":false,"PrintBackground":true,"Scale":1.00000} \ No newline at end of file +{"Name":"z_barcode using built in ayBC","Active":true,"Notes":"Example of displaying barcodes \n","Roles":50538,"AType":34,"IncludeWoItemDescendants":false,"Template":"\n\n\n
\n\n

Example: Bar code helper

\n

See Report editor help documentation for additional details

\n\n {{#each ayReportData}}\n \n \n \n\n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n {{#each Items}}\n {{#each Units}}\n \n \n \n \n \n {{/each}}\n\n \n \n \n {{#each Parts}}\n \n \n \n \n \n {{/each}}\n\n \n {{/each}}\n
{{ayT \"WorkOrder\" }} {{ayT \"WorkOrderSerialNumber\" }} {{Serial}} as \"CODE-128\" BarCode with scale 1:{{ ayBC Serial '{ \"bcid\": \"code128\",\"includetext\":true, \"scale\":1}' }}
{{ayT \"WorkOrder\" }} {{ayT \"WorkOrderSerialNumber\" }} {{Serial}} as \"QR\" Code with scale 1:{{ ayBC Serial '{ \"bcid\": \"qrcode\",\"includetext\":true, \"scale\":1}' }}
{{ayT \"WorkOrder\" }} {{ayT \"WorkOrderSerialNumber\" }} {{Serial}} as \"QR\" Code with scale 3:{{ ayBC Serial '{ \"bcid\": \"qrcode\",\"includetext\":true, \"scale\":3}' }}
Sample \"UPC-A\" Code using a hard coded number 712345678904 as example:{{ ayBC \"712345678904\" '{ \"bcid\": \"upca\",\"includetext\":true, \"scale\":1}' }}
 
 {{ayT 'Unit'}} {{UnitViz}} displayed as as \"CODE-128\" BarCode with scale 1:{{ ayBC UnitViz '{ \"bcid\": \"code128\",\"includetext\":true, \"scale\":1}' }}
 
 {{ayT 'WorkOrderItemPartPartID'}}: {{PartNameViz}} displayed as \"CODE-128\" BarCode with scale 1:{{ ayBC PartNameViz '{ \"bcid\": \"code128\",\"includetext\":true, \"scale\":1}' }}
\n {{/each}}\n\n
\n\n\n\n","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} \n\ntable { \n table-layout: fixed; \n border-collapse: collapse;\n white-space: pre-wrap;\n font-size: 9pt;\n width: 100%;\n }\n\n\nth {\n height: 20px;\n color: #9e9e9e;\n}\n\ntbody tr {\n height: 10px;\n word-wrap: break-word;\n}\n\ntd {\n padding: 10px;\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.fontgreen {\n color: green;\n}\n.fontblue {\n color: blue;\n}\n.fontred {\n color:red;\n}\n\n\n.rightlean {\n text-align: right;\n}\n.leftlean {\n text-align: left;\n}\n.centerlean {\n text-align: center;\n}","JsPrerender":"async function ayPrepareData(reportData){ \n //this function (if present) is called with the report data \n //before the report is rendered\n //modify data as required here and return it to change the data before the report renders\n //see the help documentation for details\n\n\tawait ayGetTranslations([ \"WorkOrder\", \"WorkOrderSerialNumber\", \"Unit\", \"WorkOrderItemPartPartID\" ]);\n\n\n\n\t\n\n return reportData;\n}","JsHelpers":"","RenderType":0,"HeaderTemplate":" ","FooterTemplate":"          Printed date: \n   Page  of         ","DisplayHeaderFooter":true,"PaperFormat":10,"Landscape":false,"MarginOptionsBottom":"15mm","MarginOptionsLeft":"15mm","MarginOptionsRight":"10mm","MarginOptionsTop":"10mm","PageRanges":null,"PreferCSSPageSize":false,"PrintBackground":true,"Scale":1.00000} \ No newline at end of file diff --git a/server/AyaNova/resource/rpt/stock-report-templates/z_custom fields.ayrt b/server/AyaNova/resource/rpt/stock-report-templates/z_custom fields.ayrt index 86185113..a12cc9fb 100644 --- a/server/AyaNova/resource/rpt/stock-report-templates/z_custom fields.ayrt +++ b/server/AyaNova/resource/rpt/stock-report-templates/z_custom fields.ayrt @@ -1 +1 @@ -{"Name":"z_custom fields","Active":true,"Notes":"example of using AyaNova provided Helpers to format custom fields - requires the object to have custom fields enabled\n","Roles":50538,"AType":34,"IncludeWoItemDescendants":false,"Template":"\n\n\n
\n

Example assumes have used Customize... to make visible the Custom fields for the {{ayT 'WorkOrder'}}, {{ayT 'WorkOrderItem'}} and {{ayT 'WorkOrderItemUnit'}}

\n\n\n {{#each ayReportData}}\n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n {{#each Items}}\n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n {{#each Units}}\n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n {{/each}}\n {{/each}} \n \n
{{ayT 'WorkOrder'}} {{ayT 'WorkOrderServiceNumber'}}{{ Serial }}
 
{{ayT 'WorkOrder'}} {{ayT 'WorkOrderCustom1'}} displayed with no additional formating{{ CustomFields.c1 }}
 
{{ayT 'WorkOrder'}} {{ayT 'WorkOrderCustom2'}} displayed with no additional formating{{ CustomFields.c2 }}
If {{ayT 'WorkOrderCustom2'}} has {{ayT 'UiFieldDataType'}} of DateTime, shows with additional formating via ayDateTime{{ ayDateTime CustomFields.c2 }}
 
{{ayT 'WorkOrder'}} {{ayT 'WorkOrderCustom3'}} displayed with no additional formating{{ CustomFields.c3 }}
If {{ayT 'WorkOrderCustom3'}} has {{ayT 'UiFieldDataType'}} of Money, shows with additional formating via ayCurrency{{ayCurrency CustomFields.c3 }}
 
 {{ayT 'WorkOrderItem'}} {{ayT 'WorkOrderItemSummary'}}{{Notes}}
 {{ayT 'WorkOrderItem'}} {{ayT 'WorkOrderItemCustom1'}} displayed with no additional formating{{CustomFields.c1}}
 
 {{ayT 'WorkOrderItem'}} {{ayT 'WorkOrderItemCustom2'}} displayed with no additional formating{{CustomFields.c2}}
 If {{ayT 'WorkOrderItemCustom2'}} has {{ayT 'UiFieldDataType'}} of DateTime, shows with additional formating via ayDateTime{{ayDateTime CustomFields.c2}}
 
 {{ayT 'WorkOrderItem'}} {{ayT 'WorkOrderItemCustom3'}} displayed with no additional formating{{CustomFields.c3}}
 If {{ayT 'WorkOrderItemCustom3'}} has {{ayT 'UiFieldDataType'}} of Money, shows with additional formating via ayCurrency{{ayCurrency CustomFields.c3}}
 
 {{ayT 'WorkOrderItemUnit'}}{{UnitViz}} - {{UnitModelNameViz}}
 {{ayT 'WorkOrderItemUnit'}} {{ayT 'WorkOrderItemUnitCustom1'}} displayed with no additional formating{{CustomFields.c1}}
 
 {{ayT 'WorkOrderItemUnit'}} {{ayT 'WorkOrderItemUnitCustom2'}} displayed with no additional formating{{CustomFields.c2}}
 If {{ayT 'WorkOrderItemCustom2'}} has {{ayT 'UiFieldDataType'}} of DateTime, shows with additional formating via ayDateTime{{ayDateTime CustomFields.c2}}
 
 {{ayT 'WorkOrderItemUnit'}} {{ayT 'WorkOrderItemUnitCustom3'}} displayed with no additional formating{{CustomFields.c3}}
 If {{ayT 'WorkOrderItemUnit'}} has {{ayT 'UiFieldDataType'}} of Money, shows with additional formating via ayCurrency{{ayCurrency CustomFields.c3}}
 
\n {{/each}}\n
\n\n\n\n","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} \n\ntable { \n table-layout: fixed; \n border-collapse: collapse;\n white-space: pre-wrap;\n font-size: 8pt;\n width: 100%;\n }\n\n\nth {\n height: 20px;\n color: #9e9e9e;\n}\n\ntbody tr {\n height: 5px;\n word-wrap: break-word;\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.fontgreen {\n color: green;\n}\n.fontblue {\n color: blue;\n}\n.fontred {\n color:red;\n}\n\n\n.rightlean {\n text-align: right;\n}\n.leftlean {\n text-align: left;\n}\n.centerlean {\n text-align: center;\n}","JsPrerender":"async function ayPrepareData(reportData){ \n //this function (if present) is called with the report data \n //before the report is rendered\n //modify data as required here and return it to change the data before the report renders\n //see the help documentation for details\n\n\tawait ayGetTranslations([ \"UiFieldDataType\", \"WorkOrder\", \"WorkOrderServiceNumber\", \"WorkOrderCustom1\", \"WorkOrderCustom2\",\"WorkOrderCustom3\", \"WorkOrderItemSummary\", \"WorkOrderItem\", \"WorkOrderItemCustom1\", \"WorkOrderItemCustom2\", \"WorkOrderItemCustom3\", \"WorkOrderItemUnit\", \"WorkOrderItemUnitCustom1\", \"WorkOrderItemUnitCustom2\", \"WorkOrderItemUnitCustom3\" ]);\n\n\n\n\n return reportData;\n}","JsHelpers":"\n","RenderType":0,"HeaderTemplate":" ","FooterTemplate":"          Printed date: \n   Page  of         ","DisplayHeaderFooter":true,"PaperFormat":10,"Landscape":false,"MarginOptionsBottom":"15mm","MarginOptionsLeft":"15mm","MarginOptionsRight":"10mm","MarginOptionsTop":"10mm","PageRanges":null,"PreferCSSPageSize":false,"PrintBackground":true,"Scale":1.00000} \ No newline at end of file +{"Name":"z_custom fields","Active":true,"Notes":"example of using AyaNova provided Helpers to format custom fields - requires the object to have custom fields enabled\n","Roles":50538,"AType":34,"IncludeWoItemDescendants":false,"Template":"\n\n\n
\n

Example assumes have used Customize... to make visible the Custom fields for the {{ayT 'WorkOrder'}}, {{ayT 'WorkOrderItem'}} and {{ayT 'WorkOrderItemUnit'}}

\n\n\n {{#each ayReportData}}\n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n {{#each Items}}\n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n {{#each Units}}\n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n {{/each}}\n {{/each}} \n \n
{{ayT 'WorkOrder'}} {{ayT 'WorkOrderSerialNumber'}}{{ Serial }}
 
{{ayT 'WorkOrder'}} {{ayT 'WorkOrderCustom1'}} displayed with no additional formating{{ CustomFields.c1 }}
 
{{ayT 'WorkOrder'}} {{ayT 'WorkOrderCustom2'}} displayed with no additional formating{{ CustomFields.c2 }}
If {{ayT 'WorkOrderCustom2'}} has {{ayT 'UiFieldDataType'}} of DateTime, shows with additional formating via ayDateTime{{ ayDateTime CustomFields.c2 }}
 
{{ayT 'WorkOrder'}} {{ayT 'WorkOrderCustom3'}} displayed with no additional formating{{ CustomFields.c3 }}
If {{ayT 'WorkOrderCustom3'}} has {{ayT 'UiFieldDataType'}} of Money, shows with additional formating via ayCurrency{{ayCurrency CustomFields.c3 }}
 
 {{ayT 'WorkOrderItem'}} {{ayT 'WorkOrderItemSummary'}}{{Notes}}
 {{ayT 'WorkOrderItem'}} {{ayT 'WorkOrderItemCustom1'}} displayed with no additional formating{{CustomFields.c1}}
 
 {{ayT 'WorkOrderItem'}} {{ayT 'WorkOrderItemCustom2'}} displayed with no additional formating{{CustomFields.c2}}
 If {{ayT 'WorkOrderItemCustom2'}} has {{ayT 'UiFieldDataType'}} of DateTime, shows with additional formating via ayDateTime{{ayDateTime CustomFields.c2}}
 
 {{ayT 'WorkOrderItem'}} {{ayT 'WorkOrderItemCustom3'}} displayed with no additional formating{{CustomFields.c3}}
 If {{ayT 'WorkOrderItemCustom3'}} has {{ayT 'UiFieldDataType'}} of Money, shows with additional formating via ayCurrency{{ayCurrency CustomFields.c3}}
 
 {{ayT 'WorkOrderItemUnit'}}{{UnitViz}} - {{UnitModelNameViz}}
 {{ayT 'WorkOrderItemUnit'}} {{ayT 'WorkOrderItemUnitCustom1'}} displayed with no additional formating{{CustomFields.c1}}
 
 {{ayT 'WorkOrderItemUnit'}} {{ayT 'WorkOrderItemUnitCustom2'}} displayed with no additional formating{{CustomFields.c2}}
 If {{ayT 'WorkOrderItemCustom2'}} has {{ayT 'UiFieldDataType'}} of DateTime, shows with additional formating via ayDateTime{{ayDateTime CustomFields.c2}}
 
 {{ayT 'WorkOrderItemUnit'}} {{ayT 'WorkOrderItemUnitCustom3'}} displayed with no additional formating{{CustomFields.c3}}
 If {{ayT 'WorkOrderItemUnit'}} has {{ayT 'UiFieldDataType'}} of Money, shows with additional formating via ayCurrency{{ayCurrency CustomFields.c3}}
 
\n {{/each}}\n
\n\n\n\n","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} \n\ntable { \n table-layout: fixed; \n border-collapse: collapse;\n white-space: pre-wrap;\n font-size: 8pt;\n width: 100%;\n }\n\n\nth {\n height: 20px;\n color: #9e9e9e;\n}\n\ntbody tr {\n height: 5px;\n word-wrap: break-word;\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.fontgreen {\n color: green;\n}\n.fontblue {\n color: blue;\n}\n.fontred {\n color:red;\n}\n\n\n.rightlean {\n text-align: right;\n}\n.leftlean {\n text-align: left;\n}\n.centerlean {\n text-align: center;\n}","JsPrerender":"async function ayPrepareData(reportData){ \n //this function (if present) is called with the report data \n //before the report is rendered\n //modify data as required here and return it to change the data before the report renders\n //see the help documentation for details\n\n\tawait ayGetTranslations([ \"UiFieldDataType\", \"WorkOrder\", \"WorkOrderSerialNumber\", \"WorkOrderCustom1\", \"WorkOrderCustom2\",\"WorkOrderCustom3\", \"WorkOrderItemSummary\", \"WorkOrderItem\", \"WorkOrderItemCustom1\", \"WorkOrderItemCustom2\", \"WorkOrderItemCustom3\", \"WorkOrderItemUnit\", \"WorkOrderItemUnitCustom1\", \"WorkOrderItemUnitCustom2\", \"WorkOrderItemUnitCustom3\" ]);\n\n\n\n\n return reportData;\n}","JsHelpers":"\n","RenderType":0,"HeaderTemplate":" ","FooterTemplate":"          Printed date: \n   Page  of         ","DisplayHeaderFooter":true,"PaperFormat":10,"Landscape":false,"MarginOptionsBottom":"15mm","MarginOptionsLeft":"15mm","MarginOptionsRight":"10mm","MarginOptionsTop":"10mm","PageRanges":null,"PreferCSSPageSize":false,"PrintBackground":true,"Scale":1.00000} \ No newline at end of file diff --git a/server/AyaNova/resource/rpt/stock-report-templates/z_footer forced to bottom of each page of multi-page work order.ayrt b/server/AyaNova/resource/rpt/stock-report-templates/z_footer forced to bottom of each page of multi-page work order.ayrt index 3fbc1070..31035c78 100644 --- a/server/AyaNova/resource/rpt/stock-report-templates/z_footer forced to bottom of each page of multi-page work order.ayrt +++ b/server/AyaNova/resource/rpt/stock-report-templates/z_footer forced to bottom of each page of multi-page work order.ayrt @@ -1 +1 @@ -{"Name":"z_footer forced to bottom of each page of multi-page work order","Active":true,"Notes":"NOTE: this is NOT compatible with printing multiple work orders at same time.\nExample of HTML and CSS code to force footer contents to bottom of the page regardless of body contents ","Roles":50538,"AType":34,"IncludeWoItemDescendants":false,"Template":"\n \n\n
\n {{#each ayReportData}}\n \n \n \n \n \n \n \n \n \n\n \n {{#if ../ayServerMetaData.HasSmallLogo}}\n \n \n \n \n \n \n\t\t\t\t\n\t\t\t\n {{else}} \n \n \n \n \n \n \n \n \n \n \n\t\t\t\t\n\t\t\t\n {{/if}} \n\n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n\t\t\t\t\n\t\t\t\n \n \n \n \n \n \n \n \n \n \n \n \n \n \n {{#each Items}}\n \n \n \n \n {{#each Units}}\n \n \n \n \n {{/each}}\n\n \n \n \n \n \n \n \n \n \n\n {{#each Expenses}}\n {{#if ChargeToCustomer}}\n \n \n \n \n \n \n \n \n \n \n {{#if ChargeTaxCodeId}}{{else}} {{/if}}\n {{#if ChargeTaxCodeId}}{{else}} {{/if}}\n \n \n {{else}} \n \n {{/if}}\n {{/each}}\n {{#each Loans}}\n \n \n \n \n \n \n {{#if TaxAViz}}{{else}}{{/if}}\n {{#if TaxBViz}}{{else}}{{/if}}\n \n \n {{/each}}\n {{#each Labors}}\n \n \n \n \n \n \n {{#if TaxAViz}}{{else}}{{/if}}\n {{#if TaxBViz}}{{else}}{{/if}}\n \n \n {{#if ServiceDetails}}\n \n \n \n \n \n {{else}}{{/if}}\n {{/each}}\n {{#each Parts}}\n \n \n \n \n \n \n {{#if TaxAViz}}{{else}}{{/if}}\n {{#if TaxBViz}}{{else}}{{/if}}\n \n \n {{#if Serials}}\n \n \n \n \n {{else}}{{/if}}\n {{/each}}\n {{#each Travels}}\n \n \n \n \n \n \n {{#if TaxAViz}}{{else}}{{/if}}\n {{#if TaxBViz}}{{else}}{{/if}}\n \n \n {{#if TravelDetails}}\n \n \n \n \n \n {{else}}{{/if}}\n {{/each}}\n {{#each OutsideServices}}\n \n \n \n \n {{#if TaxAViz}}{{else}}{{/if}}\n {{#if TaxBViz}}{{else}}{{/if}}\n \n \n {{/each}}\n \n \n \n {{/each}}\n \n \n \n \n \n \n\t\t\t\n\t\t\t\t\n\t\t\t\n \n\t\t\t\t\n\t\t\t\n \n\t\t\t\t\n\t\t\t\n \n\t\t\t\t\n\t\t\t\n \n\t\t\t\t\n\t\t\t\n \n\t\t\t\t\n\t\t\t\n \n\t\t\t\t\n\t\t\t\n \n\t\t\t\t\n\t\t\t\n \n\t\t\t\t\n\t\t\t\n\t\t\n
NOTE: THIS EXAMPLE IS ONLY FOR USE WHEN PRINTING A SINGLE WORK ORDER AT A TIME, AS THE TOTALS IN THE FOOTER WILL ONLY REFER TO THE \"LAST\" WORK ORDER IN THE PRINT JOB
Refer to the HTML and CSS within this report template for requirements
{{ ayLogo \"small\" }}{{ayT 'WorkOrderServiceNumber'}}{{Serial}}
 
{{../ayServerMetaData.CompanyName}}{{ayT 'WorkOrderServiceNumber'}}{{Serial}}
{{../ayServerMetaData.CompanyPostAddress}} {{../ayServerMetaData.CompanyPostCity}}
 
Service performed forPrinted Date{{todaysMonthDDYYYYDate}}
{{CustomerViz}}
 {{Address}}, {{City}} 
 {{CustomerPhone1Viz}} 
 
{{ayT 'WorkOrderServiceDate'}}{{ayT 'WorkOrderCustomerReferenceNumber'}}{{ayT 'WorkOrderInvoiceNumber'}}
{{myDate ServiceDate}}{{CustomerReferenceNumber}}{{InvoiceNumber}}
 
{{ayT 'WorkOrderItemSummary'}}{{Notes}}
{{ayT 'Unit'}}{{UnitViz}} - {{UnitModelNameViz}}
 {{ayT 'WorkOrderItemPartQuantity'}}{{ayT 'Price'}}{{ayT 'NetPrice'}}{{ayT 'TaxCodeTaxA'}}{{ayT 'TaxCodeTaxB'}}{{ayT 'LineTotal'}}
 {{ayT 'WorkOrderItemExpenseList'}}: {{Name}}{{ayCurrency ChargeAmount}}{{ayCurrency TaxAViz}}{{ayCurrency TaxPaid}}{{ayCurrency TaxBViz}} {{ayCurrency LineTotalViz}}
{{ayT 'WorkOrderItemExpenseList'}}: {{Name}} at no charge to customer
 {{ayT 'WorkOrderItemLoanList'}}: {{LoanUnitViz}} / {{UnitOfMeasureViz}}{{Quantity}}{{ayCurrency PriceViz}}{{ayCurrency NetViz}}{{ayCurrency TaxAViz}}$0.00{{ayCurrency TaxBViz}}{{ayCurrency 0.00}}{{ayCurrency LineTotalViz}}
 {{ayT 'WorkOrderItemLaborList'}} performed {{ayDateTime ServiceStartDate}} with {{ayT 'WorkOrderItemLaborServiceRateID'}} of {{ServiceRateViz}}{{ServiceRateQuantity}}{{ayCurrency PriceViz}}{{ayCurrency NetViz}}{{ayCurrency TaxAViz}}$0.00{{ayCurrency TaxBViz}}$0.00{{ayCurrency LineTotalViz}}
 {{ayT 'WorkOrderItemLaborServiceDetails'}}:{{ServiceDetails}}
 {{ayT 'WorkOrderItemPartPartID'}}: {{PartNameViz}} {{PartDescriptionViz}}{{Quantity}}{{ayCurrency PriceViz}}{{ayCurrency NetViz}}{{ayCurrency TaxAViz}}$0.00{{ayCurrency TaxBViz}}$0.00{{ayCurrency LineTotalViz}}
 {{ayT 'WorkOrderItemPartPartID'}} {{ayT 'PurchaseOrderItemSerialNumbers'}}: {{Serials}}
 {{ayT 'WorkOrderItemTravelList'}} performed {{ayDate TravelStartDate}} with {{ayT 'WorkOrderItemTravelServiceRateID'}} of {{TravelRateViz}}{{TravelRateQuantity}}{{ayCurrency PriceViz}}{{ayCurrency NetViz}}{{ayCurrency TaxAViz}}$0.00{{ayCurrency TaxBViz}}$0.00{{ayCurrency LineTotalViz}}
 {{ayT 'WorkOrderItemTravelDetails'}}:{{TravelDetails}}
 {{ayT 'WorkOrderItemOutsideService'}} performed on Unit: {{UnitViz}}{{ayCurrency NetViz}}{{ayCurrency TaxAViz}}$0.00{{ayCurrency TaxBViz}}$0.00{{ayCurrency LineTotalViz}}
 
 
 
 
 
 
 
 
 
 
 
\n\n \n \n\t\t\n \n \n \n \n \n \n \n \n \n \n {{#if ThisWOTotalTaxAs}}{{else}}{{/if}}\n {{#if ThisWOTotalTaxBs}}{{else}}{{/if}}\n \n \n\n \n \n \n \n \n \n \n \n \n \n\n \n \n \n \n \n \n \n {{#if CustomerSignature}}{{else}} {{/if}}\n {{#if CustomerSignature}}{{else}} {{/if}}\n\n {{#if CustomerSignatureCaptured}}{{else}} {{/if}}\n {{#if CustomerSignatureCaptured}}{{else}} {{/if}}\n\n {{#if CustomerSignatureName}}{{else}} {{/if}}\n {{#if CustomerSignatureName}}{{else}} {{/if}}\n \n\t\t\n\t\t
Total NetsTotal TaxATotal TaxBGrand Total
{{ayCurrency ThisWOTotalNets}}{{ayCurrency ThisWOTotalTaxAs}}$0.00{{ayCurrency ThisWOTotalTaxBs}}$0.00{{ayCurrency ThisWOTotalGrand}}
 
Thank you for your business!Terms: Net 30 days
 
I acknowledge the satisfactory provision and completion of the above for {{ayT 'WorkOrderServiceNumber'}} {{Serial}}
 
Digital {{ayT 'CustomerSignature'}}{{ayT 'CustomerSignature'}} ___________________Digital Signature DateSignature Date{{ayDateTime CustomerSignatureCaptured}}____________________Digital Print of NamePrint of Name{{CustomerSignatureName}}____________________
\n\n\n\n {{/each}}\n
\n\n\n\n","Style":"/* this css required along with the HTML code to have footer FORCED to the bottom of the page regardless of body content and number of pages for the work order */\n.footerdisplay { \n position: fixed; \n font-size: 8pt; \n bottom: 0px;\n width: 100%;\n border-top: 1px solid #9e9e9e;; \n}\n\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 table-layout: fixed; \n border-collapse: collapse;\n white-space: pre-wrap;\n font-size: 9pt;\n width: 100%;\n }\n\n\nth {\n height: 20px;\n color: #9e9e9e;\n}\n\ntbody tr {\n height: 10px;\n word-wrap: break-word;\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.fontgreen {\n color: green;\n}\n.fontblue {\n color: blue;\n}\n.fontred {\n color:red;\n}\n\n\n.rightlean {\n text-align: right;\n}\n.leftlean {\n text-align: left;\n}\n.centerlean {\n text-align: center;\n}","JsPrerender":"async function ayPrepareData(reportData){ \n //this function (if present) is called with the report data \n //before the report is rendered\n //modify data as required here and return it to change the data before the report renders\n //see the help documentation for details\n\n\tawait ayGetTranslations([\"WorkOrderInvoiceNumber\", \"WorkOrderServiceDate\", \"WorkOrderServiceNumber\", \"WorkOrderCustomerReferenceNumber\", \"Unit\", \"WorkOrderItemSummary\", \"WorkOrderItemPartQuantity\", \"Price\", \"NetPrice\", \"TaxCodeTaxA\", \"TaxCodeTaxB\", \"LineTotal\", \"WorkOrderItemExpenseList\", \"WorkOrderItemLoanList\", \"WorkOrderItemPartPartID\", \"PurchaseOrderItemSerialNumbers\", \"WorkOrderItemLaborList\", \"WorkOrderItemLaborServiceRateID\", \"WorkOrderItemLaborServiceDetails\", \"WorkOrderItemTravelList\", \"WorkOrderItemTravelDetails\", \"WorkOrderItemTravelServiceRateID\", \"WorkOrderItemOutsideService\", \"CustomerSignature\" ]);\n\n\t//below checks if any parts have Serials to remove carriage returns so parts serials display on same line\n for (const EachWO of reportData.ayReportData) {\n for (const Item of EachWO.Items) {\n for (const Part of Item.Parts) {\n if (Part.Serials != null) { \n Part.Serials = Part.Serials.replace(/[\\n\\r]+/g, ' ');\n }\n }\n }\n }\n\n\n//********************//NOTE if you customize this report template and do NOT need a function or key identified below, remove to increase report performance\n\n\nfor (const EachWO of reportData.ayReportData) \n\t{\n\t//below declares a key on the entire wo to hold all Labor Net Viz from all Items in this wo so it exists\n\tEachWO.ThisWOAllLaborsNetViz = 0;\n\t//below declares a key on the entire wo to hold all Part Net Viz from all Items in this wo so it exists\n\tEachWO.ThisWOAllPartsNetViz = 0;\n\t//below declares a key on the entire wo to hold all Travel Net Viz from all Items in this wo so it exists\n\tEachWO.ThisWOAllTravelsNetViz = 0;\n\t//below declares a key on the entire wo to hold all Exp Net ChargeAmount from all Items in this wo so it exists\n\tEachWO.ThisWOAllExpsNetChargeAmount = 0;\n\t//below declares a key on the entire wo to hold all Loan Net Viz from all Items in this wo so it exists\n\tEachWO.ThisWOAllLoansNetViz = 0;\n\t//below declares a key on the entire wo to hold all Outside Net Viz from all Items in this wo so it exists\n\tEachWO.ThisWOAllOutsidesNetViz = 0;\t\n\n\t//below declares a key on the entire wo to hold ALL of THIS workorder's Nets so it exists\n\tEachWO.ThisWOTotalNets = 0;\n\n\t//below declares a key on the entire wo to hold THIS workorder's Tax A (for all items) so it exists \n\tEachWO.ThisWOTotalTaxAs = 0;\n\t//below declares a key on the entire wo to hold THIS workorder's Tax B (for all items) so it exists\n\tEachWO.ThisWOTotalTaxBs = 0;\t\n\t//below declares a key on the entire wo to hold THIS workorder's Grand Total so it exists\n\tEachWO.ThisWOTotalGrand = 0;\n\n\t//below is to Iterate through each item of the wo's Items\n\tfor (const Item of EachWO.Items)\n\t\t{\n\t\t\tItem.ThisItemAllLaborsNetViz = 0; //declare a key on the Item to hold all of this item's labor nets and set it initially to 0 \n\t\t\t\n\t\t\t//below is to Iterate through each labor record of the wo's Item\n\t\t\tfor (const Labor of Item.Labors)\n\t\t\t{\n\t\t\t//make sure it has a value before attempting to add it to the running total\n \tif (Labor.NetViz != null) \n \t \t{\n \t \tItem.ThisItemAllLaborsNetViz += Labor.NetViz; //this IS where the actual adding to running total for this WOItem's Net Labors\n\t\t\t\t\t\tEachWO.ThisWOAllLaborsNetViz += Labor.NetViz; //this IS where the actual adding to the running total for this entire WO's Net Labors\n\t\t\t\t\t\tEachWO.ThisWOTotalNets += Labor.NetViz; //this IS where the actual adding to the running total for ALL NETS for THIS workorders in this report data\n\t\t\t\t\t\tEachWO.ThisWOTotalGrand += Labor.NetViz; //this IS where the actual adding to the running total for GrandTotal for THIS workorders in this report data\t\n\t\t\t\t\t\t\n\t\t\t\t\t\tEachWO.ThisWOTotalTaxAs += Labor.TaxAViz; //this IS where the actual adding of Labor's Tax A to the running total for ALL Tax A for THIS workorders in this report data\n\t\t\t\t\t\tEachWO.ThisWOTotalGrand += Labor.TaxAViz; //this IS where the actual adding of Labor's Tax A to the running total for GrandTotal for THIS workorders in this report data\n\t\t\t\t\t\t\n\t\t\t\t\t\tEachWO.ThisWOTotalTaxBs += Labor.TaxBViz; //this IS where the actual adding of Labor's Tax B to the running total for ALL Tax B for THIS workorders in this report data\n\t\t\t\t\t\tEachWO.ThisWOTotalGrand += Labor.TaxBViz; //this IS where the actual adding of Labor's Tax B to the running total for GrandTotal for THIS workorders in this report data\n \t \t\t}\t\t//NOTE if you customize this report template and do NOT need a key above, remove it to increase report performance\t\t\n\t\t\t}\n\n\t\t\tItem.ThisItemAllPartsNetViz = 0; //declare a key on the Item to hold all of this item's parts nets and set it initially to 0 \n\t\t\t\n\t\t\t//below is to Iterate through each Part record of the wo's Item\n\t\t\tfor (const Part of Item.Parts)\n\t\t\t{\n\t\t\t//make sure it has a value before attempting to add it to the running total\n \tif (Part.NetViz != null) \n \t \t{\n \t \tItem.ThisItemAllPartsNetViz += Part.NetViz; //this IS where the actual adding to running total for this WOItem's Net Parts\n\t\t\t\t\t\tEachWO.ThisWOAllPartsNetViz += Part.NetViz;//this IS where the actual adding to the running total for this entire WO's Net Parts\n\t\t\t\t\t\tEachWO.ThisWOTotalNets += Part.NetViz; //this IS where the actual adding to the running total for ALL NETS for THIS workorders in this report data\n\t\t\t\t\t\tEachWO.ThisWOTotalGrand += Part.NetViz; //this IS where the actual adding to the running total for GrandTotal for THIS workorders in this report data\t\t\t\t\t\t\n\n\t\t\t\t\t\tEachWO.ThisWOTotalTaxAs += Part.TaxAViz; //this IS where the actual adding of Part's Tax A to the running total for ALL Tax A for THIS workorders in this report data\n\t\t\t\t\t\tEachWO.ThisWOTotalGrand += Part.TaxAViz; //this IS where the actual adding of Part's Tax A to the running total for GrandTotal for THIS workorders in this report data\n\t\t\t\t\t\t\n\t\t\t\t\t\tEachWO.ThisWOTotalTaxBs += Part.TaxBViz; //this IS where the actual adding of Part's Tax B to the running total for ALL Tax B for THIS workorders in this report data\n\t\t\t\t\t\tEachWO.ThisWOTotalGrand += Part.TaxBViz; //this IS where the actual adding of Part's Tax B to the running total for GrandTotal for THIS workorders in this report data\n \t \t\t}\t\t\t\t//NOTE if you customize this report template and do NOT need a key above, remove it to increase report performance\t\n\t\t\t}\n\n\t\t\tItem.ThisItemAllTravelsNetViz = 0; //declare a key on the Item to hold all of this item's travel nets and set it initially to 0 \n\t\t\t\n\t\t\t//below is to Iterate through each Travel record of the wo's Item\n\t\t\tfor (const Travel of Item.Travels)\n\t\t\t{\n\t\t\t//make sure it has a value before attempting to add it to the running total\n \tif (Travel.NetViz != null) \n \t \t{\n\t\t\t\t\t\t\n \t \tItem.ThisItemAllTravelsNetViz += Travel.NetViz;//this IS where the actual adding to running total for this WOItem's Net Travels\n\t\t\t\t\t\tEachWO.ThisWOAllTravelsNetViz += Travel.NetViz;//this IS where the actual adding to the running total for this entire WO's Net Travels\n\t\t\t\t\t\tEachWO.ThisWOTotalNets += Travel.NetViz;//this IS where the actual adding to the running total for ALL NETS for THIS workorders in this report data\n\t\t\t\t\t\tEachWO.ThisWOTotalGrand += Travel.NetViz; //this IS where the actual adding to the running total for GrandTotal for THIS workorders in this report data\n\n\t\t\t\t\t\tEachWO.ThisWOTotalTaxAs += Travel.TaxAViz; //this IS where the actual adding of Travel's Tax A to the running total for ALL Tax A for THIS workorders in this report data\n\t\t\t\t\t\tEachWO.ThisWOTotalGrand += Travel.TaxAViz; //this IS where the actual adding of Travel's Tax A to the running total for GrandTotal for THIS workorders in this report data\n\t\t\t\t\t\t\n\t\t\t\t\t\tEachWO.ThisWOTotalTaxBs += Travel.TaxBViz; //this IS where the actual adding of Travel's Tax B to the running total for ALL Tax B for THIS workorders in this report data\n\t\t\t\t\t\tEachWO.ThisWOTotalGrand += Travel.TaxBViz; //this IS where the actual adding of Travel's Tax B to the running total for GrandTotal for THIS workorders in this report data\n \t \t\t}\t\t\t\t//NOTE if you customize this report template and do NOT need a key above, remove it to increase report performance\t\n\t\t\t}\n\n\t\t\t//note additional statements for misc expense to ONLY add to running totals if ChargeToCustomer is true\n\t\t\t\n\t\t\tItem.ThisItemAllExpsNetChargeAmount = 0; //declare a key on the Item to hold all of this item's misc nets and set it initially to 0 \n\t\t\t\n\t\t\t//below is to Iterate through each Exp record of the wo's Item\n\t\t\tfor (const Exp of Item.Expenses)\n\t\t\t{\n\t\t\t//if this expense has a ChargeAmount value AND the ChargeToCustomer is true then adds the ChargeAmount to running totals\n \tif (Exp.ChargeAmount != null && Exp.ChargeToCustomer == true) \n \t \t{\n\t\t\t\t\t\t\n \t \tItem.ThisItemAllExpsNetChargeAmount += Exp.ChargeAmount;//this IS where the actual adding to running total for this WOItem's Net Exps\n\t\t\t\t\t\tEachWO.ThisWOAllExpsNetChargeAmount += Exp.ChargeAmount;//this IS where the actual adding to the running total for this entire WO's Net ChargeAmounts\n\t\t\t\t\t\tEachWO.ThisWOTotalNets += Exp.ChargeAmount;//this IS where the actual adding to the running total for ALL NET ChargeAmountS for THIS workorders in this report data\n\t\t\t\t\t\tEachWO.ThisWOTotalGrand += Exp.ChargeAmount; //this IS where the actual adding to the running total for GrandTotal for THIS workorders in this report data\n \t \t\t}\t\t\t\t//NOTE if you customize this report template and do NOT need a key above, remove it to increase report performance\t\n\n\t\t\t//if this expense the ChargeToCustomer is true AND ChargeTaxCode has a value then adds the TaxAViz and TaxBViz to running totals\t\t\n\t\t\t\t\tif (Exp.ChargeToCustomer == true && Exp.ChargeTaxCodeId != null ) \n \t \t{\n\t\t\t\t\t\tEachWO.ThisWOTotalTaxAs += Exp.TaxAViz; //this IS where the actual adding of Exp's Tax A to the running total for ALL Tax A for THIS workorders in this report data\n\t\t\t\t\t\tEachWO.ThisWOTotalGrand += Exp.TaxAViz; //this IS where the actual adding of Exp's Tax A to the running total for GrandTotal for THIS workorders in this report data\n\t\t\t\t\t\t\n\t\t\t\t\t\tEachWO.ThisWOTotalTaxBs += Exp.TaxBViz; //this IS where the actual adding of Exp's Tax B to the running total for ALL Tax B for THIS workorders in this report data\n\t\t\t\t\t\tEachWO.ThisWOTotalGrand += Exp.TaxBViz; //this IS where the actual adding of Exp's Tax B to the running total for GrandTotal for THIS workorders in this report data\n \t \t\t}\t\t\t\t//NOTE if you customize this report template and do NOT need a key above, remove it to increase report performance\t\n\t\t\t\t\telse if (Exp.ChargeToCustomer == true && Exp.ChargeTaxCodeId == null ) //else if ChargeToCustomer is true AND ChargeTaxCodeID is null, then add TaxPaid to TaxA running total and Grand Total\t\t\n\t\t\t\t\t\t{\n\t\t\t\t\t\tEachWO.ThisWOTotalTaxAs += Exp.TaxPaid; //this IS where the actual adding of Exp's TaxPaid to the running total for ALL Tax A for THIS workorders in this report data\n\t\t\t\t\t\tEachWO.ThisWOTotalGrand += Exp.TaxPaid; //this IS where the actual adding of Exp's TaxPaid to the running total for GrandTotal for THIS workorders in this report data\n\t\t\t\t\t\t}\n\n\t\t\t}\n\n\t\t\t\n\t\t\tItem.ThisItemAllLoansNetViz = 0; //declare a key on the Item to hold all of this item's loans nets and set it initially to 0 \n\t\t\t\n\t\t\t//below is to Iterate through each Loan record of the wo's Item\n\t\t\tfor (const Loan of Item.Loans)\n\t\t\t{\n\t\t\t//make sure it has a value before attempting to add it to the running total\n \tif (Loan.NetViz != null) \n \t \t{\n \t \tItem.ThisItemAllLoansNetViz += Loan.NetViz;//this IS where the actual adding to running total for this WOItem's Net Loans\n\t\t\t\t\t\tEachWO.ThisWOAllLoansNetViz += Loan.NetViz;//this IS where the actual adding to the running total for this entire WO's Net Loans\n\t\t\t\t\t\tEachWO.ThisWOTotalNets += Loan.NetViz;//this IS where the actual adding to the running total for ALL NETS for THIS workorders in this report data\n\t\t\t\t\t\tEachWO.ThisWOTotalGrand += Loan.NetViz; //this IS where the actual adding to the running total for GrandTotal for THIS workorders in this report data\n\n\t\t\t\t\t\tEachWO.ThisWOTotalTaxAs += Loan.TaxAViz; //this IS where the actual adding of Loan's Tax A to the running total for ALL Tax A for THIS workorders in this report data\n\t\t\t\t\t\tEachWO.ThisWOTotalGrand += Loan.TaxAViz; //this IS where the actual adding of Loan's Tax A to the running total for GrandTotal for THIS workorders in this report data\n\t\t\t\t\t\t\n\t\t\t\t\t\tEachWO.ThisWOTotalTaxBs += Loan.TaxBViz; //this IS where the actual adding of Loan's Tax B to the running total for ALL Tax B for THIS workorders in this report data\n\t\t\t\t\t\tEachWO.ThisWOTotalGrand += Loan.TaxBViz; //this IS where the actual adding of Loan's Tax B to the running total for GrandTotal for THIS workorders in this report data\n \t \t\t}\t\t\t\t//NOTE if you customize this report template and do NOT need a key above, remove it to increase report performance\t\n\t\t\t}\n\n\t\t\tItem.ThisItemAllOutsidesNetViz = 0; //declare a key on the Item to hold all of this item's Outsie nets and set it initially to 0 \n\t\t\t\n\t\t\t//below is to Iterate through each Outside record of the wo's Item\n\t\t\tfor (const Outside of Item.OutsideServices)\n\t\t\t{\n\t\t\t//make sure it has a value before attempting to add it to the running total\n \tif (Outside.NetViz != null) \n \t \t{\n\t\t\t\t\t\t\n \t \tItem.ThisItemAllOutsidesNetViz += Outside.NetViz;//this IS where the actual adding to running total for this WOItem's Net Outside\n\t\t\t\t\t\tEachWO.ThisWOAllOutsidesNetViz += Outside.NetViz;//this IS where the actual adding to the running total for this entire WO's Net Outsides\n\t\t\t\t\t\tEachWO.ThisWOTotalNets += Outside.NetViz;//this IS where the actual adding to the running total for ALL NETS for THIS workorders in this report data\n\t\t\t\t\t\tEachWO.ThisWOTotalGrand += Outside.NetViz; //this IS where the actual adding to the running total for GrandTotal for THIS workorders in this report data\n\n\t\t\t\t\t\tEachWO.ThisWOTotalTaxAs += Outside.TaxAViz; //this IS where the actual adding of Outside's Tax A to the running total for ALL Tax A for THIS workorders in this report data\n\t\t\t\t\t\tEachWO.ThisWOTotalGrand += Outside.TaxAViz; //this IS where the actual adding of Outside's Tax A to the running total for GrandTotal for THIS workorders in this report data\n\t\t\t\t\t\t\n\t\t\t\t\t\tEachWO.ThisWOTotalTaxBs += Outside.TaxBViz; //this IS where the actual adding of Outside's Tax B to the running total for ALL Tax B for THIS workorders in this report data\n\t\t\t\t\t\tEachWO.ThisWOTotalGrand += Outside.TaxBViz; //this IS where the actual adding of Outside's Tax B to the running total for GrandTotal for THIS workorders in this report data\n \t \t\t}\t\t\t\t//NOTE if you customize this report template and do NOT need a key above, remove it to increase report performance\t\n\t\t\t}\n\t\t}\n\t}\n\t\n\n return reportData;\n}","JsHelpers":"Handlebars.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 EXAMPLE SHOW: June 9, 2021\n\n/////////////////////////////////////////////////////////////////\n//\n// CUSTOM DATE HELPER\n//\nHandlebars.registerHelper('myDate', function (value) {\n if (!value) {\n return \"\";\n }\n\n //parse the date\n let parsedDate = new Date(value);\n\n //Use built in toLocaleDateString method to format the date\n //there are many options that change the displayed format documented here\n //https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Date/toLocaleDateString\n return parsedDate.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});\n\n","RenderType":0,"HeaderTemplate":" ","FooterTemplate":"          Printed date: \n   Page  of         ","DisplayHeaderFooter":false,"PaperFormat":10,"Landscape":false,"MarginOptionsBottom":"15mm","MarginOptionsLeft":"15mm","MarginOptionsRight":"10mm","MarginOptionsTop":"10mm","PageRanges":null,"PreferCSSPageSize":false,"PrintBackground":true,"Scale":1.00000} \ No newline at end of file +{"Name":"z_footer forced to bottom of each page of multi-page work order","Active":true,"Notes":"NOTE: this is NOT compatible with printing multiple work orders at same time.\nExample of HTML and CSS code to force footer contents to bottom of the page regardless of body contents ","Roles":50538,"AType":34,"IncludeWoItemDescendants":false,"Template":"\n \n\n
\n {{#each ayReportData}}\n \n \n \n \n \n \n \n \n \n\n \n {{#if ../ayServerMetaData.HasSmallLogo}}\n \n \n \n \n \n \n\t\t\t\t\n\t\t\t\n {{else}} \n \n \n \n \n \n \n \n \n \n \n\t\t\t\t\n\t\t\t\n {{/if}} \n\n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n\t\t\t\t\n\t\t\t\n \n \n \n \n \n \n \n \n \n \n \n \n \n \n {{#each Items}}\n \n \n \n \n {{#each Units}}\n \n \n \n \n {{/each}}\n\n \n \n \n \n \n \n \n \n \n\n {{#each Expenses}}\n {{#if ChargeToCustomer}}\n \n \n \n \n \n \n \n \n \n \n {{#if ChargeTaxCodeId}}{{else}} {{/if}}\n {{#if ChargeTaxCodeId}}{{else}} {{/if}}\n \n \n {{else}} \n \n {{/if}}\n {{/each}}\n {{#each Loans}}\n \n \n \n \n \n \n {{#if TaxAViz}}{{else}}{{/if}}\n {{#if TaxBViz}}{{else}}{{/if}}\n \n \n {{/each}}\n {{#each Labors}}\n \n \n \n \n \n \n {{#if TaxAViz}}{{else}}{{/if}}\n {{#if TaxBViz}}{{else}}{{/if}}\n \n \n {{#if ServiceDetails}}\n \n \n \n \n \n {{else}}{{/if}}\n {{/each}}\n {{#each Parts}}\n \n \n \n \n \n \n {{#if TaxAViz}}{{else}}{{/if}}\n {{#if TaxBViz}}{{else}}{{/if}}\n \n \n {{#if Serials}}\n \n \n \n \n {{else}}{{/if}}\n {{/each}}\n {{#each Travels}}\n \n \n \n \n \n \n {{#if TaxAViz}}{{else}}{{/if}}\n {{#if TaxBViz}}{{else}}{{/if}}\n \n \n {{#if TravelDetails}}\n \n \n \n \n \n {{else}}{{/if}}\n {{/each}}\n {{#each OutsideServices}}\n \n \n \n \n {{#if TaxAViz}}{{else}}{{/if}}\n {{#if TaxBViz}}{{else}}{{/if}}\n \n \n {{/each}}\n \n \n \n {{/each}}\n \n \n \n \n \n \n\t\t\t\n\t\t\t\t\n\t\t\t\n \n\t\t\t\t\n\t\t\t\n \n\t\t\t\t\n\t\t\t\n \n\t\t\t\t\n\t\t\t\n \n\t\t\t\t\n\t\t\t\n \n\t\t\t\t\n\t\t\t\n \n\t\t\t\t\n\t\t\t\n \n\t\t\t\t\n\t\t\t\n \n\t\t\t\t\n\t\t\t\n\t\t\n
NOTE: THIS EXAMPLE IS ONLY FOR USE WHEN PRINTING A SINGLE WORK ORDER AT A TIME, AS THE TOTALS IN THE FOOTER WILL ONLY REFER TO THE \"LAST\" WORK ORDER IN THE PRINT JOB
Refer to the HTML and CSS within this report template for requirements
{{ ayLogo \"small\" }}{{ayT 'WorkOrderSerialNumber'}}{{Serial}}
 
{{../ayServerMetaData.CompanyName}}{{ayT 'WorkOrderSerialNumber'}}{{Serial}}
{{../ayServerMetaData.CompanyPostAddress}} {{../ayServerMetaData.CompanyPostCity}}
 
Service performed forPrinted Date{{todaysMonthDDYYYYDate}}
{{CustomerViz}}
 {{Address}}, {{City}} 
 {{CustomerPhone1Viz}} 
 
{{ayT 'WorkOrderServiceDate'}}{{ayT 'WorkOrderCustomerReferenceNumber'}}{{ayT 'WorkOrderInvoiceNumber'}}
{{myDate ServiceDate}}{{CustomerReferenceNumber}}{{InvoiceNumber}}
 
{{ayT 'WorkOrderItemSummary'}}{{Notes}}
{{ayT 'Unit'}}{{UnitViz}} - {{UnitModelNameViz}}
 {{ayT 'WorkOrderItemPartQuantity'}}{{ayT 'Price'}}{{ayT 'NetPrice'}}{{ayT 'TaxCodeTaxA'}}{{ayT 'TaxCodeTaxB'}}{{ayT 'LineTotal'}}
 {{ayT 'WorkOrderItemExpenseList'}}: {{Name}}{{ayCurrency ChargeAmount}}{{ayCurrency TaxAViz}}{{ayCurrency TaxPaid}}{{ayCurrency TaxBViz}} {{ayCurrency LineTotalViz}}
{{ayT 'WorkOrderItemExpenseList'}}: {{Name}} at no charge to customer
 {{ayT 'WorkOrderItemLoanList'}}: {{LoanUnitViz}} / {{UnitOfMeasureViz}}{{Quantity}}{{ayCurrency PriceViz}}{{ayCurrency NetViz}}{{ayCurrency TaxAViz}}$0.00{{ayCurrency TaxBViz}}{{ayCurrency 0.00}}{{ayCurrency LineTotalViz}}
 {{ayT 'WorkOrderItemLaborList'}} performed {{ayDateTime ServiceStartDate}} with {{ayT 'WorkOrderItemLaborServiceRateID'}} of {{ServiceRateViz}}{{ServiceRateQuantity}}{{ayCurrency PriceViz}}{{ayCurrency NetViz}}{{ayCurrency TaxAViz}}$0.00{{ayCurrency TaxBViz}}$0.00{{ayCurrency LineTotalViz}}
 {{ayT 'WorkOrderItemLaborServiceDetails'}}:{{ServiceDetails}}
 {{ayT 'WorkOrderItemPartPartID'}}: {{PartNameViz}} {{PartDescriptionViz}}{{Quantity}}{{ayCurrency PriceViz}}{{ayCurrency NetViz}}{{ayCurrency TaxAViz}}$0.00{{ayCurrency TaxBViz}}$0.00{{ayCurrency LineTotalViz}}
 {{ayT 'WorkOrderItemPartPartID'}} {{ayT 'PurchaseOrderItemSerialNumbers'}}: {{Serials}}
 {{ayT 'WorkOrderItemTravelList'}} performed {{ayDate TravelStartDate}} with {{ayT 'WorkOrderItemTravelServiceRateID'}} of {{TravelRateViz}}{{TravelRateQuantity}}{{ayCurrency PriceViz}}{{ayCurrency NetViz}}{{ayCurrency TaxAViz}}$0.00{{ayCurrency TaxBViz}}$0.00{{ayCurrency LineTotalViz}}
 {{ayT 'WorkOrderItemTravelDetails'}}:{{TravelDetails}}
 {{ayT 'WorkOrderItemOutsideService'}} performed on Unit: {{UnitViz}}{{ayCurrency NetViz}}{{ayCurrency TaxAViz}}$0.00{{ayCurrency TaxBViz}}$0.00{{ayCurrency LineTotalViz}}
 
 
 
 
 
 
 
 
 
 
 
\n\n \n \n\t\t\n \n \n \n \n \n \n \n \n \n \n {{#if ThisWOTotalTaxAs}}{{else}}{{/if}}\n {{#if ThisWOTotalTaxBs}}{{else}}{{/if}}\n \n \n\n \n \n \n \n \n \n \n \n \n \n\n \n \n \n \n \n \n \n {{#if CustomerSignature}}{{else}} {{/if}}\n {{#if CustomerSignature}}{{else}} {{/if}}\n\n {{#if CustomerSignatureCaptured}}{{else}} {{/if}}\n {{#if CustomerSignatureCaptured}}{{else}} {{/if}}\n\n {{#if CustomerSignatureName}}{{else}} {{/if}}\n {{#if CustomerSignatureName}}{{else}} {{/if}}\n \n\t\t\n\t\t
Total NetsTotal TaxATotal TaxBGrand Total
{{ayCurrency ThisWOTotalNets}}{{ayCurrency ThisWOTotalTaxAs}}$0.00{{ayCurrency ThisWOTotalTaxBs}}$0.00{{ayCurrency ThisWOTotalGrand}}
 
Thank you for your business!Terms: Net 30 days
 
I acknowledge the satisfactory provision and completion of the above for {{ayT 'WorkOrderSerialNumber'}} {{Serial}}
 
Digital {{ayT 'CustomerSignature'}}{{ayT 'CustomerSignature'}} ___________________Digital Signature DateSignature Date{{ayDateTime CustomerSignatureCaptured}}____________________Digital Print of NamePrint of Name{{CustomerSignatureName}}____________________
\n\n\n\n {{/each}}\n
\n\n\n\n","Style":"/* this css required along with the HTML code to have footer FORCED to the bottom of the page regardless of body content and number of pages for the work order */\n.footerdisplay { \n position: fixed; \n font-size: 8pt; \n bottom: 0px;\n width: 100%;\n border-top: 1px solid #9e9e9e;; \n}\n\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 table-layout: fixed; \n border-collapse: collapse;\n white-space: pre-wrap;\n font-size: 9pt;\n width: 100%;\n }\n\n\nth {\n height: 20px;\n color: #9e9e9e;\n}\n\ntbody tr {\n height: 10px;\n word-wrap: break-word;\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.fontgreen {\n color: green;\n}\n.fontblue {\n color: blue;\n}\n.fontred {\n color:red;\n}\n\n\n.rightlean {\n text-align: right;\n}\n.leftlean {\n text-align: left;\n}\n.centerlean {\n text-align: center;\n}","JsPrerender":"async function ayPrepareData(reportData){ \n //this function (if present) is called with the report data \n //before the report is rendered\n //modify data as required here and return it to change the data before the report renders\n //see the help documentation for details\n\n\tawait ayGetTranslations([\"WorkOrderInvoiceNumber\", \"WorkOrderServiceDate\", \"WorkOrderSerialNumber\", \"WorkOrderCustomerReferenceNumber\", \"Unit\", \"WorkOrderItemSummary\", \"WorkOrderItemPartQuantity\", \"Price\", \"NetPrice\", \"TaxCodeTaxA\", \"TaxCodeTaxB\", \"LineTotal\", \"WorkOrderItemExpenseList\", \"WorkOrderItemLoanList\", \"WorkOrderItemPartPartID\", \"PurchaseOrderItemSerialNumbers\", \"WorkOrderItemLaborList\", \"WorkOrderItemLaborServiceRateID\", \"WorkOrderItemLaborServiceDetails\", \"WorkOrderItemTravelList\", \"WorkOrderItemTravelDetails\", \"WorkOrderItemTravelServiceRateID\", \"WorkOrderItemOutsideService\", \"CustomerSignature\" ]);\n\n\t//below checks if any parts have Serials to remove carriage returns so parts serials display on same line\n for (const EachWO of reportData.ayReportData) {\n for (const Item of EachWO.Items) {\n for (const Part of Item.Parts) {\n if (Part.Serials != null) { \n Part.Serials = Part.Serials.replace(/[\\n\\r]+/g, ' ');\n }\n }\n }\n }\n\n\n//********************//NOTE if you customize this report template and do NOT need a function or key identified below, remove to increase report performance\n\n\nfor (const EachWO of reportData.ayReportData) \n\t{\n\t//below declares a key on the entire wo to hold all Labor Net Viz from all Items in this wo so it exists\n\tEachWO.ThisWOAllLaborsNetViz = 0;\n\t//below declares a key on the entire wo to hold all Part Net Viz from all Items in this wo so it exists\n\tEachWO.ThisWOAllPartsNetViz = 0;\n\t//below declares a key on the entire wo to hold all Travel Net Viz from all Items in this wo so it exists\n\tEachWO.ThisWOAllTravelsNetViz = 0;\n\t//below declares a key on the entire wo to hold all Exp Net ChargeAmount from all Items in this wo so it exists\n\tEachWO.ThisWOAllExpsNetChargeAmount = 0;\n\t//below declares a key on the entire wo to hold all Loan Net Viz from all Items in this wo so it exists\n\tEachWO.ThisWOAllLoansNetViz = 0;\n\t//below declares a key on the entire wo to hold all Outside Net Viz from all Items in this wo so it exists\n\tEachWO.ThisWOAllOutsidesNetViz = 0;\t\n\n\t//below declares a key on the entire wo to hold ALL of THIS workorder's Nets so it exists\n\tEachWO.ThisWOTotalNets = 0;\n\n\t//below declares a key on the entire wo to hold THIS workorder's Tax A (for all items) so it exists \n\tEachWO.ThisWOTotalTaxAs = 0;\n\t//below declares a key on the entire wo to hold THIS workorder's Tax B (for all items) so it exists\n\tEachWO.ThisWOTotalTaxBs = 0;\t\n\t//below declares a key on the entire wo to hold THIS workorder's Grand Total so it exists\n\tEachWO.ThisWOTotalGrand = 0;\n\n\t//below is to Iterate through each item of the wo's Items\n\tfor (const Item of EachWO.Items)\n\t\t{\n\t\t\tItem.ThisItemAllLaborsNetViz = 0; //declare a key on the Item to hold all of this item's labor nets and set it initially to 0 \n\t\t\t\n\t\t\t//below is to Iterate through each labor record of the wo's Item\n\t\t\tfor (const Labor of Item.Labors)\n\t\t\t{\n\t\t\t//make sure it has a value before attempting to add it to the running total\n \tif (Labor.NetViz != null) \n \t \t{\n \t \tItem.ThisItemAllLaborsNetViz += Labor.NetViz; //this IS where the actual adding to running total for this WOItem's Net Labors\n\t\t\t\t\t\tEachWO.ThisWOAllLaborsNetViz += Labor.NetViz; //this IS where the actual adding to the running total for this entire WO's Net Labors\n\t\t\t\t\t\tEachWO.ThisWOTotalNets += Labor.NetViz; //this IS where the actual adding to the running total for ALL NETS for THIS workorders in this report data\n\t\t\t\t\t\tEachWO.ThisWOTotalGrand += Labor.NetViz; //this IS where the actual adding to the running total for GrandTotal for THIS workorders in this report data\t\n\t\t\t\t\t\t\n\t\t\t\t\t\tEachWO.ThisWOTotalTaxAs += Labor.TaxAViz; //this IS where the actual adding of Labor's Tax A to the running total for ALL Tax A for THIS workorders in this report data\n\t\t\t\t\t\tEachWO.ThisWOTotalGrand += Labor.TaxAViz; //this IS where the actual adding of Labor's Tax A to the running total for GrandTotal for THIS workorders in this report data\n\t\t\t\t\t\t\n\t\t\t\t\t\tEachWO.ThisWOTotalTaxBs += Labor.TaxBViz; //this IS where the actual adding of Labor's Tax B to the running total for ALL Tax B for THIS workorders in this report data\n\t\t\t\t\t\tEachWO.ThisWOTotalGrand += Labor.TaxBViz; //this IS where the actual adding of Labor's Tax B to the running total for GrandTotal for THIS workorders in this report data\n \t \t\t}\t\t//NOTE if you customize this report template and do NOT need a key above, remove it to increase report performance\t\t\n\t\t\t}\n\n\t\t\tItem.ThisItemAllPartsNetViz = 0; //declare a key on the Item to hold all of this item's parts nets and set it initially to 0 \n\t\t\t\n\t\t\t//below is to Iterate through each Part record of the wo's Item\n\t\t\tfor (const Part of Item.Parts)\n\t\t\t{\n\t\t\t//make sure it has a value before attempting to add it to the running total\n \tif (Part.NetViz != null) \n \t \t{\n \t \tItem.ThisItemAllPartsNetViz += Part.NetViz; //this IS where the actual adding to running total for this WOItem's Net Parts\n\t\t\t\t\t\tEachWO.ThisWOAllPartsNetViz += Part.NetViz;//this IS where the actual adding to the running total for this entire WO's Net Parts\n\t\t\t\t\t\tEachWO.ThisWOTotalNets += Part.NetViz; //this IS where the actual adding to the running total for ALL NETS for THIS workorders in this report data\n\t\t\t\t\t\tEachWO.ThisWOTotalGrand += Part.NetViz; //this IS where the actual adding to the running total for GrandTotal for THIS workorders in this report data\t\t\t\t\t\t\n\n\t\t\t\t\t\tEachWO.ThisWOTotalTaxAs += Part.TaxAViz; //this IS where the actual adding of Part's Tax A to the running total for ALL Tax A for THIS workorders in this report data\n\t\t\t\t\t\tEachWO.ThisWOTotalGrand += Part.TaxAViz; //this IS where the actual adding of Part's Tax A to the running total for GrandTotal for THIS workorders in this report data\n\t\t\t\t\t\t\n\t\t\t\t\t\tEachWO.ThisWOTotalTaxBs += Part.TaxBViz; //this IS where the actual adding of Part's Tax B to the running total for ALL Tax B for THIS workorders in this report data\n\t\t\t\t\t\tEachWO.ThisWOTotalGrand += Part.TaxBViz; //this IS where the actual adding of Part's Tax B to the running total for GrandTotal for THIS workorders in this report data\n \t \t\t}\t\t\t\t//NOTE if you customize this report template and do NOT need a key above, remove it to increase report performance\t\n\t\t\t}\n\n\t\t\tItem.ThisItemAllTravelsNetViz = 0; //declare a key on the Item to hold all of this item's travel nets and set it initially to 0 \n\t\t\t\n\t\t\t//below is to Iterate through each Travel record of the wo's Item\n\t\t\tfor (const Travel of Item.Travels)\n\t\t\t{\n\t\t\t//make sure it has a value before attempting to add it to the running total\n \tif (Travel.NetViz != null) \n \t \t{\n\t\t\t\t\t\t\n \t \tItem.ThisItemAllTravelsNetViz += Travel.NetViz;//this IS where the actual adding to running total for this WOItem's Net Travels\n\t\t\t\t\t\tEachWO.ThisWOAllTravelsNetViz += Travel.NetViz;//this IS where the actual adding to the running total for this entire WO's Net Travels\n\t\t\t\t\t\tEachWO.ThisWOTotalNets += Travel.NetViz;//this IS where the actual adding to the running total for ALL NETS for THIS workorders in this report data\n\t\t\t\t\t\tEachWO.ThisWOTotalGrand += Travel.NetViz; //this IS where the actual adding to the running total for GrandTotal for THIS workorders in this report data\n\n\t\t\t\t\t\tEachWO.ThisWOTotalTaxAs += Travel.TaxAViz; //this IS where the actual adding of Travel's Tax A to the running total for ALL Tax A for THIS workorders in this report data\n\t\t\t\t\t\tEachWO.ThisWOTotalGrand += Travel.TaxAViz; //this IS where the actual adding of Travel's Tax A to the running total for GrandTotal for THIS workorders in this report data\n\t\t\t\t\t\t\n\t\t\t\t\t\tEachWO.ThisWOTotalTaxBs += Travel.TaxBViz; //this IS where the actual adding of Travel's Tax B to the running total for ALL Tax B for THIS workorders in this report data\n\t\t\t\t\t\tEachWO.ThisWOTotalGrand += Travel.TaxBViz; //this IS where the actual adding of Travel's Tax B to the running total for GrandTotal for THIS workorders in this report data\n \t \t\t}\t\t\t\t//NOTE if you customize this report template and do NOT need a key above, remove it to increase report performance\t\n\t\t\t}\n\n\t\t\t//note additional statements for misc expense to ONLY add to running totals if ChargeToCustomer is true\n\t\t\t\n\t\t\tItem.ThisItemAllExpsNetChargeAmount = 0; //declare a key on the Item to hold all of this item's misc nets and set it initially to 0 \n\t\t\t\n\t\t\t//below is to Iterate through each Exp record of the wo's Item\n\t\t\tfor (const Exp of Item.Expenses)\n\t\t\t{\n\t\t\t//if this expense has a ChargeAmount value AND the ChargeToCustomer is true then adds the ChargeAmount to running totals\n \tif (Exp.ChargeAmount != null && Exp.ChargeToCustomer == true) \n \t \t{\n\t\t\t\t\t\t\n \t \tItem.ThisItemAllExpsNetChargeAmount += Exp.ChargeAmount;//this IS where the actual adding to running total for this WOItem's Net Exps\n\t\t\t\t\t\tEachWO.ThisWOAllExpsNetChargeAmount += Exp.ChargeAmount;//this IS where the actual adding to the running total for this entire WO's Net ChargeAmounts\n\t\t\t\t\t\tEachWO.ThisWOTotalNets += Exp.ChargeAmount;//this IS where the actual adding to the running total for ALL NET ChargeAmountS for THIS workorders in this report data\n\t\t\t\t\t\tEachWO.ThisWOTotalGrand += Exp.ChargeAmount; //this IS where the actual adding to the running total for GrandTotal for THIS workorders in this report data\n \t \t\t}\t\t\t\t//NOTE if you customize this report template and do NOT need a key above, remove it to increase report performance\t\n\n\t\t\t//if this expense the ChargeToCustomer is true AND ChargeTaxCode has a value then adds the TaxAViz and TaxBViz to running totals\t\t\n\t\t\t\t\tif (Exp.ChargeToCustomer == true && Exp.ChargeTaxCodeId != null ) \n \t \t{\n\t\t\t\t\t\tEachWO.ThisWOTotalTaxAs += Exp.TaxAViz; //this IS where the actual adding of Exp's Tax A to the running total for ALL Tax A for THIS workorders in this report data\n\t\t\t\t\t\tEachWO.ThisWOTotalGrand += Exp.TaxAViz; //this IS where the actual adding of Exp's Tax A to the running total for GrandTotal for THIS workorders in this report data\n\t\t\t\t\t\t\n\t\t\t\t\t\tEachWO.ThisWOTotalTaxBs += Exp.TaxBViz; //this IS where the actual adding of Exp's Tax B to the running total for ALL Tax B for THIS workorders in this report data\n\t\t\t\t\t\tEachWO.ThisWOTotalGrand += Exp.TaxBViz; //this IS where the actual adding of Exp's Tax B to the running total for GrandTotal for THIS workorders in this report data\n \t \t\t}\t\t\t\t//NOTE if you customize this report template and do NOT need a key above, remove it to increase report performance\t\n\t\t\t\t\telse if (Exp.ChargeToCustomer == true && Exp.ChargeTaxCodeId == null ) //else if ChargeToCustomer is true AND ChargeTaxCodeID is null, then add TaxPaid to TaxA running total and Grand Total\t\t\n\t\t\t\t\t\t{\n\t\t\t\t\t\tEachWO.ThisWOTotalTaxAs += Exp.TaxPaid; //this IS where the actual adding of Exp's TaxPaid to the running total for ALL Tax A for THIS workorders in this report data\n\t\t\t\t\t\tEachWO.ThisWOTotalGrand += Exp.TaxPaid; //this IS where the actual adding of Exp's TaxPaid to the running total for GrandTotal for THIS workorders in this report data\n\t\t\t\t\t\t}\n\n\t\t\t}\n\n\t\t\t\n\t\t\tItem.ThisItemAllLoansNetViz = 0; //declare a key on the Item to hold all of this item's loans nets and set it initially to 0 \n\t\t\t\n\t\t\t//below is to Iterate through each Loan record of the wo's Item\n\t\t\tfor (const Loan of Item.Loans)\n\t\t\t{\n\t\t\t//make sure it has a value before attempting to add it to the running total\n \tif (Loan.NetViz != null) \n \t \t{\n \t \tItem.ThisItemAllLoansNetViz += Loan.NetViz;//this IS where the actual adding to running total for this WOItem's Net Loans\n\t\t\t\t\t\tEachWO.ThisWOAllLoansNetViz += Loan.NetViz;//this IS where the actual adding to the running total for this entire WO's Net Loans\n\t\t\t\t\t\tEachWO.ThisWOTotalNets += Loan.NetViz;//this IS where the actual adding to the running total for ALL NETS for THIS workorders in this report data\n\t\t\t\t\t\tEachWO.ThisWOTotalGrand += Loan.NetViz; //this IS where the actual adding to the running total for GrandTotal for THIS workorders in this report data\n\n\t\t\t\t\t\tEachWO.ThisWOTotalTaxAs += Loan.TaxAViz; //this IS where the actual adding of Loan's Tax A to the running total for ALL Tax A for THIS workorders in this report data\n\t\t\t\t\t\tEachWO.ThisWOTotalGrand += Loan.TaxAViz; //this IS where the actual adding of Loan's Tax A to the running total for GrandTotal for THIS workorders in this report data\n\t\t\t\t\t\t\n\t\t\t\t\t\tEachWO.ThisWOTotalTaxBs += Loan.TaxBViz; //this IS where the actual adding of Loan's Tax B to the running total for ALL Tax B for THIS workorders in this report data\n\t\t\t\t\t\tEachWO.ThisWOTotalGrand += Loan.TaxBViz; //this IS where the actual adding of Loan's Tax B to the running total for GrandTotal for THIS workorders in this report data\n \t \t\t}\t\t\t\t//NOTE if you customize this report template and do NOT need a key above, remove it to increase report performance\t\n\t\t\t}\n\n\t\t\tItem.ThisItemAllOutsidesNetViz = 0; //declare a key on the Item to hold all of this item's Outsie nets and set it initially to 0 \n\t\t\t\n\t\t\t//below is to Iterate through each Outside record of the wo's Item\n\t\t\tfor (const Outside of Item.OutsideServices)\n\t\t\t{\n\t\t\t//make sure it has a value before attempting to add it to the running total\n \tif (Outside.NetViz != null) \n \t \t{\n\t\t\t\t\t\t\n \t \tItem.ThisItemAllOutsidesNetViz += Outside.NetViz;//this IS where the actual adding to running total for this WOItem's Net Outside\n\t\t\t\t\t\tEachWO.ThisWOAllOutsidesNetViz += Outside.NetViz;//this IS where the actual adding to the running total for this entire WO's Net Outsides\n\t\t\t\t\t\tEachWO.ThisWOTotalNets += Outside.NetViz;//this IS where the actual adding to the running total for ALL NETS for THIS workorders in this report data\n\t\t\t\t\t\tEachWO.ThisWOTotalGrand += Outside.NetViz; //this IS where the actual adding to the running total for GrandTotal for THIS workorders in this report data\n\n\t\t\t\t\t\tEachWO.ThisWOTotalTaxAs += Outside.TaxAViz; //this IS where the actual adding of Outside's Tax A to the running total for ALL Tax A for THIS workorders in this report data\n\t\t\t\t\t\tEachWO.ThisWOTotalGrand += Outside.TaxAViz; //this IS where the actual adding of Outside's Tax A to the running total for GrandTotal for THIS workorders in this report data\n\t\t\t\t\t\t\n\t\t\t\t\t\tEachWO.ThisWOTotalTaxBs += Outside.TaxBViz; //this IS where the actual adding of Outside's Tax B to the running total for ALL Tax B for THIS workorders in this report data\n\t\t\t\t\t\tEachWO.ThisWOTotalGrand += Outside.TaxBViz; //this IS where the actual adding of Outside's Tax B to the running total for GrandTotal for THIS workorders in this report data\n \t \t\t}\t\t\t\t//NOTE if you customize this report template and do NOT need a key above, remove it to increase report performance\t\n\t\t\t}\n\t\t}\n\t}\n\t\n\n return reportData;\n}","JsHelpers":"Handlebars.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 EXAMPLE SHOW: June 9, 2021\n\n/////////////////////////////////////////////////////////////////\n//\n// CUSTOM DATE HELPER\n//\nHandlebars.registerHelper('myDate', function (value) {\n if (!value) {\n return \"\";\n }\n\n //parse the date\n let parsedDate = new Date(value);\n\n //Use built in toLocaleDateString method to format the date\n //there are many options that change the displayed format documented here\n //https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Date/toLocaleDateString\n return parsedDate.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});\n\n","RenderType":0,"HeaderTemplate":" ","FooterTemplate":"          Printed date: \n   Page  of         ","DisplayHeaderFooter":false,"PaperFormat":10,"Landscape":false,"MarginOptionsBottom":"15mm","MarginOptionsLeft":"15mm","MarginOptionsRight":"10mm","MarginOptionsTop":"10mm","PageRanges":null,"PreferCSSPageSize":false,"PrintBackground":true,"Scale":1.00000} \ No newline at end of file