From 0c7a08a000de03409e771b9bc884b19ba2ee0bdb Mon Sep 17 00:00:00 2001 From: John Cardinal Date: Wed, 16 Feb 2022 17:47:34 +0000 Subject: [PATCH] Swapped trans key NetValue for NetPrice --- .../Charges Summary Grouped By Customer.ayrt | 2 +- .../resource/rpt/stock-report-templates/Customer Invoice.ayrt | 2 +- .../resource/rpt/stock-report-templates/Customer Quote.ayrt | 2 +- .../rpt/stock-report-templates/Customer Work Order.ayrt | 2 +- .../Labor Billing & Hours Grouped By Technician.ayrt | 2 +- .../Net Taxes and Totals for Each WO.ayrt | 2 +- .../rpt/stock-report-templates/Net Totals for Each PM Item.ayrt | 2 +- .../stock-report-templates/Net Totals for Each Quote Item.ayrt | 2 +- .../rpt/stock-report-templates/Net Totals for Each WO Item.ayrt | 2 +- .../rpt/stock-report-templates/Net Totals for Each WO.ayrt | 2 +- .../Nets Taxes LineTotals for each PM Expense.ayrt | 2 +- .../Nets Taxes LineTotals for each PM Labor.ayrt | 2 +- .../Nets Taxes LineTotals for each PM Loans.ayrt | 2 +- .../Nets Taxes LineTotals for each PM Part.ayrt | 2 +- .../Nets Taxes LineTotals for each PM Travel.ayrt | 2 +- .../Nets Taxes LineTotals for each Quote Expense.ayrt | 2 +- .../Nets Taxes LineTotals for each Quote Labor.ayrt | 2 +- .../Nets Taxes LineTotals for each Quote Loans.ayrt | 2 +- .../Nets Taxes LineTotals for each Quote Part.ayrt | 2 +- .../Nets Taxes LineTotals for each Quote Travel.ayrt | 2 +- .../Nets Taxes LineTotals for each WO Expense.ayrt | 2 +- .../Nets Taxes LineTotals for each WO Labor.ayrt | 2 +- .../Nets Taxes LineTotals for each WO Loans.ayrt | 2 +- .../Nets Taxes LineTotals for each WO Part.ayrt | 2 +- .../Nets Taxes LineTotals for each WO Travel.ayrt | 2 +- .../rpt/stock-report-templates/Outside Service via PMs.ayrt | 2 +- .../rpt/stock-report-templates/Outside Service via Quotes.ayrt | 2 +- .../stock-report-templates/Outside Service via Work Orders.ayrt | 2 +- .../resource/rpt/stock-report-templates/PM Parts Summary .ayrt | 2 +- .../Part Grouped Net Cost Difference.ayrt | 2 +- .../rpt/stock-report-templates/Parts & Labor Profit _ Loss.ayrt | 2 +- .../rpt/stock-report-templates/Purchase Order Summaries.ayrt | 2 +- .../Quote Internal Use Costs and Charges.ayrt | 2 +- .../stock-report-templates/Quote Parts Net Cost Summary.ayrt | 2 +- ... forced to bottom of each page of multi-page work order.ayrt | 2 +- 35 files changed, 35 insertions(+), 35 deletions(-) diff --git a/server/AyaNova/resource/rpt/stock-report-templates/Charges Summary Grouped By Customer.ayrt b/server/AyaNova/resource/rpt/stock-report-templates/Charges Summary Grouped By Customer.ayrt index 06157659..5c25f8d3 100644 --- a/server/AyaNova/resource/rpt/stock-report-templates/Charges Summary Grouped By Customer.ayrt +++ b/server/AyaNova/resource/rpt/stock-report-templates/Charges Summary Grouped By Customer.ayrt @@ -1 +1 @@ -{"Name":"Charges Summary Grouped By Customer","Active":true,"Notes":"Custom Prepare to obtain and display WO total nets, taxes and grand total","Roles":50538,"AType":34,"IncludeWoItemDescendants":false,"Template":"\n\n\n
\n
\n\t\t\t

Nets Taxes & Totals for each {{ayT 'Customer'}}

\n\t\t
\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 {{#each items}}\n \n \n \n {{#if ServiceDate }}{{else}}{{/if}}\n \n {{#if ThisWOAllLaborsNetViz }}{{else}}{{/if}}\n {{#if ThisWOAllPartsNetViz }}{{else}}{{/if}}\n {{#if ThisWOAllTravelsNetViz }}{{else}}{{/if}}\n {{#if ThisWOAllExpsNetChargeAmount }}{{else}}{{/if}}\n {{#if ThisWOAllLoansNetViz }}{{else}}{{/if}}\n {{#if ThisWOAllOutsidesNetViz }}{{else}}{{/if}}\n {{#if ThisWOTotalNets }} {{else}} {{/if}}\n {{#if ThisWOTotalTaxAs }} {{else}} {{/if}}\n {{#if ThisWOTotalTaxBs }} {{else}} {{/if}}\n {{#if ThisWOTotalGrand }} {{else}} {{/if}} \n \n {{/each}}\n \n \n \n \n \n {{#if GroupWOLaborsNetViz }}{{else}}{{/if}}\n {{#if GroupWOPartsNetViz }}{{else}}{{/if}}\n {{#if GroupWOTravelsNetViz }}{{else}}{{/if}}\n {{#if GroupWOExpsNetChargeAmount }}{{else}}{{/if}}\n {{#if GroupWOLoansNetViz }}{{else}}{{/if}}\n {{#if GroupWOOutsidesNetViz }}{{else}}{{/if}}\n {{#if GroupWOTotalNets }} {{else}} {{/if}}\n {{#if GroupWOTotalTaxAs }} {{else}} {{/if}}\n {{#if GroupWOTotalTaxBs }} {{else}} {{/if}}\n {{#if GroupWOTotalGrand }} {{else}} {{/if}} \n \n \n \n \n {{/each}}\n \n
{{ayT 'Customer'}}{{ayT 'WorkOrder'}}{{ayT 'WorkOrderServiceDate'}}{{ayT 'WorkOrderStatus'}}{{ayT 'WorkOrderItemLaborList'}}{{ayT 'WorkOrderItemPartList'}}{{ayT 'WorkOrderItemTravelList'}}{{ayT 'WorkOrderItemExpenseList'}}{{ayT 'WorkOrderItemLoanList'}}{{ayT 'WorkOrderItemOutsideService'}}{{ayT 'NetValue'}}{{ayT 'TaxCodeTaxA'}}{{ayT 'TaxCodeTaxB'}}{{ayT 'Total'}}
{{group}}
 {{Serial}}{{ayDate ServiceDate}}no Service Date specified{{LastStateNameViz}}{{ayCurrency ThisWOAllLaborsNetViz}}none billable{{ayCurrency ThisWOAllPartsNetViz}}none billable{{ayCurrency ThisWOAllTravelsNetViz}}none billable{{ayCurrency ThisWOAllExpsNetChargeAmount}}none billable{{ayCurrency ThisWOAllLoansNetViz}}none billable{{ayCurrency ThisWOAllOutsidesNetViz}}none billable{{ayCurrency ThisWOTotalNets}}none billable{{ayCurrency ThisWOTotalTaxAs}}none{{ayCurrency ThisWOTotalTaxBs}}none{{ayCurrency ThisWOTotalGrand}}none billable
 
{{group}} Totals{{ayCurrency GroupWOLaborsNetViz}}none billable{{ayCurrency GroupWOPartsNetViz}}none billable{{ayCurrency GroupWOTravelsNetViz}}none billable{{ayCurrency GroupWOExpsNetChargeAmount}}none billable{{ayCurrency GroupWOLoansNetViz}}none billable{{ayCurrency GroupWOOutsidesNetViz}}none billable{{ayCurrency GroupWOTotalNets}}none billable{{ayCurrency GroupWOTotalTaxAs}}none{{ayCurrency GroupWOTotalTaxBs}}none{{ayCurrency GroupWOTotalGrand}}none billable
 
\n\n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n {{#if AllWOLaborsNetViz}} {{else}} {{/if}}\n {{#if AllWOPartsNetViz}} {{else}} {{/if}}\n {{#if AllWOTravelsNetViz}} {{else}} {{/if}}\n {{#if AllWOExpsNetChargeAmount}} {{else}} {{/if}}\n {{#if AllWOLoansNetViz}} {{else}} {{/if}}\n {{#if AllWOOutsidesNetViz}} {{else}} {{/if}}\n {{#if AllWOTotalNets}} {{else}} {{/if}}\n {{#if AllWOTotalTaxAs}} {{else}} {{/if}}\n {{#if AllWOTotalTaxBs }} {{else}} {{/if}}\n {{#if AllWOTotalGrand}} {{else}} {{/if}}\n \n \n
Totals for all{{ayT 'WorkOrderItemLaborList'}}{{ayT 'WorkOrderItemPartList'}}{{ayT 'WorkOrderItemTravelList'}}{{ayT 'WorkOrderItemExpenseList'}}{{ayT 'WorkOrderItemLoanList'}}{{ayT 'WorkOrderItemOutsideService'}}{{ayT 'NetValue'}}{{ayT 'TaxCodeTaxA'}}{{ayT 'TaxCodeTaxB'}}{{ayT 'Total'}}
{{ ayCurrency AllWOLaborsNetViz }}$0.00{{ ayCurrency AllWOPartsNetViz }}$0.00{{ ayCurrency AllWOTravelsNetViz }}$0.00{{ ayCurrency AllWOExpsNetChargeAmount }}$0.00{{ ayCurrency AllWOLoansNetViz }}$0.00{{ ayCurrency AllWOOutsidesNetViz }}$0.00{{ ayCurrency AllWOTotalNets }}$0.00{{ ayCurrency AllWOTotalTaxAs }}$0.00{{ ayCurrency AllWOTotalTaxBs }}$0.00{{ ayCurrency AllWOTotalGrand }}$0.00
\n
\n\n\n\n\n","Style":".minimum {\n font-size: 5pt;\n}\n\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 /* border-bottom: solid 1pt #9e9e9e; */\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: 6pt;\n text-align: center;\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 //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\treportData.ayReportData = ayGroupByKey(reportData.ayReportData, 'CustomerViz')\n\t\n\tawait ayGetTranslations([\"WorkOrder\", \"Customer\", \"WorkOrderServiceDate\", \"WorkOrderStatus\", \"NetValue\", \"WorkOrderItemLaborList\", \"WorkOrderItemPartList\", \"WorkOrderItemTravelList\", \"WorkOrderItemExpenseList\", \"WorkOrderItemLoanList\", \"WorkOrderItemOutsideService\", \"TaxCodeTaxA\", \"TaxCodeTaxB\", \"Total\" ]);\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 Net Viz from all workorders reported on in this report so it exists\nreportData.AllWOLaborsNetViz = 0;\n//below declares a key on the entire wo to hold all Part Net Viz from all workorders so it exists\nreportData.AllWOPartsNetViz = 0;\n//below declares a key on the entire wo to hold all Travel Net Viz from all workorders so it exists\nreportData.AllWOTravelsNetViz = 0;\n//below declares a key on the entire wo to hold all Exp Net ChargeAmount from all workorders so it exists\nreportData.AllWOExpsNetChargeAmount = 0;\n//below declares a key on the entire wo to hold all Loan Net Viz from all workorders so it exists\nreportData.AllWOLoansNetViz = 0;\n//below declares a key on the entire wo to hold all OutsideServices Net Viz from all workorders so it exists\nreportData.AllWOOutsidesNetViz = 0;\n\n//below declares a key to hold all Nets from all workorders in this list so it exists\nreportData.AllWOTotalNets = 0;\n\n//below declares a key to hold all Tax As from all workorders in this list so it exists\nreportData.AllWOTotalTaxAs = 0;\n//below declares a key to hold all Tax Bs from all workorders in this list so it exists\nreportData.AllWOTotalTaxBs = 0;\n//below declares a key to hold all GrandTotal from all workorders in this list so it exists\nreportData.AllWOTotalGrand = 0;\n\n\nfor (const EachGroup of reportData.ayReportData) {\n\n\t//below declares a key on the entire wo to hold all Labor Net Viz from all workorders reported on in this report so it exists\n\tEachGroup.GroupWOLaborsNetViz = 0;\n\t//below declares a key on the entire wo to hold all Part Net Viz from all workorders so it exists\n\tEachGroup.GroupWOPartsNetViz = 0;\n\t//below declares a key on the entire wo to hold all Travel Net Viz from all workorders so it exists\n\tEachGroup.GroupWOTravelsNetViz = 0;\n\t//below declares a key on the entire wo to hold all Exp Net ChargeAmount from all workorders so it exists\n\tEachGroup.GroupWOExpsNetChargeAmount = 0;\n\t//below declares a key on the entire wo to hold all Loan Net Viz from all workorders so it exists\n\tEachGroup.GroupWOLoansNetViz = 0;\n\t//below declares a key on the entire wo to hold all OutsideServices Net Viz from all workorders so it exists\n\tEachGroup.GroupWOOutsidesNetViz = 0;\n\n\t//below declares a key to hold all Nets from all workorders in this list so it exists\n\tEachGroup.GroupWOTotalNets = 0;\n\n\t//below declares a key to hold all Tax As from all workorders in this list so it exists\n\tEachGroup.GroupWOTotalTaxAs = 0;\n\t//below declares a key to hold all Tax Bs from all workorders in this list so it exists\n\tEachGroup.GroupWOTotalTaxBs = 0;\n\t//below declares a key to hold all GrandTotal from all workorders in this list so it exists\n\tEachGroup.GroupWOTotalGrand = 0;\n\nfor (const EachWO of EachGroup.items) \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\t\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.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\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\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\n\t\t\t\t\t\tEachGroup.GroupWOLaborsNetViz += Labor.NetViz; //this IS where the actual adding to the running total for this Group's entire WO's Net Labors\n\t\t\t\t\t\tEachGroup.GroupWOTotalNets += Labor.NetViz; //this IS where the actual adding to the running total for ALL NETS for THIS Group's workorders in this report data\n\t\t\t\t\t\tEachGroup.GroupWOTotalTaxAs += Labor.TaxAViz;\n\t\t\t\t\t\tEachGroup.GroupWOTotalTaxBs += Labor.TaxBViz;\n\t\t\t\t\t\tEachGroup.GroupWOTotalGrand += Labor.NetViz; //this IS where the actual adding to the running total for GrandTotal for THIS Group's workorders in this report data\n\t\t\t\t\t\tEachGroup.GroupWOTotalGrand += Labor.TaxAViz;\n\t\t\t\t\t\tEachGroup.GroupWOTotalGrand += Labor.TaxBViz;\n\t\t\t\t\t\t\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\t\t\t\t\n\t\t\t\t\t\treportData.AllWOTotalGrand += Labor.NetViz; //this is where the actual adding to the running GRAND TOTAL for ALL workorders Grand Totals in this report data\n\t\t\t\t\t\treportData.AllWOTotalTaxAs += Labor.TaxAViz; //this is where the actual adding to the running GRAND TOTAL for ALL workorders Tax As in this report data\n\t\t\t\t\t\treportData.AllWOTotalGrand += Labor.TaxAViz; //this is where the actual adding to the running GRAND TOTAL for ALL workorders Grand Totals in this report data\n\t\t\t\t\t\treportData.AllWOTotalTaxBs += Labor.TaxBViz; //this is where the actual adding to the running GRAND TOTAL for ALL workorders Tax Bs in this report data\n\t\t\t\t\t\treportData.AllWOTotalGrand += Labor.TaxBViz; //this is where the actual adding to the running GRAND TOTAL for ALL workorders Grand Totals 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\t\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.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.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.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\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\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\t\t\t\t\t\t\n\n\t\t\t\t\t\tEachGroup.GroupWOPartsNetViz += Part.NetViz;//this IS where the actual adding to the running total for this entire Groups WO's Net Parts\n\t\t\t\t\t\tEachGroup.GroupWOTotalNets += Part.NetViz; //this IS where the actual adding to the running total for ALL NETS for THIS Groups workorders in this report data\n\t\t\t\t\t\tEachGroup.GroupWOTotalTaxAs += Part.TaxAViz;\n\t\t\t\t\t\tEachGroup.GroupWOTotalTaxBs += Part.TaxBViz;\n\t\t\t\t\t\tEachGroup.GroupWOTotalGrand += Part.NetViz; //this IS where the actual adding to the running total for GrandTotal for THIS Groups workorders in this report data\t\n\t\t\t\t\t\tEachGroup.GroupWOTotalGrand += Part.TaxAViz;\n\t\t\t\t\t\tEachGroup.GroupWOTotalGrand += Part.TaxBViz;\t\t\t\t\t\n\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\t\t\t\t\t\treportData.AllWOTotalGrand += Part.NetViz; //this is where the actual adding to the running GRAND TOTAL for ALL workorders Grand Totals in this report data\n\t\t\t\t\t\treportData.AllWOTotalTaxAs += Part.TaxAViz; //this is where the actual adding to the running GRAND TOTAL for ALL workorders Tax As in this report data\n\t\t\t\t\t\treportData.AllWOTotalGrand += Part.TaxAViz; //this is where the actual adding to the running GRAND TOTAL for ALL workorders Grand Totals in this report data\n\t\t\t\t\t\treportData.AllWOTotalTaxBs += Part.TaxBViz; //this is where the actual adding to the running GRAND TOTAL for ALL workorders Tax Bs in this report data\n\t\t\t\t\t\treportData.AllWOTotalGrand += Part.TaxBViz; //this is where the actual adding to the running GRAND TOTAL for ALL workorders Grand Totals 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\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\t\t\t\t\t\t\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.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\t\t\t\t\t\t\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\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\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\tEachGroup.GroupWOTravelsNetViz += Travel.NetViz;//this IS where the actual adding to the running total for this entire Groups WO's Net Travels\n\t\t\t\t\t\tEachGroup.GroupWOTotalNets += Travel.NetViz;//this IS where the actual adding to the running total for ALL NETS for THIS Groups workorders in this report data\n\t\t\t\t\t\tEachGroup.GroupWOTotalTaxAs += Travel.TaxAViz;\n\t\t\t\t\t\tEachGroup.GroupWOTotalTaxBs += Travel.TaxBViz;\n\t\t\t\t\t\tEachGroup.GroupWOTotalGrand += Travel.NetViz; //this IS where the actual adding to the running total for GrandTotal for THIS Groups workorders in this report data\n\t\t\t\t\t\tEachGroup.GroupWOTotalGrand += Travel.TaxAViz;\n\t\t\t\t\t\tEachGroup.GroupWOTotalGrand += Travel.TaxBViz;\n\n\t\t\t\t\t\treportData.AllWOTravelsNetViz += Travel.NetViz;\t//this IS where the actual adding to the running total for all Travels for all workorders in this report data\t\t\t\n\t\t\t\t\t\treportData.AllWOTotalNets += Travel.NetViz; //this is where the actual adding to the running total for all workorder Nets in this report data\n\t\t\t\t\t\treportData.AllWOTotalTaxAs += Travel.TaxAViz; //this is where the actual adding to the running GRAND TOTAL for ALL workorders Tax As in this report data\n\t\t\t\t\t\treportData.AllWOTotalGrand += Travel.TaxAViz; //this is where the actual adding to the running GRAND TOTAL for ALL workorders Grand Totals in this report data\n\t\t\t\t\t\treportData.AllWOTotalGrand += Travel.NetViz; //this is where the actual adding to the running GRAND TOTAL for ALL workorders Grand Totals in this report data\n\t\t\t\t\t\treportData.AllWOTotalTaxBs += Travel.TaxBViz; //this is where the actual adding to the running GRAND TOTAL for ALL workorders Tax Bs in this report data\n\t\t\t\t\t\treportData.AllWOTotalGrand += Travel.TaxBViz; //this is where the actual adding to the running GRAND TOTAL for ALL workorders Grand Totals 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\n\t\t\t\t\t\tEachGroup.GroupWOExpsNetChargeAmount += Exp.ChargeAmount;//this IS where the actual adding to the running total for this entire Groups WO's Net ChargeAmounts\n\t\t\t\t\t\tEachGroup.GroupWOTotalNets += Exp.ChargeAmount;//this IS where the actual adding to the running total for ALL NET ChargeAmountS for THIS Groups workorders in this report data\n\t\t\t\t\t\tEachGroup.GroupWOTotalGrand += Exp.ChargeAmount; //this IS where the actual adding to the running total for GrandTotal for THIS Groups workorders in this report data\n\n\t\t\t\t\t\treportData.AllWOExpsNetChargeAmount += Exp.ChargeAmount;//this IS where the actual adding to the running total for all Exp ChargeAmount for all workorders in this report data\t\t\t\t\n\t\t\t\t\t\treportData.AllWOTotalNets += Exp.ChargeAmount;//this is where the actual adding to the running total for all workorder Net ChargeAmount in this report data\n\t\t\t\t\t\treportData.AllWOTotalGrand += Exp.ChargeAmount; //this is where the actual adding to the running GRAND TOTAL for ALL workorders Grand Totals in this report data\n \t \t\t}\t\t\t\t\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\treportData.AllWOTotalTaxAs += Exp.TaxAViz; //this is where the actual adding to the running GRAND TOTAL for ALL workorders Tax As in this report data\n\t\t\t\t\t\treportData.AllWOTotalGrand += Exp.TaxAViz; //this is where the actual adding to the running GRAND TOTAL for ALL workorders Grand Totals in this report data\n\t\t\t\t\t\tEachGroup.GroupWOTotalTaxAs += Exp.TaxAViz; //this IS where the actual adding of Exp's Tax A to the running total for ALL Tax As for THIS Groups workorders in this report data\n\t\t\t\t\t\tEachGroup.GroupWOTotalGrand += Exp.TaxAViz; //this IS where the actual adding of Exp's Tax A to the running total for GrandTotal for THIS Groups 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\treportData.AllWOTotalTaxBs += Exp.TaxBViz; //this is where the actual adding to the running GRAND TOTAL for ALL workorders Tax Bs in this report data\n\t\t\t\t\t\treportData.AllWOTotalGrand += Exp.TaxBViz; //this is where the actual adding to the running GRAND TOTAL for ALL workorders Grand Totals in this report data\n\t\t\t\t\t\tEachGroup.GroupWOTotalTaxBs += Exp.TaxBViz; //this IS where the actual adding of Exp's Tax B to the running total for ALL Tax B for THIS Groups workorders in this report data\n\t\t\t\t\t\tEachGroup.GroupWOTotalGrand += Exp.TaxBViz; //this IS where the actual adding of Exp's Tax B to the running total for GrandTotal for THIS Groups workorders in this report data\n \t \t\t}\t\t\t\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\tEachGroup.GroupWOTotalTaxAs += Exp.TaxPaid; \n\t\t\t\t\t\tEachGroup.GroupWOTotalGrand += Exp.TaxPaid;\n\t\t\t\t\t\treportData.AllWOTotalTaxAs += Exp.TaxPaid; //this is where the actual adding to the running GRAND TOTAL for ALL workorders Tax As in this report data\n\t\t\t\t\t\treportData.AllWOTotalGrand += Exp.TaxPaid; //this is where the actual adding to the running GRAND TOTAL for ALL workorders Grand Totals in this report data\n\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\t\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\t\t\t\t\t\t\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\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\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\n\t\t\t\t\t\tEachGroup.GroupWOLoansNetViz += Loan.NetViz;//this IS where the actual adding to the running total for this entire Groups WO's Net Loans\t\t\t\t\t\t\n\t\t\t\t\t\tEachGroup.GroupWOTotalNets += Loan.NetViz;//this IS where the actual adding to the running total for ALL NETS for THIS Groups workorders in this report data\n\t\t\t\t\t\tEachGroup.GroupWOTotalGrand += Loan.NetViz; //this IS where the actual adding to the running total for GrandTotal for THIS Groups workorders in this report data\t\n\t\t\t\t\t\tEachGroup.GroupWOTotalTaxAs += Loan.TaxAViz;\n\t\t\t\t\t\tEachGroup.GroupWOTotalGrand += Loan.TaxAViz;\n\t\t\t\t\t\tEachGroup.GroupWOTotalTaxBs += Loan.TaxBViz;\n\t\t\t\t\t\tEachGroup.GroupWOTotalGrand += Loan.TaxBViz;\t\t\t\t\t\n\n\t\t\t\t\t\t\n\t\t\t\t\t\t\n\t\t\t\t\t\treportData.AllWOTotalTaxAs += Loan.TaxAViz; //this is where the actual adding to the running GRAND TOTAL for ALL workorders Tax As in this report data\n\t\t\t\t\t\treportData.AllWOTotalGrand += Loan.TaxAViz; //this is where the actual adding to the running GRAND TOTAL for ALL workorders Grand Totals in this report data\t\n\t\t\t\t\t\treportData.AllWOLoansNetViz += Loan.NetViz;\t\t//this IS where the actual adding to the running total for all Loans for all workorders in this report data\t\t\n\t\t\t\t\t\treportData.AllWOTotalNets += Loan.NetViz;//this is where the actual adding to the running total for all workorder Nets in this report data\n\t\t\t\t\t\treportData.AllWOTotalGrand += Loan.NetViz; //this is where the actual adding to the running GRAND TOTAL for ALL workorders Grand Totals in this report data\n\t\t\t\t\t\treportData.AllWOTotalTaxBs += Loan.TaxBViz; //this is where the actual adding to the running GRAND TOTAL for ALL workorders Tax Bs in this report data\n\t\t\t\t\t\treportData.AllWOTotalGrand += Loan.TaxBViz; //this is where the actual adding to the running GRAND TOTAL for ALL workorders Grand Totals 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\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\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\n\t\t\t\t\t\tEachGroup.GroupWOOutsidesNetViz += Outside.NetViz;//this IS where the actual adding to the running total for this entire Groups WO's Net Outsides\n\t\t\t\t\t\tEachGroup.GroupWOTotalNets += Outside.NetViz;//this IS where the actual adding to the running total for ALL NETS for THIS Groups workorders in this report data\n\t\t\t\t\t\tEachGroup.GroupWOTotalTaxAs += Outside.TaxAViz;\n\t\t\t\t\t\tEachGroup.GroupWOTotalTaxBs += Outside.TaxBViz;\n\t\t\t\t\t\tEachGroup.GroupWOTotalGrand += Outside.NetViz; //this IS where the actual adding to the running total for GrandTotal for THIS Groups workorders in this report data\n\t\t\t\t\t\tEachGroup.GroupWOTotalGrand += Outside.TaxAViz;\n\t\t\t\t\t\tEachGroup.GroupWOTotalGrand += Outside.TaxBViz;\n\n\t\t\t\t\t\treportData.AllWOOutsidesNetViz += Outside.NetViz;\t//this IS where the actual adding to the running total for all Outside for all workorders in this report data\t\t\t\n\t\t\t\t\t\treportData.AllWOTotalNets += Outside.NetViz;//this is where the actual adding to the running total for all workorder Nets in this report data\n\t\t\t\t\t\treportData.AllWOTotalGrand += Outside.NetViz; //this is where the actual adding to the running GRAND TOTAL for ALL workorders Grand Totals in this report data\t\t\t\t\t\t\n\t\t\t\t\t\treportData.AllWOTotalTaxAs += Outside.TaxAViz; //this is where the actual adding to the running GRAND TOTAL for ALL workorders Tax As in this report data\n\t\t\t\t\t\treportData.AllWOTotalGrand += Outside.TaxAViz; //this is where the actual adding to the running GRAND TOTAL for ALL workorders Grand Totals in this report data\t\t\t\t\t\t\n\t\t\t\t\t\treportData.AllWOTotalTaxBs += Outside.TaxBViz; //this is where the actual adding to the running GRAND TOTAL for ALL workorders Tax Bs in this report data\n\t\t\t\t\t\treportData.AllWOTotalGrand += Outside.TaxBViz; //this is where the actual adding to the running GRAND TOTAL for ALL workorders Grand Totals 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}\n\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":"10mm","MarginOptionsRight":"10mm","MarginOptionsTop":"10mm","PageRanges":null,"PreferCSSPageSize":false,"PrintBackground":true,"Scale":1.00000} \ No newline at end of file +{"Name":"Charges Summary Grouped By Customer","Active":true,"Notes":"Custom Prepare to obtain and display WO total nets, taxes and grand total","Roles":50538,"AType":34,"IncludeWoItemDescendants":false,"Template":"\n\n\n
\n
\n\t\t\t

Nets Taxes & Totals for each {{ayT 'Customer'}}

\n\t\t
\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 {{#each items}}\n \n \n \n {{#if ServiceDate }}{{else}}{{/if}}\n \n {{#if ThisWOAllLaborsNetViz }}{{else}}{{/if}}\n {{#if ThisWOAllPartsNetViz }}{{else}}{{/if}}\n {{#if ThisWOAllTravelsNetViz }}{{else}}{{/if}}\n {{#if ThisWOAllExpsNetChargeAmount }}{{else}}{{/if}}\n {{#if ThisWOAllLoansNetViz }}{{else}}{{/if}}\n {{#if ThisWOAllOutsidesNetViz }}{{else}}{{/if}}\n {{#if ThisWOTotalNets }} {{else}} {{/if}}\n {{#if ThisWOTotalTaxAs }} {{else}} {{/if}}\n {{#if ThisWOTotalTaxBs }} {{else}} {{/if}}\n {{#if ThisWOTotalGrand }} {{else}} {{/if}} \n \n {{/each}}\n \n \n \n \n \n {{#if GroupWOLaborsNetViz }}{{else}}{{/if}}\n {{#if GroupWOPartsNetViz }}{{else}}{{/if}}\n {{#if GroupWOTravelsNetViz }}{{else}}{{/if}}\n {{#if GroupWOExpsNetChargeAmount }}{{else}}{{/if}}\n {{#if GroupWOLoansNetViz }}{{else}}{{/if}}\n {{#if GroupWOOutsidesNetViz }}{{else}}{{/if}}\n {{#if GroupWOTotalNets }} {{else}} {{/if}}\n {{#if GroupWOTotalTaxAs }} {{else}} {{/if}}\n {{#if GroupWOTotalTaxBs }} {{else}} {{/if}}\n {{#if GroupWOTotalGrand }} {{else}} {{/if}} \n \n \n \n \n {{/each}}\n \n
{{ayT 'Customer'}}{{ayT 'WorkOrder'}}{{ayT 'WorkOrderServiceDate'}}{{ayT 'WorkOrderStatus'}}{{ayT 'WorkOrderItemLaborList'}}{{ayT 'WorkOrderItemPartList'}}{{ayT 'WorkOrderItemTravelList'}}{{ayT 'WorkOrderItemExpenseList'}}{{ayT 'WorkOrderItemLoanList'}}{{ayT 'WorkOrderItemOutsideService'}}{{ayT 'NetPrice'}}{{ayT 'TaxCodeTaxA'}}{{ayT 'TaxCodeTaxB'}}{{ayT 'Total'}}
{{group}}
 {{Serial}}{{ayDate ServiceDate}}no Service Date specified{{LastStateNameViz}}{{ayCurrency ThisWOAllLaborsNetViz}}none billable{{ayCurrency ThisWOAllPartsNetViz}}none billable{{ayCurrency ThisWOAllTravelsNetViz}}none billable{{ayCurrency ThisWOAllExpsNetChargeAmount}}none billable{{ayCurrency ThisWOAllLoansNetViz}}none billable{{ayCurrency ThisWOAllOutsidesNetViz}}none billable{{ayCurrency ThisWOTotalNets}}none billable{{ayCurrency ThisWOTotalTaxAs}}none{{ayCurrency ThisWOTotalTaxBs}}none{{ayCurrency ThisWOTotalGrand}}none billable
 
{{group}} Totals{{ayCurrency GroupWOLaborsNetViz}}none billable{{ayCurrency GroupWOPartsNetViz}}none billable{{ayCurrency GroupWOTravelsNetViz}}none billable{{ayCurrency GroupWOExpsNetChargeAmount}}none billable{{ayCurrency GroupWOLoansNetViz}}none billable{{ayCurrency GroupWOOutsidesNetViz}}none billable{{ayCurrency GroupWOTotalNets}}none billable{{ayCurrency GroupWOTotalTaxAs}}none{{ayCurrency GroupWOTotalTaxBs}}none{{ayCurrency GroupWOTotalGrand}}none billable
 
\n\n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n {{#if AllWOLaborsNetViz}} {{else}} {{/if}}\n {{#if AllWOPartsNetViz}} {{else}} {{/if}}\n {{#if AllWOTravelsNetViz}} {{else}} {{/if}}\n {{#if AllWOExpsNetChargeAmount}} {{else}} {{/if}}\n {{#if AllWOLoansNetViz}} {{else}} {{/if}}\n {{#if AllWOOutsidesNetViz}} {{else}} {{/if}}\n {{#if AllWOTotalNets}} {{else}} {{/if}}\n {{#if AllWOTotalTaxAs}} {{else}} {{/if}}\n {{#if AllWOTotalTaxBs }} {{else}} {{/if}}\n {{#if AllWOTotalGrand}} {{else}} {{/if}}\n \n \n
Totals for all{{ayT 'WorkOrderItemLaborList'}}{{ayT 'WorkOrderItemPartList'}}{{ayT 'WorkOrderItemTravelList'}}{{ayT 'WorkOrderItemExpenseList'}}{{ayT 'WorkOrderItemLoanList'}}{{ayT 'WorkOrderItemOutsideService'}}{{ayT 'NetPrice'}}{{ayT 'TaxCodeTaxA'}}{{ayT 'TaxCodeTaxB'}}{{ayT 'Total'}}
{{ ayCurrency AllWOLaborsNetViz }}$0.00{{ ayCurrency AllWOPartsNetViz }}$0.00{{ ayCurrency AllWOTravelsNetViz }}$0.00{{ ayCurrency AllWOExpsNetChargeAmount }}$0.00{{ ayCurrency AllWOLoansNetViz }}$0.00{{ ayCurrency AllWOOutsidesNetViz }}$0.00{{ ayCurrency AllWOTotalNets }}$0.00{{ ayCurrency AllWOTotalTaxAs }}$0.00{{ ayCurrency AllWOTotalTaxBs }}$0.00{{ ayCurrency AllWOTotalGrand }}$0.00
\n
\n\n\n\n\n","Style":".minimum {\n font-size: 5pt;\n}\n\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 /* border-bottom: solid 1pt #9e9e9e; */\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: 6pt;\n text-align: center;\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 //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\treportData.ayReportData = ayGroupByKey(reportData.ayReportData, 'CustomerViz')\n\t\n\tawait ayGetTranslations([\"WorkOrder\", \"Customer\", \"WorkOrderServiceDate\", \"WorkOrderStatus\", \"NetPrice\", \"WorkOrderItemLaborList\", \"WorkOrderItemPartList\", \"WorkOrderItemTravelList\", \"WorkOrderItemExpenseList\", \"WorkOrderItemLoanList\", \"WorkOrderItemOutsideService\", \"TaxCodeTaxA\", \"TaxCodeTaxB\", \"Total\" ]);\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 Net Viz from all workorders reported on in this report so it exists\nreportData.AllWOLaborsNetViz = 0;\n//below declares a key on the entire wo to hold all Part Net Viz from all workorders so it exists\nreportData.AllWOPartsNetViz = 0;\n//below declares a key on the entire wo to hold all Travel Net Viz from all workorders so it exists\nreportData.AllWOTravelsNetViz = 0;\n//below declares a key on the entire wo to hold all Exp Net ChargeAmount from all workorders so it exists\nreportData.AllWOExpsNetChargeAmount = 0;\n//below declares a key on the entire wo to hold all Loan Net Viz from all workorders so it exists\nreportData.AllWOLoansNetViz = 0;\n//below declares a key on the entire wo to hold all OutsideServices Net Viz from all workorders so it exists\nreportData.AllWOOutsidesNetViz = 0;\n\n//below declares a key to hold all Nets from all workorders in this list so it exists\nreportData.AllWOTotalNets = 0;\n\n//below declares a key to hold all Tax As from all workorders in this list so it exists\nreportData.AllWOTotalTaxAs = 0;\n//below declares a key to hold all Tax Bs from all workorders in this list so it exists\nreportData.AllWOTotalTaxBs = 0;\n//below declares a key to hold all GrandTotal from all workorders in this list so it exists\nreportData.AllWOTotalGrand = 0;\n\n\nfor (const EachGroup of reportData.ayReportData) {\n\n\t//below declares a key on the entire wo to hold all Labor Net Viz from all workorders reported on in this report so it exists\n\tEachGroup.GroupWOLaborsNetViz = 0;\n\t//below declares a key on the entire wo to hold all Part Net Viz from all workorders so it exists\n\tEachGroup.GroupWOPartsNetViz = 0;\n\t//below declares a key on the entire wo to hold all Travel Net Viz from all workorders so it exists\n\tEachGroup.GroupWOTravelsNetViz = 0;\n\t//below declares a key on the entire wo to hold all Exp Net ChargeAmount from all workorders so it exists\n\tEachGroup.GroupWOExpsNetChargeAmount = 0;\n\t//below declares a key on the entire wo to hold all Loan Net Viz from all workorders so it exists\n\tEachGroup.GroupWOLoansNetViz = 0;\n\t//below declares a key on the entire wo to hold all OutsideServices Net Viz from all workorders so it exists\n\tEachGroup.GroupWOOutsidesNetViz = 0;\n\n\t//below declares a key to hold all Nets from all workorders in this list so it exists\n\tEachGroup.GroupWOTotalNets = 0;\n\n\t//below declares a key to hold all Tax As from all workorders in this list so it exists\n\tEachGroup.GroupWOTotalTaxAs = 0;\n\t//below declares a key to hold all Tax Bs from all workorders in this list so it exists\n\tEachGroup.GroupWOTotalTaxBs = 0;\n\t//below declares a key to hold all GrandTotal from all workorders in this list so it exists\n\tEachGroup.GroupWOTotalGrand = 0;\n\nfor (const EachWO of EachGroup.items) \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\t\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.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\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\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\n\t\t\t\t\t\tEachGroup.GroupWOLaborsNetViz += Labor.NetViz; //this IS where the actual adding to the running total for this Group's entire WO's Net Labors\n\t\t\t\t\t\tEachGroup.GroupWOTotalNets += Labor.NetViz; //this IS where the actual adding to the running total for ALL NETS for THIS Group's workorders in this report data\n\t\t\t\t\t\tEachGroup.GroupWOTotalTaxAs += Labor.TaxAViz;\n\t\t\t\t\t\tEachGroup.GroupWOTotalTaxBs += Labor.TaxBViz;\n\t\t\t\t\t\tEachGroup.GroupWOTotalGrand += Labor.NetViz; //this IS where the actual adding to the running total for GrandTotal for THIS Group's workorders in this report data\n\t\t\t\t\t\tEachGroup.GroupWOTotalGrand += Labor.TaxAViz;\n\t\t\t\t\t\tEachGroup.GroupWOTotalGrand += Labor.TaxBViz;\n\t\t\t\t\t\t\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\t\t\t\t\n\t\t\t\t\t\treportData.AllWOTotalGrand += Labor.NetViz; //this is where the actual adding to the running GRAND TOTAL for ALL workorders Grand Totals in this report data\n\t\t\t\t\t\treportData.AllWOTotalTaxAs += Labor.TaxAViz; //this is where the actual adding to the running GRAND TOTAL for ALL workorders Tax As in this report data\n\t\t\t\t\t\treportData.AllWOTotalGrand += Labor.TaxAViz; //this is where the actual adding to the running GRAND TOTAL for ALL workorders Grand Totals in this report data\n\t\t\t\t\t\treportData.AllWOTotalTaxBs += Labor.TaxBViz; //this is where the actual adding to the running GRAND TOTAL for ALL workorders Tax Bs in this report data\n\t\t\t\t\t\treportData.AllWOTotalGrand += Labor.TaxBViz; //this is where the actual adding to the running GRAND TOTAL for ALL workorders Grand Totals 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\t\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.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.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.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\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\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\t\t\t\t\t\t\n\n\t\t\t\t\t\tEachGroup.GroupWOPartsNetViz += Part.NetViz;//this IS where the actual adding to the running total for this entire Groups WO's Net Parts\n\t\t\t\t\t\tEachGroup.GroupWOTotalNets += Part.NetViz; //this IS where the actual adding to the running total for ALL NETS for THIS Groups workorders in this report data\n\t\t\t\t\t\tEachGroup.GroupWOTotalTaxAs += Part.TaxAViz;\n\t\t\t\t\t\tEachGroup.GroupWOTotalTaxBs += Part.TaxBViz;\n\t\t\t\t\t\tEachGroup.GroupWOTotalGrand += Part.NetViz; //this IS where the actual adding to the running total for GrandTotal for THIS Groups workorders in this report data\t\n\t\t\t\t\t\tEachGroup.GroupWOTotalGrand += Part.TaxAViz;\n\t\t\t\t\t\tEachGroup.GroupWOTotalGrand += Part.TaxBViz;\t\t\t\t\t\n\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\t\t\t\t\t\treportData.AllWOTotalGrand += Part.NetViz; //this is where the actual adding to the running GRAND TOTAL for ALL workorders Grand Totals in this report data\n\t\t\t\t\t\treportData.AllWOTotalTaxAs += Part.TaxAViz; //this is where the actual adding to the running GRAND TOTAL for ALL workorders Tax As in this report data\n\t\t\t\t\t\treportData.AllWOTotalGrand += Part.TaxAViz; //this is where the actual adding to the running GRAND TOTAL for ALL workorders Grand Totals in this report data\n\t\t\t\t\t\treportData.AllWOTotalTaxBs += Part.TaxBViz; //this is where the actual adding to the running GRAND TOTAL for ALL workorders Tax Bs in this report data\n\t\t\t\t\t\treportData.AllWOTotalGrand += Part.TaxBViz; //this is where the actual adding to the running GRAND TOTAL for ALL workorders Grand Totals 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\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\t\t\t\t\t\t\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.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\t\t\t\t\t\t\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\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\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\tEachGroup.GroupWOTravelsNetViz += Travel.NetViz;//this IS where the actual adding to the running total for this entire Groups WO's Net Travels\n\t\t\t\t\t\tEachGroup.GroupWOTotalNets += Travel.NetViz;//this IS where the actual adding to the running total for ALL NETS for THIS Groups workorders in this report data\n\t\t\t\t\t\tEachGroup.GroupWOTotalTaxAs += Travel.TaxAViz;\n\t\t\t\t\t\tEachGroup.GroupWOTotalTaxBs += Travel.TaxBViz;\n\t\t\t\t\t\tEachGroup.GroupWOTotalGrand += Travel.NetViz; //this IS where the actual adding to the running total for GrandTotal for THIS Groups workorders in this report data\n\t\t\t\t\t\tEachGroup.GroupWOTotalGrand += Travel.TaxAViz;\n\t\t\t\t\t\tEachGroup.GroupWOTotalGrand += Travel.TaxBViz;\n\n\t\t\t\t\t\treportData.AllWOTravelsNetViz += Travel.NetViz;\t//this IS where the actual adding to the running total for all Travels for all workorders in this report data\t\t\t\n\t\t\t\t\t\treportData.AllWOTotalNets += Travel.NetViz; //this is where the actual adding to the running total for all workorder Nets in this report data\n\t\t\t\t\t\treportData.AllWOTotalTaxAs += Travel.TaxAViz; //this is where the actual adding to the running GRAND TOTAL for ALL workorders Tax As in this report data\n\t\t\t\t\t\treportData.AllWOTotalGrand += Travel.TaxAViz; //this is where the actual adding to the running GRAND TOTAL for ALL workorders Grand Totals in this report data\n\t\t\t\t\t\treportData.AllWOTotalGrand += Travel.NetViz; //this is where the actual adding to the running GRAND TOTAL for ALL workorders Grand Totals in this report data\n\t\t\t\t\t\treportData.AllWOTotalTaxBs += Travel.TaxBViz; //this is where the actual adding to the running GRAND TOTAL for ALL workorders Tax Bs in this report data\n\t\t\t\t\t\treportData.AllWOTotalGrand += Travel.TaxBViz; //this is where the actual adding to the running GRAND TOTAL for ALL workorders Grand Totals 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\n\t\t\t\t\t\tEachGroup.GroupWOExpsNetChargeAmount += Exp.ChargeAmount;//this IS where the actual adding to the running total for this entire Groups WO's Net ChargeAmounts\n\t\t\t\t\t\tEachGroup.GroupWOTotalNets += Exp.ChargeAmount;//this IS where the actual adding to the running total for ALL NET ChargeAmountS for THIS Groups workorders in this report data\n\t\t\t\t\t\tEachGroup.GroupWOTotalGrand += Exp.ChargeAmount; //this IS where the actual adding to the running total for GrandTotal for THIS Groups workorders in this report data\n\n\t\t\t\t\t\treportData.AllWOExpsNetChargeAmount += Exp.ChargeAmount;//this IS where the actual adding to the running total for all Exp ChargeAmount for all workorders in this report data\t\t\t\t\n\t\t\t\t\t\treportData.AllWOTotalNets += Exp.ChargeAmount;//this is where the actual adding to the running total for all workorder Net ChargeAmount in this report data\n\t\t\t\t\t\treportData.AllWOTotalGrand += Exp.ChargeAmount; //this is where the actual adding to the running GRAND TOTAL for ALL workorders Grand Totals in this report data\n \t \t\t}\t\t\t\t\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\treportData.AllWOTotalTaxAs += Exp.TaxAViz; //this is where the actual adding to the running GRAND TOTAL for ALL workorders Tax As in this report data\n\t\t\t\t\t\treportData.AllWOTotalGrand += Exp.TaxAViz; //this is where the actual adding to the running GRAND TOTAL for ALL workorders Grand Totals in this report data\n\t\t\t\t\t\tEachGroup.GroupWOTotalTaxAs += Exp.TaxAViz; //this IS where the actual adding of Exp's Tax A to the running total for ALL Tax As for THIS Groups workorders in this report data\n\t\t\t\t\t\tEachGroup.GroupWOTotalGrand += Exp.TaxAViz; //this IS where the actual adding of Exp's Tax A to the running total for GrandTotal for THIS Groups 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\treportData.AllWOTotalTaxBs += Exp.TaxBViz; //this is where the actual adding to the running GRAND TOTAL for ALL workorders Tax Bs in this report data\n\t\t\t\t\t\treportData.AllWOTotalGrand += Exp.TaxBViz; //this is where the actual adding to the running GRAND TOTAL for ALL workorders Grand Totals in this report data\n\t\t\t\t\t\tEachGroup.GroupWOTotalTaxBs += Exp.TaxBViz; //this IS where the actual adding of Exp's Tax B to the running total for ALL Tax B for THIS Groups workorders in this report data\n\t\t\t\t\t\tEachGroup.GroupWOTotalGrand += Exp.TaxBViz; //this IS where the actual adding of Exp's Tax B to the running total for GrandTotal for THIS Groups workorders in this report data\n \t \t\t}\t\t\t\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\tEachGroup.GroupWOTotalTaxAs += Exp.TaxPaid; \n\t\t\t\t\t\tEachGroup.GroupWOTotalGrand += Exp.TaxPaid;\n\t\t\t\t\t\treportData.AllWOTotalTaxAs += Exp.TaxPaid; //this is where the actual adding to the running GRAND TOTAL for ALL workorders Tax As in this report data\n\t\t\t\t\t\treportData.AllWOTotalGrand += Exp.TaxPaid; //this is where the actual adding to the running GRAND TOTAL for ALL workorders Grand Totals in this report data\n\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\t\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\t\t\t\t\t\t\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\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\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\n\t\t\t\t\t\tEachGroup.GroupWOLoansNetViz += Loan.NetViz;//this IS where the actual adding to the running total for this entire Groups WO's Net Loans\t\t\t\t\t\t\n\t\t\t\t\t\tEachGroup.GroupWOTotalNets += Loan.NetViz;//this IS where the actual adding to the running total for ALL NETS for THIS Groups workorders in this report data\n\t\t\t\t\t\tEachGroup.GroupWOTotalGrand += Loan.NetViz; //this IS where the actual adding to the running total for GrandTotal for THIS Groups workorders in this report data\t\n\t\t\t\t\t\tEachGroup.GroupWOTotalTaxAs += Loan.TaxAViz;\n\t\t\t\t\t\tEachGroup.GroupWOTotalGrand += Loan.TaxAViz;\n\t\t\t\t\t\tEachGroup.GroupWOTotalTaxBs += Loan.TaxBViz;\n\t\t\t\t\t\tEachGroup.GroupWOTotalGrand += Loan.TaxBViz;\t\t\t\t\t\n\n\t\t\t\t\t\t\n\t\t\t\t\t\t\n\t\t\t\t\t\treportData.AllWOTotalTaxAs += Loan.TaxAViz; //this is where the actual adding to the running GRAND TOTAL for ALL workorders Tax As in this report data\n\t\t\t\t\t\treportData.AllWOTotalGrand += Loan.TaxAViz; //this is where the actual adding to the running GRAND TOTAL for ALL workorders Grand Totals in this report data\t\n\t\t\t\t\t\treportData.AllWOLoansNetViz += Loan.NetViz;\t\t//this IS where the actual adding to the running total for all Loans for all workorders in this report data\t\t\n\t\t\t\t\t\treportData.AllWOTotalNets += Loan.NetViz;//this is where the actual adding to the running total for all workorder Nets in this report data\n\t\t\t\t\t\treportData.AllWOTotalGrand += Loan.NetViz; //this is where the actual adding to the running GRAND TOTAL for ALL workorders Grand Totals in this report data\n\t\t\t\t\t\treportData.AllWOTotalTaxBs += Loan.TaxBViz; //this is where the actual adding to the running GRAND TOTAL for ALL workorders Tax Bs in this report data\n\t\t\t\t\t\treportData.AllWOTotalGrand += Loan.TaxBViz; //this is where the actual adding to the running GRAND TOTAL for ALL workorders Grand Totals 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\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\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\n\t\t\t\t\t\tEachGroup.GroupWOOutsidesNetViz += Outside.NetViz;//this IS where the actual adding to the running total for this entire Groups WO's Net Outsides\n\t\t\t\t\t\tEachGroup.GroupWOTotalNets += Outside.NetViz;//this IS where the actual adding to the running total for ALL NETS for THIS Groups workorders in this report data\n\t\t\t\t\t\tEachGroup.GroupWOTotalTaxAs += Outside.TaxAViz;\n\t\t\t\t\t\tEachGroup.GroupWOTotalTaxBs += Outside.TaxBViz;\n\t\t\t\t\t\tEachGroup.GroupWOTotalGrand += Outside.NetViz; //this IS where the actual adding to the running total for GrandTotal for THIS Groups workorders in this report data\n\t\t\t\t\t\tEachGroup.GroupWOTotalGrand += Outside.TaxAViz;\n\t\t\t\t\t\tEachGroup.GroupWOTotalGrand += Outside.TaxBViz;\n\n\t\t\t\t\t\treportData.AllWOOutsidesNetViz += Outside.NetViz;\t//this IS where the actual adding to the running total for all Outside for all workorders in this report data\t\t\t\n\t\t\t\t\t\treportData.AllWOTotalNets += Outside.NetViz;//this is where the actual adding to the running total for all workorder Nets in this report data\n\t\t\t\t\t\treportData.AllWOTotalGrand += Outside.NetViz; //this is where the actual adding to the running GRAND TOTAL for ALL workorders Grand Totals in this report data\t\t\t\t\t\t\n\t\t\t\t\t\treportData.AllWOTotalTaxAs += Outside.TaxAViz; //this is where the actual adding to the running GRAND TOTAL for ALL workorders Tax As in this report data\n\t\t\t\t\t\treportData.AllWOTotalGrand += Outside.TaxAViz; //this is where the actual adding to the running GRAND TOTAL for ALL workorders Grand Totals in this report data\t\t\t\t\t\t\n\t\t\t\t\t\treportData.AllWOTotalTaxBs += Outside.TaxBViz; //this is where the actual adding to the running GRAND TOTAL for ALL workorders Tax Bs in this report data\n\t\t\t\t\t\treportData.AllWOTotalGrand += Outside.TaxBViz; //this is where the actual adding to the running GRAND TOTAL for ALL workorders Grand Totals 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}\n\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":"10mm","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 Invoice.ayrt b/server/AyaNova/resource/rpt/stock-report-templates/Customer Invoice.ayrt index e5db769d..9cbfc2d1 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 'NetValue'}}{{ayT 'TaxCodeTaxA'}}{{ayT 'TaxCodeTaxB'}}{{ayT 'LineTotal'}}
  {{ayT 'WorkOrderItemExpenses'}}: {{Name}}{{ayCurrency ChargeAmount}}{{ayCurrency TaxAViz}}{{ayCurrency TaxPaid}}{{ayCurrency TaxBViz}} {{ayCurrency LineTotalViz}}
{{ayT 'WorkOrderItemExpenses'}}: {{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\", \"NetValue\", \"TaxCodeTaxA\", \"TaxCodeTaxB\", \"LineTotal\", \"WorkOrderItemExpenses\", \"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 'WorkOrderItemExpenses'}}: {{Name}}{{ayCurrency ChargeAmount}}{{ayCurrency TaxAViz}}{{ayCurrency TaxPaid}}{{ayCurrency TaxBViz}} {{ayCurrency LineTotalViz}}
{{ayT 'WorkOrderItemExpenses'}}: {{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\", \"WorkOrderItemExpenses\", \"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 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 10cbbf86..0f5f5a25 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 'NetValue'}}{{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 'NetValue'}}{{ayT 'WorkOrderItemParts'}} {{ayT 'NetValue'}}{{ayT 'TaxCodeTaxA'}} {{ayT 'NetValue'}}{{ayT 'TaxCodeTaxB'}} {{ayT 'NetValue'}} {{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\", \"NetValue\", \"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 '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 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 139ce83a..3d9587fe 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 'NetValue'}}{{ayT 'TaxCodeTaxA'}}{{ayT 'TaxCodeTaxB'}}{{ayT 'LineTotal'}}
 {{ayT 'WorkOrderItemExpenses'}}: {{Name}}{{ayCurrency ChargeAmount}}{{ayCurrency TaxAViz}}{{ayCurrency TaxPaid}}{{ayCurrency TaxBViz}} {{ayCurrency LineTotalViz}}
{{ayT 'WorkOrderItemExpenses'}}: {{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\", \"NetValue\", \"TaxCodeTaxA\", \"TaxCodeTaxB\", \"LineTotal\", \"WorkOrderItemExpenses\", \"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 'WorkOrderItemExpenses'}}: {{Name}}{{ayCurrency ChargeAmount}}{{ayCurrency TaxAViz}}{{ayCurrency TaxPaid}}{{ayCurrency TaxBViz}} {{ayCurrency LineTotalViz}}
{{ayT 'WorkOrderItemExpenses'}}: {{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\", \"WorkOrderItemExpenses\", \"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 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 31ead3b4..963c339c 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 \"NetValue\"}}
{{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 \"NetValue\"}}
 {{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\", \"NetValue\"]);\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 \"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 diff --git a/server/AyaNova/resource/rpt/stock-report-templates/Net Taxes and Totals for Each WO.ayrt b/server/AyaNova/resource/rpt/stock-report-templates/Net Taxes and Totals for Each WO.ayrt index bcf87996..31310a46 100644 --- a/server/AyaNova/resource/rpt/stock-report-templates/Net Taxes and Totals for Each WO.ayrt +++ b/server/AyaNova/resource/rpt/stock-report-templates/Net Taxes and Totals for Each WO.ayrt @@ -1 +1 @@ -{"Name":"Net Taxes and Totals for Each WO","Active":true,"Notes":"Custom Prepare to display each WO total nets, taxes and grand total; and totals for all workorders in list","Roles":50538,"AType":34,"IncludeWoItemDescendants":false,"Template":"\n\n\n
\n
\n\t\t\t

Nets Taxes and Totals for each {{ayT 'WorkOrder'}}

\n\t\t
\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 {{#if ServiceDate }}{{else}}{{/if}}\n {{#if ThisWOAllLaborsNetViz }}{{else}}{{/if}}\n {{#if ThisWOAllPartsNetViz }}{{else}}{{/if}}\n {{#if ThisWOAllTravelsNetViz }}{{else}}{{/if}}\n {{#if ThisWOAllExpsNetChargeAmount }}{{else}}{{/if}}\n {{#if ThisWOAllLoansNetViz }}{{else}}{{/if}}\n {{#if ThisWOAllOutsidesNetViz }}{{else}}{{/if}}\n {{#if ThisWOTotalNets }} {{else}} {{/if}}\n {{#if ThisWOTotalTaxAs }} {{else}} {{/if}}\n {{#if ThisWOTotalTaxBs }} {{else}} {{/if}}\n {{#if ThisWOTotalGrand }} {{else}} {{/if}}\n \n \n {{/each}}\n \n
{{ayT 'WorkOrder'}}{{ayT 'Customer'}}{{ayT 'WorkOrderServiceDate'}}{{ayT 'WorkOrderItemLaborList'}}{{ayT 'WorkOrderItemPartList'}}{{ayT 'WorkOrderItemTravelList'}}{{ayT 'WorkOrderItemExpenseList'}}{{ayT 'WorkOrderItemLoanList'}}{{ayT 'WorkOrderItemOutsideService'}}{{ayT 'NetValue'}}{{ayT 'TaxCodeTaxA'}}{{ayT 'TaxCodeTaxB'}}{{ayT 'Total'}}
{{Serial}}{{CustomerViz}}{{ayDate ServiceDate}}no Service Date specified{{ayCurrency ThisWOAllLaborsNetViz}}none billable{{ayCurrency ThisWOAllPartsNetViz}}none billable{{ayCurrency ThisWOAllTravelsNetViz}}none billable{{ayCurrency ThisWOAllExpsNetChargeAmount}}none billable{{ayCurrency ThisWOAllLoansNetViz}}none billable{{ayCurrency ThisWOAllOutsidesNetViz}}none billable{{ayCurrency ThisWOTotalNets}}none billable{{ayCurrency ThisWOTotalTaxAs}}none{{ayCurrency ThisWOTotalTaxBs}}none{{ayCurrency ThisWOTotalGrand}}none billable
\n\n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n {{#if AllWOLaborsNetViz}} {{else}} {{/if}}\n {{#if AllWOPartsNetViz}} {{else}} {{/if}}\n {{#if AllWOTravelsNetViz}} {{else}} {{/if}}\n {{#if AllWOExpsNetChargeAmount}} {{else}} {{/if}}\n {{#if AllWOLoansNetViz}} {{else}} {{/if}}\n {{#if AllWOOutsidesNetViz}} {{else}} {{/if}}\n {{#if AllWOTotalNets}} {{else}} {{/if}}\n {{#if AllWOTotalTaxAs}} {{else}} {{/if}}\n {{#if AllWOTotalTaxBs }} {{else}} {{/if}}\n {{#if AllWOTotalGrand}} {{else}} {{/if}}\n \n \n
Totals for all{{ayT 'WorkOrderItemLaborList'}}{{ayT 'WorkOrderItemPartList'}}{{ayT 'WorkOrderItemTravelList'}}{{ayT 'WorkOrderItemExpenseList'}}{{ayT 'WorkOrderItemLoanList'}}{{ayT 'WorkOrderItemOutsideService'}}{{ayT 'NetValue'}}{{ayT 'TaxCodeTaxA'}}{{ayT 'TaxCodeTaxB'}}{{ayT 'Total'}}
{{ ayCurrency AllWOLaborsNetViz }}$0.00{{ ayCurrency AllWOPartsNetViz }}$0.00{{ ayCurrency AllWOTravelsNetViz }}$0.00{{ ayCurrency AllWOExpsNetChargeAmount }}$0.00{{ ayCurrency AllWOLoansNetViz }}$0.00{{ ayCurrency AllWOOutsidesNetViz }}$0.00{{ ayCurrency AllWOTotalNets }}$0.00{{ ayCurrency AllWOTotalTaxAs }}$0.00{{ ayCurrency AllWOTotalTaxBs }}$0.00{{ ayCurrency AllWOTotalGrand }}$0.00
\n
\n\n\n","Style":".nodata {\n font-size: 6pt;\n}\n\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 /* border-bottom: solid 1pt #9e9e9e; */\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 text-align: center;\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 //this function (if present) is called with the report data \n //before the report is rendered\n //modify data as required here and return it to change the data before the report renders\n //see the help documentation for details\n\n\tawait ayGetTranslations([\"WorkOrder\", \"Customer\", \"WorkOrderServiceDate\", \"NetValue\", \"WorkOrderItemLaborList\", \"WorkOrderItemPartList\", \"WorkOrderItemTravelList\", \"WorkOrderItemExpenseList\", \"WorkOrderItemLoanList\", \"WorkOrderItemOutsideService\", \"TaxCodeTaxA\", \"TaxCodeTaxB\", \"Total\" ]);\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 Net Viz from all workorders so it exists\nreportData.AllWOLaborsNetViz = 0;\n//below declares a key on the entire wo to hold all Part Net Viz from all workorders so it exists\nreportData.AllWOPartsNetViz = 0;\n//below declares a key on the entire wo to hold all Travel Net Viz from all workorders so it exists\nreportData.AllWOTravelsNetViz = 0;\n//below declares a key on the entire wo to hold all Exp Net ChargeAmount from all workorders so it exists\nreportData.AllWOExpsNetChargeAmount = 0;\n//below declares a key on the entire wo to hold all Loan Net Viz from all workorders so it exists\nreportData.AllWOLoansNetViz = 0;\n//below declares a key on the entire wo to hold all OutsideServices Net Viz from all workorders so it exists\nreportData.AllWOOutsidesNetViz = 0;\n\n//below declares a key to hold all Nets from all workorders in this list so it exists\nreportData.AllWOTotalNets = 0;\n\n//below declares a key to hold all Tax As from all workorders in this list so it exists\nreportData.AllWOTotalTaxAs = 0;\n//below declares a key to hold all Tax Bs from all workorders in this list so it exists\nreportData.AllWOTotalTaxBs = 0;\n//below declares a key to hold all GrandTotal from all workorders in this list so it exists\nreportData.AllWOTotalGrand = 0;\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 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\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\t\t\t\t\n\t\t\t\t\t\treportData.AllWOTotalGrand += Labor.NetViz; //this is where the actual adding to the running GRAND TOTAL for ALL workorders Grand Totals in this report data\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\treportData.AllWOTotalTaxAs += Labor.TaxAViz; //this is where the actual adding to the running GRAND TOTAL for ALL workorders Tax As in this report data\n\t\t\t\t\t\treportData.AllWOTotalGrand += Labor.TaxAViz; //this is where the actual adding to the running GRAND TOTAL for ALL workorders Grand Totals 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\treportData.AllWOTotalTaxBs += Labor.TaxBViz; //this is where the actual adding to the running GRAND TOTAL for ALL workorders Tax Bs in this report data\n\t\t\t\t\t\treportData.AllWOTotalGrand += Labor.TaxBViz; //this is where the actual adding to the running GRAND TOTAL for ALL workorders Grand Totals 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\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\t\t\t\t\t\treportData.AllWOTotalGrand += Part.NetViz; //this is where the actual adding to the running GRAND TOTAL for ALL workorders Grand Totals in this report data\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\treportData.AllWOTotalTaxAs += Part.TaxAViz; //this is where the actual adding to the running GRAND TOTAL for ALL workorders Tax As in this report data\n\t\t\t\t\t\treportData.AllWOTotalGrand += Part.TaxAViz; //this is where the actual adding to the running GRAND TOTAL for ALL workorders Grand Totals 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\treportData.AllWOTotalTaxBs += Part.TaxBViz; //this is where the actual adding to the running GRAND TOTAL for ALL workorders Tax Bs in this report data\n\t\t\t\t\t\treportData.AllWOTotalGrand += Part.TaxBViz; //this is where the actual adding to the running GRAND TOTAL for ALL workorders Grand Totals 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\t\t\t\t\t\treportData.AllWOTravelsNetViz += Travel.NetViz;\t//this IS where the actual adding to the running total for all Travels for all workorders in this report data\t\t\t\n\t\t\t\t\t\treportData.AllWOTotalNets += Travel.NetViz; //this is where the actual adding to the running total for all workorder Nets in this report data\n\t\t\t\t\t\treportData.AllWOTotalGrand += Travel.NetViz; //this is where the actual adding to the running GRAND TOTAL for ALL workorders Grand Totals 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\treportData.AllWOTotalTaxAs += Travel.TaxAViz; //this is where the actual adding to the running GRAND TOTAL for ALL workorders Tax As in this report data\n\t\t\t\t\t\treportData.AllWOTotalGrand += Travel.TaxAViz; //this is where the actual adding to the running GRAND TOTAL for ALL workorders Grand Totals 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\treportData.AllWOTotalTaxBs += Travel.TaxBViz; //this is where the actual adding to the running GRAND TOTAL for ALL workorders Tax Bs in this report data\n\t\t\t\t\t\treportData.AllWOTotalGrand += Travel.TaxBViz; //this is where the actual adding to the running GRAND TOTAL for ALL workorders Grand Totals 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\treportData.AllWOExpsNetChargeAmount += Exp.ChargeAmount;//this IS where the actual adding to the running total for all Exp ChargeAmount for all workorders in this report data\t\t\t\t\n\t\t\t\t\t\treportData.AllWOTotalNets += Exp.ChargeAmount;//this is where the actual adding to the running total for all workorder Net ChargeAmount in this report data\n\t\t\t\t\t\treportData.AllWOTotalGrand += Exp.ChargeAmount; //this is where the actual adding to the running GRAND TOTAL for ALL workorders Grand Totals 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\treportData.AllWOTotalTaxAs += Exp.TaxAViz; //this is where the actual adding to the running GRAND TOTAL for ALL workorders Tax As in this report data\n\t\t\t\t\t\treportData.AllWOTotalGrand += Exp.TaxAViz; //this is where the actual adding to the running GRAND TOTAL for ALL workorders Grand Totals 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\treportData.AllWOTotalTaxBs += Exp.TaxBViz; //this is where the actual adding to the running GRAND TOTAL for ALL workorders Tax Bs in this report data\n\t\t\t\t\t\treportData.AllWOTotalGrand += Exp.TaxBViz; //this is where the actual adding to the running GRAND TOTAL for ALL workorders Grand Totals 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\treportData.AllWOTotalTaxAs += Exp.TaxPaid; //this is where the actual adding to the running GRAND TOTAL for ALL workorders Tax As in this report data\n\t\t\t\t\t\treportData.AllWOTotalGrand += Exp.TaxPaid; //this is where the actual adding to the running GRAND TOTAL for ALL workorders Grand Totals in this report data\n\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\t\t\t\t\t\treportData.AllWOLoansNetViz += Loan.NetViz;\t\t//this IS where the actual adding to the running total for all Loans for all workorders in this report data\t\t\n\t\t\t\t\t\treportData.AllWOTotalNets += Loan.NetViz;//this is where the actual adding to the running total for all workorder Nets in this report data\n\t\t\t\t\t\treportData.AllWOTotalGrand += Loan.NetViz; //this is where the actual adding to the running GRAND TOTAL for ALL workorders Grand Totals 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\treportData.AllWOTotalTaxAs += Loan.TaxAViz; //this is where the actual adding to the running GRAND TOTAL for ALL workorders Tax As in this report data\n\t\t\t\t\t\treportData.AllWOTotalGrand += Loan.TaxAViz; //this is where the actual adding to the running GRAND TOTAL for ALL workorders Grand Totals 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\treportData.AllWOTotalTaxBs += Loan.TaxBViz; //this is where the actual adding to the running GRAND TOTAL for ALL workorders Tax Bs in this report data\n\t\t\t\t\t\treportData.AllWOTotalGrand += Loan.TaxBViz; //this is where the actual adding to the running GRAND TOTAL for ALL workorders Grand Totals 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\t\t\t\t\t\treportData.AllWOOutsidesNetViz += Outside.NetViz;\t//this IS where the actual adding to the running total for all Outside for all workorders in this report data\t\t\t\n\t\t\t\t\t\treportData.AllWOTotalNets += Outside.NetViz;//this is where the actual adding to the running total for all workorder Nets in this report data\n\t\t\t\t\t\treportData.AllWOTotalGrand += Outside.NetViz; //this is where the actual adding to the running GRAND TOTAL for ALL workorders Grand Totals 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\treportData.AllWOTotalTaxAs += Outside.TaxAViz; //this is where the actual adding to the running GRAND TOTAL for ALL workorders Tax As in this report data\n\t\t\t\t\t\treportData.AllWOTotalGrand += Outside.TaxAViz; //this is where the actual adding to the running GRAND TOTAL for ALL workorders Grand Totals 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\treportData.AllWOTotalTaxBs += Outside.TaxBViz; //this is where the actual adding to the running GRAND TOTAL for ALL workorders Tax Bs in this report data\n\t\t\t\t\t\treportData.AllWOTotalGrand += Outside.TaxBViz; //this is where the actual adding to the running GRAND TOTAL for ALL workorders Grand Totals 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":"","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":"Net Taxes and Totals for Each WO","Active":true,"Notes":"Custom Prepare to display each WO total nets, taxes and grand total; and totals for all workorders in list","Roles":50538,"AType":34,"IncludeWoItemDescendants":false,"Template":"\n\n\n
\n
\n\t\t\t

Nets Taxes and Totals for each {{ayT 'WorkOrder'}}

\n\t\t
\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 {{#if ServiceDate }}{{else}}{{/if}}\n {{#if ThisWOAllLaborsNetViz }}{{else}}{{/if}}\n {{#if ThisWOAllPartsNetViz }}{{else}}{{/if}}\n {{#if ThisWOAllTravelsNetViz }}{{else}}{{/if}}\n {{#if ThisWOAllExpsNetChargeAmount }}{{else}}{{/if}}\n {{#if ThisWOAllLoansNetViz }}{{else}}{{/if}}\n {{#if ThisWOAllOutsidesNetViz }}{{else}}{{/if}}\n {{#if ThisWOTotalNets }} {{else}} {{/if}}\n {{#if ThisWOTotalTaxAs }} {{else}} {{/if}}\n {{#if ThisWOTotalTaxBs }} {{else}} {{/if}}\n {{#if ThisWOTotalGrand }} {{else}} {{/if}}\n \n \n {{/each}}\n \n
{{ayT 'WorkOrder'}}{{ayT 'Customer'}}{{ayT 'WorkOrderServiceDate'}}{{ayT 'WorkOrderItemLaborList'}}{{ayT 'WorkOrderItemPartList'}}{{ayT 'WorkOrderItemTravelList'}}{{ayT 'WorkOrderItemExpenseList'}}{{ayT 'WorkOrderItemLoanList'}}{{ayT 'WorkOrderItemOutsideService'}}{{ayT 'NetPrice'}}{{ayT 'TaxCodeTaxA'}}{{ayT 'TaxCodeTaxB'}}{{ayT 'Total'}}
{{Serial}}{{CustomerViz}}{{ayDate ServiceDate}}no Service Date specified{{ayCurrency ThisWOAllLaborsNetViz}}none billable{{ayCurrency ThisWOAllPartsNetViz}}none billable{{ayCurrency ThisWOAllTravelsNetViz}}none billable{{ayCurrency ThisWOAllExpsNetChargeAmount}}none billable{{ayCurrency ThisWOAllLoansNetViz}}none billable{{ayCurrency ThisWOAllOutsidesNetViz}}none billable{{ayCurrency ThisWOTotalNets}}none billable{{ayCurrency ThisWOTotalTaxAs}}none{{ayCurrency ThisWOTotalTaxBs}}none{{ayCurrency ThisWOTotalGrand}}none billable
\n\n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n {{#if AllWOLaborsNetViz}} {{else}} {{/if}}\n {{#if AllWOPartsNetViz}} {{else}} {{/if}}\n {{#if AllWOTravelsNetViz}} {{else}} {{/if}}\n {{#if AllWOExpsNetChargeAmount}} {{else}} {{/if}}\n {{#if AllWOLoansNetViz}} {{else}} {{/if}}\n {{#if AllWOOutsidesNetViz}} {{else}} {{/if}}\n {{#if AllWOTotalNets}} {{else}} {{/if}}\n {{#if AllWOTotalTaxAs}} {{else}} {{/if}}\n {{#if AllWOTotalTaxBs }} {{else}} {{/if}}\n {{#if AllWOTotalGrand}} {{else}} {{/if}}\n \n \n
Totals for all{{ayT 'WorkOrderItemLaborList'}}{{ayT 'WorkOrderItemPartList'}}{{ayT 'WorkOrderItemTravelList'}}{{ayT 'WorkOrderItemExpenseList'}}{{ayT 'WorkOrderItemLoanList'}}{{ayT 'WorkOrderItemOutsideService'}}{{ayT 'NetPrice'}}{{ayT 'TaxCodeTaxA'}}{{ayT 'TaxCodeTaxB'}}{{ayT 'Total'}}
{{ ayCurrency AllWOLaborsNetViz }}$0.00{{ ayCurrency AllWOPartsNetViz }}$0.00{{ ayCurrency AllWOTravelsNetViz }}$0.00{{ ayCurrency AllWOExpsNetChargeAmount }}$0.00{{ ayCurrency AllWOLoansNetViz }}$0.00{{ ayCurrency AllWOOutsidesNetViz }}$0.00{{ ayCurrency AllWOTotalNets }}$0.00{{ ayCurrency AllWOTotalTaxAs }}$0.00{{ ayCurrency AllWOTotalTaxBs }}$0.00{{ ayCurrency AllWOTotalGrand }}$0.00
\n
\n\n\n","Style":".nodata {\n font-size: 6pt;\n}\n\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 /* border-bottom: solid 1pt #9e9e9e; */\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 text-align: center;\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 //this function (if present) is called with the report data \n //before the report is rendered\n //modify data as required here and return it to change the data before the report renders\n //see the help documentation for details\n\n\tawait ayGetTranslations([\"WorkOrder\", \"Customer\", \"WorkOrderServiceDate\", \"NetPrice\", \"WorkOrderItemLaborList\", \"WorkOrderItemPartList\", \"WorkOrderItemTravelList\", \"WorkOrderItemExpenseList\", \"WorkOrderItemLoanList\", \"WorkOrderItemOutsideService\", \"TaxCodeTaxA\", \"TaxCodeTaxB\", \"Total\" ]);\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 Net Viz from all workorders so it exists\nreportData.AllWOLaborsNetViz = 0;\n//below declares a key on the entire wo to hold all Part Net Viz from all workorders so it exists\nreportData.AllWOPartsNetViz = 0;\n//below declares a key on the entire wo to hold all Travel Net Viz from all workorders so it exists\nreportData.AllWOTravelsNetViz = 0;\n//below declares a key on the entire wo to hold all Exp Net ChargeAmount from all workorders so it exists\nreportData.AllWOExpsNetChargeAmount = 0;\n//below declares a key on the entire wo to hold all Loan Net Viz from all workorders so it exists\nreportData.AllWOLoansNetViz = 0;\n//below declares a key on the entire wo to hold all OutsideServices Net Viz from all workorders so it exists\nreportData.AllWOOutsidesNetViz = 0;\n\n//below declares a key to hold all Nets from all workorders in this list so it exists\nreportData.AllWOTotalNets = 0;\n\n//below declares a key to hold all Tax As from all workorders in this list so it exists\nreportData.AllWOTotalTaxAs = 0;\n//below declares a key to hold all Tax Bs from all workorders in this list so it exists\nreportData.AllWOTotalTaxBs = 0;\n//below declares a key to hold all GrandTotal from all workorders in this list so it exists\nreportData.AllWOTotalGrand = 0;\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 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\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\t\t\t\t\n\t\t\t\t\t\treportData.AllWOTotalGrand += Labor.NetViz; //this is where the actual adding to the running GRAND TOTAL for ALL workorders Grand Totals in this report data\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\treportData.AllWOTotalTaxAs += Labor.TaxAViz; //this is where the actual adding to the running GRAND TOTAL for ALL workorders Tax As in this report data\n\t\t\t\t\t\treportData.AllWOTotalGrand += Labor.TaxAViz; //this is where the actual adding to the running GRAND TOTAL for ALL workorders Grand Totals 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\treportData.AllWOTotalTaxBs += Labor.TaxBViz; //this is where the actual adding to the running GRAND TOTAL for ALL workorders Tax Bs in this report data\n\t\t\t\t\t\treportData.AllWOTotalGrand += Labor.TaxBViz; //this is where the actual adding to the running GRAND TOTAL for ALL workorders Grand Totals 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\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\t\t\t\t\t\treportData.AllWOTotalGrand += Part.NetViz; //this is where the actual adding to the running GRAND TOTAL for ALL workorders Grand Totals in this report data\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\treportData.AllWOTotalTaxAs += Part.TaxAViz; //this is where the actual adding to the running GRAND TOTAL for ALL workorders Tax As in this report data\n\t\t\t\t\t\treportData.AllWOTotalGrand += Part.TaxAViz; //this is where the actual adding to the running GRAND TOTAL for ALL workorders Grand Totals 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\treportData.AllWOTotalTaxBs += Part.TaxBViz; //this is where the actual adding to the running GRAND TOTAL for ALL workorders Tax Bs in this report data\n\t\t\t\t\t\treportData.AllWOTotalGrand += Part.TaxBViz; //this is where the actual adding to the running GRAND TOTAL for ALL workorders Grand Totals 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\t\t\t\t\t\treportData.AllWOTravelsNetViz += Travel.NetViz;\t//this IS where the actual adding to the running total for all Travels for all workorders in this report data\t\t\t\n\t\t\t\t\t\treportData.AllWOTotalNets += Travel.NetViz; //this is where the actual adding to the running total for all workorder Nets in this report data\n\t\t\t\t\t\treportData.AllWOTotalGrand += Travel.NetViz; //this is where the actual adding to the running GRAND TOTAL for ALL workorders Grand Totals 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\treportData.AllWOTotalTaxAs += Travel.TaxAViz; //this is where the actual adding to the running GRAND TOTAL for ALL workorders Tax As in this report data\n\t\t\t\t\t\treportData.AllWOTotalGrand += Travel.TaxAViz; //this is where the actual adding to the running GRAND TOTAL for ALL workorders Grand Totals 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\treportData.AllWOTotalTaxBs += Travel.TaxBViz; //this is where the actual adding to the running GRAND TOTAL for ALL workorders Tax Bs in this report data\n\t\t\t\t\t\treportData.AllWOTotalGrand += Travel.TaxBViz; //this is where the actual adding to the running GRAND TOTAL for ALL workorders Grand Totals 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\treportData.AllWOExpsNetChargeAmount += Exp.ChargeAmount;//this IS where the actual adding to the running total for all Exp ChargeAmount for all workorders in this report data\t\t\t\t\n\t\t\t\t\t\treportData.AllWOTotalNets += Exp.ChargeAmount;//this is where the actual adding to the running total for all workorder Net ChargeAmount in this report data\n\t\t\t\t\t\treportData.AllWOTotalGrand += Exp.ChargeAmount; //this is where the actual adding to the running GRAND TOTAL for ALL workorders Grand Totals 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\treportData.AllWOTotalTaxAs += Exp.TaxAViz; //this is where the actual adding to the running GRAND TOTAL for ALL workorders Tax As in this report data\n\t\t\t\t\t\treportData.AllWOTotalGrand += Exp.TaxAViz; //this is where the actual adding to the running GRAND TOTAL for ALL workorders Grand Totals 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\treportData.AllWOTotalTaxBs += Exp.TaxBViz; //this is where the actual adding to the running GRAND TOTAL for ALL workorders Tax Bs in this report data\n\t\t\t\t\t\treportData.AllWOTotalGrand += Exp.TaxBViz; //this is where the actual adding to the running GRAND TOTAL for ALL workorders Grand Totals 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\treportData.AllWOTotalTaxAs += Exp.TaxPaid; //this is where the actual adding to the running GRAND TOTAL for ALL workorders Tax As in this report data\n\t\t\t\t\t\treportData.AllWOTotalGrand += Exp.TaxPaid; //this is where the actual adding to the running GRAND TOTAL for ALL workorders Grand Totals in this report data\n\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\t\t\t\t\t\treportData.AllWOLoansNetViz += Loan.NetViz;\t\t//this IS where the actual adding to the running total for all Loans for all workorders in this report data\t\t\n\t\t\t\t\t\treportData.AllWOTotalNets += Loan.NetViz;//this is where the actual adding to the running total for all workorder Nets in this report data\n\t\t\t\t\t\treportData.AllWOTotalGrand += Loan.NetViz; //this is where the actual adding to the running GRAND TOTAL for ALL workorders Grand Totals 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\treportData.AllWOTotalTaxAs += Loan.TaxAViz; //this is where the actual adding to the running GRAND TOTAL for ALL workorders Tax As in this report data\n\t\t\t\t\t\treportData.AllWOTotalGrand += Loan.TaxAViz; //this is where the actual adding to the running GRAND TOTAL for ALL workorders Grand Totals 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\treportData.AllWOTotalTaxBs += Loan.TaxBViz; //this is where the actual adding to the running GRAND TOTAL for ALL workorders Tax Bs in this report data\n\t\t\t\t\t\treportData.AllWOTotalGrand += Loan.TaxBViz; //this is where the actual adding to the running GRAND TOTAL for ALL workorders Grand Totals 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\t\t\t\t\t\treportData.AllWOOutsidesNetViz += Outside.NetViz;\t//this IS where the actual adding to the running total for all Outside for all workorders in this report data\t\t\t\n\t\t\t\t\t\treportData.AllWOTotalNets += Outside.NetViz;//this is where the actual adding to the running total for all workorder Nets in this report data\n\t\t\t\t\t\treportData.AllWOTotalGrand += Outside.NetViz; //this is where the actual adding to the running GRAND TOTAL for ALL workorders Grand Totals 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\treportData.AllWOTotalTaxAs += Outside.TaxAViz; //this is where the actual adding to the running GRAND TOTAL for ALL workorders Tax As in this report data\n\t\t\t\t\t\treportData.AllWOTotalGrand += Outside.TaxAViz; //this is where the actual adding to the running GRAND TOTAL for ALL workorders Grand Totals 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\treportData.AllWOTotalTaxBs += Outside.TaxBViz; //this is where the actual adding to the running GRAND TOTAL for ALL workorders Tax Bs in this report data\n\t\t\t\t\t\treportData.AllWOTotalGrand += Outside.TaxBViz; //this is where the actual adding to the running GRAND TOTAL for ALL workorders Grand Totals 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":"","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/Net Totals for Each PM Item.ayrt b/server/AyaNova/resource/rpt/stock-report-templates/Net Totals for Each PM Item.ayrt index 3764c4fb..16d41367 100644 --- a/server/AyaNova/resource/rpt/stock-report-templates/Net Totals for Each PM Item.ayrt +++ b/server/AyaNova/resource/rpt/stock-report-templates/Net Totals for Each PM Item.ayrt @@ -1 +1 @@ -{"Name":"Net Totals for Each PM Item","Active":true,"Notes":"Custom Prepare to display each PM Item total nets and totals for all workorder items in list","Roles":50538,"AType":22,"IncludeWoItemDescendants":true,"Template":"\n\n\n
\n
\n\t\t\t

Nets Totals for each {{ayT 'PM'}} {{ayT 'WorkOrderItem'}}

\n\t\t
\n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n {{#each ayReportData}}\n {{#each Items}} \n \n \n \n {{#if ../NextServiceDate }}{{else}}{{/if}}\n \n {{#if ../ThisWOAllLaborsNetViz }}{{else}}{{/if}}\n {{#if ../ThisWOAllPartsNetViz }}{{else}}{{/if}}\n {{#if ../ThisWOAllTravelsNetViz }}{{else}}{{/if}}\n {{#if ../ThisWOAllExpsNetChargeAmount }}{{else}}{{/if}}\n {{#if ../ThisWOAllLoansNetViz }}{{else}}{{/if}}\n {{#if ../ThisWOAllOutsidesNetViz }}{{else}}{{/if}}\n {{#if ../ThisWOTotalNets }} {{else}} {{/if}} \n \n {{/each}}\n {{/each}}\n \n
{{ayT 'PM'}} & {{ayT 'WorkOrderItem'}} {{ayT 'Sequence'}}{{ayT 'Customer'}}{{ayT 'PMNextServiceDate'}}{{ayT 'WorkOrderItemWorkOrderStatusID'}}{{ayT 'WorkOrderItemLaborList'}}{{ayT 'WorkOrderItemPartList'}}{{ayT 'WorkOrderItemTravelList'}}{{ayT 'WorkOrderItemExpenseList'}}{{ayT 'WorkOrderItemLoanList'}}{{ayT 'WorkOrderItemOutsideService'}}{{ayT 'NetValue'}}
{{PMId}} - {{Sequence}}{{../CustomerViz}}{{ayDate ../NextServiceDate}}no Next Service Date specified{{WorkOrderItemStatusNameViz}}{{ayCurrency ../ThisWOAllLaborsNetViz}}none billable{{ayCurrency ../ThisWOAllPartsNetViz}}none billable{{ayCurrency ../ThisWOAllTravelsNetViz}}none billable{{ayCurrency ../ThisWOAllExpsNetChargeAmount}}none billable{{ayCurrency ../ThisWOAllLoansNetViz}}none billable{{ayCurrency ../ThisWOAllOutsidesNetViz}}none billable{{ayCurrency ../ThisWOTotalNets}}none billable
\n\n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n {{#if AllWOLaborsNetViz}} {{else}} {{/if}}\n {{#if AllWOPartsNetViz}} {{else}} {{/if}}\n {{#if AllWOTravelsNetViz}} {{else}} {{/if}}\n {{#if AllWOExpsNetChargeAmount}} {{else}} {{/if}}\n {{#if AllWOLoansNetViz}} {{else}} {{/if}}\n {{#if AllWOOutsidesNetViz}} {{else}} {{/if}}\n {{#if AllWOTotalNets}} {{else}} {{/if}}\n \n \n
 
Totals for all {{ayT 'WorkOrderItemLaborList'}}{{ayT 'WorkOrderItemPartList'}}{{ayT 'WorkOrderItemTravelList'}}{{ayT 'WorkOrderItemExpenseList'}}{{ayT 'WorkOrderItemLoanList'}}{{ayT 'WorkOrderItemOutsideService'}}{{ayT 'NetValue'}}
{{ ayCurrency AllWOLaborsNetViz }}$0.00{{ ayCurrency AllWOPartsNetViz }}$0.00{{ ayCurrency AllWOTravelsNetViz }}$0.00{{ ayCurrency AllWOExpsNetChargeAmount }}$0.00{{ ayCurrency AllWOLoansNetViz }}$0.00{{ ayCurrency AllWOOutsidesNetViz }}$0.00{{ ayCurrency AllWOTotalNets }}$0.00
\n
\n\n\n","Style":".nodata {\n font-size: 6pt;\n}\n\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 /* border-bottom: solid 1pt #9e9e9e; */\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 text-align: center;\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 //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([\"PM\", \"WorkOrderItem\", \"Sequence\", \"Customer\", \"PMNextServiceDate\", \"WorkOrderItemWorkOrderStatusID\", \"NetValue\", \"WorkOrderItemLaborList\", \"WorkOrderItemPartList\", \"WorkOrderItemTravelList\", \"WorkOrderItemExpenseList\", \"WorkOrderItemLoanList\", \"WorkOrderItemOutsideService\", \"TaxCodeTaxA\", \"TaxCodeTaxB\", \"Total\" ]);\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 Net Viz from all workorders so it exists\nreportData.AllWOLaborsNetViz = 0;\n//below declares a key on the entire wo to hold all Part Net Viz from all workorders so it exists\nreportData.AllWOPartsNetViz = 0;\n//below declares a key on the entire wo to hold all Travel Net Viz from all workorders so it exists\nreportData.AllWOTravelsNetViz = 0;\n//below declares a key on the entire wo to hold all Exp Net ChargeAmount from all workorders so it exists\nreportData.AllWOExpsNetChargeAmount = 0;\n//below declares a key on the entire wo to hold all Loan Net Viz from all workorders so it exists\nreportData.AllWOLoansNetViz = 0;\n//below declares a key on the entire wo to hold all OutsideServices Net Viz from all workorders so it exists\nreportData.AllWOOutsidesNetViz = 0;\n\n//below declares a key to hold all Nets from all workorders in this list so it exists\nreportData.AllWOTotalNets = 0;\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\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\t\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\t\t\t\t\n\t\t\t\t\t\t\n \t \t\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 workorders in this report data\n\t\t\t\t\t\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\t\t\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\t\n\t\t\t\t\t\treportData.AllWOTravelsNetViz += Travel.NetViz;\t//this IS where the actual adding to the running total for all Travels for all workorders in this report data\t\t\t\n\t\t\t\t\t\treportData.AllWOTotalNets += Travel.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\t\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\t\n\t\t\t\t\t\treportData.AllWOExpsNetChargeAmount += Exp.ChargeAmount;//this IS where the actual adding to the running total for all Exp ChargeAmount for all workorders in this report data\t\t\t\t\n\t\t\t\t\t\treportData.AllWOTotalNets += Exp.ChargeAmount;//this is where the actual adding to the running total for all workorder Net ChargeAmount in this report data\n \t \t\t}\t\t\t\n\n\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\t\n\t\t\t\t\t\treportData.AllWOLoansNetViz += Loan.NetViz;\t\t//this IS where the actual adding to the running total for all Loans for all workorders in this report data\t\t\n\t\t\t\t\t\treportData.AllWOTotalNets += Loan.NetViz;//this is where the actual adding to the running total for all workorder Nets in this report data\n \t \t\t}\t\t\t\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\t\n\t\t\t\t\t\treportData.AllWOOutsidesNetViz += Outside.NetViz;\t//this IS where the actual adding to the running total for all Outside for all workorders in this report data\t\t\t\n\t\t\t\t\t\treportData.AllWOTotalNets += Outside.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\t\t\n\t\t\t}\n\t\t}\n\t}\n\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":"15mm","MarginOptionsRight":"15mm","MarginOptionsTop":"10mm","PageRanges":null,"PreferCSSPageSize":false,"PrintBackground":true,"Scale":1.00000} \ No newline at end of file +{"Name":"Net Totals for Each PM Item","Active":true,"Notes":"Custom Prepare to display each PM Item total nets and totals for all workorder items in list","Roles":50538,"AType":22,"IncludeWoItemDescendants":true,"Template":"\n\n\n
\n
\n\t\t\t

Nets Totals for each {{ayT 'PM'}} {{ayT 'WorkOrderItem'}}

\n\t\t
\n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n {{#each ayReportData}}\n {{#each Items}} \n \n \n \n {{#if ../NextServiceDate }}{{else}}{{/if}}\n \n {{#if ../ThisWOAllLaborsNetViz }}{{else}}{{/if}}\n {{#if ../ThisWOAllPartsNetViz }}{{else}}{{/if}}\n {{#if ../ThisWOAllTravelsNetViz }}{{else}}{{/if}}\n {{#if ../ThisWOAllExpsNetChargeAmount }}{{else}}{{/if}}\n {{#if ../ThisWOAllLoansNetViz }}{{else}}{{/if}}\n {{#if ../ThisWOAllOutsidesNetViz }}{{else}}{{/if}}\n {{#if ../ThisWOTotalNets }} {{else}} {{/if}} \n \n {{/each}}\n {{/each}}\n \n
{{ayT 'PM'}} & {{ayT 'WorkOrderItem'}} {{ayT 'Sequence'}}{{ayT 'Customer'}}{{ayT 'PMNextServiceDate'}}{{ayT 'WorkOrderItemWorkOrderStatusID'}}{{ayT 'WorkOrderItemLaborList'}}{{ayT 'WorkOrderItemPartList'}}{{ayT 'WorkOrderItemTravelList'}}{{ayT 'WorkOrderItemExpenseList'}}{{ayT 'WorkOrderItemLoanList'}}{{ayT 'WorkOrderItemOutsideService'}}{{ayT 'NetPrice'}}
{{PMId}} - {{Sequence}}{{../CustomerViz}}{{ayDate ../NextServiceDate}}no Next Service Date specified{{WorkOrderItemStatusNameViz}}{{ayCurrency ../ThisWOAllLaborsNetViz}}none billable{{ayCurrency ../ThisWOAllPartsNetViz}}none billable{{ayCurrency ../ThisWOAllTravelsNetViz}}none billable{{ayCurrency ../ThisWOAllExpsNetChargeAmount}}none billable{{ayCurrency ../ThisWOAllLoansNetViz}}none billable{{ayCurrency ../ThisWOAllOutsidesNetViz}}none billable{{ayCurrency ../ThisWOTotalNets}}none billable
\n\n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n {{#if AllWOLaborsNetViz}} {{else}} {{/if}}\n {{#if AllWOPartsNetViz}} {{else}} {{/if}}\n {{#if AllWOTravelsNetViz}} {{else}} {{/if}}\n {{#if AllWOExpsNetChargeAmount}} {{else}} {{/if}}\n {{#if AllWOLoansNetViz}} {{else}} {{/if}}\n {{#if AllWOOutsidesNetViz}} {{else}} {{/if}}\n {{#if AllWOTotalNets}} {{else}} {{/if}}\n \n \n
 
Totals for all {{ayT 'WorkOrderItemLaborList'}}{{ayT 'WorkOrderItemPartList'}}{{ayT 'WorkOrderItemTravelList'}}{{ayT 'WorkOrderItemExpenseList'}}{{ayT 'WorkOrderItemLoanList'}}{{ayT 'WorkOrderItemOutsideService'}}{{ayT 'NetPrice'}}
{{ ayCurrency AllWOLaborsNetViz }}$0.00{{ ayCurrency AllWOPartsNetViz }}$0.00{{ ayCurrency AllWOTravelsNetViz }}$0.00{{ ayCurrency AllWOExpsNetChargeAmount }}$0.00{{ ayCurrency AllWOLoansNetViz }}$0.00{{ ayCurrency AllWOOutsidesNetViz }}$0.00{{ ayCurrency AllWOTotalNets }}$0.00
\n
\n\n\n","Style":".nodata {\n font-size: 6pt;\n}\n\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 /* border-bottom: solid 1pt #9e9e9e; */\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 text-align: center;\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 //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([\"PM\", \"WorkOrderItem\", \"Sequence\", \"Customer\", \"PMNextServiceDate\", \"WorkOrderItemWorkOrderStatusID\", \"NetPrice\", \"WorkOrderItemLaborList\", \"WorkOrderItemPartList\", \"WorkOrderItemTravelList\", \"WorkOrderItemExpenseList\", \"WorkOrderItemLoanList\", \"WorkOrderItemOutsideService\", \"TaxCodeTaxA\", \"TaxCodeTaxB\", \"Total\" ]);\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 Net Viz from all workorders so it exists\nreportData.AllWOLaborsNetViz = 0;\n//below declares a key on the entire wo to hold all Part Net Viz from all workorders so it exists\nreportData.AllWOPartsNetViz = 0;\n//below declares a key on the entire wo to hold all Travel Net Viz from all workorders so it exists\nreportData.AllWOTravelsNetViz = 0;\n//below declares a key on the entire wo to hold all Exp Net ChargeAmount from all workorders so it exists\nreportData.AllWOExpsNetChargeAmount = 0;\n//below declares a key on the entire wo to hold all Loan Net Viz from all workorders so it exists\nreportData.AllWOLoansNetViz = 0;\n//below declares a key on the entire wo to hold all OutsideServices Net Viz from all workorders so it exists\nreportData.AllWOOutsidesNetViz = 0;\n\n//below declares a key to hold all Nets from all workorders in this list so it exists\nreportData.AllWOTotalNets = 0;\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\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\t\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\t\t\t\t\n\t\t\t\t\t\t\n \t \t\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 workorders in this report data\n\t\t\t\t\t\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\t\t\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\t\n\t\t\t\t\t\treportData.AllWOTravelsNetViz += Travel.NetViz;\t//this IS where the actual adding to the running total for all Travels for all workorders in this report data\t\t\t\n\t\t\t\t\t\treportData.AllWOTotalNets += Travel.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\t\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\t\n\t\t\t\t\t\treportData.AllWOExpsNetChargeAmount += Exp.ChargeAmount;//this IS where the actual adding to the running total for all Exp ChargeAmount for all workorders in this report data\t\t\t\t\n\t\t\t\t\t\treportData.AllWOTotalNets += Exp.ChargeAmount;//this is where the actual adding to the running total for all workorder Net ChargeAmount in this report data\n \t \t\t}\t\t\t\n\n\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\t\n\t\t\t\t\t\treportData.AllWOLoansNetViz += Loan.NetViz;\t\t//this IS where the actual adding to the running total for all Loans for all workorders in this report data\t\t\n\t\t\t\t\t\treportData.AllWOTotalNets += Loan.NetViz;//this is where the actual adding to the running total for all workorder Nets in this report data\n \t \t\t}\t\t\t\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\t\n\t\t\t\t\t\treportData.AllWOOutsidesNetViz += Outside.NetViz;\t//this IS where the actual adding to the running total for all Outside for all workorders in this report data\t\t\t\n\t\t\t\t\t\treportData.AllWOTotalNets += Outside.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\t\t\n\t\t\t}\n\t\t}\n\t}\n\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":"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/Net Totals for Each Quote Item.ayrt b/server/AyaNova/resource/rpt/stock-report-templates/Net Totals for Each Quote Item.ayrt index 384c5329..bdc8c252 100644 --- a/server/AyaNova/resource/rpt/stock-report-templates/Net Totals for Each Quote Item.ayrt +++ b/server/AyaNova/resource/rpt/stock-report-templates/Net Totals for Each Quote Item.ayrt @@ -1 +1 @@ -{"Name":"Net Totals for Each Quote Item","Active":true,"Notes":"Custom Prepare to display each Quote Item total nets and totals for all workorder items in list","Roles":50538,"AType":28,"IncludeWoItemDescendants":true,"Template":"\n\n\n
\n
\n\t\t\t

Nets Totals for each {{ayT 'Quote'}} {{ayT 'WorkOrderItem'}}

\n\t\t
\n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n {{#each ayReportData}}\n {{#each Items}} \n \n \n \n \n {{#if ../Requested }}{{else}}{{/if}} \n {{#if ../ThisWOAllLaborsNetViz }}{{else}}{{/if}}\n {{#if ../ThisWOAllPartsNetViz }}{{else}}{{/if}}\n {{#if ../ThisWOAllTravelsNetViz }}{{else}}{{/if}}\n {{#if ../ThisWOAllExpsNetChargeAmount }}{{else}}{{/if}}\n {{#if ../ThisWOAllLoansNetViz }}{{else}}{{/if}}\n {{#if ../ThisWOAllOutsidesNetViz }}{{else}}{{/if}}\n {{#if ../ThisWOTotalNets }} {{else}} {{/if}} \n \n {{/each}}\n {{/each}}\n \n
{{ayT 'Quote'}} & {{ayT 'WorkOrderItem'}} {{ayT 'Sequence'}}{{ayT 'Quote'}} {{ayT 'Status'}}{{ayT 'Customer'}}{{ayT 'Quote'}} {{ayT 'QuoteQuoteRequestDate'}}{{ayT 'WorkOrderItemLaborList'}}{{ayT 'WorkOrderItemPartList'}}{{ayT 'WorkOrderItemTravelList'}}{{ayT 'WorkOrderItemExpenseList'}}{{ayT 'WorkOrderItemLoanList'}}{{ayT 'WorkOrderItemOutsideService'}}{{ayT 'NetValue'}}
{{QuoteId}} - {{Sequence}}{{../LastStateNameViz}}{{../CustomerViz}}{{ayDate ../Requested}}no Requested Date specified{{ayCurrency ../ThisWOAllLaborsNetViz}}none quoted{{ayCurrency ../ThisWOAllPartsNetViz}}none quoted{{ayCurrency ../ThisWOAllTravelsNetViz}}none quoted{{ayCurrency ../ThisWOAllExpsNetChargeAmount}}none quoted{{ayCurrency ../ThisWOAllLoansNetViz}}none quoted{{ayCurrency ../ThisWOAllOutsidesNetViz}}none quoted{{ayCurrency ../ThisWOTotalNets}}none quoted
\n\n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n {{#if AllWOLaborsNetViz}} {{else}} {{/if}}\n {{#if AllWOPartsNetViz}} {{else}} {{/if}}\n {{#if AllWOTravelsNetViz}} {{else}} {{/if}}\n {{#if AllWOExpsNetChargeAmount}} {{else}} {{/if}}\n {{#if AllWOLoansNetViz}} {{else}} {{/if}}\n {{#if AllWOOutsidesNetViz}} {{else}} {{/if}}\n {{#if AllWOTotalNets}} {{else}} {{/if}}\n \n \n
 
Totals for all {{ayT 'Quote'}} {{ayT 'WorkOrderItemLaborList'}}{{ayT 'WorkOrderItemPartList'}}{{ayT 'WorkOrderItemTravelList'}}{{ayT 'WorkOrderItemExpenseList'}}{{ayT 'WorkOrderItemLoanList'}}{{ayT 'WorkOrderItemOutsideService'}}{{ayT 'NetValue'}}
{{ ayCurrency AllWOLaborsNetViz }}$0.00{{ ayCurrency AllWOPartsNetViz }}$0.00{{ ayCurrency AllWOTravelsNetViz }}$0.00{{ ayCurrency AllWOExpsNetChargeAmount }}$0.00{{ ayCurrency AllWOLoansNetViz }}$0.00{{ ayCurrency AllWOOutsidesNetViz }}$0.00{{ ayCurrency AllWOTotalNets }}$0.00
\n
\n\n\n","Style":".nodata {\n font-size: 6pt;\n}\n\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 /* border-bottom: solid 1pt #9e9e9e; */\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 text-align: center;\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 //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\", \"WorkOrderItem\", \"Sequence\", \"Customer\", \"QuoteQuoteRequestDate\", \"Status\", \"NetValue\", \"WorkOrderItemLaborList\", \"WorkOrderItemPartList\", \"WorkOrderItemTravelList\", \"WorkOrderItemExpenseList\", \"WorkOrderItemLoanList\", \"WorkOrderItemOutsideService\", \"TaxCodeTaxA\", \"TaxCodeTaxB\", \"Total\" ]);\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 Net Viz from all workorders so it exists\nreportData.AllWOLaborsNetViz = 0;\n//below declares a key on the entire wo to hold all Part Net Viz from all workorders so it exists\nreportData.AllWOPartsNetViz = 0;\n//below declares a key on the entire wo to hold all Travel Net Viz from all workorders so it exists\nreportData.AllWOTravelsNetViz = 0;\n//below declares a key on the entire wo to hold all Exp Net ChargeAmount from all workorders so it exists\nreportData.AllWOExpsNetChargeAmount = 0;\n//below declares a key on the entire wo to hold all Loan Net Viz from all workorders so it exists\nreportData.AllWOLoansNetViz = 0;\n//below declares a key on the entire wo to hold all OutsideServices Net Viz from all workorders so it exists\nreportData.AllWOOutsidesNetViz = 0;\n\n//below declares a key to hold all Nets from all workorders in this list so it exists\nreportData.AllWOTotalNets = 0;\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\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\t\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\t\t\t\t\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\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\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\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\t\n\t\t\t\t\t\treportData.AllWOTravelsNetViz += Travel.NetViz;\t//this IS where the actual adding to the running total for all Travels for all workorders in this report data\t\t\t\n\t\t\t\t\t\treportData.AllWOTotalNets += Travel.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\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\t\n\t\t\t\t\t\treportData.AllWOExpsNetChargeAmount += Exp.ChargeAmount;//this IS where the actual adding to the running total for all Exp ChargeAmount for all workorders in this report data\t\t\t\t\n\t\t\t\t\t\treportData.AllWOTotalNets += Exp.ChargeAmount;//this is where the actual adding to the running total for all workorder Net ChargeAmount 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\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\t\n\t\t\t\t\t\treportData.AllWOLoansNetViz += Loan.NetViz;\t\t//this IS where the actual adding to the running total for all Loans for all workorders in this report data\t\t\n\t\t\t\t\t\treportData.AllWOTotalNets += Loan.NetViz;//this is where the actual adding to the running total for all workorder Nets 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\t\n\t\t\t\t\t\treportData.AllWOOutsidesNetViz += Outside.NetViz;\t//this IS where the actual adding to the running total for all Outside for all workorders in this report data\t\t\t\n\t\t\t\t\t\treportData.AllWOTotalNets += Outside.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\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":"","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":"Net Totals for Each Quote Item","Active":true,"Notes":"Custom Prepare to display each Quote Item total nets and totals for all workorder items in list","Roles":50538,"AType":28,"IncludeWoItemDescendants":true,"Template":"\n\n\n
\n
\n\t\t\t

Nets Totals for each {{ayT 'Quote'}} {{ayT 'WorkOrderItem'}}

\n\t\t
\n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n {{#each ayReportData}}\n {{#each Items}} \n \n \n \n \n {{#if ../Requested }}{{else}}{{/if}} \n {{#if ../ThisWOAllLaborsNetViz }}{{else}}{{/if}}\n {{#if ../ThisWOAllPartsNetViz }}{{else}}{{/if}}\n {{#if ../ThisWOAllTravelsNetViz }}{{else}}{{/if}}\n {{#if ../ThisWOAllExpsNetChargeAmount }}{{else}}{{/if}}\n {{#if ../ThisWOAllLoansNetViz }}{{else}}{{/if}}\n {{#if ../ThisWOAllOutsidesNetViz }}{{else}}{{/if}}\n {{#if ../ThisWOTotalNets }} {{else}} {{/if}} \n \n {{/each}}\n {{/each}}\n \n
{{ayT 'Quote'}} & {{ayT 'WorkOrderItem'}} {{ayT 'Sequence'}}{{ayT 'Quote'}} {{ayT 'Status'}}{{ayT 'Customer'}}{{ayT 'Quote'}} {{ayT 'QuoteQuoteRequestDate'}}{{ayT 'WorkOrderItemLaborList'}}{{ayT 'WorkOrderItemPartList'}}{{ayT 'WorkOrderItemTravelList'}}{{ayT 'WorkOrderItemExpenseList'}}{{ayT 'WorkOrderItemLoanList'}}{{ayT 'WorkOrderItemOutsideService'}}{{ayT 'NetPrice'}}
{{QuoteId}} - {{Sequence}}{{../LastStateNameViz}}{{../CustomerViz}}{{ayDate ../Requested}}no Requested Date specified{{ayCurrency ../ThisWOAllLaborsNetViz}}none quoted{{ayCurrency ../ThisWOAllPartsNetViz}}none quoted{{ayCurrency ../ThisWOAllTravelsNetViz}}none quoted{{ayCurrency ../ThisWOAllExpsNetChargeAmount}}none quoted{{ayCurrency ../ThisWOAllLoansNetViz}}none quoted{{ayCurrency ../ThisWOAllOutsidesNetViz}}none quoted{{ayCurrency ../ThisWOTotalNets}}none quoted
\n\n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n {{#if AllWOLaborsNetViz}} {{else}} {{/if}}\n {{#if AllWOPartsNetViz}} {{else}} {{/if}}\n {{#if AllWOTravelsNetViz}} {{else}} {{/if}}\n {{#if AllWOExpsNetChargeAmount}} {{else}} {{/if}}\n {{#if AllWOLoansNetViz}} {{else}} {{/if}}\n {{#if AllWOOutsidesNetViz}} {{else}} {{/if}}\n {{#if AllWOTotalNets}} {{else}} {{/if}}\n \n \n
 
Totals for all {{ayT 'Quote'}} {{ayT 'WorkOrderItemLaborList'}}{{ayT 'WorkOrderItemPartList'}}{{ayT 'WorkOrderItemTravelList'}}{{ayT 'WorkOrderItemExpenseList'}}{{ayT 'WorkOrderItemLoanList'}}{{ayT 'WorkOrderItemOutsideService'}}{{ayT 'NetPrice'}}
{{ ayCurrency AllWOLaborsNetViz }}$0.00{{ ayCurrency AllWOPartsNetViz }}$0.00{{ ayCurrency AllWOTravelsNetViz }}$0.00{{ ayCurrency AllWOExpsNetChargeAmount }}$0.00{{ ayCurrency AllWOLoansNetViz }}$0.00{{ ayCurrency AllWOOutsidesNetViz }}$0.00{{ ayCurrency AllWOTotalNets }}$0.00
\n
\n\n\n","Style":".nodata {\n font-size: 6pt;\n}\n\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 /* border-bottom: solid 1pt #9e9e9e; */\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 text-align: center;\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 //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\", \"WorkOrderItem\", \"Sequence\", \"Customer\", \"QuoteQuoteRequestDate\", \"Status\", \"NetPrice\", \"WorkOrderItemLaborList\", \"WorkOrderItemPartList\", \"WorkOrderItemTravelList\", \"WorkOrderItemExpenseList\", \"WorkOrderItemLoanList\", \"WorkOrderItemOutsideService\", \"TaxCodeTaxA\", \"TaxCodeTaxB\", \"Total\" ]);\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 Net Viz from all workorders so it exists\nreportData.AllWOLaborsNetViz = 0;\n//below declares a key on the entire wo to hold all Part Net Viz from all workorders so it exists\nreportData.AllWOPartsNetViz = 0;\n//below declares a key on the entire wo to hold all Travel Net Viz from all workorders so it exists\nreportData.AllWOTravelsNetViz = 0;\n//below declares a key on the entire wo to hold all Exp Net ChargeAmount from all workorders so it exists\nreportData.AllWOExpsNetChargeAmount = 0;\n//below declares a key on the entire wo to hold all Loan Net Viz from all workorders so it exists\nreportData.AllWOLoansNetViz = 0;\n//below declares a key on the entire wo to hold all OutsideServices Net Viz from all workorders so it exists\nreportData.AllWOOutsidesNetViz = 0;\n\n//below declares a key to hold all Nets from all workorders in this list so it exists\nreportData.AllWOTotalNets = 0;\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\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\t\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\t\t\t\t\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\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\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\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\t\n\t\t\t\t\t\treportData.AllWOTravelsNetViz += Travel.NetViz;\t//this IS where the actual adding to the running total for all Travels for all workorders in this report data\t\t\t\n\t\t\t\t\t\treportData.AllWOTotalNets += Travel.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\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\t\n\t\t\t\t\t\treportData.AllWOExpsNetChargeAmount += Exp.ChargeAmount;//this IS where the actual adding to the running total for all Exp ChargeAmount for all workorders in this report data\t\t\t\t\n\t\t\t\t\t\treportData.AllWOTotalNets += Exp.ChargeAmount;//this is where the actual adding to the running total for all workorder Net ChargeAmount 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\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\t\n\t\t\t\t\t\treportData.AllWOLoansNetViz += Loan.NetViz;\t\t//this IS where the actual adding to the running total for all Loans for all workorders in this report data\t\t\n\t\t\t\t\t\treportData.AllWOTotalNets += Loan.NetViz;//this is where the actual adding to the running total for all workorder Nets 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\t\n\t\t\t\t\t\treportData.AllWOOutsidesNetViz += Outside.NetViz;\t//this IS where the actual adding to the running total for all Outside for all workorders in this report data\t\t\t\n\t\t\t\t\t\treportData.AllWOTotalNets += Outside.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\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":"","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/Net Totals for Each WO Item.ayrt b/server/AyaNova/resource/rpt/stock-report-templates/Net Totals for Each WO Item.ayrt index 9c080969..2591ad57 100644 --- a/server/AyaNova/resource/rpt/stock-report-templates/Net Totals for Each WO Item.ayrt +++ b/server/AyaNova/resource/rpt/stock-report-templates/Net Totals for Each WO Item.ayrt @@ -1 +1 @@ -{"Name":"Net Totals for Each WO Item","Active":true,"Notes":"Custom Prepare to display each WO Item total nets and totals for all workorder items in list","Roles":50538,"AType":35,"IncludeWoItemDescendants":true,"Template":"\n\n\n
\n
\n\t\t\t

Nets Totals for each {{ayT 'WorkOrderItem'}}

\n\t\t
\n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n {{#each ayReportData}}\n {{#each Items}}\n \n \n \n {{#if ../ServiceDate }}{{else}}{{/if}}\n \n {{#if ../ThisWOAllLaborsNetViz }}{{else}}{{/if}}\n {{#if ../ThisWOAllPartsNetViz }}{{else}}{{/if}}\n {{#if ../ThisWOAllTravelsNetViz }}{{else}}{{/if}}\n {{#if ../ThisWOAllExpsNetChargeAmount }}{{else}}{{/if}}\n {{#if ../ThisWOAllLoansNetViz }}{{else}}{{/if}}\n {{#if ../ThisWOAllOutsidesNetViz }}{{else}}{{/if}}\n {{#if ../ThisWOTotalNets }} {{else}} {{/if}} \n \n {{/each}}\n {{/each}}\n \n
{{ayT 'WorkOrder'}} & {{ayT 'WorkOrderItem'}} {{ayT 'Sequence'}}{{ayT 'Customer'}}{{ayT 'WorkOrder'}} {{ayT 'WorkOrderServiceDate'}}{{ayT 'WorkOrderItemWorkOrderStatusID'}}{{ayT 'WorkOrderItemLaborList'}}{{ayT 'WorkOrderItemPartList'}}{{ayT 'WorkOrderItemTravelList'}}{{ayT 'WorkOrderItemExpenseList'}}{{ayT 'WorkOrderItemLoanList'}}{{ayT 'WorkOrderItemOutsideService'}}{{ayT 'NetValue'}}
{{WorkOrderId}} - {{Sequence}}{{../CustomerViz}}{{ayDate ../ServiceDate}}no Service Date specified{{WorkOrderItemStatusNameViz}}{{ayCurrency ../ThisWOAllLaborsNetViz}}none billable{{ayCurrency ../ThisWOAllPartsNetViz}}none billable{{ayCurrency ../ThisWOAllTravelsNetViz}}none billable{{ayCurrency ../ThisWOAllExpsNetChargeAmount}}none billable{{ayCurrency ../ThisWOAllLoansNetViz}}none billable{{ayCurrency ../ThisWOAllOutsidesNetViz}}none billable{{ayCurrency ../ThisWOTotalNets}}none billable
\n\n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n {{#if AllWOLaborsNetViz}} {{else}} {{/if}}\n {{#if AllWOPartsNetViz}} {{else}} {{/if}}\n {{#if AllWOTravelsNetViz}} {{else}} {{/if}}\n {{#if AllWOExpsNetChargeAmount}} {{else}} {{/if}}\n {{#if AllWOLoansNetViz}} {{else}} {{/if}}\n {{#if AllWOOutsidesNetViz}} {{else}} {{/if}}\n {{#if AllWOTotalNets}} {{else}} {{/if}}\n \n \n
 
Totals for all {{ayT 'WorkOrderItemLaborList'}}{{ayT 'WorkOrderItemPartList'}}{{ayT 'WorkOrderItemTravelList'}}{{ayT 'WorkOrderItemExpenseList'}}{{ayT 'WorkOrderItemLoanList'}}{{ayT 'WorkOrderItemOutsideService'}}{{ayT 'NetValue'}}
{{ ayCurrency AllWOLaborsNetViz }}$0.00{{ ayCurrency AllWOPartsNetViz }}$0.00{{ ayCurrency AllWOTravelsNetViz }}$0.00{{ ayCurrency AllWOExpsNetChargeAmount }}$0.00{{ ayCurrency AllWOLoansNetViz }}$0.00{{ ayCurrency AllWOOutsidesNetViz }}$0.00{{ ayCurrency AllWOTotalNets }}$0.00
\n
\n\n\n","Style":".nodata {\n font-size: 6pt;\n}\n\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 /* border-bottom: solid 1pt #9e9e9e; */\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 text-align: center;\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 //this function (if present) is called with the report data \n //before the report is rendered\n //modify data as required here and return it to change the data before the report renders\n //see the help documentation for details\n\n\tawait ayGetTranslations([\"WorkOrder\", \"WorkOrderItem\", \"Sequence\", \"Customer\", \"WorkOrderServiceDate\", \"WorkOrderItemWorkOrderStatusID\", \"NetValue\", \"WorkOrderItemLaborList\", \"WorkOrderItemPartList\", \"WorkOrderItemTravelList\", \"WorkOrderItemExpenseList\", \"WorkOrderItemLoanList\", \"WorkOrderItemOutsideService\", \"TaxCodeTaxA\", \"TaxCodeTaxB\", \"Total\" ]);\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 Net Viz from all workorders so it exists\nreportData.AllWOLaborsNetViz = 0;\n//below declares a key on the entire wo to hold all Part Net Viz from all workorders so it exists\nreportData.AllWOPartsNetViz = 0;\n//below declares a key on the entire wo to hold all Travel Net Viz from all workorders so it exists\nreportData.AllWOTravelsNetViz = 0;\n//below declares a key on the entire wo to hold all Exp Net ChargeAmount from all workorders so it exists\nreportData.AllWOExpsNetChargeAmount = 0;\n//below declares a key on the entire wo to hold all Loan Net Viz from all workorders so it exists\nreportData.AllWOLoansNetViz = 0;\n//below declares a key on the entire wo to hold all OutsideServices Net Viz from all workorders so it exists\nreportData.AllWOOutsidesNetViz = 0;\n\n//below declares a key to hold all Nets from all workorders in this list so it exists\nreportData.AllWOTotalNets = 0;\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\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\t\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\t\t\t\t\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\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\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\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\t\n\t\t\t\t\t\treportData.AllWOTravelsNetViz += Travel.NetViz;\t//this IS where the actual adding to the running total for all Travels for all workorders in this report data\t\t\t\n\t\t\t\t\t\treportData.AllWOTotalNets += Travel.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\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\t\n\t\t\t\t\t\treportData.AllWOExpsNetChargeAmount += Exp.ChargeAmount;//this IS where the actual adding to the running total for all Exp ChargeAmount for all workorders in this report data\t\t\t\t\n\t\t\t\t\t\treportData.AllWOTotalNets += Exp.ChargeAmount;//this is where the actual adding to the running total for all workorder Net ChargeAmount 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\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\t\n\t\t\t\t\t\treportData.AllWOLoansNetViz += Loan.NetViz;\t\t//this IS where the actual adding to the running total for all Loans for all workorders in this report data\t\t\n\t\t\t\t\t\treportData.AllWOTotalNets += Loan.NetViz;//this is where the actual adding to the running total for all workorder Nets 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\t\n\t\t\t\t\t\treportData.AllWOOutsidesNetViz += Outside.NetViz;\t//this IS where the actual adding to the running total for all Outside for all workorders in this report data\t\t\t\n\t\t\t\t\t\treportData.AllWOTotalNets += Outside.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\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":"","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":"Net Totals for Each WO Item","Active":true,"Notes":"Custom Prepare to display each WO Item total nets and totals for all workorder items in list","Roles":50538,"AType":35,"IncludeWoItemDescendants":true,"Template":"\n\n\n
\n
\n\t\t\t

Nets Totals for each {{ayT 'WorkOrderItem'}}

\n\t\t
\n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n {{#each ayReportData}}\n {{#each Items}}\n \n \n \n {{#if ../ServiceDate }}{{else}}{{/if}}\n \n {{#if ../ThisWOAllLaborsNetViz }}{{else}}{{/if}}\n {{#if ../ThisWOAllPartsNetViz }}{{else}}{{/if}}\n {{#if ../ThisWOAllTravelsNetViz }}{{else}}{{/if}}\n {{#if ../ThisWOAllExpsNetChargeAmount }}{{else}}{{/if}}\n {{#if ../ThisWOAllLoansNetViz }}{{else}}{{/if}}\n {{#if ../ThisWOAllOutsidesNetViz }}{{else}}{{/if}}\n {{#if ../ThisWOTotalNets }} {{else}} {{/if}} \n \n {{/each}}\n {{/each}}\n \n
{{ayT 'WorkOrder'}} & {{ayT 'WorkOrderItem'}} {{ayT 'Sequence'}}{{ayT 'Customer'}}{{ayT 'WorkOrder'}} {{ayT 'WorkOrderServiceDate'}}{{ayT 'WorkOrderItemWorkOrderStatusID'}}{{ayT 'WorkOrderItemLaborList'}}{{ayT 'WorkOrderItemPartList'}}{{ayT 'WorkOrderItemTravelList'}}{{ayT 'WorkOrderItemExpenseList'}}{{ayT 'WorkOrderItemLoanList'}}{{ayT 'WorkOrderItemOutsideService'}}{{ayT 'NetPrice'}}
{{WorkOrderId}} - {{Sequence}}{{../CustomerViz}}{{ayDate ../ServiceDate}}no Service Date specified{{WorkOrderItemStatusNameViz}}{{ayCurrency ../ThisWOAllLaborsNetViz}}none billable{{ayCurrency ../ThisWOAllPartsNetViz}}none billable{{ayCurrency ../ThisWOAllTravelsNetViz}}none billable{{ayCurrency ../ThisWOAllExpsNetChargeAmount}}none billable{{ayCurrency ../ThisWOAllLoansNetViz}}none billable{{ayCurrency ../ThisWOAllOutsidesNetViz}}none billable{{ayCurrency ../ThisWOTotalNets}}none billable
\n\n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n {{#if AllWOLaborsNetViz}} {{else}} {{/if}}\n {{#if AllWOPartsNetViz}} {{else}} {{/if}}\n {{#if AllWOTravelsNetViz}} {{else}} {{/if}}\n {{#if AllWOExpsNetChargeAmount}} {{else}} {{/if}}\n {{#if AllWOLoansNetViz}} {{else}} {{/if}}\n {{#if AllWOOutsidesNetViz}} {{else}} {{/if}}\n {{#if AllWOTotalNets}} {{else}} {{/if}}\n \n \n
 
Totals for all {{ayT 'WorkOrderItemLaborList'}}{{ayT 'WorkOrderItemPartList'}}{{ayT 'WorkOrderItemTravelList'}}{{ayT 'WorkOrderItemExpenseList'}}{{ayT 'WorkOrderItemLoanList'}}{{ayT 'WorkOrderItemOutsideService'}}{{ayT 'NetPrice'}}
{{ ayCurrency AllWOLaborsNetViz }}$0.00{{ ayCurrency AllWOPartsNetViz }}$0.00{{ ayCurrency AllWOTravelsNetViz }}$0.00{{ ayCurrency AllWOExpsNetChargeAmount }}$0.00{{ ayCurrency AllWOLoansNetViz }}$0.00{{ ayCurrency AllWOOutsidesNetViz }}$0.00{{ ayCurrency AllWOTotalNets }}$0.00
\n
\n\n\n","Style":".nodata {\n font-size: 6pt;\n}\n\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 /* border-bottom: solid 1pt #9e9e9e; */\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 text-align: center;\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 //this function (if present) is called with the report data \n //before the report is rendered\n //modify data as required here and return it to change the data before the report renders\n //see the help documentation for details\n\n\tawait ayGetTranslations([\"WorkOrder\", \"WorkOrderItem\", \"Sequence\", \"Customer\", \"WorkOrderServiceDate\", \"WorkOrderItemWorkOrderStatusID\", \"NetPrice\", \"WorkOrderItemLaborList\", \"WorkOrderItemPartList\", \"WorkOrderItemTravelList\", \"WorkOrderItemExpenseList\", \"WorkOrderItemLoanList\", \"WorkOrderItemOutsideService\", \"TaxCodeTaxA\", \"TaxCodeTaxB\", \"Total\" ]);\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 Net Viz from all workorders so it exists\nreportData.AllWOLaborsNetViz = 0;\n//below declares a key on the entire wo to hold all Part Net Viz from all workorders so it exists\nreportData.AllWOPartsNetViz = 0;\n//below declares a key on the entire wo to hold all Travel Net Viz from all workorders so it exists\nreportData.AllWOTravelsNetViz = 0;\n//below declares a key on the entire wo to hold all Exp Net ChargeAmount from all workorders so it exists\nreportData.AllWOExpsNetChargeAmount = 0;\n//below declares a key on the entire wo to hold all Loan Net Viz from all workorders so it exists\nreportData.AllWOLoansNetViz = 0;\n//below declares a key on the entire wo to hold all OutsideServices Net Viz from all workorders so it exists\nreportData.AllWOOutsidesNetViz = 0;\n\n//below declares a key to hold all Nets from all workorders in this list so it exists\nreportData.AllWOTotalNets = 0;\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\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\t\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\t\t\t\t\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\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\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\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\t\n\t\t\t\t\t\treportData.AllWOTravelsNetViz += Travel.NetViz;\t//this IS where the actual adding to the running total for all Travels for all workorders in this report data\t\t\t\n\t\t\t\t\t\treportData.AllWOTotalNets += Travel.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\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\t\n\t\t\t\t\t\treportData.AllWOExpsNetChargeAmount += Exp.ChargeAmount;//this IS where the actual adding to the running total for all Exp ChargeAmount for all workorders in this report data\t\t\t\t\n\t\t\t\t\t\treportData.AllWOTotalNets += Exp.ChargeAmount;//this is where the actual adding to the running total for all workorder Net ChargeAmount 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\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\t\n\t\t\t\t\t\treportData.AllWOLoansNetViz += Loan.NetViz;\t\t//this IS where the actual adding to the running total for all Loans for all workorders in this report data\t\t\n\t\t\t\t\t\treportData.AllWOTotalNets += Loan.NetViz;//this is where the actual adding to the running total for all workorder Nets 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\t\n\t\t\t\t\t\treportData.AllWOOutsidesNetViz += Outside.NetViz;\t//this IS where the actual adding to the running total for all Outside for all workorders in this report data\t\t\t\n\t\t\t\t\t\treportData.AllWOTotalNets += Outside.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\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":"","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/Net Totals for Each WO.ayrt b/server/AyaNova/resource/rpt/stock-report-templates/Net Totals for Each WO.ayrt index d7a3fd84..c290c5d3 100644 --- a/server/AyaNova/resource/rpt/stock-report-templates/Net Totals for Each WO.ayrt +++ b/server/AyaNova/resource/rpt/stock-report-templates/Net Totals for Each WO.ayrt @@ -1 +1 @@ -{"Name":"Net Totals for Each WO","Active":true,"Notes":"Custom Prepare to display each WO total nets and totals for all workorders in list","Roles":50538,"AType":34,"IncludeWoItemDescendants":false,"Template":"\n\n\n
\n
\n\t\t\t

Nets Totals for each {{ayT 'WorkOrder'}}

\n\t\t
\n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n {{#each ayReportData}}\n \n \n \n {{#if ServiceDate }}{{else}}{{/if}}\n \n {{#if ThisWOAllLaborsNetViz }}{{else}}{{/if}}\n {{#if ThisWOAllPartsNetViz }}{{else}}{{/if}}\n {{#if ThisWOAllTravelsNetViz }}{{else}}{{/if}}\n {{#if ThisWOAllExpsNetChargeAmount }}{{else}}{{/if}}\n {{#if ThisWOAllLoansNetViz }}{{else}}{{/if}}\n {{#if ThisWOAllOutsidesNetViz }}{{else}}{{/if}}\n {{#if ThisWOTotalNets }} {{else}} {{/if}} \n \n {{/each}}\n \n
{{ayT 'WorkOrder'}}{{ayT 'Customer'}}{{ayT 'WorkOrderServiceDate'}}{{ayT 'WorkOrderStatus'}}{{ayT 'WorkOrderItemLaborList'}}{{ayT 'WorkOrderItemPartList'}}{{ayT 'WorkOrderItemTravelList'}}{{ayT 'WorkOrderItemExpenseList'}}{{ayT 'WorkOrderItemLoanList'}}{{ayT 'WorkOrderItemOutsideService'}}{{ayT 'NetValue'}}
{{Serial}}{{CustomerViz}}{{ayDate ServiceDate}}no Service Date specified{{LastStateNameViz}}{{ayCurrency ThisWOAllLaborsNetViz}}none billable{{ayCurrency ThisWOAllPartsNetViz}}none billable{{ayCurrency ThisWOAllTravelsNetViz}}none billable{{ayCurrency ThisWOAllExpsNetChargeAmount}}none billable{{ayCurrency ThisWOAllLoansNetViz}}none billable{{ayCurrency ThisWOAllOutsidesNetViz}}none billable{{ayCurrency ThisWOTotalNets}}none billable
\n\n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n {{#if AllWOLaborsNetViz}} {{else}} {{/if}}\n {{#if AllWOPartsNetViz}} {{else}} {{/if}}\n {{#if AllWOTravelsNetViz}} {{else}} {{/if}}\n {{#if AllWOExpsNetChargeAmount}} {{else}} {{/if}}\n {{#if AllWOLoansNetViz}} {{else}} {{/if}}\n {{#if AllWOOutsidesNetViz}} {{else}} {{/if}}\n {{#if AllWOTotalNets}} {{else}} {{/if}}\n \n \n
 
Totals for all {{ayT 'WorkOrderItemLaborList'}}{{ayT 'WorkOrderItemPartList'}}{{ayT 'WorkOrderItemTravelList'}}{{ayT 'WorkOrderItemExpenseList'}}{{ayT 'WorkOrderItemLoanList'}}{{ayT 'WorkOrderItemOutsideService'}}{{ayT 'NetValue'}}
{{ ayCurrency AllWOLaborsNetViz }}$0.00{{ ayCurrency AllWOPartsNetViz }}$0.00{{ ayCurrency AllWOTravelsNetViz }}$0.00{{ ayCurrency AllWOExpsNetChargeAmount }}$0.00{{ ayCurrency AllWOLoansNetViz }}$0.00{{ ayCurrency AllWOOutsidesNetViz }}$0.00{{ ayCurrency AllWOTotalNets }}$0.00
\n
\n\n\n","Style":".nodata {\n font-size: 6pt;\n}\n\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 /* border-bottom: solid 1pt #9e9e9e; */\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 text-align: center;\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 //this function (if present) is called with the report data \n //before the report is rendered\n //modify data as required here and return it to change the data before the report renders\n //see the help documentation for details\n\n\tawait ayGetTranslations([\"WorkOrder\", \"Customer\", \"WorkOrderServiceDate\", \"WorkOrderStatus\", \"NetValue\", \"WorkOrderItemLaborList\", \"WorkOrderItemPartList\", \"WorkOrderItemTravelList\", \"WorkOrderItemExpenseList\", \"WorkOrderItemLoanList\", \"WorkOrderItemOutsideService\", \"TaxCodeTaxA\", \"TaxCodeTaxB\", \"Total\" ]);\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 Net Viz from all workorders so it exists\nreportData.AllWOLaborsNetViz = 0;\n//below declares a key on the entire wo to hold all Part Net Viz from all workorders so it exists\nreportData.AllWOPartsNetViz = 0;\n//below declares a key on the entire wo to hold all Travel Net Viz from all workorders so it exists\nreportData.AllWOTravelsNetViz = 0;\n//below declares a key on the entire wo to hold all Exp Net ChargeAmount from all workorders so it exists\nreportData.AllWOExpsNetChargeAmount = 0;\n//below declares a key on the entire wo to hold all Loan Net Viz from all workorders so it exists\nreportData.AllWOLoansNetViz = 0;\n//below declares a key on the entire wo to hold all OutsideServices Net Viz from all workorders so it exists\nreportData.AllWOOutsidesNetViz = 0;\n\n//below declares a key to hold all Nets from all workorders in this list so it exists\nreportData.AllWOTotalNets = 0;\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\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\t\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\t\t\t\t\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\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\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\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\t\n\t\t\t\t\t\treportData.AllWOTravelsNetViz += Travel.NetViz;\t//this IS where the actual adding to the running total for all Travels for all workorders in this report data\t\t\t\n\t\t\t\t\t\treportData.AllWOTotalNets += Travel.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\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\t\n\t\t\t\t\t\treportData.AllWOExpsNetChargeAmount += Exp.ChargeAmount;//this IS where the actual adding to the running total for all Exp ChargeAmount for all workorders in this report data\t\t\t\t\n\t\t\t\t\t\treportData.AllWOTotalNets += Exp.ChargeAmount;//this is where the actual adding to the running total for all workorder Net ChargeAmount 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\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\t\n\t\t\t\t\t\treportData.AllWOLoansNetViz += Loan.NetViz;\t\t//this IS where the actual adding to the running total for all Loans for all workorders in this report data\t\t\n\t\t\t\t\t\treportData.AllWOTotalNets += Loan.NetViz;//this is where the actual adding to the running total for all workorder Nets 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\t\n\t\t\t\t\t\treportData.AllWOOutsidesNetViz += Outside.NetViz;\t//this IS where the actual adding to the running total for all Outside for all workorders in this report data\t\t\t\n\t\t\t\t\t\treportData.AllWOTotalNets += Outside.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\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":"","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":"Net Totals for Each WO","Active":true,"Notes":"Custom Prepare to display each WO total nets and totals for all workorders in list","Roles":50538,"AType":34,"IncludeWoItemDescendants":false,"Template":"\n\n\n
\n
\n\t\t\t

Nets Totals for each {{ayT 'WorkOrder'}}

\n\t\t
\n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n {{#each ayReportData}}\n \n \n \n {{#if ServiceDate }}{{else}}{{/if}}\n \n {{#if ThisWOAllLaborsNetViz }}{{else}}{{/if}}\n {{#if ThisWOAllPartsNetViz }}{{else}}{{/if}}\n {{#if ThisWOAllTravelsNetViz }}{{else}}{{/if}}\n {{#if ThisWOAllExpsNetChargeAmount }}{{else}}{{/if}}\n {{#if ThisWOAllLoansNetViz }}{{else}}{{/if}}\n {{#if ThisWOAllOutsidesNetViz }}{{else}}{{/if}}\n {{#if ThisWOTotalNets }} {{else}} {{/if}} \n \n {{/each}}\n \n
{{ayT 'WorkOrder'}}{{ayT 'Customer'}}{{ayT 'WorkOrderServiceDate'}}{{ayT 'WorkOrderStatus'}}{{ayT 'WorkOrderItemLaborList'}}{{ayT 'WorkOrderItemPartList'}}{{ayT 'WorkOrderItemTravelList'}}{{ayT 'WorkOrderItemExpenseList'}}{{ayT 'WorkOrderItemLoanList'}}{{ayT 'WorkOrderItemOutsideService'}}{{ayT 'NetPrice'}}
{{Serial}}{{CustomerViz}}{{ayDate ServiceDate}}no Service Date specified{{LastStateNameViz}}{{ayCurrency ThisWOAllLaborsNetViz}}none billable{{ayCurrency ThisWOAllPartsNetViz}}none billable{{ayCurrency ThisWOAllTravelsNetViz}}none billable{{ayCurrency ThisWOAllExpsNetChargeAmount}}none billable{{ayCurrency ThisWOAllLoansNetViz}}none billable{{ayCurrency ThisWOAllOutsidesNetViz}}none billable{{ayCurrency ThisWOTotalNets}}none billable
\n\n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n {{#if AllWOLaborsNetViz}} {{else}} {{/if}}\n {{#if AllWOPartsNetViz}} {{else}} {{/if}}\n {{#if AllWOTravelsNetViz}} {{else}} {{/if}}\n {{#if AllWOExpsNetChargeAmount}} {{else}} {{/if}}\n {{#if AllWOLoansNetViz}} {{else}} {{/if}}\n {{#if AllWOOutsidesNetViz}} {{else}} {{/if}}\n {{#if AllWOTotalNets}} {{else}} {{/if}}\n \n \n
 
Totals for all {{ayT 'WorkOrderItemLaborList'}}{{ayT 'WorkOrderItemPartList'}}{{ayT 'WorkOrderItemTravelList'}}{{ayT 'WorkOrderItemExpenseList'}}{{ayT 'WorkOrderItemLoanList'}}{{ayT 'WorkOrderItemOutsideService'}}{{ayT 'NetPrice'}}
{{ ayCurrency AllWOLaborsNetViz }}$0.00{{ ayCurrency AllWOPartsNetViz }}$0.00{{ ayCurrency AllWOTravelsNetViz }}$0.00{{ ayCurrency AllWOExpsNetChargeAmount }}$0.00{{ ayCurrency AllWOLoansNetViz }}$0.00{{ ayCurrency AllWOOutsidesNetViz }}$0.00{{ ayCurrency AllWOTotalNets }}$0.00
\n
\n\n\n","Style":".nodata {\n font-size: 6pt;\n}\n\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 /* border-bottom: solid 1pt #9e9e9e; */\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 text-align: center;\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 //this function (if present) is called with the report data \n //before the report is rendered\n //modify data as required here and return it to change the data before the report renders\n //see the help documentation for details\n\n\tawait ayGetTranslations([\"WorkOrder\", \"Customer\", \"WorkOrderServiceDate\", \"WorkOrderStatus\", \"NetPrice\", \"WorkOrderItemLaborList\", \"WorkOrderItemPartList\", \"WorkOrderItemTravelList\", \"WorkOrderItemExpenseList\", \"WorkOrderItemLoanList\", \"WorkOrderItemOutsideService\", \"TaxCodeTaxA\", \"TaxCodeTaxB\", \"Total\" ]);\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 Net Viz from all workorders so it exists\nreportData.AllWOLaborsNetViz = 0;\n//below declares a key on the entire wo to hold all Part Net Viz from all workorders so it exists\nreportData.AllWOPartsNetViz = 0;\n//below declares a key on the entire wo to hold all Travel Net Viz from all workorders so it exists\nreportData.AllWOTravelsNetViz = 0;\n//below declares a key on the entire wo to hold all Exp Net ChargeAmount from all workorders so it exists\nreportData.AllWOExpsNetChargeAmount = 0;\n//below declares a key on the entire wo to hold all Loan Net Viz from all workorders so it exists\nreportData.AllWOLoansNetViz = 0;\n//below declares a key on the entire wo to hold all OutsideServices Net Viz from all workorders so it exists\nreportData.AllWOOutsidesNetViz = 0;\n\n//below declares a key to hold all Nets from all workorders in this list so it exists\nreportData.AllWOTotalNets = 0;\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\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\t\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\t\t\t\t\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\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\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\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\t\n\t\t\t\t\t\treportData.AllWOTravelsNetViz += Travel.NetViz;\t//this IS where the actual adding to the running total for all Travels for all workorders in this report data\t\t\t\n\t\t\t\t\t\treportData.AllWOTotalNets += Travel.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\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\t\n\t\t\t\t\t\treportData.AllWOExpsNetChargeAmount += Exp.ChargeAmount;//this IS where the actual adding to the running total for all Exp ChargeAmount for all workorders in this report data\t\t\t\t\n\t\t\t\t\t\treportData.AllWOTotalNets += Exp.ChargeAmount;//this is where the actual adding to the running total for all workorder Net ChargeAmount 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\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\t\n\t\t\t\t\t\treportData.AllWOLoansNetViz += Loan.NetViz;\t\t//this IS where the actual adding to the running total for all Loans for all workorders in this report data\t\t\n\t\t\t\t\t\treportData.AllWOTotalNets += Loan.NetViz;//this is where the actual adding to the running total for all workorder Nets 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\t\n\t\t\t\t\t\treportData.AllWOOutsidesNetViz += Outside.NetViz;\t//this IS where the actual adding to the running total for all Outside for all workorders in this report data\t\t\t\n\t\t\t\t\t\treportData.AllWOTotalNets += Outside.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\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":"","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/Nets Taxes LineTotals for each PM Expense.ayrt b/server/AyaNova/resource/rpt/stock-report-templates/Nets Taxes LineTotals for each PM Expense.ayrt index 99b13859..d7127876 100644 --- a/server/AyaNova/resource/rpt/stock-report-templates/Nets Taxes LineTotals for each PM Expense.ayrt +++ b/server/AyaNova/resource/rpt/stock-report-templates/Nets Taxes LineTotals for each PM Expense.ayrt @@ -1 +1 @@ -{"Name":"Nets Taxes LineTotals for each PM Expense","Active":true,"Notes":"","Roles":50538,"AType":80,"IncludeWoItemDescendants":false,"Template":"\n\n\n
\n
\n

{{ayT 'PreventiveMaintenance'}} {{ayT 'WorkOrderItemExpenseList'}} Nets Taxes LineTotals and Grand Totals

\n
\n \n \n \n \n \n \n \n \n \n \n \n \n \n \n {{#each ayReportData}}\n {{#each Items}}\n {{#each Expenses}}\n \n \n \n \n \n {{#if ChargeToCustomer}}\n\t\t\t\t\t{{else}}{{/if}}\n \n \n {{#if ChargeTaxCodeId}}{{else}} {{/if}}\n \n \n \n {{/each}}\n {{/each}}\n {{/each}}\n \n
{{ayT 'PreventiveMaintenance'}}{{ayT 'Customer'}}{{ayT 'PMNextServiceDate'}}{{ayT 'WorkOrderItemExpenseName'}}{{ayT 'WorkOrderItemExpenseChargeToCustomer'}}{{ayT 'WorkOrderItemExpenseChargeAmount'}}{{ayT 'Tax'}}{{ayT 'Total'}}
{{../../Serial}}{{../../CustomerViz}}{{ayDate ../../NextServiceDate}}{{Name}} {{Description}} {{ayCurrency ChargeAmount}}{{ayCurrency TaxAViz}} {{ayCurrency TaxBViz}}{{ayCurrency TaxPaid}}{{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
 
Totals for all {{ayT 'WorkOrderItemExpenseChargeToCustomer'}} {{ayT 'WorkOrderItemExpenseList'}} in this report {{ayT 'WorkOrderItemExpenseChargeAmount'}}{{ayT 'Tax'}}{{ayT 'Total'}}
{{ayCurrency AllWOExpensesNetViz}}{{ayCurrency AllWOExpensesTaxs}}{{ayCurrency AllWOExpensesTotalGrand}}
\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([\"PreventiveMaintenance\", \"Customer\", \"PMNextServiceDate\", \"WorkOrderItemExpenseChargeToCustomer\", \"NetValue\", \"WorkOrderItemExpenseList\", \"WorkOrderItemExpenseName\", \"WorkOrderItemExpenseChargeAmount\", \"Tax\", \"Total\"]);\n\n\n\t//below declares keys to hold for all Expenses so it exists\n\treportData.AllWOExpensesNetViz = 0;\n\treportData.AllWOExpensesTaxs = 0;\n\treportData.AllWOExpensesTotalGrand = 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\n\n\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 \treportData.AllWOExpensesNetViz += Exp.ChargeAmount;\n\t\t\t\t\t\treportData.AllWOExpensesTotalGrand += Exp.ChargeAmount;\n \t \t\t}\t\t\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\treportData.AllWOExpensesTaxs += 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\treportData.AllWOExpensesTotalGrand += Exp.TaxAViz; \n\t\t\t\t\t\t\n\t\t\t\t\t\treportData.AllWOExpensesTaxs += 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\treportData.AllWOExpensesTotalGrand += Exp.TaxBViz;\n \t \t\t}\t\t\t\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\treportData.AllWOExpensesTaxs += 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\treportData.AllWOExpensesTotalGrand += 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}\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 PM Expense","Active":true,"Notes":"","Roles":50538,"AType":80,"IncludeWoItemDescendants":false,"Template":"\n\n\n
\n
\n

{{ayT 'PreventiveMaintenance'}} {{ayT 'WorkOrderItemExpenseList'}} Nets Taxes LineTotals and Grand Totals

\n
\n \n \n \n \n \n \n \n \n \n \n \n \n \n \n {{#each ayReportData}}\n {{#each Items}}\n {{#each Expenses}}\n \n \n \n \n \n {{#if ChargeToCustomer}}\n\t\t\t\t\t{{else}}{{/if}}\n \n \n {{#if ChargeTaxCodeId}}{{else}} {{/if}}\n \n \n \n {{/each}}\n {{/each}}\n {{/each}}\n \n
{{ayT 'PreventiveMaintenance'}}{{ayT 'Customer'}}{{ayT 'PMNextServiceDate'}}{{ayT 'WorkOrderItemExpenseName'}}{{ayT 'WorkOrderItemExpenseChargeToCustomer'}}{{ayT 'WorkOrderItemExpenseChargeAmount'}}{{ayT 'Tax'}}{{ayT 'Total'}}
{{../../Serial}}{{../../CustomerViz}}{{ayDate ../../NextServiceDate}}{{Name}} {{Description}} {{ayCurrency ChargeAmount}}{{ayCurrency TaxAViz}} {{ayCurrency TaxBViz}}{{ayCurrency TaxPaid}}{{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
 
Totals for all {{ayT 'WorkOrderItemExpenseChargeToCustomer'}} {{ayT 'WorkOrderItemExpenseList'}} in this report {{ayT 'WorkOrderItemExpenseChargeAmount'}}{{ayT 'Tax'}}{{ayT 'Total'}}
{{ayCurrency AllWOExpensesNetViz}}{{ayCurrency AllWOExpensesTaxs}}{{ayCurrency AllWOExpensesTotalGrand}}
\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([\"PreventiveMaintenance\", \"Customer\", \"PMNextServiceDate\", \"WorkOrderItemExpenseChargeToCustomer\", \"NetPrice\", \"WorkOrderItemExpenseList\", \"WorkOrderItemExpenseName\", \"WorkOrderItemExpenseChargeAmount\", \"Tax\", \"Total\"]);\n\n\n\t//below declares keys to hold for all Expenses so it exists\n\treportData.AllWOExpensesNetViz = 0;\n\treportData.AllWOExpensesTaxs = 0;\n\treportData.AllWOExpensesTotalGrand = 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\n\n\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 \treportData.AllWOExpensesNetViz += Exp.ChargeAmount;\n\t\t\t\t\t\treportData.AllWOExpensesTotalGrand += Exp.ChargeAmount;\n \t \t\t}\t\t\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\treportData.AllWOExpensesTaxs += 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\treportData.AllWOExpensesTotalGrand += Exp.TaxAViz; \n\t\t\t\t\t\t\n\t\t\t\t\t\treportData.AllWOExpensesTaxs += 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\treportData.AllWOExpensesTotalGrand += Exp.TaxBViz;\n \t \t\t}\t\t\t\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\treportData.AllWOExpensesTaxs += 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\treportData.AllWOExpensesTotalGrand += 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}\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/Nets Taxes LineTotals for each PM Labor.ayrt b/server/AyaNova/resource/rpt/stock-report-templates/Nets Taxes LineTotals for each PM Labor.ayrt index 384df97c..d4e2788e 100644 --- a/server/AyaNova/resource/rpt/stock-report-templates/Nets Taxes LineTotals for each PM Labor.ayrt +++ b/server/AyaNova/resource/rpt/stock-report-templates/Nets Taxes LineTotals for each PM Labor.ayrt @@ -1 +1 @@ -{"Name":"Nets Taxes LineTotals for each PM Labor","Active":true,"Notes":"","Roles":50538,"AType":81,"IncludeWoItemDescendants":false,"Template":"\n\n\n
\n
\n

{{ayT 'PreventiveMaintenance'}} {{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 'ServicePreventiveMaintenance'}}{{ayT 'Customer'}}{{ayT 'PMNextServiceDate'}}{{ayT 'WorkOrderItemLaborServiceRateID'}}{{ayT 'WorkOrderItemLaborPrice'}}{{ayT 'WorkOrderItemLaborServiceRateQuantity'}}{{ayT 'NetValue'}}{{ayT 'TaxCodeTaxA'}}{{ayT 'TaxCodeTaxB'}}{{ayT 'Total'}}
{{../../Serial}}{{../../CustomerViz}}{{ayDate ../../NextServiceDate}}{{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 'NetValue'}}{{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([\"PreventiveMaintenance\", \"ServicePreventiveMaintenance\", \"Customer\", \"PMNextServiceDate\", \"NetValue\", \"WorkOrderItemLaborList\", \"WorkOrderItemLaborServiceRateID\", \"WorkOrderItemLaborServiceRateQuantity\", \"WorkOrderItemLaborPrice\", \"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 PM Labor","Active":true,"Notes":"","Roles":50538,"AType":81,"IncludeWoItemDescendants":false,"Template":"\n\n\n
\n
\n

{{ayT 'PreventiveMaintenance'}} {{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 'ServicePreventiveMaintenance'}}{{ayT 'Customer'}}{{ayT 'PMNextServiceDate'}}{{ayT 'WorkOrderItemLaborServiceRateID'}}{{ayT 'WorkOrderItemLaborPrice'}}{{ayT 'WorkOrderItemLaborServiceRateQuantity'}}{{ayT 'NetPrice'}}{{ayT 'TaxCodeTaxA'}}{{ayT 'TaxCodeTaxB'}}{{ayT 'Total'}}
{{../../Serial}}{{../../CustomerViz}}{{ayDate ../../NextServiceDate}}{{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([\"PreventiveMaintenance\", \"ServicePreventiveMaintenance\", \"Customer\", \"PMNextServiceDate\", \"NetPrice\", \"WorkOrderItemLaborList\", \"WorkOrderItemLaborServiceRateID\", \"WorkOrderItemLaborServiceRateQuantity\", \"WorkOrderItemLaborPrice\", \"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/Nets Taxes LineTotals for each PM Loans.ayrt b/server/AyaNova/resource/rpt/stock-report-templates/Nets Taxes LineTotals for each PM Loans.ayrt index 75ff016d..2f8369e7 100644 --- a/server/AyaNova/resource/rpt/stock-report-templates/Nets Taxes LineTotals for each PM Loans.ayrt +++ b/server/AyaNova/resource/rpt/stock-report-templates/Nets Taxes LineTotals for each PM Loans.ayrt @@ -1 +1 @@ -{"Name":"Nets Taxes LineTotals for each PM Loans","Active":true,"Notes":"","Roles":50538,"AType":82,"IncludeWoItemDescendants":false,"Template":"\n\n\n
\n
\n

{{ayT 'PreventiveMaintenance'}} {{ayT 'WorkOrderItemLoanList'}} 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 Loans}}\n \n \n \n \n \n \n \n \n \n \n \n \n \n {{/each}}\n {{/each}}\n {{/each}}\n \n
{{ayT 'PreventiveMaintenance'}}{{ayT 'Customer'}}{{ayT 'PMNextServiceDate'}}{{ayT 'WorkOrderItemLoanUnit'}}{{ayT 'WorkOrderItemLoanRate'}}{{ayT 'WorkOrderItemLoanQuantity'}}{{ayT 'NetValue'}}{{ayT 'TaxCodeTaxA'}}{{ayT 'TaxCodeTaxB'}}{{ayT 'Total'}}
{{../../Serial}}{{../../CustomerViz}}{{ayDate ../../NextServiceDate}}{{LoanUnitViz}}{{UnitOfMeasureViz}}{{ayCurrency PriceViz}}{{Quantity}}{{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 'WorkOrderItemLoanList'}} in this report {{ayT 'NetValue'}}{{ayT 'TaxCodeTaxA'}}{{ayT 'TaxCodeTaxB'}}{{ayT 'Total'}}
{{ayCurrency AllWOLoansNetViz}}{{ayCurrency AllWOLoansTaxAs}}{{ayCurrency AllWOLoansTaxBs}}{{ayCurrency AllWOLoansTotalGrand}}
\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([\"PreventiveMaintenance\", \"Customer\", \"PMNextServiceDate\", \"NetValue\", \"WorkOrderItemLoanList\", \"WorkOrderItemLoanUnit\", \"WorkOrderItemLoanQuantity\", \"WorkOrderItemLoanRate\", \"TaxCodeTaxA\", \"TaxCodeTaxB\", \"Total\"]);\n\n\n\t//below declares keys to hold for all Loans so it exists\n\treportData.AllWOLoansNetViz = 0;\n\treportData.AllWOLoansTaxAs = 0;\n\treportData.AllWOLoansTaxBs = 0;\n\treportData.AllWOLoansTotalGrand = 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 Loan record of the wo's Item\n\t\t\tfor (const Loan of Item.Loans) {\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 (Loan.NetViz != null) {\n\t\t\t\t\treportData.AllWOLoansNetViz += Loan.NetViz; //this IS where the actual adding to running total for this WOItem's Net Loan\n\t\t\t\t\treportData.AllWOLoansTaxAs += Loan.TaxAViz;\n\t\t\t\t\treportData.AllWOLoansTaxBs += Loan.TaxBViz;\n\t\t\t\t\treportData.AllWOLoansTotalGrand += Loan.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 PM Loans","Active":true,"Notes":"","Roles":50538,"AType":82,"IncludeWoItemDescendants":false,"Template":"\n\n\n
\n
\n

{{ayT 'PreventiveMaintenance'}} {{ayT 'WorkOrderItemLoanList'}} 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 Loans}}\n \n \n \n \n \n \n \n \n \n \n \n \n \n {{/each}}\n {{/each}}\n {{/each}}\n \n
{{ayT 'PreventiveMaintenance'}}{{ayT 'Customer'}}{{ayT 'PMNextServiceDate'}}{{ayT 'WorkOrderItemLoanUnit'}}{{ayT 'WorkOrderItemLoanRate'}}{{ayT 'WorkOrderItemLoanQuantity'}}{{ayT 'NetPrice'}}{{ayT 'TaxCodeTaxA'}}{{ayT 'TaxCodeTaxB'}}{{ayT 'Total'}}
{{../../Serial}}{{../../CustomerViz}}{{ayDate ../../NextServiceDate}}{{LoanUnitViz}}{{UnitOfMeasureViz}}{{ayCurrency PriceViz}}{{Quantity}}{{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 'WorkOrderItemLoanList'}} in this report {{ayT 'NetPrice'}}{{ayT 'TaxCodeTaxA'}}{{ayT 'TaxCodeTaxB'}}{{ayT 'Total'}}
{{ayCurrency AllWOLoansNetViz}}{{ayCurrency AllWOLoansTaxAs}}{{ayCurrency AllWOLoansTaxBs}}{{ayCurrency AllWOLoansTotalGrand}}
\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([\"PreventiveMaintenance\", \"Customer\", \"PMNextServiceDate\", \"NetPrice\", \"WorkOrderItemLoanList\", \"WorkOrderItemLoanUnit\", \"WorkOrderItemLoanQuantity\", \"WorkOrderItemLoanRate\", \"TaxCodeTaxA\", \"TaxCodeTaxB\", \"Total\"]);\n\n\n\t//below declares keys to hold for all Loans so it exists\n\treportData.AllWOLoansNetViz = 0;\n\treportData.AllWOLoansTaxAs = 0;\n\treportData.AllWOLoansTaxBs = 0;\n\treportData.AllWOLoansTotalGrand = 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 Loan record of the wo's Item\n\t\t\tfor (const Loan of Item.Loans) {\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 (Loan.NetViz != null) {\n\t\t\t\t\treportData.AllWOLoansNetViz += Loan.NetViz; //this IS where the actual adding to running total for this WOItem's Net Loan\n\t\t\t\t\treportData.AllWOLoansTaxAs += Loan.TaxAViz;\n\t\t\t\t\treportData.AllWOLoansTaxBs += Loan.TaxBViz;\n\t\t\t\t\treportData.AllWOLoansTotalGrand += Loan.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/Nets Taxes LineTotals for each PM Part.ayrt b/server/AyaNova/resource/rpt/stock-report-templates/Nets Taxes LineTotals for each PM Part.ayrt index ab5d01a3..f24776d3 100644 --- a/server/AyaNova/resource/rpt/stock-report-templates/Nets Taxes LineTotals for each PM Part.ayrt +++ b/server/AyaNova/resource/rpt/stock-report-templates/Nets Taxes LineTotals for each PM Part.ayrt @@ -1 +1 @@ -{"Name":"Nets Taxes LineTotals for each PM Part","Active":true,"Notes":"","Roles":50538,"AType":83,"IncludeWoItemDescendants":false,"Template":"\n\n\n
\n
\n

{{ayT 'PreventiveMaintenance'}} {{ayT 'WorkOrderItemPartList'}} 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 Parts}}\n \n \n \n \n \n \n \n \n \n \n \n \n {{/each}}\n {{/each}}\n {{/each}}\n \n
{{ayT 'ServicePreventiveMaintenance'}}{{ayT 'Customer'}}{{ayT 'PMNextServiceDate'}}{{ayT 'WorkOrderItemPartList'}}{{ayT 'WorkOrderItemPartPrice'}}{{ayT 'WorkOrderItemPartQuantity'}}{{ayT 'NetValue'}}{{ayT 'TaxCodeTaxA'}}{{ayT 'TaxCodeTaxB'}}{{ayT 'Total'}}
{{../../Serial}}{{../../CustomerViz}}{{ayDate ../../NextServiceDate}}{{PartNameViz}} {{PartDescriptionViz}}{{ayCurrency PriceViz}}{{Quantity}}{{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 'WorkOrderItemPartList'}} in this report {{ayT 'NetValue'}}{{ayT 'TaxCodeTaxA'}}{{ayT 'TaxCodeTaxB'}}{{ayT 'Total'}}
{{ayCurrency AllWOPartsNetViz}}{{ayCurrency AllWOPartsTaxAs}}{{ayCurrency AllWOPartsTaxBs}}{{ayCurrency AllWOPartsTotalGrand}}
\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([\"PreventiveMaintenance\", \"ServicePreventiveMaintenance\", \"Customer\", \"PMNextServiceDate\", \"NetValue\", \"WorkOrderItemPartList\", \"WorkOrderItemPartQuantity\", \"WorkOrderItemPartPrice\", \"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 parts so it exists\n\treportData.AllWOPartsNetViz = 0;\n\treportData.AllWOPartsTaxAs = 0;\n\treportData.AllWOPartsTaxBs = 0;\n\treportData.AllWOPartsTotalGrand = 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 Part record of the wo's Item\n\t\t\tfor (const Part of Item.Parts) {\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 (Part.NetViz != null) {\n\t\t\t\t\treportData.AllWOPartsNetViz += Part.NetViz; //this IS where the actual adding to running total for this WOItem's Net Parts\n\t\t\t\t\treportData.AllWOPartsTaxAs += Part.TaxAViz;\n\t\t\t\t\treportData.AllWOPartsTaxBs += Part.TaxBViz;\n\t\t\t\t\treportData.AllWOPartsTotalGrand += Part.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 PM Part","Active":true,"Notes":"","Roles":50538,"AType":83,"IncludeWoItemDescendants":false,"Template":"\n\n\n
\n
\n

{{ayT 'PreventiveMaintenance'}} {{ayT 'WorkOrderItemPartList'}} 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 Parts}}\n \n \n \n \n \n \n \n \n \n \n \n \n {{/each}}\n {{/each}}\n {{/each}}\n \n
{{ayT 'ServicePreventiveMaintenance'}}{{ayT 'Customer'}}{{ayT 'PMNextServiceDate'}}{{ayT 'WorkOrderItemPartList'}}{{ayT 'WorkOrderItemPartPrice'}}{{ayT 'WorkOrderItemPartQuantity'}}{{ayT 'NetPrice'}}{{ayT 'TaxCodeTaxA'}}{{ayT 'TaxCodeTaxB'}}{{ayT 'Total'}}
{{../../Serial}}{{../../CustomerViz}}{{ayDate ../../NextServiceDate}}{{PartNameViz}} {{PartDescriptionViz}}{{ayCurrency PriceViz}}{{Quantity}}{{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 'WorkOrderItemPartList'}} in this report {{ayT 'NetPrice'}}{{ayT 'TaxCodeTaxA'}}{{ayT 'TaxCodeTaxB'}}{{ayT 'Total'}}
{{ayCurrency AllWOPartsNetViz}}{{ayCurrency AllWOPartsTaxAs}}{{ayCurrency AllWOPartsTaxBs}}{{ayCurrency AllWOPartsTotalGrand}}
\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([\"PreventiveMaintenance\", \"ServicePreventiveMaintenance\", \"Customer\", \"PMNextServiceDate\", \"NetPrice\", \"WorkOrderItemPartList\", \"WorkOrderItemPartQuantity\", \"WorkOrderItemPartPrice\", \"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 parts so it exists\n\treportData.AllWOPartsNetViz = 0;\n\treportData.AllWOPartsTaxAs = 0;\n\treportData.AllWOPartsTaxBs = 0;\n\treportData.AllWOPartsTotalGrand = 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 Part record of the wo's Item\n\t\t\tfor (const Part of Item.Parts) {\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 (Part.NetViz != null) {\n\t\t\t\t\treportData.AllWOPartsNetViz += Part.NetViz; //this IS where the actual adding to running total for this WOItem's Net Parts\n\t\t\t\t\treportData.AllWOPartsTaxAs += Part.TaxAViz;\n\t\t\t\t\treportData.AllWOPartsTaxBs += Part.TaxBViz;\n\t\t\t\t\treportData.AllWOPartsTotalGrand += Part.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/Nets Taxes LineTotals for each PM Travel.ayrt b/server/AyaNova/resource/rpt/stock-report-templates/Nets Taxes LineTotals for each PM Travel.ayrt index 3eef6c87..d1fc0197 100644 --- a/server/AyaNova/resource/rpt/stock-report-templates/Nets Taxes LineTotals for each PM Travel.ayrt +++ b/server/AyaNova/resource/rpt/stock-report-templates/Nets Taxes LineTotals for each PM Travel.ayrt @@ -1 +1 @@ -{"Name":"Nets Taxes LineTotals for each PM Travel","Active":true,"Notes":"","Roles":50538,"AType":87,"IncludeWoItemDescendants":false,"Template":"\n\n\n
\n
\n

{{ayT 'PreventiveMaintenance'}} {{ayT 'WorkOrderItemTravelList'}} 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 Travels}}\n \n \n \n \n \n \n \n \n \n \n \n \n {{/each}}\n {{/each}}\n {{/each}}\n \n
{{ayT 'ServicePreventiveMaintenance'}}{{ayT 'Customer'}}{{ayT 'PMNextServiceDate'}}{{ayT 'WorkOrderItemTravelServiceRateID'}}{{ayT 'WorkOrderItemTravelRateCharge'}}{{ayT 'WorkOrderItemTravelRateQuantity'}}{{ayT 'NetValue'}}{{ayT 'TaxCodeTaxA'}}{{ayT 'TaxCodeTaxB'}}{{ayT 'Total'}}
{{../../Serial}}{{../../CustomerViz}}{{ayDate ../../NextServiceDate}}{{TravelRateViz}}{{ayCurrency PriceViz}}{{TravelRateQuantity}}{{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 'WorkOrderItemTravelList'}} in this report {{ayT 'NetValue'}}{{ayT 'TaxCodeTaxA'}}{{ayT 'TaxCodeTaxB'}}{{ayT 'Total'}}
{{ayCurrency AllWOTravelsNetViz}}{{ayCurrency AllWOTravelsTaxAs}}{{ayCurrency AllWOTravelsTaxBs}}{{ayCurrency AllWOTravelsTotalGrand}}
\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([\"PreventiveMaintenance\", \"ServicePreventiveMaintenance\", \"Customer\", \"PMNextServiceDate\", \"NetValue\", \"WorkOrderItemTravelList\", \"WorkOrderItemTravelServiceRateID\", \"WorkOrderItemTravelRateQuantity\", \"WorkOrderItemTravelRateCharge\", \"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 Travels so it exists\n\treportData.AllWOTravelsNetViz = 0;\n\treportData.AllWOTravelsTaxAs = 0;\n\treportData.AllWOTravelsTaxBs = 0;\n\treportData.AllWOTravelsTotalGrand = 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 Travel record of the wo's Item\n\t\t\tfor (const Travel of Item.Travels) {\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 (Travel.NetViz != null) {\n\t\t\t\t\treportData.AllWOTravelsNetViz += Travel.NetViz; //this IS where the actual adding to running total for this WOItem's Net Travel\n\t\t\t\t\treportData.AllWOTravelsTaxAs += Travel.TaxAViz;\n\t\t\t\t\treportData.AllWOTravelsTaxBs += Travel.TaxBViz;\n\t\t\t\t\treportData.AllWOTravelsTotalGrand += Travel.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 PM Travel","Active":true,"Notes":"","Roles":50538,"AType":87,"IncludeWoItemDescendants":false,"Template":"\n\n\n
\n
\n

{{ayT 'PreventiveMaintenance'}} {{ayT 'WorkOrderItemTravelList'}} 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 Travels}}\n \n \n \n \n \n \n \n \n \n \n \n \n {{/each}}\n {{/each}}\n {{/each}}\n \n
{{ayT 'ServicePreventiveMaintenance'}}{{ayT 'Customer'}}{{ayT 'PMNextServiceDate'}}{{ayT 'WorkOrderItemTravelServiceRateID'}}{{ayT 'WorkOrderItemTravelRateCharge'}}{{ayT 'WorkOrderItemTravelRateQuantity'}}{{ayT 'NetPrice'}}{{ayT 'TaxCodeTaxA'}}{{ayT 'TaxCodeTaxB'}}{{ayT 'Total'}}
{{../../Serial}}{{../../CustomerViz}}{{ayDate ../../NextServiceDate}}{{TravelRateViz}}{{ayCurrency PriceViz}}{{TravelRateQuantity}}{{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 'WorkOrderItemTravelList'}} in this report {{ayT 'NetPrice'}}{{ayT 'TaxCodeTaxA'}}{{ayT 'TaxCodeTaxB'}}{{ayT 'Total'}}
{{ayCurrency AllWOTravelsNetViz}}{{ayCurrency AllWOTravelsTaxAs}}{{ayCurrency AllWOTravelsTaxBs}}{{ayCurrency AllWOTravelsTotalGrand}}
\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([\"PreventiveMaintenance\", \"ServicePreventiveMaintenance\", \"Customer\", \"PMNextServiceDate\", \"NetPrice\", \"WorkOrderItemTravelList\", \"WorkOrderItemTravelServiceRateID\", \"WorkOrderItemTravelRateQuantity\", \"WorkOrderItemTravelRateCharge\", \"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 Travels so it exists\n\treportData.AllWOTravelsNetViz = 0;\n\treportData.AllWOTravelsTaxAs = 0;\n\treportData.AllWOTravelsTaxBs = 0;\n\treportData.AllWOTravelsTotalGrand = 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 Travel record of the wo's Item\n\t\t\tfor (const Travel of Item.Travels) {\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 (Travel.NetViz != null) {\n\t\t\t\t\treportData.AllWOTravelsNetViz += Travel.NetViz; //this IS where the actual adding to running total for this WOItem's Net Travel\n\t\t\t\t\treportData.AllWOTravelsTaxAs += Travel.TaxAViz;\n\t\t\t\t\treportData.AllWOTravelsTaxBs += Travel.TaxBViz;\n\t\t\t\t\treportData.AllWOTravelsTotalGrand += Travel.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/Nets Taxes LineTotals for each Quote Expense.ayrt b/server/AyaNova/resource/rpt/stock-report-templates/Nets Taxes LineTotals for each Quote Expense.ayrt index ea77ca3b..fe973de7 100644 --- a/server/AyaNova/resource/rpt/stock-report-templates/Nets Taxes LineTotals for each Quote Expense.ayrt +++ b/server/AyaNova/resource/rpt/stock-report-templates/Nets Taxes LineTotals for each Quote Expense.ayrt @@ -1 +1 @@ -{"Name":"Nets Taxes LineTotals for each Quote Expense","Active":true,"Notes":"","Roles":50538,"AType":23,"IncludeWoItemDescendants":false,"Template":"\n\n\n
\n
\n

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

\n
\n \n \n \n \n \n \n \n \n \n \n \n \n \n \n {{#each ayReportData}}\n {{#each Items}}\n {{#each Expenses}}\n \n \n \n \n \n {{#if ChargeToCustomer}}\n\t\t\t\t\t{{else}}{{/if}}\n \n \n {{#if ChargeTaxCodeId}}{{else}} {{/if}}\n \n \n \n {{/each}}\n {{/each}}\n {{/each}}\n \n
{{ayT 'Quote'}}{{ayT 'Customer'}}{{ayT 'QuoteQuoteRequestDate'}}{{ayT 'WorkOrderItemExpenseName'}}{{ayT 'WorkOrderItemExpenseChargeToCustomer'}}{{ayT 'WorkOrderItemExpenseChargeAmount'}}{{ayT 'Tax'}}{{ayT 'Total'}}
{{../../Serial}}{{../../CustomerViz}}{{ayDate ../../ServiceDate}}{{Name}} {{Description}} {{ayCurrency ChargeAmount}}{{ayCurrency TaxAViz}} {{ayCurrency TaxBViz}}{{ayCurrency TaxPaid}}{{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
 
Totals for all {{ayT 'WorkOrderItemExpenseChargeToCustomer'}} {{ayT 'WorkOrderItemExpenseList'}} in this report {{ayT 'WorkOrderItemExpenseChargeAmount'}}{{ayT 'Tax'}}{{ayT 'Total'}}
{{ayCurrency AllWOExpensesNetViz}}{{ayCurrency AllWOExpensesTaxs}}{{ayCurrency AllWOExpensesTotalGrand}}
\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\", \"WorkOrderItemExpenseChargeToCustomer\", \"NetValue\", \"WorkOrderItemExpenseList\", \"WorkOrderItemExpenseName\", \"WorkOrderItemExpenseChargeAmount\", \"Tax\", \"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 Expenses so it exists\n\treportData.AllWOExpensesNetViz = 0;\n\treportData.AllWOExpensesTaxs = 0;\n\treportData.AllWOExpensesTotalGrand = 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\n\n\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 \treportData.AllWOExpensesNetViz += Exp.ChargeAmount;\n\t\t\t\t\t\treportData.AllWOExpensesTotalGrand += Exp.ChargeAmount;\n \t \t\t}\t\t\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\treportData.AllWOExpensesTaxs += 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\treportData.AllWOExpensesTotalGrand += Exp.TaxAViz; \n\t\t\t\t\t\t\n\t\t\t\t\t\treportData.AllWOExpensesTaxs += 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\treportData.AllWOExpensesTotalGrand += Exp.TaxBViz;\n \t \t\t}\t\t\t\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\treportData.AllWOExpensesTaxs += 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\treportData.AllWOExpensesTotalGrand += 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}\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 Expense","Active":true,"Notes":"","Roles":50538,"AType":23,"IncludeWoItemDescendants":false,"Template":"\n\n\n
\n
\n

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

\n
\n \n \n \n \n \n \n \n \n \n \n \n \n \n \n {{#each ayReportData}}\n {{#each Items}}\n {{#each Expenses}}\n \n \n \n \n \n {{#if ChargeToCustomer}}\n\t\t\t\t\t{{else}}{{/if}}\n \n \n {{#if ChargeTaxCodeId}}{{else}} {{/if}}\n \n \n \n {{/each}}\n {{/each}}\n {{/each}}\n \n
{{ayT 'Quote'}}{{ayT 'Customer'}}{{ayT 'QuoteQuoteRequestDate'}}{{ayT 'WorkOrderItemExpenseName'}}{{ayT 'WorkOrderItemExpenseChargeToCustomer'}}{{ayT 'WorkOrderItemExpenseChargeAmount'}}{{ayT 'Tax'}}{{ayT 'Total'}}
{{../../Serial}}{{../../CustomerViz}}{{ayDate ../../ServiceDate}}{{Name}} {{Description}} {{ayCurrency ChargeAmount}}{{ayCurrency TaxAViz}} {{ayCurrency TaxBViz}}{{ayCurrency TaxPaid}}{{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
 
Totals for all {{ayT 'WorkOrderItemExpenseChargeToCustomer'}} {{ayT 'WorkOrderItemExpenseList'}} in this report {{ayT 'WorkOrderItemExpenseChargeAmount'}}{{ayT 'Tax'}}{{ayT 'Total'}}
{{ayCurrency AllWOExpensesNetViz}}{{ayCurrency AllWOExpensesTaxs}}{{ayCurrency AllWOExpensesTotalGrand}}
\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\", \"WorkOrderItemExpenseChargeToCustomer\", \"NetPrice\", \"WorkOrderItemExpenseList\", \"WorkOrderItemExpenseName\", \"WorkOrderItemExpenseChargeAmount\", \"Tax\", \"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 Expenses so it exists\n\treportData.AllWOExpensesNetViz = 0;\n\treportData.AllWOExpensesTaxs = 0;\n\treportData.AllWOExpensesTotalGrand = 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\n\n\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 \treportData.AllWOExpensesNetViz += Exp.ChargeAmount;\n\t\t\t\t\t\treportData.AllWOExpensesTotalGrand += Exp.ChargeAmount;\n \t \t\t}\t\t\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\treportData.AllWOExpensesTaxs += 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\treportData.AllWOExpensesTotalGrand += Exp.TaxAViz; \n\t\t\t\t\t\t\n\t\t\t\t\t\treportData.AllWOExpensesTaxs += 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\treportData.AllWOExpensesTotalGrand += Exp.TaxBViz;\n \t \t\t}\t\t\t\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\treportData.AllWOExpensesTaxs += 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\treportData.AllWOExpensesTotalGrand += 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}\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/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 914c2b51..c85aa3f5 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 'NetValue'}}{{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 'NetValue'}}{{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\", \"NetValue\", \"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 '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 diff --git a/server/AyaNova/resource/rpt/stock-report-templates/Nets Taxes LineTotals for each Quote Loans.ayrt b/server/AyaNova/resource/rpt/stock-report-templates/Nets Taxes LineTotals for each Quote Loans.ayrt index d8420702..9248190c 100644 --- a/server/AyaNova/resource/rpt/stock-report-templates/Nets Taxes LineTotals for each Quote Loans.ayrt +++ b/server/AyaNova/resource/rpt/stock-report-templates/Nets Taxes LineTotals for each Quote Loans.ayrt @@ -1 +1 @@ -{"Name":"Nets Taxes LineTotals for each Quote Loans","Active":true,"Notes":"","Roles":50538,"AType":29,"IncludeWoItemDescendants":false,"Template":"\n\n\n
\n
\n

{{ayT 'Quote'}} {{ayT 'WorkOrderItemLoanList'}} 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 Loans}}\n \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 'WorkOrderItemLoanUnit'}}{{ayT 'WorkOrderItemLoanRate'}}{{ayT 'WorkOrderItemLoanQuantity'}}{{ayT 'NetValue'}}{{ayT 'TaxCodeTaxA'}}{{ayT 'TaxCodeTaxB'}}{{ayT 'Total'}}
{{../../Serial}}{{../../CustomerViz}}{{ayDate ../../Requested}}{{LoanUnitViz}}{{UnitOfMeasureViz}}{{ayCurrency PriceViz}}{{Quantity}}{{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 'WorkOrderItemLoanList'}} in this report {{ayT 'NetValue'}}{{ayT 'TaxCodeTaxA'}}{{ayT 'TaxCodeTaxB'}}{{ayT 'Total'}}
{{ayCurrency AllWOLoansNetViz}}{{ayCurrency AllWOLoansTaxAs}}{{ayCurrency AllWOLoansTaxBs}}{{ayCurrency AllWOLoansTotalGrand}}
\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\", \"NetValue\", \"WorkOrderItemLoanList\", \"WorkOrderItemLoanUnit\", \"WorkOrderItemLoanQuantity\", \"WorkOrderItemLoanRate\", \"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 Loans so it exists\n\treportData.AllWOLoansNetViz = 0;\n\treportData.AllWOLoansTaxAs = 0;\n\treportData.AllWOLoansTaxBs = 0;\n\treportData.AllWOLoansTotalGrand = 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 Loan record of the wo's Item\n\t\t\tfor (const Loan of Item.Loans) {\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 (Loan.NetViz != null) {\n\t\t\t\t\treportData.AllWOLoansNetViz += Loan.NetViz; //this IS where the actual adding to running total for this WOItem's Net Loan\n\t\t\t\t\treportData.AllWOLoansTaxAs += Loan.TaxAViz;\n\t\t\t\t\treportData.AllWOLoansTaxBs += Loan.TaxBViz;\n\t\t\t\t\treportData.AllWOLoansTotalGrand += Loan.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 Loans","Active":true,"Notes":"","Roles":50538,"AType":29,"IncludeWoItemDescendants":false,"Template":"\n\n\n
\n
\n

{{ayT 'Quote'}} {{ayT 'WorkOrderItemLoanList'}} 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 Loans}}\n \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 'WorkOrderItemLoanUnit'}}{{ayT 'WorkOrderItemLoanRate'}}{{ayT 'WorkOrderItemLoanQuantity'}}{{ayT 'NetPrice'}}{{ayT 'TaxCodeTaxA'}}{{ayT 'TaxCodeTaxB'}}{{ayT 'Total'}}
{{../../Serial}}{{../../CustomerViz}}{{ayDate ../../Requested}}{{LoanUnitViz}}{{UnitOfMeasureViz}}{{ayCurrency PriceViz}}{{Quantity}}{{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 'WorkOrderItemLoanList'}} in this report {{ayT 'NetPrice'}}{{ayT 'TaxCodeTaxA'}}{{ayT 'TaxCodeTaxB'}}{{ayT 'Total'}}
{{ayCurrency AllWOLoansNetViz}}{{ayCurrency AllWOLoansTaxAs}}{{ayCurrency AllWOLoansTaxBs}}{{ayCurrency AllWOLoansTotalGrand}}
\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\", \"WorkOrderItemLoanList\", \"WorkOrderItemLoanUnit\", \"WorkOrderItemLoanQuantity\", \"WorkOrderItemLoanRate\", \"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 Loans so it exists\n\treportData.AllWOLoansNetViz = 0;\n\treportData.AllWOLoansTaxAs = 0;\n\treportData.AllWOLoansTaxBs = 0;\n\treportData.AllWOLoansTotalGrand = 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 Loan record of the wo's Item\n\t\t\tfor (const Loan of Item.Loans) {\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 (Loan.NetViz != null) {\n\t\t\t\t\treportData.AllWOLoansNetViz += Loan.NetViz; //this IS where the actual adding to running total for this WOItem's Net Loan\n\t\t\t\t\treportData.AllWOLoansTaxAs += Loan.TaxAViz;\n\t\t\t\t\treportData.AllWOLoansTaxBs += Loan.TaxBViz;\n\t\t\t\t\treportData.AllWOLoansTotalGrand += Loan.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/Nets Taxes LineTotals for each Quote Part.ayrt b/server/AyaNova/resource/rpt/stock-report-templates/Nets Taxes LineTotals for each Quote Part.ayrt index 87e8facf..49fc2e42 100644 --- a/server/AyaNova/resource/rpt/stock-report-templates/Nets Taxes LineTotals for each Quote Part.ayrt +++ b/server/AyaNova/resource/rpt/stock-report-templates/Nets Taxes LineTotals for each Quote Part.ayrt @@ -1 +1 @@ -{"Name":"Nets Taxes LineTotals for each Quote Part","Active":true,"Notes":"","Roles":50538,"AType":30,"IncludeWoItemDescendants":false,"Template":"\n\n\n
\n
\n

{{ayT 'Quote'}} {{ayT 'WorkOrderItemPartList'}} Nets Taxes LineTotals and Grand Totals for each

\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 Parts}}\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 'WorkOrderItemPartList'}}{{ayT 'WorkOrderItemPartPrice'}}{{ayT 'WorkOrderItemPartQuantity'}}{{ayT 'NetValue'}}{{ayT 'TaxCodeTaxA'}}{{ayT 'TaxCodeTaxB'}}{{ayT 'Total'}}
{{../../Serial}}{{../../CustomerViz}}{{ayDate ../../Requested}}{{PartNameViz}} {{PartDescriptionViz}}{{ayCurrency PriceViz}}{{Quantity}}{{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
Totals for all {{ayT 'WorkOrderItemPartList'}} in this report {{ayT 'NetValue'}}{{ayT 'TaxCodeTaxA'}}{{ayT 'TaxCodeTaxB'}}{{ayT 'Total'}}
{{ayCurrency AllWOPartsNetViz}}{{ayCurrency AllWOPartsTaxAs}}{{ayCurrency AllWOPartsTaxBs}}{{ayCurrency AllWOPartsTotalGrand}}
\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\", \"NetValue\", \"WorkOrderItemPartList\", \"WorkOrderItemPartQuantity\", \"WorkOrderItemPartPrice\", \"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 parts so it exists\n\treportData.AllWOPartsNetViz = 0;\n\treportData.AllWOPartsTaxAs = 0;\n\treportData.AllWOPartsTaxBs = 0;\n\treportData.AllWOPartsTotalGrand = 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 Part record of the wo's Item\n\t\t\tfor (const Part of Item.Parts) {\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 (Part.NetViz != null) {\n\t\t\t\t\treportData.AllWOPartsNetViz += Part.NetViz; //this IS where the actual adding to running total for this WOItem's Net Parts\n\t\t\t\t\treportData.AllWOPartsTaxAs += Part.TaxAViz;\n\t\t\t\t\treportData.AllWOPartsTaxBs += Part.TaxBViz;\n\t\t\t\t\treportData.AllWOPartsTotalGrand += Part.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 Part","Active":true,"Notes":"","Roles":50538,"AType":30,"IncludeWoItemDescendants":false,"Template":"\n\n\n
\n
\n

{{ayT 'Quote'}} {{ayT 'WorkOrderItemPartList'}} Nets Taxes LineTotals and Grand Totals for each

\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 Parts}}\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 'WorkOrderItemPartList'}}{{ayT 'WorkOrderItemPartPrice'}}{{ayT 'WorkOrderItemPartQuantity'}}{{ayT 'NetPrice'}}{{ayT 'TaxCodeTaxA'}}{{ayT 'TaxCodeTaxB'}}{{ayT 'Total'}}
{{../../Serial}}{{../../CustomerViz}}{{ayDate ../../Requested}}{{PartNameViz}} {{PartDescriptionViz}}{{ayCurrency PriceViz}}{{Quantity}}{{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
Totals for all {{ayT 'WorkOrderItemPartList'}} in this report {{ayT 'NetPrice'}}{{ayT 'TaxCodeTaxA'}}{{ayT 'TaxCodeTaxB'}}{{ayT 'Total'}}
{{ayCurrency AllWOPartsNetViz}}{{ayCurrency AllWOPartsTaxAs}}{{ayCurrency AllWOPartsTaxBs}}{{ayCurrency AllWOPartsTotalGrand}}
\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\", \"WorkOrderItemPartList\", \"WorkOrderItemPartQuantity\", \"WorkOrderItemPartPrice\", \"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 parts so it exists\n\treportData.AllWOPartsNetViz = 0;\n\treportData.AllWOPartsTaxAs = 0;\n\treportData.AllWOPartsTaxBs = 0;\n\treportData.AllWOPartsTotalGrand = 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 Part record of the wo's Item\n\t\t\tfor (const Part of Item.Parts) {\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 (Part.NetViz != null) {\n\t\t\t\t\treportData.AllWOPartsNetViz += Part.NetViz; //this IS where the actual adding to running total for this WOItem's Net Parts\n\t\t\t\t\treportData.AllWOPartsTaxAs += Part.TaxAViz;\n\t\t\t\t\treportData.AllWOPartsTaxBs += Part.TaxBViz;\n\t\t\t\t\treportData.AllWOPartsTotalGrand += Part.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/Nets Taxes LineTotals for each Quote Travel.ayrt b/server/AyaNova/resource/rpt/stock-report-templates/Nets Taxes LineTotals for each Quote Travel.ayrt index 69521c72..aadf1714 100644 --- a/server/AyaNova/resource/rpt/stock-report-templates/Nets Taxes LineTotals for each Quote Travel.ayrt +++ b/server/AyaNova/resource/rpt/stock-report-templates/Nets Taxes LineTotals for each Quote Travel.ayrt @@ -1 +1 @@ -{"Name":"Nets Taxes LineTotals for each Quote Travel","Active":true,"Notes":"","Roles":50538,"AType":76,"IncludeWoItemDescendants":false,"Template":"\n\n\n
\n
\n

{{ayT 'Quote'}} {{ayT 'WorkOrderItemTravelList'}} 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 Travels}}\n \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 'WorkOrderItemTravelServiceRateID'}}{{ayT 'WorkOrderItemTravelRateCharge'}}{{ayT 'WorkOrderItemTravelRateQuantity'}}{{ayT 'NetValue'}}{{ayT 'TaxCodeTaxA'}}{{ayT 'TaxCodeTaxB'}}{{ayT 'Total'}}
{{../../Serial}}{{../../CustomerViz}}{{ayDate ../../Requested}}{{TravelRateViz}}{{ayCurrency PriceViz}}{{TravelRateQuantity}}{{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 'WorkOrderItemTravelList'}} in this report {{ayT 'NetValue'}}{{ayT 'TaxCodeTaxA'}}{{ayT 'TaxCodeTaxB'}}{{ayT 'Total'}}
{{ayCurrency AllWOTravelsNetViz}}{{ayCurrency AllWOTravelsTaxAs}}{{ayCurrency AllWOTravelsTaxBs}}{{ayCurrency AllWOTravelsTotalGrand}}
\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\", \"QuoteQuoteRequestDate\", \"Customer\", \"PMNextServiceDate\", \"NetValue\", \"WorkOrderItemTravelList\", \"WorkOrderItemTravelServiceRateID\", \"WorkOrderItemTravelRateQuantity\", \"WorkOrderItemTravelRateCharge\", \"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 Travels so it exists\n\treportData.AllWOTravelsNetViz = 0;\n\treportData.AllWOTravelsTaxAs = 0;\n\treportData.AllWOTravelsTaxBs = 0;\n\treportData.AllWOTravelsTotalGrand = 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 Travel record of the wo's Item\n\t\t\tfor (const Travel of Item.Travels) {\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 (Travel.NetViz != null) {\n\t\t\t\t\treportData.AllWOTravelsNetViz += Travel.NetViz; //this IS where the actual adding to running total for this WOItem's Net Travel\n\t\t\t\t\treportData.AllWOTravelsTaxAs += Travel.TaxAViz;\n\t\t\t\t\treportData.AllWOTravelsTaxBs += Travel.TaxBViz;\n\t\t\t\t\treportData.AllWOTravelsTotalGrand += Travel.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 Travel","Active":true,"Notes":"","Roles":50538,"AType":76,"IncludeWoItemDescendants":false,"Template":"\n\n\n
\n
\n

{{ayT 'Quote'}} {{ayT 'WorkOrderItemTravelList'}} 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 Travels}}\n \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 'WorkOrderItemTravelServiceRateID'}}{{ayT 'WorkOrderItemTravelRateCharge'}}{{ayT 'WorkOrderItemTravelRateQuantity'}}{{ayT 'NetPrice'}}{{ayT 'TaxCodeTaxA'}}{{ayT 'TaxCodeTaxB'}}{{ayT 'Total'}}
{{../../Serial}}{{../../CustomerViz}}{{ayDate ../../Requested}}{{TravelRateViz}}{{ayCurrency PriceViz}}{{TravelRateQuantity}}{{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 'WorkOrderItemTravelList'}} in this report {{ayT 'NetPrice'}}{{ayT 'TaxCodeTaxA'}}{{ayT 'TaxCodeTaxB'}}{{ayT 'Total'}}
{{ayCurrency AllWOTravelsNetViz}}{{ayCurrency AllWOTravelsTaxAs}}{{ayCurrency AllWOTravelsTaxBs}}{{ayCurrency AllWOTravelsTotalGrand}}
\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\", \"QuoteQuoteRequestDate\", \"Customer\", \"PMNextServiceDate\", \"NetPrice\", \"WorkOrderItemTravelList\", \"WorkOrderItemTravelServiceRateID\", \"WorkOrderItemTravelRateQuantity\", \"WorkOrderItemTravelRateCharge\", \"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 Travels so it exists\n\treportData.AllWOTravelsNetViz = 0;\n\treportData.AllWOTravelsTaxAs = 0;\n\treportData.AllWOTravelsTaxBs = 0;\n\treportData.AllWOTravelsTotalGrand = 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 Travel record of the wo's Item\n\t\t\tfor (const Travel of Item.Travels) {\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 (Travel.NetViz != null) {\n\t\t\t\t\treportData.AllWOTravelsNetViz += Travel.NetViz; //this IS where the actual adding to running total for this WOItem's Net Travel\n\t\t\t\t\treportData.AllWOTravelsTaxAs += Travel.TaxAViz;\n\t\t\t\t\treportData.AllWOTravelsTaxBs += Travel.TaxBViz;\n\t\t\t\t\treportData.AllWOTravelsTotalGrand += Travel.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/Nets Taxes LineTotals for each WO Expense.ayrt b/server/AyaNova/resource/rpt/stock-report-templates/Nets Taxes LineTotals for each WO Expense.ayrt index 7afd2cd6..ed95250d 100644 --- a/server/AyaNova/resource/rpt/stock-report-templates/Nets Taxes LineTotals for each WO Expense.ayrt +++ b/server/AyaNova/resource/rpt/stock-report-templates/Nets Taxes LineTotals for each WO Expense.ayrt @@ -1 +1 @@ -{"Name":"Nets Taxes LineTotals for each WO Expense","Active":true,"Notes":"","Roles":50538,"AType":36,"IncludeWoItemDescendants":false,"Template":"\n\n\n
\n
\n

{{ayT 'WorkOrder'}} {{ayT 'WorkOrderItemExpenseList'}} Nets Taxes LineTotals and Grand Totals

\n
\n \n \n \n \n \n \n \n \n \n \n \n \n \n \n {{#each ayReportData}}\n {{#each Items}}\n {{#each Expenses}}\n \n \n \n \n \n {{#if ChargeToCustomer}}\n\t\t\t\t\t{{else}}{{/if}}\n \n \n {{#if ChargeTaxCodeId}}{{else}} {{/if}}\n \n \n \n {{/each}}\n {{/each}}\n {{/each}}\n \n
{{ayT 'WorkOrder'}}{{ayT 'Customer'}}{{ayT 'WorkOrderServiceDate'}}{{ayT 'WorkOrderItemExpenseName'}}{{ayT 'WorkOrderItemExpenseChargeToCustomer'}}{{ayT 'WorkOrderItemExpenseChargeAmount'}}{{ayT 'Tax'}}{{ayT 'Total'}}
{{../../Serial}}{{../../CustomerViz}}{{ayDate ../../ServiceDate}}{{Name}} {{Description}} {{ayCurrency ChargeAmount}}{{ayCurrency TaxAViz}} {{ayCurrency TaxBViz}}{{ayCurrency TaxPaid}}{{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
 
Totals for all {{ayT 'WorkOrderItemExpenseChargeToCustomer'}} {{ayT 'WorkOrderItemExpenseList'}} in this report {{ayT 'WorkOrderItemExpenseChargeAmount'}}{{ayT 'Tax'}}{{ayT 'Total'}}
{{ayCurrency AllWOExpensesNetViz}}{{ayCurrency AllWOExpensesTaxs}}{{ayCurrency AllWOExpensesTotalGrand}}
\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([\"WorkOrder\", \"Customer\", \"WorkOrderServiceDate\", \"WorkOrderItemExpenseChargeToCustomer\", \"NetValue\", \"WorkOrderItemExpenseList\", \"WorkOrderItemExpenseName\", \"WorkOrderItemExpenseChargeAmount\", \"Tax\", \"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 Expenses so it exists\n\treportData.AllWOExpensesNetViz = 0;\n\treportData.AllWOExpensesTaxs = 0;\n\treportData.AllWOExpensesTotalGrand = 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\n\n\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 \treportData.AllWOExpensesNetViz += Exp.ChargeAmount;\n\t\t\t\t\t\treportData.AllWOExpensesTotalGrand += Exp.ChargeAmount;\n \t \t\t}\t\t\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\treportData.AllWOExpensesTaxs += 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\treportData.AllWOExpensesTotalGrand += Exp.TaxAViz; \n\t\t\t\t\t\t\n\t\t\t\t\t\treportData.AllWOExpensesTaxs += 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\treportData.AllWOExpensesTotalGrand += Exp.TaxBViz;\n \t \t\t}\t\t\t\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\treportData.AllWOExpensesTaxs += 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\treportData.AllWOExpensesTotalGrand += 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}\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 WO Expense","Active":true,"Notes":"","Roles":50538,"AType":36,"IncludeWoItemDescendants":false,"Template":"\n\n\n
\n
\n

{{ayT 'WorkOrder'}} {{ayT 'WorkOrderItemExpenseList'}} Nets Taxes LineTotals and Grand Totals

\n
\n \n \n \n \n \n \n \n \n \n \n \n \n \n \n {{#each ayReportData}}\n {{#each Items}}\n {{#each Expenses}}\n \n \n \n \n \n {{#if ChargeToCustomer}}\n\t\t\t\t\t{{else}}{{/if}}\n \n \n {{#if ChargeTaxCodeId}}{{else}} {{/if}}\n \n \n \n {{/each}}\n {{/each}}\n {{/each}}\n \n
{{ayT 'WorkOrder'}}{{ayT 'Customer'}}{{ayT 'WorkOrderServiceDate'}}{{ayT 'WorkOrderItemExpenseName'}}{{ayT 'WorkOrderItemExpenseChargeToCustomer'}}{{ayT 'WorkOrderItemExpenseChargeAmount'}}{{ayT 'Tax'}}{{ayT 'Total'}}
{{../../Serial}}{{../../CustomerViz}}{{ayDate ../../ServiceDate}}{{Name}} {{Description}} {{ayCurrency ChargeAmount}}{{ayCurrency TaxAViz}} {{ayCurrency TaxBViz}}{{ayCurrency TaxPaid}}{{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
 
Totals for all {{ayT 'WorkOrderItemExpenseChargeToCustomer'}} {{ayT 'WorkOrderItemExpenseList'}} in this report {{ayT 'WorkOrderItemExpenseChargeAmount'}}{{ayT 'Tax'}}{{ayT 'Total'}}
{{ayCurrency AllWOExpensesNetViz}}{{ayCurrency AllWOExpensesTaxs}}{{ayCurrency AllWOExpensesTotalGrand}}
\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([\"WorkOrder\", \"Customer\", \"WorkOrderServiceDate\", \"WorkOrderItemExpenseChargeToCustomer\", \"NetPrice\", \"WorkOrderItemExpenseList\", \"WorkOrderItemExpenseName\", \"WorkOrderItemExpenseChargeAmount\", \"Tax\", \"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 Expenses so it exists\n\treportData.AllWOExpensesNetViz = 0;\n\treportData.AllWOExpensesTaxs = 0;\n\treportData.AllWOExpensesTotalGrand = 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\n\n\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 \treportData.AllWOExpensesNetViz += Exp.ChargeAmount;\n\t\t\t\t\t\treportData.AllWOExpensesTotalGrand += Exp.ChargeAmount;\n \t \t\t}\t\t\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\treportData.AllWOExpensesTaxs += 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\treportData.AllWOExpensesTotalGrand += Exp.TaxAViz; \n\t\t\t\t\t\t\n\t\t\t\t\t\treportData.AllWOExpensesTaxs += 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\treportData.AllWOExpensesTotalGrand += Exp.TaxBViz;\n \t \t\t}\t\t\t\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\treportData.AllWOExpensesTaxs += 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\treportData.AllWOExpensesTotalGrand += 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}\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/Nets Taxes LineTotals for each WO Labor.ayrt b/server/AyaNova/resource/rpt/stock-report-templates/Nets Taxes LineTotals for each WO Labor.ayrt index 9604d662..db4022b1 100644 --- a/server/AyaNova/resource/rpt/stock-report-templates/Nets Taxes LineTotals for each WO Labor.ayrt +++ b/server/AyaNova/resource/rpt/stock-report-templates/Nets Taxes LineTotals for each WO Labor.ayrt @@ -1 +1 @@ -{"Name":"Nets Taxes LineTotals for each WO Labor","Active":true,"Notes":"","Roles":50538,"AType":37,"IncludeWoItemDescendants":false,"Template":"\n\n\n
\n
\n

{{ayT 'WorkOrder'}} {{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 'WorkOrder'}}{{ayT 'Customer'}}{{ayT 'WorkOrderServiceDate'}}{{ayT 'WorkOrderItemLaborServiceRateID'}}{{ayT 'WorkOrderItemLaborPrice'}}{{ayT 'WorkOrderItemLaborServiceRateQuantity'}}{{ayT 'NetValue'}}{{ayT 'TaxCodeTaxA'}}{{ayT 'TaxCodeTaxB'}}{{ayT 'Total'}}
{{../../Serial}}{{../../CustomerViz}}{{ayDate ../../ServiceDate}}{{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
Totals for all {{ayT 'WorkOrderItemLaborList'}} in this report {{ayT 'NetValue'}}{{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([\"WorkOrder\", \"Customer\", \"WorkOrderServiceDate\", \"NetValue\", \"WorkOrderItemLaborList\", \"WorkOrderItemLaborServiceRateID\", \"WorkOrderItemLaborServiceRateQuantity\", \"WorkOrderItemLaborPrice\", \"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 WO Labor","Active":true,"Notes":"","Roles":50538,"AType":37,"IncludeWoItemDescendants":false,"Template":"\n\n\n
\n
\n

{{ayT 'WorkOrder'}} {{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 'WorkOrder'}}{{ayT 'Customer'}}{{ayT 'WorkOrderServiceDate'}}{{ayT 'WorkOrderItemLaborServiceRateID'}}{{ayT 'WorkOrderItemLaborPrice'}}{{ayT 'WorkOrderItemLaborServiceRateQuantity'}}{{ayT 'NetPrice'}}{{ayT 'TaxCodeTaxA'}}{{ayT 'TaxCodeTaxB'}}{{ayT 'Total'}}
{{../../Serial}}{{../../CustomerViz}}{{ayDate ../../ServiceDate}}{{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
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([\"WorkOrder\", \"Customer\", \"WorkOrderServiceDate\", \"NetPrice\", \"WorkOrderItemLaborList\", \"WorkOrderItemLaborServiceRateID\", \"WorkOrderItemLaborServiceRateQuantity\", \"WorkOrderItemLaborPrice\", \"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/Nets Taxes LineTotals for each WO Loans.ayrt b/server/AyaNova/resource/rpt/stock-report-templates/Nets Taxes LineTotals for each WO Loans.ayrt index 88bd91c4..3e09d128 100644 --- a/server/AyaNova/resource/rpt/stock-report-templates/Nets Taxes LineTotals for each WO Loans.ayrt +++ b/server/AyaNova/resource/rpt/stock-report-templates/Nets Taxes LineTotals for each WO Loans.ayrt @@ -1 +1 @@ -{"Name":"Nets Taxes LineTotals for each WO Loans","Active":true,"Notes":"","Roles":50538,"AType":38,"IncludeWoItemDescendants":false,"Template":"\n\n\n
\n
\n

{{ayT 'WorkOrder'}} {{ayT 'WorkOrderItemLoanList'}} 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 Loans}}\n \n \n \n \n \n \n \n \n \n \n \n \n \n {{/each}}\n {{/each}}\n {{/each}}\n \n
{{ayT 'WorkOrder'}}{{ayT 'Customer'}}{{ayT 'WorkOrderServiceDate'}}{{ayT 'WorkOrderItemLoanUnit'}}{{ayT 'WorkOrderItemLoanRate'}}{{ayT 'WorkOrderItemLoanQuantity'}}{{ayT 'NetValue'}}{{ayT 'TaxCodeTaxA'}}{{ayT 'TaxCodeTaxB'}}{{ayT 'Total'}}
{{../../Serial}}{{../../CustomerViz}}{{ayDate ../../ServiceDate}}{{LoanUnitViz}}{{UnitOfMeasureViz}}{{ayCurrency PriceViz}}{{Quantity}}{{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
Totals for all {{ayT 'WorkOrderItemLoanList'}} in this report {{ayT 'NetValue'}}{{ayT 'TaxCodeTaxA'}}{{ayT 'TaxCodeTaxB'}}{{ayT 'Total'}}
{{ayCurrency AllWOLoansNetViz}}{{ayCurrency AllWOLoansTaxAs}}{{ayCurrency AllWOLoansTaxBs}}{{ayCurrency AllWOLoansTotalGrand}}
\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([\"WorkOrder\", \"Customer\", \"WorkOrderServiceDate\", \"NetValue\", \"WorkOrderItemLoanList\", \"WorkOrderItemLoanUnit\", \"WorkOrderItemLoanQuantity\", \"WorkOrderItemLoanRate\", \"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 Loans so it exists\n\treportData.AllWOLoansNetViz = 0;\n\treportData.AllWOLoansTaxAs = 0;\n\treportData.AllWOLoansTaxBs = 0;\n\treportData.AllWOLoansTotalGrand = 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 Loan record of the wo's Item\n\t\t\tfor (const Loan of Item.Loans) {\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 (Loan.NetViz != null) {\n\t\t\t\t\treportData.AllWOLoansNetViz += Loan.NetViz; //this IS where the actual adding to running total for this WOItem's Net Loan\n\t\t\t\t\treportData.AllWOLoansTaxAs += Loan.TaxAViz;\n\t\t\t\t\treportData.AllWOLoansTaxBs += Loan.TaxBViz;\n\t\t\t\t\treportData.AllWOLoansTotalGrand += Loan.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 WO Loans","Active":true,"Notes":"","Roles":50538,"AType":38,"IncludeWoItemDescendants":false,"Template":"\n\n\n
\n
\n

{{ayT 'WorkOrder'}} {{ayT 'WorkOrderItemLoanList'}} 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 Loans}}\n \n \n \n \n \n \n \n \n \n \n \n \n \n {{/each}}\n {{/each}}\n {{/each}}\n \n
{{ayT 'WorkOrder'}}{{ayT 'Customer'}}{{ayT 'WorkOrderServiceDate'}}{{ayT 'WorkOrderItemLoanUnit'}}{{ayT 'WorkOrderItemLoanRate'}}{{ayT 'WorkOrderItemLoanQuantity'}}{{ayT 'NetPrice'}}{{ayT 'TaxCodeTaxA'}}{{ayT 'TaxCodeTaxB'}}{{ayT 'Total'}}
{{../../Serial}}{{../../CustomerViz}}{{ayDate ../../ServiceDate}}{{LoanUnitViz}}{{UnitOfMeasureViz}}{{ayCurrency PriceViz}}{{Quantity}}{{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
Totals for all {{ayT 'WorkOrderItemLoanList'}} in this report {{ayT 'NetPrice'}}{{ayT 'TaxCodeTaxA'}}{{ayT 'TaxCodeTaxB'}}{{ayT 'Total'}}
{{ayCurrency AllWOLoansNetViz}}{{ayCurrency AllWOLoansTaxAs}}{{ayCurrency AllWOLoansTaxBs}}{{ayCurrency AllWOLoansTotalGrand}}
\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([\"WorkOrder\", \"Customer\", \"WorkOrderServiceDate\", \"NetPrice\", \"WorkOrderItemLoanList\", \"WorkOrderItemLoanUnit\", \"WorkOrderItemLoanQuantity\", \"WorkOrderItemLoanRate\", \"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 Loans so it exists\n\treportData.AllWOLoansNetViz = 0;\n\treportData.AllWOLoansTaxAs = 0;\n\treportData.AllWOLoansTaxBs = 0;\n\treportData.AllWOLoansTotalGrand = 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 Loan record of the wo's Item\n\t\t\tfor (const Loan of Item.Loans) {\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 (Loan.NetViz != null) {\n\t\t\t\t\treportData.AllWOLoansNetViz += Loan.NetViz; //this IS where the actual adding to running total for this WOItem's Net Loan\n\t\t\t\t\treportData.AllWOLoansTaxAs += Loan.TaxAViz;\n\t\t\t\t\treportData.AllWOLoansTaxBs += Loan.TaxBViz;\n\t\t\t\t\treportData.AllWOLoansTotalGrand += Loan.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/Nets Taxes LineTotals for each WO Part.ayrt b/server/AyaNova/resource/rpt/stock-report-templates/Nets Taxes LineTotals for each WO Part.ayrt index c3ca6df7..05cb582a 100644 --- a/server/AyaNova/resource/rpt/stock-report-templates/Nets Taxes LineTotals for each WO Part.ayrt +++ b/server/AyaNova/resource/rpt/stock-report-templates/Nets Taxes LineTotals for each WO Part.ayrt @@ -1 +1 @@ -{"Name":"Nets Taxes LineTotals for each WO Part","Active":true,"Notes":"","Roles":50538,"AType":39,"IncludeWoItemDescendants":false,"Template":"\n\n\n
\n
\n

{{ayT 'WorkOrder'}} {{ayT 'WorkOrderItemPartList'}} Nets Taxes LineTotals and Grand Totals for each

\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 Parts}}\n \n \n \n \n \n \n \n \n \n \n \n \n {{/each}}\n {{/each}}\n {{/each}}\n \n
{{ayT 'WorkOrder'}}{{ayT 'Customer'}}{{ayT 'WorkOrderServiceDate'}}{{ayT 'WorkOrderItemPartList'}}{{ayT 'WorkOrderItemPartPrice'}} Per{{ayT 'WorkOrderItemPartQuantity'}}{{ayT 'NetValue'}}{{ayT 'TaxCodeTaxA'}}{{ayT 'TaxCodeTaxB'}}{{ayT 'Total'}}
{{../../Serial}}{{../../CustomerViz}}{{ayDate ../../ServiceDate}}{{PartNameViz}} {{PartDescriptionViz}}{{ayCurrency PriceViz}}{{Quantity}}{{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
Totals for all {{ayT 'WorkOrderItemPartList'}} in this report {{ayT 'NetValue'}}{{ayT 'TaxCodeTaxA'}}{{ayT 'TaxCodeTaxB'}}{{ayT 'Total'}}
{{ayCurrency AllWOPartsNetViz}}{{ayCurrency AllWOPartsTaxAs}}{{ayCurrency AllWOPartsTaxBs}}{{ayCurrency AllWOPartsTotalGrand}}
\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([\"WorkOrder\", \"Customer\", \"WorkOrderServiceDate\", \"NetValue\", \"WorkOrderItemPartList\", \"WorkOrderItemPartQuantity\", \"WorkOrderItemPartPrice\", \"TaxCodeTaxA\", \"TaxCodeTaxB\", \"Total\"]);\n\n\n\t//below declares keys to hold for all parts so it exists\n\treportData.AllWOPartsNetViz = 0;\n\treportData.AllWOPartsTaxAs = 0;\n\treportData.AllWOPartsTaxBs = 0;\n\treportData.AllWOPartsTotalGrand = 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 Part record of the wo's Item\n\t\t\tfor (const Part of Item.Parts) {\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 (Part.NetViz != null) {\n\t\t\t\t\treportData.AllWOPartsNetViz += Part.NetViz; //this IS where the actual adding to running total for this WOItem's Net Parts\n\t\t\t\t\treportData.AllWOPartsTaxAs += Part.TaxAViz;\n\t\t\t\t\treportData.AllWOPartsTaxBs += Part.TaxBViz;\n\t\t\t\t\treportData.AllWOPartsTotalGrand += Part.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 WO Part","Active":true,"Notes":"","Roles":50538,"AType":39,"IncludeWoItemDescendants":false,"Template":"\n\n\n
\n
\n

{{ayT 'WorkOrder'}} {{ayT 'WorkOrderItemPartList'}} Nets Taxes LineTotals and Grand Totals for each

\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 Parts}}\n \n \n \n \n \n \n \n \n \n \n \n \n {{/each}}\n {{/each}}\n {{/each}}\n \n
{{ayT 'WorkOrder'}}{{ayT 'Customer'}}{{ayT 'WorkOrderServiceDate'}}{{ayT 'WorkOrderItemPartList'}}{{ayT 'WorkOrderItemPartPrice'}} Per{{ayT 'WorkOrderItemPartQuantity'}}{{ayT 'NetPrice'}}{{ayT 'TaxCodeTaxA'}}{{ayT 'TaxCodeTaxB'}}{{ayT 'Total'}}
{{../../Serial}}{{../../CustomerViz}}{{ayDate ../../ServiceDate}}{{PartNameViz}} {{PartDescriptionViz}}{{ayCurrency PriceViz}}{{Quantity}}{{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
Totals for all {{ayT 'WorkOrderItemPartList'}} in this report {{ayT 'NetPrice'}}{{ayT 'TaxCodeTaxA'}}{{ayT 'TaxCodeTaxB'}}{{ayT 'Total'}}
{{ayCurrency AllWOPartsNetViz}}{{ayCurrency AllWOPartsTaxAs}}{{ayCurrency AllWOPartsTaxBs}}{{ayCurrency AllWOPartsTotalGrand}}
\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([\"WorkOrder\", \"Customer\", \"WorkOrderServiceDate\", \"NetPrice\", \"WorkOrderItemPartList\", \"WorkOrderItemPartQuantity\", \"WorkOrderItemPartPrice\", \"TaxCodeTaxA\", \"TaxCodeTaxB\", \"Total\"]);\n\n\n\t//below declares keys to hold for all parts so it exists\n\treportData.AllWOPartsNetViz = 0;\n\treportData.AllWOPartsTaxAs = 0;\n\treportData.AllWOPartsTaxBs = 0;\n\treportData.AllWOPartsTotalGrand = 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 Part record of the wo's Item\n\t\t\tfor (const Part of Item.Parts) {\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 (Part.NetViz != null) {\n\t\t\t\t\treportData.AllWOPartsNetViz += Part.NetViz; //this IS where the actual adding to running total for this WOItem's Net Parts\n\t\t\t\t\treportData.AllWOPartsTaxAs += Part.TaxAViz;\n\t\t\t\t\treportData.AllWOPartsTaxBs += Part.TaxBViz;\n\t\t\t\t\treportData.AllWOPartsTotalGrand += Part.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/Nets Taxes LineTotals for each WO Travel.ayrt b/server/AyaNova/resource/rpt/stock-report-templates/Nets Taxes LineTotals for each WO Travel.ayrt index c82a6d41..c9a56e1d 100644 --- a/server/AyaNova/resource/rpt/stock-report-templates/Nets Taxes LineTotals for each WO Travel.ayrt +++ b/server/AyaNova/resource/rpt/stock-report-templates/Nets Taxes LineTotals for each WO Travel.ayrt @@ -1 +1 @@ -{"Name":"Nets Taxes LineTotals for each WO Travel","Active":true,"Notes":"","Roles":50538,"AType":43,"IncludeWoItemDescendants":false,"Template":"\n\n\n
\n
\n

{{ayT 'WorkOrder'}} {{ayT 'WorkOrderItemTravelList'}} 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 Travels}}\n \n \n \n \n \n \n \n \n \n \n \n \n {{/each}}\n {{/each}}\n {{/each}}\n \n
{{ayT 'WorkOrder'}}{{ayT 'Customer'}}{{ayT 'WorkOrderServiceDate'}}{{ayT 'WorkOrderItemTravelServiceRateID'}}{{ayT 'WorkOrderItemTravelRateCharge'}}{{ayT 'WorkOrderItemTravelRateQuantity'}}{{ayT 'NetValue'}}{{ayT 'TaxCodeTaxA'}}{{ayT 'TaxCodeTaxB'}}{{ayT 'Total'}}
{{../../Serial}}{{../../CustomerViz}}{{ayDate ../../ServiceDate}}{{TravelRateViz}}{{ayCurrency PriceViz}}{{TravelRateQuantity}}{{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
Totals for all {{ayT 'WorkOrderItemTravelList'}} in this report {{ayT 'NetValue'}}{{ayT 'TaxCodeTaxA'}}{{ayT 'TaxCodeTaxB'}}{{ayT 'Total'}}
{{ayCurrency AllWOTravelsNetViz}}{{ayCurrency AllWOTravelsTaxAs}}{{ayCurrency AllWOTravelsTaxBs}}{{ayCurrency AllWOTravelsTotalGrand}}
\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([\"WorkOrder\", \"Customer\", \"WorkOrderServiceDate\", \"NetValue\", \"WorkOrderItemTravelList\", \"WorkOrderItemTravelServiceRateID\", \"WorkOrderItemTravelRateQuantity\", \"WorkOrderItemTravelRateCharge\", \"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 Travels so it exists\n\treportData.AllWOTravelsNetViz = 0;\n\treportData.AllWOTravelsTaxAs = 0;\n\treportData.AllWOTravelsTaxBs = 0;\n\treportData.AllWOTravelsTotalGrand = 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 Travel record of the wo's Item\n\t\t\tfor (const Travel of Item.Travels) {\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 (Travel.NetViz != null) {\n\t\t\t\t\treportData.AllWOTravelsNetViz += Travel.NetViz; //this IS where the actual adding to running total for this WOItem's Net Travel\n\t\t\t\t\treportData.AllWOTravelsTaxAs += Travel.TaxAViz;\n\t\t\t\t\treportData.AllWOTravelsTaxBs += Travel.TaxBViz;\n\t\t\t\t\treportData.AllWOTravelsTotalGrand += Travel.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 WO Travel","Active":true,"Notes":"","Roles":50538,"AType":43,"IncludeWoItemDescendants":false,"Template":"\n\n\n
\n
\n

{{ayT 'WorkOrder'}} {{ayT 'WorkOrderItemTravelList'}} 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 Travels}}\n \n \n \n \n \n \n \n \n \n \n \n \n {{/each}}\n {{/each}}\n {{/each}}\n \n
{{ayT 'WorkOrder'}}{{ayT 'Customer'}}{{ayT 'WorkOrderServiceDate'}}{{ayT 'WorkOrderItemTravelServiceRateID'}}{{ayT 'WorkOrderItemTravelRateCharge'}}{{ayT 'WorkOrderItemTravelRateQuantity'}}{{ayT 'NetPrice'}}{{ayT 'TaxCodeTaxA'}}{{ayT 'TaxCodeTaxB'}}{{ayT 'Total'}}
{{../../Serial}}{{../../CustomerViz}}{{ayDate ../../ServiceDate}}{{TravelRateViz}}{{ayCurrency PriceViz}}{{TravelRateQuantity}}{{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
Totals for all {{ayT 'WorkOrderItemTravelList'}} in this report {{ayT 'NetPrice'}}{{ayT 'TaxCodeTaxA'}}{{ayT 'TaxCodeTaxB'}}{{ayT 'Total'}}
{{ayCurrency AllWOTravelsNetViz}}{{ayCurrency AllWOTravelsTaxAs}}{{ayCurrency AllWOTravelsTaxBs}}{{ayCurrency AllWOTravelsTotalGrand}}
\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([\"WorkOrder\", \"Customer\", \"WorkOrderServiceDate\", \"NetPrice\", \"WorkOrderItemTravelList\", \"WorkOrderItemTravelServiceRateID\", \"WorkOrderItemTravelRateQuantity\", \"WorkOrderItemTravelRateCharge\", \"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 Travels so it exists\n\treportData.AllWOTravelsNetViz = 0;\n\treportData.AllWOTravelsTaxAs = 0;\n\treportData.AllWOTravelsTaxBs = 0;\n\treportData.AllWOTravelsTotalGrand = 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 Travel record of the wo's Item\n\t\t\tfor (const Travel of Item.Travels) {\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 (Travel.NetViz != null) {\n\t\t\t\t\treportData.AllWOTravelsNetViz += Travel.NetViz; //this IS where the actual adding to running total for this WOItem's Net Travel\n\t\t\t\t\treportData.AllWOTravelsTaxAs += Travel.TaxAViz;\n\t\t\t\t\treportData.AllWOTravelsTaxBs += Travel.TaxBViz;\n\t\t\t\t\treportData.AllWOTravelsTotalGrand += Travel.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/Outside Service via PMs.ayrt b/server/AyaNova/resource/rpt/stock-report-templates/Outside Service via PMs.ayrt index 9531f363..8a69a935 100644 --- a/server/AyaNova/resource/rpt/stock-report-templates/Outside Service via PMs.ayrt +++ b/server/AyaNova/resource/rpt/stock-report-templates/Outside Service via PMs.ayrt @@ -1 +1 @@ -{"Name":"Outside Service via PMs","Active":true,"Notes":"","Roles":50538,"AType":89,"IncludeWoItemDescendants":false,"Template":"\n\n\n
\n
\n

{{ayT 'PreventiveMaintenance'}} {{ayT 'WorkOrderItemOutsideServiceList'}} 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 OutsideServices}}\n \n \n \n \n \n \n \n \n \n \n \n \n {{/each}}\n {{/each}}\n {{/each}}\n \n
{{ayT 'PreventiveMaintenance'}}{{ayT 'WorkOrderItemOutsideServiceDateSent'}}{{ayT 'Unit'}}{{ayT 'WorkOrderItemOutsideServiceVendorSentToID'}}{{ayT 'WorkOrderItemOutsideServiceRMANumber'}}{{ayT 'WorkOrderItemOutsideServiceDateReturned'}}{{ayT 'NetValue'}}{{ayT 'TaxCodeTaxA'}}{{ayT 'TaxCodeTaxB'}}{{ayT 'Total'}}
{{../../Serial}}{{ayDate SentDate}}{{UnitViz}}{{VendorSentToViz}}{{RMANumber}}{{ayDate ReturnDate}}{{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 'WorkOrderItemOutsideServiceList'}} in this report {{ayT 'NetValue'}}{{ayT 'TaxCodeTaxA'}}{{ayT 'TaxCodeTaxB'}}{{ayT 'Total'}}
{{ayCurrency AllWOOutsideServicesNetViz}}{{ayCurrency AllWOOutsideServicesTaxAs}}{{ayCurrency AllWOOutsideServicesTaxBs}}{{ayCurrency AllWOOutsideServicesTotalGrand}}
\n
\n\n\n","Style":"\r\ntfoot {\r\n border-top: 2px solid #9e9e9e;\r\n font-size: 7pt;\r\n text-align: center;\r\n}\r\n\r\n.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: 13pt; \r\n color: #9e9e9e;\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: 9pt; \r\n color: #9e9e9e;\r\n}\r\n\r\ntbody td {\r\n padding: 10px;\r\n word-wrap: break-word;\r\n font-size: 7pt;\r\n}\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\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}\r\n\r\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([\"PreventiveMaintenance\", \"Customer\", \"Unit\", \"NetValue\", \"WorkOrderItemOutsideServiceList\", \"WorkOrderItemOutsideServiceDateSent\", \"WorkOrderItemOutsideServiceVendorSentToID\", \"WorkOrderItemOutsideServiceRMANumber\", \"WorkOrderItemOutsideServiceDateReturned\", \"TaxCodeTaxA\", \"TaxCodeTaxB\", \"Total\"]);\n\n\n\t//below declares keys to hold for all OutsideServices so it exists\n\treportData.AllWOOutsideServicesNetViz = 0;\n\treportData.AllWOOutsideServicesTaxAs = 0;\n\treportData.AllWOOutsideServicesTaxBs = 0;\n\treportData.AllWOOutsideServicesTotalGrand = 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 OutsideService record of the wo's Item\n\t\t\tfor (const OutsideService of Item.OutsideServices) {\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 (OutsideService.NetViz != null) {\n\t\t\t\t\treportData.AllWOOutsideServicesNetViz += OutsideService.NetViz; //this IS where the actual adding to running total for this WOItem's Net OutsideService\n\t\t\t\t\treportData.AllWOOutsideServicesTaxAs += OutsideService.TaxAViz;\n\t\t\t\t\treportData.AllWOOutsideServicesTaxBs += OutsideService.TaxBViz;\n\t\t\t\t\treportData.AllWOOutsideServicesTotalGrand += OutsideService.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":"Outside Service via PMs","Active":true,"Notes":"","Roles":50538,"AType":89,"IncludeWoItemDescendants":false,"Template":"\n\n\n
\n
\n

{{ayT 'PreventiveMaintenance'}} {{ayT 'WorkOrderItemOutsideServiceList'}} 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 OutsideServices}}\n \n \n \n \n \n \n \n \n \n \n \n \n {{/each}}\n {{/each}}\n {{/each}}\n \n
{{ayT 'PreventiveMaintenance'}}{{ayT 'WorkOrderItemOutsideServiceDateSent'}}{{ayT 'Unit'}}{{ayT 'WorkOrderItemOutsideServiceVendorSentToID'}}{{ayT 'WorkOrderItemOutsideServiceRMANumber'}}{{ayT 'WorkOrderItemOutsideServiceDateReturned'}}{{ayT 'NetPrice'}}{{ayT 'TaxCodeTaxA'}}{{ayT 'TaxCodeTaxB'}}{{ayT 'Total'}}
{{../../Serial}}{{ayDate SentDate}}{{UnitViz}}{{VendorSentToViz}}{{RMANumber}}{{ayDate ReturnDate}}{{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 'WorkOrderItemOutsideServiceList'}} in this report {{ayT 'NetPrice'}}{{ayT 'TaxCodeTaxA'}}{{ayT 'TaxCodeTaxB'}}{{ayT 'Total'}}
{{ayCurrency AllWOOutsideServicesNetViz}}{{ayCurrency AllWOOutsideServicesTaxAs}}{{ayCurrency AllWOOutsideServicesTaxBs}}{{ayCurrency AllWOOutsideServicesTotalGrand}}
\n
\n\n\n","Style":"\r\ntfoot {\r\n border-top: 2px solid #9e9e9e;\r\n font-size: 7pt;\r\n text-align: center;\r\n}\r\n\r\n.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: 13pt; \r\n color: #9e9e9e;\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: 9pt; \r\n color: #9e9e9e;\r\n}\r\n\r\ntbody td {\r\n padding: 10px;\r\n word-wrap: break-word;\r\n font-size: 7pt;\r\n}\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\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}\r\n\r\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([\"PreventiveMaintenance\", \"Customer\", \"Unit\", \"NetPrice\", \"WorkOrderItemOutsideServiceList\", \"WorkOrderItemOutsideServiceDateSent\", \"WorkOrderItemOutsideServiceVendorSentToID\", \"WorkOrderItemOutsideServiceRMANumber\", \"WorkOrderItemOutsideServiceDateReturned\", \"TaxCodeTaxA\", \"TaxCodeTaxB\", \"Total\"]);\n\n\n\t//below declares keys to hold for all OutsideServices so it exists\n\treportData.AllWOOutsideServicesNetViz = 0;\n\treportData.AllWOOutsideServicesTaxAs = 0;\n\treportData.AllWOOutsideServicesTaxBs = 0;\n\treportData.AllWOOutsideServicesTotalGrand = 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 OutsideService record of the wo's Item\n\t\t\tfor (const OutsideService of Item.OutsideServices) {\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 (OutsideService.NetViz != null) {\n\t\t\t\t\treportData.AllWOOutsideServicesNetViz += OutsideService.NetViz; //this IS where the actual adding to running total for this WOItem's Net OutsideService\n\t\t\t\t\treportData.AllWOOutsideServicesTaxAs += OutsideService.TaxAViz;\n\t\t\t\t\treportData.AllWOOutsideServicesTaxBs += OutsideService.TaxBViz;\n\t\t\t\t\treportData.AllWOOutsideServicesTotalGrand += OutsideService.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/Outside Service via Quotes.ayrt b/server/AyaNova/resource/rpt/stock-report-templates/Outside Service via Quotes.ayrt index a626f011..4d6befeb 100644 --- a/server/AyaNova/resource/rpt/stock-report-templates/Outside Service via Quotes.ayrt +++ b/server/AyaNova/resource/rpt/stock-report-templates/Outside Service via Quotes.ayrt @@ -1 +1 @@ -{"Name":"Outside Service via Quotes","Active":true,"Notes":"","Roles":50538,"AType":79,"IncludeWoItemDescendants":false,"Template":"\n\n\n
\n
\n

{{ayT 'Quote'}} {{ayT 'WorkOrderItemOutsideServiceList'}} 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 OutsideServices}}\n \n \n \n \n \n \n \n \n \n \n \n \n {{/each}}\n {{/each}}\n {{/each}}\n \n
{{ayT 'Quote'}}{{ayT 'WorkOrderItemOutsideServiceDateSent'}}{{ayT 'Unit'}}{{ayT 'WorkOrderItemOutsideServiceVendorSentToID'}}{{ayT 'WorkOrderItemOutsideServiceRMANumber'}}{{ayT 'WorkOrderItemOutsideServiceDateReturned'}}{{ayT 'NetValue'}}{{ayT 'TaxCodeTaxA'}}{{ayT 'TaxCodeTaxB'}}{{ayT 'Total'}}
{{../../Serial}}{{ayDate SentDate}}{{UnitViz}}{{VendorSentToViz}}{{RMANumber}}{{ayDate ReturnDate}}{{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 'WorkOrderItemOutsideServiceList'}} in this report {{ayT 'NetValue'}}{{ayT 'TaxCodeTaxA'}}{{ayT 'TaxCodeTaxB'}}{{ayT 'Total'}}
{{ayCurrency AllWOOutsideServicesNetViz}}{{ayCurrency AllWOOutsideServicesTaxAs}}{{ayCurrency AllWOOutsideServicesTaxBs}}{{ayCurrency AllWOOutsideServicesTotalGrand}}
\n
\n\n\n","Style":"\r\ntfoot {\r\n border-top: 2px solid #9e9e9e;\r\n font-size: 7pt;\r\n text-align: center;\r\n}\r\n\r\n.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: 13pt; \r\n color: #9e9e9e;\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: 9pt; \r\n color: #9e9e9e;\r\n}\r\n\r\ntbody td {\r\n padding: 10px;\r\n word-wrap: break-word;\r\n font-size: 7pt;\r\n}\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\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}\r\n\r\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\", \"Unit\", \"NetValue\", \"WorkOrderItemOutsideServiceList\", \"WorkOrderItemOutsideServiceDateSent\", \"WorkOrderItemOutsideServiceVendorSentToID\", \"WorkOrderItemOutsideServiceRMANumber\", \"WorkOrderItemOutsideServiceDateReturned\", \"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 OutsideServices so it exists\n\treportData.AllWOOutsideServicesNetViz = 0;\n\treportData.AllWOOutsideServicesTaxAs = 0;\n\treportData.AllWOOutsideServicesTaxBs = 0;\n\treportData.AllWOOutsideServicesTotalGrand = 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 OutsideService record of the wo's Item\n\t\t\tfor (const OutsideService of Item.OutsideServices) {\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 (OutsideService.NetViz != null) {\n\t\t\t\t\treportData.AllWOOutsideServicesNetViz += OutsideService.NetViz; //this IS where the actual adding to running total for this WOItem's Net OutsideService\n\t\t\t\t\treportData.AllWOOutsideServicesTaxAs += OutsideService.TaxAViz;\n\t\t\t\t\treportData.AllWOOutsideServicesTaxBs += OutsideService.TaxBViz;\n\t\t\t\t\treportData.AllWOOutsideServicesTotalGrand += OutsideService.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":"Outside Service via Quotes","Active":true,"Notes":"","Roles":50538,"AType":79,"IncludeWoItemDescendants":false,"Template":"\n\n\n
\n
\n

{{ayT 'Quote'}} {{ayT 'WorkOrderItemOutsideServiceList'}} 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 OutsideServices}}\n \n \n \n \n \n \n \n \n \n \n \n \n {{/each}}\n {{/each}}\n {{/each}}\n \n
{{ayT 'Quote'}}{{ayT 'WorkOrderItemOutsideServiceDateSent'}}{{ayT 'Unit'}}{{ayT 'WorkOrderItemOutsideServiceVendorSentToID'}}{{ayT 'WorkOrderItemOutsideServiceRMANumber'}}{{ayT 'WorkOrderItemOutsideServiceDateReturned'}}{{ayT 'NetPrice'}}{{ayT 'TaxCodeTaxA'}}{{ayT 'TaxCodeTaxB'}}{{ayT 'Total'}}
{{../../Serial}}{{ayDate SentDate}}{{UnitViz}}{{VendorSentToViz}}{{RMANumber}}{{ayDate ReturnDate}}{{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 'WorkOrderItemOutsideServiceList'}} in this report {{ayT 'NetPrice'}}{{ayT 'TaxCodeTaxA'}}{{ayT 'TaxCodeTaxB'}}{{ayT 'Total'}}
{{ayCurrency AllWOOutsideServicesNetViz}}{{ayCurrency AllWOOutsideServicesTaxAs}}{{ayCurrency AllWOOutsideServicesTaxBs}}{{ayCurrency AllWOOutsideServicesTotalGrand}}
\n
\n\n\n","Style":"\r\ntfoot {\r\n border-top: 2px solid #9e9e9e;\r\n font-size: 7pt;\r\n text-align: center;\r\n}\r\n\r\n.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: 13pt; \r\n color: #9e9e9e;\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: 9pt; \r\n color: #9e9e9e;\r\n}\r\n\r\ntbody td {\r\n padding: 10px;\r\n word-wrap: break-word;\r\n font-size: 7pt;\r\n}\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\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}\r\n\r\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\", \"Unit\", \"NetPrice\", \"WorkOrderItemOutsideServiceList\", \"WorkOrderItemOutsideServiceDateSent\", \"WorkOrderItemOutsideServiceVendorSentToID\", \"WorkOrderItemOutsideServiceRMANumber\", \"WorkOrderItemOutsideServiceDateReturned\", \"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 OutsideServices so it exists\n\treportData.AllWOOutsideServicesNetViz = 0;\n\treportData.AllWOOutsideServicesTaxAs = 0;\n\treportData.AllWOOutsideServicesTaxBs = 0;\n\treportData.AllWOOutsideServicesTotalGrand = 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 OutsideService record of the wo's Item\n\t\t\tfor (const OutsideService of Item.OutsideServices) {\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 (OutsideService.NetViz != null) {\n\t\t\t\t\treportData.AllWOOutsideServicesNetViz += OutsideService.NetViz; //this IS where the actual adding to running total for this WOItem's Net OutsideService\n\t\t\t\t\treportData.AllWOOutsideServicesTaxAs += OutsideService.TaxAViz;\n\t\t\t\t\treportData.AllWOOutsideServicesTaxBs += OutsideService.TaxBViz;\n\t\t\t\t\treportData.AllWOOutsideServicesTotalGrand += OutsideService.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/Outside Service via Work Orders.ayrt b/server/AyaNova/resource/rpt/stock-report-templates/Outside Service via Work Orders.ayrt index 68177fc0..62d4a4f7 100644 --- a/server/AyaNova/resource/rpt/stock-report-templates/Outside Service via Work Orders.ayrt +++ b/server/AyaNova/resource/rpt/stock-report-templates/Outside Service via Work Orders.ayrt @@ -1 +1 @@ -{"Name":"Outside Service via Work Orders","Active":true,"Notes":"","Roles":50538,"AType":73,"IncludeWoItemDescendants":false,"Template":"\n\n\n
\n
\n

{{ayT 'WorkOrder'}} {{ayT 'WorkOrderItemOutsideServiceList'}} 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 OutsideServices}}\n \n \n \n \n \n \n \n \n \n \n \n \n {{/each}}\n {{/each}}\n {{/each}}\n \n
{{ayT 'WorkOrder'}}{{ayT 'WorkOrderItemOutsideServiceDateSent'}}{{ayT 'Unit'}}{{ayT 'WorkOrderItemOutsideServiceVendorSentToID'}}{{ayT 'WorkOrderItemOutsideServiceRMANumber'}}{{ayT 'WorkOrderItemOutsideServiceDateReturned'}}{{ayT 'NetValue'}}{{ayT 'TaxCodeTaxA'}}{{ayT 'TaxCodeTaxB'}}{{ayT 'Total'}}
{{../../Serial}}{{ayDate SentDate}}{{UnitViz}}{{VendorSentToViz}}{{RMANumber}}{{ayDate ReturnDate}}{{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
Totals for all {{ayT 'WorkOrderItemOutsideServiceList'}} in this report {{ayT 'NetValue'}}{{ayT 'TaxCodeTaxA'}}{{ayT 'TaxCodeTaxB'}}{{ayT 'Total'}}
{{ayCurrency AllWOOutsideServicesNetViz}}{{ayCurrency AllWOOutsideServicesTaxAs}}{{ayCurrency AllWOOutsideServicesTaxBs}}{{ayCurrency AllWOOutsideServicesTotalGrand}}
\n
\n\n\n","Style":"\r\ntfoot {\r\n border-top: 2px solid #9e9e9e;\r\n font-size: 7pt;\r\n text-align: center;\r\n}\r\n\r\n.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: 13pt; \r\n color: #9e9e9e;\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: 9pt; \r\n color: #9e9e9e;\r\n}\r\n\r\ntbody td {\r\n padding: 10px;\r\n word-wrap: break-word;\r\n font-size: 7pt;\r\n}\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\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}\r\n\r\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([\"WorkOrder\", \"Customer\", \"Unit\", \"NetValue\", \"WorkOrderItemOutsideServiceList\", \"WorkOrderItemOutsideServiceDateSent\", \"WorkOrderItemOutsideServiceVendorSentToID\", \"WorkOrderItemOutsideServiceRMANumber\", \"WorkOrderItemOutsideServiceDateReturned\", \"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 OutsideServices so it exists\n\treportData.AllWOOutsideServicesNetViz = 0;\n\treportData.AllWOOutsideServicesTaxAs = 0;\n\treportData.AllWOOutsideServicesTaxBs = 0;\n\treportData.AllWOOutsideServicesTotalGrand = 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 OutsideService record of the wo's Item\n\t\t\tfor (const OutsideService of Item.OutsideServices) {\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 (OutsideService.NetViz != null) {\n\t\t\t\t\treportData.AllWOOutsideServicesNetViz += OutsideService.NetViz; //this IS where the actual adding to running total for this WOItem's Net OutsideService\n\t\t\t\t\treportData.AllWOOutsideServicesTaxAs += OutsideService.TaxAViz;\n\t\t\t\t\treportData.AllWOOutsideServicesTaxBs += OutsideService.TaxBViz;\n\t\t\t\t\treportData.AllWOOutsideServicesTotalGrand += OutsideService.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":"Outside Service via Work Orders","Active":true,"Notes":"","Roles":50538,"AType":73,"IncludeWoItemDescendants":false,"Template":"\n\n\n
\n
\n

{{ayT 'WorkOrder'}} {{ayT 'WorkOrderItemOutsideServiceList'}} 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 OutsideServices}}\n \n \n \n \n \n \n \n \n \n \n \n \n {{/each}}\n {{/each}}\n {{/each}}\n \n
{{ayT 'WorkOrder'}}{{ayT 'WorkOrderItemOutsideServiceDateSent'}}{{ayT 'Unit'}}{{ayT 'WorkOrderItemOutsideServiceVendorSentToID'}}{{ayT 'WorkOrderItemOutsideServiceRMANumber'}}{{ayT 'WorkOrderItemOutsideServiceDateReturned'}}{{ayT 'NetPrice'}}{{ayT 'TaxCodeTaxA'}}{{ayT 'TaxCodeTaxB'}}{{ayT 'Total'}}
{{../../Serial}}{{ayDate SentDate}}{{UnitViz}}{{VendorSentToViz}}{{RMANumber}}{{ayDate ReturnDate}}{{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
Totals for all {{ayT 'WorkOrderItemOutsideServiceList'}} in this report {{ayT 'NetPrice'}}{{ayT 'TaxCodeTaxA'}}{{ayT 'TaxCodeTaxB'}}{{ayT 'Total'}}
{{ayCurrency AllWOOutsideServicesNetViz}}{{ayCurrency AllWOOutsideServicesTaxAs}}{{ayCurrency AllWOOutsideServicesTaxBs}}{{ayCurrency AllWOOutsideServicesTotalGrand}}
\n
\n\n\n","Style":"\r\ntfoot {\r\n border-top: 2px solid #9e9e9e;\r\n font-size: 7pt;\r\n text-align: center;\r\n}\r\n\r\n.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: 13pt; \r\n color: #9e9e9e;\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: 9pt; \r\n color: #9e9e9e;\r\n}\r\n\r\ntbody td {\r\n padding: 10px;\r\n word-wrap: break-word;\r\n font-size: 7pt;\r\n}\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\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}\r\n\r\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([\"WorkOrder\", \"Customer\", \"Unit\", \"NetPrice\", \"WorkOrderItemOutsideServiceList\", \"WorkOrderItemOutsideServiceDateSent\", \"WorkOrderItemOutsideServiceVendorSentToID\", \"WorkOrderItemOutsideServiceRMANumber\", \"WorkOrderItemOutsideServiceDateReturned\", \"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 OutsideServices so it exists\n\treportData.AllWOOutsideServicesNetViz = 0;\n\treportData.AllWOOutsideServicesTaxAs = 0;\n\treportData.AllWOOutsideServicesTaxBs = 0;\n\treportData.AllWOOutsideServicesTotalGrand = 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 OutsideService record of the wo's Item\n\t\t\tfor (const OutsideService of Item.OutsideServices) {\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 (OutsideService.NetViz != null) {\n\t\t\t\t\treportData.AllWOOutsideServicesNetViz += OutsideService.NetViz; //this IS where the actual adding to running total for this WOItem's Net OutsideService\n\t\t\t\t\treportData.AllWOOutsideServicesTaxAs += OutsideService.TaxAViz;\n\t\t\t\t\treportData.AllWOOutsideServicesTaxBs += OutsideService.TaxBViz;\n\t\t\t\t\treportData.AllWOOutsideServicesTotalGrand += OutsideService.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/PM Parts Summary .ayrt b/server/AyaNova/resource/rpt/stock-report-templates/PM Parts Summary .ayrt index 1ab73a2a..57866505 100644 --- a/server/AyaNova/resource/rpt/stock-report-templates/PM Parts Summary .ayrt +++ b/server/AyaNova/resource/rpt/stock-report-templates/PM Parts Summary .ayrt @@ -1 +1 @@ -{"Name":"PM Parts Summary ","Active":true,"Notes":"Custom Prepare to obtain translations, group by the woitempart, derived amounts and running totals","Roles":49258,"AType":21,"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 {{#each ayReportData}}\n \n \n \n {{#each items}}\n \n \n \n \n \n \n \n \n \n {{#if NetCost }} {{else}}{{/if}}\n {{#if NetViz }} {{else}}{{/if}}\n {{#if NetDiff }} {{else}}{{/if}} \n \n {{/each}}\n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n {{/each}}\n \n
{{ayT 'PreventiveMaintenance'}} {{ayT 'WorkOrderItemParts'}} {{ayT 'PartCost'}} {{ayT 'NetValue'}}
 
{{ayT 'Part'}}{{ayT 'PreventiveMaintenance'}}{{ayT 'PMNextServiceDate'}}{{ayT 'WorkOrderItemPartQuantity'}}{{ayT 'PartCost'}} Per{{ayT 'PartRetail'}} Per {{ayT 'PartCost'}} {{ayT 'NetValue'}}{{ayT 'PartRetail'}} {{ayT 'NetValue'}}Difference
 
{{group}}
 {{Serial}}{{ayDate NextServiceDate}}{{Quantity}}{{UnitOfMeasureViz}}{{ayCurrency Cost}}{{ayCurrency PriceViz}} {{ayCurrency NetCost}}{{Quantity}}{{ayCurrency NetViz}}{{Quantity}}{{ayCurrency NetDiff}}{{Quantity}}
 
{{ayT 'Total'}} for part {{group}}{{ayCurrency GroupPartsNetCost}}{{ayCurrency GroupPartsNetViz}}{{ayCurrency GroupPartsDiff}}

 
\n\n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n {{#if AllWOPartsNetCost}} {{else}} {{/if}}\n {{#if AllWOPartsNetViz}} {{else}} {{/if}} \n {{#if AllWOPartsDiff}} {{else}} {{/if}}\n \n \n \n
 
{{ayT 'Total'}} for all {{ayT 'WorkOrderItemParts'}} in this reportAll Net CostAll Net ChargeAll Diff
 {{ ayCurrency AllWOPartsNetCost}}$0.00{{ ayCurrency AllWOPartsNetViz}}$0.00{{ayCurrency AllWOPartsDiff}}$0.00
\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: 20px;\n font-size: 10pt; \n color: #9e9e9e;\n text-align: center;\n}\n\ntbody td {\n padding: 2px;\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\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\", \"Part\", \"PMNextServiceDate\", \"WorkOrderItemPartQuantity\", \"PreventiveMaintenance\", \"NetValue\", \"PartCost\", \"PartRetail\", \"Total\" ]);\n\n\t//below is the code to group by the part - the PartNameViz\n\tlet ret = [];\n //iterate pms -> items -> pm item parts\n reportData.ayReportData.forEach(pm => {\n pm.Items.forEach(pmitem => {\n pmitem.Parts.forEach(part => {\n //new shape of data required for report \n let record = {\n Serial: pm.Serial,\n\t\t\t\t\tNextServiceDate: pm.NextServiceDate,\n\t\t\t\t\tNetViz: part.NetViz,\n\t\t\t\t\tPriceOverride: part.PriceOverride,\n\t\t\t\t\tListPrice: part.ListPrice,\n UnitOfMeasureViz: part.UnitOfMeasureViz,\n PriceViz: part.PriceViz,\n Cost: part.Cost,\n SuggestedQuantity: part.SuggestedQuantity,\n Quantity: part.Quantity,\n PartWarehouseViz: part.PartWarehouseViz,\n UpcViz: part.UpcViz,\n Serials: part.Serials,\n PartDescriptionViz: part.PartDescriptionViz ?? \"\",\n };\n\n //Find or create group and insert this record \n let groupObject = ret.find(z => z.group == (part.PartNameViz + \" \" + record.PartDescriptionViz) );\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: (part.PartNameViz + \" \" + record.PartDescriptionViz), items: [record], count: 1 });\n \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\n//below declares a key on the entire wo to hold all Part Net, costs, profit (nets - costs), from all pms so it exists and a key to hold all Part Net Costs\nreportData.AllWOPartsNetViz = 0;\nreportData.AllWOPartsNetCost = 0;\nreportData.AllWOPartsDiff = 0;\n\n\nfor (const EachGroup of reportData.ayReportData) \n\t{\n\n\n\t//below declares a key on the entire group to hold all Part Net, costs, profit/loss (nets - costs), for this group (this group is a single Part that has one or more wo item parts records)\n\tEachGroup.GroupPartsNetViz = 0;\n\tEachGroup.GroupPartsNetCost = 0;\n\tEachGroup.GroupPartsDiff = 0; \n\t\n\n\t//below is to Iterate through each woitempart record for this part - groupitem is a woitempart record\n\tfor (const groupitem of EachGroup.items)\n\t\t{\n\t\t\t\t\t\n\t\t\tgroupitem.ThisItemPartNetViz = 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\tgroupitem.ThisItemPartNetCost = 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\tgroupitem.ThisItemPartDiff = 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\n\t\t\t//makes sure it has a value before attempting to add it to the running total\n \tif (groupitem.Quantity != 0) \n \t \t{\n\t\t\t\t\t\tEachGroup.GroupPartsNetViz += groupitem.NetViz;\t\t\t\t\t\t\t\t\t\n\t\t\t\t\t\treportData.AllWOPartsNetViz += groupitem.NetViz;\t\n\n\n\t\t\t\t\t\tgroupitem.NetCost = (groupitem.Cost * groupitem.Quantity);\t\t\t\t\t\t\n\t\t\t\t\t\tEachGroup.GroupPartsNetCost += groupitem.NetCost;\n\t\t\t\t\t\treportData.AllWOPartsNetCost += groupitem.NetCost;\n\n\n\t\t\t\t\t\tif (groupitem.NetViz != 0) \n\t\t\t\t\t\t{\n\t\t\t\t\t\tgroupitem.NetDiff = (groupitem.NetViz - groupitem.NetCost)\n\t\t\t\t\t\tEachGroup.GroupPartsDiff += groupitem.NetDiff; //\n\t\t\t\t\t\treportData.AllWOPartsDiff += groupitem.NetDiff; //\n\n\t\t\t\t\t\t}\n\n\t\t\t\t\t\t\n\n \t \t\t}\t\t\n\t\t\t\n\n\t\t\t\n\t\t}\n\n }\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":"PM Parts Summary ","Active":true,"Notes":"Custom Prepare to obtain translations, group by the woitempart, derived amounts and running totals","Roles":49258,"AType":21,"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 {{#each ayReportData}}\n \n \n \n {{#each items}}\n \n \n \n \n \n \n \n \n \n {{#if NetCost }} {{else}}{{/if}}\n {{#if NetViz }} {{else}}{{/if}}\n {{#if NetDiff }} {{else}}{{/if}} \n \n {{/each}}\n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n {{/each}}\n \n
{{ayT 'PreventiveMaintenance'}} {{ayT 'WorkOrderItemParts'}} {{ayT 'PartCost'}} {{ayT 'NetPrice'}}
 
{{ayT 'Part'}}{{ayT 'PreventiveMaintenance'}}{{ayT 'PMNextServiceDate'}}{{ayT 'WorkOrderItemPartQuantity'}}{{ayT 'PartCost'}} Per{{ayT 'PartRetail'}} Per {{ayT 'PartCost'}} {{ayT 'NetPrice'}}{{ayT 'PartRetail'}} {{ayT 'NetPrice'}}Difference
 
{{group}}
 {{Serial}}{{ayDate NextServiceDate}}{{Quantity}}{{UnitOfMeasureViz}}{{ayCurrency Cost}}{{ayCurrency PriceViz}} {{ayCurrency NetCost}}{{Quantity}}{{ayCurrency NetViz}}{{Quantity}}{{ayCurrency NetDiff}}{{Quantity}}
 
{{ayT 'Total'}} for part {{group}}{{ayCurrency GroupPartsNetCost}}{{ayCurrency GroupPartsNetViz}}{{ayCurrency GroupPartsDiff}}

 
\n\n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n {{#if AllWOPartsNetCost}} {{else}} {{/if}}\n {{#if AllWOPartsNetViz}} {{else}} {{/if}} \n {{#if AllWOPartsDiff}} {{else}} {{/if}}\n \n \n \n
 
{{ayT 'Total'}} for all {{ayT 'WorkOrderItemParts'}} in this reportAll Net CostAll Net ChargeAll Diff
 {{ ayCurrency AllWOPartsNetCost}}$0.00{{ ayCurrency AllWOPartsNetViz}}$0.00{{ayCurrency AllWOPartsDiff}}$0.00
\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: 20px;\n font-size: 10pt; \n color: #9e9e9e;\n text-align: center;\n}\n\ntbody td {\n padding: 2px;\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\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\", \"Part\", \"PMNextServiceDate\", \"WorkOrderItemPartQuantity\", \"PreventiveMaintenance\", \"NetPrice\", \"PartCost\", \"PartRetail\", \"Total\" ]);\n\n\t//below is the code to group by the part - the PartNameViz\n\tlet ret = [];\n //iterate pms -> items -> pm item parts\n reportData.ayReportData.forEach(pm => {\n pm.Items.forEach(pmitem => {\n pmitem.Parts.forEach(part => {\n //new shape of data required for report \n let record = {\n Serial: pm.Serial,\n\t\t\t\t\tNextServiceDate: pm.NextServiceDate,\n\t\t\t\t\tNetViz: part.NetViz,\n\t\t\t\t\tPriceOverride: part.PriceOverride,\n\t\t\t\t\tListPrice: part.ListPrice,\n UnitOfMeasureViz: part.UnitOfMeasureViz,\n PriceViz: part.PriceViz,\n Cost: part.Cost,\n SuggestedQuantity: part.SuggestedQuantity,\n Quantity: part.Quantity,\n PartWarehouseViz: part.PartWarehouseViz,\n UpcViz: part.UpcViz,\n Serials: part.Serials,\n PartDescriptionViz: part.PartDescriptionViz ?? \"\",\n };\n\n //Find or create group and insert this record \n let groupObject = ret.find(z => z.group == (part.PartNameViz + \" \" + record.PartDescriptionViz) );\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: (part.PartNameViz + \" \" + record.PartDescriptionViz), items: [record], count: 1 });\n \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\n//below declares a key on the entire wo to hold all Part Net, costs, profit (nets - costs), from all pms so it exists and a key to hold all Part Net Costs\nreportData.AllWOPartsNetViz = 0;\nreportData.AllWOPartsNetCost = 0;\nreportData.AllWOPartsDiff = 0;\n\n\nfor (const EachGroup of reportData.ayReportData) \n\t{\n\n\n\t//below declares a key on the entire group to hold all Part Net, costs, profit/loss (nets - costs), for this group (this group is a single Part that has one or more wo item parts records)\n\tEachGroup.GroupPartsNetViz = 0;\n\tEachGroup.GroupPartsNetCost = 0;\n\tEachGroup.GroupPartsDiff = 0; \n\t\n\n\t//below is to Iterate through each woitempart record for this part - groupitem is a woitempart record\n\tfor (const groupitem of EachGroup.items)\n\t\t{\n\t\t\t\t\t\n\t\t\tgroupitem.ThisItemPartNetViz = 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\tgroupitem.ThisItemPartNetCost = 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\tgroupitem.ThisItemPartDiff = 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\n\t\t\t//makes sure it has a value before attempting to add it to the running total\n \tif (groupitem.Quantity != 0) \n \t \t{\n\t\t\t\t\t\tEachGroup.GroupPartsNetViz += groupitem.NetViz;\t\t\t\t\t\t\t\t\t\n\t\t\t\t\t\treportData.AllWOPartsNetViz += groupitem.NetViz;\t\n\n\n\t\t\t\t\t\tgroupitem.NetCost = (groupitem.Cost * groupitem.Quantity);\t\t\t\t\t\t\n\t\t\t\t\t\tEachGroup.GroupPartsNetCost += groupitem.NetCost;\n\t\t\t\t\t\treportData.AllWOPartsNetCost += groupitem.NetCost;\n\n\n\t\t\t\t\t\tif (groupitem.NetViz != 0) \n\t\t\t\t\t\t{\n\t\t\t\t\t\tgroupitem.NetDiff = (groupitem.NetViz - groupitem.NetCost)\n\t\t\t\t\t\tEachGroup.GroupPartsDiff += groupitem.NetDiff; //\n\t\t\t\t\t\treportData.AllWOPartsDiff += groupitem.NetDiff; //\n\n\t\t\t\t\t\t}\n\n\t\t\t\t\t\t\n\n \t \t\t}\t\t\n\t\t\t\n\n\t\t\t\n\t\t}\n\n }\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/Part Grouped Net Cost Difference.ayrt b/server/AyaNova/resource/rpt/stock-report-templates/Part Grouped Net Cost Difference.ayrt index e8f3736a..f4972f27 100644 --- a/server/AyaNova/resource/rpt/stock-report-templates/Part Grouped Net Cost Difference.ayrt +++ b/server/AyaNova/resource/rpt/stock-report-templates/Part Grouped Net Cost Difference.ayrt @@ -1 +1 @@ -{"Name":"Part Grouped Net Cost Difference","Active":true,"Notes":"Custom Prepare to obtain translations, group by the woitempart, derived amounts and running totals","Roles":49258,"AType":39,"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 {{#each ayReportData}}\n \n \n \n {{#each items}}\n \n \n \n {{#if ServiceDate }}{{else}} {{/if}}\n \n \n \n \n {{#if NetCost }} {{else}}{{/if}}\n {{#if NetViz }} {{else}}{{/if}}\n {{#if NetDiff }} {{else}}{{/if}} \n \n {{/each}}\n \n \n \n \n \n \n \n \n \n \n \n \n {{/each}}\n \n
{{ayT 'WorkOrder'}} {{ayT 'WorkOrderItemParts'}} {{ayT 'PartCost'}} {{ayT 'NetValue'}}
 
{{ayT 'Part'}}{{ayT 'WorkOrder'}}{{ayT 'WorkOrderServiceDate'}}{{ayT 'WorkOrderItemPartQuantity'}}{{ayT 'PartCost'}} Per{{ayT 'PartRetail'}} Per{{ayT 'PartCost'}} {{ayT 'NetValue'}}{{ayT 'PartRetail'}} {{ayT 'NetValue'}}Difference
{{group}}
 {{Serial}}{{ayDate ServiceDate}}no Service Date specified{{Quantity}}{{UnitOfMeasureViz}}{{ayCurrency Cost}}{{ayCurrency PriceViz}}{{ayCurrency NetCost}}{{Quantity}}{{ayCurrency NetViz}}{{Quantity}}{{ayCurrency NetDiff}}{{Quantity}}
 
{{ayT 'Total'}} for part {{group}}{{ayCurrency GroupPartsNetCost}}{{ayCurrency GroupPartsNetViz}}{{ayCurrency GroupPartsDiff}}
 
\n\n \n \n \n \n \n \n \n \n \n \n \n \n {{#if AllWOPartsNetCost}} {{else}} {{/if}}\n {{#if AllWOPartsNetViz}} {{else}} {{/if}} \n {{#if AllWOPartsDiff}} {{else}} {{/if}}\n \n \n \n
{{ayT 'Total'}} for all {{ayT 'WorkOrderItemParts'}} in this reportAll Net CostAll Net ChargeAll Diff
 {{ ayCurrency AllWOPartsNetCost}}$0.00{{ ayCurrency AllWOPartsNetViz}}$0.00{{ayCurrency AllWOPartsDiff}}$0.00
\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 text-align: center;\n}\n\ntbody td {\n padding: 2px;\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\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\", \"Part\", \"WorkOrderServiceDate\", \"WorkOrderItemPartQuantity\", \"WorkOrder\", \"WorkOrderList\", \"NetValue\", \"PartCost\", \"PartRetail\", \"Total\" ]);\n\n\t//below is the code to group by the part - the PartNameViz\n\tlet ret = [];\n //iterate workorders -> items -> workorder item parts\n reportData.ayReportData.forEach(workorder => {\n workorder.Items.forEach(workorderitem => {\n workorderitem.Parts.forEach(part => {\n //new shape of data required for report\n let record = {\n Serial: workorder.Serial,\n\t\t\t\t\tServiceDate: workorder.ServiceDate,\n\t\t\t\t\tNetViz: part.NetViz,\n\t\t\t\t\tPriceOverride: part.PriceOverride,\n\t\t\t\t\tListPrice: part.ListPrice,\n UnitOfMeasureViz: part.UnitOfMeasureViz,\n PriceViz: part.PriceViz,\n Cost: part.Cost,\n SuggestedQuantity: part.SuggestedQuantity,\n Quantity: part.Quantity,\n PartWarehouseViz: part.PartWarehouseViz,\n UpcViz: part.UpcViz,\n\t\t\t\t\tPartDescriptionViz: part.PartDescriptionViz ?? \"\",\n Serials: part.Serials\n };\n\n //Find or create group and insert this record \n let groupObject = ret.find(z => z.group == part.PartNameViz + \" \" + record.PartDescriptionViz);\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: part.PartNameViz + \" \" + record.PartDescriptionViz, 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 gets running totals of THE custom DATA returned above\n\n\n//below declares a key on the entire wo to hold all Part Net, costs, profit (nets - costs), from all workorders so it exists and a key to hold all Part Net Costs\nreportData.AllWOPartsNetViz = 0;\nreportData.AllWOPartsNetCost = 0;\nreportData.AllWOPartsDiff = 0;\n\n\nfor (const EachGroup of reportData.ayReportData) \n\t{\n\n\n\t//below declares a key on the entire group to hold all Part Net, costs, profit/loss (nets - costs), for this group (this group is a single Part that has one or more wo item parts records)\n\tEachGroup.GroupPartsNetViz = 0;\n\tEachGroup.GroupPartsNetCost = 0;\n\tEachGroup.GroupPartsDiff = 0; \n\t\n\n\t//below is to Iterate through each woitempart record for this part - groupitem is a woitempart record\n\tfor (const groupitem of EachGroup.items)\n\t\t{\n\t\t\t\t\t\n\t\t\tgroupitem.ThisItemPartNetViz = 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\tgroupitem.ThisItemPartNetCost = 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\tgroupitem.ThisItemPartDiff = 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\n\t\t\t//make sure it has a value before attempting to add it to the running total\n \tif (groupitem.Quantity != 0) \n \t \t{\n\t\t\t\t\t\tEachGroup.GroupPartsNetViz += groupitem.NetViz;\t\t\t\t\t\t\t\t\t\n\t\t\t\t\t\treportData.AllWOPartsNetViz += groupitem.NetViz;\t\n\n\n\t\t\t\t\t\tgroupitem.NetCost = (groupitem.Cost * groupitem.Quantity);\t\t\t\t\t\t\n\t\t\t\t\t\tEachGroup.GroupPartsNetCost += groupitem.NetCost;\n\t\t\t\t\t\treportData.AllWOPartsNetCost += groupitem.NetCost;\n\n\n\t\t\t\t\t\tif (groupitem.NetViz != 0) \n\t\t\t\t\t\t{\n\t\t\t\t\t\tgroupitem.NetDiff = (groupitem.NetViz - groupitem.NetCost)\n\t\t\t\t\t\tEachGroup.GroupPartsDiff += groupitem.NetDiff; //\n\t\t\t\t\t\treportData.AllWOPartsDiff += groupitem.NetDiff; //\n\n\t\t\t\t\t\t}\n\n\t\t\t\t\t\t\n\n \t \t\t}\t\t\t\t\n\t\t\t\n\n\t\t\t\n\t\t}\n\n }\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":"Part Grouped Net Cost Difference","Active":true,"Notes":"Custom Prepare to obtain translations, group by the woitempart, derived amounts and running totals","Roles":49258,"AType":39,"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 {{#each ayReportData}}\n \n \n \n {{#each items}}\n \n \n \n {{#if ServiceDate }}{{else}} {{/if}}\n \n \n \n \n {{#if NetCost }} {{else}}{{/if}}\n {{#if NetViz }} {{else}}{{/if}}\n {{#if NetDiff }} {{else}}{{/if}} \n \n {{/each}}\n \n \n \n \n \n \n \n \n \n \n \n \n {{/each}}\n \n
{{ayT 'WorkOrder'}} {{ayT 'WorkOrderItemParts'}} {{ayT 'PartCost'}} {{ayT 'NetPrice'}}
 
{{ayT 'Part'}}{{ayT 'WorkOrder'}}{{ayT 'WorkOrderServiceDate'}}{{ayT 'WorkOrderItemPartQuantity'}}{{ayT 'PartCost'}} Per{{ayT 'PartRetail'}} Per{{ayT 'PartCost'}} {{ayT 'NetPrice'}}{{ayT 'PartRetail'}} {{ayT 'NetPrice'}}Difference
{{group}}
 {{Serial}}{{ayDate ServiceDate}}no Service Date specified{{Quantity}}{{UnitOfMeasureViz}}{{ayCurrency Cost}}{{ayCurrency PriceViz}}{{ayCurrency NetCost}}{{Quantity}}{{ayCurrency NetViz}}{{Quantity}}{{ayCurrency NetDiff}}{{Quantity}}
 
{{ayT 'Total'}} for part {{group}}{{ayCurrency GroupPartsNetCost}}{{ayCurrency GroupPartsNetViz}}{{ayCurrency GroupPartsDiff}}
 
\n\n \n \n \n \n \n \n \n \n \n \n \n \n {{#if AllWOPartsNetCost}} {{else}} {{/if}}\n {{#if AllWOPartsNetViz}} {{else}} {{/if}} \n {{#if AllWOPartsDiff}} {{else}} {{/if}}\n \n \n \n
{{ayT 'Total'}} for all {{ayT 'WorkOrderItemParts'}} in this reportAll Net CostAll Net ChargeAll Diff
 {{ ayCurrency AllWOPartsNetCost}}$0.00{{ ayCurrency AllWOPartsNetViz}}$0.00{{ayCurrency AllWOPartsDiff}}$0.00
\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 text-align: center;\n}\n\ntbody td {\n padding: 2px;\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\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\", \"Part\", \"WorkOrderServiceDate\", \"WorkOrderItemPartQuantity\", \"WorkOrder\", \"WorkOrderList\", \"NetPrice\", \"PartCost\", \"PartRetail\", \"Total\" ]);\n\n\t//below is the code to group by the part - the PartNameViz\n\tlet ret = [];\n //iterate workorders -> items -> workorder item parts\n reportData.ayReportData.forEach(workorder => {\n workorder.Items.forEach(workorderitem => {\n workorderitem.Parts.forEach(part => {\n //new shape of data required for report\n let record = {\n Serial: workorder.Serial,\n\t\t\t\t\tServiceDate: workorder.ServiceDate,\n\t\t\t\t\tNetViz: part.NetViz,\n\t\t\t\t\tPriceOverride: part.PriceOverride,\n\t\t\t\t\tListPrice: part.ListPrice,\n UnitOfMeasureViz: part.UnitOfMeasureViz,\n PriceViz: part.PriceViz,\n Cost: part.Cost,\n SuggestedQuantity: part.SuggestedQuantity,\n Quantity: part.Quantity,\n PartWarehouseViz: part.PartWarehouseViz,\n UpcViz: part.UpcViz,\n\t\t\t\t\tPartDescriptionViz: part.PartDescriptionViz ?? \"\",\n Serials: part.Serials\n };\n\n //Find or create group and insert this record \n let groupObject = ret.find(z => z.group == part.PartNameViz + \" \" + record.PartDescriptionViz);\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: part.PartNameViz + \" \" + record.PartDescriptionViz, 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 gets running totals of THE custom DATA returned above\n\n\n//below declares a key on the entire wo to hold all Part Net, costs, profit (nets - costs), from all workorders so it exists and a key to hold all Part Net Costs\nreportData.AllWOPartsNetViz = 0;\nreportData.AllWOPartsNetCost = 0;\nreportData.AllWOPartsDiff = 0;\n\n\nfor (const EachGroup of reportData.ayReportData) \n\t{\n\n\n\t//below declares a key on the entire group to hold all Part Net, costs, profit/loss (nets - costs), for this group (this group is a single Part that has one or more wo item parts records)\n\tEachGroup.GroupPartsNetViz = 0;\n\tEachGroup.GroupPartsNetCost = 0;\n\tEachGroup.GroupPartsDiff = 0; \n\t\n\n\t//below is to Iterate through each woitempart record for this part - groupitem is a woitempart record\n\tfor (const groupitem of EachGroup.items)\n\t\t{\n\t\t\t\t\t\n\t\t\tgroupitem.ThisItemPartNetViz = 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\tgroupitem.ThisItemPartNetCost = 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\tgroupitem.ThisItemPartDiff = 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\n\t\t\t//make sure it has a value before attempting to add it to the running total\n \tif (groupitem.Quantity != 0) \n \t \t{\n\t\t\t\t\t\tEachGroup.GroupPartsNetViz += groupitem.NetViz;\t\t\t\t\t\t\t\t\t\n\t\t\t\t\t\treportData.AllWOPartsNetViz += groupitem.NetViz;\t\n\n\n\t\t\t\t\t\tgroupitem.NetCost = (groupitem.Cost * groupitem.Quantity);\t\t\t\t\t\t\n\t\t\t\t\t\tEachGroup.GroupPartsNetCost += groupitem.NetCost;\n\t\t\t\t\t\treportData.AllWOPartsNetCost += groupitem.NetCost;\n\n\n\t\t\t\t\t\tif (groupitem.NetViz != 0) \n\t\t\t\t\t\t{\n\t\t\t\t\t\tgroupitem.NetDiff = (groupitem.NetViz - groupitem.NetCost)\n\t\t\t\t\t\tEachGroup.GroupPartsDiff += groupitem.NetDiff; //\n\t\t\t\t\t\treportData.AllWOPartsDiff += groupitem.NetDiff; //\n\n\t\t\t\t\t\t}\n\n\t\t\t\t\t\t\n\n \t \t\t}\t\t\t\t\n\t\t\t\n\n\t\t\t\n\t\t}\n\n }\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/Parts & Labor Profit _ Loss.ayrt b/server/AyaNova/resource/rpt/stock-report-templates/Parts & Labor Profit _ Loss.ayrt index b7beec64..dd8c5432 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 'NetValue'}}{{ayT 'WorkOrderItemLabors'}} Cost{{ayT 'WorkOrderItemLabors'}} Profit / Loss {{ayT 'WorkOrderItemParts'}} {{ayT 'NetValue'}}{{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\", \"TaxCodeTaxAValue\", \"TaxCodeTaxBValue\", \"NetValue\" ]);\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 '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\", \"TaxCodeTaxAValue\", \"TaxCodeTaxBValue\", \"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/Purchase Order Summaries.ayrt b/server/AyaNova/resource/rpt/stock-report-templates/Purchase Order Summaries.ayrt index 2d3f8372..df1ca788 100644 --- a/server/AyaNova/resource/rpt/stock-report-templates/Purchase Order Summaries.ayrt +++ b/server/AyaNova/resource/rpt/stock-report-templates/Purchase Order Summaries.ayrt @@ -1 +1 @@ -{"Name":"Purchase Order Summaries","Active":true,"Notes":"custom Prepare - derived running totals for nets, taxes and totals for EACH PO on single line, and running total for all POs Nets, Taxes, Totals at bottom of report","Roles":49258,"AType":26,"IncludeWoItemDescendants":false,"Template":"\n\n\t
\t \n\t\t \n \t\t\n \n\t\t\t \n\t\t \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \t\t\n \n \n {{#each ayReportData}}\n \n \n \n \n \n \n \n \n \n \n {{#if ThisPOTaxA}}{{else}} {{/if}} \n {{#if ThisPOTaxB}}{{else}} {{/if}}\n \n \n \t {{/each}}\n \n
Purchase Order Summaries
 
{{ayT 'PurchaseOrderOrderedDate'}}{{ayT 'PurchaseOrderExpectedReceiveDate'}}{{ayT 'PurchaseOrderItemUIOrderedFrom'}}{{ayT 'PurchaseOrderStatus'}}{{ayT 'PurchaseOrderReferenceNumber'}}{{ayT 'PurchaseOrder'}}{{ayT 'NetValue'}}{{ayT 'TaxCodeTaxAValue'}}{{ayT 'TaxCodeTaxBValue'}}{{ayT 'Total'}}
 
{{ayDate OrderedDate}}{{ayDate ExpectedReceiveDate}}{{VendorViz}}{{StatusViz}}{{ReferenceNumber}}{{Serial}}{{ayCurrency ThisPONet}}{{ayCurrency ThisPOTaxA}}$0.00{{ayCurrency ThisPOTaxB}}$0.00{{ayCurrency ThisPOTotalofLines}}
\n\n \n \n \n \n \n \n \n \n \n \n \n \n {{#if AllPOTaxARunning}}{{else}} {{/if}} \n {{#if AllPOTaxBRunning}}{{else}} {{/if}} \n \n \n \n
All {{ayT 'NetValue'}}All {{ayT 'TaxCodeTaxAValue'}}All {{ayT 'TaxCodeTaxBValue'}}All {{ayT 'Total'}}
{{ ayCurrency AllPONetRunning }}{{ ayCurrency AllPOTaxARunning }}$0.00{{ ayCurrency AllPOTaxBRunning }}$0.00 {{ ayCurrency AllPOTotal }}
\n \n\t
\n\n","Style":".singlePage\n{\npage-break-after: always;\n\n}\nbody {\n font-family: 'Helvetica', 'Helvetica Neue', Arial, sans-serif; \n}\n\n.reporttitle { \n margin-bottom: 20pt; \n font-weight: bold; \n font-size: 14pt; \n color: #9e9e9e;\n text-align: left;\n} \n\ntable { \n border-collapse: collapse;\n white-space: pre-wrap;\n width: 100%;\n font-size: 9pt; \n table-layout: fixed; \n }\n\nth {\n /* border-bottom: solid 1pt #9e9e9e; */\n height: 30px;\n font-size: 10pt; \n color: #9e9e9e;\n}\n\ntfoot th{\n border-top: solid 1pt #9e9e9e;\n height: 50px;\n font-size: 10pt; \n text-align: right;\n}\n\ntbody td {\n padding: 10px;\n word-wrap: break-word;\n font-size: 9pt;\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 font-size: 16pt;\n}\n.fontblue {\n color: blue;\n}\n.fontred {\n color:red;\n}\n\n","JsPrerender":"async function ayPrepareData(reportData) {\n //Example of both manipulating the reportData before rendering the report (by adding a running total field)\n //and adding fields to the overall data such as calculating the total dollar amount for all records\n\n await ayGetTranslations([\"PurchaseOrderItemUIOrderedFrom\", \"PurchaseOrderStatus\", \"PurchaseOrderReferenceNumber\", \"PurchaseOrder\", \"PurchaseOrderExpectedReceiveDate\", \"PurchaseOrderOrderedDate\", \"Total\", \"TaxCodeTaxAValue\", \"TaxCodeTaxBValue\", \"NetValue\" ]);\n\nlet AllPONet = 0; //Declare a temporary variable to hold the running net total for all POs in this list\n \n for (const EachPO of reportData.ayReportData) //Iterate through all the records in the reportData adding the dollar amount of each item to the AllPONet variable\n {\n let ThisPONet = 0; //Declare a temporary variable to hold the running net total for THIS po\n for (const Item of EachPO.Items) //Iterate through all the poitems of THIS po adding the dollar amount of each item to the ThisPONet variable\n {\n //make sure it has a value before attempting to add it to the running total\n if (Item.NetTotalViz != null) \n {\n ThisPONet += Item.NetTotalViz;\n }\n Item.PONetRunning=ThisPONet;\n }\n EachPO.ThisPONet=ThisPONet;\n AllPONet += ThisPONet; //Use ThisPONet to display the running Net total for THIS PO\n }\n //Add the AllPONet variable to the reportData so it can be accessed in the report template i.e. a final running total of ALL PO's Net\n reportData.AllPONetRunning=AllPONet;\n \nlet AllPOTaxA = 0; //Declare a temporary variable to hold the running Tax A total for all POs in the list\n //Iterate through all the records in the reportData adding the Tax A dollar amount of each item to the AllPOTaxA variable\n for (const EachPO of reportData.ayReportData) \n {\n let ThisPOTaxA = 0; //Declare a temporary variable to hold the running Tax A total for THIS po\n for (const Item of EachPO.Items) //Iterate through all the poitems of THIS po adding the dollar amount of each item to the ThisPOTaxA variable\n {\n //make sure it has a value before attempting to add it to the running total\n if (Item.TaxAViz != null) \n {\n ThisPOTaxA += Item.TaxAViz;\n }\n Item.POTaxARunning=ThisPOTaxA;\n }\n EachPO.ThisPOTaxA=ThisPOTaxA;\n AllPOTaxA += ThisPOTaxA; // Use ThisPOTaxA to display the running Tax A total for THIS PO\n }\n //Add the AllPONet variable to the reportData so it can be accessed in the report template i.e. a final running total of ALL PO's Tax A\n reportData.AllPOTaxARunning=AllPOTaxA; \n \nlet AllPOTaxB = 0; //Declare a temporary variable to hold the running Tax B total for all POs in the list\n //Iterate through all the records in the reportData adding the Tax B dollar amount of each item to the AllPOTaxA variable\n for (const EachPO of reportData.ayReportData) \n {\n let ThisPOTaxB = 0; //Declare a temporary variable to hold the running Tax B total for THIS po\n for (const Item of EachPO.Items) //Iterate through all the poitems of THIS po adding the dollar amount of each item to the ThisPOTaxB variable\n {\n //make sure it has a value before attempting to add it to the running total\n if (Item.TaxBViz != null) \n {\n ThisPOTaxB += Item.TaxBViz;\n }\n Item.POTaxBRunning=ThisPOTaxB;\n }\n EachPO.ThisPOTaxB=ThisPOTaxB;\n AllPOTaxB += ThisPOTaxB; // Use ThisPOTaxB to display the running Tax B total for THIS PO\n }\n //Add the AllPOTaxB variable to the reportData so it can be accessed in the report template i.e. a final running total of ALL PO's Tax B\n reportData.AllPOTaxBRunning=AllPOTaxB; \n\nlet AllPODollarTotalRunning = 0; //Declare a temporary variable to hold the running total of all POs in this list\n//let ThisPOTotal = 0; //if declare this at this stage will NOT get correct EachPO.ThisPOTotalofLines\n for (const EachPO of reportData.ayReportData) \n { \n let ThisPOTotal = 0; \n // need to declared let ThisPOTotal = 0; at this stage so then it will reset ThisPOTotal back to 0 before being able to add to EachPO.POsRunningTotalSoFar \n for (const Item of EachPO.Items)\n {\n //make sure it has a value before attempting to add it to the running total\n if (Item.LineTotalViz != null) \n {\n ThisPOTotal += Item.LineTotalViz;\n }\n Item.ThisPORunningTotal=ThisPOTotal;\n } \n EachPO.ThisPOTotalofLines =ThisPOTotal; \n //add a new key to each record in the reportData object named \"EachPO.POsRunningTotalSoFar\" with the running total so far\n EachPO.POsRunningTotalSoFar=ThisPOTotal; \n\n AllPODollarTotalRunning += ThisPOTotal; \n }\n //set the AllPODollarTotalRunning variable to the reportData so the reportData.AllPOTotal can be accessed in the report template outside of the #each \n //- i.e. in a separate footer that displays once at end of report\n reportData.AllPOTotal=AllPODollarTotalRunning; \n \n\n return reportData;\n}","JsHelpers":"\n","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":"Purchase Order Summaries","Active":true,"Notes":"custom Prepare - derived running totals for nets, taxes and totals for EACH PO on single line, and running total for all POs Nets, Taxes, Totals at bottom of report","Roles":49258,"AType":26,"IncludeWoItemDescendants":false,"Template":"\n\n\t
\t \n\t\t \n \t\t\n \n\t\t\t \n\t\t \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \t\t\n \n \n {{#each ayReportData}}\n \n \n \n \n \n \n \n \n \n \n {{#if ThisPOTaxA}}{{else}} {{/if}} \n {{#if ThisPOTaxB}}{{else}} {{/if}}\n \n \n \t {{/each}}\n \n
Purchase Order Summaries
 
{{ayT 'PurchaseOrderOrderedDate'}}{{ayT 'PurchaseOrderExpectedReceiveDate'}}{{ayT 'PurchaseOrderItemUIOrderedFrom'}}{{ayT 'PurchaseOrderStatus'}}{{ayT 'PurchaseOrderReferenceNumber'}}{{ayT 'PurchaseOrder'}}{{ayT 'NetPrice'}}{{ayT 'TaxCodeTaxAValue'}}{{ayT 'TaxCodeTaxBValue'}}{{ayT 'Total'}}
 
{{ayDate OrderedDate}}{{ayDate ExpectedReceiveDate}}{{VendorViz}}{{StatusViz}}{{ReferenceNumber}}{{Serial}}{{ayCurrency ThisPONet}}{{ayCurrency ThisPOTaxA}}$0.00{{ayCurrency ThisPOTaxB}}$0.00{{ayCurrency ThisPOTotalofLines}}
\n\n \n \n \n \n \n \n \n \n \n \n \n \n {{#if AllPOTaxARunning}}{{else}} {{/if}} \n {{#if AllPOTaxBRunning}}{{else}} {{/if}} \n \n \n \n
All {{ayT 'NetPrice'}}All {{ayT 'TaxCodeTaxAValue'}}All {{ayT 'TaxCodeTaxBValue'}}All {{ayT 'Total'}}
{{ ayCurrency AllPONetRunning }}{{ ayCurrency AllPOTaxARunning }}$0.00{{ ayCurrency AllPOTaxBRunning }}$0.00 {{ ayCurrency AllPOTotal }}
\n \n\t
\n\n","Style":".singlePage\n{\npage-break-after: always;\n\n}\nbody {\n font-family: 'Helvetica', 'Helvetica Neue', Arial, sans-serif; \n}\n\n.reporttitle { \n margin-bottom: 20pt; \n font-weight: bold; \n font-size: 14pt; \n color: #9e9e9e;\n text-align: left;\n} \n\ntable { \n border-collapse: collapse;\n white-space: pre-wrap;\n width: 100%;\n font-size: 9pt; \n table-layout: fixed; \n }\n\nth {\n /* border-bottom: solid 1pt #9e9e9e; */\n height: 30px;\n font-size: 10pt; \n color: #9e9e9e;\n}\n\ntfoot th{\n border-top: solid 1pt #9e9e9e;\n height: 50px;\n font-size: 10pt; \n text-align: right;\n}\n\ntbody td {\n padding: 10px;\n word-wrap: break-word;\n font-size: 9pt;\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 font-size: 16pt;\n}\n.fontblue {\n color: blue;\n}\n.fontred {\n color:red;\n}\n\n","JsPrerender":"async function ayPrepareData(reportData) {\n //Example of both manipulating the reportData before rendering the report (by adding a running total field)\n //and adding fields to the overall data such as calculating the total dollar amount for all records\n\n await ayGetTranslations([\"PurchaseOrderItemUIOrderedFrom\", \"PurchaseOrderStatus\", \"PurchaseOrderReferenceNumber\", \"PurchaseOrder\", \"PurchaseOrderExpectedReceiveDate\", \"PurchaseOrderOrderedDate\", \"Total\", \"TaxCodeTaxAValue\", \"TaxCodeTaxBValue\", \"NetPrice\" ]);\n\nlet AllPONet = 0; //Declare a temporary variable to hold the running net total for all POs in this list\n \n for (const EachPO of reportData.ayReportData) //Iterate through all the records in the reportData adding the dollar amount of each item to the AllPONet variable\n {\n let ThisPONet = 0; //Declare a temporary variable to hold the running net total for THIS po\n for (const Item of EachPO.Items) //Iterate through all the poitems of THIS po adding the dollar amount of each item to the ThisPONet variable\n {\n //make sure it has a value before attempting to add it to the running total\n if (Item.NetTotalViz != null) \n {\n ThisPONet += Item.NetTotalViz;\n }\n Item.PONetRunning=ThisPONet;\n }\n EachPO.ThisPONet=ThisPONet;\n AllPONet += ThisPONet; //Use ThisPONet to display the running Net total for THIS PO\n }\n //Add the AllPONet variable to the reportData so it can be accessed in the report template i.e. a final running total of ALL PO's Net\n reportData.AllPONetRunning=AllPONet;\n \nlet AllPOTaxA = 0; //Declare a temporary variable to hold the running Tax A total for all POs in the list\n //Iterate through all the records in the reportData adding the Tax A dollar amount of each item to the AllPOTaxA variable\n for (const EachPO of reportData.ayReportData) \n {\n let ThisPOTaxA = 0; //Declare a temporary variable to hold the running Tax A total for THIS po\n for (const Item of EachPO.Items) //Iterate through all the poitems of THIS po adding the dollar amount of each item to the ThisPOTaxA variable\n {\n //make sure it has a value before attempting to add it to the running total\n if (Item.TaxAViz != null) \n {\n ThisPOTaxA += Item.TaxAViz;\n }\n Item.POTaxARunning=ThisPOTaxA;\n }\n EachPO.ThisPOTaxA=ThisPOTaxA;\n AllPOTaxA += ThisPOTaxA; // Use ThisPOTaxA to display the running Tax A total for THIS PO\n }\n //Add the AllPONet variable to the reportData so it can be accessed in the report template i.e. a final running total of ALL PO's Tax A\n reportData.AllPOTaxARunning=AllPOTaxA; \n \nlet AllPOTaxB = 0; //Declare a temporary variable to hold the running Tax B total for all POs in the list\n //Iterate through all the records in the reportData adding the Tax B dollar amount of each item to the AllPOTaxA variable\n for (const EachPO of reportData.ayReportData) \n {\n let ThisPOTaxB = 0; //Declare a temporary variable to hold the running Tax B total for THIS po\n for (const Item of EachPO.Items) //Iterate through all the poitems of THIS po adding the dollar amount of each item to the ThisPOTaxB variable\n {\n //make sure it has a value before attempting to add it to the running total\n if (Item.TaxBViz != null) \n {\n ThisPOTaxB += Item.TaxBViz;\n }\n Item.POTaxBRunning=ThisPOTaxB;\n }\n EachPO.ThisPOTaxB=ThisPOTaxB;\n AllPOTaxB += ThisPOTaxB; // Use ThisPOTaxB to display the running Tax B total for THIS PO\n }\n //Add the AllPOTaxB variable to the reportData so it can be accessed in the report template i.e. a final running total of ALL PO's Tax B\n reportData.AllPOTaxBRunning=AllPOTaxB; \n\nlet AllPODollarTotalRunning = 0; //Declare a temporary variable to hold the running total of all POs in this list\n//let ThisPOTotal = 0; //if declare this at this stage will NOT get correct EachPO.ThisPOTotalofLines\n for (const EachPO of reportData.ayReportData) \n { \n let ThisPOTotal = 0; \n // need to declared let ThisPOTotal = 0; at this stage so then it will reset ThisPOTotal back to 0 before being able to add to EachPO.POsRunningTotalSoFar \n for (const Item of EachPO.Items)\n {\n //make sure it has a value before attempting to add it to the running total\n if (Item.LineTotalViz != null) \n {\n ThisPOTotal += Item.LineTotalViz;\n }\n Item.ThisPORunningTotal=ThisPOTotal;\n } \n EachPO.ThisPOTotalofLines =ThisPOTotal; \n //add a new key to each record in the reportData object named \"EachPO.POsRunningTotalSoFar\" with the running total so far\n EachPO.POsRunningTotalSoFar=ThisPOTotal; \n\n AllPODollarTotalRunning += ThisPOTotal; \n }\n //set the AllPODollarTotalRunning variable to the reportData so the reportData.AllPOTotal can be accessed in the report template outside of the #each \n //- i.e. in a separate footer that displays once at end of report\n reportData.AllPOTotal=AllPODollarTotalRunning; \n \n\n return reportData;\n}","JsHelpers":"\n","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 c1915f9b..12c289aa 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\", \"NetValue\", \"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 '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 diff --git a/server/AyaNova/resource/rpt/stock-report-templates/Quote Parts Net Cost Summary.ayrt b/server/AyaNova/resource/rpt/stock-report-templates/Quote Parts Net Cost Summary.ayrt index 537b0054..6347b845 100644 --- a/server/AyaNova/resource/rpt/stock-report-templates/Quote Parts Net Cost Summary.ayrt +++ b/server/AyaNova/resource/rpt/stock-report-templates/Quote Parts Net Cost Summary.ayrt @@ -1 +1 @@ -{"Name":"Quote Parts Net Cost Summary","Active":true,"Notes":"Custom Prepare used to obtain translations, to group by the woitempart, and to obtain derived amounts and running totals\nUse of background-color to display Quote Status's display color","Roles":49258,"AType":27,"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 \n \n \n {{#each ayReportData}}\n \n \n \n {{#each items}}\n \n \n \n \n {{#if Requested }}{{else}} {{/if}}\n \n \n \n \n \n {{#if NetCost }} {{else}}{{/if}}\n {{#if NetViz }} {{else}}{{/if}}\n {{#if NetDiff }} {{else}}{{/if}} \n \n {{/each}}\n \n \n \n \n \n \n \n \n \n \n \n \n {{/each}}\n \n
Grouped by {{ayT 'Quote'}} {{ayT 'WorkOrderItemParts'}} showing {{ayT 'NetValue'}} {{ayT 'PartCost'}}
 
 
{{ayT 'Part'}}{{ayT 'Quote'}}{{ayT 'Status'}}{{ayT 'QuoteQuoteRequestDate'}}{{ayT 'WorkOrderItemPartQuantity'}}{{ayT 'PartCost'}} Per{{ayT 'PartRetail'}} Per {{ayT 'PartCost'}} {{ayT 'NetValue'}}{{ayT 'PartRetail'}} {{ayT 'NetValue'}}Difference
 
{{group}}
 {{Serial}}{{LastStateNameViz}}{{ayDate Requested}}no date specified{{Quantity}}{{UnitOfMeasureViz}}{{ayCurrency Cost}}{{ayCurrency PriceViz}} {{ayCurrency NetCost}}{{Quantity}}{{ayCurrency NetViz}}{{Quantity}}{{ayCurrency NetDiff}}{{Quantity}}
 
{{ayT 'Total'}} for {{ayT 'Part'}} {{group}}{{ayCurrency GroupPartsNetCost}}{{ayCurrency GroupPartsNetViz}}{{ayCurrency GroupPartsDiff}}
 
\n\n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n {{#if AllWOPartsNetCost}} {{else}} {{/if}}\n {{#if AllWOPartsNetViz}} {{else}} {{/if}} \n {{#if AllWOPartsDiff}} {{else}} {{/if}}\n \n \n \n
 
{{ayT 'Total'}} for all {{ayT 'WorkOrderItemParts'}} in this reportAll Net CostAll Net ChargeAll Diff
 {{ ayCurrency AllWOPartsNetCost}}$0.00{{ ayCurrency AllWOPartsNetViz}}$0.00{{ayCurrency AllWOPartsDiff}}$0.00
\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: 20px;\n font-size: 10pt; \n color: #9e9e9e;\n text-align: center;\n}\n\ntbody td {\n padding: 2px;\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\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\", \"Part\", \"Status\", \"QuoteQuoteRequestDate\", \"WorkOrderItemPartQuantity\", \"Quote\", \"NetValue\", \"PartCost\", \"PartRetail\", \"Total\" ]);\n\n\t//below is the code to group by the part - the PartNameViz\n\tlet ret = [];\n //iterate quotes -> items -> quote item parts\n reportData.ayReportData.forEach(quote => {\n quote.Items.forEach(quoteitem => {\n quoteitem.Parts.forEach(part => {\n //new shape of data required for report \n let record = {\n Serial: quote.Serial,\n\t\t\t\t\tRequested: quote.Requested,\n\t\t\t\t\tNetViz: part.NetViz,\n\t\t\t\t\tPriceOverride: part.PriceOverride,\n\t\t\t\t\tListPrice: part.ListPrice,\n UnitOfMeasureViz: part.UnitOfMeasureViz,\n PriceViz: part.PriceViz,\n Cost: part.Cost,\n SuggestedQuantity: part.SuggestedQuantity,\n Quantity: part.Quantity,\n PartWarehouseViz: part.PartWarehouseViz,\n UpcViz: part.UpcViz,\n Serials: part.Serials,\n PartDescriptionViz: part.PartDescriptionViz, \n LastStateNameViz: quote.LastStateNameViz,\n LastStateColorViz: quote.LastStateColorViz,\n };\n\n //Find or create group and insert this record \n if (part.PartDescriptionViz) { //if part description is not empty or null then will include\n let groupObject = ret.find(z => z.group == (part.PartNameViz + \" \" + part.PartDescriptionViz) ); \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: (part.PartNameViz+ \" \" + part.PartDescriptionViz), items: [record], count: 1 }); \n }\n } else { //else if part description is empty or null then will not include so doesn't show the text null \n let groupObject = ret.find(z => z.group == (part.PartNameViz) ); \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: (part.PartNameViz), items: [record], count: 1 }); \n }\n }\n \n \n\n })\n })\n });\n\n //replace the ayReportData with our new shaped format of data\n reportData.ayReportData = ret;\n\n \n//note that below references the new shaped format of data\n\n//below declares a key on the entire wo to hold all Part Net, costs, profit (nets - costs), from all quotes so it exists and a key to hold all Part Net Costs\nreportData.AllWOPartsNetViz = 0;\nreportData.AllWOPartsNetCost = 0;\nreportData.AllWOPartsDiff = 0;\n\n\nfor (const EachGroup of reportData.ayReportData) \n\t{\n\n\n\t//below declares a key on the entire group to hold all Part Net, costs, profit/loss (nets - costs), for this group (this group is a single Part that has one or more wo item parts records)\n\tEachGroup.GroupPartsNetViz = 0;\n\tEachGroup.GroupPartsNetCost = 0;\n\tEachGroup.GroupPartsDiff = 0; \n\t\n\n\t//below is to Iterate through each woitempart record for this part - groupitem is a woitempart record\n\tfor (const groupitem of EachGroup.items)\n\t\t{\n\t\t\t\t\t\n\t\t\tgroupitem.ThisItemPartNetViz = 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\tgroupitem.ThisItemPartNetCost = 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\tgroupitem.ThisItemPartDiff = 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\n\t\t\t//make sure it has a value before attempting to add it to the running total\n \tif (groupitem.Quantity != 0) \n \t \t{\n\t\t\t\t\t\tEachGroup.GroupPartsNetViz += groupitem.NetViz;\t\t\t\t\t\t\t\t\t\n\t\t\t\t\t\treportData.AllWOPartsNetViz += groupitem.NetViz;\t\n\n\n\t\t\t\t\t\tgroupitem.NetCost = (groupitem.Cost * groupitem.Quantity);\t\t\t\t\t\t\n\t\t\t\t\t\tEachGroup.GroupPartsNetCost += groupitem.NetCost;\n\t\t\t\t\t\treportData.AllWOPartsNetCost += groupitem.NetCost;\n\n\n\t\t\t\t\t\tif (groupitem.NetViz != 0) \n\t\t\t\t\t\t{\n\t\t\t\t\t\tgroupitem.NetDiff = (groupitem.NetViz - groupitem.NetCost)\n\t\t\t\t\t\tEachGroup.GroupPartsDiff += groupitem.NetDiff; //\n\t\t\t\t\t\treportData.AllWOPartsDiff += groupitem.NetDiff; //\n\n\t\t\t\t\t\t}\n\n\t\t\t\t\t\t\n\n \t \t\t}\t\t\t\t\n\t\t\t\n\n\t\t\t\n\t\t}\n\n }\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":"Quote Parts Net Cost Summary","Active":true,"Notes":"Custom Prepare used to obtain translations, to group by the woitempart, and to obtain derived amounts and running totals\nUse of background-color to display Quote Status's display color","Roles":49258,"AType":27,"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 \n \n \n {{#each ayReportData}}\n \n \n \n {{#each items}}\n \n \n \n \n {{#if Requested }}{{else}} {{/if}}\n \n \n \n \n \n {{#if NetCost }} {{else}}{{/if}}\n {{#if NetViz }} {{else}}{{/if}}\n {{#if NetDiff }} {{else}}{{/if}} \n \n {{/each}}\n \n \n \n \n \n \n \n \n \n \n \n \n {{/each}}\n \n
Grouped by {{ayT 'Quote'}} {{ayT 'WorkOrderItemParts'}} showing {{ayT 'NetPrice'}} {{ayT 'PartCost'}}
 
 
{{ayT 'Part'}}{{ayT 'Quote'}}{{ayT 'Status'}}{{ayT 'QuoteQuoteRequestDate'}}{{ayT 'WorkOrderItemPartQuantity'}}{{ayT 'PartCost'}} Per{{ayT 'PartRetail'}} Per {{ayT 'PartCost'}} {{ayT 'NetPrice'}}{{ayT 'PartRetail'}} {{ayT 'NetPrice'}}Difference
 
{{group}}
 {{Serial}}{{LastStateNameViz}}{{ayDate Requested}}no date specified{{Quantity}}{{UnitOfMeasureViz}}{{ayCurrency Cost}}{{ayCurrency PriceViz}} {{ayCurrency NetCost}}{{Quantity}}{{ayCurrency NetViz}}{{Quantity}}{{ayCurrency NetDiff}}{{Quantity}}
 
{{ayT 'Total'}} for {{ayT 'Part'}} {{group}}{{ayCurrency GroupPartsNetCost}}{{ayCurrency GroupPartsNetViz}}{{ayCurrency GroupPartsDiff}}
 
\n\n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n {{#if AllWOPartsNetCost}} {{else}} {{/if}}\n {{#if AllWOPartsNetViz}} {{else}} {{/if}} \n {{#if AllWOPartsDiff}} {{else}} {{/if}}\n \n \n \n
 
{{ayT 'Total'}} for all {{ayT 'WorkOrderItemParts'}} in this reportAll Net CostAll Net ChargeAll Diff
 {{ ayCurrency AllWOPartsNetCost}}$0.00{{ ayCurrency AllWOPartsNetViz}}$0.00{{ayCurrency AllWOPartsDiff}}$0.00
\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: 20px;\n font-size: 10pt; \n color: #9e9e9e;\n text-align: center;\n}\n\ntbody td {\n padding: 2px;\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\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\", \"Part\", \"Status\", \"QuoteQuoteRequestDate\", \"WorkOrderItemPartQuantity\", \"Quote\", \"NetPrice\", \"PartCost\", \"PartRetail\", \"Total\" ]);\n\n\t//below is the code to group by the part - the PartNameViz\n\tlet ret = [];\n //iterate quotes -> items -> quote item parts\n reportData.ayReportData.forEach(quote => {\n quote.Items.forEach(quoteitem => {\n quoteitem.Parts.forEach(part => {\n //new shape of data required for report \n let record = {\n Serial: quote.Serial,\n\t\t\t\t\tRequested: quote.Requested,\n\t\t\t\t\tNetViz: part.NetViz,\n\t\t\t\t\tPriceOverride: part.PriceOverride,\n\t\t\t\t\tListPrice: part.ListPrice,\n UnitOfMeasureViz: part.UnitOfMeasureViz,\n PriceViz: part.PriceViz,\n Cost: part.Cost,\n SuggestedQuantity: part.SuggestedQuantity,\n Quantity: part.Quantity,\n PartWarehouseViz: part.PartWarehouseViz,\n UpcViz: part.UpcViz,\n Serials: part.Serials,\n PartDescriptionViz: part.PartDescriptionViz, \n LastStateNameViz: quote.LastStateNameViz,\n LastStateColorViz: quote.LastStateColorViz,\n };\n\n //Find or create group and insert this record \n if (part.PartDescriptionViz) { //if part description is not empty or null then will include\n let groupObject = ret.find(z => z.group == (part.PartNameViz + \" \" + part.PartDescriptionViz) ); \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: (part.PartNameViz+ \" \" + part.PartDescriptionViz), items: [record], count: 1 }); \n }\n } else { //else if part description is empty or null then will not include so doesn't show the text null \n let groupObject = ret.find(z => z.group == (part.PartNameViz) ); \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: (part.PartNameViz), items: [record], count: 1 }); \n }\n }\n \n \n\n })\n })\n });\n\n //replace the ayReportData with our new shaped format of data\n reportData.ayReportData = ret;\n\n \n//note that below references the new shaped format of data\n\n//below declares a key on the entire wo to hold all Part Net, costs, profit (nets - costs), from all quotes so it exists and a key to hold all Part Net Costs\nreportData.AllWOPartsNetViz = 0;\nreportData.AllWOPartsNetCost = 0;\nreportData.AllWOPartsDiff = 0;\n\n\nfor (const EachGroup of reportData.ayReportData) \n\t{\n\n\n\t//below declares a key on the entire group to hold all Part Net, costs, profit/loss (nets - costs), for this group (this group is a single Part that has one or more wo item parts records)\n\tEachGroup.GroupPartsNetViz = 0;\n\tEachGroup.GroupPartsNetCost = 0;\n\tEachGroup.GroupPartsDiff = 0; \n\t\n\n\t//below is to Iterate through each woitempart record for this part - groupitem is a woitempart record\n\tfor (const groupitem of EachGroup.items)\n\t\t{\n\t\t\t\t\t\n\t\t\tgroupitem.ThisItemPartNetViz = 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\tgroupitem.ThisItemPartNetCost = 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\tgroupitem.ThisItemPartDiff = 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\n\t\t\t//make sure it has a value before attempting to add it to the running total\n \tif (groupitem.Quantity != 0) \n \t \t{\n\t\t\t\t\t\tEachGroup.GroupPartsNetViz += groupitem.NetViz;\t\t\t\t\t\t\t\t\t\n\t\t\t\t\t\treportData.AllWOPartsNetViz += groupitem.NetViz;\t\n\n\n\t\t\t\t\t\tgroupitem.NetCost = (groupitem.Cost * groupitem.Quantity);\t\t\t\t\t\t\n\t\t\t\t\t\tEachGroup.GroupPartsNetCost += groupitem.NetCost;\n\t\t\t\t\t\treportData.AllWOPartsNetCost += groupitem.NetCost;\n\n\n\t\t\t\t\t\tif (groupitem.NetViz != 0) \n\t\t\t\t\t\t{\n\t\t\t\t\t\tgroupitem.NetDiff = (groupitem.NetViz - groupitem.NetCost)\n\t\t\t\t\t\tEachGroup.GroupPartsDiff += groupitem.NetDiff; //\n\t\t\t\t\t\treportData.AllWOPartsDiff += groupitem.NetDiff; //\n\n\t\t\t\t\t\t}\n\n\t\t\t\t\t\t\n\n \t \t\t}\t\t\t\t\n\t\t\t\n\n\t\t\t\n\t\t}\n\n }\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/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 27c2fc14..1b0561b7 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 'NetValue'}}{{ayT 'TaxCodeTaxA'}}{{ayT 'TaxCodeTaxB'}}{{ayT 'LineTotal'}}
 {{ayT 'WorkOrderItemExpenses'}}: {{Name}}{{ayCurrency ChargeAmount}}{{ayCurrency TaxAViz}}{{ayCurrency TaxPaid}}{{ayCurrency TaxBViz}} {{ayCurrency LineTotalViz}}
{{ayT 'WorkOrderItemExpenses'}}: {{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\", \"NetValue\", \"TaxCodeTaxA\", \"TaxCodeTaxB\", \"LineTotal\", \"WorkOrderItemExpenses\", \"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 'WorkOrderItemExpenses'}}: {{Name}}{{ayCurrency ChargeAmount}}{{ayCurrency TaxAViz}}{{ayCurrency TaxPaid}}{{ayCurrency TaxBViz}} {{ayCurrency LineTotalViz}}
{{ayT 'WorkOrderItemExpenses'}}: {{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\", \"WorkOrderItemExpenses\", \"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