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 new file mode 100644 index 00000000..96e45053 --- /dev/null +++ b/server/AyaNova/resource/rpt/stock-report-templates/Nets Taxes LineTotals for each PM Expense.ayrt @@ -0,0 +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 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 new file mode 100644 index 00000000..6048cc05 --- /dev/null +++ b/server/AyaNova/resource/rpt/stock-report-templates/Nets Taxes LineTotals for each PM Labor.ayrt @@ -0,0 +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 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 new file mode 100644 index 00000000..48c7bb1f --- /dev/null +++ b/server/AyaNova/resource/rpt/stock-report-templates/Nets Taxes LineTotals for each PM Loans.ayrt @@ -0,0 +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 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 new file mode 100644 index 00000000..9c32d104 --- /dev/null +++ b/server/AyaNova/resource/rpt/stock-report-templates/Nets Taxes LineTotals for each PM Part.ayrt @@ -0,0 +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 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 new file mode 100644 index 00000000..564b8ae4 --- /dev/null +++ b/server/AyaNova/resource/rpt/stock-report-templates/Nets Taxes LineTotals for each PM Travel.ayrt @@ -0,0 +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 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 new file mode 100644 index 00000000..e8ded64e --- /dev/null +++ b/server/AyaNova/resource/rpt/stock-report-templates/Nets Taxes LineTotals for each Quote Expense.ayrt @@ -0,0 +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 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 new file mode 100644 index 00000000..b24f6255 --- /dev/null +++ b/server/AyaNova/resource/rpt/stock-report-templates/Nets Taxes LineTotals for each Quote Labor.ayrt @@ -0,0 +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 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 new file mode 100644 index 00000000..931a7d64 --- /dev/null +++ b/server/AyaNova/resource/rpt/stock-report-templates/Nets Taxes LineTotals for each Quote Loans.ayrt @@ -0,0 +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 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 new file mode 100644 index 00000000..1e8d405c --- /dev/null +++ b/server/AyaNova/resource/rpt/stock-report-templates/Nets Taxes LineTotals for each Quote Part.ayrt @@ -0,0 +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 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 new file mode 100644 index 00000000..dc4a0117 --- /dev/null +++ b/server/AyaNova/resource/rpt/stock-report-templates/Nets Taxes LineTotals for each Quote Travel.ayrt @@ -0,0 +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 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 new file mode 100644 index 00000000..4028607b --- /dev/null +++ b/server/AyaNova/resource/rpt/stock-report-templates/Nets Taxes LineTotals for each WO Expense.ayrt @@ -0,0 +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 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 new file mode 100644 index 00000000..e43c4d20 --- /dev/null +++ b/server/AyaNova/resource/rpt/stock-report-templates/Nets Taxes LineTotals for each WO Labor.ayrt @@ -0,0 +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 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 new file mode 100644 index 00000000..29628464 --- /dev/null +++ b/server/AyaNova/resource/rpt/stock-report-templates/Nets Taxes LineTotals for each WO Loans.ayrt @@ -0,0 +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 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 new file mode 100644 index 00000000..6f1e7306 --- /dev/null +++ b/server/AyaNova/resource/rpt/stock-report-templates/Nets Taxes LineTotals for each WO Part.ayrt @@ -0,0 +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 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 new file mode 100644 index 00000000..49782dfd --- /dev/null +++ b/server/AyaNova/resource/rpt/stock-report-templates/Nets Taxes LineTotals for each WO Travel.ayrt @@ -0,0 +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 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 new file mode 100644 index 00000000..43ba1d10 --- /dev/null +++ b/server/AyaNova/resource/rpt/stock-report-templates/Outside Service via PMs.ayrt @@ -0,0 +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 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 new file mode 100644 index 00000000..fc57768d --- /dev/null +++ b/server/AyaNova/resource/rpt/stock-report-templates/Outside Service via Quotes.ayrt @@ -0,0 +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 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 new file mode 100644 index 00000000..e5afdb15 --- /dev/null +++ b/server/AyaNova/resource/rpt/stock-report-templates/Outside Service via Work Orders.ayrt @@ -0,0 +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 diff --git a/server/AyaNova/util/ReportProcessManager.cs b/server/AyaNova/util/ReportProcessManager.cs index 1a8de74c..e7a3d805 100644 --- a/server/AyaNova/util/ReportProcessManager.cs +++ b/server/AyaNova/util/ReportProcessManager.cs @@ -9,10 +9,8 @@ namespace AyaNova.Util //Track processes and kill any that go past their expiry date internal static class ReportRenderManager { - - //thread safe collection for unordered items, optimized for single thread produce/consume (which is the norm here) but supports multithread produce / consume (which is needed for separate cleanup job) - internal static ConcurrentBag _baginstances;// = new ConcurrentBag(); - + + internal static ConcurrentBag _baginstances; static ReportRenderManager() { @@ -34,7 +32,7 @@ namespace AyaNova.Util internal static void KillExpiredRenders(ILogger log) { - log.LogDebug("Clear potential expired render jobs check"); + log.LogTrace("Clear potential expired render jobs check"); //check for expired and remove var Instances = _baginstances.ToArray(); var dtNow = DateTime.UtcNow; @@ -42,9 +40,9 @@ namespace AyaNova.Util { if (i.Expires < dtNow) { -// #if (DEBUG) -// log.LogInformation($"DBG: KillExpiredRenders attempting kill of expired process {i.ReporterProcessId}"); -// #endif + + log.LogDebug($"attempting close of expired process {i.ReporterProcessId}"); + ForceCloseProcess(i, log); } } @@ -56,7 +54,7 @@ namespace AyaNova.Util try { var p = Process.GetProcessById(instance.ReporterProcessId); - + if (p != null) { //we have an existing process @@ -64,7 +62,7 @@ namespace AyaNova.Util p.Kill(true); if (p.HasExited == false) { - log.LogDebug($"Expired report render instance id {instance.ReporterProcessId} could not be force closed"); + log.LogWarning($"Expired report render instance id {instance.ReporterProcessId} could not be force closed"); return false;//can't kill it so can't free up a slot } } @@ -87,21 +85,14 @@ namespace AyaNova.Util internal static void AddProcess(int processId, DateTime expires, ILogger log) { - // #if (DEBUG) - // log.LogInformation($"DBG: RenderSlotAvailable::AddProcess {processId} in the bag"); - // #endif + log.LogTrace($"AddProcess - {processId} to the collection"); _baginstances.Add(new ReportRenderInstanceInfo(processId, expires)); - // #if (DEBUG) - // log.LogInformation($"DBG: RenderSlotAvailable::AddProcess, there are currently {_baginstances.Count} instances in the bag"); - // #endif + log.LogInformation($"AddProcess - there are currently {_baginstances.Count} instances in the collection"); } internal static void RemoveProcess(int processId, ILogger log) { - // #if (DEBUG) - // log.LogInformation($"DBG: RenderSlotAvailable::RemoveProcess {processId} from the bag"); - // #endif foreach (var i in _baginstances) { if (i.ReporterProcessId == processId)