diff --git a/server/AyaNova/resource/de.json b/server/AyaNova/resource/de.json index fb526071..4596de46 100644 --- a/server/AyaNova/resource/de.json +++ b/server/AyaNova/resource/de.json @@ -1326,45 +1326,28 @@ "WorkOrderItemExpenseName": "Versch. Aufw. - Zusammenfassung", "WorkOrderItemExpenseReimburseUser": "Benutzer rückerstatten", "WorkOrderItemExpenseTaxPaid": "Gezahlte Steuern", - "WorkOrderItemExpenseTaxRateSale": "Versch. Aufw. Steuersatz", "WorkOrderItemExpenseTotalCost": "Gesamtkosten", - "WorkOrderItemExpenseUser": "Benutzer", "WorkOrderItemExpenseUserID": "Benutzer", "WorkOrderItemLabor": "Arbeitsauftragsposten - Arbeit", - "WorkOrderItemLaborBanked": "Gutgeschrieben", - "WorkOrderItemLaborBasePrice": "Grundpreis", "WorkOrderItemLaborList": "Arbeitsposten", - "WorkOrderItemLaborManualDiscountPct": "Manueller Rabatt", "WorkOrderItemLaborNoChargeQuantity": "Ohne Gebühren - Menge", "WorkOrderItemLaborPrice": "Nettopreis", - "WorkOrderItemLaborRateCharge": "Satzgebühr", - "WorkOrderItemLabors": "Arbeit", "WorkOrderItemLaborServiceDetails": "Servicedetails", "WorkOrderItemLaborServiceRateID": "Servicesatz", "WorkOrderItemLaborServiceRateQuantity": "Servicesatz - Menge", "WorkOrderItemLaborServiceStartDate": "Service - Startdatum und -zeit", "WorkOrderItemLaborServiceStopDate": "Service - Enddatum und -zeit", - "WorkOrderItemLaborTaxCodeID": "Steuercode", "WorkOrderItemLaborTaxRateSaleID": "Umsatzsteuer", - "WorkOrderItemLaborUIBankWarning": "Sind Sie sicher, dass Sie diesen Datensatz gutschreiben möchten? (Sobald dieser Datensatz gutgeschrieben ist, wird er gesperrt und kann nicht mehr bearbeitet werden.", - "WorkOrderItemLaborUIReBankWarning": "Dieser Posten ist bereits gutgeschrieben", "WorkOrderItemLaborUserID": "Benutzer", "WorkOrderItemList": "Posten", "WorkOrderItemLoan": "Arbeitsauftragsposten - Ausleihe", - "WorkOrderItemLoanCharges": "Gebühren", "WorkOrderItemLoanDueDate": "Rückgabe fällig am", "WorkOrderItemLoanList": "Leihposten", "WorkOrderItemLoanNotes": "Anmerkungen", "WorkOrderItemLoanOutDate": "Ausgeliehen", "WorkOrderItemLoanQuantity": "Rate quantity", "WorkOrderItemLoanRate": "Rate", - "WorkOrderItemLoanRateAmount": "Rate amount", "WorkOrderItemLoanReturnDate": "Zurückgegeben", - "WorkOrderItemLoans": "Ausleihe", - "WorkOrderItemLoanTaxA": "Steuer A", - "WorkOrderItemLoanTaxAExempt": "Steuer A befreit", - "WorkOrderItemLoanTaxB": "Steuer B", - "WorkOrderItemLoanTaxBExempt": "Steuer B befreit", "WorkOrderItemLoanTaxCodeID": "Umsatzsteuer", "WorkOrderItemLoanTaxOnTax": "Steuer auf Steuer", "WorkOrderItemLoanTaxRateSale": "Steuer", diff --git a/server/AyaNova/resource/en.json b/server/AyaNova/resource/en.json index 1f989942..df30b896 100644 --- a/server/AyaNova/resource/en.json +++ b/server/AyaNova/resource/en.json @@ -1326,45 +1326,28 @@ "WorkOrderItemExpenseName": "Summary", "WorkOrderItemExpenseReimburseUser": "Reimburse User", "WorkOrderItemExpenseTaxPaid": "Tax Paid", - "WorkOrderItemExpenseTaxRateSale": "Tax Rate", "WorkOrderItemExpenseTotalCost": "Total Cost", - "WorkOrderItemExpenseUser": "User", "WorkOrderItemExpenseUserID": "User", "WorkOrderItemLabor": "Work order item labor", - "WorkOrderItemLaborBanked": "Banked", - "WorkOrderItemLaborBasePrice": "Base price", "WorkOrderItemLaborList": "Labors", - "WorkOrderItemLaborManualDiscountPct": "Manual discount", "WorkOrderItemLaborNoChargeQuantity": "No Charge Quantity", "WorkOrderItemLaborPrice": "Net price", - "WorkOrderItemLaborRateCharge": "Rate Charge", - "WorkOrderItemLabors": "Labor", "WorkOrderItemLaborServiceDetails": "Service Details", "WorkOrderItemLaborServiceRateID": "Service Rate", "WorkOrderItemLaborServiceRateQuantity": "Service Rate Quantity", "WorkOrderItemLaborServiceStartDate": "Service Start Date Time", "WorkOrderItemLaborServiceStopDate": "Service Stop Date Time", - "WorkOrderItemLaborTaxCodeID": "Tax Code", "WorkOrderItemLaborTaxRateSaleID": "Sales tax", - "WorkOrderItemLaborUIBankWarning": "Are you sure you want to Bank this record?\r\n(Once this record is banked it will be locked and can no longer be edited)", - "WorkOrderItemLaborUIReBankWarning": "This item is already banked", "WorkOrderItemLaborUserID": "User", "WorkOrderItemList": "Items", "WorkOrderItemLoan": "Work order item loan", - "WorkOrderItemLoanCharges": "Charges", "WorkOrderItemLoanDueDate": "Due back", "WorkOrderItemLoanList": "Loans", "WorkOrderItemLoanNotes": "Notes", "WorkOrderItemLoanOutDate": "Loaned", "WorkOrderItemLoanQuantity": "Rate quantity", "WorkOrderItemLoanRate": "Rate", - "WorkOrderItemLoanRateAmount": "Rate amount", "WorkOrderItemLoanReturnDate": "Returned", - "WorkOrderItemLoans": "Loans", - "WorkOrderItemLoanTaxA": "Tax A", - "WorkOrderItemLoanTaxAExempt": "Tax A Exempt", - "WorkOrderItemLoanTaxB": "Tax B", - "WorkOrderItemLoanTaxBExempt": "Tax B Exempt", "WorkOrderItemLoanTaxCodeID": "Sales tax", "WorkOrderItemLoanTaxOnTax": "Tax On Tax", "WorkOrderItemLoanTaxRateSale": "Tax", diff --git a/server/AyaNova/resource/es.json b/server/AyaNova/resource/es.json index e9bedff9..9be91cac 100644 --- a/server/AyaNova/resource/es.json +++ b/server/AyaNova/resource/es.json @@ -1326,45 +1326,28 @@ "WorkOrderItemExpenseName": "Resumen gastos varios", "WorkOrderItemExpenseReimburseUser": "Reembolsar al usuario", "WorkOrderItemExpenseTaxPaid": "Impuesto pagado", - "WorkOrderItemExpenseTaxRateSale": "Tarifa impuesto gastos varios", "WorkOrderItemExpenseTotalCost": "Coste total", - "WorkOrderItemExpenseUser": "Usuario", "WorkOrderItemExpenseUserID": "Usuario", "WorkOrderItemLabor": "Mano de obra elemento pedido", - "WorkOrderItemLaborBanked": "Restado del pago por adelantado", - "WorkOrderItemLaborBasePrice": "Precio base", "WorkOrderItemLaborList": "Elementos mano de obra", - "WorkOrderItemLaborManualDiscountPct": "Descuento manual", "WorkOrderItemLaborNoChargeQuantity": "Cantidad sin cargo", "WorkOrderItemLaborPrice": "Precio neto", - "WorkOrderItemLaborRateCharge": "Tarifa", - "WorkOrderItemLabors": "Mano de obra", "WorkOrderItemLaborServiceDetails": "Detalles del servicio", "WorkOrderItemLaborServiceRateID": "Tarifa del servicio", "WorkOrderItemLaborServiceRateQuantity": "Unidades tarifa de servicio", "WorkOrderItemLaborServiceStartDate": "Fecha y hora inicio de servicio", "WorkOrderItemLaborServiceStopDate": "Fecha y hora fin de servicio", - "WorkOrderItemLaborTaxCodeID": "Código fiscal", "WorkOrderItemLaborTaxRateSaleID": "Impuesto sobre la venta", - "WorkOrderItemLaborUIBankWarning": "¿Seguro que desea restar este registro de los pagos por adelantado? (Una vez restado, quedará bloqueado y ya no podrá editarse)", - "WorkOrderItemLaborUIReBankWarning": "Este elemento ya se ha restado de los pagos por adelantado", "WorkOrderItemLaborUserID": "Usuario", "WorkOrderItemList": "Elementos", "WorkOrderItemLoan": "Préstamo elemento de pedido", - "WorkOrderItemLoanCharges": "Costes", "WorkOrderItemLoanDueDate": "Devolución prevista", "WorkOrderItemLoanList": "Elementos préstamo", "WorkOrderItemLoanNotes": "Notas", "WorkOrderItemLoanOutDate": "En préstamo", "WorkOrderItemLoanQuantity": "Rate quantity", "WorkOrderItemLoanRate": "Rate", - "WorkOrderItemLoanRateAmount": "Rate amount", "WorkOrderItemLoanReturnDate": "Devuelto", - "WorkOrderItemLoans": "Préstamos", - "WorkOrderItemLoanTaxA": "Impuesto A", - "WorkOrderItemLoanTaxAExempt": "Exención impuesto A", - "WorkOrderItemLoanTaxB": "Impuesto B", - "WorkOrderItemLoanTaxBExempt": "Exención impuesto B", "WorkOrderItemLoanTaxCodeID": "Impuesto sobre la venta", "WorkOrderItemLoanTaxOnTax": "Impuesto sobre impuesto", "WorkOrderItemLoanTaxRateSale": "Impuesto", diff --git a/server/AyaNova/resource/fr.json b/server/AyaNova/resource/fr.json index f78282b4..2fd92770 100644 --- a/server/AyaNova/resource/fr.json +++ b/server/AyaNova/resource/fr.json @@ -1326,45 +1326,28 @@ "WorkOrderItemExpenseName": "Résumé dépenses diverses", "WorkOrderItemExpenseReimburseUser": "Rembourser l'utilisateur", "WorkOrderItemExpenseTaxPaid": "Taxe payée", - "WorkOrderItemExpenseTaxRateSale": "Tarif taxe Dépenses diverses", "WorkOrderItemExpenseTotalCost": "Coût total", - "WorkOrderItemExpenseUser": "Utilisateur", "WorkOrderItemExpenseUserID": "Utilisateur", "WorkOrderItemLabor": "Main d'oeuvre d'élément de bon de travail", - "WorkOrderItemLaborBanked": "Déduit des sommes prépayées", - "WorkOrderItemLaborBasePrice": "Prix de base", "WorkOrderItemLaborList": "Éléments de main d'oeuvre", - "WorkOrderItemLaborManualDiscountPct": "Remise manuelle", "WorkOrderItemLaborNoChargeQuantity": "Quantité non facturée", "WorkOrderItemLaborPrice": "Prix net", - "WorkOrderItemLaborRateCharge": "Facturation au tarif", - "WorkOrderItemLabors": "Main d'oeuvre", "WorkOrderItemLaborServiceDetails": "Détails de service", "WorkOrderItemLaborServiceRateID": "Tarif de service", "WorkOrderItemLaborServiceRateQuantity": "Quantité de tarif de service", "WorkOrderItemLaborServiceStartDate": "Date et heure de début de service", "WorkOrderItemLaborServiceStopDate": "Date et heure de fin de service", - "WorkOrderItemLaborTaxCodeID": "Code de taxe", "WorkOrderItemLaborTaxRateSaleID": "Taxe sur les ventes", - "WorkOrderItemLaborUIBankWarning": "Souhaitez-vous réellement déduire cet enregistrement des sommes prépayées ? (L'enregistrement sera bloqué et il ne sera plus possible de le modifier)", - "WorkOrderItemLaborUIReBankWarning": "Cet élément est déjà déduit des sommes prépayées", "WorkOrderItemLaborUserID": "Utilisateur", "WorkOrderItemList": "Éléments", "WorkOrderItemLoan": "Prêt d'élément de bon de travail", - "WorkOrderItemLoanCharges": "Frais", "WorkOrderItemLoanDueDate": "Date de retour", "WorkOrderItemLoanList": "Éléments de prêt", "WorkOrderItemLoanNotes": "Remarques", "WorkOrderItemLoanOutDate": "Prêté", "WorkOrderItemLoanQuantity": "Rate quantity", "WorkOrderItemLoanRate": "Rate", - "WorkOrderItemLoanRateAmount": "Rate amount", "WorkOrderItemLoanReturnDate": "Rendu", - "WorkOrderItemLoans": "Prêts", - "WorkOrderItemLoanTaxA": "Taxe A", - "WorkOrderItemLoanTaxAExempt": "Exemption de taxe A", - "WorkOrderItemLoanTaxB": "Taxe B", - "WorkOrderItemLoanTaxBExempt": "Exemption de taxe B", "WorkOrderItemLoanTaxCodeID": "Taxe sur les ventes", "WorkOrderItemLoanTaxOnTax": "Taxe sur taxe", "WorkOrderItemLoanTaxRateSale": "Taxe", 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 1a7a7e26..35ea4ee0 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 'WorkOrderItemLabors'}} 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 'WorkOrderItemTravels'}} 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\", \"WorkOrderItemLabors\", \"WorkOrderItemLaborServiceRateID\", \"WorkOrderItemTravels\", \"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 '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 'WorkOrderItemTravels'}} 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\", \"WorkOrderItemTravels\", \"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 Quote.ayrt b/server/AyaNova/resource/rpt/stock-report-templates/Customer Quote.ayrt index 0f5f5a25..ecd950ba 100644 --- a/server/AyaNova/resource/rpt/stock-report-templates/Customer Quote.ayrt +++ b/server/AyaNova/resource/rpt/stock-report-templates/Customer Quote.ayrt @@ -1 +1 @@ -{"Name":"Customer Quote","Active":true,"Notes":"\n","Roles":49514,"AType":27,"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 {{else}}\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 \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 {{#each Units}}\n \n \n \n \n \n {{/each}}\n {{#if Units}}\n \n \n \n {{/if}}\n\n \n \n \n \n \n \n \n \n \n \n\n {{#each Labors}}\n \n \n \n \n \n \n {{#if TaxAViz}}{{else}}{{/if}}\n {{#if TaxBViz}}{{else}}{{/if}}\n \n \n {{/each}}\n\n {{#if Labors}}\n \n \n \n {{/if}}\n\n {{#each Parts}}\n \n \n \n \n \n \n {{#if TaxAViz}}{{else}}{{/if}}\n {{#if TaxBViz}}{{else}}{{/if}}\n \n \n {{/each}}\n\n {{#if Parts}}\n \n \n \n {{/if}}\n\n {{/each}}\n \n
{{ ayLogo \"small\" }}{{ayT 'Quote'}} {{Serial}}
{{../ayServerMetaData.CompanyName}}{{ayT 'Quote'}}{{Serial}}
 
{{ayT 'Quote'}} prepared for:
{{CustomerViz}}
 {{Address}}, {{City}}{{ayT 'QuotePreparedByID'}}{{PreparedByViz}}
 {{CustomerPhone1Viz}}{{ayT 'WorkOrderCustomerReferenceNumber'}}{{CustomerReferenceNumber}}
 {{CustomerEmailAddressViz}} {{ayT 'WorkOrderInternalReferenceNumber'}}{{InternalReferenceNumber}}
 {{ayT \"QuoteQuoteRequestDate\"}}{{ayDate Requested}}
 {{ayT 'WorkOrderSummary'}} {{ayT 'QuoteValidUntilDate'}}{{ayDate ValidUntil}}
 {{Notes}}  
 {{ayT 'QuoteIntroduction'}} 
 {{Introduction}} 
 
{{ayT 'WorkOrderItemSummary'}} #{{Sequence}}{{Notes}}
{{ayT 'WorkOrderItemTechNotes'}}{{TechNotes}}
{{ayT 'Unit'}}{{UnitViz}} - {{UnitModelNameViz}}
 
{{ayT 'WorkOrderItemList'}}{{ayT 'WorkOrderItemPartQuantity'}}{{ayT 'Price'}}{{ayT 'NetPrice'}}{{ayT 'TaxCodeTaxA'}}{{ayT 'TaxCodeTaxB'}}{{ayT 'LineTotal'}}
{{ayT 'WorkOrderItemLaborServiceRateID'}}: {{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}}
 
\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 {{#if ThisWOTotalTaxAs}}{{else}}{{/if}}\n {{#if ThisWOTotalTaxBs}}{{else}}{{/if}}\n \n \n \n \n \n \n \n \n \n \n \n \n
 
 
{{ayT 'WorkOrderItemLabors'}} {{ayT 'NetPrice'}}{{ayT 'WorkOrderItemParts'}} {{ayT 'NetPrice'}}{{ayT 'TaxCodeTaxA'}} {{ayT 'NetPrice'}}{{ayT 'TaxCodeTaxB'}} {{ayT 'NetPrice'}} {{ayT 'Quote'}} {{ayT 'Total'}}
{{ayCurrency ThisWOAllLaborsNetViz}}{{ayCurrency ThisWOAllPartsNetViz}}{{ayCurrency ThisWOTotalTaxAs}}$0.00{{ayCurrency ThisWOTotalTaxBs}}$0.00{{ayCurrency ThisWOTotalGrand}}
 
Thank you for your business!
If any questions about this price quote, please contact {{../ayServerMetaData.CompanyPhone1}} referencing {{ayT 'Quote'}} {{Serial}}
\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: 8pt;\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.fontpurple {\n color: purple;\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\t//this function (if present) is called with the report data \n\t//before the report is rendered \n\t//modify data as required here and return it to change the data before the report renders \n\t//see the help documentation for details\n\n\tawait ayGetTranslations([\"Quote\", \"WorkOrderItemParts\", \"WorkOrderItemLabors\", \"WorkOrderItemList\", \"QuoteIntroduction\", \"WorkOrderSummary\", \"QuotePreparedByID\", \"WorkOrderInternalReferenceNumber\", \"WorkOrderCustomerReferenceNumber\", \"QuoteDateSubmitted\", \"QuoteDateApproved\", \"QuoteValidUntilDate\", \"QuoteQuoteRequestDate\", \"Unit\", \"WorkOrderItemSummary\", \"WorkOrderItemTechNotes\", \"WorkOrderItemPartQuantity\", \"Price\", \"NetPrice\", \"TaxCodeTaxA\", \"TaxCodeTaxB\", \"LineTotal\", \"Total\", \"WorkOrderItemPartPartID\", \"WorkOrderItemLaborServiceRateID\"]);\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 quote 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 quote so it exists\n\tEachWO.ThisWOAllPartsNetViz = 0;\n\n\n\t//below declares a key on the entire wo to hold ALL of THIS quote's Nets so it exists\n\tEachWO.ThisWOTotalNets = 0;\n\n\t//below declares a key on the entire wo to hold THIS quote'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 quote'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 quote'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 quote 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 quote 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 quote 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 quote 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 quote 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 quote in this report data\n \t \t\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 quote 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 quote 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 quote 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 quote 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 quote 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 quote in this report data\n \t \t\t}\t\t\t\n\t\t\t}\n\n\n\t\t}\n\t}\n\n\n\treturn reportData;\n}","JsHelpers":"","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 Quote","Active":true,"Notes":"\n","Roles":49514,"AType":27,"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 {{else}}\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 \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 {{#each Units}}\n \n \n \n \n \n {{/each}}\n {{#if Units}}\n \n \n \n {{/if}}\n\n \n \n \n \n \n \n \n \n \n \n\n {{#each Labors}}\n \n \n \n \n \n \n {{#if TaxAViz}}{{else}}{{/if}}\n {{#if TaxBViz}}{{else}}{{/if}}\n \n \n {{/each}}\n\n {{#if Labors}}\n \n \n \n {{/if}}\n\n {{#each Parts}}\n \n \n \n \n \n \n {{#if TaxAViz}}{{else}}{{/if}}\n {{#if TaxBViz}}{{else}}{{/if}}\n \n \n {{/each}}\n\n {{#if Parts}}\n \n \n \n {{/if}}\n\n {{/each}}\n \n
{{ ayLogo \"small\" }}{{ayT 'Quote'}} {{Serial}}
{{../ayServerMetaData.CompanyName}}{{ayT 'Quote'}}{{Serial}}
 
{{ayT 'Quote'}} prepared for:
{{CustomerViz}}
 {{Address}}, {{City}}{{ayT 'QuotePreparedByID'}}{{PreparedByViz}}
 {{CustomerPhone1Viz}}{{ayT 'WorkOrderCustomerReferenceNumber'}}{{CustomerReferenceNumber}}
 {{CustomerEmailAddressViz}} {{ayT 'WorkOrderInternalReferenceNumber'}}{{InternalReferenceNumber}}
 {{ayT \"QuoteQuoteRequestDate\"}}{{ayDate Requested}}
 {{ayT 'WorkOrderSummary'}} {{ayT 'QuoteValidUntilDate'}}{{ayDate ValidUntil}}
 {{Notes}}  
 {{ayT 'QuoteIntroduction'}} 
 {{Introduction}} 
 
{{ayT 'WorkOrderItemSummary'}} #{{Sequence}}{{Notes}}
{{ayT 'WorkOrderItemTechNotes'}}{{TechNotes}}
{{ayT 'Unit'}}{{UnitViz}} - {{UnitModelNameViz}}
 
{{ayT 'WorkOrderItemList'}}{{ayT 'WorkOrderItemPartQuantity'}}{{ayT 'Price'}}{{ayT 'NetPrice'}}{{ayT 'TaxCodeTaxA'}}{{ayT 'TaxCodeTaxB'}}{{ayT 'LineTotal'}}
{{ayT 'WorkOrderItemLaborServiceRateID'}}: {{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}}
 
\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 {{#if ThisWOTotalTaxAs}}{{else}}{{/if}}\n {{#if ThisWOTotalTaxBs}}{{else}}{{/if}}\n \n \n \n \n \n \n \n \n \n \n \n \n
 
 
{{ayT 'WorkOrderItemLaborList'}} {{ayT 'NetPrice'}}{{ayT 'WorkOrderItemParts'}} {{ayT 'NetPrice'}}{{ayT 'TaxCodeTaxA'}} {{ayT 'NetPrice'}}{{ayT 'TaxCodeTaxB'}} {{ayT 'NetPrice'}} {{ayT 'Quote'}} {{ayT 'Total'}}
{{ayCurrency ThisWOAllLaborsNetViz}}{{ayCurrency ThisWOAllPartsNetViz}}{{ayCurrency ThisWOTotalTaxAs}}$0.00{{ayCurrency ThisWOTotalTaxBs}}$0.00{{ayCurrency ThisWOTotalGrand}}
 
Thank you for your business!
If any questions about this price quote, please contact {{../ayServerMetaData.CompanyPhone1}} referencing {{ayT 'Quote'}} {{Serial}}
\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: 8pt;\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.fontpurple {\n color: purple;\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\t//this function (if present) is called with the report data \n\t//before the report is rendered \n\t//modify data as required here and return it to change the data before the report renders \n\t//see the help documentation for details\n\n\tawait ayGetTranslations([\"Quote\", \"WorkOrderItemParts\", \"WorkOrderItemLaborList\", \"WorkOrderItemList\", \"QuoteIntroduction\", \"WorkOrderSummary\", \"QuotePreparedByID\", \"WorkOrderInternalReferenceNumber\", \"WorkOrderCustomerReferenceNumber\", \"QuoteDateSubmitted\", \"QuoteDateApproved\", \"QuoteValidUntilDate\", \"QuoteQuoteRequestDate\", \"Unit\", \"WorkOrderItemSummary\", \"WorkOrderItemTechNotes\", \"WorkOrderItemPartQuantity\", \"Price\", \"NetPrice\", \"TaxCodeTaxA\", \"TaxCodeTaxB\", \"LineTotal\", \"Total\", \"WorkOrderItemPartPartID\", \"WorkOrderItemLaborServiceRateID\"]);\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 quote 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 quote so it exists\n\tEachWO.ThisWOAllPartsNetViz = 0;\n\n\n\t//below declares a key on the entire wo to hold ALL of THIS quote's Nets so it exists\n\tEachWO.ThisWOTotalNets = 0;\n\n\t//below declares a key on the entire wo to hold THIS quote'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 quote'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 quote'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 quote 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 quote 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 quote 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 quote 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 quote 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 quote in this report data\n \t \t\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 quote 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 quote 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 quote 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 quote 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 quote 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 quote in this report data\n \t \t\t}\t\t\t\n\t\t\t}\n\n\n\t\t}\n\t}\n\n\n\treturn reportData;\n}","JsHelpers":"","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 d007912f..bd2d0cdd 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 'WorkOrderItemLabors'}} 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 'WorkOrderItemPartPartSerialID'}}: {{Serials}}
 {{ayT 'WorkOrderItemTravels'}} 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\", \"WorkOrderItemPartPartSerialID\", \"WorkOrderItemLabors\", \"WorkOrderItemLaborServiceRateID\", \"WorkOrderItemLaborServiceDetails\", \"WorkOrderItemTravels\", \"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 '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 'WorkOrderItemPartPartSerialID'}}: {{Serials}}
 {{ayT 'WorkOrderItemTravels'}} 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\", \"WorkOrderItemPartPartSerialID\", \"WorkOrderItemLaborList\", \"WorkOrderItemLaborServiceRateID\", \"WorkOrderItemLaborServiceDetails\", \"WorkOrderItemTravels\", \"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/Labor Billing & Hours Grouped By Technician.ayrt b/server/AyaNova/resource/rpt/stock-report-templates/Labor Billing & Hours Grouped By Technician.ayrt index 963c339c..341608bf 100644 --- a/server/AyaNova/resource/rpt/stock-report-templates/Labor Billing & Hours Grouped By Technician.ayrt +++ b/server/AyaNova/resource/rpt/stock-report-templates/Labor Billing & Hours Grouped By Technician.ayrt @@ -1 +1 @@ -{"Name":"Labor Billing & Hours Grouped By Technician","Active":true,"Notes":"Custom Prepare to group by the technician, and get running totals of NC, Billable and Actual for grouping AND for all wo records in this report","Roles":51182,"AType":37,"IncludeWoItemDescendants":false,"Template":"\n\n
\n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n {{#each ayReportData}}\n \n \n \n \n \n \n {{#each items}}\n \n \n \n \n \n \n \n \n \n \n \n \n {{/each}}\n \n \n \n \n \n \n \n \n \n \n \n \n \n {{/each}}\n \n
{{ayT \"WorkOrder\"}}{{ayT \"WorkOrderItemLaborServiceStartDate\"}} / {{ayT \"WorkOrderItemLaborServiceStopDate\"}} {{ayT \"WorkOrderItemLaborServiceRateID\"}}{{ayT \"WorkOrderItemLaborRateCharge\"}}Actual Start minus Stop{{ayT \"WorkOrderItemLaborNoChargeQuantity\"}}{{ayT \"WorkOrderItemLaborServiceRateQuantity\"}}{{ayT \"NetPrice\"}}
{{ayT 'WorkOrderItemLabors'}} for {{group}}# of labor items: {{count}}
 {{Serial}}{{ayDateTime ServiceStartDate}} to {{ayDateTime ServiceStopDate}}{{ServiceRateViz}}{{ayCurrency PriceViz}} {{UnitOfMeasureViz}}{{ayDecimal diffHours}}{{NoChargeQuantity}}{{ServiceRateQuantity}}{{ayCurrency NetViz}}
 
Total {{ayT \"WorkOrderItemLaborServiceRateQuantity\"}} + {{ayT \"WorkOrderItemLaborNoChargeQuantity\" }} = {{EachGroupWOLaborsNCQtyplusBillableQty}} for {{group}}{{ayDecimal EachGroupWOActualHoursQty}}{{EachGroupWOLaborsNCQty}}{{EachGroupWOLaborsBillableQty}}{{ayCurrency EachGroupWOLaborsNetViz}}
 
\n\n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n
 Total {{ayT 'WorkOrderItemLabors'}} recordsTotal Combined {{ayT \"WorkOrderItemLaborServiceRateQuantity\"}} & {{ayT \"WorkOrderItemLaborServiceRateQuantity\"}}Total {{ayT \"WorkOrderItemLaborNoChargeQuantity\"}}Total {{ayT \"WorkOrderItemLaborServiceRateQuantity\"}}Total {{ayT \"NetPrice\"}}
 {{AllWOLaborsCount}}{{AllWOLaborsNCQtyplusBillableQty}}{{AllWOLaborsNCQty}}{{AllWOLaborsBillableQty}}{{ayCurrency AllWOLaborsNetViz}}
\n
\n\n\n","Style":".singlePage\r\n{\r\npage-break-after: always;\r\n\r\n}\r\nbody {\r\n font-family: 'Helvetica', 'Helvetica Neue', Arial, sans-serif; \r\n}\r\n\r\n.reporttitle { \r\n margin-bottom: 20pt; \r\n font-weight: bold; \r\n font-size: 14pt; \r\n color: #9e9e9e;\r\n text-align: left;\r\n} \r\n\r\ntable { \r\n border-collapse: collapse;\r\n white-space: pre-wrap;\r\n width: 100%; \r\n table-layout: fixed;\r\n }\r\n\r\nth {\r\n height: 30px;\r\n font-size: 10pt; \r\n color: #9e9e9e;\r\n}\r\n\r\ntfoot th{\r\n border-top: solid 1pt #9e9e9e;\r\n height: 50px;\r\n text-align: center;\r\n}\r\n\r\ntbody td {\r\n padding: 10px;\r\n word-wrap: break-word;\r\n font-size: 9pt;\r\n text-align: center;\r\n}\r\n\r\ntbody tr:nth-child(even) {\r\n background-color: #f8f8f8; /* MUST checkmark Print background in PDF Options for this to show */\r\n}\r\n\r\ntfoot td{\r\n font-size: 10pt;\r\n text-align: center;\r\n }\r\n\r\n.rightlean {\r\n text-align: right;\r\n}\r\n.leftlean {\r\n text-align: left;\r\n}\r\n.centerlean {\r\n text-align: center;\r\n}\r\n\r\n\r\n.fontgreen {\r\n color: green;\r\n}\r\n.fontblue {\r\n color: blue;\r\n}\r\n.fontred {\r\n color:red;\r\n font-weight: bold;\r\n}\r\n.fontpurple {\r\n color: purple;\r\n}\r\n","JsPrerender":"async function ayPrepareData(reportData) {\n\nawait ayGetTranslations([\"Total\", \"WorkOrder\", \"WorkOrderList\", \"WorkOrderItemLabors\", \"WorkOrderItemLaborUserID\", \"WorkOrderItemLaborServiceRateID\", \"WorkOrderItemLaborRateCharge\", \"WorkOrderItemLaborServiceRateQuantity\", \"WorkOrderItemLaborServiceDetails\", \"WorkOrderItemLaborNoChargeQuantity\", \"WorkOrderItemLaborServiceStartDate\", \"WorkOrderItemLaborServiceStopDate\", \"NetPrice\"]);\n\n\n\t//below is the code to group by the technician - the UserViz\n\tlet ret = [];\n //iterate workorders -> items -> workorder item labors\n reportData.ayReportData.forEach(workorder => {\n workorder.Items.forEach(workorderitem => {\n workorderitem.Labors.forEach(labor => {\n //new shape of data required for report\n let record = {\n Serial: workorder.Serial,\n ServiceRateViz: labor.ServiceRateViz,\n PriceViz: labor.PriceViz,\n UnitOfMeasureViz: labor.UnitOfMeasureViz,\n ServiceStartDate: labor.ServiceStartDate,\n ServiceStopDate: labor.ServiceStopDate,\n NoChargeQuantity: labor.NoChargeQuantity,\n ServiceRateQuantity: labor.ServiceRateQuantity,\n\t\t\t\t\tServiceDetails: labor.ServiceDetails,\n NetViz: labor.NetViz\n };\n\n //Find or create group and insert this record \n let groupObject = ret.find(z => z.group == labor.UserViz);\n if (groupObject != undefined) {\n //there is already a matching group in the return array so just push this record into it\n groupObject.items.push(record);\n //update the count for this group's items\n groupObject.count++;\n } else {\n //No group yet, so start a new one in the ret array and push this record into it\n ret.push({ group: labor.UserViz, items: [record], count: 1 });\n }\n\n })\n })\n });\n\n //replace the ayReportData with our new shaped format of data\n reportData.ayReportData = ret;\n\n \n//below to get running totals of THE DATA returned above\n\n\t//below declares variables for running total for ALL\n\treportData.AllWOLaborsNCQty = 0; \n\treportData.AllWOLaborsBillableQty = 0;\n\treportData.AllWOLaborsNCQtyplusBillableQty = 0; \n\treportData.AllWOLaborsNetViz = 0;\n\t\n\treportData.AllWOLaborsCount = 0;\n\n \t\t\n\n\t\t\t\tfor (const EachGroup of reportData.ayReportData) \n\t\t\t\t{\n\t\t\t\t//below declares a key on the entire grouping to hold running totals for each labor record for each Item for EachWO for each \"items\" \n\t\t\t\tEachGroup.EachGroupWOLaborsNCQty = 0;\n\t\t\t\tEachGroup.EachGroupWOLaborsBillableQty = 0;\n\t\t\t\tEachGroup.EachGroupWOLaborsNCQtyplusBillableQty = 0;\n\t\t\t\tEachGroup.EachGroupWOLaborsNetViz = 0;\n\t\t\t\tEachGroup.EachGroupWOActualHoursQty = 0;\n\t\t\t\t\n\t\t\t\t\n\t\t\t\t\t\t for (const groupitem of EachGroup.items) \n\t\t\t\t\t\t \t{\n\t\t\t\t\t\t\t\t\t\treportData.AllWOLaborsCount += 1;\t\t\t\t\t\t\t\t\t\t\n\t\t\t\t\t\t\t\t\t\t\n\t\t\t\t\t\t\t\t\t\tif (groupitem.ServiceStartDate != null && groupitem.ServiceStopDate != null) \n\t\t\t\t\t\t\t\t\t\t{\n\n\t\t\t\t\t\t\t\t\t\t\tvar dateTime1 = new Date (groupitem.ServiceStopDate);\n\t\t\t\t\t\t\t\t\t\t\tvar dateTime2 = new Date (groupitem.ServiceStartDate);\n\t\t\t\t\t\t\t\t\t\t\t\n\t\t\t\t\t\t\t\t\t\t\tvar diffMillis = (dateTime1.getTime() - dateTime2.getTime()); \n\t\t\t\t\t\t\t\t\t\t\tgroupitem.diffHours = ((diffMillis/3600) / 1000)\n\n\t\t\t\t\t\t\t\t\t\t\tEachGroup.EachGroupWOActualHoursQty += groupitem.diffHours;\n\t\t\t\t\t\t\t\t\t\t\n\t\t\t\t\t\t\t\t\t\t\t\n\t\t\t\t\t\t\t\t\t\t}\n\n\t\t\t\t\t\t\t\t\t\tif (groupitem.NoChargeQuantity != null) \n\t\t\t\t\t\t\t\t\t\t\t\t{\n\t\t\t\t\t\t\t\t\t\t\t\t\tEachGroup.EachGroupWOLaborsNCQty += groupitem.NoChargeQuantity;\t\n\t\t\t\t\t\t\t\t\t\t\t\t\tEachGroup.EachGroupWOLaborsNCQtyplusBillableQty += groupitem.NoChargeQuantity;\t\n\t\t\t\t\t\t\t\t\t\t\t\t\treportData.AllWOLaborsNCQty\t+= groupitem.NoChargeQuantity;\t\t\t\t\t\t\t\t\t\t\n\t\t\t\t\t\t\t\t\t\t\t\t\treportData.AllWOLaborsNCQtyplusBillableQty += groupitem.NoChargeQuantity;\n\t\t\t\t\t\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\t\t\t\tif (groupitem.ServiceRateQuantity != null) \n\t\t\t\t\t\t\t\t\t\t\t\t{\n\t\t\t\t\t\t\t\t\t\t\t\t\tEachGroup.EachGroupWOLaborsBillableQty += groupitem.ServiceRateQuantity; \n\t\t\t\t\t\t\t\t\t\t\t\t\tEachGroup.EachGroupWOLaborsNCQtyplusBillableQty += groupitem.ServiceRateQuantity;\n\t\t\t\t\t\t\t\t\t\t\t\t\treportData.AllWOLaborsBillableQty += groupitem.ServiceRateQuantity; \n\t\t\t\t\t\t\t\t\t\t\t\t\treportData.AllWOLaborsNCQtyplusBillableQty += groupitem.ServiceRateQuantity; \n\t\t\t\t\t\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\t\t\t\tif (groupitem.NetViz != null) \n\t\t\t\t\t\t\t\t\t\t\t\t{\n\t\t\t\t\t\t\t\t\t\t\t\t\tEachGroup.EachGroupWOLaborsNetViz += groupitem.NetViz;\n\t\t\t\t\t\t\t\t\t\t\t\t\t\n\t\t\t\t\t\t\t\t\t\t\t\t\treportData.AllWOLaborsNetViz += groupitem.NetViz; //this is the actual adding to running total for all\n\t\t\t\t\t\t\t\t\t\t\t\t}\t\t\t\t\t\t\t\t\n\t\t\t\t\t\t \t\t\n\t\t\t\t\t\t \t}\n\t\t\t\t}\n\t\t\t\n\n\t//return the data into the pipeline to send to the report template \n\treturn reportData;\n}\n\n\n\n","JsHelpers":"","RenderType":0,"HeaderTemplate":"","FooterTemplate":"    Printed date:    \nPage  of         ","DisplayHeaderFooter":true,"PaperFormat":10,"Landscape":true,"MarginOptionsBottom":"20mm","MarginOptionsLeft":"20mm","MarginOptionsRight":"15mm","MarginOptionsTop":"15mm","PageRanges":null,"PreferCSSPageSize":false,"PrintBackground":true,"Scale":1.00000} \ No newline at end of file +{"Name":"Labor Billing & Hours Grouped By Technician","Active":true,"Notes":"Custom Prepare to group by the technician, and get running totals of NC, Billable and Actual for grouping AND for all wo records in this report","Roles":51182,"AType":37,"IncludeWoItemDescendants":false,"Template":"\n\n
\n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n {{#each ayReportData}}\n \n \n \n \n \n \n {{#each items}}\n \n \n \n \n \n \n \n \n \n \n \n \n {{/each}}\n \n \n \n \n \n \n \n \n \n \n \n \n \n {{/each}}\n \n
{{ayT \"WorkOrder\"}}{{ayT \"WorkOrderItemLaborServiceStartDate\"}} / {{ayT \"WorkOrderItemLaborServiceStopDate\"}} {{ayT \"WorkOrderItemLaborServiceRateID\"}}{{ayT \"ListPrice\"}}Actual Start minus Stop{{ayT \"WorkOrderItemLaborNoChargeQuantity\"}}{{ayT \"WorkOrderItemLaborServiceRateQuantity\"}}{{ayT \"NetPrice\"}}
{{ayT 'WorkOrderItemLaborList'}} for {{group}}# of labor items: {{count}}
 {{Serial}}{{ayDateTime ServiceStartDate}} to {{ayDateTime ServiceStopDate}}{{ServiceRateViz}}{{ayCurrency PriceViz}} {{UnitOfMeasureViz}}{{ayDecimal diffHours}}{{NoChargeQuantity}}{{ServiceRateQuantity}}{{ayCurrency NetViz}}
 
Total {{ayT \"WorkOrderItemLaborServiceRateQuantity\"}} + {{ayT \"WorkOrderItemLaborNoChargeQuantity\" }} = {{EachGroupWOLaborsNCQtyplusBillableQty}} for {{group}}{{ayDecimal EachGroupWOActualHoursQty}}{{EachGroupWOLaborsNCQty}}{{EachGroupWOLaborsBillableQty}}{{ayCurrency EachGroupWOLaborsNetViz}}
 
\n\n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n
 Total {{ayT 'WorkOrderItemLaborList'}} recordsTotal Combined {{ayT \"WorkOrderItemLaborServiceRateQuantity\"}} & {{ayT \"WorkOrderItemLaborServiceRateQuantity\"}}Total {{ayT \"WorkOrderItemLaborNoChargeQuantity\"}}Total {{ayT \"WorkOrderItemLaborServiceRateQuantity\"}}Total {{ayT \"NetPrice\"}}
 {{AllWOLaborsCount}}{{AllWOLaborsNCQtyplusBillableQty}}{{AllWOLaborsNCQty}}{{AllWOLaborsBillableQty}}{{ayCurrency AllWOLaborsNetViz}}
\n
\n\n\n","Style":".singlePage\r\n{\r\npage-break-after: always;\r\n\r\n}\r\nbody {\r\n font-family: 'Helvetica', 'Helvetica Neue', Arial, sans-serif; \r\n}\r\n\r\n.reporttitle { \r\n margin-bottom: 20pt; \r\n font-weight: bold; \r\n font-size: 14pt; \r\n color: #9e9e9e;\r\n text-align: left;\r\n} \r\n\r\ntable { \r\n border-collapse: collapse;\r\n white-space: pre-wrap;\r\n width: 100%; \r\n table-layout: fixed;\r\n }\r\n\r\nth {\r\n height: 30px;\r\n font-size: 10pt; \r\n color: #9e9e9e;\r\n}\r\n\r\ntfoot th{\r\n border-top: solid 1pt #9e9e9e;\r\n height: 50px;\r\n text-align: center;\r\n}\r\n\r\ntbody td {\r\n padding: 10px;\r\n word-wrap: break-word;\r\n font-size: 9pt;\r\n text-align: center;\r\n}\r\n\r\ntbody tr:nth-child(even) {\r\n background-color: #f8f8f8; /* MUST checkmark Print background in PDF Options for this to show */\r\n}\r\n\r\ntfoot td{\r\n font-size: 10pt;\r\n text-align: center;\r\n }\r\n\r\n.rightlean {\r\n text-align: right;\r\n}\r\n.leftlean {\r\n text-align: left;\r\n}\r\n.centerlean {\r\n text-align: center;\r\n}\r\n\r\n\r\n.fontgreen {\r\n color: green;\r\n}\r\n.fontblue {\r\n color: blue;\r\n}\r\n.fontred {\r\n color:red;\r\n font-weight: bold;\r\n}\r\n.fontpurple {\r\n color: purple;\r\n}\r\n","JsPrerender":"async function ayPrepareData(reportData) {\n\nawait ayGetTranslations([\"Total\", \"WorkOrder\", \"WorkOrderList\", \"WorkOrderItemLaborList\", \"WorkOrderItemLaborUserID\", \"WorkOrderItemLaborServiceRateID\", \"ListPrice\", \"WorkOrderItemLaborServiceRateQuantity\", \"WorkOrderItemLaborServiceDetails\", \"WorkOrderItemLaborNoChargeQuantity\", \"WorkOrderItemLaborServiceStartDate\", \"WorkOrderItemLaborServiceStopDate\", \"NetPrice\"]);\n\n\n\t//below is the code to group by the technician - the UserViz\n\tlet ret = [];\n //iterate workorders -> items -> workorder item labors\n reportData.ayReportData.forEach(workorder => {\n workorder.Items.forEach(workorderitem => {\n workorderitem.Labors.forEach(labor => {\n //new shape of data required for report\n let record = {\n Serial: workorder.Serial,\n ServiceRateViz: labor.ServiceRateViz,\n PriceViz: labor.PriceViz,\n UnitOfMeasureViz: labor.UnitOfMeasureViz,\n ServiceStartDate: labor.ServiceStartDate,\n ServiceStopDate: labor.ServiceStopDate,\n NoChargeQuantity: labor.NoChargeQuantity,\n ServiceRateQuantity: labor.ServiceRateQuantity,\n\t\t\t\t\tServiceDetails: labor.ServiceDetails,\n NetViz: labor.NetViz\n };\n\n //Find or create group and insert this record \n let groupObject = ret.find(z => z.group == labor.UserViz);\n if (groupObject != undefined) {\n //there is already a matching group in the return array so just push this record into it\n groupObject.items.push(record);\n //update the count for this group's items\n groupObject.count++;\n } else {\n //No group yet, so start a new one in the ret array and push this record into it\n ret.push({ group: labor.UserViz, items: [record], count: 1 });\n }\n\n })\n })\n });\n\n //replace the ayReportData with our new shaped format of data\n reportData.ayReportData = ret;\n\n \n//below to get running totals of THE DATA returned above\n\n\t//below declares variables for running total for ALL\n\treportData.AllWOLaborsNCQty = 0; \n\treportData.AllWOLaborsBillableQty = 0;\n\treportData.AllWOLaborsNCQtyplusBillableQty = 0; \n\treportData.AllWOLaborsNetViz = 0;\n\t\n\treportData.AllWOLaborsCount = 0;\n\n \t\t\n\n\t\t\t\tfor (const EachGroup of reportData.ayReportData) \n\t\t\t\t{\n\t\t\t\t//below declares a key on the entire grouping to hold running totals for each labor record for each Item for EachWO for each \"items\" \n\t\t\t\tEachGroup.EachGroupWOLaborsNCQty = 0;\n\t\t\t\tEachGroup.EachGroupWOLaborsBillableQty = 0;\n\t\t\t\tEachGroup.EachGroupWOLaborsNCQtyplusBillableQty = 0;\n\t\t\t\tEachGroup.EachGroupWOLaborsNetViz = 0;\n\t\t\t\tEachGroup.EachGroupWOActualHoursQty = 0;\n\t\t\t\t\n\t\t\t\t\n\t\t\t\t\t\t for (const groupitem of EachGroup.items) \n\t\t\t\t\t\t \t{\n\t\t\t\t\t\t\t\t\t\treportData.AllWOLaborsCount += 1;\t\t\t\t\t\t\t\t\t\t\n\t\t\t\t\t\t\t\t\t\t\n\t\t\t\t\t\t\t\t\t\tif (groupitem.ServiceStartDate != null && groupitem.ServiceStopDate != null) \n\t\t\t\t\t\t\t\t\t\t{\n\n\t\t\t\t\t\t\t\t\t\t\tvar dateTime1 = new Date (groupitem.ServiceStopDate);\n\t\t\t\t\t\t\t\t\t\t\tvar dateTime2 = new Date (groupitem.ServiceStartDate);\n\t\t\t\t\t\t\t\t\t\t\t\n\t\t\t\t\t\t\t\t\t\t\tvar diffMillis = (dateTime1.getTime() - dateTime2.getTime()); \n\t\t\t\t\t\t\t\t\t\t\tgroupitem.diffHours = ((diffMillis/3600) / 1000)\n\n\t\t\t\t\t\t\t\t\t\t\tEachGroup.EachGroupWOActualHoursQty += groupitem.diffHours;\n\t\t\t\t\t\t\t\t\t\t\n\t\t\t\t\t\t\t\t\t\t\t\n\t\t\t\t\t\t\t\t\t\t}\n\n\t\t\t\t\t\t\t\t\t\tif (groupitem.NoChargeQuantity != null) \n\t\t\t\t\t\t\t\t\t\t\t\t{\n\t\t\t\t\t\t\t\t\t\t\t\t\tEachGroup.EachGroupWOLaborsNCQty += groupitem.NoChargeQuantity;\t\n\t\t\t\t\t\t\t\t\t\t\t\t\tEachGroup.EachGroupWOLaborsNCQtyplusBillableQty += groupitem.NoChargeQuantity;\t\n\t\t\t\t\t\t\t\t\t\t\t\t\treportData.AllWOLaborsNCQty\t+= groupitem.NoChargeQuantity;\t\t\t\t\t\t\t\t\t\t\n\t\t\t\t\t\t\t\t\t\t\t\t\treportData.AllWOLaborsNCQtyplusBillableQty += groupitem.NoChargeQuantity;\n\t\t\t\t\t\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\t\t\t\tif (groupitem.ServiceRateQuantity != null) \n\t\t\t\t\t\t\t\t\t\t\t\t{\n\t\t\t\t\t\t\t\t\t\t\t\t\tEachGroup.EachGroupWOLaborsBillableQty += groupitem.ServiceRateQuantity; \n\t\t\t\t\t\t\t\t\t\t\t\t\tEachGroup.EachGroupWOLaborsNCQtyplusBillableQty += groupitem.ServiceRateQuantity;\n\t\t\t\t\t\t\t\t\t\t\t\t\treportData.AllWOLaborsBillableQty += groupitem.ServiceRateQuantity; \n\t\t\t\t\t\t\t\t\t\t\t\t\treportData.AllWOLaborsNCQtyplusBillableQty += groupitem.ServiceRateQuantity; \n\t\t\t\t\t\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\t\t\t\tif (groupitem.NetViz != null) \n\t\t\t\t\t\t\t\t\t\t\t\t{\n\t\t\t\t\t\t\t\t\t\t\t\t\tEachGroup.EachGroupWOLaborsNetViz += groupitem.NetViz;\n\t\t\t\t\t\t\t\t\t\t\t\t\t\n\t\t\t\t\t\t\t\t\t\t\t\t\treportData.AllWOLaborsNetViz += groupitem.NetViz; //this is the actual adding to running total for all\n\t\t\t\t\t\t\t\t\t\t\t\t}\t\t\t\t\t\t\t\t\n\t\t\t\t\t\t \t\t\n\t\t\t\t\t\t \t}\n\t\t\t\t}\n\t\t\t\n\n\t//return the data into the pipeline to send to the report template \n\treturn reportData;\n}\n\n\n\n","JsHelpers":"","RenderType":0,"HeaderTemplate":"","FooterTemplate":"    Printed date:    \nPage  of         ","DisplayHeaderFooter":true,"PaperFormat":10,"Landscape":true,"MarginOptionsBottom":"20mm","MarginOptionsLeft":"20mm","MarginOptionsRight":"15mm","MarginOptionsTop":"15mm","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/Nets Taxes LineTotals for each Quote Labor.ayrt b/server/AyaNova/resource/rpt/stock-report-templates/Nets Taxes LineTotals for each Quote Labor.ayrt index c85aa3f5..e8368391 100644 --- a/server/AyaNova/resource/rpt/stock-report-templates/Nets Taxes LineTotals for each Quote Labor.ayrt +++ b/server/AyaNova/resource/rpt/stock-report-templates/Nets Taxes LineTotals for each Quote Labor.ayrt @@ -1 +1 @@ -{"Name":"Nets Taxes LineTotals for each Quote Labor","Active":true,"Notes":"","Roles":50538,"AType":24,"IncludeWoItemDescendants":false,"Template":"\n\n\n
\n
\n

{{ayT 'Quote'}} {{ayT 'WorkOrderItemLaborList'}} Nets Taxes LineTotals and Grand Totals

\n
\n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n {{#each ayReportData}}\n {{#each Items}}\n {{#each Labors}}\n \n \n \n \n \n \n \n \n \n \n \n \n {{/each}}\n {{/each}}\n {{/each}}\n \n
{{ayT 'Quote'}}{{ayT 'Customer'}}{{ayT 'QuoteQuoteRequestDate'}}{{ayT 'WorkOrderItemLaborServiceRateID'}}{{ayT 'WorkOrderItemLaborRateCharge'}}{{ayT 'WorkOrderItemLaborServiceRateQuantity'}}{{ayT 'NetPrice'}}{{ayT 'TaxCodeTaxA'}}{{ayT 'TaxCodeTaxB'}}{{ayT 'Total'}}
{{../../Serial}}{{../../CustomerViz}}{{ayDate ../../Requested}}{{ServiceRateViz}}{{ayCurrency PriceViz}}{{ServiceRateQuantity}}{{ayCurrency NetViz}}{{ayCurrency TaxAViz}}{{ayCurrency TaxBViz}}{{ayCurrency LineTotalViz}}
\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
Totals for all {{ayT 'WorkOrderItemLaborList'}} in this report {{ayT 'NetPrice'}}{{ayT 'TaxCodeTaxA'}}{{ayT 'TaxCodeTaxB'}}{{ayT 'Total'}}
{{ayCurrency AllWOLaborsNetViz}}{{ayCurrency AllWOLaborsTaxAs}}{{ayCurrency AllWOLaborsTaxBs}}{{ayCurrency AllWOLaborsTotalGrand}}
\n
\n\n\n","Style":"\ntfoot {\n border-top: 2px solid #9e9e9e;\n font-size: 7pt;\n text-align: center;\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 color: #9e9e9e;\n} \n\ntable { \n border-collapse: collapse;\n white-space: pre-wrap;\n width: 100%;\n table-layout: fixed; \n }\n\nth {\n height: 30px;\n font-size: 9pt; \n color: #9e9e9e;\n}\n\ntbody td {\n padding: 10px;\n word-wrap: break-word;\n font-size: 7pt;\n}\n\n\ntbody tr:nth-child(even) {\n background-color: #f8f8f8; /* MUST checkmark Print background in PDF Options for this to show */\n}\n\n\n.rightlean {\n text-align: right;\n}\n.leftlean {\n text-align: left;\n}\n.centerlean {\n text-align: center;\n}\n\n\n.fontgreen {\n color: green;\n}\n.fontblue {\n color: blue;\n}\n.fontred {\n color:red;\n}\n\n","JsPrerender":"async function ayPrepareData(reportData) {\n\t//this function (if present) is called with the report data \n\t//before the report is rendered\n\t//modify data as required here and return it to change the data before the report renders\n\t//see the help documentation for details\n\n\tawait ayGetTranslations([\"Quote\", \"Customer\", \"QuoteQuoteRequestDate\", \"NetPrice\", \"WorkOrderItemLaborList\", \"WorkOrderItemLaborServiceRateID\", \"WorkOrderItemLaborServiceRateQuantity\", \"WorkOrderItemLaborRateCharge\", \"TaxCodeTaxA\", \"TaxCodeTaxB\", \"Total\"]);\n\n\n\t//********************//NOTE if you customize this report template and do NOT need a function or key identified below, remove to increase report performance\n\n\n\t//below declares keys to hold for all labors so it exists\n\treportData.AllWOLaborsNetViz = 0;\n\treportData.AllWOLaborsTaxAs = 0;\n\treportData.AllWOLaborsTaxBs = 0;\n\treportData.AllWOLaborsTotalGrand = 0;\n\n\n\n\tfor (const EachWO of reportData.ayReportData) {\n\n\t\t//below is to Iterate through each item of the wo's Items\n\t\tfor (const Item of EachWO.Items) {\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\t//make sure it has a value before attempting to add it to the running total\n\t\t\t\tif (Labor.NetViz != null) {\n\t\t\t\t\treportData.AllWOLaborsNetViz += Labor.NetViz; //this IS where the actual adding to running total for this WOItem's Net labor\n\t\t\t\t\treportData.AllWOLaborsTaxAs += Labor.TaxAViz;\n\t\t\t\t\treportData.AllWOLaborsTaxBs += Labor.TaxBViz;\n\t\t\t\t\treportData.AllWOLaborsTotalGrand += Labor.LineTotalViz;\n\n\t\t\t\t}\n\t\t\t}\n\t\t}\n\t}\n\n\n\treturn reportData;\n}","JsHelpers":"","RenderType":0,"HeaderTemplate":"  ","FooterTemplate":"                Printed date: PDFDate\nPage of                ","DisplayHeaderFooter":true,"PaperFormat":10,"Landscape":true,"MarginOptionsBottom":"15mm","MarginOptionsLeft":"15mm","MarginOptionsRight":"15mm","MarginOptionsTop":"10mm","PageRanges":null,"PreferCSSPageSize":false,"PrintBackground":true,"Scale":1.00000} \ No newline at end of file +{"Name":"Nets Taxes LineTotals for each Quote Labor","Active":true,"Notes":"","Roles":50538,"AType":24,"IncludeWoItemDescendants":false,"Template":"\n\n\n
\n
\n

{{ayT 'Quote'}} {{ayT 'WorkOrderItemLaborList'}} Nets Taxes LineTotals and Grand Totals

\n
\n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n {{#each ayReportData}}\n {{#each Items}}\n {{#each Labors}}\n \n \n \n \n \n \n \n \n \n \n \n \n {{/each}}\n {{/each}}\n {{/each}}\n \n
{{ayT 'Quote'}}{{ayT 'Customer'}}{{ayT 'QuoteQuoteRequestDate'}}{{ayT 'WorkOrderItemLaborServiceRateID'}}{{ayT 'ListPrice'}}{{ayT 'WorkOrderItemLaborServiceRateQuantity'}}{{ayT 'NetPrice'}}{{ayT 'TaxCodeTaxA'}}{{ayT 'TaxCodeTaxB'}}{{ayT 'Total'}}
{{../../Serial}}{{../../CustomerViz}}{{ayDate ../../Requested}}{{ServiceRateViz}}{{ayCurrency PriceViz}}{{ServiceRateQuantity}}{{ayCurrency NetViz}}{{ayCurrency TaxAViz}}{{ayCurrency TaxBViz}}{{ayCurrency LineTotalViz}}
\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
Totals for all {{ayT 'WorkOrderItemLaborList'}} in this report {{ayT 'NetPrice'}}{{ayT 'TaxCodeTaxA'}}{{ayT 'TaxCodeTaxB'}}{{ayT 'Total'}}
{{ayCurrency AllWOLaborsNetViz}}{{ayCurrency AllWOLaborsTaxAs}}{{ayCurrency AllWOLaborsTaxBs}}{{ayCurrency AllWOLaborsTotalGrand}}
\n
\n\n\n","Style":"\ntfoot {\n border-top: 2px solid #9e9e9e;\n font-size: 7pt;\n text-align: center;\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 color: #9e9e9e;\n} \n\ntable { \n border-collapse: collapse;\n white-space: pre-wrap;\n width: 100%;\n table-layout: fixed; \n }\n\nth {\n height: 30px;\n font-size: 9pt; \n color: #9e9e9e;\n}\n\ntbody td {\n padding: 10px;\n word-wrap: break-word;\n font-size: 7pt;\n}\n\n\ntbody tr:nth-child(even) {\n background-color: #f8f8f8; /* MUST checkmark Print background in PDF Options for this to show */\n}\n\n\n.rightlean {\n text-align: right;\n}\n.leftlean {\n text-align: left;\n}\n.centerlean {\n text-align: center;\n}\n\n\n.fontgreen {\n color: green;\n}\n.fontblue {\n color: blue;\n}\n.fontred {\n color:red;\n}\n\n","JsPrerender":"async function ayPrepareData(reportData) {\n\t//this function (if present) is called with the report data \n\t//before the report is rendered\n\t//modify data as required here and return it to change the data before the report renders\n\t//see the help documentation for details\n\n\tawait ayGetTranslations([\"Quote\", \"Customer\", \"QuoteQuoteRequestDate\", \"NetPrice\", \"WorkOrderItemLaborList\", \"WorkOrderItemLaborServiceRateID\", \"WorkOrderItemLaborServiceRateQuantity\", \"ListPrice\", \"TaxCodeTaxA\", \"TaxCodeTaxB\", \"Total\"]);\n\n\n\t//********************//NOTE if you customize this report template and do NOT need a function or key identified below, remove to increase report performance\n\n\n\t//below declares keys to hold for all labors so it exists\n\treportData.AllWOLaborsNetViz = 0;\n\treportData.AllWOLaborsTaxAs = 0;\n\treportData.AllWOLaborsTaxBs = 0;\n\treportData.AllWOLaborsTotalGrand = 0;\n\n\n\n\tfor (const EachWO of reportData.ayReportData) {\n\n\t\t//below is to Iterate through each item of the wo's Items\n\t\tfor (const Item of EachWO.Items) {\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\t//make sure it has a value before attempting to add it to the running total\n\t\t\t\tif (Labor.NetViz != null) {\n\t\t\t\t\treportData.AllWOLaborsNetViz += Labor.NetViz; //this IS where the actual adding to running total for this WOItem's Net labor\n\t\t\t\t\treportData.AllWOLaborsTaxAs += Labor.TaxAViz;\n\t\t\t\t\treportData.AllWOLaborsTaxBs += Labor.TaxBViz;\n\t\t\t\t\treportData.AllWOLaborsTotalGrand += Labor.LineTotalViz;\n\n\t\t\t\t}\n\t\t\t}\n\t\t}\n\t}\n\n\n\treturn reportData;\n}","JsHelpers":"","RenderType":0,"HeaderTemplate":"  ","FooterTemplate":"                Printed date: PDFDate\nPage of                ","DisplayHeaderFooter":true,"PaperFormat":10,"Landscape":true,"MarginOptionsBottom":"15mm","MarginOptionsLeft":"15mm","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/Parts & Labor Profit _ Loss.ayrt b/server/AyaNova/resource/rpt/stock-report-templates/Parts & Labor Profit _ Loss.ayrt index e54408d5..56a9ca78 100644 --- a/server/AyaNova/resource/rpt/stock-report-templates/Parts & Labor Profit _ Loss.ayrt +++ b/server/AyaNova/resource/rpt/stock-report-templates/Parts & Labor Profit _ Loss.ayrt @@ -1 +1 @@ -{"Name":"Parts & Labor Profit / Loss","Active":true,"Notes":"Custom Prepare running totals and derived WO profit/loss ","Roles":49258,"AType":34,"IncludeWoItemDescendants":false,"Template":"\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 ayReportData}}\n \n \n \n \n \n {{#if ThisWOAllLaborsNetViz }} {{else}}{{/if}}\n {{#if ThisWOAllLaborsCost }} {{else}}{{/if}}\n {{#if ThisWOAllLaborsLoss }} {{else}}{{/if}}\n \n {{#if ThisWOAllPartsNetViz }} {{else}}{{/if}}\n {{#if ThisWOAllPartsCost }} {{else}}{{/if}}\n {{#if ThisWOAllPartsLoss }} {{else}}{{/if}}\n {{#if ThisWOTotalLoss }} {{else}} {{/if}}\n \n {{/each}}\n \n\n
Parts & Labor Profit / Loss
 
{{ayT 'WorkOrder'}}{{ayT 'Customer'}}{{ayT 'WorkOrderServiceDate'}} {{ayT 'WorkOrderItemLabors'}} {{ayT 'NetPrice'}}{{ayT 'WorkOrderItemLabors'}} Cost{{ayT 'WorkOrderItemLabors'}} Profit / Loss {{ayT 'WorkOrderItemParts'}} {{ayT 'NetPrice'}}{{ayT 'WorkOrderItemParts'}} Cost{{ayT 'WorkOrderItemParts'}} Profit / Loss+ / -
{{Serial}}{{CustomerViz}}{{ayDate ServiceDate}} {{ayCurrency ThisWOAllLaborsNetViz}}no billable labor{{ayCurrency ThisWOAllLaborsCost}}no labor costs({{ayCurrency ThisWOAllLaborsLoss}}){{ayCurrency ThisWOAllLaborsProfit}} {{ayCurrency ThisWOAllPartsNetViz}}no billable parts{{ayCurrency ThisWOAllPartsCost}}no parts costs({{ayCurrency ThisWOAllPartsLoss}}){{ayCurrency ThisWOAllPartsProfit}}({{ayCurrency ThisWOTotalLoss}}){{ayCurrency ThisWOTotalProfit}}
\n\n \n \n \n \n \n \n \n \n \n {{#if AllWOLaborsNetViz}} {{else}} {{/if}}\n {{#if AllWOLaborsCost}} {{else}} {{/if}}\n {{#if AllWOLaborsLoss}} {{else}} {{/if}}\n \n {{#if AllWOPartsNetViz}} {{else}} {{/if}}\n {{#if AllWOPartsCost}} {{else}} {{/if}}\n {{#if AllWOPartsLoss}} {{else}} {{/if}}\n {{#if AllWOTotalLoss}} {{else}} {{/if}}\n \n \n
 
Totals for all listed {{ayT 'WorkOrderList'}}{{ ayCurrency AllWOLaborsNetViz}}no billable labor{{ ayCurrency AllWOLaborsCost}}no labor costs({{ ayCurrency AllWOLaborsLoss}}) {{ ayCurrency AllWOLaborsProfit }} {{ ayCurrency AllWOPartsNetViz}}no billable parts{{ ayCurrency AllWOPartsCost}}no parts cost({{ ayCurrency AllWOPartsLoss}}) {{ ayCurrency AllWOPartsProfit }}({{ ayCurrency AllWOTotalLoss}}){{ ayCurrency AllWOTotalProfit}}
\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: 14pt; \n color: #9e9e9e;\n text-align: left;\n} \n\ntable { \n border-collapse: collapse;\n white-space: pre-wrap;\n width: 100%; \n table-layout: fixed; \n }\n\nth {\n height: 30px;\n font-size: 10pt; \n color: #9e9e9e;\n}\n\ntfoot th{\n border-top: solid 1pt #9e9e9e;\n height: 50px;\n text-align: center;\n}\n\ntbody td {\n padding: 10px;\n word-wrap: break-word;\n font-size: 9pt;\n text-align: center;\n}\n\ntbody tr:nth-child(even) {\n background-color: #f8f8f8; /* MUST checkmark Print background in PDF Options for this to show */\n}\n\ntfoot {\n font-size: 9pt;\n }\n\n.rightlean {\n text-align: right;\n}\n.leftlean {\n text-align: left;\n}\n.centerlean {\n text-align: center;\n}\n\n\n.fontgreen {\n color: green;\n}\n.fontblue {\n color: blue;\n}\n.fontred {\n color:red;\n font-weight: bold;\n}\n.fontpurple {\n color: purple;\n}\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([\"WorkOrderItemParts\", \"WorkOrderItemLabors\", \"Customer\", \"WorkOrderServiceDate\", \"WorkOrder\", \"WorkOrderList\", \"Total\", \"TaxCodeTaxA\", \"TaxCodeTaxB\", \"NetPrice\" ]);\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//below declares a key on the entire wo to hold all Labor nets, costs, profit/loss (nets - costs),from all workorders so it exists and a key to hold all Labor Net Costs\nreportData.AllWOLaborsNetViz = 0;\nreportData.AllWOLaborsCost = 0;\nreportData.AllWOLaborsProfit = 0;\nreportData.AllWOLaborsLoss = 0;\n\n\n//below declares a key on the entire wo to hold all Part Net, costs, profit/loss (nets - costs), from all workorders so it exists and a key to hold all Part Net Costs\nreportData.AllWOPartsNetViz = 0;\nreportData.AllWOPartsCost = 0;\nreportData.AllWOPartsProfit = 0;\nreportData.AllWOPartsLoss = 0;\n\n\n//below declares a key to hold all Nets, hold all Costs, profit/loss (nets - costs), from all workorders in this list so it exists\nreportData.AllWOTotalNets = 0;\nreportData.AllWOTotalCost = 0;\nreportData.AllWOTotalProfit = 0;\nreportData.AllWOTotalLoss = 0;\n\n\n\n\n\n\nfor (const EachWO of reportData.ayReportData) \n\t{\n\t//below declares a key on the entire wo to hold all Labor nets, costs, profit/loss (nets - costs) from all Items in this wo so it exists\n\tEachWO.ThisWOAllLaborsNetViz = 0;\n\tEachWO.ThisWOAllLaborsCost = 0;\n\tEachWO.ThisWOAllLaborsProfit = 0;\n\tEachWO.ThisWOAllLaborsLoss = 0;\n\n\t//below declares a key on the entire wo to hold all Part Net, costs, profit/loss (nets - costs), from all Items in this wo so it exists\n\tEachWO.ThisWOAllPartsNetViz = 0;\n\tEachWO.ThisWOAllPartsCost = 0;\n\tEachWO.ThisWOAllPartsProfit = 0; \n\tEachWO.ThisWOAllPartsLoss = 0; \n\t\n\n\t//below declares a key on the entire wo to hold ALL of THIS workorder's Nets , costs, profit/loss (nets - costs) so it exists\n\tEachWO.ThisWOTotalNets = 0;\n\tEachWO.ThisWOTotalCost = 0;\n\tEachWO.ThisWOTotalProfit = 0;\n\tEachWO.ThisWOTotalLoss = 0;\n\t\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\tItem.ThisItemAllLaborsCost = 0; //declare a key on the Item to hold all of this item's labor costs and set it initially to 0\n\t\t\tItem.ThisItemAllLaborsProfit = 0; //declare a key on the Item to hold all of this item's labor profit/loss (nets - costs) 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\treportData.AllWOLaborsNetViz += Labor.NetViz;\t//this IS where the actual adding to the running total for all labor for ALL workorders in this report data\t\t\t\n\t\t\t\t\t\treportData.AllWOTotalNets += Labor.NetViz; //this is where the actual adding to the running total for ALL workorders Nets in this report data\t\n\n\t\t\t\t\t\tLabor.NetCost = (Labor.CostViz * Labor.ServiceRateQuantity);\n\t\t\t\t\t\tItem.ThisItemAllLaborsCost += Labor.NetCost; //this IS where the actual adding to running total for this WOItem's Labors Cost\n\t\t\t\t\t\tEachWO.ThisWOAllLaborsCost += Labor.NetCost; //this IS where the actual adding to the running total for this entire WO's Labors costs\n\t\t\t\t\t\tEachWO.ThisWOTotalCost += Labor.NetCost; //this IS where the actual adding to the running total for ALL costs for THIS workorders in this report data\n\t\t\t\t\t\treportData.AllWOLaborsCost += Labor.NetCost;\t//this IS where the actual adding to the running total for all labor costs for ALL workorders in this report data\t\t\t\n\t\t\t\t\t\treportData.AllWOTotalCost += Labor.NetCost; //this is where the actual adding to the running total for ALL workorders costs in this report data\n\n\t\t\t\t\t\tif (Labor.NetCost != null) \n\t\t\t\t\t\t{\n\n\t\t\t\t\t\tLabor.NetProfit = (Labor.NetViz - Labor.NetCost)\n\t\t\t\t\t\tItem.ThisItemAllLaborsProfit += Labor.NetProfit; //this NOT USED \n\t\t\t\t\t\tEachWO.ThisWOAllLaborsProfit += Labor.NetProfit; //this works\n\t\t\t\t\t\tEachWO.ThisWOTotalProfit += Labor.NetProfit; //this works\n\t\t\t\t\t\treportData.AllWOLaborsProfit += Labor.NetProfit; //this works\n\t\t\t\t\t\treportData.AllWOTotalProfit += Labor.NetProfit; //this works\n\t\t\t\t\t\t}\n\n\t\t\t\t\t\t\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\t\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\tItem.ThisItemAllPartsCost = 0; //declare a key on the Item to hold all of this item's parts costs and set it initially to 0 \n\t\t\tItem.ThisItemAllPartsProfit = 0; //declare a key on the Item to hold all of this item's part profit/loss (nets - costs) and set it initially to 0 \n\t\t\t\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\t\t\t\t\t\t\n\t\t\t\t\t\treportData.AllWOPartsNetViz += Part.NetViz; //this IS where the actual adding to the running total for all Parts for all workorders in this report data\t\n\t\t\t\t\t\treportData.AllWOTotalNets += Part.NetViz; //this is where the actual adding to the running total for all workorder Nets in this report data\n\n\t\t\t\t\t\tPart.NetCost = (Part.Cost * Part.Quantity);\t\t\t\t\t\t\n\t\t\t\t\t\tItem.ThisItemAllPartsCost += Part.NetCost;\n\t\t\t\t\t\tEachWO.ThisWOAllPartsCost += Part.NetCost;\n\t\t\t\t\t\tEachWO.ThisWOTotalCost += Part.NetCost;\n\t\t\t\t\t\treportData.AllWOPartsCost += Part.NetCost;\n\t\t\t\t\t\treportData.AllWOTotalCost += Part.NetCost;\n\n\t\t\t\t\t\tif (Part.NetViz != null) \n\t\t\t\t\t\t{\n\t\t\t\t\t\tPart.NetProfit = (Part.NetViz - Part.Cost)\n\t\t\t\t\t\tItem.ThisItemAllPartsProfit += Part.NetProfit; //this NOT USED \n\t\t\t\t\t\tEachWO.ThisWOAllPartsProfit += Part.NetProfit; //this works\n\t\t\t\t\t\tEachWO.ThisWOTotalProfit += Part.NetProfit; //this works\n\t\t\t\t\t\treportData.AllWOPartsProfit += Part.NetProfit; //this works\n\t\t\t\t\t\treportData.AllWOTotalProfit += Part.NetProfit; //this works\n\t\t\t\t\t\t}\n\n\t\t\t\t\t\t\n\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\n\t\t}\n\n\n\t\tif (EachWO.ThisWOAllLaborsProfit <= 0) {\n\t\t\t\tEachWO.ThisWOAllLaborsLoss = EachWO.ThisWOAllLaborsProfit;\n\t\t\t\tEachWO.ThisWOAllLaborsProfit = 0;\n\t\t\t}\n\n\t\tif (EachWO.ThisWOAllPartsProfit <= 0) {\n\t\t\t\tEachWO.ThisWOAllPartsLoss = EachWO.ThisWOAllPartsProfit;\n\t\t\t\tEachWO.ThisWOAllPartsProfit = 0;\n\t\t\t}\n\n\t\tif (EachWO.ThisWOTotalProfit <= 0) {\n\t\t\t\tEachWO.ThisWOTotalLoss = EachWO.ThisWOTotalProfit;\n\t\t\t\tEachWO.ThisWOTotalProfit = 0;\n\t\t\t}\n\n\t}\n\n\nif (reportData.AllWOLaborsProfit <= 0) {\n\t\treportData.AllWOLaborsLoss = reportData.AllWOLaborsProfit;\n\t\treportData.AllWOLaborsProfit = 0;\n\t}\n\nif (reportData.AllWOPartsProfit <= 0) {\n\t\treportData.AllWOPartsProfit = reportData.AllWOPartsProfit;\n\t\treportData.AllWOPartsProfit = 0;\n\t}\n\nif (reportData.AllWOTotalProfit <= 0) {\n\t\treportData.AllWOTotalLoss = reportData.AllWOTotalProfit;\n\t\treportData.AllWOTotalProfit = 0;\n\t}\t\n\n return reportData;\n}","JsHelpers":"","RenderType":0,"HeaderTemplate":"  ","FooterTemplate":"                Printed date: PDFDate\nPage of                ","DisplayHeaderFooter":true,"PaperFormat":10,"Landscape":true,"MarginOptionsBottom":"15mm","MarginOptionsLeft":"20mm","MarginOptionsRight":"20mm","MarginOptionsTop":"10mm","PageRanges":null,"PreferCSSPageSize":false,"PrintBackground":true,"Scale":1.00000} \ No newline at end of file +{"Name":"Parts & Labor Profit / Loss","Active":true,"Notes":"Custom Prepare running totals and derived WO profit/loss ","Roles":49258,"AType":34,"IncludeWoItemDescendants":false,"Template":"\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 ayReportData}}\n \n \n \n \n \n {{#if ThisWOAllLaborsNetViz }} {{else}}{{/if}}\n {{#if ThisWOAllLaborsCost }} {{else}}{{/if}}\n {{#if ThisWOAllLaborsLoss }} {{else}}{{/if}}\n \n {{#if ThisWOAllPartsNetViz }} {{else}}{{/if}}\n {{#if ThisWOAllPartsCost }} {{else}}{{/if}}\n {{#if ThisWOAllPartsLoss }} {{else}}{{/if}}\n {{#if ThisWOTotalLoss }} {{else}} {{/if}}\n \n {{/each}}\n \n\n
Parts & Labor Profit / Loss
 
{{ayT 'WorkOrder'}}{{ayT 'Customer'}}{{ayT 'WorkOrderServiceDate'}} {{ayT 'WorkOrderItemLaborList'}} {{ayT 'NetPrice'}}{{ayT 'WorkOrderItemLaborList'}} Cost{{ayT 'WorkOrderItemLaborList'}} Profit / Loss {{ayT 'WorkOrderItemParts'}} {{ayT 'NetPrice'}}{{ayT 'WorkOrderItemParts'}} Cost{{ayT 'WorkOrderItemParts'}} Profit / Loss+ / -
{{Serial}}{{CustomerViz}}{{ayDate ServiceDate}} {{ayCurrency ThisWOAllLaborsNetViz}}no billable labor{{ayCurrency ThisWOAllLaborsCost}}no labor costs({{ayCurrency ThisWOAllLaborsLoss}}){{ayCurrency ThisWOAllLaborsProfit}} {{ayCurrency ThisWOAllPartsNetViz}}no billable parts{{ayCurrency ThisWOAllPartsCost}}no parts costs({{ayCurrency ThisWOAllPartsLoss}}){{ayCurrency ThisWOAllPartsProfit}}({{ayCurrency ThisWOTotalLoss}}){{ayCurrency ThisWOTotalProfit}}
\n\n \n \n \n \n \n \n \n \n \n {{#if AllWOLaborsNetViz}} {{else}} {{/if}}\n {{#if AllWOLaborsCost}} {{else}} {{/if}}\n {{#if AllWOLaborsLoss}} {{else}} {{/if}}\n \n {{#if AllWOPartsNetViz}} {{else}} {{/if}}\n {{#if AllWOPartsCost}} {{else}} {{/if}}\n {{#if AllWOPartsLoss}} {{else}} {{/if}}\n {{#if AllWOTotalLoss}} {{else}} {{/if}}\n \n \n
 
Totals for all listed {{ayT 'WorkOrderList'}}{{ ayCurrency AllWOLaborsNetViz}}no billable labor{{ ayCurrency AllWOLaborsCost}}no labor costs({{ ayCurrency AllWOLaborsLoss}}) {{ ayCurrency AllWOLaborsProfit }} {{ ayCurrency AllWOPartsNetViz}}no billable parts{{ ayCurrency AllWOPartsCost}}no parts cost({{ ayCurrency AllWOPartsLoss}}) {{ ayCurrency AllWOPartsProfit }}({{ ayCurrency AllWOTotalLoss}}){{ ayCurrency AllWOTotalProfit}}
\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: 14pt; \n color: #9e9e9e;\n text-align: left;\n} \n\ntable { \n border-collapse: collapse;\n white-space: pre-wrap;\n width: 100%; \n table-layout: fixed; \n }\n\nth {\n height: 30px;\n font-size: 10pt; \n color: #9e9e9e;\n}\n\ntfoot th{\n border-top: solid 1pt #9e9e9e;\n height: 50px;\n text-align: center;\n}\n\ntbody td {\n padding: 10px;\n word-wrap: break-word;\n font-size: 9pt;\n text-align: center;\n}\n\ntbody tr:nth-child(even) {\n background-color: #f8f8f8; /* MUST checkmark Print background in PDF Options for this to show */\n}\n\ntfoot {\n font-size: 9pt;\n }\n\n.rightlean {\n text-align: right;\n}\n.leftlean {\n text-align: left;\n}\n.centerlean {\n text-align: center;\n}\n\n\n.fontgreen {\n color: green;\n}\n.fontblue {\n color: blue;\n}\n.fontred {\n color:red;\n font-weight: bold;\n}\n.fontpurple {\n color: purple;\n}\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([\"WorkOrderItemParts\", \"WorkOrderItemLaborList\", \"Customer\", \"WorkOrderServiceDate\", \"WorkOrder\", \"WorkOrderList\", \"Total\", \"TaxCodeTaxA\", \"TaxCodeTaxB\", \"NetPrice\" ]);\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//below declares a key on the entire wo to hold all Labor nets, costs, profit/loss (nets - costs),from all workorders so it exists and a key to hold all Labor Net Costs\nreportData.AllWOLaborsNetViz = 0;\nreportData.AllWOLaborsCost = 0;\nreportData.AllWOLaborsProfit = 0;\nreportData.AllWOLaborsLoss = 0;\n\n\n//below declares a key on the entire wo to hold all Part Net, costs, profit/loss (nets - costs), from all workorders so it exists and a key to hold all Part Net Costs\nreportData.AllWOPartsNetViz = 0;\nreportData.AllWOPartsCost = 0;\nreportData.AllWOPartsProfit = 0;\nreportData.AllWOPartsLoss = 0;\n\n\n//below declares a key to hold all Nets, hold all Costs, profit/loss (nets - costs), from all workorders in this list so it exists\nreportData.AllWOTotalNets = 0;\nreportData.AllWOTotalCost = 0;\nreportData.AllWOTotalProfit = 0;\nreportData.AllWOTotalLoss = 0;\n\n\n\n\n\n\nfor (const EachWO of reportData.ayReportData) \n\t{\n\t//below declares a key on the entire wo to hold all Labor nets, costs, profit/loss (nets - costs) from all Items in this wo so it exists\n\tEachWO.ThisWOAllLaborsNetViz = 0;\n\tEachWO.ThisWOAllLaborsCost = 0;\n\tEachWO.ThisWOAllLaborsProfit = 0;\n\tEachWO.ThisWOAllLaborsLoss = 0;\n\n\t//below declares a key on the entire wo to hold all Part Net, costs, profit/loss (nets - costs), from all Items in this wo so it exists\n\tEachWO.ThisWOAllPartsNetViz = 0;\n\tEachWO.ThisWOAllPartsCost = 0;\n\tEachWO.ThisWOAllPartsProfit = 0; \n\tEachWO.ThisWOAllPartsLoss = 0; \n\t\n\n\t//below declares a key on the entire wo to hold ALL of THIS workorder's Nets , costs, profit/loss (nets - costs) so it exists\n\tEachWO.ThisWOTotalNets = 0;\n\tEachWO.ThisWOTotalCost = 0;\n\tEachWO.ThisWOTotalProfit = 0;\n\tEachWO.ThisWOTotalLoss = 0;\n\t\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\tItem.ThisItemAllLaborsCost = 0; //declare a key on the Item to hold all of this item's labor costs and set it initially to 0\n\t\t\tItem.ThisItemAllLaborsProfit = 0; //declare a key on the Item to hold all of this item's labor profit/loss (nets - costs) 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\treportData.AllWOLaborsNetViz += Labor.NetViz;\t//this IS where the actual adding to the running total for all labor for ALL workorders in this report data\t\t\t\n\t\t\t\t\t\treportData.AllWOTotalNets += Labor.NetViz; //this is where the actual adding to the running total for ALL workorders Nets in this report data\t\n\n\t\t\t\t\t\tLabor.NetCost = (Labor.CostViz * Labor.ServiceRateQuantity);\n\t\t\t\t\t\tItem.ThisItemAllLaborsCost += Labor.NetCost; //this IS where the actual adding to running total for this WOItem's Labors Cost\n\t\t\t\t\t\tEachWO.ThisWOAllLaborsCost += Labor.NetCost; //this IS where the actual adding to the running total for this entire WO's Labors costs\n\t\t\t\t\t\tEachWO.ThisWOTotalCost += Labor.NetCost; //this IS where the actual adding to the running total for ALL costs for THIS workorders in this report data\n\t\t\t\t\t\treportData.AllWOLaborsCost += Labor.NetCost;\t//this IS where the actual adding to the running total for all labor costs for ALL workorders in this report data\t\t\t\n\t\t\t\t\t\treportData.AllWOTotalCost += Labor.NetCost; //this is where the actual adding to the running total for ALL workorders costs in this report data\n\n\t\t\t\t\t\tif (Labor.NetCost != null) \n\t\t\t\t\t\t{\n\n\t\t\t\t\t\tLabor.NetProfit = (Labor.NetViz - Labor.NetCost)\n\t\t\t\t\t\tItem.ThisItemAllLaborsProfit += Labor.NetProfit; //this NOT USED \n\t\t\t\t\t\tEachWO.ThisWOAllLaborsProfit += Labor.NetProfit; //this works\n\t\t\t\t\t\tEachWO.ThisWOTotalProfit += Labor.NetProfit; //this works\n\t\t\t\t\t\treportData.AllWOLaborsProfit += Labor.NetProfit; //this works\n\t\t\t\t\t\treportData.AllWOTotalProfit += Labor.NetProfit; //this works\n\t\t\t\t\t\t}\n\n\t\t\t\t\t\t\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\t\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\tItem.ThisItemAllPartsCost = 0; //declare a key on the Item to hold all of this item's parts costs and set it initially to 0 \n\t\t\tItem.ThisItemAllPartsProfit = 0; //declare a key on the Item to hold all of this item's part profit/loss (nets - costs) and set it initially to 0 \n\t\t\t\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\t\t\t\t\t\t\n\t\t\t\t\t\treportData.AllWOPartsNetViz += Part.NetViz; //this IS where the actual adding to the running total for all Parts for all workorders in this report data\t\n\t\t\t\t\t\treportData.AllWOTotalNets += Part.NetViz; //this is where the actual adding to the running total for all workorder Nets in this report data\n\n\t\t\t\t\t\tPart.NetCost = (Part.Cost * Part.Quantity);\t\t\t\t\t\t\n\t\t\t\t\t\tItem.ThisItemAllPartsCost += Part.NetCost;\n\t\t\t\t\t\tEachWO.ThisWOAllPartsCost += Part.NetCost;\n\t\t\t\t\t\tEachWO.ThisWOTotalCost += Part.NetCost;\n\t\t\t\t\t\treportData.AllWOPartsCost += Part.NetCost;\n\t\t\t\t\t\treportData.AllWOTotalCost += Part.NetCost;\n\n\t\t\t\t\t\tif (Part.NetViz != null) \n\t\t\t\t\t\t{\n\t\t\t\t\t\tPart.NetProfit = (Part.NetViz - Part.Cost)\n\t\t\t\t\t\tItem.ThisItemAllPartsProfit += Part.NetProfit; //this NOT USED \n\t\t\t\t\t\tEachWO.ThisWOAllPartsProfit += Part.NetProfit; //this works\n\t\t\t\t\t\tEachWO.ThisWOTotalProfit += Part.NetProfit; //this works\n\t\t\t\t\t\treportData.AllWOPartsProfit += Part.NetProfit; //this works\n\t\t\t\t\t\treportData.AllWOTotalProfit += Part.NetProfit; //this works\n\t\t\t\t\t\t}\n\n\t\t\t\t\t\t\n\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\n\t\t}\n\n\n\t\tif (EachWO.ThisWOAllLaborsProfit <= 0) {\n\t\t\t\tEachWO.ThisWOAllLaborsLoss = EachWO.ThisWOAllLaborsProfit;\n\t\t\t\tEachWO.ThisWOAllLaborsProfit = 0;\n\t\t\t}\n\n\t\tif (EachWO.ThisWOAllPartsProfit <= 0) {\n\t\t\t\tEachWO.ThisWOAllPartsLoss = EachWO.ThisWOAllPartsProfit;\n\t\t\t\tEachWO.ThisWOAllPartsProfit = 0;\n\t\t\t}\n\n\t\tif (EachWO.ThisWOTotalProfit <= 0) {\n\t\t\t\tEachWO.ThisWOTotalLoss = EachWO.ThisWOTotalProfit;\n\t\t\t\tEachWO.ThisWOTotalProfit = 0;\n\t\t\t}\n\n\t}\n\n\nif (reportData.AllWOLaborsProfit <= 0) {\n\t\treportData.AllWOLaborsLoss = reportData.AllWOLaborsProfit;\n\t\treportData.AllWOLaborsProfit = 0;\n\t}\n\nif (reportData.AllWOPartsProfit <= 0) {\n\t\treportData.AllWOPartsProfit = reportData.AllWOPartsProfit;\n\t\treportData.AllWOPartsProfit = 0;\n\t}\n\nif (reportData.AllWOTotalProfit <= 0) {\n\t\treportData.AllWOTotalLoss = reportData.AllWOTotalProfit;\n\t\treportData.AllWOTotalProfit = 0;\n\t}\t\n\n return reportData;\n}","JsHelpers":"","RenderType":0,"HeaderTemplate":"  ","FooterTemplate":"                Printed date: PDFDate\nPage of                ","DisplayHeaderFooter":true,"PaperFormat":10,"Landscape":true,"MarginOptionsBottom":"15mm","MarginOptionsLeft":"20mm","MarginOptionsRight":"20mm","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/Quote Internal Use Costs and Charges.ayrt b/server/AyaNova/resource/rpt/stock-report-templates/Quote Internal Use Costs and Charges.ayrt index 12c289aa..ded2d708 100644 --- a/server/AyaNova/resource/rpt/stock-report-templates/Quote Internal Use Costs and Charges.ayrt +++ b/server/AyaNova/resource/rpt/stock-report-templates/Quote Internal Use Costs and Charges.ayrt @@ -1 +1 @@ -{"Name":"Quote Internal Use Costs and Charges","Active":true,"Notes":"\n","Roles":49258,"AType":27,"IncludeWoItemDescendants":false,"Template":"\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 \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 {{#each Units}}\n \n \n \n \n \n {{/each}}\n {{#if Units}}\n \n \n \n {{/if}}\n\n \n \n \n \n \n \n \n \n \n \n \n \n \n\n\n\n {{#each Labors}}\n \n \n \n \n\n \n {{#if_eq ListPriceViz PriceViz }} \n {{else}}{{/if_eq}}\n {{#if_eq ListPriceViz PriceViz }} \n {{else}}{{/if_eq}}\n \n \n {{#if_eq ListPriceViz PriceViz }}\n {{else}}{{/if_eq}}\n {{#if_eq ListPriceViz PriceViz }}\n {{else}}{{/if_eq}}\n\n \n \n {{/each}}\n {{#if Labors}}\n \n \n \n {{/if}}\n\n {{#each Parts}}\n \n \n \n \n \n {{#if_eq ListPrice PriceViz }} \n {{else}}{{/if_eq}}\n {{#if_eq ListPrice PriceViz }} \n {{else}}{{/if_eq}}\n \n \n {{#if_eq ListPrice PriceViz }}\n {{else}}{{/if_eq}}\n {{#if_eq ListPrice PriceViz }}\n {{else}}{{/if_eq}}\n \n \n {{/each}}\n \n \n \n {{/each}}\n \n
Internal Use - {{ayT 'WorkOrderItemParts'}} & {{ayT 'WorkOrderItemLabors'}} only{{ayT 'Quote'}} {{Serial}}
 
{{ayT 'Quote'}} prepared for:
{{CustomerViz}}{{ayT 'Status'}}{{LastStateNameViz}}
 {{Address}}, {{City}}{{ayT 'QuotePreparedByID'}}{{PreparedByViz}}
 {{CustomerPhone1Viz}}{{ayT 'WorkOrderCustomerReferenceNumber'}}{{CustomerReferenceNumber}}
 {{CustomerEmailAddressViz}}{{ayT 'WorkOrderInternalReferenceNumber'}}{{InternalReferenceNumber}}
 {{ayT \"QuoteQuoteRequestDate\"}}{{myDate Requested}}
 {{ayT 'WorkOrderSummary'}}{{ayT 'QuoteDateSubmitted'}}{{myDate Submitted}}
 {{Notes}} {{ayT 'QuoteValidUntilDate'}}{{myDate ValidUntil}}
 {{ayT 'QuoteIntroduction'}}{{ayT 'QuoteDateApproved'}} {{myDate Approved}}
 {{Introduction}}
 
{{ayT 'WorkOrderItemSummary'}} #{{Sequence}}{{Notes}}
{{ayT 'WorkOrderItemTechNotes'}}{{TechNotes}}
{{ayT 'Unit'}}{{UnitViz}} - {{UnitModelNameViz}}
 
{{ayT 'WorkOrderItemList'}}QtyCost PERList Price PERCust Price PERCost NETList Price NETCust Price NETDifference
{{ayT 'WorkOrderItemLaborServiceRateID'}}: {{ServiceRateViz}}{{ServiceRateQuantity}}{{ayCurrency CostViz}}{{ayCurrency ListPriceViz}}{{ayCurrency ListPriceViz}}{{ayCurrency PriceViz}}{{ayCurrency PriceViz}}{{ayCurrency ThisLaborCostxQty}}{{ayCurrency ThisLaborListPricexQty}}{{ayCurrency ThisLaborListPricexQty}}{{ayCurrency NetViz}}{{ayCurrency NetViz}}{{ayCurrency ThisLaborNetVizMinusListLaborxQty}}
 
{{ayT 'WorkOrderItemPartPartID'}}: {{PartNameViz}} {{PartDescriptionViz}}{{Quantity}}{{ayCurrency Cost}}{{ayCurrency ListPrice}}{{ayCurrency ListPrice}}{{ayCurrency PriceViz}}{{ayCurrency PriceViz}}{{ayCurrency ThisPartCostxQty}}{{ayCurrency ThisPartListPricexQty}}{{ayCurrency ThisPartListPricexQty}}{{ayCurrency NetViz}}{{ayCurrency NetViz}}{{ayCurrency ThisPartNetVizMinusListPartxQty}}
 
\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 \n \n \n \n
 
 
Cost NETList Price NETCust Price NETDifference
All {{ayT 'WorkOrderItemLabors'}}{{ayCurrency ThisWOAllLaborsCostxQty}}{{ayCurrency ThisWOAllLaborsListPricexQty}}{{ayCurrency ThisWOAllLaborsNetViz}}{{ayCurrency ThisWOAllLaborsNetVizMinusListPricexQty}}
All {{ayT 'WorkOrderItemParts'}}{{ayCurrency ThisWOAllPartsCostxQty}}{{ayCurrency ThisWOAllPartsListPricexQty}}{{ayCurrency ThisWOAllPartsNetViz}}{{ayCurrency ThisWOAllPartsNetVizMinusListPricexQty}}
{{ayT 'Total'}}{{ayCurrency ThisWOTotalCostNets}}{{ayCurrency ThisWOTotalListNets}}{{ayCurrency ThisWOTotalCustNets}}{{ayCurrency ThisWOAllNetVizMinusAllListPricexQty}}
\n {{/each}}\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: 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.fontpurple {\n color: purple;\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([\"Quote\", \"QuoteIntroduction\", \"WorkOrderSummary\", \"Status\", \"QuotePreparedByID\", \"WorkOrderInternalReferenceNumber\", \"WorkOrderCustomerReferenceNumber\", \"QuoteDateSubmitted\", \"QuoteDateApproved\", \"QuoteValidUntilDate\", \"QuoteQuoteRequestDate\", \"Unit\", \"WorkOrderItemSummary\", \"WorkOrderItemTechNotes\", \"WorkOrderItemPartQuantity\", \"Price\", \"NetPrice\", \"WorkOrderItemParts\", \"WorkOrderItemPartPartID\", \"WorkOrderItemList\", \"WorkOrderItemLaborServiceRateID\", \"WorkOrderItemLabors\", \"Total\"]);\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 Part Costs from all Items in this wo so it exists\n\tEachWO.ThisWOAllPartsCostxQty = 0.00;\n\t//below declares a key on the entire wo to hold all Part ListPricexQuantity from all Items in this wo so it exists\n\tEachWO.ThisWOAllPartsListPricexQty = 0.00;\n\t//below declares a key on the entire wo to hold all Part ListPricexQuantity from all Items in this wo so it exists\n\tEachWO.ThisWOAllPartsNetVizMinusListPricexQty = 0.00;\n\t\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.00;\n\n\t//below declares a key on the entire wo to hold all Labor Costs from all Items in this wo so it exists\n\tEachWO.ThisWOAllLaborsCostxQty = 0.00;\n\t//below declares a key on the entire wo to hold all Labor ListPricexQuantity from all Items in this wo so it exists\n\tEachWO.ThisWOAllLaborsListPricexQty = 0.00;\n\t//below declares a key on the entire wo to hold all Labor ListPricexQuantity from all Items in this wo so it exists\n\tEachWO.ThisWOAllLaborsNetVizMinusListPricexQty = 0.00;\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.00;\n\n\t//below declares a key on the entire wo to hold ALL of THIS quote's Nets so it exists\n\tEachWO.ThisWOTotalCostNets = 0.00;\n\t//below declares a key on the entire wo to hold ALL of THIS quote's Nets so it exists\n\tEachWO.ThisWOTotalListNets = 0.00;\n\t//below declares a key on the entire wo to hold ALL of THIS quote's Nets so it exists\n\tEachWO.ThisWOTotalCustNets = 0.00;\n\t//below declares a key on entire wo to hold difference between all netviz and all listpricexqty\n\tEachWO.ThisWOAllNetVizMinusAllListPricexQty= 0.00;\n\n\n\n\t//below is to Iterate through each item of the quote's Items\n\n\tfor (const Item of EachWO.Items)\n\t\t{\n\t\t\t\n\t\t\tItem.ThisItemAllPartsCostxQty = 0.00;\t\t\t\n\t\t\t//below is to Iterate through each Part record of the quote's Item to add a field identifying Cost * Qty for each part, \n\t\t\t// running total of these for all item's parts, and running total for all wo parts. \n\t\t\tfor (const Part of Item.Parts)\n\t\t\t{\n\t\t\t\tPart.ThisPartCostxQty = 0.00;\n\t\t\t//make sure it has a value before attempting to add it to the running total\n \tif (Part.Cost != null) //if Cost is NOT null, then multiplies Cost by Qty, and adds that to running total for this item and this workorder.\n \t \t{\n\t\t\t\t\t\tPart.ThisPartCostxQty = (Part.Cost * Part.Quantity);\n\t\t\t\t\t\tItem.ThisItemAllPartsCostxQty += (Part.Cost * Part.Quantity);\t\n\t\t\t\t\t\tEachWO.ThisWOAllPartsCostxQty += (Part.Cost * Part.Quantity);\t\n\t\t\t\t\t\tEachWO.ThisWOTotalCostNets += (Part.Cost * Part.Quantity);\t\n\t\t\t\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 //whereas if Cost IS null, then makes Part.ThisPartCostxQty of 0 \n\t\t\t\t\t{\n\t\t\t\t\t\tPart.ThisPartCostxQty = 0.00;\t\t\n\t\t\t\t\t\t\n\t\t\t\t\t}\n\t\t\t}\n\t\t\t\n\t\t\tItem.ThisItemAllPartsNetViz = 0.00; //declare a key on the Item to hold all of this item's parts nets and set it initially to 0 \n\n\t\t\t//below is to Iterate through each Part record of the quote'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 \t//NetViz already shows part net x qty\t\t\t\t\t\t\n\t\t\t\t\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 quote's Net Parts\n\t\t\t\t\t\tEachWO.ThisWOTotalCustNets += 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\n\t\t\t\t\t\t\t\n\t\t\t\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\n\t\t\tItem.ThisItemAllPartsListPricexQty = 0.00;\t\t\t\n\t\t\t//below is to Iterate through each Part record of the quote's Item to add a field identifying ListPrice * Qty for each part, \n\t\t\t// running total of these for all item's parts, and running total for all wo parts.\n\t\t\tfor (const Part of Item.Parts)\n\t\t\t{\n\t\t\t\tPart.ThisPartListPricexQty = 0.00;\n\t\t\t\tPart.ThisPartNetVizMinusListPartxQty = 0.00;\n\t\t\t//make sure it has a value before attempting to add it to the running total\n \tif (Part.ListPrice != null) //if ListPrice is NOT null, then multiplies ListPrice by Qty, and adds that to running total for this item and this workorder. Then subtracts NetList from NetCust to get diff\n \t \t{\n\t\t\t\t\t\tPart.ThisPartListPricexQty = (Part.ListPrice * Part.Quantity);\n\t\t\t\t\t\tItem.ThisItemAllPartsListPricexQty += (Part.ListPrice * Part.Quantity);\n\t\t\t\t\t\tEachWO.ThisWOAllPartsListPricexQty += (Part.ListPrice * Part.Quantity);\t\t\n\t\t\t\t\t\tEachWO.ThisWOTotalListNets += (Part.ListPrice * Part.Quantity);\n\n\t\t\t\t\t\tPart.ThisPartNetVizMinusListPartxQty = (Part.NetViz - Part.ThisPartListPricexQty);\n\t\t\t\t\t\tEachWO.ThisWOAllPartsNetVizMinusListPricexQty = ( EachWO.ThisWOAllPartsNetViz - EachWO.ThisWOAllPartsListPricexQty);\n\t\t\t\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 //whereas if ListPrice IS null, then makes the ListPrice the same as the PriceViz \n\t\t\t\t\t{\n\t\t\t\t\t\tPart.ListPrice = Part.PriceViz;\n\t\t\t\t\t\tPart.ThisPartListPricexQty = (Part.ListPrice * Part.Quantity);\n\t\t\t\t\t\tItem.ThisItemAllPartsListPricexQty += (Part.ListPrice * Part.Quantity);\n\t\t\t\t\t\tEachWO.ThisWOAllPartsListPricexQty += (Part.ListPrice * Part.Quantity);\t\n\t\t\t\t\t\tEachWO.ThisWOTotalListNets += (Part.ListPrice * Part.Quantity);\n\n\t\t\t\t\t\tPart.ThisPartNetVizMinusListPartxQty = (Part.NetViz - Part.ThisPartListPricexQty);\n\t\t\t\t\t\tEachWO.ThisWOAllPartsNetVizMinusListPricexQty = ( EachWO.ThisWOAllPartsNetViz - EachWO.ThisWOAllPartsListPricexQty);\t\n\t\t\t\t\t}\n\t\t\t}\n\n\n\n\t\t\tItem.ThisItemAllLaborsCostxQty = 0.00;\t\t\t\n\t\t\t//below is to Iterate through each Labor record of the quote's Item to add a field identifying Cost * Qty for each Labor, \n\t\t\t// running total of these for all item's Labor, and running total for all wo Labor. \n\t\t\tfor (const Labor of Item.Labors)\n\t\t\t{\n\t\t\t\tLabor.ThisLaborCostxQty = 0.00;\n\t\t\t//make sure it has a value before attempting to add it to the running total\n \tif (Labor.CostViz != null) //if Cost is NOT null, then multiplies Cost by Qty, and adds that to running total for this item and this workorder.\n \t \t{\n\t\t\t\t\t\tLabor.ThisLaborCostxQty = (Labor.CostViz * Labor.ServiceRateQuantity);\n\t\t\t\t\t\tItem.ThisItemAllLaborsCostxQty += (Labor.CostViz * Labor.ServiceRateQuantity);\t\n\t\t\t\t\t\tEachWO.ThisWOAllLaborsCostxQty += (Labor.CostViz * Labor.ServiceRateQuantity);\t\n\t\t\t\t\t\tEachWO.ThisWOTotalCostNets += (Labor.CostViz * Labor.ServiceRateQuantity);\t\n\t\t\t\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 //whereas if Cost IS null, then makes Labor.ThisLaborCostxQty of 0 \n\t\t\t\t\t{\n\t\t\t\t\t\tLabor.ThisLaborCostxQty = 0.00;\t\t\n\t\t\t\t\t\t\n\t\t\t\t\t}\n\t\t\t}\n\n\t\t\tItem.ThisItemAllLaborsNetViz = 0.00; //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 quote'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 quote's Net Labors\n\t\t\t\t\t\tEachWO.ThisWOTotalCustNets += 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\t\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\t\n\t\t\tItem.ThisItemAllLaborsListPricexQty = 0.00;\t\t\t\n\t\t\t//below is to Iterate through each Labor record of the quote's Item to add a field identifying ListPrice * Qty for each Labor, \n\t\t\t// running total of these for all item's Labors, and running total for all wo Labors. \n\t\t\tfor (const Labor of Item.Labors)\n\t\t\t{\n\t\t\t\tLabor.ThisLaborListPricexQty = 0.00;\n\t\t\t\tLabor.ThisLaborNetVizMinusListLaborxQty = 0.00;\n\t\t\t//make sure it has a value before attempting to add it to the running total\n \tif (Labor.ListPriceViz != null) //if ListPrice is NOT null, then multiplies ListPrice by Qty, and adds that to running total for this item and this workorder. Then subtracts NetList from NetCust to get diff\n \t \t{\n\t\t\t\t\t\tLabor.ThisLaborListPricexQty = (Labor.ListPriceViz * Labor.ServiceRateQuantity);\n\t\t\t\t\t\tItem.ThisItemAllLaborsListPricexQty += (Labor.ListPriceViz * Labor.ServiceRateQuantity);\n\t\t\t\t\t\tEachWO.ThisWOAllLaborsListPricexQty += (Labor.ListPriceViz * Labor.ServiceRateQuantity);\t\t\n\t\t\t\t\t\tEachWO.ThisWOTotalListNets += (Labor.ListPriceViz * Labor.ServiceRateQuantity);\n\n\t\t\t\t\t\tLabor.ThisLaborNetVizMinusListLaborxQty = (Labor.NetViz - Labor.ThisLaborListPricexQty);\n\t\t\t\t\t\tEachWO.ThisWOAllLaborsNetVizMinusListPricexQty = ( EachWO.ThisWOAllLaborsNetViz - EachWO.ThisWOAllLaborsListPricexQty);\n\t\t\t\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 //whereas if ListPrice IS null, then makes the ListPrice the same as the PriceViz \n\t\t\t\t\t{\n\t\t\t\t\t\tLabor.ListPriceViz = Labor.PriceViz;\n\t\t\t\t\t\tLabor.ThisLaborListPricexQty = (Labor.ListPriceViz * Labor.ServiceRateQuantity);\n\t\t\t\t\t\tItem.ThisItemAllLaborsListPricexQty += (Labor.ListPriceViz * Labor.ServiceRateQuantity);\n\t\t\t\t\t\tEachWO.ThisWOAllLaborsListPricexQty += (Labor.ListPriceViz * Labor.ServiceRateQuantity);\t\n\t\t\t\t\t\tEachWO.ThisWOTotalListNets += (Labor.ListPriceViz * Labor.ServiceRateQuantity);\n\n\t\t\t\t\t\tLabor.ThisLaborNetVizMinusListLaborxQty = (Labor.NetViz - Labor.ThisLaborListPricexQty);\n\t\t\t\t\t\tEachWO.ThisWOAllLaborsNetVizMinusListPricexQty = ( EachWO.ThisWOAllLaborsNetViz - EachWO.ThisWOAllLaborsListPricexQty);\t\n\t\t\t\t\t}\n\t\t\t\tEachWO.ThisWOAllNetVizMinusAllListPricexQty = ( EachWO.ThisWOAllLaborsNetVizMinusListPricexQty + EachWO.ThisWOAllPartsNetVizMinusListPricexQty)\n\n\t\t\t}\n\n\n\n\n\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//custom helper so can do a direct comparison - i.e. if value equals xxxx, then show, else show yyyyy\n//note that this HAS to be added here in Helpers, is NOT built in\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/////////////////////////////////////////////////////////////////\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":"Quote Internal Use Costs and Charges","Active":true,"Notes":"\n","Roles":49258,"AType":27,"IncludeWoItemDescendants":false,"Template":"\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 \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 {{#each Units}}\n \n \n \n \n \n {{/each}}\n {{#if Units}}\n \n \n \n {{/if}}\n\n \n \n \n \n \n \n \n \n \n \n \n \n \n\n\n\n {{#each Labors}}\n \n \n \n \n\n \n {{#if_eq ListPriceViz PriceViz }} \n {{else}}{{/if_eq}}\n {{#if_eq ListPriceViz PriceViz }} \n {{else}}{{/if_eq}}\n \n \n {{#if_eq ListPriceViz PriceViz }}\n {{else}}{{/if_eq}}\n {{#if_eq ListPriceViz PriceViz }}\n {{else}}{{/if_eq}}\n\n \n \n {{/each}}\n {{#if Labors}}\n \n \n \n {{/if}}\n\n {{#each Parts}}\n \n \n \n \n \n {{#if_eq ListPrice PriceViz }} \n {{else}}{{/if_eq}}\n {{#if_eq ListPrice PriceViz }} \n {{else}}{{/if_eq}}\n \n \n {{#if_eq ListPrice PriceViz }}\n {{else}}{{/if_eq}}\n {{#if_eq ListPrice PriceViz }}\n {{else}}{{/if_eq}}\n \n \n {{/each}}\n \n \n \n {{/each}}\n \n
Internal Use - {{ayT 'WorkOrderItemParts'}} & {{ayT 'WorkOrderItemLaborList'}} only{{ayT 'Quote'}} {{Serial}}
 
{{ayT 'Quote'}} prepared for:
{{CustomerViz}}{{ayT 'Status'}}{{LastStateNameViz}}
 {{Address}}, {{City}}{{ayT 'QuotePreparedByID'}}{{PreparedByViz}}
 {{CustomerPhone1Viz}}{{ayT 'WorkOrderCustomerReferenceNumber'}}{{CustomerReferenceNumber}}
 {{CustomerEmailAddressViz}}{{ayT 'WorkOrderInternalReferenceNumber'}}{{InternalReferenceNumber}}
 {{ayT \"QuoteQuoteRequestDate\"}}{{myDate Requested}}
 {{ayT 'WorkOrderSummary'}}{{ayT 'QuoteDateSubmitted'}}{{myDate Submitted}}
 {{Notes}} {{ayT 'QuoteValidUntilDate'}}{{myDate ValidUntil}}
 {{ayT 'QuoteIntroduction'}}{{ayT 'QuoteDateApproved'}} {{myDate Approved}}
 {{Introduction}}
 
{{ayT 'WorkOrderItemSummary'}} #{{Sequence}}{{Notes}}
{{ayT 'WorkOrderItemTechNotes'}}{{TechNotes}}
{{ayT 'Unit'}}{{UnitViz}} - {{UnitModelNameViz}}
 
{{ayT 'WorkOrderItemList'}}QtyCost PERList Price PERCust Price PERCost NETList Price NETCust Price NETDifference
{{ayT 'WorkOrderItemLaborServiceRateID'}}: {{ServiceRateViz}}{{ServiceRateQuantity}}{{ayCurrency CostViz}}{{ayCurrency ListPriceViz}}{{ayCurrency ListPriceViz}}{{ayCurrency PriceViz}}{{ayCurrency PriceViz}}{{ayCurrency ThisLaborCostxQty}}{{ayCurrency ThisLaborListPricexQty}}{{ayCurrency ThisLaborListPricexQty}}{{ayCurrency NetViz}}{{ayCurrency NetViz}}{{ayCurrency ThisLaborNetVizMinusListLaborxQty}}
 
{{ayT 'WorkOrderItemPartPartID'}}: {{PartNameViz}} {{PartDescriptionViz}}{{Quantity}}{{ayCurrency Cost}}{{ayCurrency ListPrice}}{{ayCurrency ListPrice}}{{ayCurrency PriceViz}}{{ayCurrency PriceViz}}{{ayCurrency ThisPartCostxQty}}{{ayCurrency ThisPartListPricexQty}}{{ayCurrency ThisPartListPricexQty}}{{ayCurrency NetViz}}{{ayCurrency NetViz}}{{ayCurrency ThisPartNetVizMinusListPartxQty}}
 
\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 \n \n \n \n
 
 
Cost NETList Price NETCust Price NETDifference
All {{ayT 'WorkOrderItemLaborList'}}{{ayCurrency ThisWOAllLaborsCostxQty}}{{ayCurrency ThisWOAllLaborsListPricexQty}}{{ayCurrency ThisWOAllLaborsNetViz}}{{ayCurrency ThisWOAllLaborsNetVizMinusListPricexQty}}
All {{ayT 'WorkOrderItemParts'}}{{ayCurrency ThisWOAllPartsCostxQty}}{{ayCurrency ThisWOAllPartsListPricexQty}}{{ayCurrency ThisWOAllPartsNetViz}}{{ayCurrency ThisWOAllPartsNetVizMinusListPricexQty}}
{{ayT 'Total'}}{{ayCurrency ThisWOTotalCostNets}}{{ayCurrency ThisWOTotalListNets}}{{ayCurrency ThisWOTotalCustNets}}{{ayCurrency ThisWOAllNetVizMinusAllListPricexQty}}
\n {{/each}}\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: 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.fontpurple {\n color: purple;\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([\"Quote\", \"QuoteIntroduction\", \"WorkOrderSummary\", \"Status\", \"QuotePreparedByID\", \"WorkOrderInternalReferenceNumber\", \"WorkOrderCustomerReferenceNumber\", \"QuoteDateSubmitted\", \"QuoteDateApproved\", \"QuoteValidUntilDate\", \"QuoteQuoteRequestDate\", \"Unit\", \"WorkOrderItemSummary\", \"WorkOrderItemTechNotes\", \"WorkOrderItemPartQuantity\", \"Price\", \"NetPrice\", \"WorkOrderItemParts\", \"WorkOrderItemPartPartID\", \"WorkOrderItemList\", \"WorkOrderItemLaborServiceRateID\", \"WorkOrderItemLaborList\", \"Total\"]);\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 Part Costs from all Items in this wo so it exists\n\tEachWO.ThisWOAllPartsCostxQty = 0.00;\n\t//below declares a key on the entire wo to hold all Part ListPricexQuantity from all Items in this wo so it exists\n\tEachWO.ThisWOAllPartsListPricexQty = 0.00;\n\t//below declares a key on the entire wo to hold all Part ListPricexQuantity from all Items in this wo so it exists\n\tEachWO.ThisWOAllPartsNetVizMinusListPricexQty = 0.00;\n\t\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.00;\n\n\t//below declares a key on the entire wo to hold all Labor Costs from all Items in this wo so it exists\n\tEachWO.ThisWOAllLaborsCostxQty = 0.00;\n\t//below declares a key on the entire wo to hold all Labor ListPricexQuantity from all Items in this wo so it exists\n\tEachWO.ThisWOAllLaborsListPricexQty = 0.00;\n\t//below declares a key on the entire wo to hold all Labor ListPricexQuantity from all Items in this wo so it exists\n\tEachWO.ThisWOAllLaborsNetVizMinusListPricexQty = 0.00;\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.00;\n\n\t//below declares a key on the entire wo to hold ALL of THIS quote's Nets so it exists\n\tEachWO.ThisWOTotalCostNets = 0.00;\n\t//below declares a key on the entire wo to hold ALL of THIS quote's Nets so it exists\n\tEachWO.ThisWOTotalListNets = 0.00;\n\t//below declares a key on the entire wo to hold ALL of THIS quote's Nets so it exists\n\tEachWO.ThisWOTotalCustNets = 0.00;\n\t//below declares a key on entire wo to hold difference between all netviz and all listpricexqty\n\tEachWO.ThisWOAllNetVizMinusAllListPricexQty= 0.00;\n\n\n\n\t//below is to Iterate through each item of the quote's Items\n\n\tfor (const Item of EachWO.Items)\n\t\t{\n\t\t\t\n\t\t\tItem.ThisItemAllPartsCostxQty = 0.00;\t\t\t\n\t\t\t//below is to Iterate through each Part record of the quote's Item to add a field identifying Cost * Qty for each part, \n\t\t\t// running total of these for all item's parts, and running total for all wo parts. \n\t\t\tfor (const Part of Item.Parts)\n\t\t\t{\n\t\t\t\tPart.ThisPartCostxQty = 0.00;\n\t\t\t//make sure it has a value before attempting to add it to the running total\n \tif (Part.Cost != null) //if Cost is NOT null, then multiplies Cost by Qty, and adds that to running total for this item and this workorder.\n \t \t{\n\t\t\t\t\t\tPart.ThisPartCostxQty = (Part.Cost * Part.Quantity);\n\t\t\t\t\t\tItem.ThisItemAllPartsCostxQty += (Part.Cost * Part.Quantity);\t\n\t\t\t\t\t\tEachWO.ThisWOAllPartsCostxQty += (Part.Cost * Part.Quantity);\t\n\t\t\t\t\t\tEachWO.ThisWOTotalCostNets += (Part.Cost * Part.Quantity);\t\n\t\t\t\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 //whereas if Cost IS null, then makes Part.ThisPartCostxQty of 0 \n\t\t\t\t\t{\n\t\t\t\t\t\tPart.ThisPartCostxQty = 0.00;\t\t\n\t\t\t\t\t\t\n\t\t\t\t\t}\n\t\t\t}\n\t\t\t\n\t\t\tItem.ThisItemAllPartsNetViz = 0.00; //declare a key on the Item to hold all of this item's parts nets and set it initially to 0 \n\n\t\t\t//below is to Iterate through each Part record of the quote'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 \t//NetViz already shows part net x qty\t\t\t\t\t\t\n\t\t\t\t\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 quote's Net Parts\n\t\t\t\t\t\tEachWO.ThisWOTotalCustNets += 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\n\t\t\t\t\t\t\t\n\t\t\t\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\n\t\t\tItem.ThisItemAllPartsListPricexQty = 0.00;\t\t\t\n\t\t\t//below is to Iterate through each Part record of the quote's Item to add a field identifying ListPrice * Qty for each part, \n\t\t\t// running total of these for all item's parts, and running total for all wo parts.\n\t\t\tfor (const Part of Item.Parts)\n\t\t\t{\n\t\t\t\tPart.ThisPartListPricexQty = 0.00;\n\t\t\t\tPart.ThisPartNetVizMinusListPartxQty = 0.00;\n\t\t\t//make sure it has a value before attempting to add it to the running total\n \tif (Part.ListPrice != null) //if ListPrice is NOT null, then multiplies ListPrice by Qty, and adds that to running total for this item and this workorder. Then subtracts NetList from NetCust to get diff\n \t \t{\n\t\t\t\t\t\tPart.ThisPartListPricexQty = (Part.ListPrice * Part.Quantity);\n\t\t\t\t\t\tItem.ThisItemAllPartsListPricexQty += (Part.ListPrice * Part.Quantity);\n\t\t\t\t\t\tEachWO.ThisWOAllPartsListPricexQty += (Part.ListPrice * Part.Quantity);\t\t\n\t\t\t\t\t\tEachWO.ThisWOTotalListNets += (Part.ListPrice * Part.Quantity);\n\n\t\t\t\t\t\tPart.ThisPartNetVizMinusListPartxQty = (Part.NetViz - Part.ThisPartListPricexQty);\n\t\t\t\t\t\tEachWO.ThisWOAllPartsNetVizMinusListPricexQty = ( EachWO.ThisWOAllPartsNetViz - EachWO.ThisWOAllPartsListPricexQty);\n\t\t\t\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 //whereas if ListPrice IS null, then makes the ListPrice the same as the PriceViz \n\t\t\t\t\t{\n\t\t\t\t\t\tPart.ListPrice = Part.PriceViz;\n\t\t\t\t\t\tPart.ThisPartListPricexQty = (Part.ListPrice * Part.Quantity);\n\t\t\t\t\t\tItem.ThisItemAllPartsListPricexQty += (Part.ListPrice * Part.Quantity);\n\t\t\t\t\t\tEachWO.ThisWOAllPartsListPricexQty += (Part.ListPrice * Part.Quantity);\t\n\t\t\t\t\t\tEachWO.ThisWOTotalListNets += (Part.ListPrice * Part.Quantity);\n\n\t\t\t\t\t\tPart.ThisPartNetVizMinusListPartxQty = (Part.NetViz - Part.ThisPartListPricexQty);\n\t\t\t\t\t\tEachWO.ThisWOAllPartsNetVizMinusListPricexQty = ( EachWO.ThisWOAllPartsNetViz - EachWO.ThisWOAllPartsListPricexQty);\t\n\t\t\t\t\t}\n\t\t\t}\n\n\n\n\t\t\tItem.ThisItemAllLaborsCostxQty = 0.00;\t\t\t\n\t\t\t//below is to Iterate through each Labor record of the quote's Item to add a field identifying Cost * Qty for each Labor, \n\t\t\t// running total of these for all item's Labor, and running total for all wo Labor. \n\t\t\tfor (const Labor of Item.Labors)\n\t\t\t{\n\t\t\t\tLabor.ThisLaborCostxQty = 0.00;\n\t\t\t//make sure it has a value before attempting to add it to the running total\n \tif (Labor.CostViz != null) //if Cost is NOT null, then multiplies Cost by Qty, and adds that to running total for this item and this workorder.\n \t \t{\n\t\t\t\t\t\tLabor.ThisLaborCostxQty = (Labor.CostViz * Labor.ServiceRateQuantity);\n\t\t\t\t\t\tItem.ThisItemAllLaborsCostxQty += (Labor.CostViz * Labor.ServiceRateQuantity);\t\n\t\t\t\t\t\tEachWO.ThisWOAllLaborsCostxQty += (Labor.CostViz * Labor.ServiceRateQuantity);\t\n\t\t\t\t\t\tEachWO.ThisWOTotalCostNets += (Labor.CostViz * Labor.ServiceRateQuantity);\t\n\t\t\t\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 //whereas if Cost IS null, then makes Labor.ThisLaborCostxQty of 0 \n\t\t\t\t\t{\n\t\t\t\t\t\tLabor.ThisLaborCostxQty = 0.00;\t\t\n\t\t\t\t\t\t\n\t\t\t\t\t}\n\t\t\t}\n\n\t\t\tItem.ThisItemAllLaborsNetViz = 0.00; //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 quote'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 quote's Net Labors\n\t\t\t\t\t\tEachWO.ThisWOTotalCustNets += 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\t\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\t\n\t\t\tItem.ThisItemAllLaborsListPricexQty = 0.00;\t\t\t\n\t\t\t//below is to Iterate through each Labor record of the quote's Item to add a field identifying ListPrice * Qty for each Labor, \n\t\t\t// running total of these for all item's Labors, and running total for all wo Labors. \n\t\t\tfor (const Labor of Item.Labors)\n\t\t\t{\n\t\t\t\tLabor.ThisLaborListPricexQty = 0.00;\n\t\t\t\tLabor.ThisLaborNetVizMinusListLaborxQty = 0.00;\n\t\t\t//make sure it has a value before attempting to add it to the running total\n \tif (Labor.ListPriceViz != null) //if ListPrice is NOT null, then multiplies ListPrice by Qty, and adds that to running total for this item and this workorder. Then subtracts NetList from NetCust to get diff\n \t \t{\n\t\t\t\t\t\tLabor.ThisLaborListPricexQty = (Labor.ListPriceViz * Labor.ServiceRateQuantity);\n\t\t\t\t\t\tItem.ThisItemAllLaborsListPricexQty += (Labor.ListPriceViz * Labor.ServiceRateQuantity);\n\t\t\t\t\t\tEachWO.ThisWOAllLaborsListPricexQty += (Labor.ListPriceViz * Labor.ServiceRateQuantity);\t\t\n\t\t\t\t\t\tEachWO.ThisWOTotalListNets += (Labor.ListPriceViz * Labor.ServiceRateQuantity);\n\n\t\t\t\t\t\tLabor.ThisLaborNetVizMinusListLaborxQty = (Labor.NetViz - Labor.ThisLaborListPricexQty);\n\t\t\t\t\t\tEachWO.ThisWOAllLaborsNetVizMinusListPricexQty = ( EachWO.ThisWOAllLaborsNetViz - EachWO.ThisWOAllLaborsListPricexQty);\n\t\t\t\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 //whereas if ListPrice IS null, then makes the ListPrice the same as the PriceViz \n\t\t\t\t\t{\n\t\t\t\t\t\tLabor.ListPriceViz = Labor.PriceViz;\n\t\t\t\t\t\tLabor.ThisLaborListPricexQty = (Labor.ListPriceViz * Labor.ServiceRateQuantity);\n\t\t\t\t\t\tItem.ThisItemAllLaborsListPricexQty += (Labor.ListPriceViz * Labor.ServiceRateQuantity);\n\t\t\t\t\t\tEachWO.ThisWOAllLaborsListPricexQty += (Labor.ListPriceViz * Labor.ServiceRateQuantity);\t\n\t\t\t\t\t\tEachWO.ThisWOTotalListNets += (Labor.ListPriceViz * Labor.ServiceRateQuantity);\n\n\t\t\t\t\t\tLabor.ThisLaborNetVizMinusListLaborxQty = (Labor.NetViz - Labor.ThisLaborListPricexQty);\n\t\t\t\t\t\tEachWO.ThisWOAllLaborsNetVizMinusListPricexQty = ( EachWO.ThisWOAllLaborsNetViz - EachWO.ThisWOAllLaborsListPricexQty);\t\n\t\t\t\t\t}\n\t\t\t\tEachWO.ThisWOAllNetVizMinusAllListPricexQty = ( EachWO.ThisWOAllLaborsNetVizMinusListPricexQty + EachWO.ThisWOAllPartsNetVizMinusListPricexQty)\n\n\t\t\t}\n\n\n\n\n\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//custom helper so can do a direct comparison - i.e. if value equals xxxx, then show, else show yyyyy\n//note that this HAS to be added here in Helpers, is NOT built in\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/////////////////////////////////////////////////////////////////\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/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 7e2f49d2..c7a86813 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 'WorkOrderItemLabors'}} 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 'WorkOrderItemPartPartSerialID'}}: {{Serials}}
 {{ayT 'WorkOrderItemTravels'}} 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\", \"WorkOrderItemPartPartSerialID\", \"WorkOrderItemLabors\", \"WorkOrderItemLaborServiceRateID\", \"WorkOrderItemLaborServiceDetails\", \"WorkOrderItemTravels\", \"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 '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 'WorkOrderItemPartPartSerialID'}}: {{Serials}}
 {{ayT 'WorkOrderItemTravels'}} 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\", \"WorkOrderItemPartPartSerialID\", \"WorkOrderItemLaborList\", \"WorkOrderItemLaborServiceRateID\", \"WorkOrderItemLaborServiceDetails\", \"WorkOrderItemTravels\", \"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