Files
raven/server/AyaNova/resource/rpt/stock-report-templates/Customer Quote w Travel Loan Item Expense Outside Service.ayrt
2023-03-06 22:32:24 +00:00

1 line
30 KiB
Plaintext

{"Name":"Customer Quote w Travel Loan Item Expense Outside Service","Active":true,"Notes":"\n","Roles":49514,"AType":27,"IncludeWoItemDescendants":false,"Template":"<html>\n\n<body>\n <div>\n {{#each ayReportData}}\n <!-- the #each aspect MUST encompass the section where the class is that forces page break -->\n <table class=\"singlePage\">\n <!-- the css to start a new page when a new object -->\n <thead>\n <!--table header will repeat on multiple pages if total thead content is less than 25% of page - IF NOT SHOWING ON 2nd PAGE of WO, is because is too high - note css -->\n\n {{#if ../ayServerMetaData.HasSmallLogo}}\n <!-- this displays if have uploaded small logo -->\n <tr class=\"reporttitle\">\n <th colspan=\"12\" class=\"leftlean\">{{ ayLogo \"small\" }}</th>\n <th colspan=\"4\"></th>\n <th colspan=\"4\" class=\"rightlean\">{{ayT 'Quote'}}</th>\n <td colspan=\"4\"> {{Serial}}</td>\n </tr>\n {{else}}\n <!-- else this displays if have do NOT have small logo -->\n <tr class=\"reporttitle\">\n <th colspan=\"12\" class=\"leftlean\">{{../ayServerMetaData.CompanyName}}</th>\n <th colspan=\"4\"></th>\n <th colspan=\"4\" class=\"rightlean\">{{ayT 'Quote'}}</th>\n <td colspan=\"4\">{{Serial}}</td>\n </tr>\n {{/if}}\n <!-- this closes this if/else statement -->\n <tr>\n <td colspan=\"24\">&nbsp;</td>\n </tr>\n <tr>\n <th colspan=\"24\" class=\"leftlean\">{{ayT 'Quote'}} prepared for:</th>\n </tr>\n <tr class=\"reporttitle\">\n <td colspan=\"1\"></td>\n <td colspan=\"23\">{{CustomerViz}}</td>\n </tr>\n <tr>\n <td colspan=\"1\">&nbsp;</td>\n <td colspan=\"15\">{{Address}}, {{City}}</td>\n <th colspan=\"4\" class=\"rightlean\">{{ayT 'QuotePreparedByID'}}</th>\n <td colspan=\"4\" class=\"rightlean\">{{PreparedByViz}}</td>\n </tr>\n <tr>\n <td colspan=\"1\">&nbsp;</td>\n <td colspan=\"15\">{{CustomerPhone1Viz}}</td>\n <th colspan=\"4\" class=\"rightlean\">{{ayT 'WorkOrderCustomerReferenceNumber'}}</th>\n <td colspan=\"4\" class=\"rightlean\">{{CustomerReferenceNumber}}</td>\n </tr>\n <tr>\n <td colspan=\"1\">&nbsp;</td>\n <td colspan=\"14\">{{CustomerEmailAddressViz}}</td>\n <td colspan=\"1\">&nbsp;</td>\n <th colspan=\"4\" class=\"rightlean\">{{ayT 'WorkOrderInternalReferenceNumber'}}</th>\n <td colspan=\"4\" class=\"rightlean\">{{InternalReferenceNumber}}</td>\n </tr>\n <tr>\n <td colspan=\"16\">&nbsp;</td>\n <th colspan=\"4\" class=\"rightlean\">{{ayT \"QuoteQuoteRequestDate\"}}</th>\n <td colspan=\"4\" class=\"rightlean\">{{ayDate Requested}}</td>\n </tr>\n <tr>\n <td colspan=\"1\">&nbsp;</td>\n <th colspan=\"14\" class=\"leftlean\">{{ayT 'WorkOrderSummary'}}</th>\n <td colspan=\"1\">&nbsp;</td>\n <th colspan=\"4\" class=\"rightlean\">{{ayT 'QuoteValidUntilDate'}}</th>\n <td colspan=\"4\" class=\"rightlean\">{{ayDate ValidUntil}}</td>\n </tr>\n <tr>\n <td colspan=\"1\">&nbsp;</td>\n <td colspan=\"22\">{{Notes}} </td>\n <td colspan=\"1\">&nbsp;</td>\n </tr>\n <tr>\n <td colspan=\"1\">&nbsp;</td>\n <th colspan=\"22\" class=\"leftlean\">{{ayT 'QuoteIntroduction'}}</th>\n <td colspan=\"1\">&nbsp;</td>\n \n </tr>\n <tr>\n <td colspan=\"1\">&nbsp;</td>\n <td colspan=\"22\">{{Introduction}}</td>\n <td colspan=\"1\">&nbsp;</td>\n </tr>\n <tr>\n <td colspan=\"24\">&nbsp;</td>\n </tr>\n </thead>\n\n <tbody>\n {{#each Items}}\n <tr>\n <th colspan=\"4\" class=\"leftlean\">{{ayT 'WorkOrderItemSummary'}} &#35;{{Sequence}}</th>\n <td colspan=\"20\">{{Notes}}</td>\n </tr>\n <tr>\n <th colspan=\"4\" class=\"leftlean\">{{ayT 'WorkOrderItemTechNotes'}}</th>\n <td colspan=\"20\">{{TechNotes}}</td>\n </tr>\n\n {{#each Units}}\n <tr>\n <td colspan=\"1\"></td>\n <th colspan=\"3\" class=\"leftlean\">{{ayT 'Unit'}}</th>\n <td colspan=\"20\">{{UnitViz}} - {{UnitModelNameViz}}</td>\n </tr>\n {{/each}}\n {{#if Units}}\n <tr>\n <td colspan=\"24\">&nbsp;</td>\n </tr>\n {{/if}}\n\n <tr>\n <td colspan=\"1\"></td>\n <th colspan=\"11\" class=\"leftlean\">{{ayT 'WorkOrderItemList'}}</th>\n <th colspan=\"2\">{{ayT 'WorkOrderItemPartQuantity'}}</th>\n <th colspan=\"2\">{{ayT 'Price'}}</th>\n <th colspan=\"2\">{{ayT 'NetPrice'}}</th>\n <th colspan=\"2\">{{ayT 'TaxCodeTaxA'}}</th>\n <th colspan=\"2\">{{ayT 'TaxCodeTaxB'}}</th>\n <th colspan=\"2\">{{ayT 'LineTotal'}}</th>\n </tr>\n\n {{#each Expenses}}\n {{#if ChargeToCustomer}}\n <tr>\n <!-- note the encompassing #each statement which only does this IF ChargeToCustomer is true-->\n <td colspan=\"1\">&nbsp;</td>\n <td colspan=\"11\"> {{ayT 'WorkOrderItemExpenseList'}}: {{Name}}</td>\n <!-- note too the custom Prepare function that WILL NOT include Expense charges in the Net Totals and Grand Total IF ChargeToCustomer is false -->\n <td colspan=\"2\" class=\"centerlean\"></td>\n <td colspan=\"2\" class=\"centerlean\"></td>\n <td colspan=\"2\" class=\"centerlean\">{{ayCurrency ChargeAmount}}</td>\n <!--this is the \"net\" charge -->\n <!--NOTE for tax lines below, checks to see if TaxCode selected. If true, displays derived, otherwise displays TaxPaid -->\n {{#if ChargeTaxCodeId}}<td colspan=\"2\" class=\"centerlean\">{{ayCurrency TaxAViz}}</td>{{else}} <td colspan=\"2\" class=\"centerlean\">{{ayCurrency TaxPaid}}</td>{{/if}}\n {{#if ChargeTaxCodeId}}<td colspan=\"2\" class=\"centerlean\">{{ayCurrency TaxBViz}}</td>{{else}} <td colspan=\"2\" class=\"centerlean\"> </td>{{/if}}\n <td colspan=\"2\" class=\"rightlean\">{{ayCurrency LineTotalViz}}</td>\n <!-- NOTE LineTotalViz is derived\n from (\"ChargeAmount\" + \"TaxPaid\") OR if there is a TaxCode selected, then is auto figured out from \"ChargeAmount\" + (TaxCodes% * ChargeAmount)-->\n </tr>{{else}} <tr>\n <td colspan=\"24\">{{ayT 'WorkOrderItemExpenseList'}}: {{Name}} at no charge to customer </td>\n </tr>{{/if}}\n {{/each}}\n {{#each Loans}}\n <tr>\n <td colspan=\"1\">&nbsp;</td>\n <td colspan=\"11\">{{ayT 'WorkOrderItemLoanList'}}: {{LoanUnitViz}} / {{UnitOfMeasureViz}}</td>\n <td colspan=\"2\" class=\"centerlean\">{{Quantity}}</td>\n <td colspan=\"2\" class=\"centerlean\">{{ayCurrency PriceViz}}</td>\n <td colspan=\"2\" class=\"centerlean\">{{ayCurrency NetViz}}</td>\n {{#if TaxAViz}}<td colspan=\"2\" class=\"centerlean\">{{ayCurrency TaxAViz}}</td>{{else}}<td colspan=\"2\" class=\"centerlean\">$0.00</td>{{/if}}\n {{#if TaxBViz}}<td colspan=\"2\" class=\"centerlean\">{{ayCurrency TaxBViz}}</td>{{else}}<td colspan=\"2\" class=\"centerlean\">{{ayCurrency 0.00}}</td>{{/if}}\n <td colspan=\"2\" class=\"rightlean\">{{ayCurrency LineTotalViz}}</td>\n </tr>\n {{/each}}\n {{#each Labors}}\n <tr>\n <td colspan=\"1\">&nbsp;</td>\n <td colspan=\"11\">{{ayT 'WorkOrderItemLaborList'}} performed {{ayDateTime ServiceStartDate}} with {{ayT 'WorkOrderItemLaborServiceRateID'}} of {{ServiceRateViz}}</td>\n <td colspan=\"2\" class=\"centerlean\">{{ServiceRateQuantity}}</td>\n <td colspan=\"2\" class=\"centerlean\">{{ayCurrency PriceViz}}</td>\n <td colspan=\"2\" class=\"centerlean\">{{ayCurrency NetViz}}</td>\n {{#if TaxAViz}}<td colspan=\"2\" class=\"centerlean\">{{ayCurrency TaxAViz}}</td>{{else}}<td colspan=\"2\" class=\"centerlean\">$0.00</td>{{/if}}\n {{#if TaxBViz}}<td colspan=\"2\" class=\"centerlean\">{{ayCurrency TaxBViz}}</td>{{else}}<td colspan=\"2\" class=\"centerlean\">$0.00</td>{{/if}}\n <td colspan=\"2\" class=\"rightlean\">{{ayCurrency LineTotalViz}}</td>\n </tr>\n {{/each}}\n {{#each Parts}}\n <tr>\n <td colspan=\"1\">&nbsp;</td>\n <td colspan=\"11\">{{ayT 'WorkOrderItemPartPartID'}}: {{PartNameViz}} {{PartDescriptionViz}}</td>\n <td colspan=\"2\" class=\"centerlean\">{{Quantity}}</td>\n <td colspan=\"2\" class=\"centerlean\">{{ayCurrency PriceViz}}</td>\n <td colspan=\"2\" class=\"centerlean\">{{ayCurrency NetViz}}</td>\n {{#if TaxAViz}}<td colspan=\"2\" class=\"centerlean\">{{ayCurrency TaxAViz}}</td>{{else}}<td colspan=\"2\" class=\"centerlean\">$0.00</td>{{/if}}\n {{#if TaxBViz}}<td colspan=\"2\" class=\"centerlean\">{{ayCurrency TaxBViz}}</td>{{else}}<td colspan=\"2\" class=\"centerlean\">$0.00</td>{{/if}}\n <td colspan=\"2\" class=\"rightlean\">{{ayCurrency LineTotalViz}}</td>\n </tr>\n {{/each}}\n {{#each Travels}}\n <tr>\n <td colspan=\"1\">&nbsp;</td>\n <td colspan=\"11\">{{ayT 'WorkOrderItemTravelList'}} performed {{ayDate TravelStartDate}} with {{ayT 'WorkOrderItemTravelServiceRateID'}} of {{TravelRateViz}}</td>\n <td colspan=\"2\" class=\"centerlean\">{{TravelRateQuantity}}</td>\n <td colspan=\"2\" class=\"centerlean\">{{ayCurrency PriceViz}}</td>\n <td colspan=\"2\" class=\"centerlean\">{{ayCurrency NetViz}}</td>\n {{#if TaxAViz}}<td colspan=\"2\" class=\"centerlean\">{{ayCurrency TaxAViz}}</td>{{else}}<td colspan=\"2\" class=\"centerlean\">$0.00</td>{{/if}}\n {{#if TaxBViz}}<td colspan=\"2\" class=\"centerlean\">{{ayCurrency TaxBViz}}</td>{{else}}<td colspan=\"2\" class=\"centerlean\">$0.00</td>{{/if}}\n <td colspan=\"2\" class=\"rightlean\">{{ayCurrency LineTotalViz}}</td>\n </tr>\n {{/each}}\n {{#each OutsideServices}}\n <tr>\n <td colspan=\"1\">&nbsp;</td>\n <td colspan=\"15\">{{ayT 'WorkOrderItemOutsideService'}} performed on Unit: {{UnitViz}}</td>\n <td colspan=\"2\" class=\"centerlean\">{{ayCurrency NetViz}}</td>\n {{#if TaxAViz}}<td colspan=\"2\" class=\"centerlean\">{{ayCurrency TaxAViz}}</td>{{else}}<td colspan=\"2\" class=\"centerlean\">$0.00</td>{{/if}}\n {{#if TaxBViz}}<td colspan=\"2\" class=\"centerlean\">{{ayCurrency TaxBViz}}</td>{{else}}<td colspan=\"2\" class=\"centerlean\">$0.00</td>{{/if}}\n <td colspan=\"2\" class=\"rightlean\">{{ayCurrency LineTotalViz}}</td>\n </tr>\n {{/each}}\n <tr>\n <td colspan=\"24\">&nbsp;</td>\n </tr>\n {{/each}}\n <tr>\n <td colspan=\"24\">&nbsp;</td>\n </tr>\n <tr>\n <th colspan=\"1\">Nets</th>\n <th colspan=\"2\">Labor</th>\n <th colspan=\"2\">Travel</th>\n <th colspan=\"2\">Parts</th>\n <th colspan=\"2\">Exp</th>\n <th colspan=\"2\">Loans</th>\n <th colspan=\"2\">Outside</th> \n <!-- <th colspan=\"14\" class=\"centerlean\"></th> comment above lines and uncomment this line if you do NOT want broken out-->\n <th colspan=\"3\" class=\"centerlean\">Total Nets</th>\n <th colspan=\"2\" class=\"centerlean\">Total TaxA</th>\n <th colspan=\"2\" class=\"centerlean\">Total TaxB</th>\n <th colspan=\"4\" class=\"rightlean \">Grand Total</th>\n </tr>\n <tr>\n <td colspan=\"1\"></td>\n <td colspan=\"2\">{{ayCurrency ThisWOAllLaborsNetViz}}</td>\n <td colspan=\"2\">{{ayCurrency ThisWOAllTravelsNetViz}}</td>\n <td colspan=\"2\">{{ayCurrency ThisWOAllPartsNetViz}}</td>\n <td colspan=\"2\">{{ayCurrency ThisWOAllExpsNetChargeAmount}}</td>\n <td colspan=\"2\">{{ayCurrency ThisWOAllLoansNetViz}}</td>\n <td colspan=\"2\">{{ayCurrency ThisWOAllOutsidesNetViz}}</td> \n <!-- <td colspan=\"14\"></td> comment above lines and uncomment this line if you do NOT want broken out-->\n <td colspan=\"3\" class=\"centerlean\">{{ayCurrency ThisWOTotalNets}}</td>\n {{#if ThisWOTotalTaxAs}}<td colspan=\"2\" class=\"centerlean\">{{ayCurrency ThisWOTotalTaxAs}}</td>{{else}}<td colspan=\"2\" class=\"centerlean\">$0.00</td>{{/if}}\n {{#if ThisWOTotalTaxBs}}<td colspan=\"2\" class=\"centerlean\">{{ayCurrency ThisWOTotalTaxBs}}</td>{{else}}<td colspan=\"2\" class=\"centerlean\">$0.00</td>{{/if}}\n <td colspan=\"4\" class=\"rightlean \">{{ayCurrency ThisWOTotalGrand}}</td>\n </tr>\n\n\n <tr>\n <td colspan=\"24\">&nbsp;</td>\n </tr>\n <tr>\n <th colspan=\"24\">Thank you for your business!</th>\n </tr>\n <tr>\n <th colspan=\"24\">If any questions about this price quote, please contact {{../ayServerMetaData.CompanyPhone1}} referencing {{ayT 'Quote'}} {{Serial}}</th>\n </tr>\n\n {{/each}}\n </div>\n </tbody>\n </table>\n\n\n\n</body>\n\n</html>","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\", \"WorkOrderItemPartList\", \"WorkOrderItemLaborList\", \"WorkOrderItemList\", \"QuoteIntroduction\", \"WorkOrderSummary\", \"QuotePreparedByID\", \"WorkOrderInternalReferenceNumber\", \"WorkOrderCustomerReferenceNumber\", \"QuoteDateSubmitted\", \"QuoteDateApproved\", \"QuoteValidUntilDate\", \"QuoteQuoteRequestDate\", \"Unit\", \"WorkOrderItemSummary\", \"WorkOrderItemTechNotes\", \"WorkOrderItemPartQuantity\", \"Price\", \"NetPrice\", \"TaxCodeTaxA\", \"TaxCodeTaxB\", \"LineTotal\", \"Total\", \"WorkOrderItemPartPartID\", \"WorkOrderItemLaborServiceRateID\", \"WorkOrderItemTravelList\", \"WorkOrderItemTravelServiceRateID\", \"WorkOrderItemExpenseList\", \"WorkOrderItemLoanList\", \"WorkOrderItemOutsideService\" ]);\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":"","RenderType":0,"HeaderTemplate":"<span>&nbsp;</span>","FooterTemplate":"<span style=\"font-size:6pt;width: 100%; text-align:left; \">&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;Printed date:&nbsp;<span class=\"date\"></span></span>\n<span style=\"font-size:6pt;width: 96%; text-align: right; \">&nbsp;&nbsp;&nbsp;Page&nbsp;<span class=\"pageNumber\"></span>&nbsp;of&nbsp;<span class=\"totalPages\"></span>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;</span>","DisplayHeaderFooter":false,"PaperFormat":10,"Landscape":false,"MarginOptionsBottom":"15mm","MarginOptionsLeft":"15mm","MarginOptionsRight":"10mm","MarginOptionsTop":"10mm","PageRanges":null,"PreferCSSPageSize":false,"PrintBackground":true,"Scale":1.00000}