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 new file mode 100644 index 00000000..8aa3cdbf --- /dev/null +++ b/server/AyaNova/resource/rpt/stock-report-templates/Charges Summary Grouped By Customer.ayrt @@ -0,0 +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 (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 (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 (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 (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 (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 (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 (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 (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 (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":"//Register custom Handlebars helpers here to use in your report script\n//https://handlebarsjs.com/guide/#custom-helpers\nHandlebars.registerHelper('loud', function (aString) {\n return aString.toUpperCase()\n})","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/Clients list.ayrt b/server/AyaNova/resource/rpt/stock-report-templates/Clients list.ayrt index d13cb9ec..c73a0e4e 100644 --- a/server/AyaNova/resource/rpt/stock-report-templates/Clients list.ayrt +++ b/server/AyaNova/resource/rpt/stock-report-templates/Clients list.ayrt @@ -1 +1 @@ -{"Name":"Clients list","Active":true,"Notes":"","Roles":50538,"AType":8,"IncludeWoItemDescendants":false,"Template":"\n\n\n
\n
\n

{{ayT 'CustomerList'}} List

\n
\n\n \n\n \n \n\n \n {{#each ayReportData}}\n \n \n \n \n \n \n \n \n \n {{#if LastServiceDateViz}}{{else}}{{/if}}\n \n \n \n \n \n \n \n \n \n \n \n {{#if BillHeadOffice}}\n \n \n \n \n {{else}}{{/if}}\n {{#if ContractViz}}\n \n \n \n \n {{else}}{{/if}}\n {{#if AlertNotes}}\n \n \n \n \n {{else}}{{/if}}\n {{#if TechNotes}}\n \n \n \n \n {{else}}{{/if}}\n\n \n \n \n\n {{/each}}\n \n\n \n \n\n
{{ayT 'Customer'}}:{{Name}} 
{{ayT 'CustomerAccountNumber'}}:{{AccountNumber}}{{ayT 'LastServiceWorkOrder'}}:#{{LastWorkOrderViz}} on {{ayDateTime LastServiceDateViz}}
{{ayT 'CustomerPhone1'}}:{{Phone1}}{{ayT 'CustomerEmail'}}:{{EmailAddress}}
{{ayT 'AddressTypePhysical'}}:{{Address}} {{City}}, {{Region}}
{{ayT 'CustomerBillHeadOffice'}}:{{HeadOfficeViz}}
{{ayT 'Contract'}}:{{ContractViz}} Expires: {{ContractExpires}}
{{ayT 'CustomerAlertNotes'}}:{{AlertNotes}} Expires: {{ContractExpires}}
{{ayT 'CustomerTechNotes'}}:{{TechNotes}}
 
\n\n\n
\n\n\n","Style":"body {\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: 20px;\r\n font-size: 10pt; \r\n color: #9e9e9e;\r\n text-align: right;\r\n}\r\n\r\n.lrgtext {\r\n height: 20px;\r\n font-size: 10pt; \r\n}\r\n\r\ntbody td {\r\n padding: 10px;\r\n word-wrap: break-word;\r\n font-size: 8pt;\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 font-size: 16pt;\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":" \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\nasync function ayPrepareData(ayData) { \n\n await ayGetTranslations([ \"Name\", \"CustomerList\", \"Customer\", \"CustomerAccountNumber\", \"CustomerBillHeadOffice\", \"AddressTypePhysical\", \"CustomerPhone1\", \"CustomerEmail\", \"ContractExpires\", \"Contract\", \"LastServiceWorkOrder\", \"CustomerAlertNotes\", \"CustomerTechNotes\" ]);\n\n \n return ayData;\n}","JsHelpers":"//Register custom Handlebars helpers here to use in your report script\r\n//https://handlebarsjs.com/guide/#custom-helpers","RenderType":0,"HeaderTemplate":"  ","FooterTemplate":"                Printed date: PDFDate\nPage of                ","DisplayHeaderFooter":true,"PaperFormat":0,"Landscape":false,"MarginOptionsBottom":"15mm","MarginOptionsLeft":"20mm","MarginOptionsRight":"20mm","MarginOptionsTop":"10mm","PageRanges":null,"PreferCSSPageSize":false,"PrintBackground":true,"Scale":1.00000} \ No newline at end of file +{"Name":"Clients list","Active":true,"Notes":"","Roles":124415,"AType":8,"IncludeWoItemDescendants":false,"Template":"\n\n\n
\n
\n

{{ayT 'CustomerList'}} List

\n
\n\n \n\n \n \n\n \n {{#each ayReportData}}\n \n \n \n \n \n \n \n \n \n {{#if LastServiceDateViz}}{{else}}{{/if}}\n \n \n \n \n \n \n \n \n \n \n \n {{#if BillHeadOffice}} \n \n \n \n \n {{else}}{{/if}} \n {{#if ContractViz}}\n \n \n \n \n {{else}}{{/if}}\n {{#if AlertNotes}}\n \n \n \n \n {{else}}{{/if}}\n {{#if TechNotes}}\n \n \n \n \n {{else}}{{/if}}\n\n \n \n \n\n {{/each}}\n \n\n \n \n\n
{{ayT 'Customer'}}:{{Name}} 
{{ayT 'CustomerAccountNumber'}}:{{AccountNumber}}{{ayT 'LastServiceWorkOrder'}}:#{{LastWorkOrderViz}} on {{ayDateTime LastServiceDateViz}}
{{ayT 'CustomerPhone1'}}:{{Phone1}}{{ayT 'CustomerEmail'}}:{{EmailAddress}}
{{ayT 'AddressTypePhysical'}}:{{Address}} {{City}}, {{Region}}
{{ayT 'CustomerBillHeadOffice'}}:{{HeadOfficeViz}}
{{ayT 'Contract'}}:{{ContractViz}} Expires: {{ContractExpires}}
{{ayT 'CustomerAlertNotes'}}:{{AlertNotes}} Expires: {{ContractExpires}}
{{ayT 'CustomerTechNotes'}}:{{TechNotes}}
 
\n\n\n
\n\n\n","Style":"body {\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: 20px;\r\n font-size: 10pt; \r\n color: #9e9e9e;\r\n text-align: right;\r\n}\r\n\r\n.lrgtext {\r\n height: 20px;\r\n font-size: 10pt; \r\n}\r\n\r\ntbody td {\r\n padding: 10px;\r\n word-wrap: break-word;\r\n font-size: 8pt;\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 font-size: 16pt;\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":" \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\nasync function ayPrepareData(ayData) { \n\n await ayGetTranslations([ \"Name\", \"CustomerList\", \"Customer\", \"CustomerAccountNumber\", \"CustomerBillHeadOffice\", \"AddressTypePhysical\", \"CustomerPhone1\", \"CustomerEmail\", \"ContractExpires\", \"Contract\", \"LastServiceWorkOrder\", \"CustomerAlertNotes\", \"CustomerTechNotes\" ]);\n\n \n return ayData;\n}","JsHelpers":"//Register custom Handlebars helpers here to use in your report script\r\n//https://handlebarsjs.com/guide/#custom-helpers","RenderType":0,"HeaderTemplate":"  ","FooterTemplate":"                Printed date: PDFDate\nPage of                ","DisplayHeaderFooter":true,"PaperFormat":0,"Landscape":false,"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/Contacts list.ayrt b/server/AyaNova/resource/rpt/stock-report-templates/Contacts list.ayrt index 754576af..81cb3373 100644 --- a/server/AyaNova/resource/rpt/stock-report-templates/Contacts list.ayrt +++ b/server/AyaNova/resource/rpt/stock-report-templates/Contacts list.ayrt @@ -1 +1 @@ -{"Name":"Contacts list","Active":true,"Notes":"HTML example of using multiple nested #if else statements for display of value","Roles":50538,"AType":3,"IncludeWoItemDescendants":false,"Template":"\n\n\n
\n
\n

{{ayT 'UserList'}} & {{ayT 'Contacts'}} List

\n
\n\n \n \n \n \n \n \n \n \n \n \n\n \n {{#each ayReportData}}\n \n \n \n {{#if CustomerViz}}{{else}} {{#if HeadOfficeViz}}{{else}}{{/if}}{{/if}}\n \n \n \n \n {{/each}}\n \n\n \n \n\n
{{ayT 'Name'}} & {{ayT 'UserType'}} {{ayT 'LastLogin'}}{{ayT 'UserPhone1'}}{{ayT 'UserEmailAddress'}}
{{Name}}Customer: {{CustomerViz}}Headoffice: {{HeadOfficeViz}}Employee: {{UserTypeViz}}{{ayDateTime LastLogin}}{{UserOptions.Phone1}}{{UserOptions.EmailAddress}}
\n\n\n\n
\n\n\n","Style":"body {\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: 20px;\r\n font-size: 10pt; \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: 8pt;\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 font-size: 16pt;\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":" \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\nasync function ayPrepareData(ayData) { \n\n await ayGetTranslations([ \"UserList\", \"Contacts\", \"UserType\", \"User\", \"Contact\", \"Name\", \"Customer\", \"HeadOffice\", \"User\", \"LastLogin\", \"UserPhone1\", \"UserEmailAddress\" ]);\n\n \n return ayData;\n}","JsHelpers":"//Register custom Handlebars helpers here to use in your report script\r\n//https://handlebarsjs.com/guide/#custom-helpers","RenderType":0,"HeaderTemplate":"  ","FooterTemplate":"                Printed date: PDFDate\nPage of                ","DisplayHeaderFooter":true,"PaperFormat":0,"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":"Contacts list","Active":true,"Notes":"HTML example of using multiple nested #if else statements for display of value","Roles":50538,"AType":3,"IncludeWoItemDescendants":false,"Template":"\n\n\n
\n
\n

{{ayT 'UserList'}} & {{ayT 'Contacts'}} List

\n
\n\n \n \n \n \n \n \n \n \n \n \n\n \n {{#each ayReportData}}\n \n \n \n {{#if CustomerViz}}{{else}} {{#if HeadOfficeViz}}{{else}}{{/if}}{{/if}}\n \n \n \n \n {{/each}}\n \n\n \n \n\n
{{ayT 'Name'}} & {{ayT 'UserType'}} {{ayT 'LastLogin'}}{{ayT 'UserPhone1'}}{{ayT 'UserEmailAddress'}}
{{Name}}Customer: {{CustomerViz}}Headoffice: {{HeadOfficeViz}}Employee: {{UserTypeViz}}{{ayDateTime LastLogin}}{{UserOptions.Phone1}}{{UserOptions.EmailAddress}}
\n\n
\n\n\n","Style":"body {\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: 20px;\r\n font-size: 10pt; \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: 8pt;\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 font-size: 16pt;\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":" \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\nasync function ayPrepareData(ayData) { \n\n await ayGetTranslations([ \"UserList\", \"Contacts\", \"UserType\", \"Contact\", \"Name\", \"Customer\", \"HeadOffice\", \"User\", \"LastLogin\", \"UserPhone1\", \"UserEmailAddress\" ]);\n\n \n return ayData;\n}","JsHelpers":"//Register custom Handlebars helpers here to use in your report script\r\n//https://handlebarsjs.com/guide/#custom-helpers","RenderType":0,"HeaderTemplate":"  ","FooterTemplate":"                Printed date: PDFDate\nPage of                ","DisplayHeaderFooter":true,"PaperFormat":0,"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/Contracts list.ayrt b/server/AyaNova/resource/rpt/stock-report-templates/Contracts list.ayrt index 963c419d..0824de16 100644 --- a/server/AyaNova/resource/rpt/stock-report-templates/Contracts list.ayrt +++ b/server/AyaNova/resource/rpt/stock-report-templates/Contracts list.ayrt @@ -1 +1 @@ -{"Name":"Contracts list","Active":true,"Notes":"","Roles":50554,"AType":10,"IncludeWoItemDescendants":false,"Template":"\n\n\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 {{#if ContractPartOverrideItems}}\n {{#each ContractPartOverrideItems}}\n \n \n \n \n {{/each}}\n {{else}}\n \n \n \n \n {{/if}}\n \n \n \n\n \n \n \n \n {{#if ContractServiceRateOverrideItems}}\n {{#each ContractServiceRateOverrideItems}}\n \n \n \n \n {{/each}}\n {{else}}\n \n \n \n \n {{/if}}\n {{#if ContractServiceRatesOnly}}\n \n \n \n \n {{else}} \n \n \n \n \n {{/if}}\n \n \n \n\n \n \n \n \n {{#if ContractTravelRateOverrideItems}}\n {{#each ContractTravelRateOverrideItems}}\n \n \n \n \n {{/each}}\n {{else}}\n \n \n \n \n {{/if}}\n \n {{#if ContractTravelRatesOnly}} \n \n \n \n \n {{else}} \n \n \n \n \n {{/if}}\n \n \n \n \n \n
{{ayT 'ContractName'}}:{{Name}}
 
{{ayT 'ContractDefaultResponseTime'}}:{{ResponseTimeViz}}
{{ayT 'AlertNotes'}}:{{AlertNotes}}
{{ayT 'ContractNotes'}}:{{Notes}}
{{ayT 'PartList'}} {{ayT 'ContractDefaultAdjustments'}}:{{PartsOverridePct}}% {{PartsOverrideTypeViz}}
Additional {{ayT 'ContractTaggedAdjustments'}}:If part sold to customer tagged with "{{Tags}}" adjust {{OverridePct}}% {{OverrideTypeViz}}
Additional {{ayT 'ContractTaggedAdjustments'}}:None
 
{{ayT 'ServiceRate'}} {{ayT 'ContractDefaultAdjustments'}}:{{ServiceRatesOverridePct}}% {{ServiceRatesOverrideTypeViz}}
Additional {{ayT 'ContractTaggedAdjustments'}}:If service charged to customer with this contract is tagged with "{{Tags}}" adjust {{OverridePct}}% {{OverrideTypeViz}}
Additional {{ayT 'ContractTaggedAdjustments'}}:None
{{ayT 'ContractServiceRatesOnly'}}:{{#each ServiceRateItems}}{{ServiceRateViz}}, {{/each}}
{{ayT 'ServiceRateList'}}:{{#each ServiceRateItems}}{{ServiceRateViz}}, {{/each}}
 
{{ayT 'TravelRate'}} {{ayT 'ContractDefaultAdjustments'}}:{{TravelRatesOverridePct}}% {{TravelRatesOverrideTypeViz}}
Additional {{ayT 'ContractTaggedAdjustments'}}:If travel charged to customer with this contract is tagged with "{{Tags}}" adjust {{OverridePct}}% {{OverrideTypeViz}}
Additional {{ayT 'ContractTaggedAdjustments'}}:None
{{ayT 'ContractTravelRatesOnly'}}:{{#each TravelRateItems}}{{TravelRateViz}}, {{/each}}
{{ayT 'TravelRateList'}}:{{#each TravelRateItems}}{{TravelRateViz}}, {{/each}}
\n {{/each}}\n\n
\n\n\n","Style":"body {\r\n font-family: 'Helvetica', 'Helvetica Neue', Arial, sans-serif; \r\n}\r\n\r\n.singlePage\r\n{\r\npage-break-after: always;\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\n.bigFont{\r\n font-size: 13pt; \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 color: #9e9e9e;\r\n text-align: right;\r\n font-size: 10pt;\r\n}\r\n\r\ntbody td {\r\n padding: 5px;\r\n/* word-wrap: break-word; */\r\n font-size: 9pt;\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 font-size: 16pt;\r\n}\r\n.fontblue {\r\n color: blue;\r\n}\r\n.fontred {\r\n color:red;\r\n}","JsPrerender":"async function ayPrepareData(ayData){ \n\n await ayGetTranslations([\"ContractRateList\", \"ContractName\", \"ContractNotes\", \"AlertNotes\", \"Tags\", \"ContractDefaultResponseTime\", \"ContractDefaultAdjustments\", \"ContractTaggedAdjustments\", \"ContractServiceRatesOnly\", \"ContractTravelRatesOnly\", \"ContractDiscountParts\", \"PartList\", \"ServiceRateList\", \"TravelRateList\", \"TravelRate\", \"ServiceRate\" ]);\n\n return ayData;\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":"Contracts list","Active":true,"Notes":"","Roles":50554,"AType":10,"IncludeWoItemDescendants":false,"Template":"\n\n\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 {{#if ContractPartOverrideItems}}\n {{#each ContractPartOverrideItems}}\n \n \n \n \n {{/each}}\n {{else}}\n \n \n \n \n {{/if}}\n \n \n \n\n \n \n \n \n {{#if ContractServiceRateOverrideItems}}\n {{#each ContractServiceRateOverrideItems}}\n \n \n \n \n {{/each}}\n {{else}}\n \n \n \n \n {{/if}}\n {{#if ContractServiceRatesOnly}}\n \n \n \n \n {{else}} \n \n \n \n \n {{/if}}\n \n \n \n\n \n \n \n \n {{#if ContractTravelRateOverrideItems}}\n {{#each ContractTravelRateOverrideItems}}\n \n \n \n \n {{/each}}\n {{else}}\n \n \n \n \n {{/if}}\n \n {{#if ContractTravelRatesOnly}} \n \n \n \n \n {{else}} \n \n \n \n \n {{/if}}\n \n \n \n \n \n
{{ayT 'ContractName'}}:{{Name}}
 
{{ayT 'ContractDefaultResponseTime'}}:{{ResponseTimeViz}}
{{ayT 'AlertNotes'}}:{{AlertNotes}}
{{ayT 'ContractNotes'}}:{{Notes}}
{{ayT 'PartList'}} {{ayT 'ContractDefaultAdjustments'}}:{{PartsOverridePct}}% {{PartsOverrideTypeViz}}
Additional {{ayT 'ContractTaggedAdjustments'}}:If part sold to customer tagged with "{{Tags}}" adjust {{OverridePct}}% {{OverrideTypeViz}}
Additional {{ayT 'ContractTaggedAdjustments'}}:None
 
{{ayT 'ServiceRate'}} {{ayT 'ContractDefaultAdjustments'}}:{{ServiceRatesOverridePct}}% {{ServiceRatesOverrideTypeViz}}
Additional {{ayT 'ContractTaggedAdjustments'}}:If service charged to customer with this contract is tagged with "{{Tags}}" adjust {{OverridePct}}% {{OverrideTypeViz}}
Additional {{ayT 'ContractTaggedAdjustments'}}:None
{{ayT 'ContractServiceRatesOnly'}}:{{#each ServiceRateItems}}{{ServiceRateViz}}, {{/each}}
{{ayT 'ServiceRateList'}}:{{#each ServiceRateItems}}{{ServiceRateViz}}, {{/each}}
 
{{ayT 'TravelRate'}} {{ayT 'ContractDefaultAdjustments'}}:{{TravelRatesOverridePct}}% {{TravelRatesOverrideTypeViz}}
Additional {{ayT 'ContractTaggedAdjustments'}}:If travel charged to customer with this contract is tagged with "{{Tags}}" adjust {{OverridePct}}% {{OverrideTypeViz}}
Additional {{ayT 'ContractTaggedAdjustments'}}:None
{{ayT 'ContractTravelRatesOnly'}}:{{#each TravelRateItems}}{{TravelRateViz}}, {{/each}}
{{ayT 'TravelRateList'}}:{{#each TravelRateItems}}{{TravelRateViz}}, {{/each}}
\n {{/each}}\n\n
\n\n\n","Style":"body {\r\n font-family: 'Helvetica', 'Helvetica Neue', Arial, sans-serif; \r\n}\r\n\r\n.singlePage\r\n{\r\npage-break-after: always;\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\n.bigFont{\r\n font-size: 13pt; \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 color: #9e9e9e;\r\n text-align: right;\r\n font-size: 10pt;\r\n}\r\n\r\ntbody td {\r\n padding: 5px;\r\n font-size: 9pt;\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 font-size: 16pt;\r\n}\r\n.fontblue {\r\n color: blue;\r\n}\r\n.fontred {\r\n color:red;\r\n}","JsPrerender":"async function ayPrepareData(ayData){ \n\n await ayGetTranslations([\"ContractRateList\", \"ContractName\", \"ContractNotes\", \"AlertNotes\", \"Tags\", \"ContractDefaultResponseTime\", \"ContractDefaultAdjustments\", \"ContractTaggedAdjustments\", \"ContractServiceRatesOnly\", \"ContractTravelRatesOnly\", \"ContractDiscountParts\", \"PartList\", \"ServiceRateList\", \"TravelRateList\", \"TravelRate\", \"ServiceRate\" ]);\n\n return ayData;\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/Customer Invoice.ayrt b/server/AyaNova/resource/rpt/stock-report-templates/Customer Invoice.ayrt new file mode 100644 index 00000000..5c48b12f --- /dev/null +++ b/server/AyaNova/resource/rpt/stock-report-templates/Customer Invoice.ayrt @@ -0,0 +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":"/* if not using a rule set or specific property it is recommended to comment out or delete fully for report performance*/\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\", \"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 (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 (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 (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 (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 (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 (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 (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 (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 && !isNaN(parsedDate))) {\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 Notes.ayrt b/server/AyaNova/resource/rpt/stock-report-templates/Customer Notes.ayrt index be870570..fc05f1d1 100644 --- a/server/AyaNova/resource/rpt/stock-report-templates/Customer Notes.ayrt +++ b/server/AyaNova/resource/rpt/stock-report-templates/Customer Notes.ayrt @@ -1 +1 @@ -{"Name":"Customer Notes","Active":true,"Notes":"","Roles":50538,"AType":59,"IncludeWoItemDescendants":false,"Template":"\n\n\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 {{#each items}}\n\n \n \n \n \n \n \n {{/each}}\n\n \n\n \n \n {{/each}}\n
{{ayT 'CustomerNoteList'}} for {{ayT 'Customer'}}:{{group}}
 
Who entered:{{ayT 'CustomerNoteNoteDate'}}{{ayT 'Tags'}}{{ayT 'CustomerNoteList'}}
 
{{UserViz}}{{ayDateTime NoteDate}}{{Tags}}{{Notes}}
\n\n \n\n\n
\n\n\n","Style":"body {\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: 20px;\r\n font-size: 10pt; \r\n color: #9e9e9e;\r\n\r\n}\r\n\r\ntbody td {\r\n padding: 10px;\r\n word-wrap: break-word;\r\n font-size: 8pt;\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 font-size: 16pt;\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":" \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\nasync function ayPrepareData(ayData) { \n\n await ayGetTranslations([ \"CustomerNoteNotes\", \"CustomerNoteList\", \"Customer\", \"CustomerNoteNoteDate\", \"Tags\" ]);\n\n ayData.ayReportData = ayGroupByKey(ayData.ayReportData, 'CustomerViz')\n \n return ayData;\n}","JsHelpers":"//Register custom Handlebars helpers here to use in your report script\r\n//https://handlebarsjs.com/guide/#custom-helpers","RenderType":0,"HeaderTemplate":"  ","FooterTemplate":"                Printed date: PDFDate\nPage of                ","DisplayHeaderFooter":true,"PaperFormat":0,"Landscape":false,"MarginOptionsBottom":"15mm","MarginOptionsLeft":"20mm","MarginOptionsRight":"20mm","MarginOptionsTop":"10mm","PageRanges":null,"PreferCSSPageSize":false,"PrintBackground":true,"Scale":1.00000} \ No newline at end of file +{"Name":"Customer Notes","Active":true,"Notes":"Uses custom Prepare ayGroupByKey to group by the customer","Roles":50538,"AType":59,"IncludeWoItemDescendants":false,"Template":"\n\n\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 {{#each items}}\n\n \n \n \n \n \n \n {{/each}}\n\n \n\n \n \n {{/each}}\n
{{ayT 'CustomerNoteList'}} for {{ayT 'Customer'}}:{{group}}
 
Who entered:{{ayT 'CustomerNoteNoteDate'}}{{ayT 'Tags'}}{{ayT 'CustomerNoteList'}}
 
{{UserViz}}{{ayDateTime NoteDate}}{{Tags}}{{Notes}}
\n\n \n\n\n
\n\n\n","Style":"body {\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: 20px;\r\n font-size: 10pt; \r\n color: #9e9e9e;\r\n\r\n}\r\n\r\ntbody td {\r\n padding: 10px;\r\n word-wrap: break-word;\r\n font-size: 8pt;\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 font-size: 16pt;\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":" \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\nasync function ayPrepareData(ayData) { \n\n await ayGetTranslations([ \"CustomerNoteNotes\", \"CustomerNoteList\", \"Customer\", \"CustomerNoteNoteDate\", \"Tags\" ]);\n\n ayData.ayReportData = ayGroupByKey(ayData.ayReportData, 'CustomerViz')\n \n return ayData;\n}","JsHelpers":"//Register custom Handlebars helpers here to use in your report script\r\n//https://handlebarsjs.com/guide/#custom-helpers","RenderType":0,"HeaderTemplate":"  ","FooterTemplate":"                Printed date: PDFDate\nPage of                ","DisplayHeaderFooter":true,"PaperFormat":0,"Landscape":false,"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/Customer Quote.ayrt b/server/AyaNova/resource/rpt/stock-report-templates/Customer Quote.ayrt new file mode 100644 index 00000000..0f977d4a --- /dev/null +++ b/server/AyaNova/resource/rpt/stock-report-templates/Customer Quote.ayrt @@ -0,0 +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 \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 'QuoteDateSubmitted'}}{{ayDate Submitted}}
 {{Notes}} {{ayT 'QuoteValidUntilDate'}}{{ayDate ValidUntil}}
 {{ayT 'QuoteIntroduction'}}{{ayT 'QuoteDateApproved'}} {{ayDate Approved}}
 {{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":"/* if not using a rule set or specific property it is recommended to comment out or delete fully for report performance*/\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: 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 (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 (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 (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 (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 Service Requests grouped by Customer.ayrt b/server/AyaNova/resource/rpt/stock-report-templates/Customer Service Requests grouped by Customer.ayrt index 3ae96a6f..472e702f 100644 --- a/server/AyaNova/resource/rpt/stock-report-templates/Customer Service Requests grouped by Customer.ayrt +++ b/server/AyaNova/resource/rpt/stock-report-templates/Customer Service Requests grouped by Customer.ayrt @@ -1 +1 @@ -{"Name":"Customer Service Requests grouped by Customer","Active":true,"Notes":"","Roles":50666,"AType":54,"IncludeWoItemDescendants":false,"Template":"\n\n\n\t
\n\t\t
\n\t\t\t

{{ayT 'CustomerServiceRequestList'}} grouped by {{ayT 'Customer'}}

\n\t\t
\n\t\t\n\t\t\t\n\t\t\t\n\n\t\t\t\n\t\t\t\t{{#each ayReportData}}\n\t\t\t\t\n\t\t\t\t\t\n\t\t\t\t\t\n\t\t\t\t\n\t\t\t\t\n\t\t\t\t\t\n\t\t\t\t\t\n\t\t\t\t\t\n\t\t\t\t\t\n\t\t\t\t\t\n\t\t\t\t\t\n\t\t\t\t\n\t\t\t\t{{#each items}}\n\t\t\t\t\n\t\t\t\t\t\n\t\t\t\t\t\n\t\t\t\t\t{{#if_eq Status \"0\"}}{{else}}{{/if_eq}}\n\t\t\t\t\t\n\t\t\t\t\t{{#if WorkOrderSerialViz}}{{else}}{{/if}}\n\t\t\t\t\t\n\t\t\t\t\n\t\t\t\t{{/each}}\n\t\t\t\t\n\t\t\t\t\t\n\t\t\t\t\n\t\t\t\t\n\t\t\t\t\t\n\t\t\t\t\n\t\t\t\t\n\t\t\t\t{{/each}}\n\t\t\t\n\t\t
{{ayT 'Customer'}}: {{group}}
 Date Requested{{ayT 'CustomerServiceRequestStatus'}}{{ayT 'CustomerServiceRequestPriority'}}{{ayT 'WorkOrder'}}{{ayT 'CustomerServiceRequestRequestedBy'}}
 {{ayDateTime DateRequested}}{{StatusViz}}{{StatusViz}}{{PriorityViz}}{{WorkOrderSerialViz}}Not yet assigned{{RequestedByUserViz}}
{{count}} {{ayT 'CustomerServiceRequestList'}} for {{ayT 'Customer'}} {{group}}
 
\n\t
\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.bigfont {\r\n font-size: 13pt;\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; /* the # of columns set in the first row of the thead will be fixed and applied throughout table and rows */\r\n }\r\n\r\nth {\r\n height: 10px;\r\n font-size: 11pt; \r\n color: #9e9e9e;\r\n \r\n}\r\n\r\ntbody td {\r\n padding: 5px;\r\n word-wrap: break-word;\r\n font-size: 10pt;\r\n text-align: center;\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 font-size: 16pt;\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(ayData) {\n\n //send the raw report data to the groupByKey function which will return a new array grouped by the key name provided\n ayData.ayReportData = ayGroupByKey(ayData.ayReportData, 'CustomerViz')\n\n await ayGetTranslations([\"CustomerServiceRequestList\", \"Customer\", \"CustomerServiceRequestRequestedBy\", \"WorkOrder\", \"CustomerServiceRequestPriority\", \"CustomerServiceRequestStatus\" ]);\n\n\n //return the data into the pipeline to send to the report template\n return ayData;\n}","JsHelpers":"//custom helper so can do a direct comparison - i.e. if value equals xxxx, then show, else show yyyyy\r\n//note that this HAS to be added here in Helpers, is NOT built in\r\nHandlebars.registerHelper('if_eq', function(a, b, opts) {\r\n if(a == b) // Or === depending on your needs\r\n return opts.fn(this);\r\n else\r\n return opts.inverse(this);\r\n});\r\n","RenderType":0,"HeaderTemplate":"  ","FooterTemplate":"                Printed date: PDFDate\nPage of                ","DisplayHeaderFooter":true,"PaperFormat":10,"Landscape":true,"MarginOptionsBottom":"20mm","MarginOptionsLeft":"20mm","MarginOptionsRight":"15mm","MarginOptionsTop":"10mm","PageRanges":null,"PreferCSSPageSize":false,"PrintBackground":true,"Scale":1.00000} \ No newline at end of file +{"Name":"Customer Service Requests grouped by Customer","Active":true,"Notes":"","Roles":50666,"AType":54,"IncludeWoItemDescendants":false,"Template":"\n\n\n\t
\n\t\t
\n\t\t\t

{{ayT 'CustomerServiceRequestList'}} grouped by {{ayT 'Customer'}}

\n\t\t
\n\t\t\n\t\t\t\n\t\t\t\n\n\t\t\t\n\t\t\t\t{{#each ayReportData}}\n\t\t\t\t\n\t\t\t\t\t\n\t\t\t\t\t\n\t\t\t\t\n\t\t\t\t\n\t\t\t\t\t\n\t\t\t\t\t\n\t\t\t\t\t\n\t\t\t\t\t\n\t\t\t\t\t\n\t\t\t\t\t\n\t\t\t\t\n\t\t\t\t{{#each items}}\n\t\t\t\t\n\t\t\t\t\t\n\t\t\t\t\t\n\t\t\t\t\t{{#if_eq Status \"0\"}}{{else}}{{/if_eq}} \n\t\t\t\t\t\n\t\t\t\t\t{{#if WorkOrderSerialViz}}{{else}}{{/if}}\n\t\t\t\t\t\n\t\t\t\t\n\t\t\t\t{{/each}}\n\t\t\t\t\n\t\t\t\t\t\n\t\t\t\t\n\t\t\t\t\n\t\t\t\t\t\n\t\t\t\t\n\t\t\t\t\n\t\t\t\t{{/each}}\n\t\t\t\n\t\t
{{ayT 'Customer'}}: {{group}}
 Date Requested{{ayT 'CustomerServiceRequestStatus'}}{{ayT 'CustomerServiceRequestPriority'}}{{ayT 'WorkOrder'}}{{ayT 'CustomerServiceRequestRequestedBy'}}
 {{ayDateTime DateRequested}}{{StatusViz}}{{StatusViz}}{{PriorityViz}}{{WorkOrderSerialViz}}Not yet assigned{{RequestedByUserViz}}
{{count}} {{ayT 'CustomerServiceRequestList'}} for {{ayT 'Customer'}} {{group}}
 
\n\t
\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.bigfont {\r\n font-size: 13pt;\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: 10px;\r\n font-size: 11pt; \r\n color: #9e9e9e;\r\n \r\n}\r\n\r\ntbody td {\r\n padding: 5px;\r\n word-wrap: break-word;\r\n font-size: 10pt;\r\n text-align: center;\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 font-size: 16pt;\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(ayData) {\n\n //send the raw report data to the groupByKey function which will return a new array grouped by the key name provided\n ayData.ayReportData = ayGroupByKey(ayData.ayReportData, 'CustomerViz')\n\n await ayGetTranslations([\"CustomerServiceRequestList\", \"Customer\", \"CustomerServiceRequestRequestedBy\", \"WorkOrder\", \"CustomerServiceRequestPriority\", \"CustomerServiceRequestStatus\" ]);\n\n\n //return the data into the pipeline to send to the report template\n return ayData;\n}","JsHelpers":"//custom helper so can do a direct comparison - i.e. if value equals xxxx, then show, else show yyyyy\r\n//note that this HAS to be added here in Helpers, is NOT built in\r\nHandlebars.registerHelper('if_eq', function(a, b, opts) {\r\n if(a == b) // Or === depending on your needs\r\n return opts.fn(this);\r\n else\r\n return opts.inverse(this);\r\n});\r\n","RenderType":0,"HeaderTemplate":"  ","FooterTemplate":"                Printed date: PDFDate\nPage of                ","DisplayHeaderFooter":true,"PaperFormat":10,"Landscape":true,"MarginOptionsBottom":"20mm","MarginOptionsLeft":"20mm","MarginOptionsRight":"15mm","MarginOptionsTop":"10mm","PageRanges":null,"PreferCSSPageSize":false,"PrintBackground":true,"Scale":1.00000} \ No newline at end of file diff --git a/server/AyaNova/resource/rpt/stock-report-templates/Customer Work Order.ayrt b/server/AyaNova/resource/rpt/stock-report-templates/Customer Work Order.ayrt new file mode 100644 index 00000000..a13c729f --- /dev/null +++ b/server/AyaNova/resource/rpt/stock-report-templates/Customer Work Order.ayrt @@ -0,0 +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":"/* if not using a rule set or specific property it is recommended to comment out or delete fully for report performance*/\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 (EachWO of reportData.ayReportData) {\n for (Item of EachWO.Items) {\n for (Part of Item.Parts) {\n if (Part.Serials != null) {\n 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 (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 (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 (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 (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 (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 (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 (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 (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 && !isNaN(parsedDate))) {\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/EXAMPLE report template name notes ayReportMetaData.ayrt b/server/AyaNova/resource/rpt/stock-report-templates/EXAMPLE report template name notes ayReportMetaData.ayrt deleted file mode 100644 index d5bbde57..00000000 --- a/server/AyaNova/resource/rpt/stock-report-templates/EXAMPLE report template name notes ayReportMetaData.ayrt +++ /dev/null @@ -1 +0,0 @@ -{"Name":"z_report template name notes ayReportMetaData","Active":true,"Notes":"Examples of displaying ayReportMetaData data such as ","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 \n \n \n \n \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 ServiceDate }}\n {{else}}{{/if}}\n \n \n \n \n \n\n
Column to the right displays all of your ayReportMetaData :{{ayJSON ../ayReportMetaData }}
Column to the right displays this report template's name as is - with the quotation marks:{{ayJSON ../ayReportMetaData.Name}}
Column to the right displays this report template's name:{{../ayReportMetaData.Name}}
Column to the right displays the notes for this report template:{{../ayReportMetaData.Notes}}
Column to the right displays where this report template is accessed from:{{../ayReportMetaData.AType}}
 
{{ayT 'WorkOrder'}}{{ayT 'Customer'}}{{ayT 'WorkOrderServiceDate'}}{{ayT 'Report'}} {{ayT 'ReportName'}}{{ayT 'ReportNotes'}}
{{Serial}}{{CustomerViz}}{{ayDate ServiceDate}}no Service Date specified{{../ayReportMetaData.Name}}{{ ../ayReportMetaData.Notes}}
\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: 11pt; \n color: #9e9e9e;\n} \n\ntable, td, th {\n border: 1px solid black;\n}\n\ntable { \n white-space: pre-wrap;\n width: 100%;\n table-layout: fixed; /* the # of columns set in the first row of the thead will be fixed and applied throughout table and rows */\n }\n\nth {\n /* border-bottom: solid 1pt #9e9e9e; */\n height: 30px;\n font-size: 9pt; \n color: #9e9e9e;\n}\n\ntd {\n padding: 10px;\n word-wrap: break-word;\n font-size: 9pt;\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\", \"ReportNotes\", \"ReportName\", \"Report\" ]);\n\n\t\n\n return reportData;\n}","JsHelpers":"//Register custom Handlebars helpers here to use in your report script\n//https://handlebarsjs.com/guide/#custom-helpers\nHandlebars.registerHelper('loud', function (aString) {\n return aString.toUpperCase()\n})","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/EXAMPLE Barcode using built in ayBC.ayrt b/server/AyaNova/resource/rpt/stock-report-templates/EXAMPLE Barcode using built in ayBC.ayrt deleted file mode 100644 index edc2c8e3..00000000 --- a/server/AyaNova/resource/rpt/stock-report-templates/EXAMPLE Barcode using built in ayBC.ayrt +++ /dev/null @@ -1 +0,0 @@ -{"Name":"z_Barcode using built in ayBC","Active":true,"Notes":"Example of displaying barcodes \n","Roles":124927,"AType":34,"IncludeWoItemDescendants":false,"Template":"\n\n\n
\n\n

Example: Bar code helper

\n

See Report editor help documentation for additional details

\n\n {{#each ayReportData}}\n \n \n \n\n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n {{#each Items}}\n {{#each Units}}\n \n \n \n \n \n {{/each}}\n\n \n \n \n {{#each Parts}}\n \n \n \n \n \n {{/each}}\n\n \n {{/each}}\n
{{ayT \"WorkOrder\" }} {{ayT \"WorkOrderServiceNumber\" }} {{Serial}} as \"CODE-128\" BarCode with scale 1:{{ ayBC Serial '{ \"bcid\": \"code128\",\"includetext\":true, \"scale\":1}' }}
{{ayT \"WorkOrder\" }} {{ayT \"WorkOrderServiceNumber\" }} {{Serial}} as \"QR\" Code with scale 1:{{ ayBC Serial '{ \"bcid\": \"qrcode\",\"includetext\":true, \"scale\":1}' }}
{{ayT \"WorkOrder\" }} {{ayT \"WorkOrderServiceNumber\" }} {{Serial}} as \"QR\" Code with scale 3:{{ ayBC Serial '{ \"bcid\": \"qrcode\",\"includetext\":true, \"scale\":3}' }}
Sample \"UPC-A\" Code using a hard coded number 712345678904 as example:{{ ayBC \"712345678904\" '{ \"bcid\": \"upca\",\"includetext\":true, \"scale\":1}' }}
 
 {{ayT 'Unit'}} {{UnitViz}} displayed as as \"CODE-128\" BarCode with scale 1:{{ ayBC UnitViz '{ \"bcid\": \"code128\",\"includetext\":true, \"scale\":1}' }}
 
 {{ayT 'WorkOrderItemPartPartID'}}: {{PartNameViz}} displayed as \"CODE-128\" BarCode with scale 1:{{ ayBC PartNameViz '{ \"bcid\": \"code128\",\"includetext\":true, \"scale\":1}' }}
\n {{/each}}\n\n
\n\n\n\n","Style":"/* if not using a rule set or specific property it is recommended to comment out or delete fully for report performance*/\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\ntd {\n padding: 10px;\n}\n\ntbody tr:nth-child(even) {\n background-color: #f8f8f8; /* MUST checkmark Print background in PDF Options for this to show */\n}\n\n.fontgreen {\n color: green;\n}\n.fontblue {\n color: blue;\n}\n.fontred {\n color:red;\n}\n\n\n.rightlean {\n text-align: right;\n}\n.leftlean {\n text-align: left;\n}\n.centerlean {\n text-align: center;\n}","JsPrerender":"async function ayPrepareData(reportData){ \n //this function (if present) is called with the report data \n //before the report is rendered\n //modify data as required here and return it to change the data before the report renders\n //see the help documentation for details\n\n\tawait ayGetTranslations([ \"WorkOrder\", \"WorkOrderServiceNumber\", \"Unit\", \"WorkOrderItemPartPartID\" ]);\n\n\n\n\t\n\n return reportData;\n}","JsHelpers":"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 && !isNaN(parsedDate))) {\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":true,"PaperFormat":10,"Landscape":false,"MarginOptionsBottom":"15mm","MarginOptionsLeft":"15mm","MarginOptionsRight":"10mm","MarginOptionsTop":"10mm","PageRanges":null,"PreferCSSPageSize":false,"PrintBackground":true,"Scale":1.00000} \ No newline at end of file diff --git a/server/AyaNova/resource/rpt/stock-report-templates/EXAMPLE Custom fields.ayrt b/server/AyaNova/resource/rpt/stock-report-templates/EXAMPLE Custom fields.ayrt deleted file mode 100644 index 56727dd5..00000000 --- a/server/AyaNova/resource/rpt/stock-report-templates/EXAMPLE Custom fields.ayrt +++ /dev/null @@ -1 +0,0 @@ -{"Name":"z_Custom fields","Active":true,"Notes":"example of using AyaNova provided Helpers to format custom fields - requires the object to have custom fields enabled\n","Roles":124927,"AType":34,"IncludeWoItemDescendants":false,"Template":"\n\n\n
\n

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

\n\n\n {{#each ayReportData}}\n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n {{#each Items}}\n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n {{#each Units}}\n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n {{/each}}\n {{/each}} \n \n
{{ayT 'WorkOrder'}} {{ayT 'WorkOrderServiceNumber'}}{{ Serial }}
 
{{ayT 'WorkOrder'}} {{ayT 'WorkOrderCustom1'}} displayed with no additional formating{{ CustomFields.c1 }}
 
{{ayT 'WorkOrder'}} {{ayT 'WorkOrderCustom2'}} displayed with no additional formating{{ CustomFields.c2 }}
If {{ayT 'WorkOrderCustom2'}} has {{ayT 'ObjectCustomFieldFieldType'}} of DateTime, shows with additional formating via ayDateTime{{ ayDateTime CustomFields.c2 }}
 
{{ayT 'WorkOrder'}} {{ayT 'WorkOrderCustom3'}} displayed with no additional formating{{ CustomFields.c3 }}
If {{ayT 'WorkOrderCustom3'}} has {{ayT 'ObjectCustomFieldFieldType'}} of Money, shows with additional formating via ayCurrency{{ayCurrency CustomFields.c3 }}
 
 {{ayT 'WorkOrderItem'}} {{ayT 'WorkOrderItemSummary'}}{{Notes}}
 {{ayT 'WorkOrderItem'}} {{ayT 'WorkOrderItemCustom1'}} displayed with no additional formating{{CustomFields.c1}}
 
 {{ayT 'WorkOrderItem'}} {{ayT 'WorkOrderItemCustom2'}} displayed with no additional formating{{CustomFields.c2}}
 If {{ayT 'WorkOrderItemCustom2'}} has {{ayT 'ObjectCustomFieldFieldType'}} of DateTime, shows with additional formating via ayDateTime{{ayDateTime CustomFields.c2}}
 
 {{ayT 'WorkOrderItem'}} {{ayT 'WorkOrderItemCustom3'}} displayed with no additional formating{{CustomFields.c3}}
 If {{ayT 'WorkOrderItemCustom3'}} has {{ayT 'ObjectCustomFieldFieldType'}} of Money, shows with additional formating via ayCurrency{{ayCurrency CustomFields.c3}}
 
 {{ayT 'WorkOrderItemUnit'}}{{UnitViz}} - {{UnitModelNameViz}}
 {{ayT 'WorkOrderItemUnit'}} {{ayT 'WorkOrderItemUnitCustom1'}} displayed with no additional formating{{CustomFields.c1}}
 
 {{ayT 'WorkOrderItemUnit'}} {{ayT 'WorkOrderItemUnitCustom2'}} displayed with no additional formating{{CustomFields.c2}}
 If {{ayT 'WorkOrderItemCustom2'}} has {{ayT 'ObjectCustomFieldFieldType'}} of DateTime, shows with additional formating via ayDateTime{{ayDateTime CustomFields.c2}}
 
 {{ayT 'WorkOrderItemUnit'}} {{ayT 'WorkOrderItemUnitCustom3'}} displayed with no additional formating{{CustomFields.c3}}
 If {{ayT 'WorkOrderItemUnit'}} has {{ayT 'ObjectCustomFieldFieldType'}} of Money, shows with additional formating via ayCurrency{{ayCurrency CustomFields.c3}}
 
\n {{/each}}\n
\n\n\n\n","Style":"/* if not using a rule set or specific property it is recommended to comment out or delete fully for report performance*/\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; //setting this to fixed causes columns to be evenly spaced for the entire table regardless of cell content, and then colspan then \"works\" as expected\n border-collapse: collapse;\n white-space: pre-wrap;\n font-size: 8pt;\n width: 100%;\n }\n\n\nth {\n height: 20px;\n color: #9e9e9e;\n}\n\ntbody tr {\n height: 5px;\n word-wrap: break-word;\n}\n\ntbody tr:nth-child(even) {\n background-color: #f8f8f8; /* MUST checkmark Print background in PDF Options for this to show */\n}\n\n.fontgreen {\n color: green;\n}\n.fontblue {\n color: blue;\n}\n.fontred {\n color:red;\n}\n\n\n.rightlean {\n text-align: right;\n}\n.leftlean {\n text-align: left;\n}\n.centerlean {\n text-align: center;\n}","JsPrerender":"async function ayPrepareData(reportData){ \n //this function (if present) is called with the report data \n //before the report is rendered\n //modify data as required here and return it to change the data before the report renders\n //see the help documentation for details\n\n\tawait ayGetTranslations([ \"ObjectCustomFieldFieldType\", \"WorkOrder\", \"WorkOrderServiceNumber\", \"WorkOrderCustom1\", \"WorkOrderCustom2\",\"WorkOrderCustom3\", \"WorkOrderItemSummary\", \"WorkOrderItem\", \"WorkOrderItemCustom1\", \"WorkOrderItemCustom2\", \"WorkOrderItemCustom3\", \"WorkOrderItemUnit\", \"WorkOrderItemUnitCustom1\", \"WorkOrderItemUnitCustom2\", \"WorkOrderItemUnitCustom3\" ]);\n\n\n\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 && !isNaN(parsedDate))) {\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":true,"PaperFormat":10,"Landscape":false,"MarginOptionsBottom":"15mm","MarginOptionsLeft":"15mm","MarginOptionsRight":"10mm","MarginOptionsTop":"10mm","PageRanges":null,"PreferCSSPageSize":false,"PrintBackground":true,"Scale":1.00000} \ No newline at end of file diff --git a/server/AyaNova/resource/rpt/stock-report-templates/EXAMPLE Footer forced to bottom of each page of multi-page work order.ayrt b/server/AyaNova/resource/rpt/stock-report-templates/EXAMPLE Footer forced to bottom of each page of multi-page work order.ayrt deleted file mode 100644 index 756a1103..00000000 --- a/server/AyaNova/resource/rpt/stock-report-templates/EXAMPLE Footer forced to bottom of each page of multi-page work order.ayrt +++ /dev/null @@ -1 +0,0 @@ -{"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":124927,"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; /* setting this to fixed causes columns to be evenly spaced for the entire table regardless of cell content, and then colspan then \"works\" as expected */\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 (EachWO of reportData.ayReportData) {\n for (Item of EachWO.Items) {\n for (Part of Item.Parts) {\n if (Part.Serials != null) {\n 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 (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 (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 (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 (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 (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 (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 (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 (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 && !isNaN(parsedDate))) {\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/EXAMPLE PO custom Helper #if_eq if equal to.ayrt b/server/AyaNova/resource/rpt/stock-report-templates/EXAMPLE PO custom Helper #if_eq if equal to.ayrt deleted file mode 100644 index 6f4ab822..00000000 --- a/server/AyaNova/resource/rpt/stock-report-templates/EXAMPLE PO custom Helper #if_eq if equal to.ayrt +++ /dev/null @@ -1 +0,0 @@ -{"Name":"z_PO custom Helper #if_eq if equal to","Active":true,"Notes":"example custom Helper if_eq to compare ordered to received, if equals will show in greenfont. if NOT equal, shows in redfont\nexample use of HTML if else /if - if serials present then show, else show preset text","Roles":124927,"AType":26,"IncludeWoItemDescendants":false,"Template":"\n\n\t\n\t\n \n \n \n \n \n \n \n \n \n \n {{#each ayReportData}}\n \n {{#each Items}} \n \n \n \n \n\n \n {{#if_eq QuantityOrdered QuantityReceived}} {{else}}{{/if_eq}}\n\t\t\t\t\t\n \n {{#if Serials}}{{else}}{{/if}}\n \n {{/each}}\n \n \n \n \n {{/each}}\n
{{ayT 'PurchaseOrderPONumber'}}{{ayT 'Part'}}{{ayT 'PurchaseOrderItemQuantityOrdered'}}{{ayT 'PurchaseOrderItemQuantityReceived'}}{{ayT 'PurchaseOrderItemSerialNumbers'}}
{{../Serial}} {{PartNameViz}} {{QuantityOrdered}}{{QuantityReceived}} (same as quantity ordered){{QuantityReceived}} (not the same as ordered){{Serials}}no serials documented
 
\n\t\n\n","Style":".singlePage\n{\npage-break-after: always;\n\n}\nbody {\n font-family: 'Helvetica', 'Helvetica Neue', Arial, sans-serif; \n}\n\n.reporttitle { \n margin-bottom: 20pt; \n font-weight: bold; \n font-size: 13pt; \n color: #9e9e9e;\n} \n\ntable { \n border-collapse: collapse;\n white-space: pre-wrap;\n width: 100%;\n table-layout: fixed; /* the # of columns set in the first row of the thead will be fixed and applied throughout table and rows */\n }\n\nth {\n height: 50px;\n font-size: 11pt; \n color: #9e9e9e;\n}\n\ntbody td {\n padding: 10px;\n word-wrap: break-word;\n font-size: 9pt;\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 await ayGetTranslations([ \"Part\", \"PurchaseOrderItemQuantityOrdered\", \"PurchaseOrderPONumber\", \"PurchaseOrderItemSerialNumbers\", \"PurchaseOrderItemQuantityReceived\" ]);\n\n\n return reportData;\n}","JsHelpers":"//Register custom Handlebars helpers here to use in your report script\n//https://handlebarsjs.com/guide/#custom-helpers\nHandlebars.registerHelper('loud', function (aString) {\n return aString.toUpperCase()\n})\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","RenderType":0,"HeaderTemplate":"                Printed date: PDFDate\nPage of                ","FooterTemplate":"  ","DisplayHeaderFooter":true,"PaperFormat":10,"Landscape":false,"MarginOptionsBottom":"15mm","MarginOptionsLeft":"10mm","MarginOptionsRight":"10mm","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/EXAMPLE Wiki displayed PO.ayrt b/server/AyaNova/resource/rpt/stock-report-templates/EXAMPLE Wiki displayed PO.ayrt deleted file mode 100644 index 54d329eb..00000000 --- a/server/AyaNova/resource/rpt/stock-report-templates/EXAMPLE Wiki displayed PO.ayrt +++ /dev/null @@ -1 +0,0 @@ -{"Name":"z_Wiki displayed PO","Active":true,"Notes":"","Roles":124927,"AType":26,"IncludeWoItemDescendants":false,"Template":"\n\t\n\t\n\n\t\n\t\t\n\t\t\t\n\t\t\t\n\t\t\n\t\n\n\t{{#each ayReportData}}\n\t\t\n\t\t\t\n\t\t\t\n\t\t\t\t\n\t\t\t\t\n\t\t\t\n\t\n\t{{/each}}\n\n\t\n\t\t\n\t\t\t\n\t\t\n\t\t\n\n\t
column header 1column header 2
{{ayT 'PurchaseOrder'}} {{Serial}}{{ayWiki Wiki}}
and some footer text
\t\n\n\n","Style":".singlePage\n{\npage-break-after: always;\n}\n\n.footertext {\n font-size: 14pt;\n font-style: italic;\n background-color: pink;\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 text-align: center;\n} \n\ntable { \n border-collapse: collapse;\n white-space: pre-wrap;\n width: 100%;\n table-layout: fixed; /* the # of columns set in the first row of the thead will be fixed and applied throughout table and rows */\n }\n\nth {\n border-bottom: solid 1pt #9e9e9e;\n height: 50px;\n font-size: 13pt; \n color: #9e9e9e;\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}\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 await ayGetTranslations([\"PurchaseOrder\" ]);\n\n return reportData;\n}","JsHelpers":"//Register custom Handlebars helpers here to use in your report script\n//https://handlebarsjs.com/guide/#custom-helpers\nHandlebars.registerHelper('loud', function (aString) {\n return aString.toUpperCase()\n})","RenderType":0,"HeaderTemplate":"    Todays date:    set in PDF Options","FooterTemplate":"  set in PDF Options  Page  of     ","DisplayHeaderFooter":true,"PaperFormat":10,"Landscape":false,"MarginOptionsBottom":"15mm","MarginOptionsLeft":"10mm","MarginOptionsRight":"10mm","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/EXAMPLE additional Today's Date Time Helpers.ayrt b/server/AyaNova/resource/rpt/stock-report-templates/EXAMPLE additional Today's Date Time Helpers.ayrt deleted file mode 100644 index 3115efa2..00000000 --- a/server/AyaNova/resource/rpt/stock-report-templates/EXAMPLE additional Today's Date Time Helpers.ayrt +++ /dev/null @@ -1 +0,0 @@ -{"Name":"z_additional Today's Date Time Helpers","Active":true,"Notes":"example Custom Helpers to display todays date in different formats","Roles":124927,"AType":34,"IncludeWoItemDescendants":false,"Template":"\n\n\n\t
\n\t\t

Additional custom time date helpers

\n\t

today's date using custom Helper todaysDate no formatting: {{ todaysDate}}

\n\t

today's date using custom Helper date.toLocaleDateString() : {{ todaysLocaleStringDate}}

\n\ttoday's date using custom Helper todaysget that users date.getFullYear etc: {{ todaysget}}

\n\t

today's date using custom Helper long format of ayClientMetaData: {{ todaysMonthDDYYYYDate}}

\n\t

today's date using custom Helper todaysDateYearFromParts formatter.formatToParts(parsedDate): {{ todaysDateYearFromParts}}

\n\t

all can be further customized to display short, long, etc format

\n\t
\n\n\n","Style":".example {\n color: blue;\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 return reportData;\n}","JsHelpers":"//Register custom Handlebars helpers here to use in your report script\n//https://handlebarsjs.com/guide/#custom-helpers\n\n\nHandlebars.registerHelper('todaysDate', function() {\n var dt1=new Date();\n return dt1\n});// today's date with no formatting EXAMPLE SHOW: Wed Jun 09 2021 16:17:27 GMT-0700 (Pacific Daylight Time)\n\nHandlebars.registerHelper('todaysLocaleStringDate', function() {\n var dt2=new Date();\n return dt2.toLocaleDateString() \n});// today's date displayed in the localedatestring EXAMPLE SHOW: 09/06/2021\n\n\nHandlebars.registerHelper('todaysget', function() {\n var dt5 =new Date();\n var date = dt5.getFullYear()+'-'+(dt5.getMonth()+1)+'-'+dt5.getDate() + \" \" + +dt5.getHours() + \":\" + +dt5.getMinutes() ;\n return date\n});// today's date displayed EXAMPLE SHOW: 2021-6-9 16:17\n\n\nHandlebars.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\n\n//\n// CUSTOM FORMAT TO PARTS HELPER\n// this offers the most control over the return format\n// Locale aware conversion to parts that can be returned in any format\n//\nHandlebars.registerHelper('todaysDateYearFromParts', function () {\n\n //parse todays date\n let parsedDate = new Date();\n\n //Set formatter options\n //https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Intl/DateTimeFormat/formatToParts\n let formatter = new Intl.DateTimeFormat('en-us', {\n weekday: 'long',\n year: 'numeric',\n month: 'long', //long to show the full name of month, short to show short name, numeric to show the month number\n day: 'numeric',\n hour: 'numeric',\n minute: 'numeric',\n second: 'numeric',\n fractionalSecondDigits: 3,\n hour12: true,\n timeZone: 'Canada/Pacific' //refer to https://en.wikipedia.org/wiki/List_of_tz_database_time_zones for appropriate TZ database name to use\n //OR use what is displayed in the output for your ayClientMetaData's TimeZoneName:\n });\n\n let parts = formatter.formatToParts(parsedDate);\n /*\n // parts example return value: \n [ \n { type: 'weekday', value: 'Monday' }, \n { type: 'literal', value: ', ' }, \n { type: 'month', value: '12' }, \n { type: 'literal', value: '/' }, \n { type: 'day', value: '17' }, \n { type: 'literal', value: '/' }, \n { type: 'year', value: '2012' }, \n { type: 'literal', value: ', ' }, \n { type: 'hour', value: '3' }, \n { type: 'literal', value: ':' }, \n { type: 'minute', value: '00' }, \n { type: 'literal', value: ':' }, \n { type: 'second', value: '42' }, \n { type: 'fractionalSecond', value: '000' },\n { type: 'literal', value: ' ' }, \n { type: 'dayPeriod', value: 'AM' } \n ]\n */\n//identify here which of the above will use when returning\n let partWeekDay = parts.find(({ type }) => type === 'weekday').value;\n let partDay = parts.find(({ type }) => type === 'day').value;\n let partMonth = parts.find(({ type }) => type === 'month').value;\n let partYear = parts.find(({ type }) => type === 'year').value;\n let partHour = parts.find(({ type }) => type === 'hour').value;\n let partMin = parts.find(({ type }) => type === 'minute').value;\n let partdayPeriod = parts.find(({ type }) => type === 'dayPeriod').value;\n\n\n \n //return in some custom format\n return `${partWeekDay} ${partDay}, ${partMonth} ${partYear} - ${partHour}:${partMin} ${partdayPeriod}`; // EXAMPLE SHOW Wednesday 9, June 2021 - 4:17 PM\n\n \n //return below instead to see array of the possible values for each type while initially figuring out what to customize to\n //return JSON.stringify(parts);\n});","RenderType":0,"HeaderTemplate":null,"FooterTemplate":null,"DisplayHeaderFooter":false,"PaperFormat":10,"Landscape":false,"MarginOptionsBottom":"10mm","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/EXAMPLE ayGetFromAPI display additional data from linked customer object.ayrt b/server/AyaNova/resource/rpt/stock-report-templates/EXAMPLE ayGetFromAPI display additional data from linked customer object.ayrt deleted file mode 100644 index 3189ca15..00000000 --- a/server/AyaNova/resource/rpt/stock-report-templates/EXAMPLE ayGetFromAPI display additional data from linked customer object.ayrt +++ /dev/null @@ -1 +0,0 @@ -{"Name":"z_ayGetFromAPI display additional data from linked customer object","Active":true,"Notes":"Example of using the ayGetFromAPI to display data from the Customer record when reporting on the Unit record","Roles":124927,"AType":31,"IncludeWoItemDescendants":false,"Template":"\n \n\t
\t\n\t\t
\n\t\t\t

Using API method to obtain additional data from the {{ayT 'Customer'}} record

\n\t\t
\n \n \n\t\t\t\t\n\t\t\t\t\t\n\t\t\t\t\t\n\t\t\t\t\t\n\t\t\t\t\n\t\t\t\t\n\t\t\t\t\t\n\t\t\t\t\t\n\t\t\t\t\t\t\t\t\t\t\n\t\t\t\t\t\n\t\t\t\t\t\n\t\t\t\t\t\n\t\t\t\t \n \t\t\n\t\t\t \n\t\t\t\t {{#each ayReportData}} \n\t\t\t\t \n\t\t\t\t\t\n\t\t\t\t\t\n\t\t\t\t\t\t\t\t\t\t\n\t\t\t\t\t\n\t\t\t\t\t\n\t\t\t\t\t\n\t\t\t\t \n\t\t\t\t {{/each}}\n\t\t\t \n
Data from the Unit recordData from the Customer record obtained using API method
{{ayT 'Customer'}} {{ayT 'Unit'}}{{ayT 'Customer'}}{{ayT 'Customer'}} {{ayT 'CustomerEmail'}}{{ayT 'Customer'}} {{ayT 'CustomerPhone1'}}{{ayT 'Customer'}} {{ayT 'HeadOffice'}}
{{Serial}} {{UnitModelNameViz}}{{CustomerViz}}{{myCustomerInfo.emailAddress}}{{myCustomerInfo.phone1}}{{myCustomerInfo.headOfficeViz}}
\n\n \n {{#each ayReportData}}\n \n \n \n \n \n\t\t\t \n \n \n {{/each}}\n
This is a printout of the data returned from the custom Prepare that this report now uses for each unit in the datalist. To display any of the Customer data ported over, just identify in mustaches myCustomerInfo.xxxx where xxx is the key as in CustomerInfo.phone1
{{ayJSON this}}
\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: 13pt; \r\n color: #9e9e9e;\r\n text-align: center;\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; /* the # of columns set in the first row of the thead will be fixed and applied throughout table and rows */\r\n }\r\n\r\nth {\r\n /* border-bottom: solid 1pt #9e9e9e; */\r\n height: 30px;\r\n font-size: 11pt; \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: 9pt;\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 font-size: 16pt;\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(ayData) {\n\n await ayGetTranslations([\"Unit\", \"Customer\", \"CustomerEmail\", \"CustomerPhone1\", \"HeadOffice\" ]);\n \n //Loop through all the records in the raw report data\n for (let i = 0; i < ayData.ayReportData.length; i++) {\n //set a temporary variable to each record to save typing it all out\n let item = ayData.ayReportData[i];\n\n //call into the AyaNova API and get the customer record for this report data's customer id\n const apiResult = await ayGetFromAPI(`customer/${item.CustomerId}`);\n\n //if a result comes back, insert it into the report data so it's available to the template\n if (apiResult) {\n //put the return data customer record on a key in each record called 'myCustomerInfo' (you can call it anything as long as it doesn't conflict with an existing key)\n item.myCustomerInfo = apiResult.data\n }\n }\n return ayData;\n}","JsHelpers":"","RenderType":0,"HeaderTemplate":"                Printed date: PDFDate\n\nPage of                ","FooterTemplate":"  ","DisplayHeaderFooter":true,"PaperFormat":10,"Landscape":true,"MarginOptionsBottom":"15mm","MarginOptionsLeft":"15mm","MarginOptionsRight":"20mm","MarginOptionsTop":"20mm","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/EXAMPLE ayGroupByTag group by a specific Tag only.ayrt b/server/AyaNova/resource/rpt/stock-report-templates/EXAMPLE ayGroupByTag group by a specific Tag only.ayrt deleted file mode 100644 index 06835d89..00000000 --- a/server/AyaNova/resource/rpt/stock-report-templates/EXAMPLE ayGroupByTag group by a specific Tag only.ayrt +++ /dev/null @@ -1 +0,0 @@ -{"Name":"z_ayGroupByTag group by a specific Tag only","Active":true,"Notes":"USE: Example custom Prepare that groups by a specific Tag - i.e. black","Roles":49514,"AType":20,"IncludeWoItemDescendants":false,"Template":"\n\n\n\t
\n\t\t
\n\t\t\t

Parts by Tag

\n\t\t
\n\t\t\n\t\t\t\n\t\t\t\t\n\t\t\t\t\t\n\t\t\t\t\t\n\t\t\t\t\t\n\t\t\t\t\t\n\t\t\t\t\t\n\t\t\t\t\n\t\t\t\n\n\t\t\t\n\t\t\t\t{{#each ayReportData}}\n\t\t\t\t\n\t\t\t\t\n\t\t\t\t\n\t\t\t\t\t\n\t\t\t\t\n\t\t\t\t{{#each items}}\n\t\t\t\t\n\t\t\t\t\t\n\t\t\t\t\t\n\t\t\t\t\t\n\t\t\t\t\t\n\t\t\t\t\t\n\t\t\t\t\n\t\t\t\t{{/each}}\n\t\t\t\t\n\t\t\t\t\t\n\t\t\t\t\n\t\t\t\t\n\t\t\t\t\t\n\t\t\t\t\n\t\t\t\t{{/each}}\n\t\t\t\n\t\t
{{ayT 'Tag'}}{{ayT 'Part'}}{{ayT 'PartManufacturerID'}}{{ayT 'PartCost'}}{{ayT 'PartRetail'}}
{{group}}
 {{Name}}{{ManufacturerViz}}{{ayCurrency Cost}}{{ayCurrency Retail}}
# of parts for {{ayT 'Tag'}} {{group}}: {{count}}
 
\n\n\t\t\n {{#each ayReportData}}\n \n \n \n \n \n\t\t\t \n \n \n {{/each}}\n
This is a printout of the data returned from the Custom Prepare that this report now uses. Compare against the data that shows in the \"Sample Data\" when editing this report template.
{{ayJSON this}}
\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: 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; /* the # of columns set in the first row of the thead will be fixed and applied throughout table and rows */\r\n }\r\n\r\nth {\r\n border-bottom: solid 1pt #9e9e9e;\r\n height: 50px;\r\n font-size: 11pt; \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: 9pt;\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 font-size: 16pt;\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(ayData) {\n\n await ayGetTranslations([\"Part\", \"PartManufacturerID\", \"PartRetail\", \"PartCost\", \"PartSerialNumbersAvailable\", \"Tag\" ]);\n\n\n //Example below is to group by each and every Tag\n //ayData.ayReportData = ayGroupByTag(ayData.ayReportData);\n\n //Example below of how to group by specific text of tags - below example only if contains the 'black'\n ayData.ayReportData = ayGroupByTag(ayData.ayReportData, 'black');\n\n return ayData;\n}\n\nfunction ayGroupByTag(reportDataArray, tagContains) {\n //array to hold grouped data\n const ret = [];\n const containsQuery = tagContains != null && tagContains != '';\n\n //iterate through the raw reprot data \n for (let i = 0; i < reportDataArray.length; i++) {\n //get a reference to each object to save typing\n let o = reportDataArray[i];\n //don't bother with any that don't have tags at all\n if (o.Tags && o.Tags.length) {\n //loop through all tags for this record\n o.Tags.forEach(t => {//t=each tag\n //if not a contains query just process it, if it is a contains query then only process if tag contains tagContains\n if (!containsQuery || t.includes(tagContains)) {\n let groupObject = ret.find(z => z.group == t);\n if (groupObject != undefined) {\n //there is already a matching group in the return array so just push this raw report data record into it\n groupObject.items.push(o);\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 raw report data record\n ret.push({ group: t, items: [o], count: 1 });\n }\n }\n })\n }\n }\n\n //Sort based on the group name in a locale aware manner\n ret.sort(function (a, b) {\n return a.group.localeCompare(b.group);\n });\n return ret;\n}","JsHelpers":"","RenderType":0,"HeaderTemplate":"  ","FooterTemplate":"                Printed date: PDFDate\nPage of                ","DisplayHeaderFooter":true,"PaperFormat":10,"Landscape":false,"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/EXAMPLE ayGroupByTag group by each Tag.ayrt b/server/AyaNova/resource/rpt/stock-report-templates/EXAMPLE ayGroupByTag group by each Tag.ayrt deleted file mode 100644 index b2950cb1..00000000 --- a/server/AyaNova/resource/rpt/stock-report-templates/EXAMPLE ayGroupByTag group by each Tag.ayrt +++ /dev/null @@ -1 +0,0 @@ -{"Name":"z_ayGroupByTag group by each Tag","Active":true,"Notes":"USE: Example custom Prepare that groups by the Tags - nothing shows if no tag(s) match","Roles":49514,"AType":20,"IncludeWoItemDescendants":false,"Template":"\n\n\n\t
\n\t\t
\n\t\t\t

Parts by Tag

\n\t\t
\n\t\t\n\t\t\t\n\t\t\t\t\n\t\t\t\t\t\n\t\t\t\t\t\n\t\t\t\t\t\n\t\t\t\t\t\n\t\t\t\t\t\n\t\t\t\t\n\t\t\t\n\n\t\t\t\n\t\t\t\t{{#each ayReportData}}\n\t\t\t\t\n\t\t\t\t\n\t\t\t\t\n\t\t\t\t\t\n\t\t\t\t\n\t\t\t\t{{#each items}}\n\t\t\t\t\n\t\t\t\t\t\n\t\t\t\t\t\n\t\t\t\t\t\n\t\t\t\t\t\n\t\t\t\t\t\n\t\t\t\t\n\t\t\t\t{{/each}}\n\t\t\t\t\n\t\t\t\t\t\n\t\t\t\t\n\t\t\t\t\n\t\t\t\t\t\n\t\t\t\t\n\t\t\t\t{{/each}}\n\t\t\t\n\t\t
{{ayT 'Tag'}}{{ayT 'Part'}}{{ayT 'PartManufacturerID'}}{{ayT 'PartCost'}}{{ayT 'PartRetail'}}
{{group}}
 {{Name}}{{ManufacturerViz}}{{ayCurrency Cost}}{{ayCurrency Retail}}
# of parts for {{ayT 'Tag'}} {{group}}: {{count}}
 
\n\n\t\t\n {{#each ayReportData}}\n \n \n \n \n \n\t\t\t \n \n \n {{/each}}\n
This is a printout of the data returned from the Custom Prepare that this report now uses, each \"group\" is an object. Compare against the data that shows in the \"Sample Data\" when editing this report template.
{{ayJSON this}}
\n\t
\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: 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; /* the # of columns set in the first row of the thead will be fixed and applied throughout table and rows */\r\n }\r\n\r\nth {\r\n border-bottom: solid 1pt #9e9e9e;\r\n height: 50px;\r\n font-size: 11pt; \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: 9pt;\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 font-size: 16pt;\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(ayData) {\n\n await ayGetTranslations([\"Part\", \"PartManufacturerID\", \"PartRetail\", \"PartCost\", \"PartSerialNumbersAvailable\", \"Tag\" ]);\n\n\n //Group by all tags no filter using the function declared outside\n ayData.ayReportData = ayGroupByTag(ayData.ayReportData);\n\n //Example below of how to group by specific text of tags - below example only if contains the 'zone' - comment out above, and uncomment below\n //ayData.ayReportData = ayGroupByTag(ayData.ayReportData, 'zone');\n\n return ayData;\n}\n\nfunction ayGroupByTag(reportDataArray, tagContains) {\n //array to hold grouped data\n const ret = [];\n const containsQuery = tagContains != null && tagContains != '';\n\n //iterate through the raw reprot data \n for (let i = 0; i < reportDataArray.length; i++) {\n //get a reference to each object to save typing\n let o = reportDataArray[i];\n //don't bother with any that don't have tags at all\n if (o.Tags && o.Tags.length) {\n //loop through all tags for this record\n o.Tags.forEach(t => {//t=each tag\n //if not a contains query just process it, if it is a contains query then only process if tag contains tagContains\n if (!containsQuery || t.includes(tagContains)) {\n let groupObject = ret.find(z => z.group == t);\n if (groupObject != undefined) {\n //there is already a matching group in the return array so just push this raw report data record into it\n groupObject.items.push(o);\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 raw report data record\n ret.push({ group: t, items: [o], count: 1 });\n }\n }\n })\n }\n }\n\n //Sort based on the group name in a locale aware manner\n ret.sort(function (a, b) {\n return a.group.localeCompare(b.group);\n });\n return ret;\n}","JsHelpers":"","RenderType":0,"HeaderTemplate":"  ","FooterTemplate":"                Printed date: PDFDate\nPage of                ","DisplayHeaderFooter":true,"PaperFormat":10,"Landscape":false,"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/EXAMPLE ayGroupByTag group inventory by Tag.ayrt b/server/AyaNova/resource/rpt/stock-report-templates/EXAMPLE ayGroupByTag group inventory by Tag.ayrt deleted file mode 100644 index 9d2e0cc0..00000000 --- a/server/AyaNova/resource/rpt/stock-report-templates/EXAMPLE ayGroupByTag group inventory by Tag.ayrt +++ /dev/null @@ -1 +0,0 @@ -{"Name":"z_ayGroupByTag group inventory by Tag","Active":true,"Notes":"USE: Example custom Prepare that groups by the Tags - nothing shows if no tag(s) match","Roles":49258,"AType":90,"IncludeWoItemDescendants":false,"Template":"\n\n\n\t
\n\t\t\n\t\t\t\n\t\t\t\t\n\t\t\t\t\t\n\t\t\t\t\n\t\t\t\t\n\t\t\t\t\t\n\t\t\t\t\n\t\t\t\t\n\t\t\t\t\t\n\t\t\t\t\t\n\t\t\t\t\t\n\t\t\t\t\t\n\t\t\t\t\t\n\t\t\t\t\t\n\t\t\t\t\t\n\t\t\t\t\t\n\t\t\t\t\n\t\t\t\n\n\t\t\t\n\t\t\t\t{{#each ayReportData}}\n\t\t\t\t\n\t\t\t\t\t\n\t\t\t\t\n\t\t\t\t{{#each items}}\n\t\t\t\t\n\t\t\t\t\t\n\t\t\t\t\t\n\t\t\t\t\t\n\t\t\t\t\t\n\t\t\t\t\t\n\t\t\t\t\t\n\t\t\t\t\t\n\t\t\t\t\n\t\t\t\t{{/each}}\n\t\t\t\t\n\t\t\t\t\t\n\t\t\t\t\n\t\t\t\t{{/each}}\n\t\t\t\n\n\t\t\t\n\t\t\t\t\n\t\t\t\t\t\n\t\t\t\t\n\t\t\t\t\n\t\t\t\t\t\n\t\t\t\t\t\n\t\t\t\t\t\n\t\t\t\t\t\n\t\t\t\t\n\t\t\t\t\n\t\t\t\t\t\n\t\t\t\t\n\t\t\t\t\n\t\t\t\t\t\n\t\t\t\t\n\t\t\t\t\n\t\t\t\t\t\n\t\t\t\t\t\n\t\t\t\t\t\n\t\t\t\t\n\t\t\t\n\n\t\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 color: #9e9e9e;\n} \n\ntable { \n border-collapse: collapse;\n white-space: pre-wrap;\n width: 100%;\n table-layout: fixed; \n font-size: 9pt;\n }\n\nth {\n height: 20px;\n font-size: 11pt; \n color: #9e9e9e;\n}\n\ntbody td {\n padding: 10px;\n word-wrap: break-word;\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}","JsPrerender":"async function ayPrepareData(ayData) {\n\n await ayGetTranslations([\"Part\", \"PartList\", \"PartInventoryList\", \"PartRetail\", \"PartByWarehouseInventoryQuantityOnHand\", \"PartSerialNumbersAvailable\", \"Tag\", \"Tags\", \"PartWarehouse\" ]);\n\n //Group by all tags no filter\n ayData.ayReportData = ayGroupByTag(ayData.ayReportData);\n\n //Group by filtered tags that contain 'zone'\n //ayData.ayReportData = ayGroupByTag(ayData.ayReportData, 'zone');\n\n return ayData;\n}\n\nfunction ayGroupByTag(reportDataArray, tagContains) {\n //array to hold grouped data\n const ret = [];\n const containsQuery = tagContains != null && tagContains != '';\n\n//NOTE that tags are referred to as PartTags so this custom Prepare must reference PartTags, not Tags\n\n //iterate through the raw reprot data \n for (let i = 0; i < reportDataArray.length; i++) {\n //get a reference to each object to save typing\n let o = reportDataArray[i];\n //don't bother with any that don't have tags at all\n if (o.PartTags && o.PartTags.length) {\n //loop through all tags for this record\n o.PartTags.forEach(t => {//t=each tag\n //if not a contains query just process it, if it is a contains query then only process if tag contains tagContains\n if (!containsQuery || t.includes(tagContains)) {\n let groupObject = ret.find(z => z.group == t);\n if (groupObject != undefined) {\n //there is already a matching group in the return array so just push this raw report data record into it\n groupObject.items.push(o);\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 raw report data record\n ret.push({ group: t, items: [o], count: 1 });\n }\n }\n })\n }\n }\n\n //Sort based on the group name in a locale aware manner\n ret.sort(function (a, b) {\n return a.group.localeCompare(b.group);\n });\n return ret;\n}","JsHelpers":"//Register custom Handlebars helpers here to use in your report script\n//https://handlebarsjs.com/guide/#custom-helpers\nHandlebars.registerHelper('loud', function (aString) {\n return aString.toUpperCase()\n})","RenderType":0,"HeaderTemplate":"                Printed date: PDFDate\nPage of                ","FooterTemplate":"  ","DisplayHeaderFooter":true,"PaperFormat":10,"Landscape":true,"MarginOptionsBottom":"20mm","MarginOptionsLeft":"15mm","MarginOptionsRight":"10mm","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/EXAMPLE custom date time format Helpers.ayrt b/server/AyaNova/resource/rpt/stock-report-templates/EXAMPLE custom date time format Helpers.ayrt deleted file mode 100644 index ffe6aeb0..00000000 --- a/server/AyaNova/resource/rpt/stock-report-templates/EXAMPLE custom date time format Helpers.ayrt +++ /dev/null @@ -1 +0,0 @@ -{"Name":"z_custom date time format Helpers","Active":true,"Notes":"examples of custom Helpers to format date and date/time data fields","Roles":124927,"AType":34,"IncludeWoItemDescendants":false,"Template":"\n\n\n\t

Example: custom formatted date time helpers

\n\t

Below shows example of each {{ayT 'WorkOrder'}}'s {{ayT 'WorkOrderServiceDate'}} in various formats:

\n\n\t{{#each ayReportData}}\n\t
{{ayServerMetaData.CompanyName}} {{ayT 'PartInventoryList'}}
 
{{ayT 'Part'}}{{ayT 'PartWarehouse'}}{{ayT 'Tags'}}{{ayT 'PartRetail'}}{{ayT 'PartByWarehouseInventoryQuantityOnHand'}}Actual CountDifference + / (-)
# of {{ayT 'PartList'}} with {{ayT 'Tag'}} {{group}}: {{count}}
{{PartName}}{{PartWarehouseName}}{{PartTags}} {{ayCurrency PartRetail}}{{OnHandQty}}
 
 
Count By:__________________________________________Count Date:__________________________________________
 
 
Signature:__________________________________________
\n\t\t\n\t\t\t\n\t\t\t\t\n\t\t\t\n\t\t\n\t\t\n\t\t\t\n\t\t\t\t\n\t\t\t\t\n\t\t\t\n\n\t\t\t\n\t\t\t\t\n\t\t\t\n\t\t\t\n\t\t\t\t\n\t\t\t\t\n\t\t\t\t\n\t\t\t\n\t\t\t\n\t\t\t\t\n\t\t\t\t\n\t\t\t\t\n\t\t\t\n\t\t\t\n\t\t\t\t\n\t\t\t\t\n\t\t\t\t\n\t\t\t\n\n\t\t\t\n\t\t\t\t\n\t\t\t\n\t\t\t\n\t\t\t\t\n\t\t\t\t\n\t\t\t\t\n\t\t\t\n\t\t\t\n\t\t\t\t\n\t\t\t\t\n\t\t\t\t\n\t\t\t\n\t\t\t\n\t\t\t\t\n\t\t\t\t\n\t\t\t\t\n\t\t\t\n\t\t\t\n\t\t\t\t\n\t\t\t\t\n\t\t\t\t\n\t\t\t\n\t\t\t\n\t\t\t\t\n\t\t\t\t\n\t\t\t\t\n\t\t\t\n\t\t\t\n\t\t\t\t\n\t\t\t\t\n\t\t\t\t\n\t\t\t\n\t\t\n\t
{{ayT 'WorkOrder'}} {{ Serial }}
The raw UTC / GMT AyaNova stored value from server:{{ServiceDate}}
Available Built in helpers:
 ayDateTime helper:{{ ayDateTime ServiceDate}}
 ayDate helper:{{ ayDate ServiceDate}}
 ayTime helper:{{ ayTime ServiceDate}}
Custom helpers in this report template:
 myDateTime custom helper:{{ myDateTime ServiceDate}}
 myDate custom helper:{{ myDate ServiceDate}}
 myTime custom helper:{{ myTime ServiceDate}}
 myDateTimeAustralia custom helper:{{ myDateTimeAustralia ServiceDate}}
 myDateTimeArabic custom helper:{{ myDateTimeArabic ServiceDate}}
 myDateTimeFromParts custom helper: {{ myDateTimeFromParts ServiceDate}}
\n\t
\n\t{{/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: 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}\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 await ayGetTranslations([\"WorkOrderServiceDate\", \"WorkOrder\" ]);\n\n return reportData;\n}","JsHelpers":"//////////////////////////////////// /////////////////////////////\n// \n// CUSTOM DATE AND TIME HELPER\n//\nHandlebars.registerHelper('myDateTime', 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 && !isNaN(parsedDate))) {\n return \"not valid\";\n }\n\n //Use built in toLocaleString method to format the date and time\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/toLocaleString\n return parsedDate.toLocaleString(\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 timeStyle: \"long\",\n hour12: AYMETA.ayClientMetaData.Hour12 //Use User setting for 12/24 hour clock\n }\n );\n});\n\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 && !isNaN(parsedDate))) {\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\n\n/////////////////////////////////////////////////////////////////\n//\n// CUSTOM TIME HELPER\n//\nHandlebars.registerHelper('myTime', 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 && !isNaN(parsedDate))) {\n return \"not valid\";\n }\n\n //Use built in toLocaleTimeString method to format the date and time\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/toLocaleString\n return parsedDate.toLocaleTimeString(\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 timeStyle: \"long\",//display the time zone used \n hour12: AYMETA.ayClientMetaData.Hour12 //Use User setting for 12/24 hour clock\n }\n );\n});\n\n\n/////////////////////////////////////////////////////////////////\n//\n// CUSTOM DATE AND TIME HELPER WITH AUSTRALIAN OPTIONS\n//\nHandlebars.registerHelper('myDateTimeAustralia', 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 && !isNaN(parsedDate))) {\n return \"not valid\";\n }\n\n //Use built in toLocaleString method to format the date and time\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/toLocaleString \n return parsedDate.toLocaleString(\n \"en-au\",//use English-Australia locale (Day / Month / Year is Australia default format)\n {\n timeZone: \"Australia/Sydney\",//use forced time zone, see \"tz database\" column for name in list here: https://en.wikipedia.org/wiki/List_of_tz_database_time_zones\n // timeZoneName: \"long\",//display the time zone used - AS OF alpha.109 unable to use this?\n dateStyle: \"short\",\n timeStyle: \"long\"\n }\n );\n});\n\n\n\n/////////////////////////////////////////////////////////////////\n//\n// CUSTOM DATE AND TIME HELPER WITH Arabic OPTIONS \n//\nHandlebars.registerHelper('myDateTimeArabic', 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 && !isNaN(parsedDate))) {\n return \"not valid\";\n }\n\n //Use built in toLocaleString method to format the date and time\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/toLocaleString \n return parsedDate.toLocaleString(\n \"ar-EG\",//use Arabic locale \n {\n timeZone: \"Asia/Dubai\",//use forced time zone, see \"tz database\" column for name in list here: https://en.wikipedia.org/wiki/List_of_tz_database_time_zones\n // timeZoneName: \"short\",//display the time zone used \n dateStyle: \"short\",\n timeStyle: \"long\"\n }\n );\n});\n\n/////////////////////////////////////////////////////////////////\n//\n// CUSTOM FORMAT TO PARTS HELPER\n// this offers the most control over the return format\n// Locale aware conversion to parts that can be returned in any format\n//\nHandlebars.registerHelper('myDateTimeFromParts', function (value) {\n if (!value) {\n return \"\";\n }\n\n //parse the date\n let parsedDate = new Date(value);\n //is it a valid date?\n if (!(parsedDate instanceof Date && !isNaN(parsedDate))) {\n return \"not valid\";\n }\n\n //Set formatter options\n //https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Intl/DateTimeFormat/formatToParts\n let formatter = new Intl.DateTimeFormat('en-us', {\n weekday: 'long',\n year: 'numeric',\n month: 'numeric',\n day: 'numeric',\n hour: 'numeric',\n minute: 'numeric',\n second: 'numeric',\n fractionalSecondDigits: 3,\n hour12: true,\n timeZone: 'UTC'\n });\n\n let parts = formatter.formatToParts(parsedDate);\n /*\n // parts example return value: \n [ \n { type: 'weekday', value: 'Monday' }, \n { type: 'literal', value: ', ' }, \n { type: 'month', value: '12' }, \n { type: 'literal', value: '/' }, \n { type: 'day', value: '17' }, \n { type: 'literal', value: '/' }, \n { type: 'year', value: '2012' }, \n { type: 'literal', value: ', ' }, \n { type: 'hour', value: '3' }, \n { type: 'literal', value: ':' }, \n { type: 'minute', value: '00' }, \n { type: 'literal', value: ':' }, \n { type: 'second', value: '42' }, \n { type: 'fractionalSecond', value: '000' },\n { type: 'literal', value: ' ' }, \n { type: 'dayPeriod', value: 'AM' } \n ]\n */\n\n let partWeekDay = parts.find(({ type }) => type === 'weekday').value;\n let partDay = parts.find(({ type }) => type === 'day').value;\n let partYear = parts.find(({ type }) => type === 'year').value;\n \n //return in some custom format\n return `DAY:${partWeekDay}-${partDay} YEAR: ${partYear}`;\n //return this instead to see the actual return array\n //return JSON.stringify(parts);\n});","RenderType":0,"HeaderTemplate":"                Printed date: PDFDate\nPage of                ","FooterTemplate":"  ","DisplayHeaderFooter":true,"PaperFormat":10,"Landscape":false,"MarginOptionsBottom":"10mm","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/EXAMPLE if key value X show Y via custom Helpers.ayrt b/server/AyaNova/resource/rpt/stock-report-templates/EXAMPLE if key value X show Y via custom Helpers.ayrt deleted file mode 100644 index 93c65819..00000000 --- a/server/AyaNova/resource/rpt/stock-report-templates/EXAMPLE if key value X show Y via custom Helpers.ayrt +++ /dev/null @@ -1 +0,0 @@ -{"Name":"z_if key value X show Y via custom Helpers","Active":true,"Notes":"example custom Helper if has tag X then show Y, else return something else like preset text\nexample custom Helper of how to correctly wrap output in a safestring as result of Helper if need to use CSS styling","Roles":124927,"AType":26,"IncludeWoItemDescendants":false,"Template":"\n\n\n\t
\n\t

Use of Custom Helpers to display specific aspects if {{ayT 'Tags'}} have a specific value

\n\t\n\t
\n\t\n\t\t{{#each ayReportData}}\n\t\t\n\t\t\t\n\t\t\t\t\n\t\t\t\t\t\t\n\t\t\t\n\t\t\t\t\n\t\t\t\t\n\t\t\t\n\t\t\t\n\t\t\t\t\n\t\t\t\t\n\t\t\t\n\t\t\t\n\t\t\t\t\n\t\t\t\t\n\t\t\t\n\t\t\t\n\t\t\t\t\n\t\t\t\t\n\t\t\t\n\t\t\t\n\t\t\t\t\n\t\t\t\t\n\t\t\t\n\t\t\t\n\t\t\t\t\n\t\t\t\t{{#if CustomFields.c1}} {{else}} {{/if}}\n\t\t\t\n\t\t\t{{#each Items}}\n\t\t\t\n\t\t\t\t\n\t\t\t\t{{#if QuantityReceived}} {{else}} {{/if}}\n\t\t\t\n\t\t\t{{/each}}\n\t\t\n\t\t{{/each}}\n\t
For {{ayT 'PurchaseOrderPONumber'}} {{ Serial }}
Using HTML5 mustache to display all {{ayT 'Tags'}} for this {{ayT 'PurchaseOrder'}}{{ Tags}}
Using HTML5 mustache to display ONLY the 1st {{ayT 'Tag'}} for this {{ayT 'PurchaseOrder'}} {{ayT 'Tags'}}{{ Tags.[0]}}
Custom Helper to display if has {{ayT 'Tag'}} 'gold':{{ isInTag Tags}}
Custom Helper to display if has {{ayT 'Tag'}} 'brown':{{ isInTag2 Tags}}
Custom Helper to display if has {{ayT 'Tag'}} 'green' will display using safestring call of the CSS styling fontgreen else displays safestring call of the CSS styling fontred:{{ isInTag3 Tags}}
HTML5 use of #if to display PO's CustomFields.c1 value with CSS fontgreen applied to the text, else will display fontred if is is false, undefined, null, \"\", 0, or []{{CustomFields.c1}}No value has been entered in Custom1 field for this PO
HTML5 use of #each for each POitem - #if to display text in fontred if QuantyReceived is false, undefined, null, \"\", 0, or [], else display in fontgreen{{ayT 'Part'}} {{PartNameViz}} {{ayT 'PurchaseOrderItemQuantityOrdered'}} = {{QuantityOrdered}}
{{ayT \"PurchaseOrderItemQuantityReceived\"}} value is {{QuantityReceived}}
{{ayT 'Part'}} {{PartNameViz}} {{ayT 'PurchaseOrderItemQuantityOrdered'}} = {{QuantityOrdered}}
{{ayT 'Part'}} {{PartNameViz}} {{QuantityReceived}} value is {{ayT \"PurchaseOrderItemQuantityReceived\"}}!
\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 color: #9e9e9e;\n text-align: center;\n} \n\ntable { \n border-collapse: collapse;\n white-space: pre-wrap;\n width: 100%;\n table-layout: fixed; /* the # of columns set in the first row of the thead will be fixed and applied throughout table and rows */\n }\n\nth {\n border-bottom: solid 1pt #9e9e9e;\n height: 50px;\n font-size: 11pt; \n color: #9e9e9e;\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}\n.fontblue {\n color: blue;\n}\n.fontred {\n color:red;\n}\n\n","JsPrerender":"async function ayPrepareData(ayData){ \n //this function (if present) is called with the report data \n //before the report is rendered\n //modify data as required here and return it to change the data before the report renders\n //see the help documentation for details\n\n await ayGetTranslations([\"Part\", \"PurchaseOrderItemQuantityReceived\", \"PurchaseOrderItemQuantityOrdered\", \"Tag\", \"Tags\", \"PurchaseOrderPONumber\", \"PurchaseOrder\" ]);\n\n return ayData;\n}","JsHelpers":"Handlebars.registerHelper('isInTag', function (Tags) \n{\n for (var i=0; i\" + \"THE TEXT green IS IN FOUND IN THE TAGS ARRAY FOR THIS PO!! See how this shows in greenfont!\" +\"

\"); //if want to use CSS styling, be sure to wrap in a safestring\n\t\t}\n }\n return new Handlebars.SafeString(\"

\" + 'NOPE, THE TEXT green ISN\\'T IN THE TAGS ARRAY FOR THIS PO' +\"

\"); //if don't want to return any element at all, comment this else aspect out fully\n});\n","RenderType":0,"HeaderTemplate":"                Printed date: PDFDate\nPage of                ","FooterTemplate":"  ","DisplayHeaderFooter":true,"PaperFormat":10,"Landscape":false,"MarginOptionsBottom":"15mm","MarginOptionsLeft":"10mm","MarginOptionsRight":"10mm","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/EXAMPLE if key value is X show Y via custom Helpers Tags.ayrt b/server/AyaNova/resource/rpt/stock-report-templates/EXAMPLE if key value is X show Y via custom Helpers Tags.ayrt deleted file mode 100644 index 5b88ffd4..00000000 --- a/server/AyaNova/resource/rpt/stock-report-templates/EXAMPLE if key value is X show Y via custom Helpers Tags.ayrt +++ /dev/null @@ -1 +0,0 @@ -{"Name":"z_if key value is X show Y via custom Helpers Tags","Active":true,"Notes":"example custom Helper if has tag X then show Y, else return something else like preset text\nexample custom Helper of how to correctly wrap output in a safestring as result of Helper if need to use CSS styling","Roles":124927,"AType":34,"IncludeWoItemDescendants":false,"Template":"\n\n\n\t
\n\t

Use of Custom Helpers to display specific aspects if {{ayT 'Tags'}} have a specific value

\n\t\n\t
\n\t\n\t\t{{#each ayReportData}}\n\t\t\n\t\t\t\n\t\t\t\t\n\t\t\t\t\t\t\n\t\t\t\n\t\t\t\t\n\t\t\t\t\n\t\t\t\n\t\t\t\n\t\t\t\t\n\t\t\t\t\n\t\t\t\n\t\t\t\n\t\t\t\t\n\t\t\t\t\n\t\t\t\n\t\t\t\n\t\t\t\t\n\t\t\t\t\n\t\t\t\n\t\t\t\n\t\t\t\t\n\t\t\t\t\n\t\t\t\n\t\t\t\n\t\t\t\t\n\t\t\t\t{{#if CustomFields.c1}} {{else}} {{/if}}\n\t\t\t\n\t\t\t{{#each Items}}\n\t\t\t\t{{#each Parts}}\n\t\t\t\t\n\t\t\t\t\t\n\t\t\t\t\t{{#if Serials}} {{else}} {{/if}}\n\t\t\t\t\n\t\t\t\t{{/each}}\n\t\t\t{{/each}}\n\t\t\n\t\t{{/each}}\n\t
For {{ayT 'WorkOrder'}} {{ Serial }}
Using HTML5 mustache to display all {{ayT 'Tags'}} for this {{ayT 'WorkOrder'}}{{ Tags}}
Using HTML5 mustache to display ONLY the 1st {{ayT 'Tag'}} for this {{ayT 'WorkOrder'}} {{ayT 'Tags'}}{{ Tags.[0]}}
Custom Helper to display if has {{ayT 'Tag'}} 'gold':{{ isInTag Tags}}
Custom Helper to display if has {{ayT 'Tag'}} 'brown':{{ isInTag2 Tags}}
Custom Helper to display if has {{ayT 'Tag'}} 'green' will display using safestring call of the CSS styling fontgreen, else displays safestring call of the CSS styling fontred:{{ isInTag3 Tags}}
HTML5 use of #if to display WO's CustomFields.c1 value with CSS fontgreen applied to the text, else will display fontred if is is false, undefined, null, \"\", 0, or []{{CustomFields.c1}}No value has been entered in {{ayT 'WorkOrderCustom1'}} field for this {{ayT 'WorkOrder'}}
HTML5 use of #each for each WorkOrderItemPart record - #if to display text in fontred if Serials value is false, undefined, null, \"\", 0, or [], else display value in fontgreen{{ayT 'Part'}} {{PartNameViz}} {{ayT 'WorkOrderItemPartPartSerialID'}} = {{Serials}}{{ayT 'Part'}} {{PartNameViz}} has no {{ayT 'WorkOrderItemPartPartSerialID'}}!
\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 color: #9e9e9e;\n text-align: center;\n} \n\ntable { \n border-collapse: collapse;\n white-space: pre-wrap;\n width: 100%;\n table-layout: fixed; /* the # of columns set in the first row of the thead will be fixed and applied throughout table and rows */\n }\n\nth {\n border-bottom: solid 1pt #9e9e9e;\n height: 50px;\n font-size: 11pt; \n color: #9e9e9e;\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}\n.fontblue {\n color: blue;\n}\n.fontred {\n color:red;\n}\n\n","JsPrerender":"async function ayPrepareData(ayData){ \n //this function (if present) is called with the report data \n //before the report is rendered\n //modify data as required here and return it to change the data before the report renders\n //see the help documentation for details\n\n await ayGetTranslations([\"Part\", \"WorkOrderItemPartPartSerialID\", \"Tag\", \"Tags\", \"WorkOrderCustom1\", \"WorkOrder\" ]);\n\n return ayData;\n}","JsHelpers":"Handlebars.registerHelper('isInTag', function (Tags) \n{\n for (var i=0; i\" + \"THE TEXT green IS IN FOUND IN THE TAGS ARRAY FOR THIS WO!! See how this shows in greenfont!\" +\"

\"); //if want to use CSS styling, be sure to wrap in a safestring\n\t\t}\n }\n return new Handlebars.SafeString(\"

\" + 'NOPE, THE TEXT green ISN\\'T IN THE TAGS ARRAY FOR THIS WO' +\"

\"); //if don't want to return any element at all, comment this else aspect out fully\n});\n","RenderType":0,"HeaderTemplate":"                Printed date: PDFDate\nPage of                ","FooterTemplate":"  ","DisplayHeaderFooter":true,"PaperFormat":10,"Landscape":false,"MarginOptionsBottom":"15mm","MarginOptionsLeft":"10mm","MarginOptionsRight":"10mm","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/EXAMPLE table layout parent child grandchild.ayrt b/server/AyaNova/resource/rpt/stock-report-templates/EXAMPLE table layout parent child grandchild.ayrt deleted file mode 100644 index d5d5e5f5..00000000 --- a/server/AyaNova/resource/rpt/stock-report-templates/EXAMPLE table layout parent child grandchild.ayrt +++ /dev/null @@ -1 +0,0 @@ -{"Name":"z_table layout parent child grandchild","Active":true,"Notes":"","Roles":124927,"AType":34,"IncludeWoItemDescendants":false,"Template":"\n\t\n\n\t

Examples within this report template of how to access showing parent (i.e. property of the Work Order) child (i.e. property of the Work Order Item) and grandchild (property of Labor) all on same row

\n\t\n\n\t\n\t\t\n\t\t\t\n\t\t\t\n\t\t\t\n\t\t\t\n\t\t\n\t\n\n\t{{#each ayReportData}}\n\t\t\n\t\t\t\n\t\t{{#each Items}} \n\t\t\t{{#each Labors}}\n\t\t\t\n\t\t\t\t\n\t\t\t\t\n\t\t\t\t\n\t\t\t\t\n\t\t\t\n\t\t\t{{/each}}\n\t\t{{/each}}\t\t\n\t\n\t{{/each}}\n\n\t\n\t\t\n\t\t\t\n\t\t\t\n\t\t\t\n\t\t\n\t\t\n\n\t
{{ayT 'WorkOrder'}} {{ayT 'WorkOrderItemWorkOrderStatusID'}}{{ayT 'WorkOrderItemLaborServiceStartDate'}}{{ayT 'AuthorizationRoleTech'}}
{{../../Serial}} {{../WorkOrderItemStatusNameViz}} {{ServiceStartDate}}{{UserViz}}
footer stuff 1expands across two columns with or without having to have textfooter stuff 3
\t\n\n\n","Style":".singlePage\n{\npage-break-after: always;\n}\n\n.footertext {\n font-size: 14pt;\n font-style: italic;\n background-color: lightsteelblue;\n}\n\nbody {\n font-family: 'Helvetica', 'Helvetica Neue', Arial, sans-serif; \n}\n\n\ntable { \n border-collapse: collapse;\n white-space: pre-wrap;\n width: 100%;\n table-layout: fixed; /* the # of columns set in the first row of the thead will be fixed and applied throughout table and rows */\n }\n\nth {\n border-bottom: solid 1pt #9e9e9e;\n height: 50px;\n color: #9e9e9e;\n font-size: 11pt;\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}\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 await ayGetTranslations([\"WorkOrder\", \"WorkOrderItemWorkOrderStatusID\", \"WorkOrderItemLaborServiceStartDate\", \"AuthorizationRoleTech\" ]);\n\n return reportData;\n}","JsHelpers":"//Register custom Handlebars helpers here to use in your report script\n//https://handlebarsjs.com/guide/#custom-helpers\nHandlebars.registerHelper('loud', function (aString) {\n return aString.toUpperCase()\n})","RenderType":0,"HeaderTemplate":"    Todays date:    set in PDF Options","FooterTemplate":"  set in PDF Options  Page  of     ","DisplayHeaderFooter":true,"PaperFormat":10,"Landscape":false,"MarginOptionsBottom":"15mm","MarginOptionsLeft":"10mm","MarginOptionsRight":"10mm","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/EXAMPLE table layout parent child.ayrt b/server/AyaNova/resource/rpt/stock-report-templates/EXAMPLE table layout parent child.ayrt deleted file mode 100644 index ab753b15..00000000 --- a/server/AyaNova/resource/rpt/stock-report-templates/EXAMPLE table layout parent child.ayrt +++ /dev/null @@ -1 +0,0 @@ -{"Name":"z_table layout parent child","Active":true,"Notes":"example of displaying a Parent value when the #each references a Child, use a ../ in front of the Property name in the mustaches","Roles":124927,"AType":26,"IncludeWoItemDescendants":false,"Template":"\n\t\n\t\n\n\t\n\t\t\n\t\t\t\n\t\t\t\n\t\t\t\n\t\t\t\n\t\t\n\t\n\n\t{{#each ayReportData}}\n\t\t\n\t\t\t\n\t\t{{#each Items}} \n\t\t\t\n\t\t\t\t\n\t\t\t\t\n\t\t\t\t\n\t\t\t\t\n\t\t\t\n\t\t{{/each}}\t\t\n\t\n\t{{/each}}\n\n\t\n\t\t\n\t\t\t\n\t\t\t\n\t\t\t\n\t\t\n\t\t\n\n\t
column header 1 column header 2column header 3{{ayT 'PurchaseOrderItemSerialNumbers'}}
{{ayT 'PurchaseOrder'}} {{../Serial}} {{ayT 'PurchaseOrderItemPartNumber'}} {{PartNameViz}} {{ayT 'PurchaseOrderItemQuantityOrdered'}} {{QuantityOrdered}}{{Serials}}
footer stuff 1expands across two columns with or without having to have textfooter stuff 3
\t\n\n\n","Style":".singlePage\n{\npage-break-after: always;\n}\n\n.footertext {\n font-size: 14pt;\n font-style: italic;\n background-color: pink;\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 text-align: center;\n} \n\ntable { \n border-collapse: collapse;\n white-space: pre-wrap;\n width: 100%;\n table-layout: fixed; /* the # of columns set in the first row of the thead will be fixed and applied throughout table and rows */\n }\n\nth {\n border-bottom: solid 1pt #9e9e9e;\n height: 50px;\n font-size: 13pt; \n color: #9e9e9e;\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}\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 await ayGetTranslations([\"PurchaseOrder\", \"PurchaseOrderItemPartNumber\", \"PurchaseOrderItemQuantityOrdered\", \"PurchaseOrderItemSerialNumbers\" ]);\n\n return reportData;\n}","JsHelpers":"//Register custom Handlebars helpers here to use in your report script\n//https://handlebarsjs.com/guide/#custom-helpers\nHandlebars.registerHelper('loud', function (aString) {\n return aString.toUpperCase()\n})","RenderType":0,"HeaderTemplate":"    Todays date:    set in PDF Options","FooterTemplate":"  set in PDF Options  Page  of     ","DisplayHeaderFooter":true,"PaperFormat":10,"Landscape":false,"MarginOptionsBottom":"15mm","MarginOptionsLeft":"10mm","MarginOptionsRight":"10mm","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/PRODUCTION Inventory Reconciliation Form Grouped By Warehouse.ayrt b/server/AyaNova/resource/rpt/stock-report-templates/Inventory Reconciliation Form Grouped By Warehouse.ayrt similarity index 52% rename from server/AyaNova/resource/rpt/stock-report-templates/PRODUCTION Inventory Reconciliation Form Grouped By Warehouse.ayrt rename to server/AyaNova/resource/rpt/stock-report-templates/Inventory Reconciliation Form Grouped By Warehouse.ayrt index 6264444d..b6eb9420 100644 --- a/server/AyaNova/resource/rpt/stock-report-templates/PRODUCTION Inventory Reconciliation Form Grouped By Warehouse.ayrt +++ b/server/AyaNova/resource/rpt/stock-report-templates/Inventory Reconciliation Form Grouped By Warehouse.ayrt @@ -1 +1 @@ -{"Name":"Inventory Reconciliation Form Grouped By Warehouse","Active":true,"Notes":"Custom Prepare iterates through all the records in the reportData obtaining a running total of ReOrderQty for each group; \nPrepare uses ayGroupByKey to group by PartWarehouseName","Roles":49258,"AType":90,"IncludeWoItemDescendants":false,"Template":"\n\n\t
\n\t\t
\n\t\t\t

{{ayServerMetaData.CompanyName}} Inventory Reconciliation Form Grouped By {{ayT 'PartWarehouse'}}

\n\t\t
\t \n\n\t\t \n\t\t\t\n\t\t\t\t\n\t\t\t\t\t\n\t\t\t\t\t\n\t\t\t\t\t\n\t\t\t\t\t\n\t\t\t\t\t\n\t\t\t\t\t\n\t\t\t\t\t\n\t\t\t\t\n\t\t\t\n\n\t\t\t\n\t\t\t\t{{#each ayReportData}}\n\t\t\t\t\n\t\t\t\t\n\t\t\t\t\t\n\t\t\t\t\t\n\t\t\t\t\n\t\t\t\t\t{{#each items}}\n\t\t\t\t\t\n\t\t\t\t\t\t\n\t\t\t\t\t\t\n\t\t\t\t\t\t\n\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\n\t\t\t\t\t\t\n\t\t\t\t\t\n\t\t\t\t\t{{/each}}\n\t\t\t\t\n\t\t\t\t\t\n\t\t\t\t\n\t\t\t\t\n\t\t\t\t\t\n\t\t\t\t\n\t\t\t\t\n\t\t\t\t\t\n\t\t\t\t\n\t\t\t\t\n\t\t\t\t{{/each}}\n\t\t\t\n\n\t\t\t\n\t\t\t\t\n\t\t\t\t\n\t\t\t\t\n\t\t\t\t\n\t\t\t\t\n\t\t\t\t\n\t\t\t\t\n\t\t\t\t\n\t\t\t\t\n\t\t\t\t\n\t\t\t\t\n\t\t\t\t\n\t\t\t\t\n\t\t\t\t\n\t\t\t\t\n\t\t\t\t\n\t\t\t\t\n\t\t\t\t\n\t\t\t\t\n\t\t\t\t\n\t\t\t \n\t\t
 {{ayT 'Part'}}{{ayT 'Tags'}}{{ayT 'PartRetail'}}{{ayT 'PartByWarehouseInventoryQuantityOnHand'}}Actual CountDifference + / (-)
{{ayT 'PartWarehouse'}}:    {{group}}
{{PartName}}{{PartTags}}{{ayCurrency PartRetail}}{{OnHandQty}}  
{{count}} different parts in {{ayT 'PartWarehouse'}} {{group}}
Total {{ayT 'PartByWarehouseInventoryQuantityOnHand'}} for {{ayT 'PartWarehouse'}} {{group}}: {{ThisGroupTotalQty}}
 
 
Count By:________________________________________Count Date:________________________________________
 
 
Signature:________________________________________
\n\t
\n\n","Style":".singlePage\n{\npage-break-after: always;\n\n}\nbody {\n font-family: 'Helvetica', 'Helvetica Neue', Arial, sans-serif; \n}\n\n.reporttitle { \n margin-bottom: 20pt; \n font-weight: bold; \n font-size: 13pt; \n color: #9e9e9e;\n} \n\ntable { \n border-collapse: collapse;\n white-space: pre-wrap;\n width: 100%;\n table-layout: fixed; /* the # of columns set in the first row of the thead will be fixed and applied throughout table and rows */\n }\n\nth {\n height: 50px;\n font-size: 11pt; \n color: #9e9e9e;\n}\ntfoot {\n border-top: solid 1pt #9e9e9e; \n height: 30px;\n font-size: 11pt; \n color: #9e9e9e;\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(ayData) {\n\n //send the raw report data to the groupByKey function which will return a new array grouped by the key name provided\n ayData.ayReportData = ayGroupByKey(ayData.ayReportData, 'PartWarehouseName')\n\n await ayGetTranslations([\"PartWarehouse\", \"PartByWarehouseInventoryQuantityOnHand\", \"Tags\", \"PartRetail\", \"Part\" ]);\n\n //Iterate through all the records in the reportData obtaining a running total of ReOrderQty for each group\n for (EachGroup of ayData.ayReportData) \n { \n let ThisGroupTotalQty = 0; //Declare a temporary variable to hold the running Qty total for THIS group\n for (Item of EachGroup.items) //Iterate through all the poitems of THIS po adding the Qty amount of each item to the ThisPOTotalQty variable\n {\n //make sure it has a value before attempting to add it to the running total\n if (Item.OnHandQty != null) \n {\n ThisGroupTotalQty += Item.OnHandQty;\n }\n Item.QuantityRunning=ThisGroupTotalQty;\n }\n EachGroup.ThisGroupTotalQty=ThisGroupTotalQty;\n\n\n }\n\n //return the data into the pipeline to send to the report template\n return ayData;\n}","JsHelpers":"//Register custom Handlebars helpers here to use in your report script\n//https://handlebarsjs.com/guide/#custom-helpers\nHandlebars.registerHelper('loud', function (aString) {\n return aString.toUpperCase()\n})","RenderType":0,"HeaderTemplate":"  ","FooterTemplate":"                Printed date: PDFDate\nPage of                ","DisplayHeaderFooter":true,"PaperFormat":10,"Landscape":true,"MarginOptionsBottom":"15mm","MarginOptionsLeft":"10mm","MarginOptionsRight":"20mm","MarginOptionsTop":"10mm","PageRanges":null,"PreferCSSPageSize":false,"PrintBackground":true,"Scale":1.00000} \ No newline at end of file +{"Name":"Inventory Reconciliation Form Grouped By Warehouse","Active":true,"Notes":"Custom Prepare iterates through all the records in the reportData obtaining a running total of ReOrderQty for each group; \nPrepare uses ayGroupByKey to group by PartWarehouseName","Roles":49258,"AType":90,"IncludeWoItemDescendants":false,"Template":"\n\n\t
\n\t\t
\n\t\t\t

{{ayServerMetaData.CompanyName}} Inventory Reconciliation Form Grouped By {{ayT 'PartWarehouse'}}

\n\t\t
\t \n\n\t\t \n\t\t\t\n\t\t\t\t\n\t\t\t\t\t\n\t\t\t\t\t\n\t\t\t\t\t\n\t\t\t\t\t\n\t\t\t\t\t\n\t\t\t\t\t\n\t\t\t\t\t\n\t\t\t\t\n\t\t\t\n\n\t\t\t\n\t\t\t\t{{#each ayReportData}}\n\t\t\t\t\n\t\t\t\t\n\t\t\t\t\t\n\t\t\t\t\t\n\t\t\t\t\n\t\t\t\t\t{{#each items}}\n\t\t\t\t\t\n\t\t\t\t\t\t\n\t\t\t\t\t\t\n\t\t\t\t\t\t\n\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\n\t\t\t\t\t\t\n\t\t\t\t\t\n\t\t\t\t\t{{/each}}\n\t\t\t\t\n\t\t\t\t\t\n\t\t\t\t\n\t\t\t\t\n\t\t\t\t\t\n\t\t\t\t\n\t\t\t\t\n\t\t\t\t\t\n\t\t\t\t\n\t\t\t\t\n\t\t\t\t{{/each}}\n\t\t\t\n\n\t\t\t\n\t\t\t\t\n\t\t\t\t\n\t\t\t\t\n\t\t\t\t\n\t\t\t\t\n\t\t\t\t\n\t\t\t\t\n\t\t\t\t\n\t\t\t\t\n\t\t\t\t\n\t\t\t\t\n\t\t\t\t\n\t\t\t\t\n\t\t\t\t\n\t\t\t\t\n\t\t\t\t\n\t\t\t\t\n\t\t\t\t\n\t\t\t\t\n\t\t\t\t\n\t\t\t \n\t\t
 {{ayT 'Part'}}{{ayT 'Tags'}}{{ayT 'PartRetail'}}{{ayT 'PartByWarehouseInventoryQuantityOnHand'}}Actual CountDifference + / (-)
{{ayT 'PartWarehouse'}}:    {{group}}
{{PartName}}{{PartTags}}{{ayCurrency PartRetail}}{{OnHandQty}}  
{{count}} different parts in {{ayT 'PartWarehouse'}} {{group}}
Total {{ayT 'PartByWarehouseInventoryQuantityOnHand'}} for {{ayT 'PartWarehouse'}} {{group}}: {{ThisGroupTotalQty}}
 
 
Count By:________________________________________Count Date:________________________________________
 
 
Signature:________________________________________
\n\t
\n\n","Style":".singlePage\n{\npage-break-after: always;\n\n}\nbody {\n font-family: 'Helvetica', 'Helvetica Neue', Arial, sans-serif; \n}\n\n.reporttitle { \n margin-bottom: 20pt; \n font-weight: bold; \n font-size: 13pt; \n 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: 50px;\n font-size: 11pt; \n color: #9e9e9e;\n}\ntfoot {\n border-top: solid 1pt #9e9e9e; \n height: 30px;\n font-size: 11pt; \n color: #9e9e9e;\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(ayData) {\n\n //send the raw report data to the groupByKey function which will return a new array grouped by the key name provided\n ayData.ayReportData = ayGroupByKey(ayData.ayReportData, 'PartWarehouseName')\n\n await ayGetTranslations([\"PartWarehouse\", \"PartByWarehouseInventoryQuantityOnHand\", \"Tags\", \"PartRetail\", \"Part\" ]);\n\n //Iterate through all the records in the reportData obtaining a running total of ReOrderQty for each group\n for (EachGroup of ayData.ayReportData) \n { \n let ThisGroupTotalQty = 0; //Declare a temporary variable to hold the running Qty total for THIS group\n for (Item of EachGroup.items) //Iterate through all the poitems of THIS po adding the Qty amount of each item to the ThisPOTotalQty variable\n {\n //make sure it has a value before attempting to add it to the running total\n if (Item.OnHandQty != null) \n {\n ThisGroupTotalQty += Item.OnHandQty;\n }\n Item.QuantityRunning=ThisGroupTotalQty;\n }\n EachGroup.ThisGroupTotalQty=ThisGroupTotalQty;\n\n\n }\n\n //return the data into the pipeline to send to the report template\n return ayData;\n}","JsHelpers":"//Register custom Handlebars helpers here to use in your report script\n//https://handlebarsjs.com/guide/#custom-helpers\nHandlebars.registerHelper('loud', function (aString) {\n return aString.toUpperCase()\n})","RenderType":0,"HeaderTemplate":"  ","FooterTemplate":"                Printed date: PDFDate\nPage of                ","DisplayHeaderFooter":true,"PaperFormat":10,"Landscape":true,"MarginOptionsBottom":"15mm","MarginOptionsLeft":"10mm","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/Inventory transactions grouped by Part.ayrt b/server/AyaNova/resource/rpt/stock-report-templates/Inventory transactions grouped by Part.ayrt index ff409a4a..5349ce3b 100644 --- a/server/AyaNova/resource/rpt/stock-report-templates/Inventory transactions grouped by Part.ayrt +++ b/server/AyaNova/resource/rpt/stock-report-templates/Inventory transactions grouped by Part.ayrt @@ -1 +1 @@ -{"Name":"Inventory transactions grouped by Part","Active":true,"Notes":"","Roles":50538,"AType":67,"IncludeWoItemDescendants":false,"Template":"\n\n\n\t
\n\t\t
\n\t\t\t

{{ayT 'PartInventoryTransactionList'}} grouped by {{ayT 'Part'}}

\n\t\t
\n\n\t\t\n\t\t\t\n\t\t\t\n\n\t\t\t\n\t\t\t\t{{#each ayReportData}}\n\t\t\t\t\n\t\t\t\t\n\t\t\t\t\n\t\t\t\t\t\n\t\t\t\t\t\n\t\t\t\t\n\t\t\t\t\n\t\t\t\t\t\n\t\t\t\t\t\n\t\t\t\t\t\n\t\t\t\t\t\n\t\t\t\t\t\n\t\t\t\t\t\n\t\t\t\t\n\t\t\t\t{{#each items}}\n\t\t\t\t\n\t\t\t\t\t\n\t\t\t\t\t\n\t\t\t\t\t\n\t\t\t\t\t\n\t\t\t\t\t\n\t\t\t\t\t\n\t\t\t\t\n\t\t\t\t{{/each}}\n\t\t\t\t\n\t\t\t\t\t\n\t\t\t\t\n\n\t\t\t\t{{/each}}\n\t\t\t\n\n\t\t\t\n\t\t\t\n\n\t\t
{{ayT 'Part'}}: {{group}}
 {{ayT 'PartInventoryTransactionEntryDate'}}{{ayT 'PartInventoryTransactionDescription'}}{{ayT 'PartWarehouse'}}{{ayT 'PartInventoryTransactionQuantity'}}{{ayT 'PartInventoryBalance'}}
 {{ayDateTime EntryDate}}{{Description}}{{PartWarehouseViz}}{{Quantity}}{{Balance}}
 
\n\n\n\t
\n\n\n","Style":"body {\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 padding: 5px;\r\n font-size: 11pt; \r\n color: #9e9e9e;\r\n text-align: left;\r\n}\r\n\r\ntbody td {\r\n padding: 5px;\r\n word-wrap: break-word;\r\n font-size: 9pt;\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 font-size: 16pt;\r\n}\r\n.fontblue {\r\n color: blue;\r\n}\r\n.fontred {\r\n color:red;\r\n}","JsPrerender":"async function ayPrepareData(ayData){ \n\n ayData.ayReportData = ayGroupByKey(ayData.ayReportData, 'PartNameViz')\n\n await ayGetTranslations([\"PartInventoryTransactionList\", \"PartInventoryTransactionDescription\", \"PartInventoryTransactionEntryDate\", \"PartInventoryTransactionQuantity\", \"PartInventoryBalance\", \"PartWarehouse\", \"Part\" ]);\n\n return ayData;\n}","JsHelpers":"","RenderType":0,"HeaderTemplate":"  ","FooterTemplate":"                Printed date: PDFDate\nPage of                ","DisplayHeaderFooter":true,"PaperFormat":10,"Landscape":true,"MarginOptionsBottom":"15mm","MarginOptionsLeft":"15mm","MarginOptionsRight":"15mm","MarginOptionsTop":"15mm","PageRanges":null,"PreferCSSPageSize":false,"PrintBackground":true,"Scale":1.00000} \ No newline at end of file +{"Name":"Inventory transactions grouped by Part","Active":true,"Notes":"","Roles":50538,"AType":67,"IncludeWoItemDescendants":false,"Template":"\n\n\n\t
\n\t\t
\n\t\t\t

{{ayT 'PartInventoryTransactionList'}} grouped by {{ayT 'Part'}}

\n\t\t
\n\n\t\t\n\t\t\t\n\t\t\t\n\n\t\t\t\n\t\t\t\t{{#each ayReportData}}\n\t\t\t\t\n\t\t\t\t\n\t\t\t\t\n\t\t\t\t\t\n\t\t\t\t\t\n\t\t\t\t\n\t\t\t\t\n\t\t\t\t\t\n\t\t\t\t\t\n\t\t\t\t\t\n\t\t\t\t\t\n\t\t\t\t\t\n\t\t\t\t\t\n\t\t\t\t\n\t\t\t\t{{#each items}}\n\t\t\t\t\n\t\t\t\t\t\n\t\t\t\t\t\n\t\t\t\t\t\n\t\t\t\t\t\n\t\t\t\t\t\n\t\t\t\t\t\n\t\t\t\t\n\t\t\t\t{{/each}}\n\t\t\t\t\n\t\t\t\t\t\n\t\t\t\t\n\n\t\t\t\t{{/each}}\n\t\t\t\n\n\t\t\t\n\t\t\t\n\n\t\t
{{ayT 'Part'}}: {{group}}
 {{ayT 'PartInventoryTransactionEntryDate'}}{{ayT 'PartInventoryTransactionDescription'}}{{ayT 'PartWarehouse'}}{{ayT 'PartInventoryTransactionQuantity'}}{{ayT 'PartInventoryBalance'}}
 {{ayDateTime EntryDate}}{{Description}}{{PartWarehouseViz}}{{Quantity}}{{Balance}}
 
\n\n\n\n\n\t
\n\n\n","Style":"body {\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 padding: 5px;\r\n font-size: 11pt; \r\n color: #9e9e9e;\r\n text-align: left;\r\n}\r\n\r\ntbody td {\r\n padding: 5px;\r\n word-wrap: break-word;\r\n font-size: 9pt;\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 font-size: 16pt;\r\n}\r\n.fontblue {\r\n color: blue;\r\n}\r\n.fontred {\r\n color:red;\r\n}","JsPrerender":"async function ayPrepareData(ayData){ \n\n ayData.ayReportData = ayGroupByKey(ayData.ayReportData, 'PartNameViz')\n\n await ayGetTranslations([\"PartInventoryTransactionList\", \"PartInventoryTransactionDescription\", \"PartInventoryTransactionEntryDate\", \"PartInventoryTransactionQuantity\", \"PartInventoryBalance\", \"PartWarehouse\", \"Part\" ]);\n\n return ayData;\n}","JsHelpers":"","RenderType":0,"HeaderTemplate":"  ","FooterTemplate":"                Printed date: PDFDate\nPage of                ","DisplayHeaderFooter":true,"PaperFormat":10,"Landscape":true,"MarginOptionsBottom":"15mm","MarginOptionsLeft":"15mm","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/Labor Billing & Hours Grouped By Technician.ayrt b/server/AyaNova/resource/rpt/stock-report-templates/Labor Billing & Hours Grouped By Technician.ayrt new file mode 100644 index 00000000..d7aca232 --- /dev/null +++ b/server/AyaNova/resource/rpt/stock-report-templates/Labor Billing & Hours Grouped By Technician.ayrt @@ -0,0 +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 Total Quantity{{ayT \"WorkOrderItemLaborNoChargeQuantity\"}}{{ayT \"WorkOrderItemLaborServiceRateQuantity\"}}{{ayT \"NetValue\"}}
{{ayT 'WorkOrderItemLabors'}} for {{group}}# of labor items: {{count}}
 {{Serial}}{{ayDateTime ServiceStartDate}} to {{ayDateTime ServiceStopDate}}{{ServiceRateViz}}{{ayCurrency PriceViz}} {{UnitOfMeasureViz}}{{diffHours}}{{NoChargeQuantity}}{{ServiceRateQuantity}}{{ayCurrency NetViz}}
 
Total {{ayT \"WorkOrderItemLaborServiceRateQuantity\"}} + {{ayT \"WorkOrderItemLaborNoChargeQuantity\" }} = {{EachGroupWOLaborsNCQtyplusBillableQty}} for {{group}}{{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//need to now edit below to get running totals of THE DATA returned above - can't reference items as not in the returned data\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 (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 (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\t\t\t\t\t\t\t\t\t\t\t\n\t\t\t\t\t\t\t\t\t\t\tdateTime1 = new Date (groupitem.ServiceStopDate);\n\t\t\t\t\t\t\t\t\t\t\tdateTime2 = 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\tdiffMillis = (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\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/Loaner Items.ayrt b/server/AyaNova/resource/rpt/stock-report-templates/Loaner Items.ayrt new file mode 100644 index 00000000..4e00131a --- /dev/null +++ b/server/AyaNova/resource/rpt/stock-report-templates/Loaner Items.ayrt @@ -0,0 +1 @@ +{"Name":"Loaner Items","Active":true,"Notes":"","Roles":50538,"AType":16,"IncludeWoItemDescendants":false,"Template":"\n\n\n
\n
\n

{{ayT 'LoanUnitList'}} List

\n
\n\n \n \n \n \n \n \n \n \n \n \n \n \n \n\n \n {{#each ayReportData}}\n \n {{#if Serial}}{{else}}{{/if}}\n {{#if WorkOrderSerialViz}} \n \n \n \n \n \n \n {{else}} \n \n \n {{/if}}\n \n {{/each}}\n \n\n \n \n\n
{{ayT 'LoanUnit'}}{{ayT 'WorkOrder'}}{{ayT 'Customer'}}{{ayT 'WorkOrderItemLoanOutDate'}}{{ayT 'WorkOrderItemLoanDueDate'}}{{ayT 'WorkOrderItemLoanQuantity'}}{{ayT 'WorkOrderItemLoanRate'}}
{{ayT 'LoanUnitSerial'}}: {{Serial}} {{Name}}{{Name}}{{WorkOrderSerialViz}}{{WorkOrderCustomerViz}}{{ayDateTime WorkOrderOutDateViz}}{{ayDateTime WorkOrderDueDateViz}}{{WorkOrderQuantityViz}}{{WorkOrderRateViz}}Not presently loaned out on any work order
\n\n\n
\n\n\n","Style":"body {\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: 20px;\r\n font-size: 10pt; \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: 8pt;\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 font-size: 16pt;\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":" \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\nasync function ayPrepareData(ayData) { \n\n await ayGetTranslations([ \"LoanUnitList\", \"LoanUnitSerial\", \"LoanUnit\", \"WorkOrder\", \"Customer\", \"WorkOrderItemLoanDueDate\", \"WorkOrderItemLoanOutDate\", \"WorkOrderItemLoanReturnDate\", \"WorkOrderItemLoanQuantity\", \"WorkOrderItemLoanRate\" ]);\n\n \n return ayData;\n}","JsHelpers":"//Register custom Handlebars helpers here to use in your report script\r\n//https://handlebarsjs.com/guide/#custom-helpers","RenderType":0,"HeaderTemplate":"  ","FooterTemplate":"                Printed date: PDFDate\nPage of                ","DisplayHeaderFooter":true,"PaperFormat":0,"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/Memos.ayrt b/server/AyaNova/resource/rpt/stock-report-templates/Memos.ayrt index eb4eed4e..22d10f8c 100644 --- a/server/AyaNova/resource/rpt/stock-report-templates/Memos.ayrt +++ b/server/AyaNova/resource/rpt/stock-report-templates/Memos.ayrt @@ -1 +1 @@ -{"Name":"Memos","Active":true,"Notes":"","Roles":50538,"AType":60,"IncludeWoItemDescendants":false,"Template":"\n\n\n
\n
\n

{{ayT 'MemoList'}} List

\n
\n\n \n \n \n \n \n \n \n \n \n \n \n \n\n \n {{#each ayReportData}}\n \n \n\t\t\t\t\t{{#if Viewed}}\n\t\t\t\t\t{{else}}{{/if}}\n\n \n \n \n \n \n \n {{/each}}\n \n\n \n \n\n
{{ayT 'MemoViewed'}}{{ayT 'MemoSent'}}{{ayT 'MemoFromID'}}{{ayT 'MemoSubject'}}{{ayT 'MemoMessage'}}
{{ayDateTime Sent}}{{FromViz}}{{Name}}{{Notes}}
\n\n\n
\n\n\n","Style":"body {\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: 20px;\r\n font-size: 10pt; \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: 8pt;\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 font-size: 16pt;\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":" \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\nasync function ayPrepareData(ayData) { \n\n await ayGetTranslations([ \"MemoFromID\", \"MemoSent\", \"MemoList\", \"MemoSubject\", \"MemoViewed\", \"MemoMessage\" ]);\n\n \n return ayData;\n}","JsHelpers":"//Register custom Handlebars helpers here to use in your report script\r\n//https://handlebarsjs.com/guide/#custom-helpers\r\n","RenderType":0,"HeaderTemplate":"  ","FooterTemplate":"                Printed date: PDFDate\nPage of                ","DisplayHeaderFooter":true,"PaperFormat":0,"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":"Memos","Active":true,"Notes":"","Roles":124927,"AType":60,"IncludeWoItemDescendants":false,"Template":"\n\n\n
\n
\n

{{ayT 'MemoList'}} List

\n
\n\n \n \n \n \n \n \n \n \n \n \n \n \n\n \n {{#each ayReportData}}\n \n \n\t\t\t\t\t{{#if Viewed}}\n\t\t\t\t\t{{else}}{{/if}}\n\n \n \n \n \n \n \n {{/each}}\n \n\n \n \n\n
{{ayT 'MemoViewed'}}{{ayT 'MemoSent'}}{{ayT 'MemoFromID'}}{{ayT 'MemoSubject'}}{{ayT 'MemoMessage'}}
{{ayDateTime Sent}}{{FromViz}}{{Name}}{{Notes}}
\n\n\n
\n\n\n","Style":"body {\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: 20px;\r\n font-size: 10pt; \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: 8pt;\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 font-size: 16pt;\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":" \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\nasync function ayPrepareData(ayData) { \n\n await ayGetTranslations([ \"MemoFromID\", \"MemoSent\", \"MemoList\", \"MemoSubject\", \"MemoViewed\", \"MemoMessage\" ]);\n\n \n return ayData;\n}","JsHelpers":"//Register custom Handlebars helpers here to use in your report script\r\n//https://handlebarsjs.com/guide/#custom-helpers\r\n","RenderType":0,"HeaderTemplate":"  ","FooterTemplate":"                Printed date: PDFDate\nPage of                ","DisplayHeaderFooter":true,"PaperFormat":0,"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/Net Taxes and Totals for Each WO.ayrt b/server/AyaNova/resource/rpt/stock-report-templates/Net Taxes and Totals for Each WO.ayrt new file mode 100644 index 00000000..9121f06e --- /dev/null +++ b/server/AyaNova/resource/rpt/stock-report-templates/Net Taxes and Totals for Each WO.ayrt @@ -0,0 +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 (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 (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 (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 (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 (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 (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 (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 (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":"//Register custom Handlebars helpers here to use in your report script\n//https://handlebarsjs.com/guide/#custom-helpers\nHandlebars.registerHelper('loud', function (aString) {\n return aString.toUpperCase()\n})","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 new file mode 100644 index 00000000..9761f75a --- /dev/null +++ b/server/AyaNova/resource/rpt/stock-report-templates/Net Totals for Each PM Item.ayrt @@ -0,0 +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 (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 (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 (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 (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 (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 (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 (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 (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":"//Register custom Handlebars helpers here to use in your report script\n//https://handlebarsjs.com/guide/#custom-helpers\nHandlebars.registerHelper('loud', function (aString) {\n return aString.toUpperCase()\n})","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 new file mode 100644 index 00000000..3821b328 --- /dev/null +++ b/server/AyaNova/resource/rpt/stock-report-templates/Net Totals for Each Quote Item.ayrt @@ -0,0 +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 (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 (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 (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 (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 (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 (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 (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 (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":"//Register custom Handlebars helpers here to use in your report script\n//https://handlebarsjs.com/guide/#custom-helpers\nHandlebars.registerHelper('loud', function (aString) {\n return aString.toUpperCase()\n})","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 new file mode 100644 index 00000000..fc0652af --- /dev/null +++ b/server/AyaNova/resource/rpt/stock-report-templates/Net Totals for Each WO Item.ayrt @@ -0,0 +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 (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 (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 (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 (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 (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 (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 (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 (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":"//Register custom Handlebars helpers here to use in your report script\n//https://handlebarsjs.com/guide/#custom-helpers\nHandlebars.registerHelper('loud', function (aString) {\n return aString.toUpperCase()\n})","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 new file mode 100644 index 00000000..71ca61da --- /dev/null +++ b/server/AyaNova/resource/rpt/stock-report-templates/Net Totals for Each WO.ayrt @@ -0,0 +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 (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 (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 (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 (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 (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 (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 (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 (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":"//Register custom Handlebars helpers here to use in your report script\n//https://handlebarsjs.com/guide/#custom-helpers\nHandlebars.registerHelper('loud', function (aString) {\n return aString.toUpperCase()\n})","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 96e45053..c4f69ffc 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; /* the # of columns set in the first row of the thead will be fixed and applied throughout table and rows */\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\", \"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 (EachWO of reportData.ayReportData) {\n\n\t\t//below is to Iterate through each item of the wo's Items\n\t\tfor (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 (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":"//Register custom Handlebars helpers here to use in your report script\n//https://handlebarsjs.com/guide/#custom-helpers\nHandlebars.registerHelper('loud', function (aString) {\n return aString.toUpperCase()\n})","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\", \"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 (EachWO of reportData.ayReportData) {\n\n\t\t//below is to Iterate through each item of the wo's Items\n\t\tfor (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 (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":"//Register custom Handlebars helpers here to use in your report script\n//https://handlebarsjs.com/guide/#custom-helpers\nHandlebars.registerHelper('loud', function (aString) {\n return aString.toUpperCase()\n})","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 6048cc05..9c378a8c 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
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; /* the # of columns set in the first row of the thead will be fixed and applied throughout table and rows */\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 (EachWO of reportData.ayReportData) {\n\n\t\t//below is to Iterate through each item of the wo's Items\n\t\tfor (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 (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":"//Register custom Handlebars helpers here to use in your report script\n//https://handlebarsjs.com/guide/#custom-helpers\nHandlebars.registerHelper('loud', function (aString) {\n return aString.toUpperCase()\n})","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 '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
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 (EachWO of reportData.ayReportData) {\n\n\t\t//below is to Iterate through each item of the wo's Items\n\t\tfor (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 (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":"//Register custom Handlebars helpers here to use in your report script\n//https://handlebarsjs.com/guide/#custom-helpers\nHandlebars.registerHelper('loud', function (aString) {\n return aString.toUpperCase()\n})","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 48c7bb1f..1668b942 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
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; /* the # of columns set in the first row of the thead will be fixed and applied throughout table and rows */\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//********************//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 (EachWO of reportData.ayReportData) {\n\n\t\t//below is to Iterate through each item of the wo's Items\n\t\tfor (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 (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":"//Register custom Handlebars helpers here to use in your report script\n//https://handlebarsjs.com/guide/#custom-helpers\nHandlebars.registerHelper('loud', function (aString) {\n return aString.toUpperCase()\n})","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 '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
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//********************//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 (EachWO of reportData.ayReportData) {\n\n\t\t//below is to Iterate through each item of the wo's Items\n\t\tfor (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 (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":"//Register custom Handlebars helpers here to use in your report script\n//https://handlebarsjs.com/guide/#custom-helpers\nHandlebars.registerHelper('loud', function (aString) {\n return aString.toUpperCase()\n})","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 9c32d104..1980ffa4 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}}{{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; /* the # of columns set in the first row of the thead will be fixed and applied throughout table and rows */\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 (EachWO of reportData.ayReportData) {\n\n\t\t//below is to Iterate through each item of the wo's Items\n\t\tfor (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 (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":"//Register custom Handlebars helpers here to use in your report script\n//https://handlebarsjs.com/guide/#custom-helpers\nHandlebars.registerHelper('loud', function (aString) {\n return aString.toUpperCase()\n})","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 '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
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 (EachWO of reportData.ayReportData) {\n\n\t\t//below is to Iterate through each item of the wo's Items\n\t\tfor (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 (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":"//Register custom Handlebars helpers here to use in your report script\n//https://handlebarsjs.com/guide/#custom-helpers\nHandlebars.registerHelper('loud', function (aString) {\n return aString.toUpperCase()\n})","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 564b8ae4..f3224efc 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
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; /* the # of columns set in the first row of the thead will be fixed and applied throughout table and rows */\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 (EachWO of reportData.ayReportData) {\n\n\t\t//below is to Iterate through each item of the wo's Items\n\t\tfor (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 (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":"//Register custom Handlebars helpers here to use in your report script\n//https://handlebarsjs.com/guide/#custom-helpers\nHandlebars.registerHelper('loud', function (aString) {\n return aString.toUpperCase()\n})","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 '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
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 (EachWO of reportData.ayReportData) {\n\n\t\t//below is to Iterate through each item of the wo's Items\n\t\tfor (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 (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":"//Register custom Handlebars helpers here to use in your report script\n//https://handlebarsjs.com/guide/#custom-helpers\nHandlebars.registerHelper('loud', function (aString) {\n return aString.toUpperCase()\n})","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 e8ded64e..e86d63ba 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; /* the # of columns set in the first row of the thead will be fixed and applied throughout table and rows */\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\", \"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 (EachWO of reportData.ayReportData) {\n\n\t\t//below is to Iterate through each item of the wo's Items\n\t\tfor (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 (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":"//Register custom Handlebars helpers here to use in your report script\n//https://handlebarsjs.com/guide/#custom-helpers\nHandlebars.registerHelper('loud', function (aString) {\n return aString.toUpperCase()\n})","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\", \"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 (EachWO of reportData.ayReportData) {\n\n\t\t//below is to Iterate through each item of the wo's Items\n\t\tfor (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 (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":"//Register custom Handlebars helpers here to use in your report script\n//https://handlebarsjs.com/guide/#custom-helpers\nHandlebars.registerHelper('loud', function (aString) {\n return aString.toUpperCase()\n})","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 b24f6255..df57e41b 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 'WorkOrderItemLaborPrice'}}{{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
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; /* the # of columns set in the first row of the thead will be fixed and applied throughout table and rows */\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\", \"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 (EachWO of reportData.ayReportData) {\n\n\t\t//below is to Iterate through each item of the wo's Items\n\t\tfor (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 (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":"//Register custom Handlebars helpers here to use in your report script\n//https://handlebarsjs.com/guide/#custom-helpers\nHandlebars.registerHelper('loud', function (aString) {\n return aString.toUpperCase()\n})","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 'WorkOrderItemLaborPrice'}}{{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
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\", \"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 (EachWO of reportData.ayReportData) {\n\n\t\t//below is to Iterate through each item of the wo's Items\n\t\tfor (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 (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":"//Register custom Handlebars helpers here to use in your report script\n//https://handlebarsjs.com/guide/#custom-helpers\nHandlebars.registerHelper('loud', function (aString) {\n return aString.toUpperCase()\n})","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 931a7d64..f7baa53d 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
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; /* the # of columns set in the first row of the thead will be fixed and applied throughout table and rows */\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 (EachWO of reportData.ayReportData) {\n\n\t\t//below is to Iterate through each item of the wo's Items\n\t\tfor (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 (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":"//Register custom Handlebars helpers here to use in your report script\n//https://handlebarsjs.com/guide/#custom-helpers\nHandlebars.registerHelper('loud', function (aString) {\n return aString.toUpperCase()\n})","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 '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
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 (EachWO of reportData.ayReportData) {\n\n\t\t//below is to Iterate through each item of the wo's Items\n\t\tfor (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 (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":"//Register custom Handlebars helpers here to use in your report script\n//https://handlebarsjs.com/guide/#custom-helpers\nHandlebars.registerHelper('loud', function (aString) {\n return aString.toUpperCase()\n})","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 1e8d405c..51e2d4c2 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}}{{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; /* the # of columns set in the first row of the thead will be fixed and applied throughout table and rows */\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 (EachWO of reportData.ayReportData) {\n\n\t\t//below is to Iterate through each item of the wo's Items\n\t\tfor (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 (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":"//Register custom Handlebars helpers here to use in your report script\n//https://handlebarsjs.com/guide/#custom-helpers\nHandlebars.registerHelper('loud', function (aString) {\n return aString.toUpperCase()\n})","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 'NetValue'}}{{ayT 'TaxCodeTaxA'}}{{ayT 'TaxCodeTaxB'}}{{ayT 'Total'}}
{{../../Serial}}{{../../CustomerViz}}{{ayDate ../../Requested}}{{PartNameViz}}{{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 (EachWO of reportData.ayReportData) {\n\n\t\t//below is to Iterate through each item of the wo's Items\n\t\tfor (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 (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":"//Register custom Handlebars helpers here to use in your report script\n//https://handlebarsjs.com/guide/#custom-helpers\nHandlebars.registerHelper('loud', function (aString) {\n return aString.toUpperCase()\n})","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 dc4a0117..9f143a85 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 {{/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
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; /* the # of columns set in the first row of the thead will be fixed and applied throughout table and rows */\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 (EachWO of reportData.ayReportData) {\n\n\t\t//below is to Iterate through each item of the wo's Items\n\t\tfor (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 (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":"//Register custom Handlebars helpers here to use in your report script\n//https://handlebarsjs.com/guide/#custom-helpers\nHandlebars.registerHelper('loud', function (aString) {\n return aString.toUpperCase()\n})","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 {{/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
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 (EachWO of reportData.ayReportData) {\n\n\t\t//below is to Iterate through each item of the wo's Items\n\t\tfor (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 (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":"//Register custom Handlebars helpers here to use in your report script\n//https://handlebarsjs.com/guide/#custom-helpers\nHandlebars.registerHelper('loud', function (aString) {\n return aString.toUpperCase()\n})","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 4028607b..cd89221f 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; /* the # of columns set in the first row of the thead will be fixed and applied throughout table and rows */\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\", \"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 (EachWO of reportData.ayReportData) {\n\n\t\t//below is to Iterate through each item of the wo's Items\n\t\tfor (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 (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":"//Register custom Handlebars helpers here to use in your report script\n//https://handlebarsjs.com/guide/#custom-helpers\nHandlebars.registerHelper('loud', function (aString) {\n return aString.toUpperCase()\n})","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\", \"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 (EachWO of reportData.ayReportData) {\n\n\t\t//below is to Iterate through each item of the wo's Items\n\t\tfor (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 (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":"//Register custom Handlebars helpers here to use in your report script\n//https://handlebarsjs.com/guide/#custom-helpers\nHandlebars.registerHelper('loud', function (aString) {\n return aString.toUpperCase()\n})","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 e43c4d20..7dd24c49 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; /* the # of columns set in the first row of the thead will be fixed and applied throughout table and rows */\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 (EachWO of reportData.ayReportData) {\n\n\t\t//below is to Iterate through each item of the wo's Items\n\t\tfor (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 (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":"//Register custom Handlebars helpers here to use in your report script\n//https://handlebarsjs.com/guide/#custom-helpers\nHandlebars.registerHelper('loud', function (aString) {\n return aString.toUpperCase()\n})","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 '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 (EachWO of reportData.ayReportData) {\n\n\t\t//below is to Iterate through each item of the wo's Items\n\t\tfor (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 (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":"//Register custom Handlebars helpers here to use in your report script\n//https://handlebarsjs.com/guide/#custom-helpers\nHandlebars.registerHelper('loud', function (aString) {\n return aString.toUpperCase()\n})","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 29628464..dad596c6 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; /* the # of columns set in the first row of the thead will be fixed and applied throughout table and rows */\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 (EachWO of reportData.ayReportData) {\n\n\t\t//below is to Iterate through each item of the wo's Items\n\t\tfor (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 (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":"//Register custom Handlebars helpers here to use in your report script\n//https://handlebarsjs.com/guide/#custom-helpers\nHandlebars.registerHelper('loud', function (aString) {\n return aString.toUpperCase()\n})","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 '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 (EachWO of reportData.ayReportData) {\n\n\t\t//below is to Iterate through each item of the wo's Items\n\t\tfor (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 (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":"//Register custom Handlebars helpers here to use in your report script\n//https://handlebarsjs.com/guide/#custom-helpers\nHandlebars.registerHelper('loud', function (aString) {\n return aString.toUpperCase()\n})","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 6f1e7306..f59556a7 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'}}{{ayT 'WorkOrderItemPartQuantity'}}{{ayT 'NetValue'}}{{ayT 'TaxCodeTaxA'}}{{ayT 'TaxCodeTaxB'}}{{ayT 'Total'}}
{{../../Serial}}{{../../CustomerViz}}{{ayDate ../../ServiceDate}}{{PartNameViz}}{{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; /* the # of columns set in the first row of the thead will be fixed and applied throughout table and rows */\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//********************//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 (EachWO of reportData.ayReportData) {\n\n\t\t//below is to Iterate through each item of the wo's Items\n\t\tfor (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 (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":"//Register custom Handlebars helpers here to use in your report script\n//https://handlebarsjs.com/guide/#custom-helpers\nHandlebars.registerHelper('loud', function (aString) {\n return aString.toUpperCase()\n})","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'}}{{ayT 'WorkOrderItemPartQuantity'}}{{ayT 'NetValue'}}{{ayT 'TaxCodeTaxA'}}{{ayT 'TaxCodeTaxB'}}{{ayT 'Total'}}
{{../../Serial}}{{../../CustomerViz}}{{ayDate ../../ServiceDate}}{{PartNameViz}}{{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//********************//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 (EachWO of reportData.ayReportData) {\n\n\t\t//below is to Iterate through each item of the wo's Items\n\t\tfor (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 (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":"//Register custom Handlebars helpers here to use in your report script\n//https://handlebarsjs.com/guide/#custom-helpers\nHandlebars.registerHelper('loud', function (aString) {\n return aString.toUpperCase()\n})","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 49782dfd..69a13b8c 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; /* the # of columns set in the first row of the thead will be fixed and applied throughout table and rows */\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 (EachWO of reportData.ayReportData) {\n\n\t\t//below is to Iterate through each item of the wo's Items\n\t\tfor (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 (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":"//Register custom Handlebars helpers here to use in your report script\n//https://handlebarsjs.com/guide/#custom-helpers\nHandlebars.registerHelper('loud', function (aString) {\n return aString.toUpperCase()\n})","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 '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 (EachWO of reportData.ayReportData) {\n\n\t\t//below is to Iterate through each item of the wo's Items\n\t\tfor (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 (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":"//Register custom Handlebars helpers here to use in your report script\n//https://handlebarsjs.com/guide/#custom-helpers\nHandlebars.registerHelper('loud', function (aString) {\n return aString.toUpperCase()\n})","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 43ba1d10..afb3763c 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
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; /* the # of columns set in the first row of the thead will be fixed and applied throughout table and rows */\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//********************//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 (EachWO of reportData.ayReportData) {\n\n\t\t//below is to Iterate through each item of the wo's Items\n\t\tfor (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 (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 '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([\"PreventiveMaintenance\", \"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 (EachWO of reportData.ayReportData) {\n\n\t\t//below is to Iterate through each item of the wo's Items\n\t\tfor (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 (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 fc57768d..5472b6ea 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
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; /* the # of columns set in the first row of the thead will be fixed and applied throughout table and rows */\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 (EachWO of reportData.ayReportData) {\n\n\t\t//below is to Iterate through each item of the wo's Items\n\t\tfor (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 (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 '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([ \"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 (EachWO of reportData.ayReportData) {\n\n\t\t//below is to Iterate through each item of the wo's Items\n\t\tfor (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 (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 e5afdb15..4bc7fe8d 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; /* the # of columns set in the first row of the thead will be fixed and applied throughout table and rows */\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 (EachWO of reportData.ayReportData) {\n\n\t\t//below is to Iterate through each item of the wo's Items\n\t\tfor (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 (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 '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 (EachWO of reportData.ayReportData) {\n\n\t\t//below is to Iterate through each item of the wo's Items\n\t\tfor (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 (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 Item Summary.ayrt b/server/AyaNova/resource/rpt/stock-report-templates/PM Item Summary.ayrt new file mode 100644 index 00000000..ca6448e1 --- /dev/null +++ b/server/AyaNova/resource/rpt/stock-report-templates/PM Item Summary.ayrt @@ -0,0 +1 @@ +{"Name":"PM Item Summary","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":false,"Template":"\n\n\n
\n
\n

{{ayT 'PM'}} {{ayT 'WorkOrderItem'}} {{ayT 'WorkOrderItemSummary'}}

\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 \n \n \n \n \n \n \n \n \n {{/each}}\n {{/each}}\n \n \n \n
{{ayT 'PM'}} & {{ayT 'WorkOrderItem'}} {{ayT 'Sequence'}}{{ayT 'Customer'}}{{ayT 'PMNextServiceDate'}}{{ayT 'WorkOrderItemRequestDate'}}{{ayT 'WorkOrderItemWorkOrderStatusID'}}{{ayT 'Priority'}}{{ayT 'WorkOrderItemSummary'}}
{{PMId}} - {{Sequence}}{{../CustomerViz}}{{ayDate ../NextServiceDate}}{{ayDate RequestDate}}{{WorkOrderItemStatusNameViz}}{{WorkOrderItemPriorityNameViz}}{{Notes}}
 
\n\n
\n\n\n","Style":"\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: 5px;\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\", \"WorkOrderItemSummary\", \"Priority\", \"WorkOrderItemRequestDate\"]);\n\n\n\n return reportData;\n}","JsHelpers":"//Register custom Handlebars helpers here to use in your report script\n//https://handlebarsjs.com/guide/#custom-helpers\nHandlebars.registerHelper('loud', function (aString) {\n return aString.toUpperCase()\n})","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 Item Tasks .ayrt b/server/AyaNova/resource/rpt/stock-report-templates/PM Item Tasks .ayrt index 80e855fb..43bf5ab7 100644 --- a/server/AyaNova/resource/rpt/stock-report-templates/PM Item Tasks .ayrt +++ b/server/AyaNova/resource/rpt/stock-report-templates/PM Item Tasks .ayrt @@ -1 +1 @@ -{"Name":"PM Item Tasks ","Active":true,"Notes":"","Roles":50538,"AType":86,"IncludeWoItemDescendants":false,"Template":"\n\n\n
\n
\n

{{ayT 'PreventiveMaintenance'}} {{ayT 'WorkOrderItemList'}} {{ayT 'WorkOrderItemTasks'}} List

\n
\n\n \n \n \n \n \n \n \n\n\n\t\t\t\t\t \n\t\t\t\t\t\n \n \n\n \n {{#each ayReportData}}\n {{#each Items}}\n {{#each Tasks}}\n \n \n \n \n\n\t\t\t\t\t\n\t\t\t\t\t{{#if_eq Status 2}}\n\t\t\t\t\t{{else}}{{/if_eq}}\n\t\t\t\t\t\n \n \n {{/each}}\n {{/each}}\n {{/each}}\n \n\n \n \n\n
{{ayT 'PreventiveMaintenance'}}{{ayT 'PMNextServiceDate'}}{{ayT 'WorkOrderItemSummary'}}{{ayT 'WorkOrderItemTaskWorkOrderItemTaskCompletionType'}}{{ayT 'WorkOrderItemTasks'}}
{{../../Serial}}{{ayDateTime ../../NextServiceDate}}{{../Notes}}{{StatusViz}} {{StatusViz}} {{Task}}
\n\n\n
\n\n\n","Style":"body {\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: 20px;\r\n font-size: 10pt; \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: 8pt;\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 font-size: 16pt;\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":" \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\nasync function ayPrepareData(ayData) { \n\n await ayGetTranslations([ \"WorkOrderItemTasks\", \"PreventiveMaintenance\", \"WorkOrderItemList\", \"PMNextServiceDate\", \"WorkOrderItemSummary\", \"WorkOrderItemTaskWorkOrderItemTask\", \"WorkOrderItemTaskWorkOrderItemTaskCompletionType\" ]);\n\n\n \n return ayData;\n}","JsHelpers":"//Register custom Handlebars helpers here to use in your report script\r\n//https://handlebarsjs.com/guide/#custom-helpers\r\n\r\n//custom helper so can do a direct comparison - i.e. if value equals xxxx, then show, else show yyyyy\r\n//note that this HAS to be added here in Helpers, is NOT built in\r\nHandlebars.registerHelper('if_eq', function(a, b, opts) {\r\n if(a == b) // Or === depending on your needs\r\n return opts.fn(this);\r\n else\r\n return opts.inverse(this);\r\n});","RenderType":0,"HeaderTemplate":"  ","FooterTemplate":"                Printed date: PDFDate\nPage of                ","DisplayHeaderFooter":true,"PaperFormat":0,"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 Item Tasks ","Active":true,"Notes":"","Roles":50538,"AType":86,"IncludeWoItemDescendants":false,"Template":"\n\n\n
\n
\n

{{ayT 'PreventiveMaintenance'}} {{ayT 'WorkOrderItemList'}} {{ayT 'WorkOrderItemTasks'}} List

\n
\n\n \n \n \n \n \n \n \n\n\n\t\t\t\t\t \n\t\t\t\t\t\n \n \n\n \n {{#each ayReportData}}\n {{#each Items}}\n {{#each Tasks}}\n \n \n \n \n\n\t\t\t\t\t\n\t\t\t\t\t{{#if_eq Status 2}}\n\t\t\t\t\t{{else}}{{/if_eq}}\n\t\t\t\t\t\n \n \n {{/each}}\n {{/each}}\n {{/each}}\n \n\n \n \n\n
{{ayT 'PreventiveMaintenance'}}{{ayT 'PMNextServiceDate'}}{{ayT 'WorkOrderItemSummary'}}{{ayT 'WorkOrderItemTaskWorkOrderItemTaskCompletionType'}}{{ayT 'WorkOrderItemTasks'}}
{{../../Serial}}{{ayDateTime ../../NextServiceDate}}{{../Notes}}{{StatusViz}} {{StatusViz}} {{Task}}
\n\n\n
\n\n\n","Style":"body {\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: 20px;\r\n font-size: 10pt; \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: 8pt;\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 font-size: 16pt;\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":" \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\nasync function ayPrepareData(ayData) { \n\n await ayGetTranslations([ \"WorkOrderItemTasks\", \"PreventiveMaintenance\", \"WorkOrderItemList\", \"PMNextServiceDate\", \"WorkOrderItemSummary\", \"WorkOrderItemTaskWorkOrderItemTaskCompletionType\" ]);\n\n\n \n return ayData;\n}","JsHelpers":"//Register custom Handlebars helpers here to use in your report script\r\n//https://handlebarsjs.com/guide/#custom-helpers\r\n\r\n//custom helper so can do a direct comparison - i.e. if value equals xxxx, then show, else show yyyyy\r\n//note that this HAS to be added here in Helpers, is NOT built in\r\nHandlebars.registerHelper('if_eq', function(a, b, opts) {\r\n if(a == b) // Or === depending on your needs\r\n return opts.fn(this);\r\n else\r\n return opts.inverse(this);\r\n});","RenderType":0,"HeaderTemplate":"  ","FooterTemplate":"                Printed date: PDFDate\nPage of                ","DisplayHeaderFooter":true,"PaperFormat":0,"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/PM Parts Summary .ayrt b/server/AyaNova/resource/rpt/stock-report-templates/PM Parts Summary .ayrt new file mode 100644 index 00000000..1083b05f --- /dev/null +++ b/server/AyaNova/resource/rpt/stock-report-templates/PM Parts Summary .ayrt @@ -0,0 +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//need to now edit below to get running totals of THE DATA returned above - can't reference items as not in the returned data\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\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 (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 (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//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\n return reportData; \n}","JsHelpers":"//Register custom Handlebars helpers here to use in your report script\n//https://handlebarsjs.com/guide/#custom-helpers\nHandlebars.registerHelper('loud', function (aString) {\n return aString.toUpperCase()\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/PM Scheduled Users.ayrt b/server/AyaNova/resource/rpt/stock-report-templates/PM Scheduled Users.ayrt index ff2d8c8c..03f54ef3 100644 --- a/server/AyaNova/resource/rpt/stock-report-templates/PM Scheduled Users.ayrt +++ b/server/AyaNova/resource/rpt/stock-report-templates/PM Scheduled Users.ayrt @@ -1 +1 @@ -{"Name":"PM Scheduled Users","Active":true,"Notes":"","Roles":50538,"AType":85,"IncludeWoItemDescendants":false,"Template":"\n\n\n
\n
\n

{{ayT 'PreventiveMaintenance'}} {{ayT 'WorkOrderItemScheduledUserList'}} List

\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 ScheduledUsers}}\n \n \n \n \n \n \n \n \n \n \n {{/each}}\n {{/each}}\n {{/each}}\n \n\n \n \n\n
{{ayT 'PreventiveMaintenance'}}{{ayT 'Customer'}}{{ayT 'WorkOrderItemWorkOrderStatusID'}}{{ayT 'WorkOrderItemSummary'}}{{ayT 'WorkOrderItemScheduledUsers'}}{{ayT 'WorkOrderItemScheduledUserStartDate'}}{{ayT 'WorkOrderItemScheduledUserEstimatedQuantity'}}
{{../../Serial}}{{../../CustomerViz}}{{../WorkOrderItemStatusNameViz}}{{../Notes}}{{UserViz}}{{ayDateTime StartDate}}{{EstimatedQuantity}}
\n\n\n
\n\n\n","Style":"body {\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: 20px;\r\n font-size: 10pt; \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: 8pt;\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 font-size: 16pt;\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":" \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\nasync function ayPrepareData(ayData) { \n\n await ayGetTranslations([ \"PreventiveMaintenance\", \"WorkOrderItemScheduledUsers\", \"WorkOrderItemScheduledUserList\", \"WorkOrder\", \"Customer\", \"WorkOrderItemWorkOrderStatusID\", \"WorkOrderItemSummary\", \"WorkOrderItemScheduledUserStartDate\", \"WorkOrderItemScheduledUserEstimatedQuantity\" ]);\n\n \n return ayData;\n}","JsHelpers":"//Register custom Handlebars helpers here to use in your report script\r\n//https://handlebarsjs.com/guide/#custom-helpers\r\n","RenderType":0,"HeaderTemplate":"  ","FooterTemplate":"                Printed date: PDFDate\nPage of                ","DisplayHeaderFooter":true,"PaperFormat":0,"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 Scheduled Users","Active":true,"Notes":"","Roles":50538,"AType":85,"IncludeWoItemDescendants":false,"Template":"\n\n\n
\n
\n

{{ayT 'PreventiveMaintenance'}} {{ayT 'WorkOrderItemScheduledUserList'}} List

\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 ScheduledUsers}}\n \n \n \n \n \n \n \n \n \n \n {{/each}}\n {{/each}}\n {{/each}}\n \n\n \n \n\n
{{ayT 'PM'}}{{ayT 'Customer'}}{{ayT 'WorkOrderItemWorkOrderStatusID'}}{{ayT 'WorkOrderItemSummary'}}{{ayT 'WorkOrderItemScheduledUsers'}}{{ayT 'WorkOrderItemScheduledUserStartDate'}}{{ayT 'WorkOrderItemScheduledUserEstimatedQuantity'}}
{{../../Serial}}{{../../CustomerViz}}{{../WorkOrderItemStatusNameViz}}{{../Notes}}{{UserViz}}{{ayDateTime StartDate}}{{EstimatedQuantity}}
\n\n\n
\n\n\n","Style":"body {\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: 20px;\r\n font-size: 10pt; \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: 8pt;\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 font-size: 16pt;\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":" \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\nasync function ayPrepareData(ayData) { \n\n await ayGetTranslations([ \"PM\", \"PreventiveMaintenance\", \"WorkOrderItemScheduledUsers\", \"WorkOrderItemScheduledUserList\", \"WorkOrder\", \"Customer\", \"WorkOrderItemWorkOrderStatusID\", \"WorkOrderItemSummary\", \"WorkOrderItemScheduledUserStartDate\", \"WorkOrderItemScheduledUserEstimatedQuantity\" ]);\n\n \n return ayData;\n}","JsHelpers":"//Register custom Handlebars helpers here to use in your report script\r\n//https://handlebarsjs.com/guide/#custom-helpers\r\n","RenderType":0,"HeaderTemplate":"  ","FooterTemplate":"                Printed date: PDFDate\nPage of                ","DisplayHeaderFooter":true,"PaperFormat":0,"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/PM Units grouped by Customer.ayrt b/server/AyaNova/resource/rpt/stock-report-templates/PM Units grouped by Customer.ayrt index b9ef27f0..7419f718 100644 --- a/server/AyaNova/resource/rpt/stock-report-templates/PM Units grouped by Customer.ayrt +++ b/server/AyaNova/resource/rpt/stock-report-templates/PM Units grouped by Customer.ayrt @@ -1 +1 @@ -{"Name":"PM Units grouped by Customer","Active":true,"Notes":"","Roles":50538,"AType":88,"IncludeWoItemDescendants":false,"Template":"\n\n\n
\n
\n\t\t\t

{{ayT 'PMList'}} {{ayT 'WorkOrderItemUnitList'}} grouped by {{ayT 'Customer'}}

\n\t\t
\n \n \n \n \n \n \n \n \n \n \n \n \n {{#each ayReportData}}\n \n \n \n {{#each items}}\n {{#each Items}}\n {{#each Units}}\n \n \n \n \n \n \n \n \n {{/each}}\n {{/each}}\n {{/each}}\n \n \n \n\n \n \n \n {{/each}}\n \n
{{ayT 'Customer'}}{{ayT 'PreventiveMaintenance'}}{{ayT 'PMNextServiceDate'}}{{ayT 'WorkOrderItemUnit'}}{{ayT 'WorkOrderItemWorkOrderStatusID'}}{{ayT 'WorkOrderItemSummary'}}
{{group}}
 {{../../Serial}} {{ayDate ../../NextServiceDate}}{{UnitViz}} - {{UnitModelNameViz}}{{../WorkOrderItemStatusNameViz}}{{../Notes}}
 
 
\n
\n\n \n\n\n","Style":".minimum {\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; /* the # of columns set in the first row of the thead will be fixed and applied throughout table and rows */\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 //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([\"PreventiveMaintenance\", \"PMList\", \"Customer\", \"PMNextServiceDate\", \"WorkOrderItemUnit\", \"WorkOrderItemUnitList\", \"WorkOrderStatus\", \"WorkOrderItemWorkOrderStatusID\", \"WorkOrderItemSummary\", \"WorkOrderSummary\" ]);\n\n\n\n return reportData;\n}","JsHelpers":"//Register custom Handlebars helpers here to use in your report script\n//https://handlebarsjs.com/guide/#custom-helpers\nHandlebars.registerHelper('loud', function (aString) {\n return aString.toUpperCase()\n})","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":"PM Units grouped by Customer","Active":true,"Notes":"","Roles":50538,"AType":88,"IncludeWoItemDescendants":false,"Template":"\n\n\n
\n
\n\t\t\t

{{ayT 'PMList'}} {{ayT 'WorkOrderItemUnitList'}} grouped by {{ayT 'Customer'}}

\n\t\t
\n \n \n \n \n \n \n \n \n \n \n \n \n {{#each ayReportData}}\n \n \n \n {{#each items}}\n {{#each Items}}\n {{#each Units}}\n \n \n \n \n \n \n \n \n {{/each}}\n {{/each}}\n {{/each}}\n \n \n \n\n \n \n \n {{/each}}\n \n
{{ayT 'Customer'}}{{ayT 'PreventiveMaintenance'}}{{ayT 'PMNextServiceDate'}}{{ayT 'WorkOrderItemUnit'}}{{ayT 'WorkOrderItemWorkOrderStatusID'}}{{ayT 'WorkOrderItemSummary'}}
{{group}}
 {{../../Serial}} {{ayDate ../../NextServiceDate}}{{UnitViz}} - {{UnitModelNameViz}}{{../WorkOrderItemStatusNameViz}}{{../Notes}}
 
 
\n
\n\n \n\n\n","Style":".minimum {\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 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 //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([\"PreventiveMaintenance\", \"PMList\", \"Customer\", \"PMNextServiceDate\", \"WorkOrderItemUnit\", \"WorkOrderItemUnitList\", \"WorkOrderStatus\", \"WorkOrderItemWorkOrderStatusID\", \"WorkOrderItemSummary\", \"WorkOrderSummary\" ]);\n\n\n\n return reportData;\n}","JsHelpers":"//Register custom Handlebars helpers here to use in your report script\n//https://handlebarsjs.com/guide/#custom-helpers\nHandlebars.registerHelper('loud', function (aString) {\n return aString.toUpperCase()\n})","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/PO Items Received vs Ordered.ayrt b/server/AyaNova/resource/rpt/stock-report-templates/PO Items Received vs Ordered.ayrt new file mode 100644 index 00000000..4f87c159 --- /dev/null +++ b/server/AyaNova/resource/rpt/stock-report-templates/PO Items Received vs Ordered.ayrt @@ -0,0 +1 @@ +{"Name":"PO Items Received vs Ordered","Active":true,"Notes":"Includes Prepare that determines the difference between Ordered and Received for display, and #if_eq Helper used to display red if difference between QuantityReceived and QuantityOrdered","Roles":33130,"AType":26,"IncludeWoItemDescendants":false,"Template":"\n\n\t
\t \n\t\t \n \t\t\n \n \n \n \n \n \n \n \n \n\t\t\t \n \n \n \n \n \n\t\t\t \n \n \n \n \n \t\t\n \n \n {{#each ayReportData}}\n {{#each Items}}\n \n\t\t\t\t\n\t\t\t\t \n \n\t\t\t \n \n \n \n \n \n {{#if_eq QuantityOrdered QuantityReceived }} {{else}}{{/if_eq}}\n\t\t\t\t\n\n \t {{/each}} \n {{/each}} \n \n\n
Purchase Order Items Received compared to Ordered
 
{{ayT 'PurchaseOrderStatus'}}{{ayT 'PurchaseOrderPONumber'}}{{ayT 'PartWholesalerID'}}{{ayT 'PurchaseOrderOrderedDate'}}{{ayT 'PurchaseOrderReceiptReceivedDate'}}{{ayT 'Part'}}{{ayT 'PurchaseOrderItemQuantityOrdered'}}{{ayT 'PurchaseOrderItemQuantityReceived'}}Diff +/-
 
{{../StatusViz}}{{../Serial}} {{../VendorViz}} {{ayDate ../OrderedDate}} {{ayDate ReceivedDate}}{{PartViz}} {{PartNameViz}}{{QuantityOrdered}}{{QuantityReceived}}{{ThisItemQtyDiff}}- {{ThisItemQtyDiff}}
\n\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: 13pt; \n color: #9e9e9e;\n} \n\ntable { \n border-collapse: collapse;\n white-space: pre-wrap;\n width: 100%;\n table-layout: fixed; /* the # of columns set in the first row of the thead will be fixed and applied throughout table and rows */\n }\n\nth {\n /* border-bottom: solid 1pt #9e9e9e; */\n height: 50px;\n font-size: 11pt; \n color: #9e9e9e;\n}\n\ntbody td {\n padding: 10px;\n word-wrap: break-word;\n font-size: 9pt;\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 font-weight: bold; \n}\n\n","JsPrerender":"async function ayPrepareData(ayData){ \n //this function (if present) is called with the report data \n //before the report is rendered\n //modify data as required here and return it to change the data before the report renders\n //see the help documentation for details\n\n await ayGetTranslations([\"PurchaseOrderStatus\", \"PurchaseOrderPONumber\", \"PartWholesalerID\", \"PurchaseOrderOrderedDate\", \"PurchaseOrderReceiptReceivedDate\", \"Part\", \"PurchaseOrderItemQuantityOrdered\", \"PurchaseOrderItemQuantityReceived\" ]);\n\n //Iterate through all the records in the reportData to get the difference between ordered and received\n for (EachPO of ayData.ayReportData) \n {\n for (Item of EachPO.Items) //Iterate through all the poitems of THIS po \n {\n let ThisItemQtyDiff = 0; //Declare a temporary variable to hold the difference for this item\n if (Item.QuantityOrdered != null) //make sure QuantityOrdered has a value before attempting to use it\n {\n ThisItemQtyDiff = Item.QuantityOrdered - Item.QuantityReceived;\n }\n Item.ThisItemQtyDiff=ThisItemQtyDiff;\n }\n }\n\n return ayData;\n}","JsHelpers":"//Register custom Handlebars helpers here to use in your report script\n//https://handlebarsjs.com/guide/#custom-helpers\nHandlebars.registerHelper('loud', function (aString) {\n return aString.toUpperCase()\n})\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});","RenderType":0,"HeaderTemplate":"  ","FooterTemplate":"                Printed date: PDFDate\nPage of                ","DisplayHeaderFooter":true,"PaperFormat":10,"Landscape":true,"MarginOptionsBottom":"20mm","MarginOptionsLeft":"20mm","MarginOptionsRight":"15mm","MarginOptionsTop":"10mm","PageRanges":null,"PreferCSSPageSize":false,"PrintBackground":true,"Scale":1.00000} \ No newline at end of file diff --git a/server/AyaNova/resource/rpt/stock-report-templates/PRODUCTION PM Parts Summary .ayrt b/server/AyaNova/resource/rpt/stock-report-templates/PRODUCTION PM Parts Summary .ayrt deleted file mode 100644 index 5d801cd0..00000000 --- a/server/AyaNova/resource/rpt/stock-report-templates/PRODUCTION PM Parts Summary .ayrt +++ /dev/null @@ -1 +0,0 @@ -{"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 {{/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; /* the # of columns set in the first row of the thead will be fixed and applied throughout table and rows */\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//need to now edit below to get running totals of THE DATA returned above - can't reference items as not in the returned data\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\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 (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 (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//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\n return reportData; \n}","JsHelpers":"//Register custom Handlebars helpers here to use in your report script\n//https://handlebarsjs.com/guide/#custom-helpers\nHandlebars.registerHelper('loud', function (aString) {\n return aString.toUpperCase()\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/PRODUCTION Part Grouped Net Cost Difference.ayrt b/server/AyaNova/resource/rpt/stock-report-templates/PRODUCTION Part Grouped Net Cost Difference.ayrt deleted file mode 100644 index 1301d282..00000000 --- a/server/AyaNova/resource/rpt/stock-report-templates/PRODUCTION Part Grouped Net Cost Difference.ayrt +++ /dev/null @@ -1 +0,0 @@ -{"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'}}{{ayT 'PartRetail'}}{{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; /* the # of columns set in the first row of the thead will be fixed and applied throughout table and rows */\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//need to now edit below to get running totals of THE DATA returned above - can't reference items as not in the returned data\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\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 (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 (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//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\n return reportData; \n}","JsHelpers":"//Register custom Handlebars helpers here to use in your report script\n//https://handlebarsjs.com/guide/#custom-helpers\nHandlebars.registerHelper('loud', function (aString) {\n return aString.toUpperCase()\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/PRODUCTION Quote Parts Summary.ayrt b/server/AyaNova/resource/rpt/stock-report-templates/PRODUCTION Quote Parts Summary.ayrt deleted file mode 100644 index 5cf570b6..00000000 --- a/server/AyaNova/resource/rpt/stock-report-templates/PRODUCTION Quote Parts Summary.ayrt +++ /dev/null @@ -1 +0,0 @@ -{"Name":"Quote Parts Summary","Active":true,"Notes":"Custom Prepare to obtain translations, group by the woitempart, derived amounts and running totals","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 {{#each ayReportData}}\n \n \n \n {{#each items}}\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
{{ayT 'Quote'}} {{ayT 'WorkOrderItemParts'}} {{ayT 'PartCost'}} {{ayT 'NetValue'}}
 
 
{{ayT 'Part'}}{{ayT 'Quote'}}{{ayT 'QuoteQuoteRequestDate'}}{{ayT 'WorkOrderItemPartQuantity'}}{{ayT 'PartCost'}} Per{{ayT 'PartRetail'}} Per {{ayT 'PartCost'}} {{ayT 'NetValue'}}{{ayT 'PartRetail'}} {{ayT 'NetValue'}}Difference
{{group}}
 {{Serial}}{{ayDate Requested}}no 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 \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; /* the # of columns set in the first row of the thead will be fixed and applied throughout table and rows */\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\", \"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 };\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//need to now edit below to get running totals of THE DATA returned above - can't reference items as not in the returned data\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\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 (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 (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//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\n return reportData; \n}","JsHelpers":"//Register custom Handlebars helpers here to use in your report script\n//https://handlebarsjs.com/guide/#custom-helpers\nHandlebars.registerHelper('loud', function (aString) {\n return aString.toUpperCase()\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/PRODUCTION Charges Summary Grouped By Customer.ayrt b/server/AyaNova/resource/rpt/stock-report-templates/PRODUCTION Charges Summary Grouped By Customer.ayrt deleted file mode 100644 index 4e72915e..00000000 --- a/server/AyaNova/resource/rpt/stock-report-templates/PRODUCTION Charges Summary Grouped By Customer.ayrt +++ /dev/null @@ -1 +0,0 @@ -{"Name":"Charges Summary Grouped By Customer","Active":true,"Notes":"Custom Prepare to display each 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 {{#each ayReportData}}\n \n \n \n {{#each items}}\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 {{/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 '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{{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: 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; /* the # of columns set in the first row of the thead will be fixed and applied throughout table and rows */\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}\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\", \"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 (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 (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 (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 (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 (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 (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 (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 (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 (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":"//Register custom Handlebars helpers here to use in your report script\n//https://handlebarsjs.com/guide/#custom-helpers\nHandlebars.registerHelper('loud', function (aString) {\n return aString.toUpperCase()\n})","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/PRODUCTION Customer Invoice.ayrt b/server/AyaNova/resource/rpt/stock-report-templates/PRODUCTION Customer Invoice.ayrt deleted file mode 100644 index 3a7b6682..00000000 --- a/server/AyaNova/resource/rpt/stock-report-templates/PRODUCTION Customer Invoice.ayrt +++ /dev/null @@ -1 +0,0 @@ -{"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":"/* if not using a rule set or specific property it is recommended to comment out or delete fully for report performance*/\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; //setting this to fixed causes columns to be evenly spaced for the entire table regardless of cell content, and then colspan then \"works\" as expected\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 (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 (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 (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 (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 (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 (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 (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 (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 && !isNaN(parsedDate))) {\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/PRODUCTION Customer Work Order.ayrt b/server/AyaNova/resource/rpt/stock-report-templates/PRODUCTION Customer Work Order.ayrt deleted file mode 100644 index 45ca21f4..00000000 --- a/server/AyaNova/resource/rpt/stock-report-templates/PRODUCTION Customer Work Order.ayrt +++ /dev/null @@ -1 +0,0 @@ -{"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":"/* if not using a rule set or specific property it is recommended to comment out or delete fully for report performance*/\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; //setting this to fixed causes columns to be evenly spaced for the entire table regardless of cell content, and then colspan then \"works\" as expected\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 (EachWO of reportData.ayReportData) {\n for (Item of EachWO.Items) {\n for (Part of Item.Parts) {\n if (Part.Serials != null) {\n 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 (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 (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 (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 (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 (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 (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 (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 (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 && !isNaN(parsedDate))) {\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/PRODUCTION Labor Billing & Hours Grouped By Technician.ayrt b/server/AyaNova/resource/rpt/stock-report-templates/PRODUCTION Labor Billing & Hours Grouped By Technician.ayrt deleted file mode 100644 index 379e9bc6..00000000 --- a/server/AyaNova/resource/rpt/stock-report-templates/PRODUCTION Labor Billing & Hours Grouped By Technician.ayrt +++ /dev/null @@ -1 +0,0 @@ -{"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 Total Quantity{{ayT \"WorkOrderItemLaborNoChargeQuantity\"}}{{ayT \"WorkOrderItemLaborServiceRateQuantity\"}}{{ayT \"NetValue\"}}
{{ayT 'WorkOrderItemLabors'}} for {{group}}# of labor items: {{count}}
 {{Serial}}{{ayDateTime ServiceStartDate}} to {{ayDateTime ServiceStopDate}}{{ServiceRateViz}}{{ayCurrency PriceViz}} {{UnitOfMeasureViz}}{{diffHours}}{{NoChargeQuantity}}{{ServiceRateQuantity}}{{ayCurrency NetViz}}
 
Total {{ayT \"WorkOrderItemLaborServiceRateQuantity\"}} + {{ayT \"WorkOrderItemLaborNoChargeQuantity\" }} = {{EachGroupWOLaborsNCQtyplusBillableQty}} for {{group}}{{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; /* the # of columns set in the first row of the thead will be fixed and applied throughout table and rows */\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//need to now edit below to get running totals of THE DATA returned above - can't reference items as not in the returned data\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 (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 (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\t\t\t\t\t\t\t\t\t\t\t\n\t\t\t\t\t\t\t\t\t\t\tdateTime1 = new Date (groupitem.ServiceStopDate);\n\t\t\t\t\t\t\t\t\t\t\tdateTime2 = 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\tdiffMillis = (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\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/PRODUCTION Net Taxes and Totals for Each WO.ayrt b/server/AyaNova/resource/rpt/stock-report-templates/PRODUCTION Net Taxes and Totals for Each WO.ayrt deleted file mode 100644 index c619e746..00000000 --- a/server/AyaNova/resource/rpt/stock-report-templates/PRODUCTION Net Taxes and Totals for Each WO.ayrt +++ /dev/null @@ -1 +0,0 @@ -{"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; /* the # of columns set in the first row of the thead will be fixed and applied throughout table and rows */\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}\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 (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 (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 (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 (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 (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 (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 (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 (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":"//Register custom Handlebars helpers here to use in your report script\n//https://handlebarsjs.com/guide/#custom-helpers\nHandlebars.registerHelper('loud', function (aString) {\n return aString.toUpperCase()\n})","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/PRODUCTION Net Totals for Each WO.ayrt b/server/AyaNova/resource/rpt/stock-report-templates/PRODUCTION Net Totals for Each WO.ayrt deleted file mode 100644 index 2b220189..00000000 --- a/server/AyaNova/resource/rpt/stock-report-templates/PRODUCTION Net Totals for Each WO.ayrt +++ /dev/null @@ -1 +0,0 @@ -{"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 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 {{#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 \n {{/each}}\n \n
{{ayT 'WorkOrder'}}{{ayT 'Customer'}}{{ayT 'WorkOrderServiceDate'}}{{ayT 'WorkOrderItemLaborList'}}{{ayT 'WorkOrderItemPartList'}}{{ayT 'WorkOrderItemTravelList'}}{{ayT 'WorkOrderItemExpenseList'}}{{ayT 'WorkOrderItemLoanList'}}{{ayT 'WorkOrderItemOutsideService'}}{{ayT 'NetValue'}}
{{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
\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; /* the # of columns set in the first row of the thead will be fixed and applied throughout table and rows */\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}\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\nfor (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 (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 (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 (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 (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 (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 (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 (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":"//Register custom Handlebars helpers here to use in your report script\n//https://handlebarsjs.com/guide/#custom-helpers\nHandlebars.registerHelper('loud', function (aString) {\n return aString.toUpperCase()\n})","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/PRODUCTION PO Items Received vs Ordered.ayrt b/server/AyaNova/resource/rpt/stock-report-templates/PRODUCTION PO Items Received vs Ordered.ayrt deleted file mode 100644 index c617fd1a..00000000 --- a/server/AyaNova/resource/rpt/stock-report-templates/PRODUCTION PO Items Received vs Ordered.ayrt +++ /dev/null @@ -1 +0,0 @@ -{"Name":"PO Items Received vs Ordered","Active":true,"Notes":"Includes Prepare that determines the difference between Ordered and Received for display, and #if_eq Helper used to display red if difference between QuantityReceived and QuantityOrdered","Roles":33130,"AType":26,"IncludeWoItemDescendants":false,"Template":"\n\n\t
\t \n\t\t \n \t\t\n \n \n \n \n \n \n \n \n \n\t\t\t \n \n \n \n \n \n\t\t\t \n \n \n \n \n \t\t\n \n \n {{#each ayReportData}}\n {{#each Items}}\n \n\t\t\t\t\n\t\t\t\t \n \n\t\t\t \n \n \n \n \n \n {{#if_eq QuantityOrdered QuantityReceived }} {{else}}{{/if_eq}}\n\t\t\t\t\n\n \t {{/each}} \n {{/each}} \n \n\n
Purchase Order Items Received compared to Ordered
 
{{ayT 'PurchaseOrderStatus'}}{{ayT 'PurchaseOrderPONumber'}}{{ayT 'PartWholesalerID'}}{{ayT 'PurchaseOrderOrderedDate'}}{{ayT 'PurchaseOrderReceiptReceivedDate'}}{{ayT 'Part'}}{{ayT 'PurchaseOrderItemQuantityOrdered'}}{{ayT 'PurchaseOrderItemQuantityReceived'}}Diff +/-
 
{{../StatusViz}}{{../Serial}} {{../VendorViz}} {{ayDate ../OrderedDate}} {{ayDate ReceivedDate}}{{PartViz}} {{PartNameViz}}{{QuantityOrdered}}{{QuantityReceived}}{{ThisItemQtyDiff}}- {{ThisItemQtyDiff}}
\n\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: 13pt; \n color: #9e9e9e;\n} \n\ntable { \n border-collapse: collapse;\n white-space: pre-wrap;\n width: 100%;\n table-layout: fixed; /* the # of columns set in the first row of the thead will be fixed and applied throughout table and rows */\n }\n\nth {\n /* border-bottom: solid 1pt #9e9e9e; */\n height: 50px;\n font-size: 11pt; \n color: #9e9e9e;\n}\n\ntbody td {\n padding: 10px;\n word-wrap: break-word;\n font-size: 9pt;\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 font-weight: bold; \n}\n\n","JsPrerender":"async function ayPrepareData(ayData){ \n //this function (if present) is called with the report data \n //before the report is rendered\n //modify data as required here and return it to change the data before the report renders\n //see the help documentation for details\n\n await ayGetTranslations([\"PurchaseOrderStatus\", \"PartWholesalerID\", \"Part\", \"PurchaseOrderItemQuantityOrdered\", \"\", \"PurchaseOrderPONumber\", \"PurchaseOrderOrderedDate\", \"PurchaseOrderReceiptReceivedDate\", \"PurchaseOrderItemQuantityReceived\" ]);\n\n //Iterate through all the records in the reportData to get the difference between ordered and received\n for (EachPO of ayData.ayReportData) \n {\n for (Item of EachPO.Items) //Iterate through all the poitems of THIS po \n {\n let ThisItemQtyDiff = 0; //Declare a temporary variable to hold the difference for this item\n if (Item.QuantityOrdered != null) //make sure QuantityOrdered has a value before attempting to use it\n {\n ThisItemQtyDiff = Item.QuantityOrdered - Item.QuantityReceived;\n }\n Item.ThisItemQtyDiff=ThisItemQtyDiff;\n }\n }\n\n return ayData;\n}","JsHelpers":"//Register custom Handlebars helpers here to use in your report script\n//https://handlebarsjs.com/guide/#custom-helpers\nHandlebars.registerHelper('loud', function (aString) {\n return aString.toUpperCase()\n})\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});","RenderType":0,"HeaderTemplate":"  ","FooterTemplate":"                Printed date: PDFDate\nPage of                ","DisplayHeaderFooter":true,"PaperFormat":10,"Landscape":true,"MarginOptionsBottom":"20mm","MarginOptionsLeft":"20mm","MarginOptionsRight":"15mm","MarginOptionsTop":"10mm","PageRanges":null,"PreferCSSPageSize":false,"PrintBackground":true,"Scale":1.00000} \ No newline at end of file diff --git a/server/AyaNova/resource/rpt/stock-report-templates/PRODUCTION Part Requests Grouped By Wholesaler.ayrt b/server/AyaNova/resource/rpt/stock-report-templates/PRODUCTION Part Requests Grouped By Wholesaler.ayrt deleted file mode 100644 index b5120ed9..00000000 --- a/server/AyaNova/resource/rpt/stock-report-templates/PRODUCTION Part Requests Grouped By Wholesaler.ayrt +++ /dev/null @@ -1 +0,0 @@ -{"Name":"Part Requests Grouped By Wholesaler","Active":true,"Notes":"","Roles":124927,"AType":91,"IncludeWoItemDescendants":false,"Template":"\n\n\n\t
\n\t\t
\n\t\t\t

{{ayT 'WorkOrderItemPartRequests'}} grouped by {{ayT 'PartWholesalerID'}}

\n\t\t
\n\t\t\n\t\t\t\n\t\t\t\t\n\t\t\t\t\t\n\t\t\t\t\t\n\t\t\t\t\t\n\t\t\t\t\t\n\t\t\t\t\t\n\t\t\t\t\t\n\t\t\t\t\t\n\t\t\t\t\t\n\t\t\t\t\t\n\t\t\t\t\n\t\t\t\n\n\t\t\t\n\t\t\t\t{{#each ayReportData}}\n\t\t\t\t\n\t\t\t\t\n\t\t\t\t\n\t\t\t\t\t\n\t\t\t\t\t\n\t\t\t\t\n\t\t\t\t{{#each items}}\n\t\t\t\t\n\t\t\t\t\t\n\t\t\t\t\t\n\t\t\t\t\t\n\t\t\t\t\t\n\t\t\t\t\t\n\t\t\t\t\t\n\t\t\t\t\t\n\t\t\t\t\t\n\t\t\t\t\t\n\t\t\t\t\n\t\t\t\t{{/each}}\n\t\t\t\t\n\t\t\t\t\t\n\t\t\t\t\t\n\t\t\t\t\n\t\t\t\t\n\t\t\t\t\t\n\t\t\t\t\t\n\t\t\t\t\n\t\t\t\t\n\t\t\t\t\t\n\t\t\t\t\n\t\t\t\t\n\t\t\t\t{{/each}}\n\t\t\t\n\t\t
{{ayT 'Part'}}{{ayT 'QuantityRequired'}}{{ayT 'WorkOrderItemPartPartWarehouseID'}}Date Requested{{ayT 'PurchaseOrderPONumber'}}{{ayT 'PurchaseOrderOrderedDate'}}{{ayT 'PurchaseOrderItemUIOrderedFrom'}}{{ayT 'PurchaseOrderExpectedReceiveDate'}}
{{ayT 'PartWholesalerID'}}: {{group}}
 {{PartName}}{{Quantity}}{{PartWarehouseName}}{{ayDate RequestDate}}{{PurchaseOrderSerial}}{{ayDate OrderedDate}}{{PurchaseOrderVendor}}{{ayDate ExpectedReceiveDate}}
# of {{ayT 'WorkOrderItemPartRequests'}} for {{ayT 'PartWholesalerID'}} {{group}}: {{count}}
Total {{ayT 'QuantityRequired'}} of {{ayT 'PartList'}} for {{ayT 'PartWholesalerID'}} {{group}}: {{ThisGroupTotalQty}}
 
\n\t
\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: 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; /* the # of columns set in the first row of the thead will be fixed and applied throughout table and rows */\r\n }\r\n\r\nth {\r\n /* border-bottom: solid 1pt #9e9e9e; */\r\n height: 50px;\r\n font-size: 11pt; \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: 9pt;\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 font-size: 16pt;\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(ayData) {\n\n //send the raw report data to the groupByKey function which will return a new array grouped by the key name provided\n ayData.ayReportData = ayGroupByKey(ayData.ayReportData, 'WholesalerName')\n\n await ayGetTranslations([\"WorkOrderItemPartRequests\", \"PartWholesalerID\", \"Part\", \"QuantityRequired\", \"WorkOrderItemPartPartWarehouseID\", \"PurchaseOrderPONumber\", \"PurchaseOrderOrderedDate\", \"PurchaseOrderItemUIOrderedFrom\", \"PurchaseOrderExpectedReceiveDate\", \"PartList\" ]);\n\n //Iterate through all the records in the reportData obtaining a running total of Quantity for each group\n for (EachGroup of ayData.ayReportData) \n { \n let ThisGroupTotalQty = 0; //Declare a temporary variable to hold the running Qty total for THIS group\n for (Item of EachGroup.items) //Iterate through all the poitems of THIS po adding the Qty amount of each item to the ThisPOTotalQty variable\n {\n //make sure it has a value before attempting to add it to the running total\n if (Item.Quantity != null) \n {\n ThisGroupTotalQty += Item.Quantity;\n }\n Item.QuantityRunning=ThisGroupTotalQty;\n }\n EachGroup.ThisGroupTotalQty=ThisGroupTotalQty;\n\n\n }\n\n //return the data into the pipeline to send to the report template\n return ayData;\n}","JsHelpers":"","RenderType":0,"HeaderTemplate":"  ","FooterTemplate":"                Printed date: PDFDate\nPage of                ","DisplayHeaderFooter":true,"PaperFormat":10,"Landscape":true,"MarginOptionsBottom":"20mm","MarginOptionsLeft":"20mm","MarginOptionsRight":"15mm","MarginOptionsTop":"10mm","PageRanges":null,"PreferCSSPageSize":false,"PrintBackground":true,"Scale":1.00000} \ No newline at end of file diff --git a/server/AyaNova/resource/rpt/stock-report-templates/PRODUCTION Parts & Labor Profit _ Loss.ayrt b/server/AyaNova/resource/rpt/stock-report-templates/PRODUCTION Parts & Labor Profit _ Loss.ayrt deleted file mode 100644 index 3b187f98..00000000 --- a/server/AyaNova/resource/rpt/stock-report-templates/PRODUCTION Parts & Labor Profit _ Loss.ayrt +++ /dev/null @@ -1 +0,0 @@ -{"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 {{#if ServiceDate }}{{else}} {{/if}}\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}}no Service Date specified {{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; /* the # of columns set in the first row of the thead will be fixed and applied throughout table and rows */\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 (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 (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 (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 (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":"//Register custom Handlebars helpers here to use in your report script\n//https://handlebarsjs.com/guide/#custom-helpers\nHandlebars.registerHelper('loud', function (aString) {\n return aString.toUpperCase()\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/PRODUCTION Parts with available serial numbers.ayrt b/server/AyaNova/resource/rpt/stock-report-templates/PRODUCTION Parts with available serial numbers.ayrt deleted file mode 100644 index cbbaf62b..00000000 --- a/server/AyaNova/resource/rpt/stock-report-templates/PRODUCTION Parts with available serial numbers.ayrt +++ /dev/null @@ -1 +0,0 @@ -{"Name":"Parts with available serial numbers","Active":true,"Notes":"USE: #if_eq custom Helper ONLY displays parts from the datalist that HAVE serial numbers \n","Roles":49514,"AType":20,"IncludeWoItemDescendants":false,"Template":"\n\n
\n
\n

Parts with Serials Report

\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 {{#if_eq PartSerialsViz \"\"}}\n \n {{else}}\n \n \n \n \n \n \n \n \n {{/if_eq}}\n {{/each}}\n \n\n
 
{{ayT 'Part'}}{{ayT 'PartManufacturerID'}}{{ayT 'PartCost'}}{{ayT 'PartRetail'}}{{ayT 'PartSerialNumbersAvailable'}}
 
{{Name}}{{ManufacturerViz}}{{ayCurrency Cost}}{{ayCurrency Retail}}{{PartSerialsViz}}
\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 color: #9e9e9e;\n} \n\ntable { \n border-collapse: collapse;\n white-space: pre-wrap;\n width: 100%;\n table-layout: fixed; /* the # of columns set in the first row of the thead will be fixed and applied throughout table and rows */\n }\n\nth {\n border-bottom: solid 1pt #9e9e9e;\n height: 50px;\n font-size: 11pt; \n color: #9e9e9e;\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":" \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\nasync function ayPrepareData(ayData) { \n\n await ayGetTranslations([\"Part\", \"PartManufacturerID\", \"PartRetail\", \"PartCost\", \"PartSerialNumbersAvailable\" ]);\n \n return ayData;\n}","JsHelpers":"//Register custom Handlebars helpers here to use in your report script\n//https://handlebarsjs.com/guide/#custom-helpers\nHandlebars.registerHelper('loud', function (aString) {\n return aString.toUpperCase()\n})\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});","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/PRODUCTION Purchase Order Detailed.ayrt b/server/AyaNova/resource/rpt/stock-report-templates/PRODUCTION Purchase Order Detailed.ayrt deleted file mode 100644 index 138030b8..00000000 --- a/server/AyaNova/resource/rpt/stock-report-templates/PRODUCTION Purchase Order Detailed.ayrt +++ /dev/null @@ -1 +0,0 @@ -{"Name":"Purchase Order Detailed","Active":true,"Notes":"custom Prepare for deriving net totals and grand total \n","Roles":49250,"AType":26,"IncludeWoItemDescendants":false,"Template":"\n\n\n\t
\n\t\t{{#each ayReportData}}\n\t\t\n\t\t\n\t\t\t\n\t\t\t\n\t\t\t\t\n\t\t\t\t\n\t\t\t\t\t\n\t\t\t\t\t\n\t\t\t\t\t{{#if DropShipToCustomerViz}}{{else}} {{/if}}\n\t\t\t\t\t{{#if DropShipToCustomerViz}}{{else}} {{/if}}\n\t\t\t\t\n\t\t\t\t\n\t\t\t\t\t\n\t\t\t\t\t\n\t\t\t\t\t{{#if DropShipToCustomerViz}}{{else}}{{/if}}\n\t\t\t\t\t\n\t\t\t\t\n\t\t\t\t\n\t\t\t\t\t\n\t\t\t\t\t{{#if DropShipToCustomerViz}}{{else}} {{/if}}\n\t\t\t\t\t\n\t\t\t\t\n\t\t\t\t\n\t\t\t\t\t\n\t\t\t\t\t\n\t\t\t\t\t{{#if DropShipToCustomerViz}}{{else}} {{/if}}\n\t\t\t\t\t\n\t\t\t\t\n\t\t\t\t\n\t\t\t\t\t\n\t\t\t\t\t{{#if DropShipToCustomerViz}}{{else}} {{/if}}\n\t\t\t\t\t\n\t\t\t\t\n\t\t\t\t\n\t\t\t\t\t\n\t\t\t\t\t\n\t\t\t\t\t\n\t\t\t\t\n\t\t\t\t\n\t\t\t\t\t\n\t\t\t\t\n\t\t\t\t\n\t\t\t\n\n\t\t\t\n\t\t\t\t\n\t\t\t\t\t\n\t\t\t\t\t\n\t\t\t\t\t\n\t\t\t\t\t\n\t\t\t\t\t\n\t\t\t\t\t\n\t\t\t\t\t\n\t\t\t\t\t\n\t\t\t\t\t\n\t\t\t\t\t\n\t\t\t\t\n\t\t\t\t{{#each Items}}\n\t\t\t\t\n\t\t\t\t\t\n\t\t\t\t\t\n\t\t\t\t\t\n\t\t\t\t\t\n\t\t\t\t\t\n\t\t\t\t\t\n\t\t\t\t\t\n\t\t\t\t\t{{#if TaxAViz}}{{else}}{{/if}}\n\t\t\t\t\t{{#if TaxBViz}}{{else}}{{/if}}\n\t\t\t\t\t\n\t\t\t\t\n\t\t\t\t{{/each}}\n\t\t\t\t\n\t\t\t\t\t\n\t\t\t\t\n\t\t\t\n\n\n\t\t\t\n\t\t\t\t\n\n\t\t\t\t\n\t\t\t\t\t\n\t\t\t\t\t\n\t\t\t\t\t\n\n\t\t\t\t\n\t\t\t\t\t\n\t\t\t\t\t\n\t\t\t\t\t\n\t\t\t\t\n\t\t\t\t\n\t\t\t\t\t\n\t\t\t\t\t\n\t\t\t\t\t\n\t\t\t\t\t{{#if ThisPOTaxA}}{{else}} {{/if}}\n\t\t\t\t\n\t\t\t\t\n\t\t\t\t\t\n\t\t\t\t\t\n\t\t\t\t\t{{#if ThisPOTaxB}}{{else}} {{/if}}\n\t\t\t\t\n\n\t\t\t\t\n\t\t\t\t\t\n\t\t\t\t\n\n\t\t\t\t\n\t\t\t\t\t\n\t\t\t\t\t\n\t\t\t\t\t\n\t\t\t\t\n\n\t\t\t\n\n\t\t
{{ayT 'PurchaseOrderPONumber'}}{{Serial}}{{ayT 'PurchaseOrderDropShipToCustomerID'}}Bill ToBill To & Ship To
{{ayT 'PurchaseOrderOrderedDate'}}{{ayDate OrderedDate}}{{DropShipToCustomerViz}}{{../ayServerMetaData.CompanyName}}
 {{DropShipToCustomerAddressViz}} {{DropShipToCustomerCityViz}}{{../ayServerMetaData.CompanyPostAddress}}
{{ayT 'Vendor'}}{{VendorViz}} {{DropShipToCustomerRegionViz}} {{DropShipToCustomerPostCodeViz}}{{../ayServerMetaData.CompanyPostCity}} {{../ayServerMetaData.CompanyPostRegion}} {{../ayServerMetaData.CompanyPostCode}}
{{VendorAddressViz}} {{VendorCityViz}} {{VendorRegionViz}}{{DropShipToCustomerPhone1Viz}}{{../ayServerMetaData.CompanyPhone1}} {{../ayServerMetaData.CompanyEmailAddress}}
{{VendorContactViz}} {{VendorPhone1Viz}} {{VendorEmailAddressViz}}{{ayT 'VendorAccountNumber'}}{{VendorAccountNumberViz}}
 
QtyUOMOur Part#MFG#Vendor#Price PerNet{{ayT 'TaxCodeTaxA'}}{{ayT 'TaxCodeTaxB'}}{{ayT 'PurchaseOrderItemLineTotal'}}
{{QuantityOrdered}}{{PartUnitOfMeasureViz}}{{PartNameViz}}{{PartManufacturerNumberViz}} {{VendorPartNumber}} {{ayCurrency PurchaseOrderCost}}{{ayCurrency NetTotalViz}}{{ayCurrency TaxAViz}}0.00{{ayCurrency TaxBViz}}0.00{{ayCurrency LineTotalViz}}
 
Total Qty of Parts Ordered{{ThisPOTotalQty}}
{{ayT 'PurchaseOrderItemNetTotal'}}{{ayCurrency ThisPONet}}
{{ayT 'VendorAlertNotes'}}{{VendorAlertNotesViz}} {{ayT 'TaxCodeTaxA'}}{{ ayCurrency ThisPOTaxA }}0.00
{{ayT 'TaxCodeTaxB'}}{{ ayCurrency ThisPOTaxB }}0.00
 
Direct all inquiries to {{../ayServerMetaData.CompanyName}} {{../ayServerMetaData.CompanyPhone1}} or {{../ayServerMetaData.CompanyEmailAddress}}Purchase Order Total{{ ayCurrency ThisPOTotalDollar}}
\n\t\t{{/each}}\n\n\t
\n\n\n","Style":"\n.singlePage\n{\npage-break-after: always;\n\n}\nbody {\n font-family: 'Helvetica', 'Helvetica Neue', Arial, sans-serif; \n}\n\n.reporttitle { \n margin-bottom: 20pt; \n font-weight: bold; \n font-size: 13pt; \n} \n\ntable { \n border-collapse: collapse;\n white-space: pre-wrap;\n font-size: 10pt;\n width: 100%;\n table-layout: fixed; /* the # of columns set in the first row of the thead will be fixed and applied throughout table and rows */\n }\n\nth {\n height: 25px; \n color: #9e9e9e;\n}\n\ntbody td {\n padding: 7px;\n word-wrap: break-word;\n font-size: 9pt;\n}\n\ntbody tr:nth-child(even) {\n background-color: #f8f8f8; /* MUST checkmark Print background in PDF Options for this to show */\n}\n\n\n.rightlean {\n text-align: right;\n}\n.leftlean {\n text-align: left;\n}\n.centerlean {\n text-align: center;\n}\n\n\n.fontgreen {\n color: green;\n font-size: 16pt;\n}\n.fontblue {\n color: blue;\n}\n.fontred {\n color:red;\n}\n","JsPrerender":"async function ayPrepareData(ayData) {\n //Example of both manipulating the ayData before rendering the report (by adding a running total field)\n //and adding a field to the overall data calculating the total dollar amount for all records\n\n await ayGetTranslations([\"PurchaseOrderPONumber\", \"PurchaseOrderOrderedDate\", \"PurchaseOrderDropShipToCustomerID\", \"Vendor\", \"Part\", \"VendorAccountNumber\", \"PurchaseOrderItemNetTotal\", \"VendorAlertNotes\", \"TaxCodeTaxA\", \"TaxCodeTaxB\", \"PurchaseOrderItemLineTotal\" ]);\n\n\n//remove statements not needed\n\n\n //Iterate through all the records in the ayData adding the dollar amount of each specified property to the appropriate declared variable\n\n for (EachPO of ayData.ayReportData) \n {\n EachPO.ThisPONet = 0; //Declare a temporary variable to hold the running net total for THIS po\n EachPO.ThisPOTaxA = 0; //Declare a temporary variable to hold the running Tax A total for THIS po \n EachPO.ThisPOTaxB = 0; //Declare a temporary variable to hold the running Tax B total for THIS po\n EachPO.ThisPOTotalDollar = 0; //Declare a temporary variable to hold the running total of THIS PO \n EachPO.ThisPOTotalQty = 0; //Declare a temporary variable to hold the running Qty total for THIS po\n\n for (Item of EachPO.Items) //Iterate through all the poitems of THIS po adding the dollar amount of each item to the ThisPONet variable\n {\n //make sure it has a value before attempting to add it to the running total\n if (Item.NetTotalViz != null) \n {\n EachPO.ThisPONet += Item.NetTotalViz;\n }\n }\n \n for (Item of EachPO.Items) //Iterate through all the poitems of THIS po adding the dollar amount of each item to the ThisPOTaxA variable\n {\n //make sure it has a value before attempting to add it to the running total \n if (Item.TaxAViz != null) \n {\n EachPO.ThisPOTaxA += Item.TaxAViz;\n }\n }\n \n for (Item of EachPO.Items) //Iterate through all the poitems of THIS po adding the dollar amount of each item to the ThisPOTaxB variable\n {\n //make sure it has a value before attempting to add it to the running total\n if (Item.TaxBViz != null) \n {\n EachPO.ThisPOTaxB += Item.TaxBViz;\n }\n }\n\n\n for (Item of EachPO.Items)\n {\n //make sure it has a value before attempting to add it to the running total\n if (Item.LineTotalViz != null) \n {\n EachPO.ThisPOTotalDollar += Item.LineTotalViz;\n }\n }\n \n\n \n \n for (Item of EachPO.Items) //Iterate through all the poitems of THIS po adding the Qty amount of each item to the ThisPOTotalQty variable\n {\n //make sure it has a value before attempting to add it to the running total\n if (Item.QuantityOrdered != null) \n {\n EachPO.ThisPOTotalQty += Item.QuantityOrdered;\n }\n }\n\n }\n\n return ayData;\n}","JsHelpers":"//Register custom Handlebars helpers here to use in your report script\n//https://handlebarsjs.com/guide/#custom-helpers\nHandlebars.registerHelper('loud', function (aString) {\n return aString.toUpperCase()\n})","RenderType":0,"HeaderTemplate":" ","FooterTemplate":"\n          Printed date: \n   Page  of         ","DisplayHeaderFooter":false,"PaperFormat":10,"Landscape":true,"MarginOptionsBottom":"20mm","MarginOptionsLeft":"20mm","MarginOptionsRight":"15mm","MarginOptionsTop":"10mm","PageRanges":null,"PreferCSSPageSize":false,"PrintBackground":true,"Scale":1.00000} \ No newline at end of file diff --git a/server/AyaNova/resource/rpt/stock-report-templates/PRODUCTION Purchase Order Summaries.ayrt b/server/AyaNova/resource/rpt/stock-report-templates/PRODUCTION Purchase Order Summaries.ayrt deleted file mode 100644 index 5abbe75a..00000000 --- a/server/AyaNova/resource/rpt/stock-report-templates/PRODUCTION Purchase Order Summaries.ayrt +++ /dev/null @@ -1 +0,0 @@ -{"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; /* the # of columns set in the first row of the thead will be fixed and applied throughout table and rows */\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 a field to the overall data 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 //Iterate through all the records in the reportData adding the dollar amount of each item to the AllPONet variable\n for (EachPO of reportData.ayReportData) \n {\n let ThisPONet = 0; //Declare a temporary variable to hold the running net total for THIS po\n for (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 (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 (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 (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 (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 (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 //BUT OH OH - now the entire AllPOTotal is off hmmmmmmmmmm \n for (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":"//Register custom Handlebars helpers here to use in your report script\n//https://handlebarsjs.com/guide/#custom-helpers\nHandlebars.registerHelper('loud', function (aString) {\n return aString.toUpperCase()\n})\n\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/PRODUCTION Quote Internal Use Costs and Charges.ayrt b/server/AyaNova/resource/rpt/stock-report-templates/PRODUCTION Quote Internal Use Costs and Charges.ayrt deleted file mode 100644 index 0345ad57..00000000 --- a/server/AyaNova/resource/rpt/stock-report-templates/PRODUCTION Quote Internal Use Costs and Charges.ayrt +++ /dev/null @@ -1 +0,0 @@ -{"Name":"Quote Internal Use Costs and Charges","Active":true,"Notes":"\n","Roles":49514,"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 {{#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\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 {{#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}}
 {{Address}}, {{City}}{{ayT 'QuotePreparedByID'}}{{PreparedByViz}}
 {{CustomerPhone1Viz}}{{ayT 'WorkOrderCustomerReferenceNumber'}}{{CustomerReferenceNumber}}
 {{CustomerEmailAddressViz}}{{ayT 'WorkOrderInternalReferenceNumber'}}{{InternalReferenceNumber}}
 {{ayT \"QuoteQuoteRequestDate\"}}{{ayDate Requested}}
 {{ayT 'WorkOrderSummary'}}{{ayT 'QuoteDateSubmitted'}}{{ayDate Submitted}}
 {{Notes}} {{ayT 'QuoteValidUntilDate'}}{{ayDate ValidUntil}}
 {{ayT 'QuoteIntroduction'}}{{ayT 'QuoteDateApproved'}} {{ayDate 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
 
 
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":"/* if not using a rule set or specific property it is recommended to comment out or delete fully for report performance*/\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; //setting this to fixed causes columns to be evenly spaced for the entire table regardless of cell content, and then colspan then \"works\" as expected\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\", \"WorkOrderItemParts\", \"WorkOrderItemLabors\", \"QuoteIntroduction\", \"WorkOrderSummary\", \"QuotePreparedByID\", \"WorkOrderInternalReferenceNumber\", \"WorkOrderCustomerReferenceNumber\", \"QuoteDateSubmitted\", \"QuoteDateApproved\", \"QuoteValidUntilDate\", \"QuoteQuoteRequestDate\", \"Unit\", \"WorkOrderItemSummary\", \"WorkOrderItemTechNotes\", \"WorkOrderItemPartQuantity\", \"Price\", \"NetValue\", \"WorkOrderItemPartPartID\", \"WorkOrderItemParts\", \"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 (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;\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;\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;\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;\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;\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;\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;\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 (Item of EachWO.Items)\n\t\t{\n\t\t\t\n\t\t\tItem.ThisItemAllPartsCostxQty = 0;\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 (Part of Item.Parts)\n\t\t\t{\n\t\t\t\tPart.ThisPartCostxQty = 0;\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;\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; //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 (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;\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 (Part of Item.Parts)\n\t\t\t{\n\t\t\t\tPart.ThisPartListPricexQty = 0;\n\t\t\t\tPart.ThisPartNetVizMinusListPartxQty = 0;\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;\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 (Labor of Item.Labors)\n\t\t\t{\n\t\t\t\tLabor.ThisLaborCostxQty = 0;\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;\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; //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 (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 (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 && !isNaN(parsedDate))) {\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":true,"PaperFormat":10,"Landscape":false,"MarginOptionsBottom":"15mm","MarginOptionsLeft":"15mm","MarginOptionsRight":"10mm","MarginOptionsTop":"10mm","PageRanges":null,"PreferCSSPageSize":false,"PrintBackground":true,"Scale":1.00000} \ No newline at end of file diff --git a/server/AyaNova/resource/rpt/stock-report-templates/PRODUCTION Restock List Grouped By Wholesaler.ayrt b/server/AyaNova/resource/rpt/stock-report-templates/PRODUCTION Restock List Grouped By Wholesaler.ayrt deleted file mode 100644 index ddbaffd7..00000000 --- a/server/AyaNova/resource/rpt/stock-report-templates/PRODUCTION Restock List Grouped By Wholesaler.ayrt +++ /dev/null @@ -1 +0,0 @@ -{"Name":"Restock List Grouped By Wholesaler","Active":true,"Notes":"USE: Only displays parts with ReOrderQty > 0","Roles":49514,"AType":90,"IncludeWoItemDescendants":false,"Template":"\n\n\n\t
\n\t\t
\n\t\t\t

{{ayT 'PurchaseOrderUIRestockList'}} grouped by {{ayT 'PartWholesalerID'}}

\n\t\t
\n\t\t\n\t\t\t\n\t\t\t\t\n\t\t\t\t\t\n\t\t\t\t\t\n\t\t\t\t\t\n\t\t\t\t\t\n\t\t\t\t\n\t\t\t\n\n\t\t\t\n\t\t\t\t{{#each ayReportData}}\n\t\t\t\t\n\t\t\t\t\n\t\t\t\t\t\n\t\t\t\t\t\n\t\t\t\t\n\t\t\t\t{{#each items}}\n\t\t\t\t{{#if ReOrderQty}}\n\t\t\t\t\n\t\t\t\t\t\n\t\t\t\t\t\n\t\t\t\t\t\n\t\t\t\t\t\n\t\t\t\t\n\t\t\t\t{{/if}}\n\t\t\t\t{{/each}}\n\t\t\t\t\n\t\t\t\t\t\n\t\t\t\t\t\n\t\t\t\t\n\t\t\t\t\n\t\t\t\t\t\n\t\t\t\t\n\t\t\t\t\n\t\t\t\t{{/each}}\n\t\t\t\n\t\t
{{ayT 'Part'}}{{ayT 'PartByWarehouseInventoryReorderQuantity'}}{{ayT 'PartWarehouseName'}}
{{ayT 'PartWholesalerID'}}:    {{group}}
 {{PartName}}{{ReOrderQty}}{{PartWarehouseName}}
{{ayT 'PartByWarehouseInventoryReorderQuantity'}} for all parts from {{ayT 'PartWholesalerID'}} {{group}}: {{ThisGroupTotalQty}}
 
\n\t
\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: 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; /* the # of columns set in the first row of the thead will be fixed and applied throughout table and rows */\r\n }\r\n\r\nth {\r\n /* border-bottom: solid 1pt #9e9e9e; */\r\n height: 30px;\r\n font-size: 11pt; \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: 9pt;\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 font-size: 16pt;\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(ayData) {\n\n //send the raw report data to the groupByKey function which will return a new array grouped by the key name provided\n ayData.ayReportData = ayGroupByKey(ayData.ayReportData, 'WholesalerName')\n\n await ayGetTranslations([\"PurchaseOrderUIRestockList\", \"PartWholesalerID\", \"PartByWarehouseInventoryReorderQuantity\", \"PartWarehouseName\", \"Part\" ]);\n\n //Iterate through all the records in the reportData obtaining a running total of ReOrderQty for each group\n for (EachGroup of ayData.ayReportData) \n { \n let ThisGroupTotalQty = 0; //Declare a temporary variable to hold the running Qty total for THIS group\n for (Item of EachGroup.items) //Iterate through all the poitems of THIS po adding the Qty amount of each item to the ThisPOTotalQty variable\n {\n //make sure it has a value before attempting to add it to the running total\n if (Item.ReOrderQty != null) \n {\n ThisGroupTotalQty += Item.ReOrderQty;\n }\n Item.QuantityRunning=ThisGroupTotalQty;\n }\n EachGroup.ThisGroupTotalQty=ThisGroupTotalQty;\n\n\n }\n\n //return the data into the pipeline to send to the report template\n return ayData;\n}","JsHelpers":"","RenderType":0,"HeaderTemplate":"  ","FooterTemplate":"                Printed date: PDFDate\nPage of                ","DisplayHeaderFooter":true,"PaperFormat":10,"Landscape":false,"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/PRODUCTION Retail & Cost Value of Inventory.ayrt b/server/AyaNova/resource/rpt/stock-report-templates/PRODUCTION Retail & Cost Value of Inventory.ayrt deleted file mode 100644 index 10f95b76..00000000 --- a/server/AyaNova/resource/rpt/stock-report-templates/PRODUCTION Retail & Cost Value of Inventory.ayrt +++ /dev/null @@ -1 +0,0 @@ -{"Name":"Retail & Cost Value of Inventory","Active":true,"Notes":"","Roles":49514,"AType":90,"IncludeWoItemDescendants":false,"Template":"\n\n\n\t
\n\t\t
\n\t\t\t

Retail & Cost Value of Inventory

\n\t\t
\n\t\t\n\t\t\t\n\t\t\t\t\n\t\t\t\t\t\n\t\t\t\t\t\n\t\t\t\t\t\n\t\t\t\t\t\n\t\t\t\t\t\n\t\t\t\t\t\n\t\t\t\t\t\t\t\t\t\t\n\t\t\t\t\n\t\t\t\n\n\t\t\t\n\t\t\t\t{{#each ayReportData}}\n\t\t\t\t\n\t\t\t\t\n\t\t\t\t\t\n\t\t\t\t\t\n\t\t\t\t\t\n\t\t\t\t\t\n\t\t\t\t\t\n\t\t\t\t\t\n\t\t\t\t\t\n\t\t\t\t\n\t\t\t\t{{/each}}\n\t\t\t\n\t\t\t\n\t\t\t\t\n\t\t\t\t\t\n\t\t\t\t\t\n\t\t\t\t\t\n\t\t\t\t\t\n\t\t\t\t\n\t\t\t\n\t\t
{{ayT 'Part'}}{{ayT 'PartWarehouseName'}}{{ayT 'PartByWarehouseInventoryQuantityOnHand'}}{{ayT 'PartRetail'}} Per{{ayT 'PartRetail'}} Value{{ayT 'PartCost'}} Per{{ayT 'PartCost'}} Value
{{PartName}}{{PartWarehouseName}}{{OnHandQty}}{{ayCurrency PartRetail}}{{ayCurrency ThisPartsRetailValue}}{{ayCurrency PartCost}}{{ayCurrency ThisPartsCostValue}}
Total Retail Value for all Parts in this report{{ayCurrency AllPartsRetailValue}}Total Cost Value for all Parts in this report{{ayCurrency AllPartsCostValue}}
\n\t
\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: 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; /* the # of columns set in the first row of the thead will be fixed and applied throughout table and rows */\r\n }\r\n\r\nth {\r\n /* border-bottom: solid 1pt #9e9e9e; */\r\n height: 30px;\r\n font-size: 11pt; \r\n color: #9e9e9e;\r\n}\r\n\r\ntfoot tr{\r\n border-top: solid 1pt #9e9e9e;\r\n height: 50px;\r\n font-size: 10pt; \r\n}\r\n\r\ntbody td {\r\n padding: 10px;\r\n word-wrap: break-word;\r\n font-size: 9pt;\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 font-size: 16pt;\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(ayData) {\n\n\n await ayGetTranslations([\"PartCost\", \"PartRetail\", \"PartByWarehouseInventoryQuantityOnHand\", \"PartWarehouseName\", \"Part\" ]);\n\n\n ayData.AllPartsRetailValue = 0;\n ayData.AllPartsCostValue = 0;\n\n for (EachPart of ayData.ayReportData) {\n\n EachPart.ThisPartsRetailValue = 0;\n EachPart.ThisPartsCostValue = 0;\n if (EachPart.PartCost != null) {\n EachPart.ThisPartsCostValue = EachPart.PartCost * EachPart.OnHandQty;\n ayData.AllPartsCostValue += EachPart.ThisPartsCostValue;\n }\n if (EachPart.PartRetail != null) {\n EachPart.ThisPartsRetailValue = EachPart.PartRetail * EachPart.OnHandQty;\n ayData.AllPartsRetailValue += EachPart.ThisPartsRetailValue;\n }\n\n\n }\n\n\n //return the data into the pipeline to send to the report template\n return ayData;\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/PRODUCTION Service Dispatch.ayrt b/server/AyaNova/resource/rpt/stock-report-templates/PRODUCTION Service Dispatch.ayrt deleted file mode 100644 index eb44bdef..00000000 --- a/server/AyaNova/resource/rpt/stock-report-templates/PRODUCTION Service Dispatch.ayrt +++ /dev/null @@ -1 +0,0 @@ -{"Name":"Service Dispatch","Active":true,"Notes":"#if_eq custom Helper - if status is Completed show checkmark in checkbox; custom Prepare to replace carriage returns with spaces; display digital signatures if present","Roles":124927,"AType":34,"IncludeWoItemDescendants":false,"Template":"\n\n\n\t
\n\t\t{{#each ayReportData}}\n\t\t\n\t\t\n\t\t\t\n\t\t\t\t\n\t\t\t\t\t\n\t\t\t\t\t\n\t\t\t\t\t\t\t\t\t\t\n\t\t\t\t\n\t\t\t\t\n\t\t\t\t\t\n\t\t\t\t\t\n\t\t\t\t\t\n \t\t\t\n\t\t\t\t\n\t\t\t\t\n\t\t\t\t\t\n\t\t\t\t\t{{#if CustomerContactName}}\n\t\t\t\t\t{{else}}{{/if}}\n\t\t\t\t\t\n \t\t\t\n\t\t\t\t\n\t\t\t\t\n\t\t\t\t\t\n\t\t\t\t\n\t\t\t\t\n\t\t\t\t\t\n\t\t\t\t\n\t\t\t\n\n\t\t\t\t\t\t\t\n\t\t\t\t\n\t\t\t\t\t\n\t\t\t\t\t\n\t\t\t\t\t\n\t\t\t\t\n\t\t\t\t\n\t\t\t\t\t\n\t\t\t\t\t\n\t\t\t\t\t\t\t\t\n\t\t\t\t\n\t\t\t\t\t\n\t\t\t\t\t\n\t\t\t\t\n\t\t\t\t\n\t\t\t\t\n\t\t\t\t{{#each Items}}\n\t\t\t\t\n\t\t\t\t\t\n\t\t\t\t\t\n\t\t\t\t\t\n\t\t\t\t\t\n\t\t\t\t\t\n\t\t\t\t\t\n\t\t\t\t\t\n\t\t\t\t\n\t\t\t\t\n\t\t\t\t\t\n\t\t\t\t\t\n\t\t\t\t\t\n\t\t\t\t\t\n\t\t\t\t\n\t\t\t\t\n\t\t\t\t\t\n\t\t\t\t\t\n\t\t\t\t\t\n\t\t\t\t\t\n\t\t\t\t\n\n\t\t\t\t{{#each Units}}\n\t\t\t\t\n\t\t\t\t\t\n\t\t\t\t\t\n\t\t\t\t\t\n\t\t\t\t\n\t\t\t\t{{/each}}\n\t\t\t\t\n\n\t\t\t\t\n\t\t\t\t\t\n\t\t\t\t\n\t\t\t\t{{#each ScheduledUsers}}\n\t\t\t\t\n\t\t\t\t\t\n\t\t\t\t\t\n\t\t\t\t\t\n\t\t\t\t\t\n\t\t\t\t\t\n\t\t\t\t\n\t\t\t\t\n\t\t\t\t\t\n\t\t\t\t\t\n\t\t\t\t\t\n\t\t\t\t\t\n\t\t\t\t\t\n\t\t\t\t\n\t\t\t\t\n\t\t\t\t\t\n\t\t\t\t\t\n\t\t\t\t\t\n\t\t\t\t\t\n\t\t\t\t\t\n\t\t\t\t\n\t\t\t\t\n\t\t\t\t\t\n\t\t\t\t\t\n\t\t\t\t\t\n\t\t\t\t\t\n\t\t\t\t\t\n\t\t\t\t\n\t\t\t\t\n\t\t\t\t\t\n\t\t\t\t\t\n\t\t\t\t\t\n\t\t\t\t\t\n\t\t\t\t\t\n\t\t\t\t\n\t\t\t\t\n\t\t\t\t\t\n\t\t\t\t\n\t\t\t\t{{/each}}\n\n\t\t\t\t{{#if Tasks}}\n\t\t\t\t\n\t\t\t\t\t\n\t\t\t\t\t\n\t\t\t\t\t\n\t\t\t\t\n\t\t\t\t{{/if}}\n\t\t\t\t{{#each Tasks}}\n\t\t\t\t\n\t\t\t\t\t\n\t\t\t\t\t\n\t\t\t\t\t\n\t\t\t\t\t{{#if_eq Status 2}}\n\t\t\t\t\t{{else}}{{/if_eq}}\n\t\t\t\t\t\n\t\t\t\t\n\t\t\t\t{{/each}}\n\t\t\t\t{{#if Tasks}}\t\t\t\t\n\t\t\t\t\n\t\t\t\t\t\n\t\t\t\t\n\t\t\t\t{{/if}}\n\n\t\t\t\t{{#if Parts}}\n\t\t\t\t\n\t\t\t\t\t\n\t\t\t\t\t\n\t\t\t\t\t\n\t\t\t\t\t\n\t\t\t\t\t\n\t\t\t\t\n\t\t\t\t{{/if}}\n\t\t\t\t{{#each Parts}}\n\t\t\t\t\n\t\t\t\t\t\n\t\t\t\t\t\n\t\t\t\t\t\n\t\t\t\t\t\n\t\t\t\t\t{{#if Serials}} \n\t\t\t\t\t{{else}} {{/if}}\n\t\t\t\t\t\n\t\t\t\t\n\t\t\t\t{{/each}}\n\t\t\t\t{{#if Parts}}\t\n\t\t\t\t\n\t\t\t\t\t\n\t\t\t\t\n\t\t\t\t{{/if}}\n\n\t\t\t\t\n\t\t\t\t\t\n\t\t\t\t\t\n\t\t\t\t\t\n\t\t\t\t\n\t\t\t\t\n\t\t\t\t\t\n\t\t\t\t\n\t\t\t\t\n\t\t\t\t\t\n\t\t\t\t\n\t\t\t\t\n\t\t\t\t\t\n\t\t\t\t\n\t\t\t\t\n\t\t\t\t\t\n\t\t\t\t\n\t\t\t\t{{/each}}\n\t\t\t\t\n\n\t\t\t\t\n\t\t\t\t\t\n\t\t\t\t\n\t\t\t\t\n\t\t\t\t\t\n\t\t\t\t\t{{#if TechSignature}} \n\t\t\t\t\t{{else}}{{/if}}\n\t\t\t\t\t\n\t\t\t\t\t\n\t\t\t\t\t{{#if CustomerSignature}} \n\t\t\t\t\t{{else}}{{/if}}\n\t\t\t\t\t\t\t\t\n\t\t\t\t\n\t\t\t\t\t\n\t\t\t\t\n\t\t\t\t\n\t\t\t\t\t\n\t\t\t\t\t{{#if TechSignatureCaptured}} \n\t\t\t\t\t{{else}}{{/if}}\n\t\t\t\t\t\n\t\t\t\t\t\n\t\t\t\t\t{{#if CustomerSignatureCaptured}} \n\t\t\t\t\t{{else}}{{/if}}\n\t\t\t\t\n\t\t\t\n\t\t
{{ayT 'Customer'}}{{CustomerViz}}{{../ayServerMetaData.CompanyName}}
{{ayT 'AddressTypePhysical'}}{{Address}}, {{City}}{{ayT 'WorkOrderServiceNumber'}}{{Serial}}
{{ayT 'WorkOrderCustomerContactName'}}{{CustomerContactName}} {{CustomerPhone1Viz}} {{CustomerEmailAddressViz}}{{CustomerPhone1Viz}} {{CustomerEmailAddressViz}}{{ayT 'WorkOrderServiceDate'}}{{myDate ServiceDate}}
 
 
{{ayT 'WorkOrderSummary'}}{{Notes}}
{{ayT 'WorkOrderCloseByDate'}}{{ayDateTime CompleteByDate}}
{{ayT 'CustomerTechNotes'}}{{CustomerTechNotesViz}}
{{ayT 'WorkOrderItemPriorityID'}}{{WorkOrderItemPriorityNameViz}}{{ayT 'WorkOrderItemRequestDate'}}{{ayDateTime RequestDate}}{{ayT 'Status'}}{{WorkOrderItemStatusNameViz}}
{{ayT 'WorkOrderItemSummary'}} #{{Sequence}}{{Notes}}
{{ayT 'WorkOrderItemTechNotes'}}{{TechNotes}}
{{ayT 'Unit'}}{{UnitViz}} {{UnitModelNameViz}}
 
{{ayT 'NotifyEventScheduledOnWorkorder'}}{{UserViz}}As expected?Actual
 {{ayT 'WorkOrderItemScheduledUserStartDate'}}{{ayDateTime StartDate}}
 {{ayT 'WorkOrderItemScheduledUserStopDate'}}{{ayDateTime StopDate}}
 {{ayT 'WorkOrderItemScheduledUserServiceRateID'}}{{ServiceRateViz}}
 {{ayT 'WorkOrderItemScheduledUserEstimatedQuantity'}}{{EstimatedQuantity}}
 
{{ayT 'WorkOrderItemTaskWorkOrderItemTaskCompletionType'}}{{ayT 'WorkOrderItemTasks'}}
{{StatusViz}}{{Task}}
 
{{ayT 'WorkOrderItemPartQuantity'}}{{ayT 'WorkOrderItemPartPartWarehouseID'}}{{ayT 'Part'}}{{ayT 'WorkOrderItemPartUsed'}}
{{Quantity}}{{PartWarehouseViz}}{{PartNameViz}} {{PartDescriptionViz}}   {{ayT 'WorkOrderItemPartPartSerialID'}}: {{Serials}} {{PartNameViz}} {{PartDescriptionViz}}
 
{{ayT 'WorkOrderItemLaborServiceDetails'}}
 
 
 
 
 
{{ayT 'TechSignature'}}
 {{ayT 'CustomerSignature'}}
 
Date {{ayDateTime TechSignatureCaptured}}
 Date {{ayDateTime CustomerSignatureCaptured}}
\n\t\t{{/each}}\n\t
\n\n","Style":"/* if not using a rule set or specific property it is recommended to comment out or delete fully for report performance*/\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\n\ntable { \n table-layout: fixed; //setting this to fixed causes columns to be evenly spaced for the entire table regardless of cell content, and then colspan then \"works\" as expected\n font-family: 'Helvetica Neue', 'Helvetica', Helvetica, Arial, sans-serif;\n border-collapse: collapse;\n white-space: pre-wrap;\n font-size: 8pt;\n width: 100%;\n }\n\n\nth {\n height: 30px;\n text-align: left;\n color: #9e9e9e;\n}\n\n\ntbody tr {\n height: 10px;\n word-wrap: break-word;\n}\n\ntbody tr:nth-child(even) {\n background-color: #f8f8f8; /* MUST checkmark Print background in PDF Options for this to show */\n}\n\n\n.fontgreen {\n color: green;\n}\n.fontblue {\n color: blue;\n}\n.fontred {\n color:red;\n}\n\n\n.rightlean {\n text-align: right;\n}\n.leftlean {\n text-align: left;\n}\n.centerlean {\n text-align: center;\n}","JsPrerender":"async function ayPrepareData(reportData){ \n //this function (if present) is called with the report data \n //before the report is rendered\n //modify data as required here and return it to change the data before the report renders\n //see the help documentation for details\n\n await ayGetTranslations([ \"WorkOrderCloseByDate\", \"WorkOrderServiceDate\", \"WorkOrderServiceNumber\", \"Customer\", \"WorkOrderSummary\", \"Unit\", \"WorkOrderItemSummary\", \"WorkOrderItemPartQuantity\", \"AddressTypePhysical\", \"WorkOrderCustomerContactName\", \"CustomerTechNotes\", \"WorkOrderItemTechNotes\", \"Part\", \"WorkOrderItemPartUsed\", \"WorkOrderItemPartPartWarehouseID\", \"WorkOrderItemPartPartSerialID\", \"WorkOrderItemLaborServiceDetails\", \"WorkOrderItemScheduledUser\", \"NotifyEventScheduledOnWorkorder\", \"WorkOrderItemScheduledUserEstimatedQuantity\", \"WorkOrderItemScheduledUserStartDate\", \"WorkOrderItemScheduledUserStopDate\", \"WorkOrderItemScheduledUserServiceRateID\", \"WorkOrderItemTasks\", \"WorkOrderItemTaskWorkOrderItemTaskCompletionType\", \"CustomerSignature\", \"TechSignature\", \"WorkOrderItemPriorityID\", \"Status\", \"WorkOrderItemRequestDate\" ]);\n\n //below checks if any parts have Serials to remove carriage returns so parts serials display on same line\n for (EachWO of reportData.ayReportData) {\n for (Item of EachWO.Items) {\n for (Part of Item.Parts) {\n if (Part.Serials != null) {\n s = Part.Serials; \n Part.Serials = s.replace(/[\\n\\r]+/g, ' ');\n }\n }\n }\n }\n\n return reportData; \n}","JsHelpers":"//Register custom Handlebars helpers here to use in your report script\n//https://handlebarsjs.com/guide/#custom-helpers\nHandlebars.registerHelper('loud', function (aString) {\n return aString.toUpperCase()\n})\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//\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 && !isNaN(parsedDate))) {\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});","RenderType":0,"HeaderTemplate":"  ","FooterTemplate":"                Printed date: PDFDate\nPage of                ","DisplayHeaderFooter":true,"PaperFormat":10,"Landscape":false,"MarginOptionsBottom":"15mm","MarginOptionsLeft":"20mm","MarginOptionsRight":"15mm","MarginOptionsTop":"10mm","PageRanges":null,"PreferCSSPageSize":false,"PrintBackground":true,"Scale":1.00000} \ No newline at end of file diff --git a/server/AyaNova/resource/rpt/stock-report-templates/PRODUCTION Tax Codes List.ayrt b/server/AyaNova/resource/rpt/stock-report-templates/PRODUCTION Tax Codes List.ayrt deleted file mode 100644 index 31a2eafb..00000000 --- a/server/AyaNova/resource/rpt/stock-report-templates/PRODUCTION Tax Codes List.ayrt +++ /dev/null @@ -1 +0,0 @@ -{"Name":"Tax Codes List","Active":true,"Notes":"","Roles":124927,"AType":64,"IncludeWoItemDescendants":false,"Template":"\n\n\n
\n
\n

Tax Codes List

\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 \n \n\t\t {{#if TaxOnTax }}{{else}}{{/if}}\n\t\t \n \n \n {{/each}}\n \n\n \n \n\n
{{ayT 'TaxCodeName'}}{{ayT 'Tags'}}{{ayT 'TaxCodeTaxA'}}{{ayT 'TaxCodeTaxB'}}{{ayT 'TaxCodeTaxOnTax'}}{{ayT 'TaxCodeNotes'}}
{{Name}}{{Tags}}{{TaxAPct}} %{{TaxBPct}} %{{Notes}}
\n\n\n
\n\n\n","Style":"body {\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; /* the # of columns set in the first row of the thead will be fixed and applied throughout table and rows */\r\n }\r\n\r\nth {\r\n border-bottom: solid 1pt #9e9e9e;\r\n height: 50px;\r\n font-size: 11pt; \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: 9pt;\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 font-size: 16pt;\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":" \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\nasync function ayPrepareData(ayData) { \n\n await ayGetTranslations([\"TaxCodeName\", \"Tags\", \"TaxCodeTaxA\", \"TaxCodeTaxB\", \"TaxCodeTaxOnTax\", \"TaxCodeNotes\" ]);\n \n return ayData;\n}","JsHelpers":"//Register custom Handlebars helpers here to use in your report script\r\n//https://handlebarsjs.com/guide/#custom-helpers","RenderType":0,"HeaderTemplate":"  ","FooterTemplate":"                Printed date: PDFDate\nPage of                ","DisplayHeaderFooter":true,"PaperFormat":10,"Landscape":false,"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/PRODUCTION Units Per Customer .ayrt b/server/AyaNova/resource/rpt/stock-report-templates/PRODUCTION Units Per Customer .ayrt deleted file mode 100644 index 9c889c85..00000000 --- a/server/AyaNova/resource/rpt/stock-report-templates/PRODUCTION Units Per Customer .ayrt +++ /dev/null @@ -1 +0,0 @@ -{"Name":"Units Per Customer ","Active":true,"Notes":"Use of ayGroupByKey","Roles":50554,"AType":31,"IncludeWoItemDescendants":false,"Template":"\n\n\t
\t \n\t\t \n \t\t\n \n\t\t\t\t\n\t\t\t\t\n\t\t\t\t\n\t\t\t\t\n\t\t\t\t\n\t\t\t\t \n \n \t\t\n \n \n {{#each ayReportData}}\n \n \n\t\t\t \n \n\t\t {{#each items}}\n\t\t \n\t\t\t \n\t\t\t\t\n\t\t\t\t\n\t\t\t\t\n\t\t\t\t\n\t\t\t\t \n \n\t\t\t{{/each}}\n\t\t\t\n\t\t\t \n \n \t {{/each}}\n \n
{{ayT 'UnitSerial'}}{{ayT 'UnitModel'}}{{ayT 'LastServiceWorkOrderServiceDate'}}{{ayT 'LastServiceWorkOrder'}}{{ayT 'UnitNotes'}}
# of {{ayT 'UnitList'}} for {{group}}: {{count}}
 {{Serial}}{{UnitModelNameViz}}{{ayDate LastServiceDateViz}}{{LastWorkOrderViz}}{{Notes}}
 
\n\n\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: 13pt; \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; /* the # of columns set in the first row of the thead will be fixed and applied throughout table and rows */\n }\n\nth {\n height: 50px;\n font-size: 11pt; \n color: #9e9e9e;\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\n //send the raw report data to the groupByKey function which will return a new array grouped by the key name provided\n reportData.ayReportData = ayGroupByKey(reportData.ayReportData, 'CustomerViz')\n\n await ayGetTranslations([ \"UnitList\", \"Customer\", \"UnitSerial\", \"Customer\", \"LastServiceWorkOrder\", \"LastServiceWorkOrderServiceDate\", \"UnitNotes\", \"UnitModel\" ]);\n\n\n //return the data into the pipeline to send to the report template\n return reportData;\n}\n\n","JsHelpers":"//Register custom Handlebars helpers here to use in your report script\n//https://handlebarsjs.com/guide/#custom-helpers\nHandlebars.registerHelper('loud', function (aString) {\n return aString.toUpperCase()\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/PRODUCTION Vendor Contact Report.ayrt b/server/AyaNova/resource/rpt/stock-report-templates/PRODUCTION Vendor Contact Report.ayrt deleted file mode 100644 index a2fd34cd..00000000 --- a/server/AyaNova/resource/rpt/stock-report-templates/PRODUCTION Vendor Contact Report.ayrt +++ /dev/null @@ -1 +0,0 @@ -{"Name":"Vendor Contact Report","Active":true,"Notes":"","Roles":49258,"AType":33,"IncludeWoItemDescendants":false,"Template":"\n\n\n
\n
\n

Vendor Contact List

\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 \n \n \n \n \n {{/each}}\n \n\n \n \n\n
{{ayT 'VendorName'}}{{ayT 'Tags'}}{{ayT 'VendorAccountNumber'}}{{ayT 'VendorPhone1'}}{{ayT 'VendorEmail'}}{{ayT 'WebAddress'}}{{ayT 'VendorNotes'}}
{{Name}}{{Tags}}{{AccountNumber}}{{Phone1}}{{EmailAddress}}{{WebAddress}}{{Notes}}
\n\n\n
\n\n\n","Style":"body {\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; /* the # of columns set in the first row of the thead will be fixed and applied throughout table and rows */\n }\n\nth {\n border-bottom: solid 1pt #9e9e9e;\n height: 50px;\n font-size: 11pt; \n color: #9e9e9e;\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":" \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\nasync function ayPrepareData(ayData) { \n\n await ayGetTranslations([\"VendorName\", \"Tags\", \"VendorAccountNumber\", \"VendorPhone1\", \"VendorEmail\", \"VendorNotes\", \"WebAddress\" ]);\n \n return ayData;\n}","JsHelpers":"//Register custom Handlebars helpers here to use in your report script\n//https://handlebarsjs.com/guide/#custom-helpers\n","RenderType":0,"HeaderTemplate":"  ","FooterTemplate":"                Printed date: PDFDate\nPage of                \n","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 new file mode 100644 index 00000000..7e9599b5 --- /dev/null +++ b/server/AyaNova/resource/rpt/stock-report-templates/Part Grouped Net Cost Difference.ayrt @@ -0,0 +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'}}{{ayT 'PartRetail'}}{{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//need to now edit below to get running totals of THE DATA returned above - can't reference items as not in the returned data\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\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 (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 (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//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\n return reportData; \n}","JsHelpers":"//Register custom Handlebars helpers here to use in your report script\n//https://handlebarsjs.com/guide/#custom-helpers\nHandlebars.registerHelper('loud', function (aString) {\n return aString.toUpperCase()\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/Part Requests Grouped By Wholesaler.ayrt b/server/AyaNova/resource/rpt/stock-report-templates/Part Requests Grouped By Wholesaler.ayrt new file mode 100644 index 00000000..31c3a4bf --- /dev/null +++ b/server/AyaNova/resource/rpt/stock-report-templates/Part Requests Grouped By Wholesaler.ayrt @@ -0,0 +1 @@ +{"Name":"Part Requests Grouped By Wholesaler","Active":true,"Notes":"","Roles":50554,"AType":91,"IncludeWoItemDescendants":false,"Template":"\n\n\n\t
\n\t\t
\n\t\t\t

{{ayT 'WorkOrderItemPartRequests'}} grouped by {{ayT 'PartWholesalerID'}}

\n\t\t
\n\t\t\n\t\t\t\n\t\t\t\t\n\t\t\t\t\t\n\t\t\t\t\t\n\t\t\t\t\t\n\t\t\t\t\t\n\t\t\t\t\t\n\t\t\t\t\t\n\t\t\t\t\t\n\t\t\t\t\t\n\t\t\t\t\t\n\t\t\t\t\n\t\t\t\n\n\t\t\t\n\t\t\t\t{{#each ayReportData}}\n\t\t\t\t\n\t\t\t\t\n\t\t\t\t\n\t\t\t\t\t\n\t\t\t\t\t\n\t\t\t\t\n\t\t\t\t{{#each items}}\n\t\t\t\t\n\t\t\t\t\t\n\t\t\t\t\t\n\t\t\t\t\t\n\t\t\t\t\t\n\t\t\t\t\t\n\t\t\t\t\t\n\t\t\t\t\t\n\t\t\t\t\t\n\t\t\t\t\t\n\t\t\t\t\n\t\t\t\t{{/each}}\n\t\t\t\t\n\t\t\t\t\t\n\t\t\t\t\t\n\t\t\t\t\n\t\t\t\t\n\t\t\t\t\t\n\t\t\t\t\t\n\t\t\t\t\n\t\t\t\t\n\t\t\t\t\t\n\t\t\t\t\n\t\t\t\t\n\t\t\t\t{{/each}}\n\t\t\t\n\t\t
{{ayT 'Part'}}{{ayT 'QuantityRequired'}}{{ayT 'WorkOrderItemPartPartWarehouseID'}}Date Requested{{ayT 'PurchaseOrderPONumber'}}{{ayT 'PurchaseOrderOrderedDate'}}{{ayT 'PurchaseOrderItemUIOrderedFrom'}}{{ayT 'PurchaseOrderExpectedReceiveDate'}}
{{ayT 'PartWholesalerID'}}: {{group}}
 {{PartName}}{{Quantity}}{{PartWarehouseName}}{{ayDate RequestDate}}{{PurchaseOrderSerial}}{{ayDate OrderedDate}}{{PurchaseOrderVendor}}{{ayDate ExpectedReceiveDate}}
# of {{ayT 'WorkOrderItemPartRequests'}} for {{ayT 'PartWholesalerID'}} {{group}}: {{count}}
Total {{ayT 'QuantityRequired'}} of {{ayT 'PartList'}} for {{ayT 'PartWholesalerID'}} {{group}}: {{ThisGroupTotalQty}}
 
\n\t
\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: 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; /* the # of columns set in the first row of the thead will be fixed and applied throughout table and rows */\r\n }\r\n\r\nth {\r\n /* border-bottom: solid 1pt #9e9e9e; */\r\n height: 50px;\r\n font-size: 11pt; \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: 9pt;\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 font-size: 16pt;\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(ayData) {\n\n //send the raw report data to the groupByKey function which will return a new array grouped by the key name provided\n ayData.ayReportData = ayGroupByKey(ayData.ayReportData, 'WholesalerName')\n\n await ayGetTranslations([\"WorkOrderItemPartRequests\", \"PartWholesalerID\", \"Part\", \"QuantityRequired\", \"WorkOrderItemPartPartWarehouseID\", \"PurchaseOrderPONumber\", \"PurchaseOrderOrderedDate\", \"PurchaseOrderItemUIOrderedFrom\", \"PurchaseOrderExpectedReceiveDate\", \"PartList\" ]);\n\n //Iterate through all the records in the reportData obtaining a running total of Quantity for each group\n for (EachGroup of ayData.ayReportData) \n { \n let ThisGroupTotalQty = 0; //Declare a temporary variable to hold the running Qty total for THIS group\n for (Item of EachGroup.items) //Iterate through all the records adding the Qty amount of each item to the ThisGroupTotalQty variable\n {\n //make sure it has a value before attempting to add it to the running total\n if (Item.Quantity != null) \n {\n ThisGroupTotalQty += Item.Quantity;\n }\n Item.QuantityRunning=ThisGroupTotalQty;\n }\n EachGroup.ThisGroupTotalQty=ThisGroupTotalQty;\n\n\n }\n\n //return the data into the pipeline to send to the report template\n return ayData;\n}","JsHelpers":"","RenderType":0,"HeaderTemplate":"  ","FooterTemplate":"                Printed date: PDFDate\nPage of                ","DisplayHeaderFooter":true,"PaperFormat":10,"Landscape":true,"MarginOptionsBottom":"20mm","MarginOptionsLeft":"20mm","MarginOptionsRight":"15mm","MarginOptionsTop":"10mm","PageRanges":null,"PreferCSSPageSize":false,"PrintBackground":true,"Scale":1.00000} \ No newline at end of file diff --git a/server/AyaNova/resource/rpt/stock-report-templates/Parts & Labor Profit _ Loss.ayrt b/server/AyaNova/resource/rpt/stock-report-templates/Parts & Labor Profit _ Loss.ayrt new file mode 100644 index 00000000..0f2c96f6 --- /dev/null +++ b/server/AyaNova/resource/rpt/stock-report-templates/Parts & Labor Profit _ Loss.ayrt @@ -0,0 +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 {{#if ServiceDate }}{{else}} {{/if}}\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}}no Service Date specified {{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 (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 (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 (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 (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":"//Register custom Handlebars helpers here to use in your report script\n//https://handlebarsjs.com/guide/#custom-helpers\nHandlebars.registerHelper('loud', function (aString) {\n return aString.toUpperCase()\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/Parts with available serial numbers.ayrt b/server/AyaNova/resource/rpt/stock-report-templates/Parts with available serial numbers.ayrt new file mode 100644 index 00000000..398b883b --- /dev/null +++ b/server/AyaNova/resource/rpt/stock-report-templates/Parts with available serial numbers.ayrt @@ -0,0 +1 @@ +{"Name":"Parts with available serial numbers","Active":true,"Notes":"Includes #if_eq custom Helper which results in ONLY displaying parts from the datalist that HAVE serial numbers \n","Roles":49514,"AType":20,"IncludeWoItemDescendants":false,"Template":"\n\n
\n
\n

Parts with Serials Report

\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 {{#if_eq PartSerialsViz \"\"}}\n \n {{else}}\n \n \n \n \n \n \n \n \n {{/if_eq}}\n {{/each}}\n \n\n
 
{{ayT 'Part'}}{{ayT 'PartManufacturerID'}}{{ayT 'PartCost'}}{{ayT 'PartRetail'}}{{ayT 'PartSerialNumbersAvailable'}}
 
{{Name}}{{ManufacturerViz}}{{ayCurrency Cost}}{{ayCurrency Retail}}{{PartSerialsViz}}
\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 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: 50px;\n font-size: 11pt; \n color: #9e9e9e;\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":" \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\nasync function ayPrepareData(ayData) { \n\n await ayGetTranslations([\"Part\", \"PartManufacturerID\", \"PartRetail\", \"PartCost\", \"PartSerialNumbersAvailable\" ]);\n \n return ayData;\n}","JsHelpers":"//Register custom Handlebars helpers here to use in your report script\n//https://handlebarsjs.com/guide/#custom-helpers\nHandlebars.registerHelper('loud', function (aString) {\n return aString.toUpperCase()\n})\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});","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 Detailed.ayrt b/server/AyaNova/resource/rpt/stock-report-templates/Purchase Order Detailed.ayrt new file mode 100644 index 00000000..a25acfaa --- /dev/null +++ b/server/AyaNova/resource/rpt/stock-report-templates/Purchase Order Detailed.ayrt @@ -0,0 +1 @@ +{"Name":"Purchase Order Detailed","Active":true,"Notes":"custom Prepare for deriving net totals and grand total \n","Roles":49250,"AType":26,"IncludeWoItemDescendants":false,"Template":"\n\n\n\t
\n\t\t{{#each ayReportData}}\n\t\t\n\t\t\n\t\t\t\n\t\t\t\n\t\t\t\t\n\t\t\t\t\n\t\t\t\t\t\n\t\t\t\t\t\n\t\t\t\t\t{{#if DropShipToCustomerViz}}{{else}} {{/if}}\n\t\t\t\t\t{{#if DropShipToCustomerViz}}{{else}} {{/if}}\n\t\t\t\t\n\t\t\t\t\n\t\t\t\t\t\n\t\t\t\t\t\n\t\t\t\t\t{{#if DropShipToCustomerViz}}{{else}}{{/if}}\n\t\t\t\t\t\n\t\t\t\t\n\t\t\t\t\n\t\t\t\t\t\n\t\t\t\t\t{{#if DropShipToCustomerViz}}{{else}} {{/if}}\n\t\t\t\t\t\n\t\t\t\t\n\t\t\t\t\n\t\t\t\t\t\n\t\t\t\t\t\n\t\t\t\t\t{{#if DropShipToCustomerViz}}{{else}} {{/if}}\n\t\t\t\t\t\n\t\t\t\t\n\t\t\t\t\n\t\t\t\t\t\n\t\t\t\t\t{{#if DropShipToCustomerViz}}{{else}} {{/if}}\n\t\t\t\t\t\n\t\t\t\t\n\t\t\t\t\n\t\t\t\t\t\n\t\t\t\t\t\n\t\t\t\t\t\n\t\t\t\t\n\t\t\t\t\n\t\t\t\t\t\n\t\t\t\t\n\t\t\t\t\n\t\t\t\n\n\t\t\t\n\t\t\t\t\n\t\t\t\t\t\n\t\t\t\t\t\n\t\t\t\t\t\n\t\t\t\t\t\n\t\t\t\t\t\n\t\t\t\t\t\n\t\t\t\t\t\n\t\t\t\t\t\n\t\t\t\t\t\n\t\t\t\t\t\n\t\t\t\t\n\t\t\t\t{{#each Items}}\n\t\t\t\t\n\t\t\t\t\t\n\t\t\t\t\t\n\t\t\t\t\t\n\t\t\t\t\t\n\t\t\t\t\t\n\t\t\t\t\t\n\t\t\t\t\t\n\t\t\t\t\t{{#if TaxAViz}}{{else}}{{/if}}\n\t\t\t\t\t{{#if TaxBViz}}{{else}}{{/if}}\n\t\t\t\t\t\n\t\t\t\t\n\t\t\t\t{{/each}}\n\t\t\t\t\n\t\t\t\t\t\n\t\t\t\t\n\t\t\t\n\n\n\t\t\t\n\t\t\t\t\n\n\t\t\t\t\n\t\t\t\t\t\n\t\t\t\t\t\n\t\t\t\t\t\n\n\t\t\t\t\n\t\t\t\t\t\n\t\t\t\t\t\n\t\t\t\t\t\n\t\t\t\t\n\t\t\t\t\n\t\t\t\t\t\n\t\t\t\t\t\n\t\t\t\t\t\n\t\t\t\t\t{{#if ThisPOTaxA}}{{else}} {{/if}}\n\t\t\t\t\n\t\t\t\t\n\t\t\t\t\t\n\t\t\t\t\t\n\t\t\t\t\t{{#if ThisPOTaxB}}{{else}} {{/if}}\n\t\t\t\t\n\n\t\t\t\t\n\t\t\t\t\t\n\t\t\t\t\n\n\t\t\t\t\n\t\t\t\t\t\n\t\t\t\t\t\n\t\t\t\t\t\n\t\t\t\t\n\n\t\t\t\n\n\t\t
{{ayT 'PurchaseOrderPONumber'}}{{Serial}}{{ayT 'PurchaseOrderDropShipToCustomerID'}}Bill ToBill To & Ship To
{{ayT 'PurchaseOrderOrderedDate'}}{{ayDate OrderedDate}}{{DropShipToCustomerViz}}{{../ayServerMetaData.CompanyName}}
 {{DropShipToCustomerAddressViz}} {{DropShipToCustomerCityViz}}{{../ayServerMetaData.CompanyPostAddress}}
{{ayT 'Vendor'}}{{VendorViz}} {{DropShipToCustomerRegionViz}} {{DropShipToCustomerPostCodeViz}}{{../ayServerMetaData.CompanyPostCity}} {{../ayServerMetaData.CompanyPostRegion}} {{../ayServerMetaData.CompanyPostCode}}
{{VendorAddressViz}} {{VendorCityViz}} {{VendorRegionViz}}{{DropShipToCustomerPhone1Viz}}{{../ayServerMetaData.CompanyPhone1}} {{../ayServerMetaData.CompanyEmailAddress}}
{{VendorContactViz}} {{VendorPhone1Viz}} {{VendorEmailAddressViz}}{{ayT 'VendorAccountNumber'}}{{VendorAccountNumberViz}}
 
QtyUOMOur Part#MFG#Vendor#Price PerNet{{ayT 'TaxCodeTaxA'}}{{ayT 'TaxCodeTaxB'}}{{ayT 'PurchaseOrderItemLineTotal'}}
{{QuantityOrdered}}{{PartUnitOfMeasureViz}}{{PartNameViz}}{{PartManufacturerNumberViz}} {{VendorPartNumber}} {{ayCurrency PurchaseOrderCost}}{{ayCurrency NetTotalViz}}{{ayCurrency TaxAViz}}0.00{{ayCurrency TaxBViz}}0.00{{ayCurrency LineTotalViz}}
 
Total Qty of Parts Ordered{{ThisPOTotalQty}}
{{ayT 'PurchaseOrderItemNetTotal'}}{{ayCurrency ThisPONet}}
{{ayT 'VendorAlertNotes'}}{{VendorAlertNotesViz}} {{ayT 'TaxCodeTaxA'}}{{ ayCurrency ThisPOTaxA }}0.00
{{ayT 'TaxCodeTaxB'}}{{ ayCurrency ThisPOTaxB }}0.00
 
Direct all inquiries to {{../ayServerMetaData.CompanyName}} {{../ayServerMetaData.CompanyPhone1}} or {{../ayServerMetaData.CompanyEmailAddress}}Purchase Order Total{{ ayCurrency ThisPOTotalDollar}}
\n\t\t{{/each}}\n\n\t
\n\n\n","Style":"\n.singlePage\n{\npage-break-after: always;\n\n}\nbody {\n font-family: 'Helvetica', 'Helvetica Neue', Arial, sans-serif; \n}\n\n.reporttitle { \n margin-bottom: 20pt; \n font-weight: bold; \n font-size: 13pt; \n} \n\ntable { \n border-collapse: collapse;\n white-space: pre-wrap;\n font-size: 10pt;\n width: 100%;\n table-layout: fixed; \n }\n\nth {\n height: 25px; \n color: #9e9e9e;\n}\n\ntbody td {\n padding: 7px;\n word-wrap: break-word;\n font-size: 9pt;\n}\n\ntbody tr:nth-child(even) {\n background-color: #f8f8f8; /* MUST checkmark Print background in PDF Options for this to show */\n}\n\n\n.rightlean {\n text-align: right;\n}\n.leftlean {\n text-align: left;\n}\n.centerlean {\n text-align: center;\n}\n\n\n.fontgreen {\n color: green;\n font-size: 16pt;\n}\n.fontblue {\n color: blue;\n}\n.fontred {\n color:red;\n}\n","JsPrerender":"async function ayPrepareData(ayData) {\n //Example of both manipulating the ayData before rendering the report (by adding a running total field)\n //and adding a field to the overall data calculating the total dollar amount for all records\n\n await ayGetTranslations([\"PurchaseOrderPONumber\", \"PurchaseOrderOrderedDate\", \"PurchaseOrderDropShipToCustomerID\", \"Vendor\", \"Part\", \"VendorAccountNumber\", \"PurchaseOrderItemNetTotal\", \"VendorAlertNotes\", \"TaxCodeTaxA\", \"TaxCodeTaxB\", \"PurchaseOrderItemLineTotal\" ]);\n\n\n //Iterate through all the records in the ayData adding the dollar amount of each specified property to the appropriate declared variable\n\n for (EachPO of ayData.ayReportData) \n {\n EachPO.ThisPONet = 0; //Declare a temporary variable to hold the running net total for THIS po\n EachPO.ThisPOTaxA = 0; //Declare a temporary variable to hold the running Tax A total for THIS po \n EachPO.ThisPOTaxB = 0; //Declare a temporary variable to hold the running Tax B total for THIS po\n EachPO.ThisPOTotalDollar = 0; //Declare a temporary variable to hold the running total of THIS PO \n EachPO.ThisPOTotalQty = 0; //Declare a temporary variable to hold the running Qty total for THIS po\n\n for (Item of EachPO.Items) //Iterate through all the poitems of THIS po adding the dollar amount of each item to the ThisPONet variable\n {\n //make sure it has a value before attempting to add it to the running total\n if (Item.NetTotalViz != null) \n {\n EachPO.ThisPONet += Item.NetTotalViz;\n }\n }\n \n for (Item of EachPO.Items) //Iterate through all the poitems of THIS po adding the dollar amount of each item to the ThisPOTaxA variable\n {\n //make sure it has a value before attempting to add it to the running total \n if (Item.TaxAViz != null) \n {\n EachPO.ThisPOTaxA += Item.TaxAViz;\n }\n }\n \n for (Item of EachPO.Items) //Iterate through all the poitems of THIS po adding the dollar amount of each item to the ThisPOTaxB variable\n {\n //make sure it has a value before attempting to add it to the running total\n if (Item.TaxBViz != null) \n {\n EachPO.ThisPOTaxB += Item.TaxBViz;\n }\n }\n\n\n for (Item of EachPO.Items)\n {\n //make sure it has a value before attempting to add it to the running total\n if (Item.LineTotalViz != null) \n {\n EachPO.ThisPOTotalDollar += Item.LineTotalViz;\n }\n }\n \n\n \n \n for (Item of EachPO.Items) //Iterate through all the poitems of THIS po adding the Qty amount of each item to the ThisPOTotalQty variable\n {\n //make sure it has a value before attempting to add it to the running total\n if (Item.QuantityOrdered != null) \n {\n EachPO.ThisPOTotalQty += Item.QuantityOrdered;\n }\n }\n\n }\n\n return ayData;\n}","JsHelpers":"//Register custom Handlebars helpers here to use in your report script\n//https://handlebarsjs.com/guide/#custom-helpers\nHandlebars.registerHelper('loud', function (aString) {\n return aString.toUpperCase()\n})","RenderType":0,"HeaderTemplate":" ","FooterTemplate":"\n          Printed date: \n   Page  of         ","DisplayHeaderFooter":false,"PaperFormat":10,"Landscape":true,"MarginOptionsBottom":"20mm","MarginOptionsLeft":"20mm","MarginOptionsRight":"15mm","MarginOptionsTop":"10mm","PageRanges":null,"PreferCSSPageSize":false,"PrintBackground":true,"Scale":1.00000} \ 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 new file mode 100644 index 00000000..5d44e98b --- /dev/null +++ b/server/AyaNova/resource/rpt/stock-report-templates/Purchase Order Summaries.ayrt @@ -0,0 +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 a field to the overall data 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 //Iterate through all the records in the reportData adding the dollar amount of each item to the AllPONet variable\n for (EachPO of reportData.ayReportData) \n {\n let ThisPONet = 0; //Declare a temporary variable to hold the running net total for THIS po\n for (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 (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 (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 (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 (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 (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 //BUT OH OH - now the entire AllPOTotal is off hmmmmmmmmmm \n for (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":"//Register custom Handlebars helpers here to use in your report script\n//https://handlebarsjs.com/guide/#custom-helpers\nHandlebars.registerHelper('loud', function (aString) {\n return aString.toUpperCase()\n})\n\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 new file mode 100644 index 00000000..3c316f4c --- /dev/null +++ b/server/AyaNova/resource/rpt/stock-report-templates/Quote Internal Use Costs and Charges.ayrt @@ -0,0 +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\"}}{{ayDate Requested}}
 {{ayT 'WorkOrderSummary'}}{{ayT 'QuoteDateSubmitted'}}{{ayDate Submitted}}
 {{Notes}} {{ayT 'QuoteValidUntilDate'}}{{ayDate ValidUntil}}
 {{ayT 'QuoteIntroduction'}}{{ayT 'QuoteDateApproved'}} {{ayDate 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 (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 (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 (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 (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 (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 (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 (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 (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 && !isNaN(parsedDate))) {\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 Item Summary.ayrt b/server/AyaNova/resource/rpt/stock-report-templates/Quote Item Summary.ayrt new file mode 100644 index 00000000..9bcba59e --- /dev/null +++ b/server/AyaNova/resource/rpt/stock-report-templates/Quote Item Summary.ayrt @@ -0,0 +1 @@ +{"Name":"Quote Item Summary","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":false,"Template":"\n\n\n
\n
\n

{{ayT 'Quote'}} {{ayT 'WorkOrderItem'}} {{ayT 'WorkOrderItemSummary'}}

\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 \n \n \n \n \n \n \n \n \n \n {{/each}}\n {{/each}}\n \n \n \n
{{ayT 'Quote'}} & {{ayT 'WorkOrderItem'}} {{ayT 'Sequence'}}{{ayT 'Quote'}} {{ayT 'Status'}}{{ayT 'Customer'}}{{ayT 'Quote'}} {{ayT 'QuoteQuoteRequestDate'}}{{ayT 'WorkOrderItemRequestDate'}}{{ayT 'WorkOrderItemWorkOrderStatusID'}}{{ayT 'Priority'}}{{ayT 'WorkOrderItemSummary'}}
{{QuoteId}} - {{Sequence}}{{../LastStateNameViz}}{{../CustomerViz}}{{ayDate ../Requested}}{{ayDate RequestDate}}{{WorkOrderItemStatusNameViz}}{{WorkOrderItemPriorityNameViz}}{{Notes}}
 
\n\n
\n\n\n","Style":"\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: 5px;\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\", \"WorkOrderItemWorkOrderStatusID\", \"WorkOrderItemSummary\", \"Priority\", \"WorkOrderItemRequestDate\"]);\n\n\n\n return reportData;\n}","JsHelpers":"//Register custom Handlebars helpers here to use in your report script\n//https://handlebarsjs.com/guide/#custom-helpers\nHandlebars.registerHelper('loud', function (aString) {\n return aString.toUpperCase()\n})","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/Quote Item Tasks.ayrt b/server/AyaNova/resource/rpt/stock-report-templates/Quote Item Tasks.ayrt index 256b0536..f1568431 100644 --- a/server/AyaNova/resource/rpt/stock-report-templates/Quote Item Tasks.ayrt +++ b/server/AyaNova/resource/rpt/stock-report-templates/Quote Item Tasks.ayrt @@ -1 +1 @@ -{"Name":"Quote Item Tasks","Active":true,"Notes":"","Roles":50538,"AType":46,"IncludeWoItemDescendants":false,"Template":"\n\n\n
\n
\n

{{ayT 'Quote'}} {{ayT 'WorkOrderItemList'}} {{ayT 'WorkOrderItemTasks'}} List

\n
\n\n \n \n \n \n \n \n \n\n\n\t\t\t\t\t \n\t\t\t\t\t\n \n \n\n \n {{#each ayReportData}}\n {{#each Items}}\n {{#each Tasks}}\n \n \n \n \n\n\t\t\t\t\t\n\t\t\t\t\t{{#if_eq Status 2}}\n\t\t\t\t\t{{else}}{{/if_eq}}\n\t\t\t\t\t\n \n \n {{/each}}\n {{/each}}\n {{/each}}\n \n\n \n \n\n
{{ayT 'Quote'}}{{ayT 'QuoteQuoteRequestDate'}}{{ayT 'WorkOrderItemSummary'}}{{ayT 'WorkOrderItemTaskWorkOrderItemTaskCompletionType'}}{{ayT 'WorkOrderItemTasks'}}
{{../../Serial}}{{ayDateTime ../../Requested}}{{../Notes}}{{StatusViz}} {{StatusViz}} {{Task}}
\n\n\n
\n\n\n","Style":"body {\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: 20px;\r\n font-size: 10pt; \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: 8pt;\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 font-size: 16pt;\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":" \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\nasync function ayPrepareData(ayData) { \n\n await ayGetTranslations([ \"WorkOrderItemTasks\", \"Quote\", \"WorkOrderItemList\", \"QuoteQuoteRequestDate\", \"WorkOrderItemSummary\", \"WorkOrderItemTaskWorkOrderItemTask\", \"WorkOrderItemTaskWorkOrderItemTaskCompletionType\" ]);\n\n\n \n return ayData;\n}","JsHelpers":"//Register custom Handlebars helpers here to use in your report script\r\n//https://handlebarsjs.com/guide/#custom-helpers\r\n\r\n//custom helper so can do a direct comparison - i.e. if value equals xxxx, then show, else show yyyyy\r\n//note that this HAS to be added here in Helpers, is NOT built in\r\nHandlebars.registerHelper('if_eq', function(a, b, opts) {\r\n if(a == b) // Or === depending on your needs\r\n return opts.fn(this);\r\n else\r\n return opts.inverse(this);\r\n});","RenderType":0,"HeaderTemplate":"  ","FooterTemplate":"                Printed date: PDFDate\nPage of                ","DisplayHeaderFooter":true,"PaperFormat":0,"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 Item Tasks","Active":true,"Notes":"","Roles":50538,"AType":46,"IncludeWoItemDescendants":false,"Template":"\n\n\n
\n
\n

{{ayT 'Quote'}} {{ayT 'WorkOrderItemList'}} {{ayT 'WorkOrderItemTasks'}} List

\n
\n\n \n \n \n \n \n \n \n\n\n\t\t\t\t\t \n\t\t\t\t\t\n \n \n\n \n {{#each ayReportData}}\n {{#each Items}}\n {{#each Tasks}}\n \n \n \n \n\n\t\t\t\t\t\n\t\t\t\t\t{{#if_eq Status 2}}\n\t\t\t\t\t{{else}}{{/if_eq}}\n\t\t\t\t\t\n \n \n {{/each}}\n {{/each}}\n {{/each}}\n \n\n \n \n\n
{{ayT 'Quote'}}{{ayT 'QuoteQuoteRequestDate'}}{{ayT 'WorkOrderItemSummary'}}{{ayT 'WorkOrderItemTaskWorkOrderItemTaskCompletionType'}}{{ayT 'WorkOrderItemTasks'}}
{{../../Serial}}{{ayDateTime ../../Requested}}{{../Notes}}{{StatusViz}} {{StatusViz}} {{Task}}
\n\n\n
\n\n\n","Style":"body {\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: 20px;\r\n font-size: 10pt; \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: 8pt;\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 font-size: 16pt;\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":" \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\nasync function ayPrepareData(ayData) { \n\n await ayGetTranslations([ \"WorkOrderItemTasks\", \"Quote\", \"WorkOrderItemList\", \"QuoteQuoteRequestDate\", \"WorkOrderItemSummary\", \"WorkOrderItemTaskWorkOrderItemTaskCompletionType\" ]);\n\n\n \n return ayData;\n}","JsHelpers":"//Register custom Handlebars helpers here to use in your report script\r\n//https://handlebarsjs.com/guide/#custom-helpers\r\n\r\n//custom helper so can do a direct comparison - i.e. if value equals xxxx, then show, else show yyyyy\r\n//note that this HAS to be added here in Helpers, is NOT built in\r\nHandlebars.registerHelper('if_eq', function(a, b, opts) {\r\n if(a == b) // Or === depending on your needs\r\n return opts.fn(this);\r\n else\r\n return opts.inverse(this);\r\n});","RenderType":0,"HeaderTemplate":"  ","FooterTemplate":"                Printed date: PDFDate\nPage of                ","DisplayHeaderFooter":true,"PaperFormat":0,"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 Parts Net Cost Summary.ayrt b/server/AyaNova/resource/rpt/stock-report-templates/Quote Parts Net Cost Summary.ayrt new file mode 100644 index 00000000..6e451522 --- /dev/null +++ b/server/AyaNova/resource/rpt/stock-report-templates/Quote Parts Net Cost Summary.ayrt @@ -0,0 +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 (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 (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//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\n return reportData; \n}","JsHelpers":"//Register custom Handlebars helpers here to use in your report script\n//https://handlebarsjs.com/guide/#custom-helpers\nHandlebars.registerHelper('loud', function (aString) {\n return aString.toUpperCase()\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 Units grouped by Customer.ayrt b/server/AyaNova/resource/rpt/stock-report-templates/Quote Units grouped by Customer.ayrt index 4acae1c0..4f13f463 100644 --- a/server/AyaNova/resource/rpt/stock-report-templates/Quote Units grouped by Customer.ayrt +++ b/server/AyaNova/resource/rpt/stock-report-templates/Quote Units grouped by Customer.ayrt @@ -1 +1 @@ -{"Name":"Quote Units grouped by Customer","Active":true,"Notes":"","Roles":50538,"AType":77,"IncludeWoItemDescendants":false,"Template":"\n\n\n
\n
\n\t\t\t

{{ayT 'WorkOrderItemUnitList'}} grouped by {{ayT 'Customer'}}

\n\t\t
\n \n \n \n \n \n \n \n \n \n \n \n \n {{#each ayReportData}}\n \n \n \n {{#each items}}\n {{#each Items}}\n {{#each Units}}\n \n \n \n \n \n \n \n \n {{/each}}\n {{/each}}\n {{/each}}\n \n \n \n\n \n \n \n {{/each}}\n \n
{{ayT 'Customer'}}{{ayT 'Quote'}}{{ayT 'QuoteQuoteRequestDate'}}{{ayT 'WorkOrderItemUnit'}}{{ayT 'WorkOrderItemWorkOrderStatusID'}}{{ayT 'WorkOrderItemSummary'}}
{{group}}
 {{../../Serial}} {{ayDate ../../Requested}}{{UnitViz}} - {{UnitModelNameViz}}{{../WorkOrderItemStatusNameViz}}{{../Notes}}
 
 
\n
\n\n \n\n\n","Style":".minimum {\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; /* the # of columns set in the first row of the thead will be fixed and applied throughout table and rows */\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 //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([\"Quote\", \"Customer\", \"QuoteQuoteRequestDate\", \"WorkOrderItemUnit\", \"WorkOrderItemUnitList\", \"WorkOrderItemWorkOrderStatusID\", \"WorkOrderItemSummary\", \"WorkOrderSummary\" ]);\n\n\n\n return reportData;\n}","JsHelpers":"//Register custom Handlebars helpers here to use in your report script\n//https://handlebarsjs.com/guide/#custom-helpers\nHandlebars.registerHelper('loud', function (aString) {\n return aString.toUpperCase()\n})","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":"Quote Units grouped by Customer","Active":true,"Notes":"","Roles":50538,"AType":77,"IncludeWoItemDescendants":false,"Template":"\n\n\n
\n
\n\t\t\t

{{ayT 'Quote'}} {{ayT 'WorkOrderItemUnitList'}} grouped by {{ayT 'Customer'}}

\n\t\t
\n \n \n \n \n \n \n \n \n \n \n \n \n {{#each ayReportData}}\n \n \n \n {{#each items}}\n {{#each Items}}\n {{#each Units}}\n \n \n \n \n \n \n \n \n {{/each}}\n {{/each}}\n {{/each}}\n \n \n \n\n \n \n \n {{/each}}\n \n
{{ayT 'Customer'}}{{ayT 'Quote'}}{{ayT 'QuoteQuoteRequestDate'}}{{ayT 'WorkOrderItemUnit'}}{{ayT 'WorkOrderItemWorkOrderStatusID'}}{{ayT 'WorkOrderItemSummary'}}
{{group}}
 {{../../Serial}} {{ayDate ../../Requested}}{{UnitViz}} - {{UnitModelNameViz}}{{../WorkOrderItemStatusNameViz}}{{../Notes}}
 
 
\n
\n\n \n\n\n","Style":".minimum {\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 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 //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([\"Quote\", \"Customer\", \"QuoteQuoteRequestDate\", \"WorkOrderItemUnit\", \"WorkOrderItemUnitList\", \"WorkOrderItemWorkOrderStatusID\", \"WorkOrderItemSummary\", \"WorkOrderSummary\" ]);\n\n\n\n return reportData;\n}","JsHelpers":"//Register custom Handlebars helpers here to use in your report script\n//https://handlebarsjs.com/guide/#custom-helpers\nHandlebars.registerHelper('loud', function (aString) {\n return aString.toUpperCase()\n})","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/Reminders.ayrt b/server/AyaNova/resource/rpt/stock-report-templates/Reminders.ayrt index 7f8ff9ba..0594ad1f 100644 --- a/server/AyaNova/resource/rpt/stock-report-templates/Reminders.ayrt +++ b/server/AyaNova/resource/rpt/stock-report-templates/Reminders.ayrt @@ -1 +1 @@ -{"Name":"Reminders","Active":true,"Notes":"","Roles":50538,"AType":52,"IncludeWoItemDescendants":false,"Template":"\n\n\n
\n
\n

{{ayT 'ReminderList'}} List

\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 \n {{/each}}\n \n\n \n \n\n
{{ayT 'ReminderName'}}{{ayT 'ReminderStartDate'}}{{ayT 'ReminderStopDate'}}{{ayT 'Tags'}}{{ayT 'ReminderNotes'}}
{{Name}}{{ayDateTime StartDate}}{{ayDateTime StopDate}}{{Tags}}{{Notes}}
\n\n\n
\n\n\n","Style":"body {\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: 20px;\r\n font-size: 10pt; \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: 8pt;\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 font-size: 16pt;\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":" \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\nasync function ayPrepareData(ayData) { \n\n await ayGetTranslations([ \"Reminder\", \"ReminderName\", \"ReminderList\", \"Tags\", \"Reminder\", \"ReminderStartDate\", \"ReminderStopDate\", \"ReminderRecurrence\", \"ReminderNotes\", \"ReminderSourceType\", \"ReminderSourceID\", \"ReminderColor\" ]);\n\n \n return ayData;\n}","JsHelpers":"//Register custom Handlebars helpers here to use in your report script\r\n//https://handlebarsjs.com/guide/#custom-helpers","RenderType":0,"HeaderTemplate":"  ","FooterTemplate":"                Printed date: PDFDate\nPage of                ","DisplayHeaderFooter":true,"PaperFormat":0,"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":"Reminders","Active":true,"Notes":"","Roles":124927,"AType":52,"IncludeWoItemDescendants":false,"Template":"\n\n\n
\n
\n

{{ayT 'ReminderList'}} List

\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 \n {{/each}}\n \n\n \n \n\n
{{ayT 'ReminderName'}}{{ayT 'ReminderStartDate'}}{{ayT 'ReminderStopDate'}}{{ayT 'Tags'}}{{ayT 'ReminderNotes'}}
{{Name}}{{ayDateTime StartDate}}{{ayDateTime StopDate}}{{Tags}}{{Notes}}
\n\n\n
\n\n\n","Style":"body {\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: 20px;\r\n font-size: 10pt; \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: 8pt;\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 font-size: 16pt;\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":" \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\nasync function ayPrepareData(ayData) { \n\n await ayGetTranslations([ \"Reminder\", \"ReminderName\", \"ReminderList\", \"Tags\", \"ReminderStartDate\", \"ReminderStopDate\", \"ReminderRecurrence\", \"ReminderNotes\", \"ReminderSourceType\", \"ReminderSourceID\", \"ReminderColor\" ]);\n\n \n return ayData;\n}","JsHelpers":"//Register custom Handlebars helpers here to use in your report script\r\n//https://handlebarsjs.com/guide/#custom-helpers","RenderType":0,"HeaderTemplate":"  ","FooterTemplate":"                Printed date: PDFDate\nPage of                ","DisplayHeaderFooter":true,"PaperFormat":0,"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/Restock List Grouped By Wholesaler.ayrt b/server/AyaNova/resource/rpt/stock-report-templates/Restock List Grouped By Wholesaler.ayrt new file mode 100644 index 00000000..8c0edd02 --- /dev/null +++ b/server/AyaNova/resource/rpt/stock-report-templates/Restock List Grouped By Wholesaler.ayrt @@ -0,0 +1 @@ +{"Name":"Restock List Grouped By Wholesaler","Active":true,"Notes":"Will only display parts that have ReOrderQty > 0","Roles":49514,"AType":90,"IncludeWoItemDescendants":false,"Template":"\n\n\n\t
\n\t\t
\n\t\t\t

{{ayT 'PurchaseOrderUIRestockList'}} grouped by {{ayT 'PartWholesalerID'}}

\n\t\t
\n\t\t\n\t\t\t\n\t\t\t\t\n\t\t\t\t\t\n\t\t\t\t\t\n\t\t\t\t\t\n\t\t\t\t\t\n\t\t\t\t\n\t\t\t\n\n\t\t\t\n\t\t\t\t{{#each ayReportData}}\n\t\t\t\t\n\t\t\t\t\n\t\t\t\t\t\n\t\t\t\t\t\n\t\t\t\t\n\t\t\t\t{{#each items}}\n\t\t\t\t{{#if ReOrderQty}}\n\t\t\t\t\n\t\t\t\t\t\n\t\t\t\t\t\n\t\t\t\t\t\n\t\t\t\t\t\n\t\t\t\t\n\t\t\t\t{{/if}}\n\t\t\t\t{{/each}}\n\t\t\t\t\n\t\t\t\t\t\n\t\t\t\t\t\n\t\t\t\t\n\t\t\t\t\n\t\t\t\t\t\n\t\t\t\t\n\t\t\t\t\n\t\t\t\t{{/each}}\n\t\t\t\n\t\t
{{ayT 'Part'}}{{ayT 'PartByWarehouseInventoryReorderQuantity'}}{{ayT 'PartWarehouseName'}}
{{ayT 'PartWholesalerID'}}:    {{group}}
 {{PartName}}{{ReOrderQty}}{{PartWarehouseName}}
{{ayT 'PartByWarehouseInventoryReorderQuantity'}} for all parts from {{ayT 'PartWholesalerID'}} {{group}}: {{ThisGroupTotalQty}}
 
\n\t
\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: 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 /* border-bottom: solid 1pt #9e9e9e; */\r\n height: 30px;\r\n font-size: 11pt; \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: 9pt;\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 font-size: 16pt;\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(ayData) {\n\n //send the raw report data to the groupByKey function which will return a new array grouped by the key name provided\n ayData.ayReportData = ayGroupByKey(ayData.ayReportData, 'WholesalerName')\n\n await ayGetTranslations([\"PurchaseOrderUIRestockList\", \"PartWholesalerID\", \"PartByWarehouseInventoryReorderQuantity\", \"PartWarehouseName\", \"Part\" ]);\n\n //Iterate through all the records in the reportData obtaining a running total of ReOrderQty for each group\n for (EachGroup of ayData.ayReportData) \n { \n let ThisGroupTotalQty = 0; //Declare a temporary variable to hold the running Qty total for THIS group\n for (Item of EachGroup.items) //Iterate through all the poitems of THIS po adding the Qty amount of each item to the ThisPOTotalQty variable\n {\n //make sure it has a value before attempting to add it to the running total\n if (Item.ReOrderQty != null) \n {\n ThisGroupTotalQty += Item.ReOrderQty;\n }\n Item.QuantityRunning=ThisGroupTotalQty;\n }\n EachGroup.ThisGroupTotalQty=ThisGroupTotalQty;\n\n\n }\n\n //return the data into the pipeline to send to the report template\n return ayData;\n}","JsHelpers":"","RenderType":0,"HeaderTemplate":"  ","FooterTemplate":"                Printed date: PDFDate\nPage of                ","DisplayHeaderFooter":true,"PaperFormat":10,"Landscape":false,"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/Retail & Cost Value of Inventory.ayrt b/server/AyaNova/resource/rpt/stock-report-templates/Retail & Cost Value of Inventory.ayrt new file mode 100644 index 00000000..da4c748b --- /dev/null +++ b/server/AyaNova/resource/rpt/stock-report-templates/Retail & Cost Value of Inventory.ayrt @@ -0,0 +1 @@ +{"Name":"Retail & Cost Value of Inventory","Active":true,"Notes":"","Roles":49514,"AType":90,"IncludeWoItemDescendants":false,"Template":"\n\n\n\t
\n\t\t
\n\t\t\t

Retail & Cost Value of Inventory

\n\t\t
\n\t\t\n\t\t\t\n\t\t\t\t\n\t\t\t\t\t\n\t\t\t\t\t\n\t\t\t\t\t\n\t\t\t\t\t\n\t\t\t\t\t\n\t\t\t\t\t\n\t\t\t\t\t\t\t\t\t\t\n\t\t\t\t\n\t\t\t\n\n\t\t\t\n\t\t\t\t{{#each ayReportData}}\n\t\t\t\t\n\t\t\t\t\n\t\t\t\t\t\n\t\t\t\t\t\n\t\t\t\t\t\n\t\t\t\t\t\n\t\t\t\t\t\n\t\t\t\t\t\n\t\t\t\t\t\n\t\t\t\t\n\t\t\t\t{{/each}}\n\t\t\t\n\t\t\t\n\t\t\t\t\n\t\t\t\t\t\n\t\t\t\t\t\n\t\t\t\t\t\n\t\t\t\t\t\n\t\t\t\t\n\t\t\t\n\t\t
{{ayT 'Part'}}{{ayT 'PartWarehouseName'}}{{ayT 'PartByWarehouseInventoryQuantityOnHand'}}{{ayT 'PartRetail'}} Per{{ayT 'PartRetail'}} Value{{ayT 'PartCost'}} Per{{ayT 'PartCost'}} Value
{{PartName}} {{PartDescription}}{{PartWarehouseName}}{{OnHandQty}}{{ayCurrency PartRetail}}{{ayCurrency ThisPartsRetailValue}}{{ayCurrency PartCost}}{{ayCurrency ThisPartsCostValue}}
Total Retail Value for all Parts in this report{{ayCurrency AllPartsRetailValue}}Total Cost Value for all Parts in this report{{ayCurrency AllPartsCostValue}}
\n\t
\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: 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 /* border-bottom: solid 1pt #9e9e9e; */\r\n height: 30px;\r\n font-size: 11pt; \r\n color: #9e9e9e;\r\n}\r\n\r\ntfoot tr{\r\n border-top: solid 1pt #9e9e9e;\r\n height: 50px;\r\n font-size: 10pt; \r\n}\r\n\r\ntbody td {\r\n padding: 10px;\r\n word-wrap: break-word;\r\n font-size: 9pt;\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 font-size: 16pt;\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(ayData) {\n\n\n await ayGetTranslations([\"PartCost\", \"PartRetail\", \"PartByWarehouseInventoryQuantityOnHand\", \"PartWarehouseName\", \"Part\" ]);\n\n\n ayData.AllPartsRetailValue = 0;\n ayData.AllPartsCostValue = 0;\n\n for (EachPart of ayData.ayReportData) {\n\n EachPart.ThisPartsRetailValue = 0;\n EachPart.ThisPartsCostValue = 0;\n if (EachPart.PartCost != null) {\n EachPart.ThisPartsCostValue = EachPart.PartCost * EachPart.OnHandQty;\n ayData.AllPartsCostValue += EachPart.ThisPartsCostValue;\n }\n if (EachPart.PartRetail != null) {\n EachPart.ThisPartsRetailValue = EachPart.PartRetail * EachPart.OnHandQty;\n ayData.AllPartsRetailValue += EachPart.ThisPartsRetailValue;\n }\n\n\n }\n\n\n //return the data into the pipeline to send to the report template\n return ayData;\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/Reviews grouped by user.ayrt b/server/AyaNova/resource/rpt/stock-report-templates/Reviews grouped by user.ayrt index f84d5296..301ecba3 100644 --- a/server/AyaNova/resource/rpt/stock-report-templates/Reviews grouped by user.ayrt +++ b/server/AyaNova/resource/rpt/stock-report-templates/Reviews grouped by user.ayrt @@ -1 +1 @@ -{"Name":"Reviews grouped by user","Active":true,"Notes":"","Roles":50538,"AType":61,"IncludeWoItemDescendants":false,"Template":"\n\n\n
\n \n {{#each ayReportData}}\n \n \n\n \n \n \n \n \n \n \n\n {{#each items}}\n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n {{/each}}\n\n \n\n \n \n {{/each}}\n
{{count}} {{ayT 'ReviewList'}} {{ayT 'ReviewUserId'}} {{group}}
 
 {{ayT 'ReviewDate'}}:{{ReviewDate}}{{ayT 'ReviewAssignedByUserId'}}:{{AssignedByUserViz}}
 {{ayT 'ReviewName'}}:{{Name}}
 {{ayT 'ReviewNotes'}}:{{Notes}}
 {{ayT 'ReviewCompletedDate'}}:{{ayDateTime CompletedDate}}
 {{ayT 'ReviewCompletionNotes'}}:{{CompletionNotes}}
 {{ayT 'Tags'}}:{{Tags}}
 Wiki:{{ayWiki Wiki}}
 
 
\n\n \n\n\n
\n\n\n","Style":"body {\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: 20px;\r\n font-size: 10pt; \r\n color: #9e9e9e;\r\n text-align: right;\r\n\r\n}\r\n\r\ntbody td {\r\n padding: 10px;\r\n word-wrap: break-word;\r\n font-size: 8pt;\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 font-size: 16pt;\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":" \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\nasync function ayPrepareData(ayData) { \n\n await ayGetTranslations([ \"ReviewList\", \"User\", \"ReviewUserId\", \"ReviewName\",\"ReviewDate\", \"ReviewNotes\", \"Tags\", \"ReviewAssignedByUserId\", \"ReviewCompletedDate\", \"ReviewCompletionNotes\" ]);\n\n ayData.ayReportData = ayGroupByKey(ayData.ayReportData, 'UserViz')\n \n return ayData;\n}","JsHelpers":"//Register custom Handlebars helpers here to use in your report script\r\n//https://handlebarsjs.com/guide/#custom-helpers","RenderType":0,"HeaderTemplate":"  ","FooterTemplate":"                Printed date: PDFDate\nPage of                ","DisplayHeaderFooter":true,"PaperFormat":0,"Landscape":false,"MarginOptionsBottom":"15mm","MarginOptionsLeft":"20mm","MarginOptionsRight":"20mm","MarginOptionsTop":"10mm","PageRanges":null,"PreferCSSPageSize":false,"PrintBackground":true,"Scale":1.00000} \ No newline at end of file +{"Name":"Reviews grouped by user","Active":true,"Notes":"Uses custom Prepare ayGroupByKey to group by the UserViz","Roles":124927,"AType":61,"IncludeWoItemDescendants":false,"Template":"\n\n\n
\n \n {{#each ayReportData}}\n \n \n\n \n \n \n \n \n \n \n\n {{#each items}}\n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n {{/each}}\n\n \n\n \n \n {{/each}}\n
{{count}} {{ayT 'ReviewList'}} {{ayT 'ReviewUserId'}} {{group}}
 
 {{ayT 'ReviewDate'}}:{{ReviewDate}}{{ayT 'ReviewAssignedByUserId'}}:{{AssignedByUserViz}}
 {{ayT 'ReviewName'}}:{{Name}}
 {{ayT 'ReviewNotes'}}:{{Notes}}
 {{ayT 'ReviewCompletedDate'}}:{{ayDateTime CompletedDate}}
 {{ayT 'ReviewCompletionNotes'}}:{{CompletionNotes}}
 {{ayT 'Tags'}}:{{Tags}}
 Wiki:{{ayWiki Wiki}}
 
 
\n\n \n\n\n
\n\n\n","Style":"body {\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: 20px;\r\n font-size: 10pt; \r\n color: #9e9e9e;\r\n text-align: right;\r\n\r\n}\r\n\r\ntbody td {\r\n padding: 10px;\r\n word-wrap: break-word;\r\n font-size: 8pt;\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 font-size: 16pt;\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":" \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\nasync function ayPrepareData(ayData) { \n\n await ayGetTranslations([ \"ReviewList\", \"User\", \"ReviewUserId\", \"ReviewName\",\"ReviewDate\", \"ReviewNotes\", \"Tags\", \"ReviewAssignedByUserId\", \"ReviewCompletedDate\", \"ReviewCompletionNotes\" ]);\n\n ayData.ayReportData = ayGroupByKey(ayData.ayReportData, 'UserViz')\n \n return ayData;\n}","JsHelpers":"//Register custom Handlebars helpers here to use in your report script\r\n//https://handlebarsjs.com/guide/#custom-helpers","RenderType":0,"HeaderTemplate":"  ","FooterTemplate":"                Printed date: PDFDate\nPage of                ","DisplayHeaderFooter":true,"PaperFormat":0,"Landscape":false,"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/Service Dispatch.ayrt b/server/AyaNova/resource/rpt/stock-report-templates/Service Dispatch.ayrt new file mode 100644 index 00000000..4ef123d7 --- /dev/null +++ b/server/AyaNova/resource/rpt/stock-report-templates/Service Dispatch.ayrt @@ -0,0 +1 @@ +{"Name":"Service Dispatch","Active":true,"Notes":"#if_eq custom Helper - if status is Completed show checkmark in checkbox; custom Prepare to replace carriage returns with spaces; display digital signatures if present","Roles":124927,"AType":34,"IncludeWoItemDescendants":false,"Template":"\n\n\n\t
\n\t\t{{#each ayReportData}}\n\t\t\n\t\t\n\t\t\t\n\t\t\t\t\n\t\t\t\t\t\n\t\t\t\t\t\n\t\t\t\t\t\t\t\t\t\t\n\t\t\t\t\n\t\t\t\t\n\t\t\t\t\t\n\t\t\t\t\t\n\t\t\t\t\t\n \t\t\t\n\t\t\t\t\n\t\t\t\t\n\t\t\t\t\t\n\t\t\t\t\t{{#if CustomerContactName}}\n\t\t\t\t\t{{else}}{{/if}}\n\t\t\t\t\t\n \t\t\t\n\t\t\t\t\n\t\t\t\t\n\t\t\t\t\t\n\t\t\t\t\n\t\t\t\t\n\t\t\t\t\t\n\t\t\t\t\n\t\t\t\n\n\t\t\t\t\t\t\t\n\t\t\t\t\n\t\t\t\t\t\n\t\t\t\t\t\n\t\t\t\t\t\n\t\t\t\t\n\t\t\t\t\n\t\t\t\t\t\n\t\t\t\t\t\n\t\t\t\t\t\t\t\t\n\t\t\t\t\n\t\t\t\t\t\n\t\t\t\t\t\n\t\t\t\t\n\t\t\t\t\n\t\t\t\t\n\t\t\t\t{{#each Items}}\n\t\t\t\t\n\t\t\t\t\t\n\t\t\t\t\t\n\t\t\t\t\t\n\t\t\t\t\t\n\t\t\t\t\t\n\t\t\t\t\t\n\t\t\t\t\t\n\t\t\t\t\n\t\t\t\t\n\t\t\t\t\t\n\t\t\t\t\t\n\t\t\t\t\t\n\t\t\t\t\t\n\t\t\t\t\n\t\t\t\t\n\t\t\t\t\t\n\t\t\t\t\t\n\t\t\t\t\t\n\t\t\t\t\t\n\t\t\t\t\n\n\t\t\t\t{{#each Units}}\n\t\t\t\t\n\t\t\t\t\t\n\t\t\t\t\t\n\t\t\t\t\t\n\t\t\t\t\n\t\t\t\t{{/each}}\n\t\t\t\t\n\n\t\t\t\t\n\t\t\t\t\t\n\t\t\t\t\n\t\t\t\t{{#each ScheduledUsers}}\n\t\t\t\t\n\t\t\t\t\t\n\t\t\t\t\t\n\t\t\t\t\t\n\t\t\t\t\t\n\t\t\t\t\t\n\t\t\t\t\n\t\t\t\t\n\t\t\t\t\t\n\t\t\t\t\t\n\t\t\t\t\t\n\t\t\t\t\t\n\t\t\t\t\t\n\t\t\t\t\n\t\t\t\t\n\t\t\t\t\t\n\t\t\t\t\t\n\t\t\t\t\t\n\t\t\t\t\t\n\t\t\t\t\t\n\t\t\t\t\n\t\t\t\t\n\t\t\t\t\t\n\t\t\t\t\t\n\t\t\t\t\t\n\t\t\t\t\t\n\t\t\t\t\t\n\t\t\t\t\n\t\t\t\t\n\t\t\t\t\t\n\t\t\t\t\t\n\t\t\t\t\t\n\t\t\t\t\t\n\t\t\t\t\t\n\t\t\t\t\n\t\t\t\t\n\t\t\t\t\t\n\t\t\t\t\n\t\t\t\t{{/each}}\n\n\t\t\t\t{{#if Tasks}}\n\t\t\t\t\n\t\t\t\t\t\n\t\t\t\t\t\n\t\t\t\t\t\n\t\t\t\t\n\t\t\t\t{{/if}}\n\t\t\t\t{{#each Tasks}}\n\t\t\t\t\n\t\t\t\t\t\n\t\t\t\t\t\n\t\t\t\t\t\n\t\t\t\t\t{{#if_eq Status 2}}\n\t\t\t\t\t{{else}}{{/if_eq}}\n\t\t\t\t\t\n\t\t\t\t\n\t\t\t\t{{/each}}\n\t\t\t\t{{#if Tasks}}\t\t\t\t\n\t\t\t\t\n\t\t\t\t\t\n\t\t\t\t\n\t\t\t\t{{/if}}\n\n\t\t\t\t{{#if Parts}}\n\t\t\t\t\n\t\t\t\t\t\n\t\t\t\t\t\n\t\t\t\t\t\n\t\t\t\t\t\n\t\t\t\t\t\n\t\t\t\t\n\t\t\t\t{{/if}}\n\t\t\t\t{{#each Parts}}\n\t\t\t\t\n\t\t\t\t\t\n\t\t\t\t\t\n\t\t\t\t\t\n\t\t\t\t\t\n\t\t\t\t\t{{#if Serials}} \n\t\t\t\t\t{{else}} {{/if}}\n\t\t\t\t\t\n\t\t\t\t\n\t\t\t\t{{/each}}\n\t\t\t\t{{#if Parts}}\t\n\t\t\t\t\n\t\t\t\t\t\n\t\t\t\t\n\t\t\t\t{{/if}}\n\n\t\t\t\t\n\t\t\t\t\t\n\t\t\t\t\t\n\t\t\t\t\t\n\t\t\t\t\n\t\t\t\t\n\t\t\t\t\t\n\t\t\t\t\n\t\t\t\t\n\t\t\t\t\t\n\t\t\t\t\n\t\t\t\t\n\t\t\t\t\t\n\t\t\t\t\n\t\t\t\t\n\t\t\t\t\t\n\t\t\t\t\n\t\t\t\t{{/each}}\n\t\t\t\t\n\n\t\t\t\t\n\t\t\t\t\t\n\t\t\t\t\n\t\t\t\t\n\t\t\t\t\t\n\t\t\t\t\t{{#if TechSignature}} \n\t\t\t\t\t{{else}}{{/if}}\n\t\t\t\t\t\n\t\t\t\t\t\n\t\t\t\t\t{{#if CustomerSignature}} \n\t\t\t\t\t{{else}}{{/if}}\n\t\t\t\t\t\t\t\t\n\t\t\t\t\n\t\t\t\t\t\n\t\t\t\t\n\t\t\t\t\n\t\t\t\t\t\n\t\t\t\t\t{{#if TechSignatureCaptured}} \n\t\t\t\t\t{{else}}{{/if}}\n\t\t\t\t\t\n\t\t\t\t\t\n\t\t\t\t\t{{#if CustomerSignatureCaptured}} \n\t\t\t\t\t{{else}}{{/if}}\n\t\t\t\t\n\t\t\t\n\t\t
{{ayT 'Customer'}}{{CustomerViz}}{{../ayServerMetaData.CompanyName}}
{{ayT 'AddressTypePhysical'}}{{Address}}, {{City}}{{ayT 'WorkOrderServiceNumber'}}{{Serial}}
{{ayT 'WorkOrderCustomerContactName'}}{{CustomerContactName}} {{CustomerPhone1Viz}} {{CustomerEmailAddressViz}}{{CustomerPhone1Viz}} {{CustomerEmailAddressViz}}{{ayT 'WorkOrderServiceDate'}}{{myDate ServiceDate}}
 
 
{{ayT 'WorkOrderSummary'}}{{Notes}}
{{ayT 'WorkOrderCloseByDate'}}{{ayDateTime CompleteByDate}}
{{ayT 'CustomerTechNotes'}}{{CustomerTechNotesViz}}
{{ayT 'WorkOrderItemPriorityID'}}{{WorkOrderItemPriorityNameViz}}{{ayT 'WorkOrderItemRequestDate'}}{{ayDateTime RequestDate}}{{ayT 'WorkOrderItemWorkOrderStatusID'}}{{WorkOrderItemStatusNameViz}}
{{ayT 'WorkOrderItemSummary'}} #{{Sequence}}{{Notes}}
{{ayT 'WorkOrderItemTechNotes'}}{{TechNotes}}
{{ayT 'Unit'}}{{UnitViz}} {{UnitModelNameViz}}
 
{{ayT 'NotifyEventScheduledOnWorkorder'}}{{UserViz}}As expected?Actual
 {{ayT 'WorkOrderItemScheduledUserStartDate'}}{{ayDateTime StartDate}}
 {{ayT 'WorkOrderItemScheduledUserStopDate'}}{{ayDateTime StopDate}}
 {{ayT 'WorkOrderItemScheduledUserServiceRateID'}}{{ServiceRateViz}}
 {{ayT 'WorkOrderItemScheduledUserEstimatedQuantity'}}{{EstimatedQuantity}}
 
{{ayT 'WorkOrderItemTaskWorkOrderItemTaskCompletionType'}}{{ayT 'WorkOrderItemTasks'}}
{{StatusViz}}{{Task}}
 
{{ayT 'WorkOrderItemPartQuantity'}}{{ayT 'WorkOrderItemPartPartWarehouseID'}}{{ayT 'Part'}}{{ayT 'WorkOrderItemPartUsed'}}
{{Quantity}}{{PartWarehouseViz}}{{PartNameViz}} {{PartDescriptionViz}}   {{ayT 'WorkOrderItemPartPartSerialID'}}: {{Serials}} {{PartNameViz}} {{PartDescriptionViz}}
 
{{ayT 'WorkOrderItemLaborServiceDetails'}}
 
 
 
 
 
{{ayT 'TechSignature'}}
 {{ayT 'CustomerSignature'}}
 
Date {{ayDateTime TechSignatureCaptured}}
 Date {{ayDateTime CustomerSignatureCaptured}}
\n\t\t{{/each}}\n\t
\n\n","Style":"/* if not using a rule set or specific property it is recommended to comment out or delete fully for report performance*/\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\n\ntable { \n table-layout: fixed; \n font-family: 'Helvetica Neue', 'Helvetica', Helvetica, Arial, sans-serif;\n border-collapse: collapse;\n white-space: pre-wrap;\n font-size: 8pt;\n width: 100%;\n }\n\n\nth {\n height: 30px;\n text-align: left;\n color: #9e9e9e;\n}\n\n\ntbody tr {\n height: 10px;\n word-wrap: break-word;\n}\n\ntbody tr:nth-child(even) {\n background-color: #f8f8f8; /* MUST checkmark Print background in PDF Options for this to show */\n}\n\n\n.fontgreen {\n color: green;\n}\n.fontblue {\n color: blue;\n}\n.fontred {\n color:red;\n}\n\n\n.rightlean {\n text-align: right;\n}\n.leftlean {\n text-align: left;\n}\n.centerlean {\n text-align: center;\n}","JsPrerender":"async function ayPrepareData(reportData){ \n //this function (if present) is called with the report data \n //before the report is rendered\n //modify data as required here and return it to change the data before the report renders\n //see the help documentation for details\n\n await ayGetTranslations([ \"WorkOrderCloseByDate\", \"WorkOrderServiceDate\", \"WorkOrderServiceNumber\", \"Customer\", \"WorkOrderSummary\", \"Unit\", \"WorkOrderItemSummary\", \"WorkOrderItemPartQuantity\", \"AddressTypePhysical\", \"WorkOrderCustomerContactName\", \"CustomerTechNotes\", \"WorkOrderItemTechNotes\", \"Part\", \"WorkOrderItemPartUsed\", \"WorkOrderItemPartPartWarehouseID\", \"WorkOrderItemPartPartSerialID\", \"WorkOrderItemLaborServiceDetails\", \"WorkOrderItemScheduledUser\", \"NotifyEventScheduledOnWorkorder\", \"WorkOrderItemScheduledUserEstimatedQuantity\", \"WorkOrderItemScheduledUserStartDate\", \"WorkOrderItemScheduledUserStopDate\", \"WorkOrderItemScheduledUserServiceRateID\", \"WorkOrderItemTasks\", \"WorkOrderItemTaskWorkOrderItemTaskCompletionType\", \"CustomerSignature\", \"TechSignature\", \"WorkOrderItemPriorityID\", \"WorkOrderItemWorkOrderStatusID\", \"WorkOrderItemRequestDate\" ]);\n\n //below checks if any parts have Serials to remove carriage returns so parts serials display on same line\n for (EachWO of reportData.ayReportData) {\n for (Item of EachWO.Items) {\n for (Part of Item.Parts) {\n if (Part.Serials != null) {\n s = Part.Serials; \n Part.Serials = s.replace(/[\\n\\r]+/g, ' ');\n }\n }\n }\n }\n\n return reportData; \n}","JsHelpers":"//Register custom Handlebars helpers here to use in your report script\n//https://handlebarsjs.com/guide/#custom-helpers\nHandlebars.registerHelper('loud', function (aString) {\n return aString.toUpperCase()\n})\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//\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 && !isNaN(parsedDate))) {\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});","RenderType":0,"HeaderTemplate":"  ","FooterTemplate":"                Printed date: PDFDate\nPage of                ","DisplayHeaderFooter":true,"PaperFormat":10,"Landscape":false,"MarginOptionsBottom":"15mm","MarginOptionsLeft":"20mm","MarginOptionsRight":"15mm","MarginOptionsTop":"10mm","PageRanges":null,"PreferCSSPageSize":false,"PrintBackground":true,"Scale":1.00000} \ No newline at end of file diff --git a/server/AyaNova/resource/rpt/stock-report-templates/Service Rates list.ayrt b/server/AyaNova/resource/rpt/stock-report-templates/Service Rates list.ayrt index 6ef12f5b..b2a1e78e 100644 --- a/server/AyaNova/resource/rpt/stock-report-templates/Service Rates list.ayrt +++ b/server/AyaNova/resource/rpt/stock-report-templates/Service Rates list.ayrt @@ -1 +1 @@ -{"Name":"Service Rates list","Active":true,"Notes":"","Roles":50554,"AType":62,"IncludeWoItemDescendants":false,"Template":"\n\n\n
\n
\n

{{ayT 'ServiceRateList'}} list

\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 \n \n\t\t {{#if ContractOnly }}{{else}}{{/if}}\n\t\t \n\n \n {{/each}}\n \n\n \n \n\n
{{ayT 'ServiceRate'}}{{ayT 'Tags'}}{{ayT 'RateAccountNumber'}}{{ayT 'Cost'}}{{ayT 'RateCharge'}}{{ayT 'RateUnitChargeDescriptionID'}}{{ayT 'ContractRate'}}
{{Name}}{{Tags}}{{AccountNumber}}{{ayCurrency Cost}}{{ayCurrency Charge}}{{Unit}}
\n\n\n
\n\n\n","Style":"body {\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 border-bottom: solid 1pt #9e9e9e;\r\n height: 50px;\r\n font-size: 11pt; \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: 9pt;\r\n text-align: center;\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 font-size: 16pt;\r\n}\r\n.fontblue {\r\n color: blue;\r\n}\r\n.fontred {\r\n color:red;\r\n}","JsPrerender":"async function ayPrepareData(ayData){ \n\n await ayGetTranslations([\"ServiceRateList\", \"ServiceRate\", \"Tags\", \"RateAccountNumber\", \"Cost\", \"RateCharge\", \"RateUnitChargeDescriptionID\", \"ContractRate\" ]);\n\n return ayData;\n}","JsHelpers":"","RenderType":0,"HeaderTemplate":"  ","FooterTemplate":"                Printed date: PDFDate\nPage of                ","DisplayHeaderFooter":true,"PaperFormat":10,"Landscape":false,"MarginOptionsBottom":"15mm","MarginOptionsLeft":"20mm","MarginOptionsRight":"20mm","MarginOptionsTop":"10mm","PageRanges":null,"PreferCSSPageSize":false,"PrintBackground":true,"Scale":1.00000} \ No newline at end of file +{"Name":"Service Rates list","Active":true,"Notes":"","Roles":50554,"AType":62,"IncludeWoItemDescendants":false,"Template":"\n\n\n
\n
\n

{{ayT 'ServiceRateList'}} list

\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 \n \n\t\t {{#if ContractOnly }}{{else}}{{/if}}\n \n {{/each}}\n \n\n \n \n\n
{{ayT 'ServiceRate'}}{{ayT 'Tags'}}{{ayT 'RateAccountNumber'}}{{ayT 'Cost'}}{{ayT 'RateCharge'}}{{ayT 'RateUnitChargeDescriptionID'}}{{ayT 'ContractRate'}}
{{Name}}{{Tags}}{{AccountNumber}}{{ayCurrency Cost}}{{ayCurrency Charge}}{{Unit}}
\n\n\n
\n\n\n","Style":"body {\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 border-bottom: solid 1pt #9e9e9e;\r\n height: 50px;\r\n font-size: 11pt; \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: 9pt;\r\n text-align: center;\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 font-size: 16pt;\r\n}\r\n.fontblue {\r\n color: blue;\r\n}\r\n.fontred {\r\n color:red;\r\n}","JsPrerender":"async function ayPrepareData(ayData){ \n\n await ayGetTranslations([\"ServiceRateList\", \"ServiceRate\", \"Tags\", \"RateAccountNumber\", \"Cost\", \"RateCharge\", \"RateUnitChargeDescriptionID\", \"ContractRate\" ]);\n\n return ayData;\n}","JsHelpers":"","RenderType":0,"HeaderTemplate":"  ","FooterTemplate":"                Printed date: PDFDate\nPage of                ","DisplayHeaderFooter":true,"PaperFormat":10,"Landscape":false,"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/Task Groups and their tasks.ayrt b/server/AyaNova/resource/rpt/stock-report-templates/Task Groups and their tasks.ayrt new file mode 100644 index 00000000..eb273d9c --- /dev/null +++ b/server/AyaNova/resource/rpt/stock-report-templates/Task Groups and their tasks.ayrt @@ -0,0 +1 @@ +{"Name":"Task Groups and their tasks","Active":true,"Notes":"","Roles":124927,"AType":72,"IncludeWoItemDescendants":false,"Template":"\n\n\n
\n
\n

{{ayT 'TaskGroupList'}}

\n
\n \n \n \n \n {{#each ayReportData}}\n \n \n \n \n \n \n \n \n \n \n \n \n \n {{#each Items}}\n \n \n \n \n \n {{/each}}\n \n \n \n\n {{/each}}\n \n \n \n
{{ayT 'TaskGroup'}}{{Name}}
{{ayT 'TaskGroupNotes'}}{{Notes}}
 {{ayT 'Sequence'}}{{ayT 'TaskList'}} of this {{ayT 'TaskGroup'}}
 {{Sequence}}{{Task}}
 
\n\n
\n\n\n","Style":"\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\r\n height: 30px;\r\n font-size: 11pt; \r\n color: #9e9e9e;\r\n}\r\n\r\ntbody td {\r\n padding: 5px;\r\n word-wrap: break-word;\r\n font-size: 9pt;\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(ayData){ \n\n \tawait ayGetTranslations([\"TaskGroupList\", \"TaskGroup\", \"Task\", \"TaskGroupNotes\", \"TaskList\", \"Sequence\"]);\n\n\n return ayData;\n}","JsHelpers":"","RenderType":0,"HeaderTemplate":"  ","FooterTemplate":"                Printed date: PDFDate\nPage of                ","DisplayHeaderFooter":true,"PaperFormat":10,"Landscape":false,"MarginOptionsBottom":"15mm","MarginOptionsLeft":"15mm","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/Tax Codes List.ayrt b/server/AyaNova/resource/rpt/stock-report-templates/Tax Codes List.ayrt index de836789..2d4beb45 100644 --- a/server/AyaNova/resource/rpt/stock-report-templates/Tax Codes List.ayrt +++ b/server/AyaNova/resource/rpt/stock-report-templates/Tax Codes List.ayrt @@ -1 +1 @@ -{"Name":"Tax Codes List","Active":true,"Notes":"","Roles":124927,"AType":64,"IncludeWoItemDescendants":false,"Template":"\n\n\n
\n
\n

{{ayT 'TaxCodeList'}} List

\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\t\t {{#if TaxOnTax }}{{else}}{{/if}}\n\t\t \n \n \n {{/each}}\n \n\n \n \n\n
{{ayT 'TaxCodeName'}}{{ayT 'Tags'}}{{ayT 'TaxCodeTaxA'}}{{ayT 'TaxCodeTaxB'}}{{ayT 'TaxCodeTaxOnTax'}}{{ayT 'TaxCodeNotes'}}
{{Name}}{{Tags}}{{TaxAPct}} %{{TaxBPct}} %{{Notes}}
\n\n\n
\n\n\n","Style":"body {\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; /* the # of columns set in the first row of the thead will be fixed and applied throughout table and rows */\r\n }\r\n\r\nth {\r\n border-bottom: solid 1pt #9e9e9e;\r\n height: 50px;\r\n font-size: 11pt; \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: 9pt;\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 font-size: 16pt;\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":" \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\nasync function ayPrepareData(ayData) { \n\n await ayGetTranslations([ \"TaxCodeList\", \"TaxCodeName\", \"Tags\", \"TaxCodeTaxA\", \"TaxCodeTaxB\", \"TaxCodeTaxOnTax\", \"TaxCodeNotes\" ]);\n \n return ayData;\n}","JsHelpers":"//Register custom Handlebars helpers here to use in your report script\r\n//https://handlebarsjs.com/guide/#custom-helpers","RenderType":0,"HeaderTemplate":"  ","FooterTemplate":"                Printed date: PDFDate\nPage of                ","DisplayHeaderFooter":true,"PaperFormat":10,"Landscape":false,"MarginOptionsBottom":"15mm","MarginOptionsLeft":"20mm","MarginOptionsRight":"20mm","MarginOptionsTop":"10mm","PageRanges":null,"PreferCSSPageSize":false,"PrintBackground":true,"Scale":1.00000} \ No newline at end of file +{"Name":"Tax Codes List","Active":true,"Notes":"","Roles":124927,"AType":64,"IncludeWoItemDescendants":false,"Template":"\n\n\n
\n
\n

Tax Codes List

\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 \n \n\t\t {{#if TaxOnTax }}{{else}}{{/if}}\n\t\t \n \n \n {{/each}}\n \n\n \n \n\n
{{ayT 'TaxCodeName'}}{{ayT 'Tags'}}{{ayT 'TaxCodeTaxA'}}{{ayT 'TaxCodeTaxB'}}{{ayT 'TaxCodeTaxOnTax'}}{{ayT 'TaxCodeNotes'}}
{{Name}}{{Tags}}{{TaxAPct}} %{{TaxBPct}} %{{Notes}}
\n\n\n
\n\n\n","Style":"body {\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 border-bottom: solid 1pt #9e9e9e;\r\n height: 50px;\r\n font-size: 11pt; \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: 9pt;\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 font-size: 16pt;\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":" \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\nasync function ayPrepareData(ayData) { \n\n await ayGetTranslations([\"TaxCodeName\", \"Tags\", \"TaxCodeTaxA\", \"TaxCodeTaxB\", \"TaxCodeTaxOnTax\", \"TaxCodeNotes\" ]);\n \n return ayData;\n}","JsHelpers":"//Register custom Handlebars helpers here to use in your report script\r\n//https://handlebarsjs.com/guide/#custom-helpers","RenderType":0,"HeaderTemplate":"  ","FooterTemplate":"                Printed date: PDFDate\nPage of                ","DisplayHeaderFooter":true,"PaperFormat":10,"Landscape":false,"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/Travel Rates list.ayrt b/server/AyaNova/resource/rpt/stock-report-templates/Travel Rates list.ayrt index 44ce6202..5c676ab1 100644 --- a/server/AyaNova/resource/rpt/stock-report-templates/Travel Rates list.ayrt +++ b/server/AyaNova/resource/rpt/stock-report-templates/Travel Rates list.ayrt @@ -1 +1 @@ -{"Name":"Travel Rates list","Active":true,"Notes":"","Roles":50554,"AType":63,"IncludeWoItemDescendants":false,"Template":"\n\n\n
\n
\n

{{ayT 'TravelRateList'}} list

\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 \n \n\t\t {{#if ContractOnly }}{{else}}{{/if}}\n\t\t \n\n \n {{/each}}\n \n\n \n \n\n
{{ayT 'TravelRate'}}{{ayT 'Tags'}}{{ayT 'RateAccountNumber'}}{{ayT 'Cost'}}{{ayT 'RateCharge'}}{{ayT 'RateUnitChargeDescriptionID'}}{{ayT 'ContractRate'}}
{{Name}}{{Tags}}{{AccountNumber}}{{ayCurrency Cost}}{{ayCurrency Charge}}{{Unit}}
\n\n\n
\n\n\n","Style":"body {\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 border-bottom: solid 1pt #9e9e9e;\r\n height: 50px;\r\n font-size: 11pt; \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: 9pt;\r\n text-align: center;\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 font-size: 16pt;\r\n}\r\n.fontblue {\r\n color: blue;\r\n}\r\n.fontred {\r\n color:red;\r\n}","JsPrerender":"async function ayPrepareData(ayData){ \n\n await ayGetTranslations([\"TravelRateList\", \"TravelRate\", \"Tags\", \"RateAccountNumber\", \"Cost\", \"RateCharge\", \"RateUnitChargeDescriptionID\", \"ContractRate\" ]);\n\n return ayData;\n}","JsHelpers":"","RenderType":0,"HeaderTemplate":"  ","FooterTemplate":"                Printed date: PDFDate\nPage of                ","DisplayHeaderFooter":true,"PaperFormat":10,"Landscape":false,"MarginOptionsBottom":"15mm","MarginOptionsLeft":"20mm","MarginOptionsRight":"20mm","MarginOptionsTop":"10mm","PageRanges":null,"PreferCSSPageSize":false,"PrintBackground":true,"Scale":1.00000} \ No newline at end of file +{"Name":"Travel Rates list","Active":true,"Notes":"","Roles":50554,"AType":63,"IncludeWoItemDescendants":false,"Template":"\n\n\n
\n
\n

{{ayT 'TravelRateList'}} list

\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 \n \n\t\t {{#if ContractOnly }}{{else}}{{/if}}\n \n {{/each}}\n \n\n \n \n\n
{{ayT 'TravelRate'}}{{ayT 'Tags'}}{{ayT 'RateAccountNumber'}}{{ayT 'Cost'}}{{ayT 'RateCharge'}}{{ayT 'RateUnitChargeDescriptionID'}}{{ayT 'ContractRate'}}
{{Name}}{{Tags}}{{AccountNumber}}{{ayCurrency Cost}}{{ayCurrency Charge}}{{Unit}}
\n\n\n
\n\n\n","Style":"body {\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 border-bottom: solid 1pt #9e9e9e;\r\n height: 50px;\r\n font-size: 11pt; \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: 9pt;\r\n text-align: center;\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 font-size: 16pt;\r\n}\r\n.fontblue {\r\n color: blue;\r\n}\r\n.fontred {\r\n color:red;\r\n}","JsPrerender":"async function ayPrepareData(ayData){ \n\n await ayGetTranslations([\"TravelRateList\", \"TravelRate\", \"Tags\", \"RateAccountNumber\", \"Cost\", \"RateCharge\", \"RateUnitChargeDescriptionID\", \"ContractRate\" ]);\n\n return ayData;\n}","JsHelpers":"","RenderType":0,"HeaderTemplate":"  ","FooterTemplate":"                Printed date: PDFDate\nPage of                ","DisplayHeaderFooter":true,"PaperFormat":10,"Landscape":false,"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/Unit Meter Reading.ayrt b/server/AyaNova/resource/rpt/stock-report-templates/Unit Meter Reading.ayrt new file mode 100644 index 00000000..df593523 --- /dev/null +++ b/server/AyaNova/resource/rpt/stock-report-templates/Unit Meter Reading.ayrt @@ -0,0 +1 @@ +{"Name":"Unit Meter Reading","Active":true,"Notes":"","Roles":50538,"AType":53,"IncludeWoItemDescendants":false,"Template":"\n\n
\n {{#each ayReportData}}\n
\n

{{ayT 'UnitMeterReadingList'}} for {{ayT 'Unit'}}: {{group}}

\n
\n \n \n \n \n \n \n \n \n \n \n {{#each items}}\n \n \n \n \n \n \n {{/each}}\n \n \n \n
{{ayT 'UnitMeterReadingMeterDate'}}{{ayT 'UnitMeterReading'}}{{ayT 'UnitMeterReadingWorkOrderItemID'}}{{ayT 'UnitMeterReadingDescription'}}
{{ayDateTime MeterDate}}{{Meter}}{{WorkOrderViz}}{{Notes}}
\n
\n {{/each}}\n\n","Style":"body {\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 border-bottom: solid 1pt #9e9e9e;\r\n height: 50px;\r\n font-size: 10pt; \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: 9pt;\r\n text-align: center;\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 font-size: 16pt;\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":" \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\nasync function ayPrepareData(ayData) { \n\n await ayGetTranslations([ \"Unit\", \"UnitMeterReadingList\", \"UnitMeterReading\", \"UnitMeterReadingMeterDate\", \"UnitMeterReadingDescription\", \"UnitMeterReadingWorkOrderItemID\" ]);\n\n //send the raw report data to the groupByKey function which will return a new array grouped by the key name provided\n ayData.ayReportData = ayGroupByKey(ayData.ayReportData, 'UnitViz')\n \n return ayData;\n}","JsHelpers":"//Register custom Handlebars helpers here to use in your report script\r\n//https://handlebarsjs.com/guide/#custom-helpers","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/Unit Models list.ayrt b/server/AyaNova/resource/rpt/stock-report-templates/Unit Models list.ayrt new file mode 100644 index 00000000..24243f1b --- /dev/null +++ b/server/AyaNova/resource/rpt/stock-report-templates/Unit Models list.ayrt @@ -0,0 +1 @@ +{"Name":"Unit Models list","Active":true,"Notes":"","Roles":50538,"AType":32,"IncludeWoItemDescendants":false,"Template":"\n\n
\n
\n

{{ayT 'UnitModels'}} List

\n
\n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n {{#each ayReportData}}\n \n \n \n \n {{#if LifeTimeWarranty}}{{else}}{{/if}}\n {{#if WarrantyLength}}{{else}}{{/if}}\n \n \n \n \n {{/each}}\n \n \n \n
{{ayT 'UnitModel'}}{{ayT 'UnitModelVendorID'}}{{ayT 'UnitModelIntroducedDate'}}{{ayT 'UnitModelLifeTimeWarranty'}}{{ayT 'UnitModelWarrantyLength'}}{{ayT 'UnitModelWarrantyTerms'}}{{ayT 'Tags'}}{{ayT 'UnitModelNotes'}}
{{Name}}{{VendorViz}}{{ayDate IntroducedDate}} {{WarrantyLength}} {{WarrantyTerms}}{{Tags}}{{Notes}}
\n
\n\n","Style":"body {\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 border-bottom: solid 1pt #9e9e9e;\r\n height: 50px;\r\n font-size: 10pt; \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: 9pt;\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 font-size: 16pt;\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":" \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\nasync function ayPrepareData(ayData) { \n\n await ayGetTranslations([ \"UnitModels\", \"UnitModel\", \"UnitModelVendorID\", \"UnitModelIntroducedDate\", \"UnitModelWarrantyTerms\", \"UnitModelWarrantyLength\", \"UnitModelLifeTimeWarranty\", \"UnitModelNotes\", \"Tags\" ]);\n \n return ayData;\n}","JsHelpers":"//Register custom Handlebars helpers here to use in your report script\r\n//https://handlebarsjs.com/guide/#custom-helpers","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/Units Per Customer .ayrt b/server/AyaNova/resource/rpt/stock-report-templates/Units Per Customer .ayrt new file mode 100644 index 00000000..db2cda8a --- /dev/null +++ b/server/AyaNova/resource/rpt/stock-report-templates/Units Per Customer .ayrt @@ -0,0 +1 @@ +{"Name":"Units Per Customer ","Active":true,"Notes":"Use of ayGroupByKey in the custom Prepare to group units by the customer","Roles":50554,"AType":31,"IncludeWoItemDescendants":false,"Template":"\n\n\t
\t \n\t\t \n \t\t\n \n\t\t\t\t\n\t\t\t\t\n\t\t\t\t\n\t\t\t\t\n\t\t\t\t\n\t\t\t\t \n \n \t\t\n \n \n {{#each ayReportData}}\n \n \n\t\t\t \n \n\t\t {{#each items}}\n\t\t \n\t\t\t \n\t\t\t\t\n\t\t\t\t\n\t\t\t\t\n\t\t\t\t\n\t\t\t\t \n \n\t\t\t{{/each}}\n\t\t\t\n\t\t\t \n \n \t {{/each}}\n \n
{{ayT 'UnitSerial'}}{{ayT 'UnitModel'}}{{ayT 'LastServiceWorkOrderServiceDate'}}{{ayT 'LastServiceWorkOrder'}}{{ayT 'UnitNotes'}}
# of {{ayT 'UnitList'}} for {{group}}: {{count}}
 {{Serial}}{{UnitModelNameViz}}{{ayDate LastServiceDateViz}}{{LastWorkOrderViz}}{{Notes}}
 
\n\n\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: 13pt; \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: 50px;\n font-size: 11pt; \n color: #9e9e9e;\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\n //send the raw report data to the groupByKey function which will return a new array grouped by the key name provided\n reportData.ayReportData = ayGroupByKey(reportData.ayReportData, 'CustomerViz')\n\n await ayGetTranslations([ \"UnitList\", \"Customer\", \"UnitSerial\", \"LastServiceWorkOrder\", \"LastServiceWorkOrderServiceDate\", \"UnitNotes\", \"UnitModel\" ]);\n\n\n //return the data into the pipeline to send to the report template\n return reportData;\n}\n\n","JsHelpers":"//Register custom Handlebars helpers here to use in your report script\n//https://handlebarsjs.com/guide/#custom-helpers\nHandlebars.registerHelper('loud', function (aString) {\n return aString.toUpperCase()\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/Users Grouped By User Type.ayrt b/server/AyaNova/resource/rpt/stock-report-templates/Users Grouped By User Type.ayrt index 55b83169..56728547 100644 --- a/server/AyaNova/resource/rpt/stock-report-templates/Users Grouped By User Type.ayrt +++ b/server/AyaNova/resource/rpt/stock-report-templates/Users Grouped By User Type.ayrt @@ -1 +1 @@ -{"Name":"Users Grouped By User Type","Active":true,"Notes":"","Roles":124927,"AType":3,"IncludeWoItemDescendants":false,"Template":"\n\t\n\t

{{ayT 'UserList'}} grouped by {{ayT 'UserType'}}

\n\t\n\t\n\t\t\n\t\t\t\n \n \n \n \n \n \n\t\t\n\t\n\n\t\n\t\n {{#each ayReportData}}\n \n \n \n {{#each items}}\n \n \n \n \n {{#if IsTech}}\n\t\t\t\t\t{{else}}{{/if}} \n \n \n \n \t\n {{/each}}\n \n \n \n {{/each}}\n\t\n\t\n \n \n\t
 {{ayT 'Name'}}{{ayT 'UserEmployeeNumber'}}{{ayT 'UserTypeService'}}{{ayT 'UserEmailAddress'}}{{ayT 'UserPhone1'}}{{ayT 'UserVendorID'}}
{{count}} {{ayT 'UserList'}} assigned to {{ayT 'UserType'}} {{group}}
 {{Name}}{{EmployeeNumber}}{{UserOptions.EmailAddress}}{{UserOptions.Phone1}}{{VendorViz}}
 
\n\n","Style":"h2 {\r\n color: #9e9e9e;\r\n}\r\n\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 text-align: center;\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(ayData){ \n\n await ayGetTranslations([ \"UserList\", \"Name\", \"UserType\", \"UserEmployeeNumber\", \"UserPhone1\", \"UserEmailAddress\", \"UserTypeService\", \"UserVendorID\" ]);\n\n ayData.ayReportData = ayGroupByKey(ayData.ayReportData, 'UserTypeViz')\n\n\n return ayData;\n}","JsHelpers":"","RenderType":0,"HeaderTemplate":"  ","FooterTemplate":"                Printed date: PDFDate\nPage of                ","DisplayHeaderFooter":true,"PaperFormat":10,"Landscape":true,"MarginOptionsBottom":"15mm","MarginOptionsLeft":"15mm","MarginOptionsRight":"15mm","MarginOptionsTop":"15mm","PageRanges":null,"PreferCSSPageSize":false,"PrintBackground":true,"Scale":1.00000} \ No newline at end of file +{"Name":"Users Grouped By User Type","Active":true,"Notes":"","Roles":51050,"AType":3,"IncludeWoItemDescendants":false,"Template":"\n\t\n\t

{{ayT 'UserList'}} grouped by {{ayT 'UserType'}}

\n\t\n\t\n\t\t\n\t\t\t\n \n \n \n \n \n \n\t\t\n\t\n\n\t\n\t\n {{#each ayReportData}}\n \n \n \n {{#each items}}\n \n \n \n \n {{#if IsTech}}\n\t\t\t\t\t{{else}}{{/if}} \n \n \n \n \t\n {{/each}}\n \n \n \n {{/each}}\n\t\n\t\n \n \n\t
 {{ayT 'Name'}}{{ayT 'UserEmployeeNumber'}}{{ayT 'UserTypeService'}}{{ayT 'UserEmailAddress'}}{{ayT 'UserPhone1'}}{{ayT 'UserVendorID'}}
{{count}} {{ayT 'UserList'}} assigned to {{ayT 'UserType'}} {{group}}
 {{Name}}{{EmployeeNumber}}{{UserOptions.EmailAddress}}{{UserOptions.Phone1}}{{VendorViz}}
 
\n\n","Style":"h2 {\r\n color: #9e9e9e;\r\n}\r\n\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 text-align: center;\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(ayData){ \n\n await ayGetTranslations([ \"UserList\", \"Name\", \"UserType\", \"UserEmployeeNumber\", \"UserPhone1\", \"UserEmailAddress\", \"UserTypeService\", \"UserVendorID\" ]);\n\n ayData.ayReportData = ayGroupByKey(ayData.ayReportData, 'UserTypeViz')\n\n\n return ayData;\n}","JsHelpers":"","RenderType":0,"HeaderTemplate":"  ","FooterTemplate":"                Printed date: PDFDate\nPage of                ","DisplayHeaderFooter":true,"PaperFormat":10,"Landscape":true,"MarginOptionsBottom":"15mm","MarginOptionsLeft":"15mm","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/Vendor Contact Report.ayrt b/server/AyaNova/resource/rpt/stock-report-templates/Vendor Contact Report.ayrt new file mode 100644 index 00000000..44ab8081 --- /dev/null +++ b/server/AyaNova/resource/rpt/stock-report-templates/Vendor Contact Report.ayrt @@ -0,0 +1 @@ +{"Name":"Vendor Contact Report","Active":true,"Notes":"","Roles":49258,"AType":33,"IncludeWoItemDescendants":false,"Template":"\n\n\n
\n
\n

Vendor Contact List

\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 \n \n \n \n \n {{/each}}\n \n\n \n \n\n
{{ayT 'VendorName'}}{{ayT 'Tags'}}{{ayT 'VendorAccountNumber'}}{{ayT 'VendorPhone1'}}{{ayT 'VendorEmail'}}{{ayT 'WebAddress'}}{{ayT 'VendorNotes'}}
{{Name}}{{Tags}}{{AccountNumber}}{{Phone1}}{{EmailAddress}}{{WebAddress}}{{Notes}}
\n\n\n
\n\n\n","Style":"body {\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: 50px;\n font-size: 11pt; \n color: #9e9e9e;\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":" \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\nasync function ayPrepareData(ayData) { \n\n await ayGetTranslations([\"VendorName\", \"Tags\", \"VendorAccountNumber\", \"VendorPhone1\", \"VendorEmail\", \"VendorNotes\", \"WebAddress\" ]);\n \n return ayData;\n}","JsHelpers":"//Register custom Handlebars helpers here to use in your report script\n//https://handlebarsjs.com/guide/#custom-helpers\n","RenderType":0,"HeaderTemplate":"  ","FooterTemplate":"                Printed date: PDFDate\nPage of                \n","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/Work Order Item Summary.ayrt b/server/AyaNova/resource/rpt/stock-report-templates/Work Order Item Summary.ayrt new file mode 100644 index 00000000..95b6d106 --- /dev/null +++ b/server/AyaNova/resource/rpt/stock-report-templates/Work Order Item Summary.ayrt @@ -0,0 +1 @@ +{"Name":"Work Order Item Summary","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":false,"Template":"\n\n\n
\n
\n

{{ayT 'WorkOrderItem'}} {{ayT 'WorkOrderItemSummary'}}

\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 \n \n \n \n \n \n \n \n \n {{/each}}\n {{/each}}\n \n \n \n
{{ayT 'WorkOrder'}} & {{ayT 'WorkOrderItem'}} {{ayT 'Sequence'}}{{ayT 'Customer'}}{{ayT 'WorkOrder'}} {{ayT 'WorkOrderServiceDate'}}{{ayT 'WorkOrderItemRequestDate'}}{{ayT 'WorkOrderItemWorkOrderStatusID'}}{{ayT 'Priority'}}{{ayT 'WorkOrderItemSummary'}}
{{WorkOrderId}} - {{Sequence}}{{../CustomerViz}}{{ayDate ../ServiceDate}}{{ayDate RequestDate}}{{WorkOrderItemStatusNameViz}}{{WorkOrderItemPriorityNameViz}}{{Notes}}
 
\n\n
\n\n\n","Style":"\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: 5px;\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\", \"WorkOrderItemSummary\", \"Priority\", \"WorkOrderItemRequestDate\"]);\n\n\n\n return reportData;\n}","JsHelpers":"//Register custom Handlebars helpers here to use in your report script\n//https://handlebarsjs.com/guide/#custom-helpers\nHandlebars.registerHelper('loud', function (aString) {\n return aString.toUpperCase()\n})","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/Work Order Item Tasks.ayrt b/server/AyaNova/resource/rpt/stock-report-templates/Work Order Item Tasks.ayrt index 3d602ed1..b39a06a5 100644 --- a/server/AyaNova/resource/rpt/stock-report-templates/Work Order Item Tasks.ayrt +++ b/server/AyaNova/resource/rpt/stock-report-templates/Work Order Item Tasks.ayrt @@ -1 +1 @@ -{"Name":"Work Order Item Tasks","Active":true,"Notes":"","Roles":50538,"AType":42,"IncludeWoItemDescendants":false,"Template":"\n\n\n
\n
\n

{{ayT 'WorkOrder'}} {{ayT 'WorkOrderItemList'}} {{ayT 'WorkOrderItemTasks'}} List

\n
\n\n \n \n \n \n \n \n \n\n\n\t\t\t\t\t \n\t\t\t\t\t\n \n \n\n \n {{#each ayReportData}}\n {{#each Items}}\n {{#each Tasks}}\n \n \n \n \n\n\t\t\t\t\t\n\t\t\t\t\t{{#if_eq Status 2}}\n\t\t\t\t\t{{else}}{{/if_eq}}\n\t\t\t\t\t\n \n \n {{/each}}\n {{/each}}\n {{/each}}\n \n\n \n \n\n
{{ayT 'WorkOrder'}}{{ayT 'WorkOrderServiceDate'}}{{ayT 'WorkOrderItemSummary'}}{{ayT 'WorkOrderItemTaskWorkOrderItemTaskCompletionType'}}{{ayT 'WorkOrderItemTasks'}}
{{../../Serial}}{{ayDateTime ../../ServiceDate}}{{../Notes}}{{StatusViz}} {{StatusViz}} {{Task}}
\n\n\n
\n\n\n","Style":"body {\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: 20px;\r\n font-size: 10pt; \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: 8pt;\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 font-size: 16pt;\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":" \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\nasync function ayPrepareData(ayData) { \n\n await ayGetTranslations([ \"WorkOrderItemTasks\", \"WorkOrder\", \"WorkOrderItemList\", \"WorkOrderServiceDate\", \"WorkOrderItemSummary\", \"WorkOrderItemTaskWorkOrderItemTask\", \"WorkOrderItemTaskWorkOrderItemTaskCompletionType\" ]);\n\n\n \n return ayData;\n}","JsHelpers":"//Register custom Handlebars helpers here to use in your report script\r\n//https://handlebarsjs.com/guide/#custom-helpers\r\n\r\n//custom helper so can do a direct comparison - i.e. if value equals xxxx, then show, else show yyyyy\r\n//note that this HAS to be added here in Helpers, is NOT built in\r\nHandlebars.registerHelper('if_eq', function(a, b, opts) {\r\n if(a == b) // Or === depending on your needs\r\n return opts.fn(this);\r\n else\r\n return opts.inverse(this);\r\n});","RenderType":0,"HeaderTemplate":"  ","FooterTemplate":"                Printed date: PDFDate\nPage of                ","DisplayHeaderFooter":true,"PaperFormat":0,"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":"Work Order Item Tasks","Active":true,"Notes":"","Roles":50538,"AType":42,"IncludeWoItemDescendants":false,"Template":"\n\n\n
\n
\n

{{ayT 'WorkOrder'}} {{ayT 'WorkOrderItemList'}} {{ayT 'WorkOrderItemTasks'}} List

\n
\n\n \n \n \n \n \n \n \n\n\n\t\t\t\t\t \n\t\t\t\t\t\n \n \n\n \n {{#each ayReportData}}\n {{#each Items}}\n {{#each Tasks}}\n \n \n \n \n\n\t\t\t\t\t\n\t\t\t\t\t{{#if_eq Status 2}}\n\t\t\t\t\t{{else}}{{/if_eq}}\n\t\t\t\t\t\n \n {{/each}}\n {{/each}}\n {{/each}}\n \n\n \n \n\n
{{ayT 'WorkOrder'}}{{ayT 'WorkOrderServiceDate'}}{{ayT 'WorkOrderItemSummary'}}{{ayT 'WorkOrderItemTaskWorkOrderItemTaskCompletionType'}}{{ayT 'WorkOrderItemTasks'}}
{{../../Serial}}{{ayDateTime ../../ServiceDate}}{{../Notes}}{{StatusViz}} {{StatusViz}} {{Task}}
\n\n\n
\n\n\n","Style":"body {\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: 20px;\r\n font-size: 10pt; \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: 8pt;\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 font-size: 16pt;\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":" \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\nasync function ayPrepareData(ayData) { \n\n await ayGetTranslations([ \"WorkOrderItemTasks\", \"WorkOrder\", \"WorkOrderItemList\", \"WorkOrderServiceDate\", \"WorkOrderItemSummary\", \"WorkOrderItemTaskWorkOrderItemTaskCompletionType\" ]);\n\n\n \n return ayData;\n}","JsHelpers":"//Register custom Handlebars helpers here to use in your report script\r\n//https://handlebarsjs.com/guide/#custom-helpers\r\n\r\n//custom helper so can do a direct comparison - i.e. if value equals xxxx, then show, else show yyyyy\r\n//note that this HAS to be added here in Helpers, is NOT built in\r\nHandlebars.registerHelper('if_eq', function(a, b, opts) {\r\n if(a == b) // Or === depending on your needs\r\n return opts.fn(this);\r\n else\r\n return opts.inverse(this);\r\n});","RenderType":0,"HeaderTemplate":"  ","FooterTemplate":"                Printed date: PDFDate\nPage of                ","DisplayHeaderFooter":true,"PaperFormat":0,"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/Work Order Scheduled Users.ayrt b/server/AyaNova/resource/rpt/stock-report-templates/Work Order Scheduled Users.ayrt index 7fcf3a9d..97eb0471 100644 --- a/server/AyaNova/resource/rpt/stock-report-templates/Work Order Scheduled Users.ayrt +++ b/server/AyaNova/resource/rpt/stock-report-templates/Work Order Scheduled Users.ayrt @@ -1 +1 @@ -{"Name":"Work Order Scheduled Users","Active":true,"Notes":"","Roles":50538,"AType":41,"IncludeWoItemDescendants":false,"Template":"\n\n\n
\n
\n

{{ayT 'WorkOrderItemScheduledUserList'}} List

\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 ScheduledUsers}}\n \n \n \n \n \n \n \n \n \n \n {{/each}}\n {{/each}}\n {{/each}}\n \n\n \n \n\n
{{ayT 'WorkOrder'}}{{ayT 'Customer'}}{{ayT 'WorkOrderItemWorkOrderStatusID'}}{{ayT 'WorkOrderItemSummary'}}{{ayT 'WorkOrderItemScheduledUsers'}}{{ayT 'WorkOrderItemScheduledUserStartDate'}}{{ayT 'WorkOrderItemScheduledUserEstimatedQuantity'}}
{{../../Serial}}{{../../CustomerViz}}{{../WorkOrderItemStatusNameViz}}{{../Notes}}{{UserViz}}{{ayDateTime StartDate}}{{EstimatedQuantity}}
\n\n\n
\n\n\n","Style":"body {\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: 20px;\r\n font-size: 10pt; \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: 8pt;\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 font-size: 16pt;\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":" \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\nasync function ayPrepareData(ayData) { \n\n await ayGetTranslations([ \"WorkOrderItemScheduledUsers\", \"WorkOrderItemScheduledUserList\", \"WorkOrder\", \"Customer\", \"WorkOrderItemWorkOrderStatusID\", \"WorkOrderItemSummary\", \"WorkOrderItemScheduledUserStartDate\", \"WorkOrderItemScheduledUserEstimatedQuantity\" ]);\n\n \n return ayData;\n}","JsHelpers":"//Register custom Handlebars helpers here to use in your report script\r\n//https://handlebarsjs.com/guide/#custom-helpers\r\n","RenderType":0,"HeaderTemplate":"  ","FooterTemplate":"                Printed date: PDFDate\nPage of                ","DisplayHeaderFooter":true,"PaperFormat":0,"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":"Work Order Scheduled Users","Active":true,"Notes":"","Roles":50538,"AType":41,"IncludeWoItemDescendants":false,"Template":"\n\n\n
\n
\n

{{ayT 'WorkOrderItemScheduledUserList'}} List

\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 ScheduledUsers}}\n \n \n \n \n \n \n \n \n \n \n {{/each}}\n {{/each}}\n {{/each}}\n \n\n \n \n\n
{{ayT 'WorkOrder'}}{{ayT 'Customer'}}{{ayT 'WorkOrderItemWorkOrderStatusID'}}{{ayT 'WorkOrderItemSummary'}}{{ayT 'WorkOrderItemScheduledUsers'}}{{ayT 'WorkOrderItemScheduledUserStartDate'}}{{ayT 'WorkOrderItemScheduledUserEstimatedQuantity'}}
{{../../Serial}}{{../../CustomerViz}}{{../WorkOrderItemStatusNameViz}}{{../Notes}}{{UserViz}}{{ayDateTime StartDate}}{{EstimatedQuantity}}
\n\n\n
\n\n\n","Style":"body {\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: 20px;\r\n font-size: 10pt; \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: 8pt;\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 font-size: 16pt;\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":" \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\nasync function ayPrepareData(ayData) { \n\n await ayGetTranslations([ \"WorkOrderItemScheduledUsers\", \"WorkOrderItemScheduledUserList\", \"WorkOrder\", \"Customer\", \"WorkOrderItemWorkOrderStatusID\", \"WorkOrderItemSummary\", \"WorkOrderItemScheduledUserStartDate\", \"WorkOrderItemScheduledUserEstimatedQuantity\" ]);\n\n \n return ayData;\n}","JsHelpers":"//Register custom Handlebars helpers here to use in your report script\r\n//https://handlebarsjs.com/guide/#custom-helpers\r\n","RenderType":0,"HeaderTemplate":"  ","FooterTemplate":"                Printed date: PDFDate\nPage of                ","DisplayHeaderFooter":true,"PaperFormat":0,"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/Work order Part Requests.ayrt b/server/AyaNova/resource/rpt/stock-report-templates/Work order Part Requests.ayrt new file mode 100644 index 00000000..c15569b7 --- /dev/null +++ b/server/AyaNova/resource/rpt/stock-report-templates/Work order Part Requests.ayrt @@ -0,0 +1 @@ +{"Name":"Work order Part Requests","Active":true,"Notes":"","Roles":124927,"AType":40,"IncludeWoItemDescendants":false,"Template":"\n\n\n\t
\n\t\t
\n\t\t\t

{{ayT 'WorkOrderItemPartRequests'}}

\n\t\t
\n\t\t\n\t\t\t\n\t\t\t\t\n\t\t\t\t\t\n\t\t\t\t\t\n\t\t\t\t\t\n\t\t\t\t\t\n\t\t\t\t\t\n\t\t\t\t\t\n\t\t\t\t\t\n\t\t\t\t\t\n\t\t\t\t\n\t\t\t\n\n\t\t\t\n\t\t\t\t{{#each ayReportData}}\t\t\t\t\n\t\t\t\t{{#each Items}}\n\t\t\t\t{{#each PartRequests}}\n\t\t\t\t\n\t\t\t\t\t\n\t\t\t\t\t\n\t\t\t\t\t\n\t\t\t\t\t\n\t\t\t\t\t\n\t\t\t\t\t\n\t\t\t\t\t\n\t\t\t\t\t\n\t\t\t\t\n\t\t\t\t{{/each}}\n\t\t\t\t{{/each}}\n\t\t\t\t{{/each}}\n\n\t\t\t\n\t\t
{{ayT 'WorkOrder'}}{{ayT 'Part'}}{{ayT 'QuantityRequired'}}{{ayT 'WorkOrderItemPartPartWarehouseID'}}{{ayT 'WorkOrderItemRequestDate'}}{{ayT 'PurchaseOrderPONumber'}}{{ayT 'PurchaseOrderOrderedDate'}}{{ayT 'PurchaseOrderExpectedReceiveDate'}}
{{../../Serial}}{{PartNameViz}} {{PartDescriptionViz}}{{Quantity}}{{PartWarehouseViz}}{{ayDate RequestDate}}{{PurchaseOrderItemId}}{{ayDate PurchaseOrderDateViz}}{{ayDate PurchaseOrderExpectedDateViz}}
\n\t
\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: 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 /* border-bottom: solid 1pt #9e9e9e; */\r\n height: 50px;\r\n font-size: 11pt; \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: 9pt;\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 font-size: 16pt;\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(ayData) {\n\n await ayGetTranslations([ \"WorkOrder\", \"WorkOrderItemPartRequests\", \"PartWholesalerID\", \"Part\", \"QuantityRequired\", \"WorkOrderItemPartPartWarehouseID\", \"WorkOrderItemRequestDate\", \"PurchaseOrderPONumber\", \"PurchaseOrderOrderedDate\", \"PurchaseOrderItemUIOrderedFrom\", \"PurchaseOrderExpectedReceiveDate\", \"PartList\" ]);\n\n \n //return the data into the pipeline to send to the report template\n return ayData;\n}","JsHelpers":"","RenderType":0,"HeaderTemplate":"  ","FooterTemplate":"                Printed date: PDFDate\nPage of                ","DisplayHeaderFooter":true,"PaperFormat":10,"Landscape":true,"MarginOptionsBottom":"20mm","MarginOptionsLeft":"20mm","MarginOptionsRight":"15mm","MarginOptionsTop":"10mm","PageRanges":null,"PreferCSSPageSize":false,"PrintBackground":true,"Scale":1.00000} \ No newline at end of file diff --git a/server/AyaNova/resource/rpt/stock-report-templates/Workorder Units grouped by Customer.ayrt b/server/AyaNova/resource/rpt/stock-report-templates/Workorder Units grouped by Customer.ayrt index b7fd04fd..4ffb83c4 100644 --- a/server/AyaNova/resource/rpt/stock-report-templates/Workorder Units grouped by Customer.ayrt +++ b/server/AyaNova/resource/rpt/stock-report-templates/Workorder Units grouped by Customer.ayrt @@ -1 +1 @@ -{"Name":"Workorder Units grouped by Customer","Active":true,"Notes":"","Roles":50538,"AType":44,"IncludeWoItemDescendants":false,"Template":"\n\n\n
\n
\n\t\t\t

{{ayT 'WorkOrder'}} {{ayT 'WorkOrderItemUnitList'}} grouped by {{ayT 'Customer'}}

\n\t\t
\n \n \n \n \n \n \n \n \n \n \n \n \n {{#each ayReportData}}\n \n \n \n {{#each items}}\n {{#each Items}}\n {{#each Units}}\n \n \n \n \n \n \n \n \n {{/each}}\n {{/each}}\n {{/each}}\n \n \n \n\n \n \n \n {{/each}}\n \n
{{ayT 'Customer'}}{{ayT 'WorkOrder'}}{{ayT 'WorkOrderServiceDate'}}{{ayT 'WorkOrderItemUnit'}}{{ayT 'WorkOrderItemWorkOrderStatusID'}}{{ayT 'WorkOrderItemSummary'}}
{{group}}
 {{../../Serial}} {{ayDate ../../ServiceDate}}{{UnitViz}} - {{UnitModelNameViz}}{{../WorkOrderItemStatusNameViz}}{{../Notes}}
 
 
\n
\n\n \n\n\n","Style":".minimum {\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; /* the # of columns set in the first row of the thead will be fixed and applied throughout table and rows */\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 //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\", \"WorkOrderItemUnit\", \"WorkOrderItemUnitList\", \"WorkOrderStatus\", \"WorkOrderItemWorkOrderStatusID\", \"WorkOrderItemSummary\", \"WorkOrderSummary\" ]);\n\n\n\n return reportData;\n}","JsHelpers":"//Register custom Handlebars helpers here to use in your report script\n//https://handlebarsjs.com/guide/#custom-helpers\nHandlebars.registerHelper('loud', function (aString) {\n return aString.toUpperCase()\n})","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":"Workorder Units grouped by Customer","Active":true,"Notes":"","Roles":50538,"AType":44,"IncludeWoItemDescendants":false,"Template":"\n\n\n
\n
\n\t\t\t

{{ayT 'WorkOrder'}} {{ayT 'WorkOrderItemUnitList'}} grouped by {{ayT 'Customer'}}

\n\t\t
\n \n \n \n \n \n \n \n \n \n \n \n \n {{#each ayReportData}}\n \n \n \n {{#each items}}\n {{#each Items}}\n {{#each Units}}\n \n \n \n \n \n \n \n \n {{/each}}\n {{/each}}\n {{/each}}\n \n \n \n\n \n \n \n {{/each}}\n \n
{{ayT 'Customer'}}{{ayT 'WorkOrder'}}{{ayT 'WorkOrderServiceDate'}}{{ayT 'WorkOrderItemUnit'}}{{ayT 'WorkOrderItemWorkOrderStatusID'}}{{ayT 'WorkOrderItemSummary'}}
{{group}}
 {{../../Serial}} {{ayDate ../../ServiceDate}}{{UnitViz}} - {{UnitModelNameViz}}{{../WorkOrderItemStatusNameViz}}{{../Notes}}
 
 
\n
\n\n \n\n\n","Style":".minimum {\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 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 //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\", \"WorkOrderItemUnit\", \"WorkOrderItemUnitList\", \"WorkOrderStatus\", \"WorkOrderItemWorkOrderStatusID\", \"WorkOrderItemSummary\", \"WorkOrderSummary\" ]);\n\n\n\n return reportData;\n}","JsHelpers":"//Register custom Handlebars helpers here to use in your report script\n//https://handlebarsjs.com/guide/#custom-helpers\nHandlebars.registerHelper('loud', function (aString) {\n return aString.toUpperCase()\n})","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/z_PO custom Helper #if_eq if equal to.ayrt b/server/AyaNova/resource/rpt/stock-report-templates/z_PO custom Helper #if_eq if equal to.ayrt new file mode 100644 index 00000000..f6d16ab6 --- /dev/null +++ b/server/AyaNova/resource/rpt/stock-report-templates/z_PO custom Helper #if_eq if equal to.ayrt @@ -0,0 +1 @@ +{"Name":"z_PO custom Helper #if_eq if equal to","Active":true,"Notes":"example custom Helper if_eq to compare ordered to received, if equals will show in greenfont. if NOT equal, shows in redfont\nexample use of HTML if else /if - if serials present then show, else show preset text","Roles":50538,"AType":26,"IncludeWoItemDescendants":false,"Template":"\n\n\t\n\t\n \n \n \n \n \n \n \n \n \n \n {{#each ayReportData}}\n \n {{#each Items}} \n \n \n \n \n \n \n {{#if_eq QuantityOrdered QuantityReceived}} {{else}}{{/if_eq}}\n\t\t\t\t\t\n \n {{#if Serials}}{{else}}{{/if}}\n \n {{/each}}\n \n \n \n \n {{/each}}\n
{{ayT 'PurchaseOrderPONumber'}}{{ayT 'Part'}}{{ayT 'PurchaseOrderItemQuantityOrdered'}}{{ayT 'PurchaseOrderItemQuantityReceived'}}{{ayT 'PurchaseOrderItemSerialNumbers'}}
{{../Serial}} {{PartNameViz}} {{QuantityOrdered}}{{QuantityReceived}} (same as quantity ordered){{QuantityReceived}} (not the same as ordered){{Serials}}no serials documented
 
\n\t\n\n","Style":".singlePage\n{\npage-break-after: always;\n\n}\nbody {\n font-family: 'Helvetica', 'Helvetica Neue', Arial, sans-serif; \n}\n\n.reporttitle { \n margin-bottom: 20pt; \n font-weight: bold; \n font-size: 13pt; \n 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: 50px;\n font-size: 11pt; \n color: #9e9e9e;\n}\n\ntbody td {\n padding: 10px;\n word-wrap: break-word;\n font-size: 9pt;\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 await ayGetTranslations([ \"Part\", \"PurchaseOrderItemQuantityOrdered\", \"PurchaseOrderPONumber\", \"PurchaseOrderItemSerialNumbers\", \"PurchaseOrderItemQuantityReceived\" ]);\n\n\n return reportData;\n}","JsHelpers":"//Register custom Handlebars helpers here to use in your report script\n//https://handlebarsjs.com/guide/#custom-helpers\nHandlebars.registerHelper('loud', function (aString) {\n return aString.toUpperCase()\n})\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","RenderType":0,"HeaderTemplate":"                Printed date: PDFDate\nPage of                ","FooterTemplate":"  ","DisplayHeaderFooter":true,"PaperFormat":10,"Landscape":false,"MarginOptionsBottom":"15mm","MarginOptionsLeft":"10mm","MarginOptionsRight":"10mm","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/z_Wiki displayed PO.ayrt b/server/AyaNova/resource/rpt/stock-report-templates/z_Wiki displayed PO.ayrt new file mode 100644 index 00000000..4a96e535 --- /dev/null +++ b/server/AyaNova/resource/rpt/stock-report-templates/z_Wiki displayed PO.ayrt @@ -0,0 +1 @@ +{"Name":"z_Wiki displayed PO","Active":true,"Notes":"Example of how to display the Wiki that is associated with POs","Roles":124927,"AType":26,"IncludeWoItemDescendants":false,"Template":"\n\t\n\t\n\n\t\n\t\t\n\t\t\t\n\t\t\t\n\t\t\n\t\n\n\t{{#each ayReportData}}\n\t\t\n\t\t\t\n\t\t\t\n\t\t\t\t\n\t\t\t\t\n\t\t\t\n\t\n\t{{/each}}\n\n\t\n\t\t\n\t\t\t\n\t\t\n\t\t\n\n\t
column header 1column header 2
{{ayT 'PurchaseOrder'}} {{Serial}}{{ayWiki Wiki}}
and some footer text
\t\n\n\n","Style":".singlePage\n{\npage-break-after: always;\n}\n\n.footertext {\n font-size: 14pt;\n font-style: italic;\n background-color: pink;\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 text-align: center;\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: 50px;\n font-size: 13pt; \n color: #9e9e9e;\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}\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 await ayGetTranslations([\"PurchaseOrder\" ]);\n\n return reportData;\n}","JsHelpers":"//Register custom Handlebars helpers here to use in your report script\n//https://handlebarsjs.com/guide/#custom-helpers\nHandlebars.registerHelper('loud', function (aString) {\n return aString.toUpperCase()\n})","RenderType":0,"HeaderTemplate":"    Todays date:    set in PDF Options","FooterTemplate":"  set in PDF Options  Page  of     ","DisplayHeaderFooter":true,"PaperFormat":10,"Landscape":false,"MarginOptionsBottom":"15mm","MarginOptionsLeft":"10mm","MarginOptionsRight":"10mm","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/EXAMPLE Wiki displayed.ayrt b/server/AyaNova/resource/rpt/stock-report-templates/z_Wiki displayed.ayrt similarity index 50% rename from server/AyaNova/resource/rpt/stock-report-templates/EXAMPLE Wiki displayed.ayrt rename to server/AyaNova/resource/rpt/stock-report-templates/z_Wiki displayed.ayrt index 95fdb7b1..bf277662 100644 --- a/server/AyaNova/resource/rpt/stock-report-templates/EXAMPLE Wiki displayed.ayrt +++ b/server/AyaNova/resource/rpt/stock-report-templates/z_Wiki displayed.ayrt @@ -1 +1 @@ -{"Name":"z_Wiki displayed","Active":true,"Notes":"","Roles":124927,"AType":34,"IncludeWoItemDescendants":false,"Template":"\n\t\n\t\t\n\n\t\n\t\t\n\t\t\t\n\t\t\t\n\t\t\n\t\n\n\t{{#each ayReportData}}\n\t\t\n\t\t\t\n\t\t\t\n\t\t\t\t\n\t\t\t\t\n\t\t\t\n\t\t\t\n\t\t\t\t\n\t\t\t\n\t\n\t{{/each}}\n\n\t\n\t\t\n\t\t\t\n\t\t\n\t\t\n\n\t
column header text repeats every pagecolumn header 2
{{ayT 'WorkOrder'}} {{Serial}}{{ayWiki Wiki}}
and some footer text that will be repeated every page
\t\n\n\n","Style":".singlePage\n{\npage-break-after: always;\n}\n\n.footertext {\n font-size: 14pt;\n font-style: italic;\n background-color: lightsteelblue;\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 text-align: center;\n} \n\ntable { \n border-collapse: collapse;\n white-space: pre-wrap;\n width: 100%;\n table-layout: fixed; /* the # of columns set in the first row of the thead will be fixed and applied throughout table and rows */\n }\n\nth {\n border-bottom: solid 1pt #9e9e9e;\n height: 50px;\n font-size: 13pt; \n color: #9e9e9e;\n}\n\ntbody td {\n padding: 10px;\n word-wrap: break-word;\n font-size: 9pt;\n}\n\n\ntbody tr:nth-child(odd) {\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 await ayGetTranslations([\"WorkOrder\" ]);\n\n return reportData;\n}","JsHelpers":"//Register custom Handlebars helpers here to use in your report script\n//https://handlebarsjs.com/guide/#custom-helpers\nHandlebars.registerHelper('loud', function (aString) {\n return aString.toUpperCase()\n})","RenderType":0,"HeaderTemplate":"    Todays date:    set in PDF Options","FooterTemplate":"  set in PDF Options  Page  of     ","DisplayHeaderFooter":true,"PaperFormat":10,"Landscape":false,"MarginOptionsBottom":"15mm","MarginOptionsLeft":"10mm","MarginOptionsRight":"10mm","MarginOptionsTop":"15mm","PageRanges":null,"PreferCSSPageSize":false,"PrintBackground":true,"Scale":1.00000} \ No newline at end of file +{"Name":"z_Wiki displayed","Active":true,"Notes":"","Roles":124927,"AType":34,"IncludeWoItemDescendants":false,"Template":"\n\t\n\t\t\n\n\t\n\t\t\n\t\t\t\n\t\t\t\n\t\t\n\t\n\n\t{{#each ayReportData}}\n\t\t\n\t\t\t\n\t\t\t\n\t\t\t\t\n\t\t\t\t\n\t\t\t\n\t\t\t\n\t\t\t\t\n\t\t\t\n\t\n\t{{/each}}\n\n\t\n\t\t\n\t\t\t\n\t\t\n\t\t\n\n\t
column header text repeats every pagecolumn header 2
{{ayT 'WorkOrder'}} {{Serial}}{{ayWiki Wiki}}
and some footer text that will be repeated every page
\t\n\n\n","Style":".singlePage\n{\npage-break-after: always;\n}\n\n.footertext {\n font-size: 14pt;\n font-style: italic;\n background-color: lightsteelblue;\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 text-align: center;\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: 50px;\n font-size: 13pt; \n color: #9e9e9e;\n}\n\ntbody td {\n padding: 10px;\n word-wrap: break-word;\n font-size: 9pt;\n}\n\n\ntbody tr:nth-child(odd) {\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 await ayGetTranslations([\"WorkOrder\" ]);\n\n return reportData;\n}","JsHelpers":"//Register custom Handlebars helpers here to use in your report script\n//https://handlebarsjs.com/guide/#custom-helpers\nHandlebars.registerHelper('loud', function (aString) {\n return aString.toUpperCase()\n})","RenderType":0,"HeaderTemplate":"    Todays date:    set in PDF Options","FooterTemplate":"  set in PDF Options  Page  of     ","DisplayHeaderFooter":true,"PaperFormat":10,"Landscape":false,"MarginOptionsBottom":"15mm","MarginOptionsLeft":"10mm","MarginOptionsRight":"10mm","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/z_additional Today's Date Time Helpers.ayrt b/server/AyaNova/resource/rpt/stock-report-templates/z_additional Today's Date Time Helpers.ayrt new file mode 100644 index 00000000..d25eb0a2 --- /dev/null +++ b/server/AyaNova/resource/rpt/stock-report-templates/z_additional Today's Date Time Helpers.ayrt @@ -0,0 +1 @@ +{"Name":"z_additional Today's Date Time Helpers","Active":true,"Notes":"example Custom Helpers to display todays date in different formats","Roles":50538,"AType":34,"IncludeWoItemDescendants":false,"Template":"\n\n\n\t
\n\t\t

Additional custom time date helpers

\n\t

today's date using custom Helper todaysDate no formatting: {{ todaysDate}}

\n\t

today's date using custom Helper date.toLocaleDateString() : {{ todaysLocaleStringDate}}

\n\ttoday's date using custom Helper todaysget that users date.getFullYear etc: {{ todaysget}}

\n\t

today's date using custom Helper long format of ayClientMetaData: {{ todaysMonthDDYYYYDate}}

\n\t

today's date using custom Helper todaysDateYearFromParts formatter.formatToParts(parsedDate): {{ todaysDateYearFromParts}}

\n\t

all can be further customized to display short, long, etc format

\n\t
\n\n\n","Style":".example {\n color: blue;\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 return reportData;\n}","JsHelpers":"//Register custom Handlebars helpers here to use in your report script\n//https://handlebarsjs.com/guide/#custom-helpers\n\n\nHandlebars.registerHelper('todaysDate', function() {\n var dt1=new Date();\n return dt1\n});// today's date with no formatting EXAMPLE SHOW: Wed Jun 09 2021 16:17:27 GMT-0700 (Pacific Daylight Time)\n\nHandlebars.registerHelper('todaysLocaleStringDate', function() {\n var dt2=new Date();\n return dt2.toLocaleDateString() \n});// today's date displayed in the localedatestring EXAMPLE SHOW: 09/06/2021\n\n\nHandlebars.registerHelper('todaysget', function() {\n var dt5 =new Date();\n var date = dt5.getFullYear()+'-'+(dt5.getMonth()+1)+'-'+dt5.getDate() + \" \" + +dt5.getHours() + \":\" + +dt5.getMinutes() ;\n return date\n});// today's date displayed EXAMPLE SHOW: 2021-6-9 16:17\n\n\nHandlebars.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\n\n//\n// CUSTOM FORMAT TO PARTS HELPER\n// this offers the most control over the return format\n// Locale aware conversion to parts that can be returned in any format\n//\nHandlebars.registerHelper('todaysDateYearFromParts', function () {\n\n //parse todays date\n let parsedDate = new Date();\n\n //Set formatter options\n //https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Intl/DateTimeFormat/formatToParts\n let formatter = new Intl.DateTimeFormat('en-us', {\n weekday: 'long',\n year: 'numeric',\n month: 'long', //long to show the full name of month, short to show short name, numeric to show the month number\n day: 'numeric',\n hour: 'numeric',\n minute: 'numeric',\n second: 'numeric',\n fractionalSecondDigits: 3,\n hour12: true,\n timeZone: 'Canada/Pacific' //refer to https://en.wikipedia.org/wiki/List_of_tz_database_time_zones for appropriate TZ database name to use\n //OR use what is displayed in the output for your ayClientMetaData's TimeZoneName:\n });\n\n let parts = formatter.formatToParts(parsedDate);\n /*\n // parts example return value: \n [ \n { type: 'weekday', value: 'Monday' }, \n { type: 'literal', value: ', ' }, \n { type: 'month', value: '12' }, \n { type: 'literal', value: '/' }, \n { type: 'day', value: '17' }, \n { type: 'literal', value: '/' }, \n { type: 'year', value: '2012' }, \n { type: 'literal', value: ', ' }, \n { type: 'hour', value: '3' }, \n { type: 'literal', value: ':' }, \n { type: 'minute', value: '00' }, \n { type: 'literal', value: ':' }, \n { type: 'second', value: '42' }, \n { type: 'fractionalSecond', value: '000' },\n { type: 'literal', value: ' ' }, \n { type: 'dayPeriod', value: 'AM' } \n ]\n */\n//identify here which of the above will use when returning\n let partWeekDay = parts.find(({ type }) => type === 'weekday').value;\n let partDay = parts.find(({ type }) => type === 'day').value;\n let partMonth = parts.find(({ type }) => type === 'month').value;\n let partYear = parts.find(({ type }) => type === 'year').value;\n let partHour = parts.find(({ type }) => type === 'hour').value;\n let partMin = parts.find(({ type }) => type === 'minute').value;\n let partdayPeriod = parts.find(({ type }) => type === 'dayPeriod').value;\n\n\n \n //return in some custom format\n return `${partWeekDay} ${partDay}, ${partMonth} ${partYear} - ${partHour}:${partMin} ${partdayPeriod}`; // EXAMPLE SHOW Wednesday 9, June 2021 - 4:17 PM\n\n \n //return below instead to see array of the possible values for each type while initially figuring out what to customize to\n //return JSON.stringify(parts);\n});","RenderType":0,"HeaderTemplate":null,"FooterTemplate":null,"DisplayHeaderFooter":false,"PaperFormat":10,"Landscape":false,"MarginOptionsBottom":"10mm","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/z_ayGetFromAPI display additional data from linked customer object.ayrt b/server/AyaNova/resource/rpt/stock-report-templates/z_ayGetFromAPI display additional data from linked customer object.ayrt new file mode 100644 index 00000000..836e9a6c --- /dev/null +++ b/server/AyaNova/resource/rpt/stock-report-templates/z_ayGetFromAPI display additional data from linked customer object.ayrt @@ -0,0 +1 @@ +{"Name":"z_ayGetFromAPI display additional data from linked customer object","Active":true,"Notes":"Example of using the ayGetFromAPI to display data from the Customer record when reporting on the Unit record","Roles":124927,"AType":31,"IncludeWoItemDescendants":false,"Template":"\n \n\t
\t\n\t\t
\n\t\t\t

Using API method to obtain additional data from the {{ayT 'Customer'}} record

\n\t\t
\n \n \n\t\t\t\t\n\t\t\t\t\t\n\t\t\t\t\t\n\t\t\t\t\t\n\t\t\t\t\n\t\t\t\t\n\t\t\t\t\t\n\t\t\t\t\t\n\t\t\t\t\t\t\t\t\t\t\n\t\t\t\t\t\n\t\t\t\t\t\n\t\t\t\t\t\n\t\t\t\t \n \t\t\n\t\t\t \n\t\t\t\t {{#each ayReportData}} \n\t\t\t\t \n\t\t\t\t\t\n\t\t\t\t\t\n\t\t\t\t\t\t\t\t\t\t\n\t\t\t\t\t\n\t\t\t\t\t\n\t\t\t\t\t\n\t\t\t\t \n\t\t\t\t {{/each}}\n\t\t\t \n
Data from the Unit recordData from the Unit's Customer record obtained using API method
{{ayT 'Customer'}} {{ayT 'Unit'}}{{ayT 'Customer'}}{{ayT 'Customer'}} {{ayT 'CustomerEmail'}}{{ayT 'Customer'}} {{ayT 'CustomerPhone1'}}{{ayT 'Customer'}} {{ayT 'HeadOffice'}}
{{Serial}} {{UnitModelNameViz}}{{CustomerViz}}{{myCustomerInfo.emailAddress}}{{myCustomerInfo.phone1}}{{myCustomerInfo.headOfficeViz}}
\n\n\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: 13pt; \r\n color: #9e9e9e;\r\n text-align: center;\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 /* border-bottom: solid 1pt #9e9e9e; */\r\n height: 30px;\r\n font-size: 11pt; \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: 9pt;\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 font-size: 16pt;\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(ayData) {\n\n await ayGetTranslations([\"Unit\", \"Customer\", \"CustomerEmail\", \"CustomerPhone1\", \"HeadOffice\" ]);\n \n //Loop through all the records in the raw report data\n for (let i = 0; i < ayData.ayReportData.length; i++) {\n //set a temporary variable to each record to save typing it all out\n let item = ayData.ayReportData[i];\n\n //call into the AyaNova API and get the customer record for this report data's customer id\n const apiResult = await ayGetFromAPI(`customer/${item.CustomerId}`);\n\n //if a result comes back, insert it into the report data so it's available to the template\n if (apiResult) {\n //put the return data customer record on a key in each record called 'myCustomerInfo' (you can call it anything as long as it doesn't conflict with an existing key)\n item.myCustomerInfo = apiResult.data\n }\n }\n return ayData;\n}","JsHelpers":"","RenderType":0,"HeaderTemplate":"                Printed date: PDFDate\n\nPage of                ","FooterTemplate":"  ","DisplayHeaderFooter":true,"PaperFormat":10,"Landscape":true,"MarginOptionsBottom":"15mm","MarginOptionsLeft":"15mm","MarginOptionsRight":"20mm","MarginOptionsTop":"20mm","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_ayGroupByTag group by a specific Tag only.ayrt b/server/AyaNova/resource/rpt/stock-report-templates/z_ayGroupByTag group by a specific Tag only.ayrt new file mode 100644 index 00000000..9c6230d9 --- /dev/null +++ b/server/AyaNova/resource/rpt/stock-report-templates/z_ayGroupByTag group by a specific Tag only.ayrt @@ -0,0 +1 @@ +{"Name":"z_ayGroupByTag group by a specific Tag only","Active":true,"Notes":"Example custom Prepare that groups by a specific Tag - i.e. black","Roles":49514,"AType":20,"IncludeWoItemDescendants":false,"Template":"\n\n\n\t
\n\t\t
\n\t\t\t

Parts by Tag

\n\t\t
\n\t\t\n\t\t\t\n\t\t\t\t\n\t\t\t\t\t\n\t\t\t\t\t\n\t\t\t\t\t\n\t\t\t\t\t\n\t\t\t\t\t\n\t\t\t\t\n\t\t\t\n\n\t\t\t\n\t\t\t\t{{#each ayReportData}}\n\t\t\t\t\n\t\t\t\t\n\t\t\t\t\n\t\t\t\t\t\n\t\t\t\t\n\t\t\t\t{{#each items}}\n\t\t\t\t\n\t\t\t\t\t\n\t\t\t\t\t\n\t\t\t\t\t\n\t\t\t\t\t\n\t\t\t\t\t\n\t\t\t\t\n\t\t\t\t{{/each}}\n\t\t\t\t\n\t\t\t\t\t\n\t\t\t\t\n\t\t\t\t\n\t\t\t\t\t\n\t\t\t\t\n\t\t\t\t{{/each}}\n\t\t\t\n\t\t
{{ayT 'Tag'}}{{ayT 'Part'}}{{ayT 'PartManufacturerID'}}{{ayT 'PartCost'}}{{ayT 'PartRetail'}}
{{group}}
 {{Name}}{{ManufacturerViz}}{{ayCurrency Cost}}{{ayCurrency Retail}}
# of parts for {{ayT 'Tag'}} {{group}}: {{count}}
 
\n\n\t\n\t\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: 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 border-bottom: solid 1pt #9e9e9e;\r\n height: 50px;\r\n font-size: 11pt; \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: 9pt;\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 font-size: 16pt;\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(ayData) {\n\n await ayGetTranslations([\"Part\", \"PartManufacturerID\", \"PartRetail\", \"PartCost\", \"PartSerialNumbersAvailable\", \"Tag\" ]);\n\n\n //Example below is to group by each and every Tag\n //ayData.ayReportData = ayGroupByTag(ayData.ayReportData);\n\n //Example below of how to group by specific text of tags - below example only if contains Tag of 'black'\n ayData.ayReportData = ayGroupByTag(ayData.ayReportData, 'black');\n\n return ayData;\n}\n\nfunction ayGroupByTag(reportDataArray, tagContains) {\n //array to hold grouped data\n const ret = [];\n const containsQuery = tagContains != null && tagContains != '';\n\n //iterate through the raw reprot data \n for (let i = 0; i < reportDataArray.length; i++) {\n //get a reference to each object to save typing\n let o = reportDataArray[i];\n //don't bother with any that don't have tags at all\n if (o.Tags && o.Tags.length) {\n //loop through all tags for this record\n o.Tags.forEach(t => {//t=each tag\n //if not a contains query just process it, if it is a contains query then only process if tag contains tagContains\n if (!containsQuery || t.includes(tagContains)) {\n let groupObject = ret.find(z => z.group == t);\n if (groupObject != undefined) {\n //there is already a matching group in the return array so just push this raw report data record into it\n groupObject.items.push(o);\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 raw report data record\n ret.push({ group: t, items: [o], count: 1 });\n }\n }\n })\n }\n }\n\n //Sort based on the group name in a locale aware manner\n ret.sort(function (a, b) {\n return a.group.localeCompare(b.group);\n });\n return ret;\n}","JsHelpers":"","RenderType":0,"HeaderTemplate":"  ","FooterTemplate":"                Printed date: PDFDate\nPage of                ","DisplayHeaderFooter":true,"PaperFormat":10,"Landscape":false,"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_ayGroupByTag group by each Tag.ayrt b/server/AyaNova/resource/rpt/stock-report-templates/z_ayGroupByTag group by each Tag.ayrt new file mode 100644 index 00000000..4715ab9e --- /dev/null +++ b/server/AyaNova/resource/rpt/stock-report-templates/z_ayGroupByTag group by each Tag.ayrt @@ -0,0 +1 @@ +{"Name":"z_ayGroupByTag group by each Tag","Active":true,"Notes":"Example custom Prepare that groups by the Tags - nothing shows if no tag(s) match","Roles":49514,"AType":20,"IncludeWoItemDescendants":false,"Template":"\n\n\n\t
\n\t\t
\n\t\t\t

Parts by Tag

\n\t\t
\n\t\t\n\t\t\t\n\t\t\t\t\n\t\t\t\t\t\n\t\t\t\t\t\n\t\t\t\t\t\n\t\t\t\t\t\n\t\t\t\t\t\n\t\t\t\t\n\t\t\t\n\n\t\t\t\n\t\t\t\t{{#each ayReportData}}\n\t\t\t\t\n\t\t\t\t\n\t\t\t\t\n\t\t\t\t\t\n\t\t\t\t\n\t\t\t\t{{#each items}}\n\t\t\t\t\n\t\t\t\t\t\n\t\t\t\t\t\n\t\t\t\t\t\n\t\t\t\t\t\n\t\t\t\t\t\n\t\t\t\t\n\t\t\t\t{{/each}}\n\t\t\t\t\n\t\t\t\t\t\n\t\t\t\t\n\t\t\t\t\n\t\t\t\t\t\n\t\t\t\t\n\t\t\t\t{{/each}}\n\t\t\t\n\t\t
{{ayT 'Tag'}}{{ayT 'Part'}}{{ayT 'PartManufacturerID'}}{{ayT 'PartCost'}}{{ayT 'PartRetail'}}
{{group}}
 {{Name}}{{ManufacturerViz}}{{ayCurrency Cost}}{{ayCurrency Retail}}
# of parts for {{ayT 'Tag'}} {{group}}: {{count}}
 
\n\n\t\n\n\n\t
\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: 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; /* the # of columns set in the first row of the thead will be fixed and applied throughout table and rows */\r\n }\r\n\r\nth {\r\n border-bottom: solid 1pt #9e9e9e;\r\n height: 50px;\r\n font-size: 11pt; \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: 9pt;\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 font-size: 16pt;\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(ayData) {\n\n await ayGetTranslations([\"Part\", \"PartManufacturerID\", \"PartRetail\", \"PartCost\", \"PartSerialNumbersAvailable\", \"Tag\" ]);\n\n\n //Group by all tags no filter using the function declared outside\n ayData.ayReportData = ayGroupByTag(ayData.ayReportData);\n\n //Example below of how to group by specific text of tags - below example only if contains the 'zone' - comment out above, and uncomment below\n //ayData.ayReportData = ayGroupByTag(ayData.ayReportData, 'zone');\n\n return ayData;\n}\n\nfunction ayGroupByTag(reportDataArray, tagContains) {\n //array to hold grouped data\n const ret = [];\n const containsQuery = tagContains != null && tagContains != '';\n\n //iterate through the raw reprot data \n for (let i = 0; i < reportDataArray.length; i++) {\n //get a reference to each object to save typing\n let o = reportDataArray[i];\n //don't bother with any that don't have tags at all\n if (o.Tags && o.Tags.length) {\n //loop through all tags for this record\n o.Tags.forEach(t => {//t=each tag\n //if not a contains query just process it, if it is a contains query then only process if tag contains tagContains\n if (!containsQuery || t.includes(tagContains)) {\n let groupObject = ret.find(z => z.group == t);\n if (groupObject != undefined) {\n //there is already a matching group in the return array so just push this raw report data record into it\n groupObject.items.push(o);\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 raw report data record\n ret.push({ group: t, items: [o], count: 1 });\n }\n }\n })\n }\n }\n\n //Sort based on the group name in a locale aware manner\n ret.sort(function (a, b) {\n return a.group.localeCompare(b.group);\n });\n return ret;\n}","JsHelpers":"","RenderType":0,"HeaderTemplate":"  ","FooterTemplate":"                Printed date: PDFDate\nPage of                ","DisplayHeaderFooter":true,"PaperFormat":10,"Landscape":false,"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_ayGroupByTag group inventory by Tag.ayrt b/server/AyaNova/resource/rpt/stock-report-templates/z_ayGroupByTag group inventory by Tag.ayrt new file mode 100644 index 00000000..d64467ef --- /dev/null +++ b/server/AyaNova/resource/rpt/stock-report-templates/z_ayGroupByTag group inventory by Tag.ayrt @@ -0,0 +1 @@ +{"Name":"z_ayGroupByTag group inventory by Tag","Active":true,"Notes":"Example custom Prepare that groups by the Tags - nothing shows if no tag(s) match","Roles":49258,"AType":90,"IncludeWoItemDescendants":false,"Template":"\n\n\n\t
\n\t\t\n\t\t\t\n\t\t\t\t\n\t\t\t\t\t\n\t\t\t\t\n\t\t\t\t\n\t\t\t\t\t\n\t\t\t\t\n\t\t\t\t\n\t\t\t\t\t\n\t\t\t\t\t\n\t\t\t\t\t\n\t\t\t\t\t\n\t\t\t\t\t\n\t\t\t\t\t\n\t\t\t\t\t\n\t\t\t\t\t\n\t\t\t\t\n\t\t\t\n\n\t\t\t\n\t\t\t\t{{#each ayReportData}}\n\t\t\t\t\n\t\t\t\t\t\n\t\t\t\t\n\t\t\t\t{{#each items}}\n\t\t\t\t\n\t\t\t\t\t\n\t\t\t\t\t\n\t\t\t\t\t\n\t\t\t\t\t\n\t\t\t\t\t\n\t\t\t\t\t\n\t\t\t\t\t\n\t\t\t\t\n\t\t\t\t{{/each}}\n\t\t\t\t\n\t\t\t\t\t\n\t\t\t\t\n\t\t\t\t{{/each}}\n\t\t\t\n\n\t\t\t\n\t\t\t\t\n\t\t\t\t\t\n\t\t\t\t\n\t\t\t\t\n\t\t\t\t\t\n\t\t\t\t\t\n\t\t\t\t\t\n\t\t\t\t\t\n\t\t\t\t\n\t\t\t\t\n\t\t\t\t\t\n\t\t\t\t\n\t\t\t\t\n\t\t\t\t\t\n\t\t\t\t\n\t\t\t\t\n\t\t\t\t\t\n\t\t\t\t\t\n\t\t\t\t\t\n\t\t\t\t\n\t\t\t\n\t\t
{{ayServerMetaData.CompanyName}} {{ayT 'PartInventoryList'}}
 
{{ayT 'Part'}}{{ayT 'PartWarehouse'}}{{ayT 'Tags'}}{{ayT 'PartRetail'}}{{ayT 'PartByWarehouseInventoryQuantityOnHand'}}Actual CountDifference + / (-)
# of {{ayT 'PartList'}} with {{ayT 'Tag'}} {{group}}: {{count}}
{{PartName}}{{PartWarehouseName}}{{PartTags}} {{ayCurrency PartRetail}}{{OnHandQty}}
 
 
Count By:__________________________________________Count Date:__________________________________________
 
 
Signature:__________________________________________
\n\n\n\n\n\n\t
\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 color: #9e9e9e;\n} \n\ntable { \n border-collapse: collapse;\n white-space: pre-wrap;\n width: 100%;\n table-layout: fixed; \n font-size: 9pt;\n }\n\nth {\n height: 20px;\n font-size: 11pt; \n color: #9e9e9e;\n}\n\ntbody td {\n padding: 10px;\n word-wrap: break-word;\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}","JsPrerender":"async function ayPrepareData(ayData) {\n\n await ayGetTranslations([\"Part\", \"PartList\", \"PartInventoryList\", \"PartRetail\", \"PartByWarehouseInventoryQuantityOnHand\", \"PartSerialNumbersAvailable\", \"Tag\", \"Tags\", \"PartWarehouse\" ]);\n\n //Group by all tags no filter\n ayData.ayReportData = ayGroupByTag(ayData.ayReportData);\n\n //an example of ayGroupByTag to return records that contain 'zone' as a tag - comment out any others so only one ayGroupByTag \n //ayData.ayReportData = ayGroupByTag(ayData.ayReportData, 'zone');\n\n return ayData;\n}\n\nfunction ayGroupByTag(reportDataArray, tagContains) {\n //array to hold grouped data\n const ret = [];\n const containsQuery = tagContains != null && tagContains != '';\n\n//NOTE that tags are referred to as PartTags so this custom Prepare must reference PartTags, not Tags\n\n //iterate through the raw reprot data \n for (let i = 0; i < reportDataArray.length; i++) {\n //get a reference to each object to save typing\n let o = reportDataArray[i];\n //don't bother with any that don't have tags at all\n if (o.PartTags && o.PartTags.length) {\n //loop through all tags for this record\n o.PartTags.forEach(t => {//t=each tag\n //if not a contains query just process it, if it is a contains query then only process if tag contains tagContains\n if (!containsQuery || t.includes(tagContains)) {\n let groupObject = ret.find(z => z.group == t);\n if (groupObject != undefined) {\n //there is already a matching group in the return array so just push this raw report data record into it\n groupObject.items.push(o);\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 raw report data record\n ret.push({ group: t, items: [o], count: 1 });\n }\n }\n })\n }\n }\n\n //Sort based on the group name in a locale aware manner\n ret.sort(function (a, b) {\n return a.group.localeCompare(b.group);\n });\n return ret;\n}","JsHelpers":"//Register custom Handlebars helpers here to use in your report script\n//https://handlebarsjs.com/guide/#custom-helpers\nHandlebars.registerHelper('loud', function (aString) {\n return aString.toUpperCase()\n})","RenderType":0,"HeaderTemplate":"                Printed date: PDFDate\nPage of                ","FooterTemplate":"  ","DisplayHeaderFooter":true,"PaperFormat":10,"Landscape":true,"MarginOptionsBottom":"20mm","MarginOptionsLeft":"15mm","MarginOptionsRight":"10mm","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/z_barcode using built in ayBC.ayrt b/server/AyaNova/resource/rpt/stock-report-templates/z_barcode using built in ayBC.ayrt new file mode 100644 index 00000000..e23fdba3 --- /dev/null +++ b/server/AyaNova/resource/rpt/stock-report-templates/z_barcode using built in ayBC.ayrt @@ -0,0 +1 @@ +{"Name":"z_barcode using built in ayBC","Active":true,"Notes":"Example of displaying barcodes \n","Roles":50538,"AType":34,"IncludeWoItemDescendants":false,"Template":"\n\n\n
\n\n

Example: Bar code helper

\n

See Report editor help documentation for additional details

\n\n {{#each ayReportData}}\n \n \n \n\n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n {{#each Items}}\n {{#each Units}}\n \n \n \n \n \n {{/each}}\n\n \n \n \n {{#each Parts}}\n \n \n \n \n \n {{/each}}\n\n \n {{/each}}\n
{{ayT \"WorkOrder\" }} {{ayT \"WorkOrderServiceNumber\" }} {{Serial}} as \"CODE-128\" BarCode with scale 1:{{ ayBC Serial '{ \"bcid\": \"code128\",\"includetext\":true, \"scale\":1}' }}
{{ayT \"WorkOrder\" }} {{ayT \"WorkOrderServiceNumber\" }} {{Serial}} as \"QR\" Code with scale 1:{{ ayBC Serial '{ \"bcid\": \"qrcode\",\"includetext\":true, \"scale\":1}' }}
{{ayT \"WorkOrder\" }} {{ayT \"WorkOrderServiceNumber\" }} {{Serial}} as \"QR\" Code with scale 3:{{ ayBC Serial '{ \"bcid\": \"qrcode\",\"includetext\":true, \"scale\":3}' }}
Sample \"UPC-A\" Code using a hard coded number 712345678904 as example:{{ ayBC \"712345678904\" '{ \"bcid\": \"upca\",\"includetext\":true, \"scale\":1}' }}
 
 {{ayT 'Unit'}} {{UnitViz}} displayed as as \"CODE-128\" BarCode with scale 1:{{ ayBC UnitViz '{ \"bcid\": \"code128\",\"includetext\":true, \"scale\":1}' }}
 
 {{ayT 'WorkOrderItemPartPartID'}}: {{PartNameViz}} displayed as \"CODE-128\" BarCode with scale 1:{{ ayBC PartNameViz '{ \"bcid\": \"code128\",\"includetext\":true, \"scale\":1}' }}
\n {{/each}}\n\n
\n\n\n\n","Style":"/* if not using a rule set or specific property it is recommended to comment out or delete fully for report performance*/\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\ntd {\n padding: 10px;\n}\n\ntbody tr:nth-child(even) {\n background-color: #f8f8f8; /* MUST checkmark Print background in PDF Options for this to show */\n}\n\n.fontgreen {\n color: green;\n}\n.fontblue {\n color: blue;\n}\n.fontred {\n color:red;\n}\n\n\n.rightlean {\n text-align: right;\n}\n.leftlean {\n text-align: left;\n}\n.centerlean {\n text-align: center;\n}","JsPrerender":"async function ayPrepareData(reportData){ \n //this function (if present) is called with the report data \n //before the report is rendered\n //modify data as required here and return it to change the data before the report renders\n //see the help documentation for details\n\n\tawait ayGetTranslations([ \"WorkOrder\", \"WorkOrderServiceNumber\", \"Unit\", \"WorkOrderItemPartPartID\" ]);\n\n\n\n\t\n\n return reportData;\n}","JsHelpers":"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 && !isNaN(parsedDate))) {\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":true,"PaperFormat":10,"Landscape":false,"MarginOptionsBottom":"15mm","MarginOptionsLeft":"15mm","MarginOptionsRight":"10mm","MarginOptionsTop":"10mm","PageRanges":null,"PreferCSSPageSize":false,"PrintBackground":true,"Scale":1.00000} \ No newline at end of file diff --git a/server/AyaNova/resource/rpt/stock-report-templates/EXAMPLE company name address logo URL ayServerMetaData.ayrt b/server/AyaNova/resource/rpt/stock-report-templates/z_company name address logo URL ayServerMetaData.ayrt similarity index 66% rename from server/AyaNova/resource/rpt/stock-report-templates/EXAMPLE company name address logo URL ayServerMetaData.ayrt rename to server/AyaNova/resource/rpt/stock-report-templates/z_company name address logo URL ayServerMetaData.ayrt index 5fdffc66..63d751c6 100644 --- a/server/AyaNova/resource/rpt/stock-report-templates/EXAMPLE company name address logo URL ayServerMetaData.ayrt +++ b/server/AyaNova/resource/rpt/stock-report-templates/z_company name address logo URL ayServerMetaData.ayrt @@ -1 +1 @@ -{"Name":"z_company name address logo URL ayServerMetaData","Active":true,"Notes":"Examples of displaying ayServerMetaData data such as licensed company name, company logo, company contact information as entered via Global Settings","Roles":50538,"AType":34,"IncludeWoItemDescendants":false,"Template":"\n\n\n
\n{{#each ayReportData}}\n \n \n \n \n \n \n \n \n {{#if ../ayServerMetaData.HasSmallLogo}}\n {{else}}{{/if}}\n \n \n \n \n \n \n \n \n \n \n \n {{#if ../ayServerMetaData.CompanyPhone1}}\n {{else}}{{/if}}\n \n \n \n {{#if ../ayServerMetaData.HasPostalAddress}}\n {{else}}{{/if}}\n \n \n \n \n \n \n \n \n \n \n \n \n\n \n \n \n \n \n {{#if ServiceDate }}\n {{else}}{{/if}}\n \n {{#if ../ayServerMetaData.CompanyPhone1 }}\n {{else}}{{/if}}\n \n \n \n\n
Column to the right displays all of your ayServerMetaData:{{ayJSON ../ayServerMetaData}}
Column to the right displays the small company logo IF uploaded via Global Settings:{{ayLogo 'small'}}No small logo has been uploaded via your Global Settings
Column to the right displays your licensed Company Name as is - with the quotation marks:{{ayJSON ../ayServerMetaData.CompanyName}}
Column to the right displays your licensed Company Name:{{../ayServerMetaData.CompanyName}}
Column to the right displays your company phone number as entered via Global Settings:{{../ayServerMetaData.CompanyPhone1}}Your company phone number has NOT been entered via your Global Settings
Column to the right displays your company postal address as entered via Global Settings:{{ ../ayServerMetaData.CompanyPostAddress}} {{ ../ayServerMetaData.CompanyPostCity}}Your company postal address has NOT been entered via your Global Settings
 
{{ayT 'WorkOrder'}}{{ayT 'Customer'}}{{ayT 'WorkOrderServiceDate'}}Licensed Company NameCompany Phone Entered via Global Settings
{{Serial}}{{CustomerViz}}{{ayDate ServiceDate}}no Service Date specified{{../ayServerMetaData.CompanyName}}{{ ../ayServerMetaData.CompanyPhone1}}no company phone number specified in Global Settings
\n{{/each}}\n
\n\n","Style":"\n.singlePage\n{\npage-break-after: always;\n}\n\nbody {\n font-family: 'Helvetica', 'Helvetica Neue', Arial, sans-serif; \n}\n\n.reporttitle { \n margin-bottom: 20pt; \n font-weight: bold; \n font-size: 11pt; \n color: #9e9e9e;\n} \n\ntable, td, th {\n border: 1px solid black;\n}\n\ntable { \n white-space: pre-wrap;\n width: 100%;\n table-layout: fixed; /* the # of columns set in the first row of the thead will be fixed and applied throughout table and rows */\n }\n\nth {\n height: 30px;\n font-size: 9pt; \n color: #9e9e9e;\n}\n\ntd {\n padding: 10px;\n word-wrap: break-word;\n font-size: 9pt;\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\" ]);\n\n\t\n\n return reportData;\n}","JsHelpers":"//Register custom Handlebars helpers here to use in your report script\n//https://handlebarsjs.com/guide/#custom-helpers\nHandlebars.registerHelper('loud', function (aString) {\n return aString.toUpperCase()\n})","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":"z_company name address logo URL ayServerMetaData","Active":true,"Notes":"Examples of displaying ayServerMetaData data such as licensed company name, company logo, company contact information as entered via Global Settings","Roles":50538,"AType":34,"IncludeWoItemDescendants":false,"Template":"\n\n\n
\n{{#each ayReportData}}\n \n \n \n \n \n \n \n \n {{#if ../ayServerMetaData.HasSmallLogo}}\n {{else}}{{/if}}\n \n \n \n \n \n \n \n \n \n \n \n {{#if ../ayServerMetaData.CompanyPhone1}}\n {{else}}{{/if}}\n \n \n \n {{#if ../ayServerMetaData.HasPostalAddress}}\n {{else}}{{/if}}\n \n \n \n \n \n \n \n \n \n \n \n \n\n \n \n \n \n \n {{#if ServiceDate }}\n {{else}}{{/if}}\n \n {{#if ../ayServerMetaData.CompanyPhone1 }}\n {{else}}{{/if}}\n \n \n \n\n
Column to the right displays all of your ayServerMetaData:{{ayJSON ../ayServerMetaData}}
Column to the right displays the small company logo IF uploaded via Global Settings:{{ayLogo 'small'}}No small logo has been uploaded via your Global Settings
Column to the right displays your licensed Company Name as is - with the quotation marks:{{ayJSON ../ayServerMetaData.CompanyName}}
Column to the right displays your licensed Company Name:{{../ayServerMetaData.CompanyName}}
Column to the right displays your company phone number as entered via Global Settings:{{../ayServerMetaData.CompanyPhone1}}Your company phone number has NOT been entered via your Global Settings
Column to the right displays your company postal address as entered via Global Settings:{{ ../ayServerMetaData.CompanyPostAddress}} {{ ../ayServerMetaData.CompanyPostCity}}Your company postal address has NOT been entered via your Global Settings
 
{{ayT 'WorkOrder'}}{{ayT 'Customer'}}{{ayT 'WorkOrderServiceDate'}}Licensed Company NameCompany Phone Entered via Global Settings
{{Serial}}{{CustomerViz}}{{ayDate ServiceDate}}no Service Date specified{{../ayServerMetaData.CompanyName}}{{ ../ayServerMetaData.CompanyPhone1}}no company phone number specified in Global Settings
\n{{/each}}\n
\n\n","Style":"\n.singlePage\n{\npage-break-after: always;\n}\n\nbody {\n font-family: 'Helvetica', 'Helvetica Neue', Arial, sans-serif; \n}\n\n.reporttitle { \n margin-bottom: 20pt; \n font-weight: bold; \n font-size: 11pt; \n color: #9e9e9e;\n} \n\ntable, td, th {\n border: 1px solid black;\n}\n\ntable { \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\ntd {\n padding: 10px;\n word-wrap: break-word;\n font-size: 9pt;\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\" ]);\n\n\t\n\n return reportData;\n}","JsHelpers":"//Register custom Handlebars helpers here to use in your report script\n//https://handlebarsjs.com/guide/#custom-helpers\nHandlebars.registerHelper('loud', function (aString) {\n return aString.toUpperCase()\n})","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/z_custom date time format Helpers.ayrt b/server/AyaNova/resource/rpt/stock-report-templates/z_custom date time format Helpers.ayrt new file mode 100644 index 00000000..26da9efb --- /dev/null +++ b/server/AyaNova/resource/rpt/stock-report-templates/z_custom date time format Helpers.ayrt @@ -0,0 +1 @@ +{"Name":"z_custom date time format Helpers","Active":true,"Notes":"examples of custom Helpers to format date and date/time data fields","Roles":50538,"AType":34,"IncludeWoItemDescendants":false,"Template":"\n\n\n\t

Example: custom formatted date time helpers

\n\t

Below shows example of each {{ayT 'WorkOrder'}}'s {{ayT 'WorkOrderServiceDate'}} in various formats:

\n\n\t{{#each ayReportData}}\n\t\n\t\t\n\t\t\t\n\t\t\t\t\n\t\t\t\n\t\t\n\t\t\n\t\t\t\n\t\t\t\t\n\t\t\t\t\n\t\t\t\n\n\t\t\t\n\t\t\t\t\n\t\t\t\n\t\t\t\n\t\t\t\t\n\t\t\t\t\n\t\t\t\t\n\t\t\t\n\t\t\t\n\t\t\t\t\n\t\t\t\t\n\t\t\t\t\n\t\t\t\n\t\t\t\n\t\t\t\t\n\t\t\t\t\n\t\t\t\t\n\t\t\t\n\n\t\t\t\n\t\t\t\t\n\t\t\t\n\t\t\t\n\t\t\t\t\n\t\t\t\t\n\t\t\t\t\n\t\t\t\n\t\t\t\n\t\t\t\t\n\t\t\t\t\n\t\t\t\t\n\t\t\t\n\t\t\t\n\t\t\t\t\n\t\t\t\t\n\t\t\t\t\n\t\t\t\n\t\t\t\n\t\t\t\t\n\t\t\t\t\n\t\t\t\t\n\t\t\t\n\t\t\t\n\t\t\t\t\n\t\t\t\t\n\t\t\t\t\n\t\t\t\n\t\t\t\n\t\t\t\t\n\t\t\t\t\n\t\t\t\t\n\t\t\t\n\t\t\n\t
{{ayT 'WorkOrder'}} {{ Serial }}
The raw UTC / GMT AyaNova stored value from server:{{ServiceDate}}
Available Built in helpers:
 ayDateTime helper:{{ ayDateTime ServiceDate}}
 ayDate helper:{{ ayDate ServiceDate}}
 ayTime helper:{{ ayTime ServiceDate}}
Custom helpers in this report template:
 myDateTime custom helper:{{ myDateTime ServiceDate}}
 myDate custom helper:{{ myDate ServiceDate}}
 myTime custom helper:{{ myTime ServiceDate}}
 myDateTimeAustralia custom helper:{{ myDateTimeAustralia ServiceDate}}
 myDateTimeArabic custom helper:{{ myDateTimeArabic ServiceDate}}
 myDateTimeFromParts custom helper: {{ myDateTimeFromParts ServiceDate}}
\n\t
\n\t{{/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: 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}\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 await ayGetTranslations([\"WorkOrderServiceDate\", \"WorkOrder\" ]);\n\n return reportData;\n}","JsHelpers":"//////////////////////////////////// /////////////////////////////\n// \n// CUSTOM DATE AND TIME HELPER\n//\nHandlebars.registerHelper('myDateTime', 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 && !isNaN(parsedDate))) {\n return \"not valid\";\n }\n\n //Use built in toLocaleString method to format the date and time\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/toLocaleString\n return parsedDate.toLocaleString(\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 timeStyle: \"long\",\n hour12: AYMETA.ayClientMetaData.Hour12 //Use User setting for 12/24 hour clock\n }\n );\n});\n\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 && !isNaN(parsedDate))) {\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\n\n/////////////////////////////////////////////////////////////////\n//\n// CUSTOM TIME HELPER\n//\nHandlebars.registerHelper('myTime', 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 && !isNaN(parsedDate))) {\n return \"not valid\";\n }\n\n //Use built in toLocaleTimeString method to format the date and time\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/toLocaleString\n return parsedDate.toLocaleTimeString(\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 timeStyle: \"long\",//display the time zone used \n hour12: AYMETA.ayClientMetaData.Hour12 //Use User setting for 12/24 hour clock\n }\n );\n});\n\n\n/////////////////////////////////////////////////////////////////\n//\n// CUSTOM DATE AND TIME HELPER WITH AUSTRALIAN OPTIONS\n//\nHandlebars.registerHelper('myDateTimeAustralia', 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 && !isNaN(parsedDate))) {\n return \"not valid\";\n }\n\n //Use built in toLocaleString method to format the date and time\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/toLocaleString \n return parsedDate.toLocaleString(\n \"en-au\",//use English-Australia locale (Day / Month / Year is Australia default format)\n {\n timeZone: \"Australia/Sydney\",//use forced time zone, see \"tz database\" column for name in list here: https://en.wikipedia.org/wiki/List_of_tz_database_time_zones\n // timeZoneName: \"long\",//display the time zone used - AS OF alpha.109 unable to use this?\n dateStyle: \"short\",\n timeStyle: \"long\"\n }\n );\n});\n\n\n\n/////////////////////////////////////////////////////////////////\n//\n// CUSTOM DATE AND TIME HELPER WITH Arabic OPTIONS \n//\nHandlebars.registerHelper('myDateTimeArabic', 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 && !isNaN(parsedDate))) {\n return \"not valid\";\n }\n\n //Use built in toLocaleString method to format the date and time\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/toLocaleString \n return parsedDate.toLocaleString(\n \"ar-EG\",//use Arabic locale \n {\n timeZone: \"Asia/Dubai\",//use forced time zone, see \"tz database\" column for name in list here: https://en.wikipedia.org/wiki/List_of_tz_database_time_zones\n // timeZoneName: \"short\",//display the time zone used \n dateStyle: \"short\",\n timeStyle: \"long\"\n }\n );\n});\n\n/////////////////////////////////////////////////////////////////\n//\n// CUSTOM FORMAT TO PARTS HELPER\n// this offers the most control over the return format\n// Locale aware conversion to parts that can be returned in any format\n//\nHandlebars.registerHelper('myDateTimeFromParts', function (value) {\n if (!value) {\n return \"\";\n }\n\n //parse the date\n let parsedDate = new Date(value);\n //is it a valid date?\n if (!(parsedDate instanceof Date && !isNaN(parsedDate))) {\n return \"not valid\";\n }\n\n //Set formatter options\n //https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Intl/DateTimeFormat/formatToParts\n let formatter = new Intl.DateTimeFormat('en-us', {\n weekday: 'long',\n year: 'numeric',\n month: 'numeric',\n day: 'numeric',\n hour: 'numeric',\n minute: 'numeric',\n second: 'numeric',\n fractionalSecondDigits: 3,\n hour12: true,\n timeZone: 'UTC'\n });\n\n let parts = formatter.formatToParts(parsedDate);\n /*\n // parts example return value: \n [ \n { type: 'weekday', value: 'Monday' }, \n { type: 'literal', value: ', ' }, \n { type: 'month', value: '12' }, \n { type: 'literal', value: '/' }, \n { type: 'day', value: '17' }, \n { type: 'literal', value: '/' }, \n { type: 'year', value: '2012' }, \n { type: 'literal', value: ', ' }, \n { type: 'hour', value: '3' }, \n { type: 'literal', value: ':' }, \n { type: 'minute', value: '00' }, \n { type: 'literal', value: ':' }, \n { type: 'second', value: '42' }, \n { type: 'fractionalSecond', value: '000' },\n { type: 'literal', value: ' ' }, \n { type: 'dayPeriod', value: 'AM' } \n ]\n */\n\n let partWeekDay = parts.find(({ type }) => type === 'weekday').value;\n let partDay = parts.find(({ type }) => type === 'day').value;\n let partYear = parts.find(({ type }) => type === 'year').value;\n \n //return in some custom format\n return `DAY:${partWeekDay}-${partDay} YEAR: ${partYear}`;\n //return this instead to see the actual return array\n //return JSON.stringify(parts);\n});","RenderType":0,"HeaderTemplate":"                Printed date: PDFDate\nPage of                ","FooterTemplate":"  ","DisplayHeaderFooter":true,"PaperFormat":10,"Landscape":false,"MarginOptionsBottom":"10mm","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/z_custom fields.ayrt b/server/AyaNova/resource/rpt/stock-report-templates/z_custom fields.ayrt new file mode 100644 index 00000000..fb5f915c --- /dev/null +++ b/server/AyaNova/resource/rpt/stock-report-templates/z_custom fields.ayrt @@ -0,0 +1 @@ +{"Name":"z_custom fields","Active":true,"Notes":"example of using AyaNova provided Helpers to format custom fields - requires the object to have custom fields enabled\n","Roles":50538,"AType":34,"IncludeWoItemDescendants":false,"Template":"\n\n\n
\n

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

\n\n\n {{#each ayReportData}}\n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n {{#each Items}}\n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n {{#each Units}}\n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n {{/each}}\n {{/each}} \n \n
{{ayT 'WorkOrder'}} {{ayT 'WorkOrderServiceNumber'}}{{ Serial }}
 
{{ayT 'WorkOrder'}} {{ayT 'WorkOrderCustom1'}} displayed with no additional formating{{ CustomFields.c1 }}
 
{{ayT 'WorkOrder'}} {{ayT 'WorkOrderCustom2'}} displayed with no additional formating{{ CustomFields.c2 }}
If {{ayT 'WorkOrderCustom2'}} has {{ayT 'ObjectCustomFieldFieldType'}} of DateTime, shows with additional formating via ayDateTime{{ ayDateTime CustomFields.c2 }}
 
{{ayT 'WorkOrder'}} {{ayT 'WorkOrderCustom3'}} displayed with no additional formating{{ CustomFields.c3 }}
If {{ayT 'WorkOrderCustom3'}} has {{ayT 'ObjectCustomFieldFieldType'}} of Money, shows with additional formating via ayCurrency{{ayCurrency CustomFields.c3 }}
 
 {{ayT 'WorkOrderItem'}} {{ayT 'WorkOrderItemSummary'}}{{Notes}}
 {{ayT 'WorkOrderItem'}} {{ayT 'WorkOrderItemCustom1'}} displayed with no additional formating{{CustomFields.c1}}
 
 {{ayT 'WorkOrderItem'}} {{ayT 'WorkOrderItemCustom2'}} displayed with no additional formating{{CustomFields.c2}}
 If {{ayT 'WorkOrderItemCustom2'}} has {{ayT 'ObjectCustomFieldFieldType'}} of DateTime, shows with additional formating via ayDateTime{{ayDateTime CustomFields.c2}}
 
 {{ayT 'WorkOrderItem'}} {{ayT 'WorkOrderItemCustom3'}} displayed with no additional formating{{CustomFields.c3}}
 If {{ayT 'WorkOrderItemCustom3'}} has {{ayT 'ObjectCustomFieldFieldType'}} of Money, shows with additional formating via ayCurrency{{ayCurrency CustomFields.c3}}
 
 {{ayT 'WorkOrderItemUnit'}}{{UnitViz}} - {{UnitModelNameViz}}
 {{ayT 'WorkOrderItemUnit'}} {{ayT 'WorkOrderItemUnitCustom1'}} displayed with no additional formating{{CustomFields.c1}}
 
 {{ayT 'WorkOrderItemUnit'}} {{ayT 'WorkOrderItemUnitCustom2'}} displayed with no additional formating{{CustomFields.c2}}
 If {{ayT 'WorkOrderItemCustom2'}} has {{ayT 'ObjectCustomFieldFieldType'}} of DateTime, shows with additional formating via ayDateTime{{ayDateTime CustomFields.c2}}
 
 {{ayT 'WorkOrderItemUnit'}} {{ayT 'WorkOrderItemUnitCustom3'}} displayed with no additional formating{{CustomFields.c3}}
 If {{ayT 'WorkOrderItemUnit'}} has {{ayT 'ObjectCustomFieldFieldType'}} of Money, shows with additional formating via ayCurrency{{ayCurrency CustomFields.c3}}
 
\n {{/each}}\n
\n\n\n\n","Style":"/* if not using a rule set or specific property it is recommended to comment out or delete fully for report performance*/\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: 8pt;\n width: 100%;\n }\n\n\nth {\n height: 20px;\n color: #9e9e9e;\n}\n\ntbody tr {\n height: 5px;\n word-wrap: break-word;\n}\n\ntbody tr:nth-child(even) {\n background-color: #f8f8f8; /* MUST checkmark Print background in PDF Options for this to show */\n}\n\n.fontgreen {\n color: green;\n}\n.fontblue {\n color: blue;\n}\n.fontred {\n color:red;\n}\n\n\n.rightlean {\n text-align: right;\n}\n.leftlean {\n text-align: left;\n}\n.centerlean {\n text-align: center;\n}","JsPrerender":"async function ayPrepareData(reportData){ \n //this function (if present) is called with the report data \n //before the report is rendered\n //modify data as required here and return it to change the data before the report renders\n //see the help documentation for details\n\n\tawait ayGetTranslations([ \"ObjectCustomFieldFieldType\", \"WorkOrder\", \"WorkOrderServiceNumber\", \"WorkOrderCustom1\", \"WorkOrderCustom2\",\"WorkOrderCustom3\", \"WorkOrderItemSummary\", \"WorkOrderItem\", \"WorkOrderItemCustom1\", \"WorkOrderItemCustom2\", \"WorkOrderItemCustom3\", \"WorkOrderItemUnit\", \"WorkOrderItemUnitCustom1\", \"WorkOrderItemUnitCustom2\", \"WorkOrderItemUnitCustom3\" ]);\n\n\n\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 && !isNaN(parsedDate))) {\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":true,"PaperFormat":10,"Landscape":false,"MarginOptionsBottom":"15mm","MarginOptionsLeft":"15mm","MarginOptionsRight":"10mm","MarginOptionsTop":"10mm","PageRanges":null,"PreferCSSPageSize":false,"PrintBackground":true,"Scale":1.00000} \ No newline at end of file diff --git a/server/AyaNova/resource/rpt/stock-report-templates/z_footer forced to bottom of each page of multi-page work order.ayrt b/server/AyaNova/resource/rpt/stock-report-templates/z_footer forced to bottom of each page of multi-page work order.ayrt new file mode 100644 index 00000000..8c114765 --- /dev/null +++ b/server/AyaNova/resource/rpt/stock-report-templates/z_footer forced to bottom of each page of multi-page work order.ayrt @@ -0,0 +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 (EachWO of reportData.ayReportData) {\n for (Item of EachWO.Items) {\n for (Part of Item.Parts) {\n if (Part.Serials != null) {\n 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 (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 (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 (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 (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 (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 (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 (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 (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 && !isNaN(parsedDate))) {\n return \"not valid\";\n }\n\n //Use built in toLocaleDateString method to format the date\n //there are many options that change the displayed format documented here\n //https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Date/toLocaleDateString\n return parsedDate.toLocaleDateString(\n AYMETA.ayClientMetaData.LanguageName,//use Client browser default Language, change this setting here to force an alternative language\n {\n timeZone: AYMETA.ayClientMetaData.TimeZoneName,//use Client browser's default TimeZone, change this setting here to force a specific time zone\n dateStyle: \"long\"\n }\n );\n});\n\n","RenderType":0,"HeaderTemplate":" ","FooterTemplate":"          Printed date: \n   Page  of         ","DisplayHeaderFooter":false,"PaperFormat":10,"Landscape":false,"MarginOptionsBottom":"15mm","MarginOptionsLeft":"15mm","MarginOptionsRight":"10mm","MarginOptionsTop":"10mm","PageRanges":null,"PreferCSSPageSize":false,"PrintBackground":true,"Scale":1.00000} \ No newline at end of file diff --git a/server/AyaNova/resource/rpt/stock-report-templates/z_if key value X show Y via custom Helpers.ayrt b/server/AyaNova/resource/rpt/stock-report-templates/z_if key value X show Y via custom Helpers.ayrt new file mode 100644 index 00000000..7c096f0a --- /dev/null +++ b/server/AyaNova/resource/rpt/stock-report-templates/z_if key value X show Y via custom Helpers.ayrt @@ -0,0 +1 @@ +{"Name":"z_if key value X show Y via custom Helpers","Active":true,"Notes":"example custom Helper if has tag X then show Y, else return something else like preset text\nexample custom Helper of how to correctly wrap output in a safestring as result of Helper if need to use CSS styling","Roles":50538,"AType":26,"IncludeWoItemDescendants":false,"Template":"\n\n\n\t
\n\t

Use of Custom Helpers to display specific aspects if {{ayT 'Tags'}} have a specific value

\n\t\n\t
\n\t\n\t\t{{#each ayReportData}}\n\t\t\n\t\t\t\n\t\t\t\t\n\t\t\t\t\t\t\n\t\t\t\n\t\t\t\t\n\t\t\t\t\n\t\t\t\n\t\t\t\n\t\t\t\t\n\t\t\t\t\n\t\t\t\n\t\t\t\n\t\t\t\t\n\t\t\t\t\n\t\t\t\n\t\t\t\n\t\t\t\t\n\t\t\t\t\n\t\t\t\n\t\t\t\n\t\t\t\t\n\t\t\t\t\n\t\t\t\n\t\t\t\n\t\t\t\t\n\t\t\t\t{{#if CustomFields.c1}} {{else}} {{/if}}\n\t\t\t\n\t\t\t{{#each Items}}\n\t\t\t\n\t\t\t\t\n\t\t\t\t{{#if QuantityReceived}} {{else}} {{/if}}\n\t\t\t\n\t\t\t{{/each}}\n\t\t\n\t\t{{/each}}\n\t
For {{ayT 'PurchaseOrderPONumber'}} {{ Serial }}
Using HTML5 mustache to display all {{ayT 'Tags'}} for this {{ayT 'PurchaseOrder'}}{{ Tags}}
Using HTML5 mustache to display ONLY the 1st {{ayT 'Tag'}} for this {{ayT 'PurchaseOrder'}} {{ayT 'Tags'}}{{ Tags.[0]}}
Custom Helper to display if has {{ayT 'Tag'}} 'gold':{{ isInTag Tags}}
Custom Helper to display if has {{ayT 'Tag'}} 'brown':{{ isInTag2 Tags}}
Custom Helper to display if has {{ayT 'Tag'}} 'green' will display using safestring call of the CSS styling fontgreen else displays safestring call of the CSS styling fontred:{{ isInTag3 Tags}}
HTML5 use of #if to display PO's CustomFields.c1 value with CSS fontgreen applied to the text, else will display fontred if is is false, undefined, null, \"\", 0, or []{{CustomFields.c1}}No value has been entered in Custom1 field for this PO
HTML5 use of #each for each POitem - #if to display text in fontred if QuantyReceived is false, undefined, null, \"\", 0, or [], else display in fontgreen{{ayT 'Part'}} {{PartNameViz}} {{ayT 'PurchaseOrderItemQuantityOrdered'}} = {{QuantityOrdered}}
{{ayT \"PurchaseOrderItemQuantityReceived\"}} value is {{QuantityReceived}}
{{ayT 'Part'}} {{PartNameViz}} {{ayT 'PurchaseOrderItemQuantityOrdered'}} = {{QuantityOrdered}}
{{ayT 'Part'}} {{PartNameViz}} {{QuantityReceived}} value is {{ayT \"PurchaseOrderItemQuantityReceived\"}}!
\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 color: #9e9e9e;\n text-align: center;\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: 50px;\n font-size: 11pt; \n color: #9e9e9e;\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}\n.fontblue {\n color: blue;\n}\n.fontred {\n color:red;\n}\n\n","JsPrerender":"async function ayPrepareData(ayData){ \n //this function (if present) is called with the report data \n //before the report is rendered\n //modify data as required here and return it to change the data before the report renders\n //see the help documentation for details\n\n await ayGetTranslations([\"Part\", \"PurchaseOrderItemQuantityReceived\", \"PurchaseOrderItemQuantityOrdered\", \"Tag\", \"Tags\", \"PurchaseOrderPONumber\", \"PurchaseOrder\" ]);\n\n return ayData;\n}","JsHelpers":"Handlebars.registerHelper('isInTag', function (Tags) \n{\n for (var i=0; i\" + \"THE TEXT green IS IN FOUND IN THE TAGS ARRAY FOR THIS PO!! See how this shows in greenfont!\" +\"

\"); //if want to use CSS styling, be sure to wrap in a safestring\n\t\t}\n }\n return new Handlebars.SafeString(\"

\" + 'NOPE, THE TEXT green ISN\\'T IN THE TAGS ARRAY FOR THIS PO' +\"

\"); //if don't want to return any element at all, comment this else aspect out fully\n});\n","RenderType":0,"HeaderTemplate":"                Printed date: PDFDate\nPage of                ","FooterTemplate":"  ","DisplayHeaderFooter":true,"PaperFormat":10,"Landscape":false,"MarginOptionsBottom":"15mm","MarginOptionsLeft":"10mm","MarginOptionsRight":"10mm","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/z_if key value is X show Y via custom Helpers Tags.ayrt b/server/AyaNova/resource/rpt/stock-report-templates/z_if key value is X show Y via custom Helpers Tags.ayrt new file mode 100644 index 00000000..736ccfc2 --- /dev/null +++ b/server/AyaNova/resource/rpt/stock-report-templates/z_if key value is X show Y via custom Helpers Tags.ayrt @@ -0,0 +1 @@ +{"Name":"z_if key value is X show Y via custom Helpers Tags","Active":true,"Notes":"example custom Helper if has tag X then show Y, else return something else like preset text\nexample custom Helper of how to correctly wrap output in a safestring as result of Helper if need to use CSS styling","Roles":50538,"AType":34,"IncludeWoItemDescendants":false,"Template":"\n\n\n\t
\n\t

Use of Custom Helpers to display specific aspects if {{ayT 'Tags'}} have a specific value

\n\t\n\t
\n\t\n\t\t{{#each ayReportData}}\n\t\t\n\t\t\t\n\t\t\t\t\n\t\t\t\t\t\t\n\t\t\t\n\t\t\t\t\n\t\t\t\t\n\t\t\t\n\t\t\t\n\t\t\t\t\n\t\t\t\t\n\t\t\t\n\t\t\t\n\t\t\t\t\n\t\t\t\t\n\t\t\t\n\t\t\t\n\t\t\t\t\n\t\t\t\t\n\t\t\t\n\t\t\t\n\t\t\t\t\n\t\t\t\t\n\t\t\t\n\t\t\t\n\t\t\t\t\n\t\t\t\t{{#if CustomFields.c1}} {{else}} {{/if}}\n\t\t\t\n\t\t\t{{#each Items}}\n\t\t\t\t{{#each Parts}}\n\t\t\t\t\n\t\t\t\t\t\n\t\t\t\t\t{{#if Serials}} {{else}} {{/if}}\n\t\t\t\t\n\t\t\t\t{{/each}}\n\t\t\t{{/each}}\n\t\t\n\t\t{{/each}}\n\t
For {{ayT 'WorkOrder'}} {{ Serial }}
Using HTML5 mustache to display all {{ayT 'Tags'}} for this {{ayT 'WorkOrder'}}{{ Tags}}
Using HTML5 mustache to display ONLY the 1st {{ayT 'Tag'}} for this {{ayT 'WorkOrder'}} {{ayT 'Tags'}}{{ Tags.[0]}}
Custom Helper to display if has {{ayT 'Tag'}} 'gold':{{ isInTag Tags}}
Custom Helper to display if has {{ayT 'Tag'}} 'brown':{{ isInTag2 Tags}}
Custom Helper to display if has {{ayT 'Tag'}} 'green' will display using safestring call of the CSS styling fontgreen, else displays safestring call of the CSS styling fontred:{{ isInTag3 Tags}}
HTML5 use of #if to display WO's CustomFields.c1 value with CSS fontgreen applied to the text, else will display fontred if is is false, undefined, null, \"\", 0, or []{{CustomFields.c1}}No value has been entered in {{ayT 'WorkOrderCustom1'}} field for this {{ayT 'WorkOrder'}}
HTML5 use of #each for each WorkOrderItemPart record - #if to display text in fontred if Serials value is false, undefined, null, \"\", 0, or [], else display value in fontgreen{{ayT 'Part'}} {{PartNameViz}} {{ayT 'WorkOrderItemPartPartSerialID'}} = {{Serials}}{{ayT 'Part'}} {{PartNameViz}} has no {{ayT 'WorkOrderItemPartPartSerialID'}}!
\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 color: #9e9e9e;\n text-align: center;\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: 50px;\n font-size: 11pt; \n color: #9e9e9e;\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}\n.fontblue {\n color: blue;\n}\n.fontred {\n color:red;\n}\n\n","JsPrerender":"async function ayPrepareData(ayData){ \n //this function (if present) is called with the report data \n //before the report is rendered\n //modify data as required here and return it to change the data before the report renders\n //see the help documentation for details\n\n await ayGetTranslations([\"Part\", \"WorkOrderItemPartPartSerialID\", \"Tag\", \"Tags\", \"WorkOrderCustom1\", \"WorkOrder\" ]);\n\n return ayData;\n}","JsHelpers":"Handlebars.registerHelper('isInTag', function (Tags) \n{\n for (var i=0; i\" + \"THE TEXT green IS IN FOUND IN THE TAGS ARRAY FOR THIS WO!! See how this shows in greenfont!\" +\"

\"); //if want to use CSS styling, be sure to wrap in a safestring\n\t\t}\n }\n return new Handlebars.SafeString(\"

\" + 'NOPE, THE TEXT green ISN\\'T IN THE TAGS ARRAY FOR THIS WO' +\"

\"); //if don't want to return any element at all, comment this else aspect out fully\n});\n","RenderType":0,"HeaderTemplate":"                Printed date: PDFDate\nPage of                ","FooterTemplate":"  ","DisplayHeaderFooter":true,"PaperFormat":10,"Landscape":false,"MarginOptionsBottom":"15mm","MarginOptionsLeft":"10mm","MarginOptionsRight":"10mm","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/EXAMPLE myData ServerInfo .ayrt b/server/AyaNova/resource/rpt/stock-report-templates/z_myData ServerInfo .ayrt similarity index 100% rename from server/AyaNova/resource/rpt/stock-report-templates/EXAMPLE myData ServerInfo .ayrt rename to server/AyaNova/resource/rpt/stock-report-templates/z_myData ServerInfo .ayrt diff --git a/server/AyaNova/resource/rpt/stock-report-templates/EXAMPLE myData search results.ayrt b/server/AyaNova/resource/rpt/stock-report-templates/z_myData search results.ayrt similarity index 51% rename from server/AyaNova/resource/rpt/stock-report-templates/EXAMPLE myData search results.ayrt rename to server/AyaNova/resource/rpt/stock-report-templates/z_myData search results.ayrt index 010225e6..434ec7fc 100644 --- a/server/AyaNova/resource/rpt/stock-report-templates/EXAMPLE myData search results.ayrt +++ b/server/AyaNova/resource/rpt/stock-report-templates/z_myData search results.ayrt @@ -1 +1 @@ -{"Name":"z_myData search results","Active":true,"Notes":"Examples of obtaining custom search results using custom Prepare ","Roles":50538,"AType":34,"IncludeWoItemDescendants":false,"Template":"\n\n\n
\n\n
\n

myData.SearchResults - Fetched dynamically from API route enum-list/list/AyaType using report template's Prepare

\n

specifically, Prepare searches for the text \"Purple\" in any object in the database and returns....

\n

{{ayJSON myData.SearchResults}}

\n
\n \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 myData.SearchResults.data.searchResults}}\n \n \n \n \n \n \n \n {{/each}}\n\n
Column to the right displays the individual property myData.SearchResults.data.totalResultsFound obtained:{{ayJSON myData.SearchResults.data.totalResultsFound}}
Column to the right displays the third array in the search results:{{ayJSON myData.SearchResults.data.searchResults.[2]}}
 
Below displays each record that has the search result
NameTypeID
{{name}}{{type}}{{id}}
\n\n
\n\n","Style":".singlePage\n{\npage-break-after: always;\n}\n\np {\n word-wrap: break-word;\n font-size: 9pt;\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: 11pt; \n color: #9e9e9e;\n} \n\ntable, td, th {\n border: 1px solid black;\n}\n\ntable { \n white-space: pre-wrap;\n width: 100%;\n table-layout: fixed; /* the # of columns set in the first row of the thead will be fixed and applied throughout table and rows */\n }\n\nth {\n height: 30px;\n font-size: 9pt; \n color: #9e9e9e;\n}\n\ntd {\n padding: 10px;\n word-wrap: break-word;\n font-size: 9pt;\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\n //Put the data into the main report data object so it's available to the template\n reportData.myData={ServerInfo:await ayGetFromAPI(\"server-info\")};\n \n //Example API POST method to fetch data from api server\n let searchPostData={phrase: \"Purple\"};\n reportData.myData.SearchResults=await ayPostToAPI(\"search\", searchPostData);\n\n\t\n\n return reportData;\n}","JsHelpers":"//Register custom Handlebars helpers here to use in your report script\n//https://handlebarsjs.com/guide/#custom-helpers\nHandlebars.registerHelper('loud', function (aString) {\n return aString.toUpperCase()\n})","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":"z_myData search results","Active":true,"Notes":"Examples of obtaining custom search results using custom Prepare ","Roles":50538,"AType":34,"IncludeWoItemDescendants":false,"Template":"\n\n\n
\n\n
\n

myData.SearchResults - Fetched dynamically from API route enum-list/list/AyaType using report template's Prepare

\n

specifically, Prepare searches for the text \"Purple\" in any object in the database and returns....

\n

{{ayJSON myData.SearchResults}}

\n
\n \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 myData.SearchResults.data.searchResults}}\n \n \n \n \n \n \n \n {{/each}}\n\n
Column to the right displays the individual property myData.SearchResults.data.totalResultsFound obtained:{{ayJSON myData.SearchResults.data.totalResultsFound}}
Column to the right displays the third array in the search results:{{ayJSON myData.SearchResults.data.searchResults.[2]}}
 
Below displays each record that has the search result
NameTypeID
{{name}}{{type}}{{id}}
\n\n
\n\n","Style":".singlePage\n{\npage-break-after: always;\n}\n\np {\n word-wrap: break-word;\n font-size: 9pt;\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: 11pt; \n color: #9e9e9e;\n} \n\ntable, td, th {\n border: 1px solid black;\n}\n\ntable { \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\ntd {\n padding: 10px;\n word-wrap: break-word;\n font-size: 9pt;\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\n //Put the data into the main report data object so it's available to the template\n reportData.myData={ServerInfo:await ayGetFromAPI(\"server-info\")};\n \n //Example API POST method to fetch data from api server\n let searchPostData={phrase: \"Purple\"};\n reportData.myData.SearchResults=await ayPostToAPI(\"search\", searchPostData);\n\n\t\n\n return reportData;\n}","JsHelpers":"//Register custom Handlebars helpers here to use in your report script\n//https://handlebarsjs.com/guide/#custom-helpers\nHandlebars.registerHelper('loud', function (aString) {\n return aString.toUpperCase()\n})","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/z_replace carriage return with space.ayrt b/server/AyaNova/resource/rpt/stock-report-templates/z_replace carriage return with space.ayrt index 0a536624..757903e7 100644 --- a/server/AyaNova/resource/rpt/stock-report-templates/z_replace carriage return with space.ayrt +++ b/server/AyaNova/resource/rpt/stock-report-templates/z_replace carriage return with space.ayrt @@ -1 +1 @@ -{"Name":"z_replace carriage return with space","Active":true,"Notes":"Example custom Prepare to replace carriage return with space for a specific key of this object ","Roles":124927,"AType":8,"IncludeWoItemDescendants":false,"Template":"\n\n\n\t
\n\t\t
\n\t\t\t

Custom Prepare to remove carriage returns in {{ayT 'CustomerNotes'}}

\n\t\t
\n\t\t\n\t\t\t\n\t\t\t\t\n\t\t\t\t\t\n\t\t\t\t\t\n\t\t\t\t\t\n\t\t\t\t\t\n\t\t\t\t\t\n\t\t\t\t\n\t\t\t\n\n\t\t\t\n\t\t\t\t{{#each ayReportData}}\n\t\t\t\t\n\t\t\t\t\t\n\t\t\t\t\t\n\t\t\t\t\t\n\t\t\t\t\t\n\t\t\t\t\t\n\t\t\t\t\n\t\t\t\t\n\t\t\t\t\t\n\t\t\t\t\n\t\t\t\t{{/each}}\n\t\t\t\n\t\t
{{ayT 'Customer'}} {{ayT 'CustomerNotes'}} Carriage returns removed in {{ayT 'CustomerNotes'}}
{{Name}} {{Notes}} {{NotesNoCarriage}}
 
\n\n\t\t\n {{#each ayReportData}}\n \n\t\t\t \t\n\t\t\t\t\t\n\t\t\t\t\n \n \n \n \n\t\t\t \n \n \n {{/each}}\n
 
This is a printout of the data returned from the Custom Prepare that this report now uses, each \"group\" is an object. Compare against the data that shows in the \"Sample Data\" when editing this report template.
{{ayJSON this}}
\n\t
\n\n","Style":"\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 text-align: center;\r\n color: #9e9e9e;\r\n} \r\n\r\n\r\ntable { \r\n table-layout: fixed; //setting this to fixed causes columns to be evenly spaced for the entire table regardless of cell content, and then colspan then \"works\" as expected\r\n font-family: 'Helvetica Neue', 'Helvetica', Helvetica, Arial, sans-serif;\r\n border-collapse: collapse;\r\n white-space: pre-wrap;\r\n font-size: 8pt;\r\n width: 100%;\r\n }\r\n\r\n\r\nth {\r\n height: 30px;\r\n text-align: left;\r\n color: #9e9e9e;\r\n}\r\n\r\n\r\ntbody tr {\r\n height: 10px;\r\n word-wrap: break-word;\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.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\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}","JsPrerender":"async function ayPrepareData(ayData){ \n\n await ayGetTranslations([ \"Customer\", \"CustomerNotes\" ]);\n\n //for each Customer, if the General Notes field is NOT null, creates a new key NotesNoCarriage and puts into it the text from Notes replacing ANY carriage returns with a space, so all text is on same line(s)\n for (EachCU of ayData.ayReportData) {\n if (EachCU.Notes != null) {\n n = EachCU.Notes;\n EachCU.NotesNoCarriage = n.replace(/[\\n\\r]+/g, ' ');\n }\n }\n\n return ayData;\n}","JsHelpers":"","RenderType":0,"HeaderTemplate":"                Printed date: PDFDate\nPage of                ","FooterTemplate":"  ","DisplayHeaderFooter":true,"PaperFormat":10,"Landscape":false,"MarginOptionsBottom":"20mm","MarginOptionsLeft":"15mm","MarginOptionsRight":"15mm","MarginOptionsTop":"15mm","PageRanges":null,"PreferCSSPageSize":false,"PrintBackground":true,"Scale":1.00000} \ No newline at end of file +{"Name":"z_replace carriage return with space","Active":true,"Notes":"Example custom Prepare to replace carriage return with space for a specific key of this object ","Roles":50538,"AType":8,"IncludeWoItemDescendants":false,"Template":"\n\n\n\t
\n\t\t
\n\t\t\t

Custom Prepare to remove carriage returns in {{ayT 'CustomerNotes'}}

\n\t\t
\n\t\t\n\t\t\t\n\t\t\t\t\n\t\t\t\t\t\n\t\t\t\t\t\n\t\t\t\t\t\n\t\t\t\t\t\n\t\t\t\t\t\n\t\t\t\t\n\t\t\t\n\n\t\t\t\n\t\t\t\t{{#each ayReportData}}\n\t\t\t\t\n\t\t\t\t\t\n\t\t\t\t\t\n\t\t\t\t\t\n\t\t\t\t\t\n\t\t\t\t\t\n\t\t\t\t\n\t\t\t\t\n\t\t\t\t\t\n\t\t\t\t\n\t\t\t\t{{/each}}\n\t\t\t\n\t\t
{{ayT 'Customer'}} {{ayT 'CustomerNotes'}} Carriage returns removed in {{ayT 'CustomerNotes'}}
{{Name}} {{Notes}} {{NotesNoCarriage}}
 
\n\n\t\t\n {{#each ayReportData}}\n \n\t\t\t \t\n\t\t\t\t\t\n\t\t\t\t\n \n \n \n \n\t\t\t \n \n \n {{/each}}\n
 
This is a printout of the data returned from the Custom Prepare that this report now uses, each \"group\" is an object instead of data from the \"Sample Data\".
{{ayJSON this}}
\n\t
\n\n","Style":"\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 text-align: center;\r\n color: #9e9e9e;\r\n} \r\n\r\n\r\ntable { \r\n table-layout: fixed; //setting this to fixed causes columns to be evenly spaced for the entire table regardless of cell content, and then colspan then \"works\" as expected\r\n font-family: 'Helvetica Neue', 'Helvetica', Helvetica, Arial, sans-serif;\r\n border-collapse: collapse;\r\n white-space: pre-wrap;\r\n font-size: 8pt;\r\n width: 100%;\r\n }\r\n\r\n\r\nth {\r\n height: 30px;\r\n text-align: left;\r\n color: #9e9e9e;\r\n}\r\n\r\n\r\ntbody tr {\r\n height: 10px;\r\n word-wrap: break-word;\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.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\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}","JsPrerender":"async function ayPrepareData(ayData){ \n\n await ayGetTranslations([ \"Customer\", \"CustomerNotes\" ]);\n\n //for each Customer, if the General Notes field is NOT null, creates a new key NotesNoCarriage and puts into it the text from Notes replacing ANY carriage returns with a space, so all text is on same line(s)\n for (EachCU of ayData.ayReportData) {\n if (EachCU.Notes != null) {\n n = EachCU.Notes;\n EachCU.NotesNoCarriage = n.replace(/[\\n\\r]+/g, ' ');\n }\n }\n\n return ayData;\n}","JsHelpers":"","RenderType":0,"HeaderTemplate":"                Printed date: PDFDate\nPage of                ","FooterTemplate":"  ","DisplayHeaderFooter":true,"PaperFormat":10,"Landscape":false,"MarginOptionsBottom":"20mm","MarginOptionsLeft":"15mm","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/z_report template name notes ayReportMetaData.ayrt b/server/AyaNova/resource/rpt/stock-report-templates/z_report template name notes ayReportMetaData.ayrt new file mode 100644 index 00000000..caf40309 --- /dev/null +++ b/server/AyaNova/resource/rpt/stock-report-templates/z_report template name notes ayReportMetaData.ayrt @@ -0,0 +1 @@ +{"Name":"z_report template name notes ayReportMetaData","Active":true,"Notes":"Examples of displaying ayReportMetaData data such as this report template's name, this report template's notes","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 \n \n \n \n \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 ServiceDate }}\n {{else}}{{/if}}\n \n \n \n \n \n\n
Column to the right displays all of your ayReportMetaData :{{ayJSON ../ayReportMetaData }}
Column to the right displays this report template's name as is - with the quotation marks:{{ayJSON ../ayReportMetaData.Name}}
Column to the right displays this report template's name:{{../ayReportMetaData.Name}}
Column to the right displays the notes for this report template:{{../ayReportMetaData.Notes}}
Column to the right displays where this report template is accessed from:{{../ayReportMetaData.AType}}
 
{{ayT 'WorkOrder'}}{{ayT 'Customer'}}{{ayT 'WorkOrderServiceDate'}}{{ayT 'Report'}} {{ayT 'ReportName'}}{{ayT 'ReportNotes'}}
{{Serial}}{{CustomerViz}}{{ayDate ServiceDate}}no Service Date specified{{../ayReportMetaData.Name}}{{ ../ayReportMetaData.Notes}}
\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: 11pt; \n color: #9e9e9e;\n} \n\ntable, td, th {\n border: 1px solid black;\n}\n\ntable { \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\ntd {\n padding: 10px;\n word-wrap: break-word;\n font-size: 9pt;\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\", \"ReportNotes\", \"ReportName\", \"Report\" ]);\n\n\t\n\n return reportData;\n}","JsHelpers":"//Register custom Handlebars helpers here to use in your report script\n//https://handlebarsjs.com/guide/#custom-helpers\nHandlebars.registerHelper('loud', function (aString) {\n return aString.toUpperCase()\n})","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/z_table layout parent child grandchild.ayrt b/server/AyaNova/resource/rpt/stock-report-templates/z_table layout parent child grandchild.ayrt new file mode 100644 index 00000000..81197443 --- /dev/null +++ b/server/AyaNova/resource/rpt/stock-report-templates/z_table layout parent child grandchild.ayrt @@ -0,0 +1 @@ +{"Name":"z_table layout parent child grandchild","Active":true,"Notes":"","Roles":50538,"AType":34,"IncludeWoItemDescendants":false,"Template":"\n\t\n\n\t

Examples within this report template of how to access showing parent (i.e. property of the Work Order) child (i.e. property of the Work Order Item) and grandchild (property of Labor) all on same row

\n\t\n\n\t\n\t\t\n\t\t\t\n\t\t\t\n\t\t\t\n\t\t\t\n\t\t\n\t\n\n\t{{#each ayReportData}}\n\t\t\n\t\t\t\n\t\t{{#each Items}} \n\t\t\t{{#each Labors}}\n\t\t\t\n\t\t\t\t\n\t\t\t\t\n\t\t\t\t\n\t\t\t\t\n\t\t\t\n\t\t\t{{/each}}\n\t\t{{/each}}\t\t\n\t\n\t{{/each}}\n\n\t\n\t\t\n\t\t\t\n\t\t\t\n\t\t\t\n\t\t\n\t\t\n\n\t
{{ayT 'WorkOrder'}} {{ayT 'WorkOrderItemWorkOrderStatusID'}}{{ayT 'WorkOrderItemLaborServiceStartDate'}}{{ayT 'AuthorizationRoleTech'}}
{{../../Serial}} {{../WorkOrderItemStatusNameViz}} {{ayDateTime ServiceStartDate}}{{UserViz}}
footer stuff 1expands across two columns with or without having to have textfooter stuff 3
\t\n\n\n","Style":".singlePage\n{\npage-break-after: always;\n}\n\n.footertext {\n font-size: 14pt;\n font-style: italic;\n background-color: lightsteelblue;\n}\n\nbody {\n font-family: 'Helvetica', 'Helvetica Neue', Arial, sans-serif; \n}\n\n\ntable { \n border-collapse: collapse;\n white-space: pre-wrap;\n width: 100%;\n table-layout: fixed; /* the # of columns set in the first row of the thead will be fixed and applied throughout table and rows */\n }\n\nth {\n border-bottom: solid 1pt #9e9e9e;\n height: 50px;\n color: #9e9e9e;\n font-size: 11pt;\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}\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 await ayGetTranslations([\"WorkOrder\", \"WorkOrderItemWorkOrderStatusID\", \"WorkOrderItemLaborServiceStartDate\", \"AuthorizationRoleTech\" ]);\n\n return reportData;\n}","JsHelpers":"//Register custom Handlebars helpers here to use in your report script\n//https://handlebarsjs.com/guide/#custom-helpers\nHandlebars.registerHelper('loud', function (aString) {\n return aString.toUpperCase()\n})","RenderType":0,"HeaderTemplate":"    Todays date:    set in PDF Options","FooterTemplate":"  set in PDF Options  Page  of     ","DisplayHeaderFooter":true,"PaperFormat":10,"Landscape":false,"MarginOptionsBottom":"15mm","MarginOptionsLeft":"10mm","MarginOptionsRight":"10mm","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/z_table layout parent child.ayrt b/server/AyaNova/resource/rpt/stock-report-templates/z_table layout parent child.ayrt new file mode 100644 index 00000000..3220ff8a --- /dev/null +++ b/server/AyaNova/resource/rpt/stock-report-templates/z_table layout parent child.ayrt @@ -0,0 +1 @@ +{"Name":"z_table layout parent child","Active":true,"Notes":"Example of displaying a Parent value (i.e. PO record) when the #each references a Child (i.e. POItem record), use a ../ in front of the Property name in the mustaches","Roles":124927,"AType":26,"IncludeWoItemDescendants":false,"Template":"\n\t\n\t\n\n\t\n\t\t\n\t\t\t\n\t\t\t\n\t\t\t\n\t\t\t\n\t\t\n\t\n\n\t{{#each ayReportData}}\n\t\t\n\t\t\t\n\t\t{{#each Items}} \n\t\t\t\n\t\t\t\t\n\t\t\t\t\n\t\t\t\t\n\t\t\t\t\n\t\t\t\n\t\t{{/each}}\t\t\n\t\n\t{{/each}}\n\n\t\n\t\t\n\t\t\t\n\t\t\t\n\t\t\t\n\t\t\n\t\t\n\n\t
column header 1 column header 2column header 3{{ayT 'PurchaseOrderItemSerialNumbers'}}
{{ayT 'PurchaseOrder'}} {{../Serial}} {{ayT 'PurchaseOrderItemPartNumber'}} {{PartNameViz}} {{ayT 'PurchaseOrderItemQuantityOrdered'}} {{QuantityOrdered}}{{Serials}}
footer stuff 1expands across two columns with or without having to have textfooter stuff 3
\t\n\n\n","Style":".singlePage\n{\npage-break-after: always;\n}\n\n.footertext {\n font-size: 14pt;\n font-style: italic;\n background-color: pink;\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 text-align: center;\n} \n\ntable { \n border-collapse: collapse;\n white-space: pre-wrap;\n width: 100%;\n table-layout: fixed; /* the # of columns set in the first row of the thead will be fixed and applied throughout table and rows */\n }\n\nth {\n border-bottom: solid 1pt #9e9e9e;\n height: 50px;\n font-size: 13pt; \n color: #9e9e9e;\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}\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 await ayGetTranslations([\"PurchaseOrder\", \"PurchaseOrderItemPartNumber\", \"PurchaseOrderItemQuantityOrdered\", \"PurchaseOrderItemSerialNumbers\" ]);\n\n return reportData;\n}","JsHelpers":"//Register custom Handlebars helpers here to use in your report script\n//https://handlebarsjs.com/guide/#custom-helpers\nHandlebars.registerHelper('loud', function (aString) {\n return aString.toUpperCase()\n})","RenderType":0,"HeaderTemplate":"    Todays date:    set in PDF Options","FooterTemplate":"  set in PDF Options  Page  of     ","DisplayHeaderFooter":true,"PaperFormat":10,"Landscape":false,"MarginOptionsBottom":"15mm","MarginOptionsLeft":"10mm","MarginOptionsRight":"10mm","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/EXAMPLE user logged in TimeZone Currency ayClientMetaData.ayrt b/server/AyaNova/resource/rpt/stock-report-templates/z_user logged in TimeZone Currency ayClientMetaData.ayrt similarity index 61% rename from server/AyaNova/resource/rpt/stock-report-templates/EXAMPLE user logged in TimeZone Currency ayClientMetaData.ayrt rename to server/AyaNova/resource/rpt/stock-report-templates/z_user logged in TimeZone Currency ayClientMetaData.ayrt index 0fabdff0..61dfa456 100644 --- a/server/AyaNova/resource/rpt/stock-report-templates/EXAMPLE user logged in TimeZone Currency ayClientMetaData.ayrt +++ b/server/AyaNova/resource/rpt/stock-report-templates/z_user logged in TimeZone Currency ayClientMetaData.ayrt @@ -1 +1 @@ -{"Name":"z_user logged in TimeZone Currency ayClientMetaData","Active":true,"Notes":"Examples of displaying ayClientMetaData data such as logged in username, TimeZone name, Currency name, PDFDate, PDFTime","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 \n \n \n \n \n \n \n \n \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 ServiceDate }}\n {{else}}{{/if}}\n \n \n \n \n \n\n
Column to the right displays all of your ayClientMetaData :{{ayJSON ../ayClientMetaData }}
Column to the right displays your AyaNova logged in user name as is - with the quotation marks:{{ayJSON ../ayClientMetaData.UserName}}
Column to the right displays your AyaNova logged in user name:{{../ayClientMetaData.UserName}}
Column to the right displays your TimeZone:{{../ayClientMetaData.TimeZoneName}}
Column to the right displays your logged in currency:{{../ayClientMetaData.CurrencyName}}
Column to the right displays your date and time:{{../ayClientMetaData.PDFDate}} {{../ayClientMetaData.PDFTime}}
 
{{ayT 'WorkOrder'}}{{ayT 'Customer'}}{{ayT 'WorkOrderServiceDate'}}{{ayT 'User'}}{{ayT 'DefaultLanguage'}}
{{Serial}}{{CustomerViz}}{{ayDate ServiceDate}}no Service Date specified{{../ayClientMetaData.UserName}}{{ ../ayClientMetaData.LanguageName}}
\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: 11pt; \n color: #9e9e9e;\n} \n\ntable, td, th {\n border: 1px solid black;\n}\n\ntable { \n white-space: pre-wrap;\n width: 100%;\n table-layout: fixed; /* the # of columns set in the first row of the thead will be fixed and applied throughout table and rows */\n }\n\nth {\n /* border-bottom: solid 1pt #9e9e9e; */\n height: 30px;\n font-size: 9pt; \n color: #9e9e9e;\n}\n\ntd {\n padding: 10px;\n word-wrap: break-word;\n font-size: 9pt;\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\", \"User\", \"DefaultLanguage\" ]);\n\n\t\n\n return reportData;\n}","JsHelpers":"//Register custom Handlebars helpers here to use in your report script\n//https://handlebarsjs.com/guide/#custom-helpers\nHandlebars.registerHelper('loud', function (aString) {\n return aString.toUpperCase()\n})","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":"z_user logged in TimeZone Currency ayClientMetaData","Active":true,"Notes":"Examples of displaying ayClientMetaData data such as logged in username, TimeZone name, Currency name, PDFDate, PDFTime","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 \n \n \n \n \n \n \n \n \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 ServiceDate }}\n {{else}}{{/if}}\n \n \n \n \n \n\n
Column to the right displays all of your ayClientMetaData :{{ayJSON ../ayClientMetaData }}
Column to the right displays your AyaNova logged in user name as is - with the quotation marks:{{ayJSON ../ayClientMetaData.UserName}}
Column to the right displays your AyaNova logged in user name:{{../ayClientMetaData.UserName}}
Column to the right displays your TimeZone:{{../ayClientMetaData.TimeZoneName}}
Column to the right displays your logged in currency:{{../ayClientMetaData.CurrencyName}}
Column to the right displays your date and time:{{../ayClientMetaData.PDFDate}} {{../ayClientMetaData.PDFTime}}
 
{{ayT 'WorkOrder'}}{{ayT 'Customer'}}{{ayT 'WorkOrderServiceDate'}}{{ayT 'User'}}{{ayT 'DefaultLanguage'}}
{{Serial}}{{CustomerViz}}{{ayDate ServiceDate}}no Service Date specified{{../ayClientMetaData.UserName}}{{ ../ayClientMetaData.LanguageName}}
\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: 11pt; \n color: #9e9e9e;\n} \n\ntable, td, th {\n border: 1px solid black;\n}\n\ntable { \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\ntd {\n padding: 10px;\n word-wrap: break-word;\n font-size: 9pt;\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\", \"User\", \"DefaultLanguage\" ]);\n\n\t\n\n return reportData;\n}","JsHelpers":"//Register custom Handlebars helpers here to use in your report script\n//https://handlebarsjs.com/guide/#custom-helpers\nHandlebars.registerHelper('loud', function (aString) {\n return aString.toUpperCase()\n})","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