From 5c2891fc84898b9a4361e659adf8d3f860e38f3c Mon Sep 17 00:00:00 2001 From: John Cardinal Date: Fri, 10 Dec 2021 00:58:06 +0000 Subject: [PATCH] Remove Alpha stock report templates in prep for adding production and example ones for Beta release --- ...109x EXAMPLE PO running total each POItem with PO Total.ayrt | 1 - .../109x EXAMPLE PO API use and meta data.ayrt | 1 - .../109x EXAMPLE PO Barcode using built in helper.ayrt | 1 - .../109x EXAMPLE PO Basic table layout .ayrt | 1 - .../stock-report-templates/109x EXAMPLE PO Custom fields.ayrt | 1 - .../stock-report-templates/109x EXAMPLE PO Wiki displayed.ayrt | 1 - .../109x EXAMPLE PO additional Today's Date Time Helpers.ayrt | 1 - ...PO comparing qty ordered to qty received for each poitem.ayrt | 1 - .../109x EXAMPLE PO custom date time format Helpers.ayrt | 1 - ...EXAMPLE PO show parent value AND child value on SAME row.ayrt | 1 - .../109x EXAMPLE PO show tags dependent on custom Helpers.ayrt | 1 - ...PLE PO showing ordered received including serial numbers.ayrt | 1 - .../109x EXAMPLE PO using #if, #unless and custom #if_eq.ayrt | 1 - .../stock-report-templates/109x EXAMPLE single line per PO.ayrt | 1 - .../112 EXAMPLE WO Invoice with derived Net and Grand Total.ayrt | 1 - ...2 EXAMPLE WO single line PROFIT_LOSS on net parts labors.ayrt | 1 - .../112 EXAMPLE WO single line per wo Nets NO TAXES .ayrt | 1 - .../112 EXAMPLE WO single line per wo Nets Taxes Totals.ayrt | 1 - .../112 unfinished WO Dispatch example.ayrt | 1 - .../Example Inventory Reconciliation Form Grouped By Tag.ayrt | 1 - .../Example Inventory Reconciliation Form.ayrt | 1 - .../Example PO Items Received vs Ordered.ayrt | 1 - ...e Parts grouped by Tags with optional filter by contains.ayrt | 1 - .../Example Parts with available serial numbers.ayrt | 1 - .../Example Purchase Order Detailed w Custom.c1 Shipping.ayrt | 1 - .../stock-report-templates/Example Purchase Order Detailed.ayrt | 1 - .../Example Purchase Order Summary single line per PO.ayrt | 1 - .../rpt/stock-report-templates/Example Units Per Customer .ayrt | 1 - ...ple Units Per Customer using built in Helper and Prepare.ayrt | 1 - .../stock-report-templates/Example Vendor Contact Report.ayrt | 1 - ...le Units with API method to get additional customer data.ayrt | 1 - .../Test API method to get customer data.ayrt | 1 - 32 files changed, 32 deletions(-) delete mode 100644 server/AyaNova/resource/rpt/stock-report-templates/109x EXAMPLE PO running total each POItem with PO Total.ayrt delete mode 100644 server/AyaNova/resource/rpt/stock-report-templates/109x EXAMPLE PO API use and meta data.ayrt delete mode 100644 server/AyaNova/resource/rpt/stock-report-templates/109x EXAMPLE PO Barcode using built in helper.ayrt delete mode 100644 server/AyaNova/resource/rpt/stock-report-templates/109x EXAMPLE PO Basic table layout .ayrt delete mode 100644 server/AyaNova/resource/rpt/stock-report-templates/109x EXAMPLE PO Custom fields.ayrt delete mode 100644 server/AyaNova/resource/rpt/stock-report-templates/109x EXAMPLE PO Wiki displayed.ayrt delete mode 100644 server/AyaNova/resource/rpt/stock-report-templates/109x EXAMPLE PO additional Today's Date Time Helpers.ayrt delete mode 100644 server/AyaNova/resource/rpt/stock-report-templates/109x EXAMPLE PO comparing qty ordered to qty received for each poitem.ayrt delete mode 100644 server/AyaNova/resource/rpt/stock-report-templates/109x EXAMPLE PO custom date time format Helpers.ayrt delete mode 100644 server/AyaNova/resource/rpt/stock-report-templates/109x EXAMPLE PO show parent value AND child value on SAME row.ayrt delete mode 100644 server/AyaNova/resource/rpt/stock-report-templates/109x EXAMPLE PO show tags dependent on custom Helpers.ayrt delete mode 100644 server/AyaNova/resource/rpt/stock-report-templates/109x EXAMPLE PO showing ordered received including serial numbers.ayrt delete mode 100644 server/AyaNova/resource/rpt/stock-report-templates/109x EXAMPLE PO using #if, #unless and custom #if_eq.ayrt delete mode 100644 server/AyaNova/resource/rpt/stock-report-templates/109x EXAMPLE single line per PO.ayrt delete mode 100644 server/AyaNova/resource/rpt/stock-report-templates/112 EXAMPLE WO Invoice with derived Net and Grand Total.ayrt delete mode 100644 server/AyaNova/resource/rpt/stock-report-templates/112 EXAMPLE WO single line PROFIT_LOSS on net parts labors.ayrt delete mode 100644 server/AyaNova/resource/rpt/stock-report-templates/112 EXAMPLE WO single line per wo Nets NO TAXES .ayrt delete mode 100644 server/AyaNova/resource/rpt/stock-report-templates/112 EXAMPLE WO single line per wo Nets Taxes Totals.ayrt delete mode 100644 server/AyaNova/resource/rpt/stock-report-templates/112 unfinished WO Dispatch example.ayrt delete mode 100644 server/AyaNova/resource/rpt/stock-report-templates/Example Inventory Reconciliation Form Grouped By Tag.ayrt delete mode 100644 server/AyaNova/resource/rpt/stock-report-templates/Example Inventory Reconciliation Form.ayrt delete mode 100644 server/AyaNova/resource/rpt/stock-report-templates/Example PO Items Received vs Ordered.ayrt delete mode 100644 server/AyaNova/resource/rpt/stock-report-templates/Example Parts grouped by Tags with optional filter by contains.ayrt delete mode 100644 server/AyaNova/resource/rpt/stock-report-templates/Example Parts with available serial numbers.ayrt delete mode 100644 server/AyaNova/resource/rpt/stock-report-templates/Example Purchase Order Detailed w Custom.c1 Shipping.ayrt delete mode 100644 server/AyaNova/resource/rpt/stock-report-templates/Example Purchase Order Detailed.ayrt delete mode 100644 server/AyaNova/resource/rpt/stock-report-templates/Example Purchase Order Summary single line per PO.ayrt delete mode 100644 server/AyaNova/resource/rpt/stock-report-templates/Example Units Per Customer .ayrt delete mode 100644 server/AyaNova/resource/rpt/stock-report-templates/Example Units Per Customer using built in Helper and Prepare.ayrt delete mode 100644 server/AyaNova/resource/rpt/stock-report-templates/Example Vendor Contact Report.ayrt delete mode 100644 server/AyaNova/resource/rpt/stock-report-templates/Sample Units with API method to get additional customer data.ayrt delete mode 100644 server/AyaNova/resource/rpt/stock-report-templates/Test API method to get customer data.ayrt diff --git a/server/AyaNova/resource/rpt/stock-report-templates/109x EXAMPLE PO running total each POItem with PO Total.ayrt b/server/AyaNova/resource/rpt/stock-report-templates/109x EXAMPLE PO running total each POItem with PO Total.ayrt deleted file mode 100644 index 0d738dbb..00000000 --- a/server/AyaNova/resource/rpt/stock-report-templates/109x EXAMPLE PO running total each POItem with PO Total.ayrt +++ /dev/null @@ -1 +0,0 @@ -{"Name":"💡 109x EXAMPLE PO running total each POItem with PO Total","Active":true,"Notes":"Custom Prepare example to gather running total for the PO and running total for ALL POs in this list\nHTML example using ayCurrency","Roles":124927,"AType":26,"IncludeWoItemDescendants":false,"Template":"\n\n\n\t{{#each ayReportData}} \n\t

PO: {{ Serial }}

\n\t\t{{#each Items}}\n\t\t

LineTotalViz: {{ ayCurrency LineTotalViz}}, RunningTotal: {{ ayCurrency PORunningTotal }}

\n\t\t{{/each}}\n\t

This PO total dollar amount: {{ ayCurrency ThisPODollarAmount }}

\n\t
\n\t\n\t{{/each}}\n

ALL POS: {{ayCurrency AllPORunningTotal}}

\n\n\n\n","Style":".example {\n color: blue;\n}","JsPrerender":"async function ayPrepareData(reportData) {\n //Example of both manipulating the reportData before rendering the report (by adding a running total field)\n //and adding a field to the overall data calculating the total dollar amount for all records\n\n //Declare a temporary variable to hold the running total\n \nlet AllPODollarAmount = 0;\n\n //Iterate through all the records in the reportData\n //adding the dollar amount of each item to the TotalDollarAmount variable\n for (EachPO of reportData.ayReportData) \n {\n let ThisPODollarAmount = 0;\n for (Item of EachPO.Items)\n {\n\n //make sure it has a value before attempting to add it to the running total\n if (Item.LineTotalViz != null) \n {\n ThisPODollarAmount += Item.LineTotalViz;\n }\n Item.PORunningTotal=ThisPODollarAmount;\n }\n EachPO.ThisPODollarAmount=ThisPODollarAmount;\n AllPODollarAmount += ThisPODollarAmount;\n }\n\n //Add the AllPODollarAmount variable to the reportData so it can be \n //accessed in the report template \n reportData.AllPORunningTotal=AllPODollarAmount;\n\n return reportData;\n}","JsHelpers":"//Register custom Handlebars helpers here to use in your report script\n//https://handlebarsjs.com/guide/#custom-helpers\nHandlebars.registerHelper('loud', function (aString) {\n return aString.toUpperCase()\n})","RenderType":0,"HeaderTemplate":null,"FooterTemplate":null,"DisplayHeaderFooter":false,"PaperFormat":10,"Landscape":false,"MarginOptionsBottom":null,"MarginOptionsLeft":null,"MarginOptionsRight":null,"MarginOptionsTop":null,"PageRanges":null,"PreferCSSPageSize":false,"PrintBackground":false,"Scale":1.00000} \ No newline at end of file diff --git a/server/AyaNova/resource/rpt/stock-report-templates/109x EXAMPLE PO API use and meta data.ayrt b/server/AyaNova/resource/rpt/stock-report-templates/109x EXAMPLE PO API use and meta data.ayrt deleted file mode 100644 index 4d3d6365..00000000 --- a/server/AyaNova/resource/rpt/stock-report-templates/109x EXAMPLE PO API use and meta data.ayrt +++ /dev/null @@ -1 +0,0 @@ -{"Name":"💡109x EXAMPLE PO API use and meta data","Active":true,"Notes":"","Roles":124927,"AType":26,"IncludeWoItemDescendants":false,"Template":"\n\n\n\t

Example: Meta data and API usage

\n\t

See help documentation for further details

\n\t\n\t
\n\t\t

ayServerMetaData - from the database

\n\t\t

If specify only the ayServerMetaData between mustashes, displays all this info:

\n\t\t

{{ ayJSON ayServerMetaData }}

\n\t\t\n\t
\n\t
\n\n\t
\n\t\t

ayClientMetaData - from the web browser you have used for this session

\n\t\t

If only specify ayClientMetaData between the mustaches then displays all this info (keys and values):

\n\t\t

{{ ayJSON ayClientMetaData }}

\n\t\t\n\t
\n\t
\n\n\t
\t\t\n\t\t

ayReportMetaData - from this report template

\n\t\t

If only specify ayReportMetaData between the mustashes then displays all this info (keys and values including array values):

\n\t\t

{{ ayJSON ayReportMetaData }}

\n\t\t\n\t
\n\t
\n\n\t
\n\t\t

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

\n\t\t

In this case, myData includes ServerInfo AND SearchResults

\n\t\t

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

If only specify myData (the name given via Prepare in this report template) between mustashes then displays all this info:

\n\t\t

{{ ayJSON myData }}

\n\t\t\n\t
\n\t
\n\t\n\t
\n\t\t

ayReportData - to display the PO Number value and the PO Notes value for each PO in the list:

\n\t\t{{#each ayReportData}}\n\t\t

PO#: {{ Serial }}

\n\t\t
Notes: {{ Notes }}
\n\t\t{{/each}}\n\t
\n\n\n","Style":".bluefont {\n color: blue;\n}\n\n.greenfont {\n color: green;\n}\n\nul[title]::before {\n content: attr(title);\n /* then add some nice styling as needed, eg: */\n font-weight: bold;\n}","JsPrerender":"async function ayPrepareData(reportData) {\n //this function (if present) is called with the report data \n //before the report is rendered\n //modify data as required here and return it to change the data before the report renders \n\n //Example of using API GET method to fetch data from API server and make it available to the report template\n\n //Put the data into the main report data object so it's available to the template\n reportData.myData={ServerInfo:await ayGetFromAPI(\"server-info\")};\n\n //Example API POST method to fetch data from api server\n let searchPostData={phrase: \"Purple\"};\n reportData.myData.SearchResults=await ayPostToAPI(\"search\", searchPostData);\n\n return reportData;\n}","JsHelpers":"//Register custom Handlebars helpers here to use in your report script\n//https://handlebarsjs.com/guide/#custom-helpers\nHandlebars.registerHelper('loud', function (aString) {\n return aString.toUpperCase()\n})","RenderType":0,"HeaderTemplate":null,"FooterTemplate":null,"DisplayHeaderFooter":false,"PaperFormat":10,"Landscape":false,"MarginOptionsBottom":"15mm","MarginOptionsLeft":"10mm","MarginOptionsRight":"10mm","MarginOptionsTop":"15mm","PageRanges":null,"PreferCSSPageSize":false,"PrintBackground":false,"Scale":1.00000} \ No newline at end of file diff --git a/server/AyaNova/resource/rpt/stock-report-templates/109x EXAMPLE PO Barcode using built in helper.ayrt b/server/AyaNova/resource/rpt/stock-report-templates/109x EXAMPLE PO Barcode using built in helper.ayrt deleted file mode 100644 index a6b994c2..00000000 --- a/server/AyaNova/resource/rpt/stock-report-templates/109x EXAMPLE PO Barcode using built in helper.ayrt +++ /dev/null @@ -1 +0,0 @@ -{"Name":"💡109x EXAMPLE PO Barcode using built in helper","Active":true,"Notes":"","Roles":124927,"AType":26,"IncludeWoItemDescendants":false,"Template":"\n\n\n\t

Example: Bar code helper

\n\t

See Report editor help documentation for details

\n\n\t{{#each ayReportData}}\n\tPO #: {{Serial}}\n\t
\n\t\tPO # as \"CODE-128\" BarCode:
\n\t\t{{ ayBC Serial '{ \"bcid\": \"code128\",\"includetext\":true, \"scale\":1}' }}\n\t
\n\t
\n\t
\n\t\tPO # as \"QR\" Code:
\n\t\t{{ ayBC Serial '{ \"bcid\": \"qrcode\",\"includetext\":true, \"scale\":3}' }}\n\t
\n\t
\n\t
\n\t\tSample \"UPC-A\" Code (PO # wouldn't be a valid UPC code so hard coded the numbers 712345678904 as example here):
\n\t\t{{ ayBC \"712345678904\" '{ \"bcid\": \"upca\",\"includetext\":true, \"scale\":1}' }}\n\t
\n\t
\n\t
\n\t
\n\t{{/each}}\n\n\n","Style":".example {\n color: blue;\n}","JsPrerender":"async function ayPrepareData(reportData){ \n //this function (if present) is called with the report data \n //before the report is rendered\n //modify data as required here and return it to change the data before the report renders\n //see the help documentation for details\n return reportData;\n}","JsHelpers":"//Register custom Handlebars helpers here to use in your report script\n//https://handlebarsjs.com/guide/#custom-helpers\nHandlebars.registerHelper('loud', function (aString) {\n return aString.toUpperCase()\n})","RenderType":0,"HeaderTemplate":null,"FooterTemplate":null,"DisplayHeaderFooter":false,"PaperFormat":10,"Landscape":false,"MarginOptionsBottom":null,"MarginOptionsLeft":null,"MarginOptionsRight":null,"MarginOptionsTop":null,"PageRanges":null,"PreferCSSPageSize":false,"PrintBackground":false,"Scale":1.00000} \ No newline at end of file diff --git a/server/AyaNova/resource/rpt/stock-report-templates/109x EXAMPLE PO Basic table layout .ayrt b/server/AyaNova/resource/rpt/stock-report-templates/109x EXAMPLE PO Basic table layout .ayrt deleted file mode 100644 index 87b314c1..00000000 --- a/server/AyaNova/resource/rpt/stock-report-templates/109x EXAMPLE PO Basic table layout .ayrt +++ /dev/null @@ -1 +0,0 @@ -{"Name":"💡109x EXAMPLE PO Basic table layout ","Active":true,"Notes":"example of displaying a Parent value when the #each references a Child, use a ../ in front of the Property name in the mustaches\nexample PDF Options Header & Footer; ","Roles":124927,"AType":26,"IncludeWoItemDescendants":false,"Template":"\n\t\n\t\t\t\n\t\n\t\t\n\t\t\t\n\t\t\t\n\t\t\t\n\t\t\t\n\t\t\n\t\n\t{{#each ayReportData}}\n\t\t\n\t\t\t\n\t\t{{#each Items}} \n\t\t\t\n\t\t\t\t\n\t\t\t\t\n\t\t\t\t\n\t\t\t\t\n\t\t\t\n\t\t{{/each}}\t\t\n\t\n\t{{/each}}\n\t\n\t\t\n\t\t\t\n\t\t\t\n\t\t\t\n\t\t\n\t\t\t\n\t
column header 1 column header 2column header 3column header 4
TBODY PO# {{../Serial}} TBODY Part #: {{PartNameViz}} TBODY Qty Ordered: {{QuantityOrdered}}TBODY Serials: {{Serials}}
footer stuff 1expands across two columns with or without having to have textfooter stuff 3
\t\t\n\n","Style":"table { \n font-family: 'Helvetica Neue', 'Helvetica', Helvetica, Arial, sans-serif;\n border-collapse: collapse;\n white-space: pre-wrap;\n font-size: 18pt;\n width: 100%;\n }\n\ntbody tr {\n width: 100%;\n}\n\ntbody tr:nth-child(even) {\n font-size: 10pt;\n background-color: lightgray; /* MUST checkmark Print background in PDF Options for this to show */\n} \ntbody tr:nth-child(odd) {\n font-size: 10pt;\n background-color: lightgoldenrodyellow; /* MUST checkmark Print background in PDF Options for this to show */\n} \n.footertext {\n font-size: 20pt;\n font-style: italic;\n background-color: pink;\n}\n\n.fontgreen {\n color: green;\n}","JsPrerender":"async function ayPrepareData(reportData){ \n //this function (if present) is called with the report data \n //before the report is rendered\n //modify data as required here and return it to change the data before the report renders\n //see the help documentation for details\n return reportData;\n}","JsHelpers":"//Register custom Handlebars helpers here to use in your report script\n//https://handlebarsjs.com/guide/#custom-helpers\nHandlebars.registerHelper('loud', function (aString) {\n return aString.toUpperCase()\n})","RenderType":0,"HeaderTemplate":"    Todays date:    set in PDF Options","FooterTemplate":"  set in PDF Options  Page  of     ","DisplayHeaderFooter":true,"PaperFormat":10,"Landscape":false,"MarginOptionsBottom":"15mm","MarginOptionsLeft":"10mm","MarginOptionsRight":"10mm","MarginOptionsTop":"15mm","PageRanges":null,"PreferCSSPageSize":false,"PrintBackground":true,"Scale":1.00000} \ No newline at end of file diff --git a/server/AyaNova/resource/rpt/stock-report-templates/109x EXAMPLE PO Custom fields.ayrt b/server/AyaNova/resource/rpt/stock-report-templates/109x EXAMPLE PO Custom fields.ayrt deleted file mode 100644 index f2c1113e..00000000 --- a/server/AyaNova/resource/rpt/stock-report-templates/109x EXAMPLE PO Custom fields.ayrt +++ /dev/null @@ -1 +0,0 @@ -{"Name":"💡109x EXAMPLE PO Custom fields","Active":true,"Notes":"example of using AyaNova provided Helpers to format custom fields","Roles":124927,"AType":26,"IncludeWoItemDescendants":false,"Template":"\n\n\n\t
\n\t\t

Example: custom fields usage

\n\t\t

See help documentation for details

\n\t\t
\n\t
\n\t
\n\t\t{{#each ayReportData}} \n\t\t

PO # (internal key is Serial, to indicate a unique number ): {{ Serial }}


\n\t\tTags (if any tags, otherwise will show blank if none): {{Tags}}
\n\t\t

Custom fields

\n\t\t

Custom field items can be accessed via the main object's CustomFields property and then by dot notation for each of the 16 possible custom fields as .c1 to .c16 \n\t\tIf a custom field is unused it will return a blank for that item.

\n\t\t

(note, example assumes generated sample data and that c1 and c5 have data)

\n\t\tCustom c1 as DateTime: {{ ayDateTime CustomFields.c1}}
\n\t\tcustom c5 as Number: {{ ayDecimal CustomFields.c5}}
\t\t\n\n\t\t\t{{#each Items}} \n\t\t\t

For each PO Item (non custom fields)

\t\n\t\t\tPurchaseOrderCost as is in database: {{ PurchaseOrderCost}}
\t\t\n\t\t\tPurchaseOrderCost as Decimal Number (defaults to three decimal places): {{ ayDecimal PurchaseOrderCost}}
\t\t\n\t\t\tPurchaseOrderCost as Currency: {{ ayCurrency PurchaseOrderCost}}
\t\t\t\n\t\t\t{{/each}} \n\t\t\t
\n\t\t{{/each}} \n\t\t
\n\n\t
\n\n\n\n","Style":".example {\n color: blue;\n}\n","JsPrerender":"async function ayPrepareData(reportData){ \n //this function (if present) is called with the report data \n //before the report is rendered\n //modify data as required here and return it to change the data before the report renders\n //see the help documentation for details\n return reportData;\n}","JsHelpers":"//Register custom Handlebars helpers here to use in your report script\n//https://handlebarsjs.com/guide/#custom-helpers\nHandlebars.registerHelper('loud', function (aString) {\n return aString.toUpperCase()\n})","RenderType":0,"HeaderTemplate":null,"FooterTemplate":null,"DisplayHeaderFooter":false,"PaperFormat":10,"Landscape":false,"MarginOptionsBottom":null,"MarginOptionsLeft":null,"MarginOptionsRight":null,"MarginOptionsTop":null,"PageRanges":null,"PreferCSSPageSize":false,"PrintBackground":false,"Scale":1.00000} \ No newline at end of file diff --git a/server/AyaNova/resource/rpt/stock-report-templates/109x EXAMPLE PO Wiki displayed.ayrt b/server/AyaNova/resource/rpt/stock-report-templates/109x EXAMPLE PO Wiki displayed.ayrt deleted file mode 100644 index 844fe386..00000000 --- a/server/AyaNova/resource/rpt/stock-report-templates/109x EXAMPLE PO Wiki displayed.ayrt +++ /dev/null @@ -1 +0,0 @@ -{"Name":"💡109x EXAMPLE PO Wiki displayed","Active":true,"Notes":"","Roles":124927,"AType":26,"IncludeWoItemDescendants":false,"Template":"\n\n\n\t

Example: WIKI / markdown field usage

\n\t

See help documentation for details

\n\n\t{{#each ayReportData}}\n\t

FOR PO# {{Serial}} from vendor: {{VendorViz}}

\n\t

Below is Wiki for above PO:

\n\t
\n\t{{ ayWiki Wiki }}\n\t
\n\t
\n\t{{/each}}\n\t\n\n\n","Style":".example {\n color: blue;\n}","JsPrerender":"async function ayPrepareData(reportData){ \n //this function (if present) is called with the report data \n //before the report is rendered\n //modify data as required here and return it to change the data before the report renders\n //see the help documentation for details\n return reportData;\n}","JsHelpers":"//Register custom Handlebars helpers here to use in your report script\n//https://handlebarsjs.com/guide/#custom-helpers\nHandlebars.registerHelper('loud', function (aString) {\n return aString.toUpperCase()\n})","RenderType":0,"HeaderTemplate":null,"FooterTemplate":null,"DisplayHeaderFooter":false,"PaperFormat":10,"Landscape":false,"MarginOptionsBottom":"15mm","MarginOptionsLeft":"15mm","MarginOptionsRight":"15mm","MarginOptionsTop":"15mm","PageRanges":null,"PreferCSSPageSize":false,"PrintBackground":true,"Scale":1.00000} \ No newline at end of file diff --git a/server/AyaNova/resource/rpt/stock-report-templates/109x EXAMPLE PO additional Today's Date Time Helpers.ayrt b/server/AyaNova/resource/rpt/stock-report-templates/109x EXAMPLE PO additional Today's Date Time Helpers.ayrt deleted file mode 100644 index e1580f78..00000000 --- a/server/AyaNova/resource/rpt/stock-report-templates/109x EXAMPLE PO additional Today's Date Time Helpers.ayrt +++ /dev/null @@ -1 +0,0 @@ -{"Name":"💡 109x EXAMPLE PO additional Today's Date Time Helpers","Active":true,"Notes":"example Custom Helpers to display todays date in different formats","Roles":124927,"AType":26,"IncludeWoItemDescendants":false,"Template":"\n\n\n\t
\n\t\t

Additional custom time date helpers

\n\t

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

\n\t

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

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

\n\t

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

\n\t

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

\n\t

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

\n\t
\n\n\n","Style":".example {\n color: blue;\n}","JsPrerender":"async function ayPrepareData(reportData){ \n //this function (if present) is called with the report data \n //before the report is rendered\n //modify data as required here and return it to change the data before the report renders\n //see the help documentation for details\n return reportData;\n}","JsHelpers":"//Register custom Handlebars helpers here to use in your report script\n//https://handlebarsjs.com/guide/#custom-helpers\n\n\nHandlebars.registerHelper('todaysDate', function() {\n var dt1=new Date();\n return dt1\n});// today's date with no formatting EXAMPLE SHOW: Wed Jun 09 2021 16:17:27 GMT-0700 (Pacific Daylight Time)\n\nHandlebars.registerHelper('todaysLocaleStringDate', function() {\n var dt2=new Date();\n return dt2.toLocaleDateString() \n});// today's date displayed in the localedatestring EXAMPLE SHOW: 09/06/2021\n\n\nHandlebars.registerHelper('todaysget', function() {\n var dt5 =new Date();\n var date = dt5.getFullYear()+'-'+(dt5.getMonth()+1)+'-'+dt5.getDate() + \" \" + +dt5.getHours() + \":\" + +dt5.getMinutes() ;\n return date\n});// today's date displayed EXAMPLE SHOW: 2021-6-9 16:17\n\n\nHandlebars.registerHelper('todaysMonthDDYYYYDate', function() {\n var dt3=new Date();\n return dt3.toLocaleDateString(\n AYMETA.ayClientMetaData.LanguageName,//use Client browser default Language, change this setting here to force an alternative language\n {\n timeZone: AYMETA.ayClientMetaData.TimeZoneName,//use Client browser's default TimeZone, change this setting here to force a specific time zone\n dateStyle: \"long\"\n }\n ) ;\n});// today's date displayed in MONTH DD, YYYY format EXAMPLE SHOW: June 9, 2021\n\n\n\n\n\n//\n// CUSTOM FORMAT TO PARTS HELPER\n// this offers the most control over the return format\n// Locale aware conversion to parts that can be returned in any format\n//\nHandlebars.registerHelper('todaysDateYearFromParts', function () {\n\n //parse todays date\n let parsedDate = new Date();\n\n //Set formatter options\n //https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Intl/DateTimeFormat/formatToParts\n let formatter = new Intl.DateTimeFormat('en-us', {\n weekday: 'long',\n year: 'numeric',\n month: 'long', //long to show the full name of month, short to show short name, numeric to show the month number\n day: 'numeric',\n hour: 'numeric',\n minute: 'numeric',\n second: 'numeric',\n fractionalSecondDigits: 3,\n hour12: true,\n timeZone: 'Canada/Pacific' //refer to https://en.wikipedia.org/wiki/List_of_tz_database_time_zones for appropriate TZ database name to use\n //OR use what is displayed in the output for your ayClientMetaData's TimeZoneName:\n });\n\n let parts = formatter.formatToParts(parsedDate);\n /*\n // parts example return value: \n [ \n { type: 'weekday', value: 'Monday' }, \n { type: 'literal', value: ', ' }, \n { type: 'month', value: '12' }, \n { type: 'literal', value: '/' }, \n { type: 'day', value: '17' }, \n { type: 'literal', value: '/' }, \n { type: 'year', value: '2012' }, \n { type: 'literal', value: ', ' }, \n { type: 'hour', value: '3' }, \n { type: 'literal', value: ':' }, \n { type: 'minute', value: '00' }, \n { type: 'literal', value: ':' }, \n { type: 'second', value: '42' }, \n { type: 'fractionalSecond', value: '000' },\n { type: 'literal', value: ' ' }, \n { type: 'dayPeriod', value: 'AM' } \n ]\n */\n//identify here which of the above will use when returning\n let partWeekDay = parts.find(({ type }) => type === 'weekday').value;\n let partDay = parts.find(({ type }) => type === 'day').value;\n let partMonth = parts.find(({ type }) => type === 'month').value;\n let partYear = parts.find(({ type }) => type === 'year').value;\n let partHour = parts.find(({ type }) => type === 'hour').value;\n let partMin = parts.find(({ type }) => type === 'minute').value;\n let partdayPeriod = parts.find(({ type }) => type === 'dayPeriod').value;\n\n\n \n //return in some custom format\n return `${partWeekDay} ${partDay}, ${partMonth} ${partYear} - ${partHour}:${partMin} ${partdayPeriod}`; // EXAMPLE SHOW Wednesday 9, June 2021 - 4:17 PM\n\n \n //return below instead to see array of the possible values for each type while initially figuring out what to customize to\n //return JSON.stringify(parts);\n});","RenderType":0,"HeaderTemplate":null,"FooterTemplate":null,"DisplayHeaderFooter":false,"PaperFormat":10,"Landscape":false,"MarginOptionsBottom":"10mm","MarginOptionsLeft":"10mm","MarginOptionsRight":"10mm","MarginOptionsTop":"10mm","PageRanges":null,"PreferCSSPageSize":false,"PrintBackground":true,"Scale":1.00000} \ No newline at end of file diff --git a/server/AyaNova/resource/rpt/stock-report-templates/109x EXAMPLE PO comparing qty ordered to qty received for each poitem.ayrt b/server/AyaNova/resource/rpt/stock-report-templates/109x EXAMPLE PO comparing qty ordered to qty received for each poitem.ayrt deleted file mode 100644 index e1c1af34..00000000 --- a/server/AyaNova/resource/rpt/stock-report-templates/109x EXAMPLE PO comparing qty ordered to qty received for each poitem.ayrt +++ /dev/null @@ -1 +0,0 @@ -{"Name":"💡109x EXAMPLE PO comparing qty ordered to qty received for each poitem","Active":true,"Notes":"example custom Helper if_eq to compare ordered to received, if same show in green. if NOT same, show in red.\nexample use of HTML if else /if - if serials present then show, else show preset text","Roles":124927,"AType":26,"IncludeWoItemDescendants":false,"Template":"\n\n\t\n\t\n \n \n \n \n \n \n \n \n \n \n {{#each ayReportData}}\n \n {{#each Items}} \n \n \n \n \n\n \n {{#if_eq QuantityOrdered QuantityReceived}} {{else}}{{/if_eq}}\n\t\t\t\t\t\n {{#if Serials}}{{else}}{{/if}}\n \n {{/each}}\n \n {{/each}}\n
PO#:Part#:QTY Ordered:QTY Received:Serials Received:
{{../Serial}} {{PartNameViz}} {{QuantityOrdered}}same as ordered {{QuantityReceived}}different than ordered {{QuantityReceived}}{{Serials}}no serials documented
\n\t\n\n","Style":".example {\n color: blue;\n}\n\ntable { \n font-family: 'Helvetica Neue', 'Helvetica', Helvetica, Arial, sans-serif;\n border-collapse: collapse;\n white-space: pre-wrap;\n font-size: 16pt;\n width: 100%;\n }\n\ntbody td {\n width: 20%; /* spans each column even width */\n}\n\ntbody tr:nth-child(even) {\n font-size: 10pt;\n background-color: lightgray; /* MUST checkmark Print background in PDF Options for this to show */\n} \ntbody tr:nth-child(odd) {\n font-size: 10pt;\n background-color: lightgoldenrodyellow; /* MUST checkmark Print background in PDF Options for this to show */\n} \n\n.fontgreen {\n color: green;\n}\n.fontblue {\n color: blue;\n}\n.fontred {\n color:red;\n}","JsPrerender":"async function ayPrepareData(reportData){ \n //this function (if present) is called with the report data \n //before the report is rendered\n //modify data as required here and return it to change the data before the report renders\n //see the help documentation for details\n return reportData;\n}","JsHelpers":"//Register custom Handlebars helpers here to use in your report script\n//https://handlebarsjs.com/guide/#custom-helpers\nHandlebars.registerHelper('loud', function (aString) {\n return aString.toUpperCase()\n})\n\n//custom helper so can do a direct comparison - i.e. if value equals xxxx, then show, else show yyyyy\n//note that this HAS to be added here in Helpers, is NOT built in\nHandlebars.registerHelper('if_eq', function(a, b, opts) {\n if(a == b) // Or === depending on your needs\n return opts.fn(this);\n else\n return opts.inverse(this);\n});\n","RenderType":0,"HeaderTemplate":null,"FooterTemplate":null,"DisplayHeaderFooter":false,"PaperFormat":10,"Landscape":false,"MarginOptionsBottom":"15mm","MarginOptionsLeft":"10mm","MarginOptionsRight":"10mm","MarginOptionsTop":"15mm","PageRanges":null,"PreferCSSPageSize":false,"PrintBackground":true,"Scale":1.00000} \ No newline at end of file diff --git a/server/AyaNova/resource/rpt/stock-report-templates/109x EXAMPLE PO custom date time format Helpers.ayrt b/server/AyaNova/resource/rpt/stock-report-templates/109x EXAMPLE PO custom date time format Helpers.ayrt deleted file mode 100644 index fca8c1b3..00000000 --- a/server/AyaNova/resource/rpt/stock-report-templates/109x EXAMPLE PO custom date time format Helpers.ayrt +++ /dev/null @@ -1 +0,0 @@ -{"Name":"💡109x EXAMPLE PO custom date time format Helpers","Active":true,"Notes":"examples of custom Helpers to format date and date/time data fields","Roles":124927,"AType":26,"IncludeWoItemDescendants":false,"Template":" \n\n\n\t

Example: custom formatted date time helpers

\n\t

Below shows example of each PO's OrderedDate in various formats:

\n\t
\n\t\n{{#each ayReportData}}\n\n\t\n\t\t\n\t\n\t\n\t\t\n\n\t\t\n\t\t\n\t\t\n\t\t\n\n\t\t\n\t\t\n\t\t\n\t\t\n\t\t\n\t\t\n\t\t\n\t\t\n\t\n
For PO#: {{ Serial }}
The raw UTC / GMT AyaNova stored value from server:{{ OrderedDate}}
Below as available Built in helpers
ayDateTime helper:{{ ayDateTime OrderedDate}}
ayDate helper:{{ ayDate OrderedDate}}
ayTime helper:{{ ayTime OrderedDate}}
Below are Custom helpers in this report template
myDateTime custom helper:{{ myDateTime OrderedDate}}
myDate custom helper:{{ myDate OrderedDate}}
myTime custom helper:{{ myTime OrderedDate}}
**NOTE the Helpers below as of alpha.109 no longer can set timeZoneName:
myDateTimeAustralia custom helper:{{ myDateTimeAustralia OrderedDate}}
myDateTimeArabic custom helper:{{ myDateTimeArabic OrderedDate}}
myDateTimeFromParts custom helper: {{ myDateTimeFromParts OrderedDate}}
\n
\n{{/each}}\n\n\n\n\n","Style":"table { \n font-family: 'Helvetica Neue', 'Helvetica', Helvetica, Arial, sans-serif;\n border-collapse: collapse;\n white-space: pre-wrap;\n font-size: 18pt;\n width: 100%;\n }\n\ntbody tr {\n width: 100%;\n}\n\ntbody tr:nth-child(even) {\n font-size: 10pt;\n background-color: lightgray; /* MUST checkmark Print background in PDF Options for this to show */\n} \ntbody tr:nth-child(odd) {\n font-size: 10pt;\n background-color: lightgoldenrodyellow; /* MUST checkmark Print background in PDF Options for this to show */\n} \n.footertext {\n font-size: 20pt;\n font-style: italic;\n background-color: pink;\n}\n\n.fontgreen {\n color: green;\n}\n.fontred {\n color: red;\n}\n.fontpurple {\n color: purple;\n}","JsPrerender":"async function ayPrepareData(reportData){ \n //this function (if present) is called with the report data \n //before the report is rendered\n //modify data as required here and return it to change the data before the report renders\n //see the help documentation for details\n return reportData;\n}","JsHelpers":"//////////////////////////////////// /////////////////////////////\n// \n// CUSTOM DATE AND TIME HELPER\n//\nHandlebars.registerHelper('myDateTime', function (value) {\n if (!value) {\n return \"\";\n }\n\n //parse the date \n let parsedDate = new Date(value);\n\n //is it a valid date?\n if (!(parsedDate instanceof Date && !isNaN(parsedDate))) {\n return \"not valid\";\n }\n\n //Use built in toLocaleString method to format the date and time\n //there are many options that change the displayed format documented here\n //https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Date/toLocaleString\n return parsedDate.toLocaleString(\n AYMETA.ayClientMetaData.LanguageName,//use Client browser default Language, change this setting here to force an alternative language\n {\n timeZone: AYMETA.ayClientMetaData.TimeZoneName,//use Client browser's default TimeZone, change this setting here to force a specific time zone\n dateStyle: \"long\",\n timeStyle: \"long\",\n hour12: AYMETA.ayClientMetaData.Hour12 //Use User setting for 12/24 hour clock\n }\n );\n});\n\n\n\n/////////////////////////////////////////////////////////////////\n//\n// CUSTOM DATE HELPER\n//\nHandlebars.registerHelper('myDate', function (value) {\n if (!value) {\n return \"\";\n }\n\n //parse the date\n let parsedDate = new Date(value);\n\n //is it a valid date?\n if (!(parsedDate instanceof Date && !isNaN(parsedDate))) {\n return \"not valid\";\n }\n\n //Use built in toLocaleDateString method to format the date\n //there are many options that change the displayed format documented here\n //https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Date/toLocaleDateString\n return parsedDate.toLocaleDateString(\n AYMETA.ayClientMetaData.LanguageName,//use Client browser default Language, change this setting here to force an alternative language\n {\n timeZone: AYMETA.ayClientMetaData.TimeZoneName,//use Client browser's default TimeZone, change this setting here to force a specific time zone\n dateStyle: \"long\"\n }\n );\n});\n\n\n\n/////////////////////////////////////////////////////////////////\n//\n// CUSTOM TIME HELPER\n//\nHandlebars.registerHelper('myTime', function (value) {\n if (!value) {\n return \"\";\n }\n\n //parse the date\n let parsedDate = new Date(value);\n\n //is it a valid date?\n if (!(parsedDate instanceof Date && !isNaN(parsedDate))) {\n return \"not valid\";\n }\n\n //Use built in toLocaleTimeString method to format the date and time\n //there are many options that change the displayed format documented here\n //https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Date/toLocaleString\n return parsedDate.toLocaleTimeString(\n AYMETA.ayClientMetaData.LanguageName,//use Client browser default Language, change this setting here to force an alternative language\n {\n timeZone: AYMETA.ayClientMetaData.TimeZoneName,//use Client browser's default TimeZone, change this setting here to force a specific time zone \n timeStyle: \"long\",//display the time zone used \n hour12: AYMETA.ayClientMetaData.Hour12 //Use User setting for 12/24 hour clock\n }\n );\n});\n\n\n/////////////////////////////////////////////////////////////////\n//\n// CUSTOM DATE AND TIME HELPER WITH AUSTRALIAN OPTIONS\n//\nHandlebars.registerHelper('myDateTimeAustralia', function (value) {\n if (!value) {\n return \"\";\n }\n\n //parse the date\n let parsedDate = new Date(value);\n\n //is it a valid date?\n if (!(parsedDate instanceof Date && !isNaN(parsedDate))) {\n return \"not valid\";\n }\n\n //Use built in toLocaleString method to format the date and time\n //there are many options that change the displayed format documented here\n //https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Date/toLocaleString \n return parsedDate.toLocaleString(\n \"en-au\",//use English-Australia locale (Day / Month / Year is Australia default format)\n {\n timeZone: \"Australia/Sydney\",//use forced time zone, see \"tz database\" column for name in list here: https://en.wikipedia.org/wiki/List_of_tz_database_time_zones\n // timeZoneName: \"long\",//display the time zone used - AS OF alpha.109 unable to use this?\n dateStyle: \"short\",\n timeStyle: \"long\"\n }\n );\n});\n\n\n\n/////////////////////////////////////////////////////////////////\n//\n// CUSTOM DATE AND TIME HELPER WITH Arabic OPTIONS \n//\nHandlebars.registerHelper('myDateTimeArabic', function (value) {\n if (!value) {\n return \"\";\n }\n\n //parse the date\n let parsedDate = new Date(value);\n\n //is it a valid date?\n if (!(parsedDate instanceof Date && !isNaN(parsedDate))) {\n return \"not valid\";\n }\n\n //Use built in toLocaleString method to format the date and time\n //there are many options that change the displayed format documented here\n //https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Date/toLocaleString \n return parsedDate.toLocaleString(\n \"ar-EG\",//use Arabic locale \n {\n timeZone: \"Asia/Dubai\",//use forced time zone, see \"tz database\" column for name in list here: https://en.wikipedia.org/wiki/List_of_tz_database_time_zones\n // timeZoneName: \"short\",//display the time zone used \n dateStyle: \"short\",\n timeStyle: \"long\"\n }\n );\n});\n\n/////////////////////////////////////////////////////////////////\n//\n// CUSTOM FORMAT TO PARTS HELPER\n// this offers the most control over the return format\n// Locale aware conversion to parts that can be returned in any format\n//\nHandlebars.registerHelper('myDateTimeFromParts', function (value) {\n if (!value) {\n return \"\";\n }\n\n //parse the date\n let parsedDate = new Date(value);\n //is it a valid date?\n if (!(parsedDate instanceof Date && !isNaN(parsedDate))) {\n return \"not valid\";\n }\n\n //Set formatter options\n //https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Intl/DateTimeFormat/formatToParts\n let formatter = new Intl.DateTimeFormat('en-us', {\n weekday: 'long',\n year: 'numeric',\n month: 'numeric',\n day: 'numeric',\n hour: 'numeric',\n minute: 'numeric',\n second: 'numeric',\n fractionalSecondDigits: 3,\n hour12: true,\n timeZone: 'UTC'\n });\n\n let parts = formatter.formatToParts(parsedDate);\n /*\n // parts example return value: \n [ \n { type: 'weekday', value: 'Monday' }, \n { type: 'literal', value: ', ' }, \n { type: 'month', value: '12' }, \n { type: 'literal', value: '/' }, \n { type: 'day', value: '17' }, \n { type: 'literal', value: '/' }, \n { type: 'year', value: '2012' }, \n { type: 'literal', value: ', ' }, \n { type: 'hour', value: '3' }, \n { type: 'literal', value: ':' }, \n { type: 'minute', value: '00' }, \n { type: 'literal', value: ':' }, \n { type: 'second', value: '42' }, \n { type: 'fractionalSecond', value: '000' },\n { type: 'literal', value: ' ' }, \n { type: 'dayPeriod', value: 'AM' } \n ]\n */\n\n let partWeekDay = parts.find(({ type }) => type === 'weekday').value;\n let partDay = parts.find(({ type }) => type === 'day').value;\n let partYear = parts.find(({ type }) => type === 'year').value;\n \n //return in some custom format\n return `DAY:${partWeekDay}-${partDay} YEAR: ${partYear}`;\n //return this instead to see the actual return array\n //return JSON.stringify(parts);\n});","RenderType":0,"HeaderTemplate":null,"FooterTemplate":null,"DisplayHeaderFooter":false,"PaperFormat":10,"Landscape":false,"MarginOptionsBottom":"10mm","MarginOptionsLeft":"10mm","MarginOptionsRight":"10mm","MarginOptionsTop":"10mm","PageRanges":null,"PreferCSSPageSize":false,"PrintBackground":true,"Scale":1.00000} \ No newline at end of file diff --git a/server/AyaNova/resource/rpt/stock-report-templates/109x EXAMPLE PO show parent value AND child value on SAME row.ayrt b/server/AyaNova/resource/rpt/stock-report-templates/109x EXAMPLE PO show parent value AND child value on SAME row.ayrt deleted file mode 100644 index 54ff621d..00000000 --- a/server/AyaNova/resource/rpt/stock-report-templates/109x EXAMPLE PO show parent value AND child value on SAME row.ayrt +++ /dev/null @@ -1 +0,0 @@ -{"Name":"💡109x EXAMPLE PO show parent value AND child value on SAME row","Active":true,"Notes":"example HTML mustache for displaying parent property (i.e. the PO number) when \"in\" Child iteration (PO items)","Roles":124927,"AType":26,"IncludeWoItemDescendants":false,"Template":"\n\n\t\n\t\n {{#each ayReportData}}\n \n \n \n \n \n \n \n \n {{#each Items}} \n \n \n \n \n \n \n \n \n {{/each}}\n \n {{/each}}\n
MAIN HEADER PO#: {{Serial}} MAIN HEADER empty1MAIN HEADER empty2
TBODY PO# {{../Serial}} TBODY Part #: {{PartNameViz}} TBODY Qty Ordered: {{QuantityOrdered}}
\n\t\n\n","Style":".example {\n color: blue;\n}\n\ntable { \n font-family: 'Helvetica Neue', 'Helvetica', Helvetica, Arial, sans-serif;\n border-collapse: collapse;\n white-space: pre-wrap;\n font-size: 16pt;\n width: 100%;\n }\n\ntbody tr {\n width: 100%;\n}\n\ntbody tr:nth-child(even) {\n font-size: 10pt;\n background-color: lightgray; /* MUST checkmark Print background in PDF Options for this to show */\n} \ntbody tr:nth-child(odd) {\n font-size: 10pt;\n background-color: lightgoldenrodyellow; /* MUST checkmark Print background in PDF Options for this to show */\n} ","JsPrerender":"async function ayPrepareData(reportData){ \n //this function (if present) is called with the report data \n //before the report is rendered\n //modify data as required here and return it to change the data before the report renders\n //see the help documentation for details\n return reportData;\n}","JsHelpers":"//Register custom Handlebars helpers here to use in your report script\n//https://handlebarsjs.com/guide/#custom-helpers\nHandlebars.registerHelper('loud', function (aString) {\n return aString.toUpperCase()\n})","RenderType":0,"HeaderTemplate":"    (from PDF Options) Printed date: ","FooterTemplate":"  set in PDF Options  Page  of     ","DisplayHeaderFooter":true,"PaperFormat":10,"Landscape":false,"MarginOptionsBottom":"10mm","MarginOptionsLeft":"10mm","MarginOptionsRight":"10mm","MarginOptionsTop":"10mm","PageRanges":null,"PreferCSSPageSize":false,"PrintBackground":true,"Scale":1.00000} \ No newline at end of file diff --git a/server/AyaNova/resource/rpt/stock-report-templates/109x EXAMPLE PO show tags dependent on custom Helpers.ayrt b/server/AyaNova/resource/rpt/stock-report-templates/109x EXAMPLE PO show tags dependent on custom Helpers.ayrt deleted file mode 100644 index 4d704d7e..00000000 --- a/server/AyaNova/resource/rpt/stock-report-templates/109x EXAMPLE PO show tags dependent on custom Helpers.ayrt +++ /dev/null @@ -1 +0,0 @@ -{"Name":"💡109x EXAMPLE PO show tags dependent on custom Helpers","Active":true,"Notes":"example custom Helpers functions if has tag X then show Y, else return something else like preset text\nexample in custom Helper if want to use CSS styling, how to correctly wrap in a safestring","Roles":124927,"AType":26,"IncludeWoItemDescendants":false,"Template":"\n\n\n\t

Example: Helpers to show if has a specific Tag / Custom fields usage

\n\t

See the specific Helpers in this report template, and the help documentation for additional details

\n\n\t\n\t\t{{#each ayReportData}}\n\t\t\n\t\t\t\n\t\t\t\t\n\t\t\t\t\n\t\t\t\n\t\t \n\t\t\n\t\t\t\n\t\t\t\t\n\t\t\t\t\n\t\t\t\n\t\t\t\n\t\t\t\t\n\t\t\t\t\n\t\t\t\n\t\t\t\n\t\t\t\t\n\t\t\t\t\n\t\t\t\n\t\t\t\n\t\t\t\t\n\t\t\t\t\n\t\t\t\n\t\t\t\n\t\t\t\t\n\t\t\t\t\n\t\t\t\n\t\t\t\n\t\t\t\t\n\t\t\t\t\n\t\t\t\n\t\t\t\n\t\t\t\t\n\t\t\t\t{{#if CustomFields.c1}} {{else}} {{/if}}\n\t\t\t\n\t\t\t{{#each Items}}\n\t\t\t\n\t\t\t\t\n\t\t\t\t{{#if QuantityReceived}} {{else}} {{/if}}\n\t\t\t\n\t\t\t{{/each}}\n\t\t\n\t\t{{/each}}\n\t
  
For PO#: {{ Serial }}
Display 1st Tag only:{{ Tags.[0]}}
Called ayReportData's to display all tags for this PO:{{ Tags}}
Called custom Helper to display if has tag 'gold':{{ isInTag Tags}}
Called custom Helper to display if has tag 'brown':{{ isInTag2 Tags}}
Called custom Helper to display if has tag 'yellow':{{ isInTag3 Tags}}
If CustomFields.c1 has value, will display greenfont else will display redfont{{CustomFields.c1}}nope nothing here
For each POitem will display in redfont if QuantyReceived is false, undefined, null, \"\", 0, or []For {{PartNameViz}} have received: {{QuantityReceived}}Nothing received yet for {{PartNameViz}}
\n \n\n\n","Style":".redMe {\n color: red;\n}\n\n.greenMe {\n color: green;\n}\n\n\n.blueMe {\n color: blue;\n}\n\ntable { \n font-family: 'Helvetica Neue', 'Helvetica', Helvetica, Arial, sans-serif;\n border-collapse: collapse;\n white-space: pre-wrap;\n font-size: 18pt;\n width: 100%;\n }\n\n\n\ntbody tr:nth-child(even) {\n font-size: 10pt;\n background-color: lightgray; /* MUST checkmark Print background in PDF Options for this to show */\n} \ntbody tr:nth-child(odd) {\n font-size: 10pt;\n background-color: lightgoldenrodyellow; /* MUST checkmark Print background in PDF Options for this to show */\n} ","JsPrerender":"async function ayPrepareData(reportData){ \n //this function (if present) is called with the report data \n //before the report is rendered\n //modify data as required here and return it to change the data before the report renders\n //see the help documentation for details\n return reportData;\n}","JsHelpers":"Handlebars.registerHelper('isInTag', function (Tags) \n{\n for (var i=0; i\" + \"yellow is in here!! see how this shows in greenfont!\" +\"

\"); //if want to use CSS styling, be sure to wrap in a safestring\n\t\t}\n }\n return 'Nope yellow isn\\'t in tags for this poitem'; //if don't want to return any element at all, comment this else aspect out fully\n});\n","RenderType":0,"HeaderTemplate":null,"FooterTemplate":null,"DisplayHeaderFooter":false,"PaperFormat":10,"Landscape":false,"MarginOptionsBottom":"15mm","MarginOptionsLeft":"10mm","MarginOptionsRight":"10mm","MarginOptionsTop":"15mm","PageRanges":null,"PreferCSSPageSize":false,"PrintBackground":true,"Scale":1.00000} \ No newline at end of file diff --git a/server/AyaNova/resource/rpt/stock-report-templates/109x EXAMPLE PO showing ordered received including serial numbers.ayrt b/server/AyaNova/resource/rpt/stock-report-templates/109x EXAMPLE PO showing ordered received including serial numbers.ayrt deleted file mode 100644 index 5d7a9ce0..00000000 --- a/server/AyaNova/resource/rpt/stock-report-templates/109x EXAMPLE PO showing ordered received including serial numbers.ayrt +++ /dev/null @@ -1 +0,0 @@ -{"Name":"💡109x EXAMPLE PO showing ordered received including serial numbers","Active":true,"Notes":"TO DO: PartName property as not yet in Sample Data; example Prepare for running nets and total\n","Roles":124927,"AType":26,"IncludeWoItemDescendants":false,"Template":"\n\n\n\n\n\t
\t\n {{#each ayReportData}}\t \n\t\t \t\n \t\t\n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n {{#if DropShipToCustomerViz}}{{else}} {{/if}}\n \n \n \n \n \n {{#if DropShipToCustomerViz}}{{else}} {{/if}} \n \n \n\n \n \n \n {{#if DropShipToCustomerViz}}{{else}} {{/if}}\n \n\n \n \n \n \n \n\t\t\t\n\t\t\t\n\t\t\t\n\t\t\t \n\t\t\t\n\t\t\t\n\t\t\t\n\t\t\t\n\t\t\t \n \n \n \n \t\t\n\t\t\t\t{{#each Items}} \n\t\t\t\t\t\t\t\t\n\t\t\t\t \n {{#if PartNameViz}}{{else}} {{/if}}\n \n {{#if Serials}}{{else}} {{/if}}\n \t\t \n \t\t\n \t\t\n \n \t\t{{#if TaxAViz}}{{else}} {{/if}} \n \t\t{{#if TaxBViz}}{{else}} {{/if}}\n \t\t \t\t\n\t\t\t\t\n\t\t\t \t{{/each}}\n\t\t\t\n \n \n \n\t\t\t\n\t\t\n\t\t \n\t\t\t\n\t\t\t \n\t\t\t\n\t\t\t\n\t\t\t\n\t\t\t\n\t\t\t \n \n\t\t \n\t\t\t\n\t\t\t \n\t\t\t\n\t\t\t\n\t\t\t{{#if ThisPOTaxA}}{{else}} {{/if}}\n\t\t\t{{#if ThisPOTaxB}}{{else}} {{/if}}\n\t\t\t \n \n\t\t\n \n \n\t\t
{{ayLogo 'small'}} Our Internal PO#:{{Serial}}Addt'l Ref #: {{ReferenceNumber}}
data from ayReportData shows in greenfont Ordered Date: {{ayDate OrderedDate}}
data derived from Prepare shows in bluefontETA Date: {{ayDate ExpectedReceiveDate}}{{ayDate ExpectedReceiveDate}}
data derived from Helper shows in redfontTodays date from Helper: {{todaysMonthDDYYYYDate}}
VENDOR:DELIVER TO:
{{VendorViz}}{{DropShipToCustomerViz}}My Company Name
unsure where to get vendor contact information customer contact data unknown how to get123 - 123 MyStreetname Ave My City, My State, My Postal
vendor contact not part of datasetcustomer contact data unknown how to getOrdered By: creator Phone: creatorphone
 
Part#:Part Name:Serials Received#:QtyPrice Per:Net:Tax A:Tax B:Line Total:
{{PartNameViz}}{{PartNameViz}}no part name has been entered{{Serials}}no serials entered as received{{QuantityOrdered}}{{ayCurrency PurchaseOrderCost}}{{ayCurrency NetTotalViz}}{{ayCurrency TaxAViz}}0.00{{ayCurrency TaxBViz}}0.00{{ayCurrency LineTotalViz}}
 
Total Qty CountTotal NetTotal Tax A:Total Tax B:PO Total:
{{ThisPOQty}}{{ ayCurrency ThisPONet }}{{ ayCurrency ThisPOTaxA }}0.00{{ ayCurrency ThisPOTaxB }}0.00{{ ayCurrency ThisPODollarAmount }}
\n {{/each}}\n\t
\n\n","Style":".singlePage\n{\npage-break-after: always;\n}\n\ntable { \n font-family: 'Helvetica Neue', 'Helvetica', Helvetica, Arial, sans-serif;\n border-collapse: collapse;\n white-space: pre-wrap;\n font-size: 9pt;\n width: 100%;\n }\n\nthead {\n display: table-header-group; /* so as to print the table-header on all subsequent pages */\n}\n\n.heading {\n border-style: solid;\n border-width: 1pt;\n border-color: #e8e5e5; \n margin: 10pt;\n background-color: #e8e5e5;\n padding: 5pt; \n font-size: 12pt; \n} \n\ntbody tr:nth-child(even) {\n font-size: 14pt;\n background-color: lightgray; /* MUST checkmark Print background in PDF Options for this to show */\n} \ntbody tr:nth-child(odd) {\n font-size: 14pt;\n background-color: lightgoldenrodyellow; /* MUST checkmark Print background in PDF Options for this to show */\n} \n\ntfoot {\n display: table-footer-group; /* so as to print the table-footer on all subsequent pages */\n page-break-inside: avoid;\n font-size: 12pt; \n bottom: 0;\n width: 90%;\n border-top: 1px solid black;\n\n}\n\n.fontsmall {\n font-size: 8px;\n}\n.fontgreen {\n color: green;\n}\n.fontblue {\n color: blue;\n}\n.fontred {\n color:red;\n}\n.rightlean {\n text-align: right;\n}\n.leftlean {\n text-align: left;\n}\n.centerlean {\n text-align: center;\n}\n","JsPrerender":"async function ayPrepareData(reportData) {\n //Example of both manipulating the reportData before rendering the report (by adding a running total field)\n //and adding a field to the overall data calculating the total dollar amount for all records\n\nlet AllPONet = 0; //Declare a temporary variable to hold the running net total for all POs in this list\n //Iterate through all the records in the reportData adding the dollar amount of each item to the AllPONet variable\n for (EachPO of reportData.ayReportData) \n {\n let ThisPONet = 0; //Declare a temporary variable to hold the running net total for THIS po\n for (Item of EachPO.Items) //Iterate through all the poitems of THIS po adding the dollar amount of each item to the ThisPONet variable\n {\n //make sure it has a value before attempting to add it to the running total\n if (Item.NetTotalViz != null) \n {\n ThisPONet += Item.NetTotalViz;\n }\n Item.PONetRunning=ThisPONet;\n }\n EachPO.ThisPONet=ThisPONet;\n AllPONet += ThisPONet; //Use ThisPONet to display the running Net total for THIS PO\n }\n //Add the AllPONet variable to the reportData so it can be accessed in the report template i.e. a final running total of ALL PO's Net\n reportData.AllPONetRunning=AllPONet;\n \nlet AllPOTaxA = 0; //Declare a temporary variable to hold the running Tax A total for all POs in the list\n //Iterate through all the records in the reportData adding the Tax A dollar amount of each item to the AllPOTaxA variable\n for (EachPO of reportData.ayReportData) \n {\n let ThisPOTaxA = 0; //Declare a temporary variable to hold the running Tax A total for THIS po\n for (Item of EachPO.Items) //Iterate through all the poitems of THIS po adding the dollar amount of each item to the ThisPOTaxA variable\n {\n //make sure it has a value before attempting to add it to the running total\n if (Item.TaxAViz != null) \n {\n ThisPOTaxA += Item.TaxAViz;\n }\n Item.POTaxARunning=ThisPOTaxA;\n }\n EachPO.ThisPOTaxA=ThisPOTaxA;\n AllPOTaxA += ThisPOTaxA; // Use ThisPOTaxA to display the running Tax A total for THIS PO\n }\n //Add the AllPONet variable to the reportData so it can be accessed in the report template i.e. a final running total of ALL PO's Tax A\n reportData.AllPOTaxARunning=AllPOTaxA; \n \nlet AllPOTaxB = 0; //Declare a temporary variable to hold the running Tax B total for all POs in the list\n //Iterate through all the records in the reportData adding the Tax B dollar amount of each item to the AllPOTaxA variable\n for (EachPO of reportData.ayReportData) \n {\n let ThisPOTaxB = 0; //Declare a temporary variable to hold the running Tax B total for THIS po\n for (Item of EachPO.Items) //Iterate through all the poitems of THIS po adding the dollar amount of each item to the ThisPOTaxB variable\n {\n //make sure it has a value before attempting to add it to the running total\n if (Item.TaxBViz != null) \n {\n ThisPOTaxB += Item.TaxBViz;\n }\n Item.POTaxBRunning=ThisPOTaxB;\n }\n EachPO.ThisPOTaxB=ThisPOTaxB;\n AllPOTaxB += ThisPOTaxB; // Use ThisPOTaxB to display the running Tax B total for THIS PO\n }\n //Add the AllPOTaxB variable to the reportData so it can be accessed in the report template i.e. a final running total of ALL PO's Tax B\n reportData.AllPOTaxBRunning=AllPOTaxB; \n\nlet AllPOQty = 0; //Declare a temporary variable to hold the running Tax B total for all POs in the list\n //Iterate through all the records in the reportData adding the Tax B dollar amount of each item to the AllPOTaxA variable\n for (EachPO of reportData.ayReportData) \n {\n let ThisPOQty = 0; //Declare a temporary variable to hold the running Tax B total for THIS po\n for (Item of EachPO.Items) //Iterate through all the poitems of THIS po adding the dollar amount of each item to the ThisPOTaxB variable\n {\n //make sure it has a value before attempting to add it to the running total\n if (Item.QuantityOrdered != null) \n {\n ThisPOQty += Item.QuantityOrdered;\n }\n Item.POTaxQtyRunning=ThisPOQty;\n }\n EachPO.ThisPOQty=ThisPOQty;\n AllPOQty += ThisPOQty; // Use ThisPOTaxB to display the running Tax B total for THIS PO\n }\n //Add the AllPOTaxB variable to the reportData so it can be accessed in the report template i.e. a final running total of ALL PO's Tax B\n reportData.AllPOQtyRunning=AllPOQty; \n \n\nlet AllPODollarAmount = 0; //Declare a temporary variable to hold the running total of all POs in this list\n //Iterate through all the records in the reportData\n //adding the dollar amount of each item to the AllPODollarAmount variable\n for (EachPO of reportData.ayReportData) \n {\n let ThisPODollarAmount = 0; //Declare a temporary variable to hold the running total of THIS PO\n for (Item of EachPO.Items)\n {\n //make sure it has a value before attempting to add it to the running total\n if (Item.LineTotalViz != null) \n {\n ThisPODollarAmount += Item.LineTotalViz;\n }\n Item.PORunningTotal=ThisPODollarAmount;\n }\n EachPO.ThisPODollarAmount=ThisPODollarAmount;\n AllPODollarAmount += ThisPODollarAmount; // Use ThisPODoallarAmount to display the running Total for THIS PO\n }\n //Add the AllPODollarAmount variable to the reportData so it can be accessed in the report template \n reportData.AllPORunningTotal=AllPODollarAmount;\n\n return reportData;\n}","JsHelpers":"//Register custom Handlebars helpers here to use in your report script\n//https://handlebarsjs.com/guide/#custom-helpers\nHandlebars.registerHelper('loud', function (aString) {\n return aString.toUpperCase()\n})\nHandlebars.registerHelper('words', function() {\n return \"stuff and text\"\n})\n\n\nHandlebars.registerHelper('todaysMonthDDYYYYDate', function() {\n var dt3=new Date();\n return dt3.toLocaleDateString(\n AYMETA.ayClientMetaData.LanguageName,//use Client browser default Language, change this setting here to force an alternative language\n {\n timeZone: AYMETA.ayClientMetaData.TimeZoneName,//use Client browser's default TimeZone, change this setting here to force a specific time zone\n dateStyle: \"long\"\n }\n ) ;\n});// today's date displayed in MONTH DD, YYYY format\n","RenderType":0,"HeaderTemplate":"    (from PDF Options) Printed date: ","FooterTemplate":null,"DisplayHeaderFooter":true,"PaperFormat":10,"Landscape":false,"MarginOptionsBottom":"15mm","MarginOptionsLeft":"10mm","MarginOptionsRight":"10mm","MarginOptionsTop":"15mm","PageRanges":null,"PreferCSSPageSize":false,"PrintBackground":true,"Scale":1.00000} \ No newline at end of file diff --git a/server/AyaNova/resource/rpt/stock-report-templates/109x EXAMPLE PO using #if, #unless and custom #if_eq.ayrt b/server/AyaNova/resource/rpt/stock-report-templates/109x EXAMPLE PO using #if, #unless and custom #if_eq.ayrt deleted file mode 100644 index 5457f2ff..00000000 --- a/server/AyaNova/resource/rpt/stock-report-templates/109x EXAMPLE PO using #if, #unless and custom #if_eq.ayrt +++ /dev/null @@ -1 +0,0 @@ -{"Name":"💡109x EXAMPLE PO using #if, #unless and custom #if_eq","Active":true,"Notes":"HTML handlebars #unless example (i.e. #unless is \"if not\" - as in if not true do this. no 'else' aspect) , #if example that checks for truthiness - if false, undefined, null, \"\", 0, or [], Handlebars will not render the block","Roles":124927,"AType":26,"IncludeWoItemDescendants":false,"Template":"\n\n\t
\t\n {{#each ayReportData}}\t \n\t\t \t\n \t\t\n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n {{#if DropShipToCustomerViz}}{{else}} {{/if}}\n \n \n \n \n \n {{#if DropShipToCustomerViz}}{{else}} {{/if}} \n \n \n\n \n \n \n {{#if DropShipToCustomerViz}}{{else}} {{/if}}\n \n\n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \t\t\n\t\t\t\t{{#each Items}} \n\t\t\t\t\t\t\t\t\n\t\t\t\t \n \n {{#unless Serials}}{{else}} {{/unless}}\n \t\t\n \n {{#if_eq QuantityOrdered \"5\"}}{{else}}{{/if_eq}}\n \n \t\t\n \t\t\n \n \t\t{{#if TaxAViz}}{{else}} {{/if}}\n \t\t{{#if TaxBViz}}{{else}} {{/if}}\n \t\t \t\t\n\t\t\t\t\n\t\t\t \t{{/each}}\n\t\t\t\n \n \n \n \n\t\t\t\t\n\t\t\t\t \n\t\t\t\t\n\t\t\t\t\n\t\t\t\t\n\t\t\t\t\n\t\t\t\t\n\t\t\t\t\n\t\t\t\t\n\t\t\t\t\n\t\t\t\t{{#if ThisPOTaxA}}{{else}} {{/if}}\n\t\t\t\t\n\t\t\t\t\n\t\t\t\t\n\t\t\t\t\n\t\t\t\t{{#if ThisPOTaxB}}{{else}} {{/if}}\n\t\t\t\t\n \t\t\t\n \t\t\t\n \t\t\t\n \t\t\t \n \t\t\t\n \n \n\t\t
{{ ayLogo \"small\" }}Our Internal PO#:{{Serial}}Addt'l Ref #: {{ReferenceNumber}}
data from ayReportData shows in greenfont Ordered Date: {{ayDate OrderedDate}}
data derived from Prepare shows in bluefontETA Date: {{ayDate ExpectedReceiveDate}}{{ayDate ExpectedReceiveDate}}
data derived from Helper shows in redfontTodays date from Helper: {{todaysMonthDDYYYYDate}}
VENDOR:DELIVER TO:
{{VendorViz}}{{DropShipToCustomerViz}}My Company Name
unsure where to get vendor contact information customer contact data unknown how to get123 - 123 MyStreetname Ave My City, My State, My Postal
vendor contact not part of datasetcustomer contact data unknown how to getOrdered By: creator Phone: creatorphone
 
Part # & Name:Serials Received:QtyPrice Per:Net:Tax A:Tax B:Line Total:
{{PartNameViz}} {{PartDescriptionViz}}no serials listed{{Serials}}LOTS{{QuantityOrdered}}{{ayCurrency PurchaseOrderCost}}{{ayCurrency NetTotalViz}}{{ayCurrency TaxAViz}}0.00{{ayCurrency TaxBViz}}0.00{{ayCurrency LineTotalViz}}
 
Net Total:{{ ayCurrency ThisPONet }}
 Tax A Total:{{ ayCurrency ThisPOTaxA }}0.00
Direct all inquiries to My Company 1-888-555-5555Tax B Total:{{ ayCurrency ThisPOTaxB }}0.00
Approval for off-specification goods must be obtained via a new purchase orderPO Total:{{ ayCurrency ThisPODollarAmount }}
\n {{/each}}\n\t
\n\n","Style":".singlePage\n{\npage-break-after: always;\n}\n\ntable { \n font-family: 'Helvetica Neue', 'Helvetica', Helvetica, Arial, sans-serif;\n border-collapse: collapse;\n white-space: pre-wrap;\n font-size: 9pt;\n width: 100%;\n }\n\nthead {\n display: table-header-group; /* so as to print the table-header on all subsequent pages */\n}\n\n.heading {\n border-style: solid;\n border-width: 1pt;\n border-color: #e8e5e5; \n margin: 10pt;\n background-color: #e8e5e5;\n padding: 5pt; \n font-size: 12pt; \n} \n\ntbody tr:nth-child(even) {\n font-size: 14pt;\n background-color: lightgray; /* MUST checkmark Print background in PDF Options for this to show */\n} \ntbody tr:nth-child(odd) {\n font-size: 14pt;\n background-color: lightgoldenrodyellow; /* MUST checkmark Print background in PDF Options for this to show */\n} \n\ntfoot {\n display: table-footer-group; /* so as to print the table-footer on all subsequent pages */\n page-break-inside: avoid;\n /* position: fixed; uncommenting position: will force footer to bottom always BUT then leftlean and rightlean don't work AND tbody overwrites */\n font-size: 12pt; \n bottom: 0;\n width: 90%;\n border-top: 1px solid black;\n}\n\n.fontsmall {\n font-size: 8px;\n}\n.fontgreen {\n color: green;\n}\n.fontblue {\n color: blue;\n}\n.fontred {\n color:red;\n}\n.rightlean {\n text-align: right;\n}\n.leftlean {\n text-align: left;\n}\n.centerlean {\n text-align: center;\n}","JsPrerender":"async function ayPrepareData(reportData) {\n //Example of both manipulating the reportData before rendering the report (by adding a running total field)\n //and adding a field to the overall data calculating the total dollar amount for all records\n\nlet AllPONet = 0; //Declare a temporary variable to hold the running net total for all POs in this list\n //Iterate through all the records in the reportData adding the dollar amount of each item to the AllPONet variable\n for (EachPO of reportData.ayReportData) \n {\n let ThisPONet = 0; //Declare a temporary variable to hold the running net total for THIS po\n for (Item of EachPO.Items) //Iterate through all the poitems of THIS po adding the dollar amount of each item to the ThisPONet variable\n {\n //make sure it has a value before attempting to add it to the running total\n if (Item.NetTotalViz != null) \n {\n ThisPONet += Item.NetTotalViz;\n }\n Item.PONetRunning=ThisPONet;\n }\n EachPO.ThisPONet=ThisPONet;\n AllPONet += ThisPONet; //Use ThisPONet to display the running Net total for THIS PO\n }\n //Add the AllPONet variable to the reportData so it can be accessed in the report template i.e. a final running total of ALL PO's Net\n reportData.AllPONetRunning=AllPONet;\n \nlet AllPOTaxA = 0; //Declare a temporary variable to hold the running Tax A total for all POs in the list\n //Iterate through all the records in the reportData adding the Tax A dollar amount of each item to the AllPOTaxA variable\n for (EachPO of reportData.ayReportData) \n {\n let ThisPOTaxA = 0; //Declare a temporary variable to hold the running Tax A total for THIS po\n for (Item of EachPO.Items) //Iterate through all the poitems of THIS po adding the dollar amount of each item to the ThisPOTaxA variable\n {\n //make sure it has a value before attempting to add it to the running total\n if (Item.TaxAViz != null) \n {\n ThisPOTaxA += Item.TaxAViz;\n }\n Item.POTaxARunning=ThisPOTaxA;\n }\n EachPO.ThisPOTaxA=ThisPOTaxA;\n AllPOTaxA += ThisPOTaxA; // Use ThisPOTaxA to display the running Tax A total for THIS PO\n }\n //Add the AllPONet variable to the reportData so it can be accessed in the report template i.e. a final running total of ALL PO's Tax A\n reportData.AllPOTaxARunning=AllPOTaxA; \n \nlet AllPOTaxB = 0; //Declare a temporary variable to hold the running Tax B total for all POs in the list\n //Iterate through all the records in the reportData adding the Tax B dollar amount of each item to the AllPOTaxA variable\n for (EachPO of reportData.ayReportData) \n {\n let ThisPOTaxB = 0; //Declare a temporary variable to hold the running Tax B total for THIS po\n for (Item of EachPO.Items) //Iterate through all the poitems of THIS po adding the dollar amount of each item to the ThisPOTaxB variable\n {\n //make sure it has a value before attempting to add it to the running total\n if (Item.TaxBViz != null) \n {\n ThisPOTaxB += Item.TaxBViz;\n }\n Item.POTaxBRunning=ThisPOTaxB;\n }\n EachPO.ThisPOTaxB=ThisPOTaxB;\n AllPOTaxB += ThisPOTaxB; // Use ThisPOTaxB to display the running Tax B total for THIS PO\n }\n //Add the AllPOTaxB variable to the reportData so it can be accessed in the report template i.e. a final running total of ALL PO's Tax B\n reportData.AllPOTaxBRunning=AllPOTaxB; \n\nlet AllPODollarAmount = 0; //Declare a temporary variable to hold the running total of all POs in this list\n //Iterate through all the records in the reportData\n //adding the dollar amount of each item to the AllPODollarAmount variable\n for (EachPO of reportData.ayReportData) \n {\n let ThisPODollarAmount = 0; //Declare a temporary variable to hold the running total of THIS PO\n for (Item of EachPO.Items)\n {\n //make sure it has a value before attempting to add it to the running total\n if (Item.LineTotalViz != null) \n {\n ThisPODollarAmount += Item.LineTotalViz;\n }\n Item.PORunningTotal=ThisPODollarAmount;\n }\n EachPO.ThisPODollarAmount=ThisPODollarAmount;\n AllPODollarAmount += ThisPODollarAmount; // Use ThisPODoallarAmount to display the running Total for THIS PO\n }\n //Add the AllPODollarAmount variable to the reportData so it can be accessed in the report template \n reportData.AllPORunningTotal=AllPODollarAmount;\n\n return reportData;\n}","JsHelpers":"//Register custom Handlebars helpers here to use in your report script\n//https://handlebarsjs.com/guide/#custom-helpers\nHandlebars.registerHelper('loud', function (aString) {\n return aString.toUpperCase()\n})\nHandlebars.registerHelper('words', function() {\n return \"stuff and text\"\n})\n\n//custom helper so can do a direct comparison - i.e. if value equals xxxx, then show, else show yyyyy\n//note that this HAS to be added here in Helpers, is NOT built in\nHandlebars.registerHelper('if_eq', function(a, b, opts) {\n if(a == b) // Or === depending on your needs\n return opts.fn(this);\n else\n return opts.inverse(this);\n});\n\n\nHandlebars.registerHelper('todaysMonthDDYYYYDate', function() {\n var dt3=new Date();\n return dt3.toLocaleDateString(\n AYMETA.ayClientMetaData.LanguageName,//use Client browser default Language, change this setting here to force an alternative language\n {\n timeZone: AYMETA.ayClientMetaData.TimeZoneName,//use Client browser's default TimeZone, change this setting here to force a specific time zone\n dateStyle: \"long\"\n }\n ) ;\n});// today's date displayed in MONTH DD, YYYY format","RenderType":0,"HeaderTemplate":null,"FooterTemplate":null,"DisplayHeaderFooter":false,"PaperFormat":10,"Landscape":false,"MarginOptionsBottom":"10mm","MarginOptionsLeft":"10mm","MarginOptionsRight":"10mm","MarginOptionsTop":"10mm","PageRanges":null,"PreferCSSPageSize":false,"PrintBackground":true,"Scale":1.00000} \ No newline at end of file diff --git a/server/AyaNova/resource/rpt/stock-report-templates/109x EXAMPLE single line per PO.ayrt b/server/AyaNova/resource/rpt/stock-report-templates/109x EXAMPLE single line per PO.ayrt deleted file mode 100644 index 78a79432..00000000 --- a/server/AyaNova/resource/rpt/stock-report-templates/109x EXAMPLE single line per PO.ayrt +++ /dev/null @@ -1 +0,0 @@ -{"Name":"💡109x EXAMPLE single line per PO","Active":true,"Notes":"example of custom Prepare - derived running totals for nets, taxes and totals for EACH PO on single line, and running total for all POs Nets, Taxes, Totals at bottom of report","Roles":124927,"AType":26,"IncludeWoItemDescendants":false,"Template":"\n\n\t
\t \n\t\t \n \t\t\n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \t\t\n \n \n {{#each ayReportData}}\n \n \n \n \n {{#if ThisPOTaxA}}{{else}} {{/if}} \n {{#if ThisPOTaxB}}{{else}} {{/if}}\n \n \n \t {{/each}}\n \n
Header on every page
One line of Net totals for each PO in body
Footer of Net totals (derived) on last page only
PO#:PO Net:PO Tax A:PO Tax B:PO Total:
{{Serial}}{{ayCurrency ThisPONet}}{{ayCurrency ThisPOTaxA}}$0.00{{ayCurrency ThisPOTaxB}}$0.00{{ayCurrency ThisPOTotalofLines}}
\n\n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n
All POs Net:All POs Tax A:All POs Tax B:All POs Total:
{{ ayCurrency AllPONetRunning }}{{ ayCurrency AllPOTaxARunning }}{{ ayCurrency AllPOTaxBRunning }} {{ ayCurrency AllPOTotal }}
\n \n\t
\n\n","Style":".singlePage\n{\npage-break-after: always;\n}\n\ntable { \n font-family: 'Helvetica Neue', 'Helvetica', Helvetica, Arial, sans-serif;\n border-collapse: collapse;\n white-space: pre-wrap;\n font-size: 9pt;\n width: 100%;\n }\n\nthead {\n display: table-header-group; /* so as to print the table-header on all subsequent pages */\n}\n\n.heading {\n border-style: solid;\n border-width: 1pt;\n border-color: #e8e5e5; \n margin: 10pt;\n background-color: #e8e5e5;\n padding: 5pt; \n font-size: 18pt; \n text-align: center;\n} \n\ntbody tr:nth-child(even) {\n font-size: 14pt;\n background-color: lightgray; /* MUST checkmark Print background in PDF Options for this to show */\n height: 50px;\n} \ntbody tr:nth-child(odd) {\n font-size: 14pt;\n background-color: lightgoldenrodyellow; /* MUST checkmark Print background in PDF Options for this to show */\n height: 50px;\n} \ntbody td {\n width: 20%; /* to space 5 columns evenly */\n}\n\ntfoot {\n /* display: table-footer-group; uncomment to print the table-footer on all pages, not just last page - */\n page-break-inside: avoid;\n /* position: fixed; uncommenting position: will force footer to bottom BUT then leftlean and rightlean don't work AND tbody overwrites */\n font-size: 14pt; \n bottom: 0;\n width: 100%;\n border-top: 1px solid black; \n}\ntfoot td {\n width: 20%; /* to space 5 columns evenly */\n}\n\n.fontgreen {\n color: green;\n font-size: 16pt;\n}\n.fontblue {\n color: blue;\n}\n.fontred {\n color:red;\n}\n\n\n.rightlean {\n text-align: right;\n}\n.leftlean {\n text-align: left;\n}\n.centerlean {\n text-align: center;\n}","JsPrerender":"async function ayPrepareData(reportData) {\n //Example of both manipulating the reportData before rendering the report (by adding a running total field)\n //and adding a field to the overall data calculating the total dollar amount for all records\n\nlet AllPONet = 0; //Declare a temporary variable to hold the running net total for all POs in this list\n //Iterate through all the records in the reportData adding the dollar amount of each item to the AllPONet variable\n for (EachPO of reportData.ayReportData) \n {\n let ThisPONet = 0; //Declare a temporary variable to hold the running net total for THIS po\n for (Item of EachPO.Items) //Iterate through all the poitems of THIS po adding the dollar amount of each item to the ThisPONet variable\n {\n //make sure it has a value before attempting to add it to the running total\n if (Item.NetTotalViz != null) \n {\n ThisPONet += Item.NetTotalViz;\n }\n Item.PONetRunning=ThisPONet;\n }\n EachPO.ThisPONet=ThisPONet;\n AllPONet += ThisPONet; //Use ThisPONet to display the running Net total for THIS PO\n }\n //Add the AllPONet variable to the reportData so it can be accessed in the report template i.e. a final running total of ALL PO's Net\n reportData.AllPONetRunning=AllPONet;\n \nlet AllPOTaxA = 0; //Declare a temporary variable to hold the running Tax A total for all POs in the list\n //Iterate through all the records in the reportData adding the Tax A dollar amount of each item to the AllPOTaxA variable\n for (EachPO of reportData.ayReportData) \n {\n let ThisPOTaxA = 0; //Declare a temporary variable to hold the running Tax A total for THIS po\n for (Item of EachPO.Items) //Iterate through all the poitems of THIS po adding the dollar amount of each item to the ThisPOTaxA variable\n {\n //make sure it has a value before attempting to add it to the running total\n if (Item.TaxAViz != null) \n {\n ThisPOTaxA += Item.TaxAViz;\n }\n Item.POTaxARunning=ThisPOTaxA;\n }\n EachPO.ThisPOTaxA=ThisPOTaxA;\n AllPOTaxA += ThisPOTaxA; // Use ThisPOTaxA to display the running Tax A total for THIS PO\n }\n //Add the AllPONet variable to the reportData so it can be accessed in the report template i.e. a final running total of ALL PO's Tax A\n reportData.AllPOTaxARunning=AllPOTaxA; \n \nlet AllPOTaxB = 0; //Declare a temporary variable to hold the running Tax B total for all POs in the list\n //Iterate through all the records in the reportData adding the Tax B dollar amount of each item to the AllPOTaxA variable\n for (EachPO of reportData.ayReportData) \n {\n let ThisPOTaxB = 0; //Declare a temporary variable to hold the running Tax B total for THIS po\n for (Item of EachPO.Items) //Iterate through all the poitems of THIS po adding the dollar amount of each item to the ThisPOTaxB variable\n {\n //make sure it has a value before attempting to add it to the running total\n if (Item.TaxBViz != null) \n {\n ThisPOTaxB += Item.TaxBViz;\n }\n Item.POTaxBRunning=ThisPOTaxB;\n }\n EachPO.ThisPOTaxB=ThisPOTaxB;\n AllPOTaxB += ThisPOTaxB; // Use ThisPOTaxB to display the running Tax B total for THIS PO\n }\n //Add the AllPOTaxB variable to the reportData so it can be accessed in the report template i.e. a final running total of ALL PO's Tax B\n reportData.AllPOTaxBRunning=AllPOTaxB; \n\nlet AllPODollarTotalRunning = 0; //Declare a temporary variable to hold the running total of all POs in this list\n//let ThisPOTotal = 0; //if declare this at this stage will NOT get correct EachPO.ThisPOTotalofLines\n for (EachPO of reportData.ayReportData) \n { \n let ThisPOTotal = 0; \n // need to declared let ThisPOTotal = 0; at this stage so then it will reset ThisPOTotal back to 0 before being able to add to EachPO.POsRunningTotalSoFar\n //BUT OH OH - now the entire AllPOTotal is off hmmmmmmmmmm \n for (Item of EachPO.Items)\n {\n //make sure it has a value before attempting to add it to the running total\n if (Item.LineTotalViz != null) \n {\n ThisPOTotal += Item.LineTotalViz;\n }\n Item.ThisPORunningTotal=ThisPOTotal;\n } \n EachPO.ThisPOTotalofLines =ThisPOTotal; \n //add a new key to each record in the reportData object named \"EachPO.POsRunningTotalSoFar\" with the running total so far\n EachPO.POsRunningTotalSoFar=ThisPOTotal; \n\n AllPODollarTotalRunning += ThisPOTotal; \n }\n //set the AllPODollarTotalRunning variable to the reportData so the reportData.AllPOTotal can be accessed in the report template outside of the #each \n //- i.e. in a separate footer that displays once at end of report\n reportData.AllPOTotal=AllPODollarTotalRunning; \n \n\n return reportData;\n}","JsHelpers":"//Register custom Handlebars helpers here to use in your report script\n//https://handlebarsjs.com/guide/#custom-helpers\nHandlebars.registerHelper('loud', function (aString) {\n return aString.toUpperCase()\n})","RenderType":0,"HeaderTemplate":"    (from PDF Options) Printed date: ","FooterTemplate":null,"DisplayHeaderFooter":true,"PaperFormat":10,"Landscape":false,"MarginOptionsBottom":"10mm","MarginOptionsLeft":"10mm","MarginOptionsRight":"10mm","MarginOptionsTop":"10mm","PageRanges":null,"PreferCSSPageSize":false,"PrintBackground":true,"Scale":1.00000} \ No newline at end of file diff --git a/server/AyaNova/resource/rpt/stock-report-templates/112 EXAMPLE WO Invoice with derived Net and Grand Total.ayrt b/server/AyaNova/resource/rpt/stock-report-templates/112 EXAMPLE WO Invoice with derived Net and Grand Total.ayrt deleted file mode 100644 index 6c68743c..00000000 --- a/server/AyaNova/resource/rpt/stock-report-templates/112 EXAMPLE WO Invoice with derived Net and Grand Total.ayrt +++ /dev/null @@ -1 +0,0 @@ -{"Name":"💡112 EXAMPLE WO Invoice with derived Net and Grand Total","Active":true,"Notes":"Example of how to show Signature and date signed and printed name. PDF options header & footer example; Header for each WO spans multiple pages if WO multi-paged; Footer once per WO regardless number of pages\nPrepare functions to derive nets and grand totals; #IF helper in HTML to only show the child section IF true; Helper example: custom todaysMonthDDYYYYDate and custom myDate\nCSS example: tbody tr:nth-child for row striped;\n","Roles":124927,"AType":34,"IncludeWoItemDescendants":false,"Template":"\n\n\t
\t\n {{#each ayReportData}}\t \n\t\t \t\n \t\t\n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \t\n\t\t\t\t{{#each Items}} \n {{#each Expenses}}\n {{#if ChargeToCustomer}}\t\t\t\n \t\n \n \n \n \n {{#if ChargeTaxCodeId}}{{else}} {{/if}}\n {{#if ChargeTaxCodeId}}{{else}} {{/if}}\n \t\t \n {{else}} {{/if}}\n {{/each}}\n {{#each Loans}}\n \t\t\t\t\n \n \n \n \n {{#if ChargeTaxCodeId}}{{else}} {{/if}}\n {{#if ChargeTaxCodeId}}{{else}} {{/if}}\n \t\t\n \n {{/each}}\n {{#each Labors}}\n \t\t\t\t\n \n \n \n \n {{#if TaxCodeSaleId}}{{else}} {{/if}}\n {{#if TaxCodeSaleId}}{{else}} {{/if}}\n \t\t\n \n {{/each}}\n {{#each Parts}}\n \t\t\t\t\n \n \n \n \n {{#if TaxPartSaleId}}{{else}} {{/if}}\n {{#if TaxPartSaleId}}{{else}} {{/if}}\n \t\t\n \n {{/each}}\n {{#each Travels}}\n \t\t\t\t\n \n \n \n \n {{#if TaxCodeSaleId}}{{else}} {{/if}}\n {{#if TaxCodeSaleId}}{{else}} {{/if}}\n \t\t\n \n {{/each}}\n {{#each OutsideServices}}\n \t\t\t\t\n \n \n {{#if TaxCodeId}}{{else}} {{/if}}\n {{#if TaxCodeId}}{{else}} {{/if}}\n \t\t\n \n {{/each}}\n\t\t\t \t{{/each}}\n\t\t\t \n
{{ ayLogo \"small\" }}Internal WO#:{{Serial}}
data from ayReportData shows in greenfont Service Date from WO: {{myDate ServiceDate}}
data derived from Helper or Prepare shows in redfontTodays date from Helper: {{todaysMonthDDYYYYDate}}
Service performed for: {{CustomerViz}}
Physical Address where service performed:Postal Address where invoice sent to:
{{Address}}, {{City}}{{PostAddress}}, {{PostCity}}
 
Item:QtyPrice Per:Net:Tax A:Tax B:Line Total:
Expense: {{Name}}{{ayCurrency ChargeAmount}}{{ayCurrency TaxAViz}}{{TaxPaid}}{{ayCurrency TaxBViz}} {{ayCurrency LineTotalViz}}
custom expenses for {{Name}} NOT charged to customer
Loaner: {{LoanUnitViz}} / {{UnitOfMeasureViz}} {{Quantity}}{{ayCurrency ListPriceViz}}{{ayCurrency NetViz}}{{ayCurrency TaxAViz}}0.00{{ayCurrency TaxBViz}}0.00{{ayCurrency LineTotalViz}}
Service performed at {{ayDateTime ServiceStartDate}} with Service Rate of {{ServiceRateViz}}{{ServiceRateQuantity}}{{ayCurrency ListPriceViz}}{{ayCurrency NetViz}}{{ayCurrency TaxAViz}}0.00{{ayCurrency TaxBViz}}0.00{{ayCurrency LineTotalViz}}
Part: {{PartNameViz}}{{Quantity}}{{ayCurrency ListPrice}}{{ayCurrency NetViz}}{{ayCurrency TaxAViz}}0.00{{ayCurrency TaxBViz}}0.00{{ayCurrency LineTotalViz}}
Travel performed on {{ayDate TravelStartDate}} with Travel rate of {{TravelRateViz}}{{TravelRateQuantity}}{{ayCurrency ListPriceViz}}{{ayCurrency NetViz}}{{ayCurrency TaxAViz}}0.00{{ayCurrency TaxBViz}}0.00{{ayCurrency LineTotalViz}}
Outside Service performed on Unit: {{UnitViz}}{{ayCurrency NetViz}}{{ayCurrency TaxAViz}}0.00{{ayCurrency TaxBViz}}0.00{{ayCurrency LineTotalViz}}
\n\n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n\t\t\t\t\n\t\t\t\t \n \n\t\t\t\t\n\t\t\t\t \n \n\t\t\t\t\n\t\t\t\t \n \n\t\t\t\t\n\t\t\t\t \n \n\t\t\t\t\n\t\t\t\t\n \n\t\t\t\t\n {{#if CustomerSignature}}{{else}} {{/if}}\n \n {{#if CustomerSignatureCaptured}} {{else}} {{/if}} \n \n {{#if CustomerSignatureName}}{{else}} {{/if}} \n\t\t\t\t \n \n\t\t\t\t\n\t\t\t\t \n \n \n
Net LaborNet TravelNet PartsNet ExpensesNet LoansNet OutsideTotal NetsTotal Tax ATotal Tax BWO Total
{{ayCurrency ThisWOAllLaborsNetViz}}{{ayCurrency ThisWOAllTravelsNetViz}}{{ayCurrency ThisWOAllPartsNetViz}}{{ayCurrency ThisWOAllExpsNetChargeAmount}}{{ayCurrency ThisWOAllLoansNetViz}}{{ayCurrency ThisWOAllOutsidesNetViz}}{{ayCurrency ThisWOTotalNets}}{{ayCurrency ThisWOTotalTaxAs}}{{ayCurrency ThisWOTotalTaxBs}}{{ayCurrency ThisWOTotalGrand}}
 
 
I acknowledge the satisfactory provision and completion of the above for internal workorder #{{Serial}}:
 
 
Customer Signature: ___________________________________________Signature Date:_{{ayDateTime CustomerSignatureCaptured}}_________________________________Print of Name:_{{CustomerSignatureName}}_ ______________________________
 
\n {{/each}}\n\t
\n\n\n","Style":"/* if not using a rule set or specific property it is recommended to comment out or delete fully for report performance*/\n\n.singlePage /* so that page always breaks after footer */\n{\npage-break-after: always;\n} \n\ntable { \n table-layout: fixed; //setting this to fixed causes columns to be evenly spaced for the entire table regardless of cell content, and then colspan then \"works\" as expected\n font-family: 'Helvetica Neue', 'Helvetica', Helvetica, Arial, sans-serif;\n border-collapse: collapse;\n white-space: pre-wrap;\n font-size: 9pt;\n width: 100%;\n page-break-inside: avoid; \n }\n\nthead {\n display: table-header-group; /* so as to print the table-header on all subsequent pages */\n /* NOTE if this IS here but NOT displaying on subsequent pages (i.e. page 2 of a wo), you NEED to edit your thead so it is NO MORE than approx 20% of the page */\n}\n\n\n.heading {\n border-style: solid;\n border-width: 1pt;\n border-color: #e8e5e5; \n margin: 10pt;\n background-color: #e8e5e5;\n padding: 5pt; \n font-size: 10pt; \n} \n\ntbody tr:nth-child(even) {\n font-size: 8pt;\n background-color: lightgray; /* MUST checkmark Print background in PDF Options for this to show */\n} \ntbody tr:nth-child(odd) {\n font-size: 8pt;\n background-color: lightgoldenrodyellow; /* MUST checkmark Print background in PDF Options for this to show */\n} \n\ntfoot {\n display: table-footer-group;\n page-break-inside: avoid; \n font-size: 8pt; \n bottom: 0;\n width: 100%;\n border-top: 1px solid black; \n}\n\n.fontgreen {\n color: green;\n}\n.fontblue {\n color: blue;\n}\n.fontred {\n color:red;\n}\n\n\n.rightlean {\n text-align: right;\n}\n.leftlean {\n text-align: left;\n}\n.centerlean {\n text-align: center;\n}","JsPrerender":"async function ayPrepareData(reportData){ \n //this function (if present) is called with the report data \n //before the report is rendered\n //modify data as required here and return it to change the data before the report renders\n //see the help documentation for details\n\n\n//********************//NOTE if you customize this report template and do NOT need a function or key identified below, remove to increase report performance\n\n\nfor (EachWO of reportData.ayReportData) \n\t{\n\t//below declares a key on the entire wo to hold all Labor Net Viz from all Items in this wo so it exists\n\tEachWO.ThisWOAllLaborsNetViz = 0;\n\t//below declares a key on the entire wo to hold all Part Net Viz from all Items in this wo so it exists\n\tEachWO.ThisWOAllPartsNetViz = 0;\n\t//below declares a key on the entire wo to hold all Travel Net Viz from all Items in this wo so it exists\n\tEachWO.ThisWOAllTravelsNetViz = 0;\n\t//below declares a key on the entire wo to hold all Exp Net ChargeAmount from all Items in this wo so it exists\n\tEachWO.ThisWOAllExpsNetChargeAmount = 0;\n\t//below declares a key on the entire wo to hold all Loan Net Viz from all Items in this wo so it exists\n\tEachWO.ThisWOAllLoansNetViz = 0;\n\t//below declares a key on the entire wo to hold all Outside Net Viz from all Items in this wo so it exists\n\tEachWO.ThisWOAllOutsidesNetViz = 0;\t\n\n\t//below declares a key on the entire wo to hold ALL of THIS workorder's Nets so it exists\n\tEachWO.ThisWOTotalNets = 0;\n\n\t//below declares a key on the entire wo to hold THIS workorder's Tax A (for all items) so it exists \n\tEachWO.ThisWOTotalTaxAs = 0;\n\t//below declares a key on the entire wo to hold THIS workorder's Tax B (for all items) so it exists\n\tEachWO.ThisWOTotalTaxBs = 0;\t\n\t//below declares a key on the entire wo to hold THIS workorder's Grand Total so it exists\n\tEachWO.ThisWOTotalGrand = 0;\n\n\t//below is to Iterate through each item of the wo's Items\n\tfor (Item of EachWO.Items)\n\t\t{\n\t\t\tItem.ThisItemAllLaborsNetViz = 0; //declare a key on the Item to hold all of this item's labor nets and set it initially to 0 \n\t\t\t\n\t\t\t//below is to Iterate through each labor record of the wo's Item\n\t\t\tfor (Labor of Item.Labors)\n\t\t\t{\n\t\t\t//make sure it has a value before attempting to add it to the running total\n \tif (Labor.NetViz != null) \n \t \t{\n \t \tItem.ThisItemAllLaborsNetViz += Labor.NetViz; //this IS where the actual adding to running total for this WOItem's Net Labors\n\t\t\t\t\t\tEachWO.ThisWOAllLaborsNetViz += Labor.NetViz; //this IS where the actual adding to the running total for this entire WO's Net Labors\n\t\t\t\t\t\tEachWO.ThisWOTotalNets += Labor.NetViz; //this IS where the actual adding to the running total for ALL NETS for THIS workorders in this report data\n\t\t\t\t\t\tEachWO.ThisWOTotalGrand += Labor.NetViz; //this IS where the actual adding to the running total for GrandTotal for THIS workorders in this report data\t\n\t\t\t\t\t\t\n\t\t\t\t\t\tEachWO.ThisWOTotalTaxAs += Labor.TaxAViz; //this IS where the actual adding of Labor's Tax A to the running total for ALL Tax A for THIS workorders in this report data\n\t\t\t\t\t\tEachWO.ThisWOTotalGrand += Labor.TaxAViz; //this IS where the actual adding of Labor's Tax A to the running total for GrandTotal for THIS workorders in this report data\n\t\t\t\t\t\t\n\t\t\t\t\t\tEachWO.ThisWOTotalTaxBs += Labor.TaxBViz; //this IS where the actual adding of Labor's Tax B to the running total for ALL Tax B for THIS workorders in this report data\n\t\t\t\t\t\tEachWO.ThisWOTotalGrand += Labor.TaxBViz; //this IS where the actual adding of Labor's Tax B to the running total for GrandTotal for THIS workorders in this report data\n \t \t\t}\t\t//NOTE if you customize this report template and do NOT need a key above, remove it to increase report performance\t\t\n\t\t\t}\n\n\t\t\tItem.ThisItemAllPartsNetViz = 0; //declare a key on the Item to hold all of this item's parts nets and set it initially to 0 \n\t\t\t\n\t\t\t//below is to Iterate through each Part record of the wo's Item\n\t\t\tfor (Part of Item.Parts)\n\t\t\t{\n\t\t\t//make sure it has a value before attempting to add it to the running total\n \tif (Part.NetViz != null) \n \t \t{\n \t \tItem.ThisItemAllPartsNetViz += Part.NetViz; //this IS where the actual adding to running total for this WOItem's Net Parts\n\t\t\t\t\t\tEachWO.ThisWOAllPartsNetViz += Part.NetViz;//this IS where the actual adding to the running total for this entire WO's Net Parts\n\t\t\t\t\t\tEachWO.ThisWOTotalNets += Part.NetViz; //this IS where the actual adding to the running total for ALL NETS for THIS workorders in this report data\n\t\t\t\t\t\tEachWO.ThisWOTotalGrand += Part.NetViz; //this IS where the actual adding to the running total for GrandTotal for THIS workorders in this report data\t\t\t\t\t\t\n\n\t\t\t\t\t\tEachWO.ThisWOTotalTaxAs += Part.TaxAViz; //this IS where the actual adding of Part's Tax A to the running total for ALL Tax A for THIS workorders in this report data\n\t\t\t\t\t\tEachWO.ThisWOTotalGrand += Part.TaxAViz; //this IS where the actual adding of Part's Tax A to the running total for GrandTotal for THIS workorders in this report data\n\t\t\t\t\t\t\n\t\t\t\t\t\tEachWO.ThisWOTotalTaxBs += Part.TaxBViz; //this IS where the actual adding of Part's Tax B to the running total for ALL Tax B for THIS workorders in this report data\n\t\t\t\t\t\tEachWO.ThisWOTotalGrand += Part.TaxBViz; //this IS where the actual adding of Part's Tax B to the running total for GrandTotal for THIS workorders in this report data\n \t \t\t}\t\t\t\t//NOTE if you customize this report template and do NOT need a key above, remove it to increase report performance\t\n\t\t\t}\n\n\t\t\tItem.ThisItemAllTravelsNetViz = 0; //declare a key on the Item to hold all of this item's travel nets and set it initially to 0 \n\t\t\t\n\t\t\t//below is to Iterate through each Travel record of the wo's Item\n\t\t\tfor (Travel of Item.Travels)\n\t\t\t{\n\t\t\t//make sure it has a value before attempting to add it to the running total\n \tif (Travel.NetViz != null) \n \t \t{\n\t\t\t\t\t\t\n \t \tItem.ThisItemAllTravelsNetViz += Travel.NetViz;//this IS where the actual adding to running total for this WOItem's Net Travels\n\t\t\t\t\t\tEachWO.ThisWOAllTravelsNetViz += Travel.NetViz;//this IS where the actual adding to the running total for this entire WO's Net Travels\n\t\t\t\t\t\tEachWO.ThisWOTotalNets += Travel.NetViz;//this IS where the actual adding to the running total for ALL NETS for THIS workorders in this report data\n\t\t\t\t\t\tEachWO.ThisWOTotalGrand += Travel.NetViz; //this IS where the actual adding to the running total for GrandTotal for THIS workorders in this report data\n\n\t\t\t\t\t\tEachWO.ThisWOTotalTaxAs += Travel.TaxAViz; //this IS where the actual adding of Travel's Tax A to the running total for ALL Tax A for THIS workorders in this report data\n\t\t\t\t\t\tEachWO.ThisWOTotalGrand += Travel.TaxAViz; //this IS where the actual adding of Travel's Tax A to the running total for GrandTotal for THIS workorders in this report data\n\t\t\t\t\t\t\n\t\t\t\t\t\tEachWO.ThisWOTotalTaxBs += Travel.TaxBViz; //this IS where the actual adding of Travel's Tax B to the running total for ALL Tax B for THIS workorders in this report data\n\t\t\t\t\t\tEachWO.ThisWOTotalGrand += Travel.TaxBViz; //this IS where the actual adding of Travel's Tax B to the running total for GrandTotal for THIS workorders in this report data\n \t \t\t}\t\t\t\t//NOTE if you customize this report template and do NOT need a key above, remove it to increase report performance\t\n\t\t\t}\n\n\t\t\t//note additional statements for misc expense to ONLY add to running totals if ChargeToCustomer is true\n\t\t\t\n\t\t\tItem.ThisItemAllExpsNetChargeAmount = 0; //declare a key on the Item to hold all of this item's misc nets and set it initially to 0 \n\t\t\t\n\t\t\t//below is to Iterate through each Exp record of the wo's Item\n\t\t\tfor (Exp of Item.Expenses)\n\t\t\t{\n\t\t\t//if this expense has a ChargeAmount value AND the ChargeToCustomer is true then adds the ChargeAmount to running totals\n \tif (Exp.ChargeAmount != null && Exp.ChargeToCustomer == true) \n \t \t{\n\t\t\t\t\t\t\n \t \tItem.ThisItemAllExpsNetChargeAmount += Exp.ChargeAmount;//this IS where the actual adding to running total for this WOItem's Net Exps\n\t\t\t\t\t\tEachWO.ThisWOAllExpsNetChargeAmount += Exp.ChargeAmount;//this IS where the actual adding to the running total for this entire WO's Net ChargeAmounts\n\t\t\t\t\t\tEachWO.ThisWOTotalNets += Exp.ChargeAmount;//this IS where the actual adding to the running total for ALL NET ChargeAmountS for THIS workorders in this report data\n\t\t\t\t\t\tEachWO.ThisWOTotalGrand += Exp.ChargeAmount; //this IS where the actual adding to the running total for GrandTotal for THIS workorders in this report data\n \t \t\t}\t\t\t\t//NOTE if you customize this report template and do NOT need a key above, remove it to increase report performance\t\n\n\t\t\t//if this expense the ChargeToCustomer is true AND ChargeTaxCode has a value then adds the TaxAViz and TaxBViz to running totals\t\t\n\t\t\t\t\tif (Exp.ChargeToCustomer == true && Exp.ChargeTaxCodeId != null ) \n \t \t{\n\t\t\t\t\t\tEachWO.ThisWOTotalTaxAs += Exp.TaxAViz; //this IS where the actual adding of Exp's Tax A to the running total for ALL Tax A for THIS workorders in this report data\n\t\t\t\t\t\tEachWO.ThisWOTotalGrand += Exp.TaxAViz; //this IS where the actual adding of Exp's Tax A to the running total for GrandTotal for THIS workorders in this report data\n\t\t\t\t\t\t\n\t\t\t\t\t\tEachWO.ThisWOTotalTaxBs += Exp.TaxBViz; //this IS where the actual adding of Exp's Tax B to the running total for ALL Tax B for THIS workorders in this report data\n\t\t\t\t\t\tEachWO.ThisWOTotalGrand += Exp.TaxBViz; //this IS where the actual adding of Exp's Tax B to the running total for GrandTotal for THIS workorders in this report data\n \t \t\t}\t\t\t\t//NOTE if you customize this report template and do NOT need a key above, remove it to increase report performance\t\n\t\t\t\t\telse if (Exp.ChargeToCustomer == true && Exp.ChargeTaxCodeId == null ) //else if ChargeToCustomer is true AND ChargeTaxCodeID is null, then add TaxPaid to TaxA running total and Grand Total\t\t\n\t\t\t\t\t\t{\n\t\t\t\t\t\tEachWO.ThisWOTotalTaxAs += Exp.TaxPaid; //this IS where the actual adding of Exp's TaxPaid to the running total for ALL Tax A for THIS workorders in this report data\n\t\t\t\t\t\tEachWO.ThisWOTotalGrand += Exp.TaxPaid; //this IS where the actual adding of Exp's TaxPaid to the running total for GrandTotal for THIS workorders in this report data\n\t\t\t\t\t\t}\n\n\t\t\t}\n\n\t\t\t\n\t\t\tItem.ThisItemAllLoansNetViz = 0; //declare a key on the Item to hold all of this item's loans nets and set it initially to 0 \n\t\t\t\n\t\t\t//below is to Iterate through each Loan record of the wo's Item\n\t\t\tfor (Loan of Item.Loans)\n\t\t\t{\n\t\t\t//make sure it has a value before attempting to add it to the running total\n \tif (Loan.NetViz != null) \n \t \t{\n \t \tItem.ThisItemAllLoansNetViz += Loan.NetViz;//this IS where the actual adding to running total for this WOItem's Net Loans\n\t\t\t\t\t\tEachWO.ThisWOAllLoansNetViz += Loan.NetViz;//this IS where the actual adding to the running total for this entire WO's Net Loans\n\t\t\t\t\t\tEachWO.ThisWOTotalNets += Loan.NetViz;//this IS where the actual adding to the running total for ALL NETS for THIS workorders in this report data\n\t\t\t\t\t\tEachWO.ThisWOTotalGrand += Loan.NetViz; //this IS where the actual adding to the running total for GrandTotal for THIS workorders in this report data\n\n\t\t\t\t\t\tEachWO.ThisWOTotalTaxAs += Loan.TaxAViz; //this IS where the actual adding of Loan's Tax A to the running total for ALL Tax A for THIS workorders in this report data\n\t\t\t\t\t\tEachWO.ThisWOTotalGrand += Loan.TaxAViz; //this IS where the actual adding of Loan's Tax A to the running total for GrandTotal for THIS workorders in this report data\n\t\t\t\t\t\t\n\t\t\t\t\t\tEachWO.ThisWOTotalTaxBs += Loan.TaxBViz; //this IS where the actual adding of Loan's Tax B to the running total for ALL Tax B for THIS workorders in this report data\n\t\t\t\t\t\tEachWO.ThisWOTotalGrand += Loan.TaxBViz; //this IS where the actual adding of Loan's Tax B to the running total for GrandTotal for THIS workorders in this report data\n \t \t\t}\t\t\t\t//NOTE if you customize this report template and do NOT need a key above, remove it to increase report performance\t\n\t\t\t}\n\n\t\t\tItem.ThisItemAllOutsidesNetViz = 0; //declare a key on the Item to hold all of this item's Outsie nets and set it initially to 0 \n\t\t\t\n\t\t\t//below is to Iterate through each Outside record of the wo's Item\n\t\t\tfor (Outside of Item.OutsideServices)\n\t\t\t{\n\t\t\t//make sure it has a value before attempting to add it to the running total\n \tif (Outside.NetViz != null) \n \t \t{\n\t\t\t\t\t\t\n \t \tItem.ThisItemAllOutsidesNetViz += Outside.NetViz;//this IS where the actual adding to running total for this WOItem's Net Outside\n\t\t\t\t\t\tEachWO.ThisWOAllOutsidesNetViz += Outside.NetViz;//this IS where the actual adding to the running total for this entire WO's Net Outsides\n\t\t\t\t\t\tEachWO.ThisWOTotalNets += Outside.NetViz;//this IS where the actual adding to the running total for ALL NETS for THIS workorders in this report data\n\t\t\t\t\t\tEachWO.ThisWOTotalGrand += Outside.NetViz; //this IS where the actual adding to the running total for GrandTotal for THIS workorders in this report data\n\n\t\t\t\t\t\tEachWO.ThisWOTotalTaxAs += Outside.TaxAViz; //this IS where the actual adding of Outside's Tax A to the running total for ALL Tax A for THIS workorders in this report data\n\t\t\t\t\t\tEachWO.ThisWOTotalGrand += Outside.TaxAViz; //this IS where the actual adding of Outside's Tax A to the running total for GrandTotal for THIS workorders in this report data\n\t\t\t\t\t\t\n\t\t\t\t\t\tEachWO.ThisWOTotalTaxBs += Outside.TaxBViz; //this IS where the actual adding of Outside's Tax B to the running total for ALL Tax B for THIS workorders in this report data\n\t\t\t\t\t\tEachWO.ThisWOTotalGrand += Outside.TaxBViz; //this IS where the actual adding of Outside's Tax B to the running total for GrandTotal for THIS workorders in this report data\n \t \t\t}\t\t\t\t//NOTE if you customize this report template and do NOT need a key above, remove it to increase report performance\t\n\t\t\t}\n\t\t}\n\t}\n\t\n\n return reportData;\n}","JsHelpers":"Handlebars.registerHelper('todaysMonthDDYYYYDate', function() {\n var dt3=new Date();\n return dt3.toLocaleDateString(\n AYMETA.ayClientMetaData.LanguageName,//use Client browser default Language, change this setting here to force an alternative language\n {\n timeZone: AYMETA.ayClientMetaData.TimeZoneName,//use Client browser's default TimeZone, change this setting here to force a specific time zone\n dateStyle: \"long\"\n }\n ) ;\n});// today's date displayed in MONTH DD, YYYY format EXAMPLE SHOW: June 9, 2021\n\n/////////////////////////////////////////////////////////////////\n//\n// CUSTOM DATE HELPER\n//\nHandlebars.registerHelper('myDate', function (value) {\n if (!value) {\n return \"\";\n }\n\n //parse the date\n let parsedDate = new Date(value);\n\n //is it a valid date?\n if (!(parsedDate instanceof Date && !isNaN(parsedDate))) {\n return \"not valid\";\n }\n\n //Use built in toLocaleDateString method to format the date\n //there are many options that change the displayed format documented here\n //https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Date/toLocaleDateString\n return parsedDate.toLocaleDateString(\n AYMETA.ayClientMetaData.LanguageName,//use Client browser default Language, change this setting here to force an alternative language\n {\n timeZone: AYMETA.ayClientMetaData.TimeZoneName,//use Client browser's default TimeZone, change this setting here to force a specific time zone\n dateStyle: \"long\"\n }\n );\n});\n\n","RenderType":0,"HeaderTemplate":"    (from PDF Options) Printed date: ","FooterTemplate":"  this is set in PDF Options  Note this is all pages of report  Page  of     ","DisplayHeaderFooter":true,"PaperFormat":10,"Landscape":false,"MarginOptionsBottom":"10mm","MarginOptionsLeft":"10mm","MarginOptionsRight":"10mm","MarginOptionsTop":"10mm","PageRanges":null,"PreferCSSPageSize":false,"PrintBackground":true,"Scale":1.00000} \ No newline at end of file diff --git a/server/AyaNova/resource/rpt/stock-report-templates/112 EXAMPLE WO single line PROFIT_LOSS on net parts labors.ayrt b/server/AyaNova/resource/rpt/stock-report-templates/112 EXAMPLE WO single line PROFIT_LOSS on net parts labors.ayrt deleted file mode 100644 index b39607be..00000000 --- a/server/AyaNova/resource/rpt/stock-report-templates/112 EXAMPLE WO single line PROFIT_LOSS on net parts labors.ayrt +++ /dev/null @@ -1 +0,0 @@ -{"Name":"💡112 EXAMPLE WO single line PROFIT/LOSS on net parts labors","Active":true,"Notes":"Example single line per WO showing net labor charges and costs and its profit/loss; net parts charges and costs and its profit/loss; and derived WO profit/loss (via Prepare)\nTotalling up all wo's net labor charges and costs and profit/loss, all wo's net parts charges and costs and profit/loss, and derived all wos total profit/loss\nPDF Options example header & footer; CSS tbody tr:nth-child striped rows","Roles":124927,"AType":34,"IncludeWoItemDescendants":false,"Template":"\n\n\t
\t \n

Nets for each WO in report

\n\t\t \n \t\t\n \n \n\t\t\t \n \n \n \n \n \n \n \n \n \n \t \n \n {{#each ayReportData}}\n \n \n\t\t\t \n {{#if ServiceDate }}{{else}} {{/if}}\n\t\t\t \n {{#if ThisWOAllLaborsNetViz }} {{else}} {{/if}} \n {{#if ThisWOAllLaborsCost }} {{else}} {{/if}} \n \n {{#if ThisWOAllLaborsLoss }} {{else}} {{/if}}\n \n {{#if ThisWOAllPartsNetViz }} {{else}} {{/if}} \n {{#if ThisWOAllPartsCost }} {{else}} {{/if}} \n \n {{#if ThisWOAllPartsLoss }} {{else}} {{/if}}\n \n \n {{#if ThisWOTotalLoss }} {{else}} {{/if}}\n \n {{/each}}\n \n \n
WO#:Customer:Service Date:ThisWOAllLaborsNetViz:ThisWOAllLaborsCost:ThisWOAllLaborsProfit:ThisWOAllPartsNetViz:ThisWOAllPartsCost:ThisWOAllPartsProfit:ThisWOTotalProfit:
{{Serial}}{{CustomerViz}}{{ayDate ServiceDate}}no Service Date specified{{ayCurrency ThisWOAllLaborsNetViz}}no billable labor{{ayCurrency ThisWOAllLaborsCost}}no labor costs({{ayCurrency ThisWOAllLaborsLoss}}){{ayCurrency ThisWOAllLaborsProfit}}{{ayCurrency ThisWOAllPartsNetViz}}no billable parts{{ayCurrency ThisWOAllPartsCost}}no parts costs({{ayCurrency ThisWOAllPartsLoss}}){{ayCurrency ThisWOAllPartsProfit}}({{ayCurrency ThisWOTotalLoss}}){{ayCurrency ThisWOTotalProfit}}
\n\n \n \n \n \n \n\n \n \n \n\n \n \n \n\n \n \n \n \n\n {{#if AllWOLaborsNetViz}} {{else}} {{/if}}\n {{#if AllWOLaborsCost}} {{else}} {{/if}}\n \n {{#if AllWOLaborsLoss}} {{else}} {{/if}}\n\n {{#if AllWOPartsNetViz}} {{else}} {{/if}}\n {{#if AllWOPartsCost}} {{else}} {{/if}}\n \n {{#if AllWOPartsLoss}} {{else}} {{/if}}\n\n \n {{#if AllWOTotalLoss}} {{else}} {{/if}} \n \n \n
Totals for all listed workorders AllWOLaborsNetVizAllWOLaborsCost AllWOLaborsProfitAllWOPartsNetVizAllWOPartsCostAllWOPartsProfitAllWOTotalProfit
{{ ayCurrency AllWOLaborsNetViz}}no billable labor{{ ayCurrency AllWOLaborsCost}}no labor costs({{ ayCurrency AllWOLaborsLoss}}) {{ ayCurrency AllWOLaborsProfit }}{{ ayCurrency AllWOPartsNetViz}}no billable parts{{ ayCurrency AllWOPartsCost}}no parts cost({{ ayCurrency AllWOPartsLoss}}) {{ ayCurrency AllWOPartsProfit }}({{ ayCurrency AllWOTotalLoss}}){{ ayCurrency AllWOTotalProfit}}
\n \n\t
\n\n","Style":".singlePage\n{\npage-break-after: always;\n}\n\ntable { \n font-family: 'Helvetica Neue', 'Helvetica', Helvetica, Arial, sans-serif;\n border-collapse: collapse;\n white-space: pre-wrap;\n width: 100%;\n \n }\n\nthead {\n display: table-header-group; /* so as to print the table-header on all subsequent pages */\n}\n\n.heading {\n border-style: solid;\n border-width: 1pt;\n border-color: #e8e5e5; \n margin: 5pt;\n background-color: #e8e5e5;\n padding: 5pt; \n font-size: 9pt; \n text-align: center;\n} \n\ntbody tr:nth-child(even) {\n font-size: 7pt;\n background-color: lightgray; /* MUST checkmark Print background in PDF Options for this to show */\n height: 50px;\n} \ntbody tr:nth-child(odd) {\n font-size: 7pt;\n background-color: lightgoldenrodyellow; /* MUST checkmark Print background in PDF Options for this to show */\n height: 50px;\n} \n\n\ntfoot {\n border-top: 2px solid black;\n}\n\n\n.fontblue {\n color: blue;\n}\n.fontpurple {\n color: purple;\n}\n\n.fontgreen {\n color: green;\n}\n\n.fontred {\n color:red;\n}\n\n\n.rightlean {\n text-align: right;\n}\n.leftlean {\n text-align: left;\n}\n.centerlean {\n text-align: center;\n}","JsPrerender":"async function ayPrepareData(reportData){ \n //this function (if present) is called with the report data \n //before the report is rendered\n //modify data as required here and return it to change the data before the report renders\n //see the help documentation for details\n\n\n//********************//NOTE if you customize this report template and do NOT need a function or key identified below, remove to increase report performance\n\n//below declares a key on the entire wo to hold all Labor nets, costs, profit/loss (nets - costs),from all workorders so it exists and a key to hold all Labor Net Costs\nreportData.AllWOLaborsNetViz = 0;\nreportData.AllWOLaborsCost = 0;\nreportData.AllWOLaborsProfit = 0;\nreportData.AllWOLaborsLoss = 0;\n\n\n//below declares a key on the entire wo to hold all Part Net, costs, profit/loss (nets - costs), from all workorders so it exists and a key to hold all Part Net Costs\nreportData.AllWOPartsNetViz = 0;\nreportData.AllWOPartsCost = 0;\nreportData.AllWOPartsProfit = 0;\nreportData.AllWOPartsLoss = 0;\n\n\n//below declares a key to hold all Nets, hold all Costs, profit/loss (nets - costs), from all workorders in this list so it exists\nreportData.AllWOTotalNets = 0;\nreportData.AllWOTotalCost = 0;\nreportData.AllWOTotalProfit = 0;\nreportData.AllWOTotalLoss = 0;\n\n\n\n\n\n\nfor (EachWO of reportData.ayReportData) \n\t{\n\t//below declares a key on the entire wo to hold all Labor nets, costs, profit/loss (nets - costs) from all Items in this wo so it exists\n\tEachWO.ThisWOAllLaborsNetViz = 0;\n\tEachWO.ThisWOAllLaborsCost = 0;\n\tEachWO.ThisWOAllLaborsProfit = 0;\n\tEachWO.ThisWOAllLaborsLoss = 0;\n\n\t//below declares a key on the entire wo to hold all Part Net, costs, profit/loss (nets - costs), from all Items in this wo so it exists\n\tEachWO.ThisWOAllPartsNetViz = 0;\n\tEachWO.ThisWOAllPartsCost = 0;\n\tEachWO.ThisWOAllPartsProfit = 0; \n\tEachWO.ThisWOAllPartsLoss = 0; \n\t\n\n\t//below declares a key on the entire wo to hold ALL of THIS workorder's Nets , costs, profit/loss (nets - costs) so it exists\n\tEachWO.ThisWOTotalNets = 0;\n\tEachWO.ThisWOTotalCost = 0;\n\tEachWO.ThisWOTotalProfit = 0;\n\tEachWO.ThisWOTotalLoss = 0;\n\t\n\n\t//below is to Iterate through each item of the wo's Items\n\tfor (Item of EachWO.Items)\n\t\t{\n\t\t\tItem.ThisItemAllLaborsNetViz = 0; //declare a key on the Item to hold all of this item's labor nets and set it initially to 0 \n\t\t\tItem.ThisItemAllLaborsCost = 0; //declare a key on the Item to hold all of this item's labor costs and set it initially to 0\n\t\t\tItem.ThisItemAllLaborsProfit = 0; //declare a key on the Item to hold all of this item's labor profit/loss (nets - costs) and set it initially to 0 \n\t\t\t\n\t\t\t//below is to Iterate through each labor record of the wo's Item\n\t\t\tfor (Labor of Item.Labors)\n\t\t\t{\n\t\t\t//make sure it has a value before attempting to add it to the running total\n \tif (Labor.NetViz != null) \n \t \t{\n \t \tItem.ThisItemAllLaborsNetViz += Labor.NetViz; //this IS where the actual adding to running total for this WOItem's Net Labors\n\t\t\t\t\t\tEachWO.ThisWOAllLaborsNetViz += Labor.NetViz; //this IS where the actual adding to the running total for this entire WO's Net Labors\n\t\t\t\t\t\tEachWO.ThisWOTotalNets += Labor.NetViz; //this IS where the actual adding to the running total for ALL NETS for THIS workorders in this report data\n\t\t\t\t\t\treportData.AllWOLaborsNetViz += Labor.NetViz;\t//this IS where the actual adding to the running total for all labor for ALL workorders in this report data\t\t\t\n\t\t\t\t\t\treportData.AllWOTotalNets += Labor.NetViz; //this is where the actual adding to the running total for ALL workorders Nets in this report data\t\n\n\t\t\t\t\t\tLabor.NetCost = (Labor.CostViz * Labor.ServiceRateQuantity);\n\t\t\t\t\t\tItem.ThisItemAllLaborsCost += Labor.NetCost; //this IS where the actual adding to running total for this WOItem's Labors Cost\n\t\t\t\t\t\tEachWO.ThisWOAllLaborsCost += Labor.NetCost; //this IS where the actual adding to the running total for this entire WO's Labors costs\n\t\t\t\t\t\tEachWO.ThisWOTotalCost += Labor.NetCost; //this IS where the actual adding to the running total for ALL costs for THIS workorders in this report data\n\t\t\t\t\t\treportData.AllWOLaborsCost += Labor.NetCost;\t//this IS where the actual adding to the running total for all labor costs for ALL workorders in this report data\t\t\t\n\t\t\t\t\t\treportData.AllWOTotalCost += Labor.NetCost; //this is where the actual adding to the running total for ALL workorders costs in this report data\n\n\t\t\t\t\t\tif (Labor.NetCost != null) \n\t\t\t\t\t\t{\n\n\t\t\t\t\t\tLabor.NetProfit = (Labor.NetViz - Labor.NetCost)\n\t\t\t\t\t\tItem.ThisItemAllLaborsProfit += Labor.NetProfit; //this NOT USED \n\t\t\t\t\t\tEachWO.ThisWOAllLaborsProfit += Labor.NetProfit; //this works\n\t\t\t\t\t\tEachWO.ThisWOTotalProfit += Labor.NetProfit; //this works\n\t\t\t\t\t\treportData.AllWOLaborsProfit += Labor.NetProfit; //this works\n\t\t\t\t\t\treportData.AllWOTotalProfit += Labor.NetProfit; //this works\n\t\t\t\t\t\t}\n\n\t\t\t\t\t\t\n \t \t\t}\t\t//NOTE if you customize this report template and do NOT need a key above, remove it to increase report performance\t\t\n\t\t\t}\n\n\t\t\t\n\t\t\tItem.ThisItemAllPartsNetViz = 0; //declare a key on the Item to hold all of this item's parts nets and set it initially to 0 \n\t\t\tItem.ThisItemAllPartsCost = 0; //declare a key on the Item to hold all of this item's parts costs and set it initially to 0 \n\t\t\tItem.ThisItemAllPartsProfit = 0; //declare a key on the Item to hold all of this item's part profit/loss (nets - costs) and set it initially to 0 \n\t\t\t\n\t\t\t\n\t\t\t//below is to Iterate through each Part record of the wo's Item\n\t\t\tfor (Part of Item.Parts)\n\t\t\t{\n\t\t\t//make sure it has a value before attempting to add it to the running total\n \tif (Part.NetViz != null) \n \t \t{\n \t \tItem.ThisItemAllPartsNetViz += Part.NetViz; //this IS where the actual adding to running total for this WOItem's Net Parts\n\t\t\t\t\t\tEachWO.ThisWOAllPartsNetViz += Part.NetViz;//this IS where the actual adding to the running total for this entire WO's Net Parts\n\t\t\t\t\t\tEachWO.ThisWOTotalNets += Part.NetViz; //this IS where the actual adding to the running total for ALL NETS for THIS workorders in this report data\t\t\t\t\t\t\n\t\t\t\t\t\treportData.AllWOPartsNetViz += Part.NetViz; //this IS where the actual adding to the running total for all Parts for all workorders in this report data\t\n\t\t\t\t\t\treportData.AllWOTotalNets += Part.NetViz; //this is where the actual adding to the running total for all workorder Nets in this report data\n\n\t\t\t\t\t\tPart.NetCost = (Part.Cost * Part.Quantity);\t\t\t\t\t\t\n\t\t\t\t\t\tItem.ThisItemAllPartsCost += Part.NetCost;\n\t\t\t\t\t\tEachWO.ThisWOAllPartsCost += Part.NetCost;\n\t\t\t\t\t\tEachWO.ThisWOTotalCost += Part.NetCost;\n\t\t\t\t\t\treportData.AllWOPartsCost += Part.NetCost;\n\t\t\t\t\t\treportData.AllWOTotalCost += Part.NetCost;\n\n\t\t\t\t\t\tif (Part.NetViz != null) \n\t\t\t\t\t\t{\n\t\t\t\t\t\tPart.NetProfit = (Part.NetViz - Part.Cost)\n\t\t\t\t\t\tItem.ThisItemAllPartsProfit += Part.NetProfit; //this NOT USED \n\t\t\t\t\t\tEachWO.ThisWOAllPartsProfit += Part.NetProfit; //this works\n\t\t\t\t\t\tEachWO.ThisWOTotalProfit += Part.NetProfit; //this works\n\t\t\t\t\t\treportData.AllWOPartsProfit += Part.NetProfit; //this works\n\t\t\t\t\t\treportData.AllWOTotalProfit += Part.NetProfit; //this works\n\t\t\t\t\t\t}\n\n\t\t\t\t\t\t\n\n \t \t\t}\t\t\t\t//NOTE if you customize this report template and do NOT need a key above, remove it to increase report performance\t\n\t\t\t}\n\n\t\t\t\n\t\t}\n\n\n\t\tif (EachWO.ThisWOAllLaborsProfit <= 0) {\n\t\t\t\tEachWO.ThisWOAllLaborsLoss = EachWO.ThisWOAllLaborsProfit;\n\t\t\t\tEachWO.ThisWOAllLaborsProfit = 0;\n\t\t\t}\n\n\t\tif (EachWO.ThisWOAllPartsProfit <= 0) {\n\t\t\t\tEachWO.ThisWOAllPartsLoss = EachWO.ThisWOAllPartsProfit;\n\t\t\t\tEachWO.ThisWOAllPartsProfit = 0;\n\t\t\t}\n\n\t\tif (EachWO.ThisWOTotalProfit <= 0) {\n\t\t\t\tEachWO.ThisWOTotalLoss = EachWO.ThisWOTotalProfit;\n\t\t\t\tEachWO.ThisWOTotalProfit = 0;\n\t\t\t}\n\n\t}\n\n\nif (reportData.AllWOLaborsProfit <= 0) {\n\t\treportData.AllWOLaborsLoss = reportData.AllWOLaborsProfit;\n\t\treportData.AllWOLaborsProfit = 0;\n\t}\n\nif (reportData.AllWOPartsProfit <= 0) {\n\t\treportData.AllWOPartsProfit = reportData.AllWOPartsProfit;\n\t\treportData.AllWOPartsProfit = 0;\n\t}\n\nif (reportData.AllWOTotalProfit <= 0) {\n\t\treportData.AllWOTotalLoss = reportData.AllWOTotalProfit;\n\t\treportData.AllWOTotalProfit = 0;\n\t}\t\n\n return reportData;\n}","JsHelpers":"//Register custom Handlebars helpers here to use in your report script\n//https://handlebarsjs.com/guide/#custom-helpers\nHandlebars.registerHelper('loud', function (aString) {\n return aString.toUpperCase()\n})","RenderType":0,"HeaderTemplate":"    Todays date:    set in PDF Options","FooterTemplate":"  set in PDF Options  Page  of     ","DisplayHeaderFooter":true,"PaperFormat":10,"Landscape":true,"MarginOptionsBottom":"10mm","MarginOptionsLeft":"10mm","MarginOptionsRight":"10mm","MarginOptionsTop":"10mm","PageRanges":null,"PreferCSSPageSize":false,"PrintBackground":true,"Scale":1.00000} \ No newline at end of file diff --git a/server/AyaNova/resource/rpt/stock-report-templates/112 EXAMPLE WO single line per wo Nets NO TAXES .ayrt b/server/AyaNova/resource/rpt/stock-report-templates/112 EXAMPLE WO single line per wo Nets NO TAXES .ayrt deleted file mode 100644 index 90be50ef..00000000 --- a/server/AyaNova/resource/rpt/stock-report-templates/112 EXAMPLE WO single line per wo Nets NO TAXES .ayrt +++ /dev/null @@ -1 +0,0 @@ -{"Name":"💡112 EXAMPLE WO single line per wo Nets NO TAXES ","Active":true,"Notes":"Example of single line per WO of net labors, parts, travel, exps, loans, outsides, and before tax total with corresponding Prepare functions to obtain.\nWith Grand Totals at bottom of ALL listed wo's net labors, parts, travel, exps, loans, outsides, and total of before tax totals with corresponding Prepare functions to obtain.\nPDF options header & footer example; CSS tbody tr:nth-child striped table rows","Roles":124927,"AType":34,"IncludeWoItemDescendants":false,"Template":"\n\n\t
\t \n

Nets for each WO in report

\n\t\t \n \t\t\n \n \n\t\t\t \n \n \n \n \n \n \n \n \n \n \t \n \n {{#each ayReportData}}\n \n \n\t\t\t \n {{#if ServiceDate }}{{else}} {{/if}}\n\t\t\t {{#if ThisWOAllLaborsNetViz }} {{else}} {{/if}} \n {{#if ThisWOAllPartsNetViz }} {{else}} {{/if}} \n {{#if ThisWOAllTravelsNetViz }} {{else}} {{/if}} \n {{#if ThisWOAllExpsNetChargeAmount }} {{else}} {{/if}} \n {{#if ThisWOAllLoansNetViz }} {{else}} {{/if}} \n {{#if ThisWOAllOutsidesNetViz }} {{else}} {{/if}}\n {{#if ThisWOTotalNets }} {{else}} {{/if}}\n \n {{/each}}\n \n \n \n \n \n \n {{#if AllWOLaborsNetViz}} {{else}} {{/if}}\n {{#if AllWOPartsNetViz}} {{else}} {{/if}}\n {{#if AllWOTravelsNetViz}} {{else}} {{/if}}\n {{#if AllWOExpsNetChargeAmount}} {{else}} {{/if}}\n {{#if AllWOLoansNetViz}} {{else}} {{/if}}\n {{#if AllWOOutsidesNetViz}} {{else}} {{/if}}\n {{#if AllWOTotalNets}} {{else}} {{/if}}\n \n \n \n\n
WO#:Customer:Service Date:ThisWO AllLabors NetViz:ThisWO AllParts NetViz:ThisWO AllTravels NetViz:ThisWO AllExpsNet ChargeAmount:ThisWO AllLoans NetViz:ThisWO AllOutsides NetViz:ThisWOTotalNets
{{Serial}}{{CustomerViz}}{{ayDate ServiceDate}}no Service Date specified{{ayCurrency ThisWOAllLaborsNetViz}}no billable Labor in this workorder{{ayCurrency ThisWOAllPartsNetViz}}no billable Parts in this workorder{{ayCurrency ThisWOAllTravelsNetViz}}no billable Travel in this workorder{{ayCurrency ThisWOAllExpsNetChargeAmount}}no billable misc expenses in this workorder{{ayCurrency ThisWOAllLoansNetViz}}no billable Loan in this workorder{{ayCurrency ThisWOAllOutsidesNetViz}}no billable Outside Service in this workorder{{ayCurrency ThisWOTotalNets}}no billable charges in this workorder
Totals for all workorders in this report{{ ayCurrency AllWOLaborsNetViz }}$0.00{{ ayCurrency AllWOPartsNetViz }}$0.00{{ ayCurrency AllWOTravelsNetViz }}$0.00{{ ayCurrency AllWOExpsNetChargeAmount }}$0.00{{ ayCurrency AllWOLoansNetViz }}$0.00{{ ayCurrency AllWOOutsidesNetViz }}$0.00{{ ayCurrency AllWOTotalNets }}$0.00
\n \n\t
\n\n","Style":".singlePage\n{\npage-break-after: always;\n}\n\ntable { \n font-family: 'Helvetica Neue', 'Helvetica', Helvetica, Arial, sans-serif;\n border-collapse: collapse;\n white-space: pre-wrap;\n width: 100%;\n \n }\n\nthead {\n display: table-header-group; /* so as to print the table-header on all subsequent pages */\n}\n\n.heading {\n border-style: solid;\n border-width: 1pt;\n border-color: #e8e5e5; \n margin: 11pt;\n background-color: #e8e5e5;\n padding: 5pt; \n font-size: 11pt; \n text-align: center;\n} \n\ntbody tr:nth-child(even) {\n font-size: 9pt;\n background-color: lightgray; /* MUST checkmark Print background in PDF Options for this to show */\n height: 50px;\n} \ntbody tr:nth-child(odd) {\n font-size: 9pt;\n background-color: lightgoldenrodyellow; /* MUST checkmark Print background in PDF Options for this to show */\n height: 50px;\n} \n\n.nodata {\n font-size: 7pt;\n}\n\ntfoot {\n border-top: 2px solid black;\n}\n\n.fontgreen {\n color: green;\n}\n.fontblue {\n color: blue;\n}\n.fontred {\n color:red;\n}\n\n\n.rightlean {\n text-align: right;\n}\n.leftlean {\n text-align: left;\n}\n.centerlean {\n text-align: center;\n}","JsPrerender":"async function ayPrepareData(reportData){ \n //this function (if present) is called with the report data \n //before the report is rendered\n //modify data as required here and return it to change the data before the report renders\n //see the help documentation for details\n\n\n//********************//NOTE if you customize this report template and do NOT need a function or key identified below, remove to increase report performance\n\n//below declares a key on the entire wo to hold all Labor Net Viz from all workorders so it exists\nreportData.AllWOLaborsNetViz = 0;\n//below declares a key on the entire wo to hold all Part Net Viz from all workorders so it exists\nreportData.AllWOPartsNetViz = 0;\n//below declares a key on the entire wo to hold all Travel Net Viz from all workorders so it exists\nreportData.AllWOTravelsNetViz = 0;\n//below declares a key on the entire wo to hold all Exp Net ChargeAmount from all workorders so it exists\nreportData.AllWOExpsNetChargeAmount = 0;\n//below declares a key on the entire wo to hold all Loan Net Viz from all workorders so it exists\nreportData.AllWOLoansNetViz = 0;\n//below declares a key on the entire wo to hold all OutsideServices Net Viz from all workorders so it exists\nreportData.AllWOOutsidesNetViz = 0;\n\n//below declares a key to hold all Nets from all workorders in this list so it exists\nreportData.AllWOTotalNets = 0;\n\n\n\n\n\nfor (EachWO of reportData.ayReportData) \n\t{\n\t//below declares a key on the entire wo to hold all Labor Net Viz from all Items in this wo so it exists\n\tEachWO.ThisWOAllLaborsNetViz = 0;\n\t//below declares a key on the entire wo to hold all Part Net Viz from all Items in this wo so it exists\n\tEachWO.ThisWOAllPartsNetViz = 0;\n\t//below declares a key on the entire wo to hold all Travel Net Viz from all Items in this wo so it exists\n\tEachWO.ThisWOAllTravelsNetViz = 0;\n\t//below declares a key on the entire wo to hold all Exp Net ChargeAmount from all Items in this wo so it exists\n\tEachWO.ThisWOAllExpsNetChargeAmount = 0;\n\t//below declares a key on the entire wo to hold all Loan Net Viz from all Items in this wo so it exists\n\tEachWO.ThisWOAllLoansNetViz = 0;\n\t//below declares a key on the entire wo to hold all Outside Net Viz from all Items in this wo so it exists\n\tEachWO.ThisWOAllOutsidesNetViz = 0;\t\n\n\t//below declares a key on the entire wo to hold ALL of THIS workorder's Nets so it exists\n\tEachWO.ThisWOTotalNets = 0;\n\n\n\t//below is to Iterate through each item of the wo's Items\n\tfor (Item of EachWO.Items)\n\t\t{\n\t\t\tItem.ThisItemAllLaborsNetViz = 0; //declare a key on the Item to hold all of this item's labor nets and set it initially to 0 \n\t\t\t\n\t\t\t//below is to Iterate through each labor record of the wo's Item\n\t\t\tfor (Labor of Item.Labors)\n\t\t\t{\n\t\t\t//make sure it has a value before attempting to add it to the running total\n \tif (Labor.NetViz != null) \n \t \t{\n \t \tItem.ThisItemAllLaborsNetViz += Labor.NetViz; //this IS where the actual adding to running total for this WOItem's Net Labors\n\t\t\t\t\t\tEachWO.ThisWOAllLaborsNetViz += Labor.NetViz; //this IS where the actual adding to the running total for this entire WO's Net Labors\n\t\t\t\t\t\tEachWO.ThisWOTotalNets += Labor.NetViz; //this IS where the actual adding to the running total for ALL NETS for THIS workorders in this report data\n\n\t\t\t\t\t\treportData.AllWOLaborsNetViz += Labor.NetViz;\t//this IS where the actual adding to the running total for all labor for ALL workorders in this report data\t\t\t\n\t\t\t\t\t\treportData.AllWOTotalNets += Labor.NetViz; //this is where the actual adding to the running total for ALL workorders Nets in this report data\t\t\t\t\t\n\n \t \t\t}\t\t//NOTE if you customize this report template and do NOT need a key above, remove it to increase report performance\t\t\n\t\t\t}\n\n\t\t\tItem.ThisItemAllPartsNetViz = 0; //declare a key on the Item to hold all of this item's parts nets and set it initially to 0 \n\t\t\t\n\t\t\t//below is to Iterate through each Part record of the wo's Item\n\t\t\tfor (Part of Item.Parts)\n\t\t\t{\n\t\t\t//make sure it has a value before attempting to add it to the running total\n \tif (Part.NetViz != null) \n \t \t{\n \t \tItem.ThisItemAllPartsNetViz += Part.NetViz; //this IS where the actual adding to running total for this WOItem's Net Parts\n\t\t\t\t\t\tEachWO.ThisWOAllPartsNetViz += Part.NetViz;//this IS where the actual adding to the running total for this entire WO's Net Parts\n\t\t\t\t\t\tEachWO.ThisWOTotalNets += Part.NetViz; //this IS where the actual adding to the running total for ALL NETS for THIS workorders in this report data\n\t\t\t\t\t\t\n\t\t\t\t\t\treportData.AllWOPartsNetViz += Part.NetViz; //this IS where the actual adding to the running total for all Parts for all workorders in this report data\t\n\t\t\t\t\t\treportData.AllWOTotalNets += Part.NetViz; //this is where the actual adding to the running total for all workorder Nets in this report data\n\n \t \t\t}\t\t\t\t//NOTE if you customize this report template and do NOT need a key above, remove it to increase report performance\t\n\t\t\t}\n\n\t\t\tItem.ThisItemAllTravelsNetViz = 0; //declare a key on the Item to hold all of this item's travel nets and set it initially to 0 \n\t\t\t\n\t\t\t//below is to Iterate through each Travel record of the wo's Item\n\t\t\tfor (Travel of Item.Travels)\n\t\t\t{\n\t\t\t//make sure it has a value before attempting to add it to the running total\n \tif (Travel.NetViz != null) \n \t \t{\n\t\t\t\t\t\t\n \t \tItem.ThisItemAllTravelsNetViz += Travel.NetViz;//this IS where the actual adding to running total for this WOItem's Net Travels\n\t\t\t\t\t\tEachWO.ThisWOAllTravelsNetViz += Travel.NetViz;//this IS where the actual adding to the running total for this entire WO's Net Travels\n\t\t\t\t\t\tEachWO.ThisWOTotalNets += Travel.NetViz;//this IS where the actual adding to the running total for ALL NETS for THIS workorders in this report data\n\n\t\t\t\t\t\treportData.AllWOTravelsNetViz += Travel.NetViz;\t//this IS where the actual adding to the running total for all Travels for all workorders in this report data\t\t\t\n\t\t\t\t\t\treportData.AllWOTotalNets += Travel.NetViz; //this is where the actual adding to the running total for all workorder Nets in this report data\n\n \t \t\t}\t\t\t\t//NOTE if you customize this report template and do NOT need a key above, remove it to increase report performance\t\n\t\t\t}\n\n\t\t\t//note additional statements for misc expense to ONLY add to running totals if ChargeToCustomer is true\n\t\t\t\n\t\t\tItem.ThisItemAllExpsNetChargeAmount = 0; //declare a key on the Item to hold all of this item's misc nets and set it initially to 0 \n\t\t\t\n\t\t\t//below is to Iterate through each Exp record of the wo's Item\n\t\t\tfor (Exp of Item.Expenses)\n\t\t\t{\n\t\t\t//if this expense has a ChargeAmount value AND the ChargeToCustomer is true then adds the ChargeAmount to running totals\n \tif (Exp.ChargeAmount != null && Exp.ChargeToCustomer == true) \n \t \t{\n\t\t\t\t\t\t\n \t \tItem.ThisItemAllExpsNetChargeAmount += Exp.ChargeAmount;//this IS where the actual adding to running total for this WOItem's Net Exps\n\t\t\t\t\t\tEachWO.ThisWOAllExpsNetChargeAmount += Exp.ChargeAmount;//this IS where the actual adding to the running total for this entire WO's Net ChargeAmounts\n\t\t\t\t\t\tEachWO.ThisWOTotalNets += Exp.ChargeAmount;//this IS where the actual adding to the running total for ALL NET ChargeAmountS for THIS workorders in this report data\n\n\t\t\t\t\t\treportData.AllWOExpsNetChargeAmount += Exp.ChargeAmount;//this IS where the actual adding to the running total for all Exp ChargeAmount for all workorders in this report data\t\t\t\t\n\t\t\t\t\t\treportData.AllWOTotalNets += Exp.ChargeAmount;//this is where the actual adding to the running total for all workorder Net ChargeAmount in this report data\n\n \t \t\t}\t\t\t\t//NOTE if you customize this report template and do NOT need a key above, remove it to increase report performance\t\n\n\n\n\t\t\t}\n\n\t\t\t\n\t\t\tItem.ThisItemAllLoansNetViz = 0; //declare a key on the Item to hold all of this item's loans nets and set it initially to 0 \n\t\t\t\n\t\t\t//below is to Iterate through each Loan record of the wo's Item\n\t\t\tfor (Loan of Item.Loans)\n\t\t\t{\n\t\t\t//make sure it has a value before attempting to add it to the running total\n \tif (Loan.NetViz != null) \n \t \t{\n \t \tItem.ThisItemAllLoansNetViz += Loan.NetViz;//this IS where the actual adding to running total for this WOItem's Net Loans\n\t\t\t\t\t\tEachWO.ThisWOAllLoansNetViz += Loan.NetViz;//this IS where the actual adding to the running total for this entire WO's Net Loans\n\t\t\t\t\t\tEachWO.ThisWOTotalNets += Loan.NetViz;//this IS where the actual adding to the running total for ALL NETS for THIS workorders in this report data\n\n\t\t\t\t\t\treportData.AllWOLoansNetViz += Loan.NetViz;\t\t//this IS where the actual adding to the running total for all Loans for all workorders in this report data\t\t\n\t\t\t\t\t\treportData.AllWOTotalNets += Loan.NetViz;//this is where the actual adding to the running total for all workorder Nets in this report data\n\n \t \t\t}\t\t\t\t//NOTE if you customize this report template and do NOT need a key above, remove it to increase report performance\t\n\t\t\t}\n\n\t\t\tItem.ThisItemAllOutsidesNetViz = 0; //declare a key on the Item to hold all of this item's Outsie nets and set it initially to 0 \n\t\t\t\n\t\t\t//below is to Iterate through each Outside record of the wo's Item\n\t\t\tfor (Outside of Item.OutsideServices)\n\t\t\t{\n\t\t\t//make sure it has a value before attempting to add it to the running total\n \tif (Outside.NetViz != null) \n \t \t{\n\t\t\t\t\t\t\n \t \tItem.ThisItemAllOutsidesNetViz += Outside.NetViz;//this IS where the actual adding to running total for this WOItem's Net Outside\n\t\t\t\t\t\tEachWO.ThisWOAllOutsidesNetViz += Outside.NetViz;//this IS where the actual adding to the running total for this entire WO's Net Outsides\n\t\t\t\t\t\tEachWO.ThisWOTotalNets += Outside.NetViz;//this IS where the actual adding to the running total for ALL NETS for THIS workorders in this report data\n\n\t\t\t\t\t\treportData.AllWOOutsidesNetViz += Outside.NetViz;\t//this IS where the actual adding to the running total for all Outside for all workorders in this report data\t\t\t\n\t\t\t\t\t\treportData.AllWOTotalNets += Outside.NetViz;//this is where the actual adding to the running total for all workorder Nets in this report data\n\n \t \t\t}\t\t\t\t//NOTE if you customize this report template and do NOT need a key above, remove it to increase report performance\t\n\t\t\t}\n\t\t}\n\t}\n\t\n\n return reportData;\n}","JsHelpers":"//Register custom Handlebars helpers here to use in your report script\n//https://handlebarsjs.com/guide/#custom-helpers\nHandlebars.registerHelper('loud', function (aString) {\n return aString.toUpperCase()\n})","RenderType":0,"HeaderTemplate":"    Todays date:    set in PDF Options","FooterTemplate":"  set in PDF Options  Page  of     ","DisplayHeaderFooter":true,"PaperFormat":10,"Landscape":true,"MarginOptionsBottom":"10mm","MarginOptionsLeft":"10mm","MarginOptionsRight":"10mm","MarginOptionsTop":"10mm","PageRanges":null,"PreferCSSPageSize":false,"PrintBackground":true,"Scale":1.00000} \ No newline at end of file diff --git a/server/AyaNova/resource/rpt/stock-report-templates/112 EXAMPLE WO single line per wo Nets Taxes Totals.ayrt b/server/AyaNova/resource/rpt/stock-report-templates/112 EXAMPLE WO single line per wo Nets Taxes Totals.ayrt deleted file mode 100644 index 21799ad0..00000000 --- a/server/AyaNova/resource/rpt/stock-report-templates/112 EXAMPLE WO single line per wo Nets Taxes Totals.ayrt +++ /dev/null @@ -1 +0,0 @@ -{"Name":"💡112 EXAMPLE WO single line per wo Nets Taxes Totals","Active":true,"Notes":"Example of single line per WO of net labors, parts, travel, exps, loans, outsides, before tax net totals, taxas, taxbs, and that WO's all totaled with corresponding Prepare functions to obtain.\nWith Grand Totals at bottom of ALL listed wo's net labors, parts, travel, exps, loans, outsides, before tax net totals, taxas, taxbs, all WOs totals with corresponding Prepare functions to obtain.\nPDF options header & footer example; CSS tbody tr:nth-child striped table rows","Roles":124927,"AType":34,"IncludeWoItemDescendants":false,"Template":"\n\n\t
\t \n

Nets Taxes and Totals for each WO in report

\n\t\t \n \t\t\n \n \n\t\t\t \n \n \n \n \n \n \n \n \n \n \n \n \n \t \n \n {{#each ayReportData}}\n \n \n\t\t\t \n {{#if ServiceDate }}{{else}} {{/if}}\n\t\t\t {{#if ThisWOAllLaborsNetViz }} {{else}} {{/if}} \n {{#if ThisWOAllPartsNetViz }} {{else}} {{/if}} \n {{#if ThisWOAllTravelsNetViz }} {{else}} {{/if}} \n {{#if ThisWOAllExpsNetChargeAmount }} {{else}} {{/if}} \n {{#if ThisWOAllLoansNetViz }} {{else}} {{/if}} \n {{#if ThisWOAllOutsidesNetViz }} {{else}} {{/if}}\n {{#if ThisWOTotalNets }} {{else}} {{/if}}\n {{#if ThisWOTotalTaxAs }} {{else}} {{/if}} \n {{#if ThisWOTotalTaxBs }} {{else}} {{/if}} \n {{#if ThisWOTotalGrand }} {{else}} {{/if}} \n \n {{/each}}\n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n {{#if AllWOLaborsNetViz}} {{else}} {{/if}}\n {{#if AllWOPartsNetViz}} {{else}} {{/if}}\n {{#if AllWOTravelsNetViz}} {{else}} {{/if}}\n {{#if AllWOExpsNetChargeAmount}} {{else}} {{/if}}\n {{#if AllWOLoansNetViz}} {{else}} {{/if}}\n {{#if AllWOOutsidesNetViz}} {{else}} {{/if}}\n {{#if AllWOTotalNets}} {{else}} {{/if}}\n {{#if AllWOTotalTaxAs}} {{else}} {{/if}}\n {{#if AllWOTotalTaxBs }} {{else}} {{/if}}\n {{#if AllWOTotalGrand}} {{else}} {{/if}}\n \n \n \n\n
WO#:Customer:Service Date:ThisWO AllLabors NetViz:ThisWO AllParts NetViz:ThisWO AllTravels NetViz:ThisWO AllExpsNet ChargeAmount:ThisWO AllLoans NetViz:ThisWO AllOutsides NetViz:ThisWOTotalNetsThisWO AllTaxA:ThisWO AllTaxB:ThisWO GrandTotal:
{{Serial}}{{CustomerViz}}{{ayDate ServiceDate}}no Service Date specified{{ayCurrency ThisWOAllLaborsNetViz}}no billable Labor in this workorder{{ayCurrency ThisWOAllPartsNetViz}}no billable Parts in this workorder{{ayCurrency ThisWOAllTravelsNetViz}}no billable Travel in this workorder{{ayCurrency ThisWOAllExpsNetChargeAmount}}no billable misc expenses in this workorder{{ayCurrency ThisWOAllLoansNetViz}}no billable Loans in this workorder{{ayCurrency ThisWOAllOutsidesNetViz}}no billable Outside Service in this workorder{{ayCurrency ThisWOTotalNets}}no billable charges in this workorder{{ayCurrency ThisWOTotalTaxAs}}no Tax A in this workorder{{ayCurrency ThisWOTotalTaxBs}}no Tax B charges in this workorder{{ayCurrency ThisWOTotalGrand}}no charges in this workorder
Totals for all workorders in this reportAll Labor NetAll Parts NetAll Travel NetAll Exp NetAll Loan NetAll Outside NetAll NetsAll Tax AAll Tax BAll Grand Total
{{ ayCurrency AllWOLaborsNetViz }}$0.00{{ ayCurrency AllWOPartsNetViz }}$0.00{{ ayCurrency AllWOTravelsNetViz }}$0.00{{ ayCurrency AllWOExpsNetChargeAmount }}$0.00{{ ayCurrency AllWOLoansNetViz }}$0.00{{ ayCurrency AllWOOutsidesNetViz }}$0.00{{ ayCurrency AllWOTotalNets }}$0.00{{ ayCurrency AllWOTotalTaxAs }}$0.00{{ ayCurrency AllWOTotalTaxBs }}$0.00{{ ayCurrency AllWOTotalGrand }}$0.00
\n \n\t
\n\n","Style":".singlePage\n{\npage-break-after: always;\n}\n\ntable { \n font-family: 'Helvetica Neue', 'Helvetica', Helvetica, Arial, sans-serif;\n border-collapse: collapse;\n white-space: pre-wrap;\n width: 100%;\n \n }\n\nthead {\n display: table-header-group; /* so as to print the table-header on all subsequent pages */\n}\n\n.heading {\n border-style: solid;\n border-width: 1pt;\n border-color: #e8e5e5; \n margin: 11pt;\n background-color: #e8e5e5;\n padding: 5pt; \n font-size: 11pt; \n text-align: center;\n} \n\ntbody tr:nth-child(even) {\n font-size: 9pt;\n background-color: lightgray; /* MUST checkmark Print background in PDF Options for this to show */\n height: 50px;\n} \ntbody tr:nth-child(odd) {\n font-size: 9pt;\n background-color: lightgoldenrodyellow; /* MUST checkmark Print background in PDF Options for this to show */\n height: 50px;\n} \n\n.nodata {\n font-size: 7pt;\n}\n\ntfoot {\n border-top: 2px solid black;\n}\n\n.fontgreen {\n color: green;\n}\n.fontblue {\n color: blue;\n}\n.fontred {\n color:red;\n}\n\n\n.rightlean {\n text-align: right;\n}\n.leftlean {\n text-align: left;\n}\n.centerlean {\n text-align: center;\n}","JsPrerender":"async function ayPrepareData(reportData){ \n //this function (if present) is called with the report data \n //before the report is rendered\n //modify data as required here and return it to change the data before the report renders\n //see the help documentation for details\n\n\n//********************//NOTE if you customize this report template and do NOT need a function or key identified below, remove to increase report performance\n\n//below declares a key on the entire wo to hold all Labor Net Viz from all workorders so it exists\nreportData.AllWOLaborsNetViz = 0;\n//below declares a key on the entire wo to hold all Part Net Viz from all workorders so it exists\nreportData.AllWOPartsNetViz = 0;\n//below declares a key on the entire wo to hold all Travel Net Viz from all workorders so it exists\nreportData.AllWOTravelsNetViz = 0;\n//below declares a key on the entire wo to hold all Exp Net ChargeAmount from all workorders so it exists\nreportData.AllWOExpsNetChargeAmount = 0;\n//below declares a key on the entire wo to hold all Loan Net Viz from all workorders so it exists\nreportData.AllWOLoansNetViz = 0;\n//below declares a key on the entire wo to hold all OutsideServices Net Viz from all workorders so it exists\nreportData.AllWOOutsidesNetViz = 0;\n\n//below declares a key to hold all Nets from all workorders in this list so it exists\nreportData.AllWOTotalNets = 0;\n\n//below declares a key to hold all Tax As from all workorders in this list so it exists\nreportData.AllWOTotalTaxAs = 0;\n//below declares a key to hold all Tax Bs from all workorders in this list so it exists\nreportData.AllWOTotalTaxBs = 0;\n//below declares a key to hold all GrandTotal from all workorders in this list so it exists\nreportData.AllWOTotalGrand = 0;\n\n\n\nfor (EachWO of reportData.ayReportData) \n\t{\n\t//below declares a key on the entire wo to hold all Labor Net Viz from all Items in this wo so it exists\n\tEachWO.ThisWOAllLaborsNetViz = 0;\n\t//below declares a key on the entire wo to hold all Part Net Viz from all Items in this wo so it exists\n\tEachWO.ThisWOAllPartsNetViz = 0;\n\t//below declares a key on the entire wo to hold all Travel Net Viz from all Items in this wo so it exists\n\tEachWO.ThisWOAllTravelsNetViz = 0;\n\t//below declares a key on the entire wo to hold all Exp Net ChargeAmount from all Items in this wo so it exists\n\tEachWO.ThisWOAllExpsNetChargeAmount = 0;\n\t//below declares a key on the entire wo to hold all Loan Net Viz from all Items in this wo so it exists\n\tEachWO.ThisWOAllLoansNetViz = 0;\n\t//below declares a key on the entire wo to hold all Outside Net Viz from all Items in this wo so it exists\n\tEachWO.ThisWOAllOutsidesNetViz = 0;\t\n\n\t//below declares a key on the entire wo to hold ALL of THIS workorder's Nets so it exists\n\tEachWO.ThisWOTotalNets = 0;\n\n\t//below declares a key on the entire wo to hold THIS workorder's Tax A (for all items) so it exists \n\tEachWO.ThisWOTotalTaxAs = 0;\n\t//below declares a key on the entire wo to hold THIS workorder's Tax B (for all items) so it exists\n\tEachWO.ThisWOTotalTaxBs = 0;\t\n\t//below declares a key on the entire wo to hold THIS workorder's Grand Total so it exists\n\tEachWO.ThisWOTotalGrand = 0;\n\n\t//below is to Iterate through each item of the wo's Items\n\tfor (Item of EachWO.Items)\n\t\t{\n\t\t\tItem.ThisItemAllLaborsNetViz = 0; //declare a key on the Item to hold all of this item's labor nets and set it initially to 0 \n\t\t\t\n\t\t\t//below is to Iterate through each labor record of the wo's Item\n\t\t\tfor (Labor of Item.Labors)\n\t\t\t{\n\t\t\t//make sure it has a value before attempting to add it to the running total\n \tif (Labor.NetViz != null) \n \t \t{\n \t \tItem.ThisItemAllLaborsNetViz += Labor.NetViz; //this IS where the actual adding to running total for this WOItem's Net Labors\n\t\t\t\t\t\tEachWO.ThisWOAllLaborsNetViz += Labor.NetViz; //this IS where the actual adding to the running total for this entire WO's Net Labors\n\t\t\t\t\t\tEachWO.ThisWOTotalNets += Labor.NetViz; //this IS where the actual adding to the running total for ALL NETS for THIS workorders in this report data\n\t\t\t\t\t\tEachWO.ThisWOTotalGrand += Labor.NetViz; //this IS where the actual adding to the running total for GrandTotal for THIS workorders in this report data\t\n\t\t\t\t\t\treportData.AllWOLaborsNetViz += Labor.NetViz;\t//this IS where the actual adding to the running total for all labor for ALL workorders in this report data\t\t\t\n\t\t\t\t\t\treportData.AllWOTotalNets += Labor.NetViz; //this is where the actual adding to the running total for ALL workorders Nets in this report data\t\t\t\t\t\n\t\t\t\t\t\treportData.AllWOTotalGrand += Labor.NetViz; //this is where the actual adding to the running GRAND TOTAL for ALL workorders Grand Totals in this report data\n\t\t\t\t\t\t\n\t\t\t\t\t\tEachWO.ThisWOTotalTaxAs += Labor.TaxAViz; //this IS where the actual adding of Labor's Tax A to the running total for ALL Tax A for THIS workorders in this report data\n\t\t\t\t\t\tEachWO.ThisWOTotalGrand += Labor.TaxAViz; //this IS where the actual adding of Labor's Tax A to the running total for GrandTotal for THIS workorders in this report data\n\t\t\t\t\t\treportData.AllWOTotalTaxAs += Labor.TaxAViz; //this is where the actual adding to the running GRAND TOTAL for ALL workorders Tax As in this report data\n\t\t\t\t\t\treportData.AllWOTotalGrand += Labor.TaxAViz; //this is where the actual adding to the running GRAND TOTAL for ALL workorders Grand Totals in this report data\n\t\t\t\t\t\t\n\t\t\t\t\t\tEachWO.ThisWOTotalTaxBs += Labor.TaxBViz; //this IS where the actual adding of Labor's Tax B to the running total for ALL Tax B for THIS workorders in this report data\n\t\t\t\t\t\tEachWO.ThisWOTotalGrand += Labor.TaxBViz; //this IS where the actual adding of Labor's Tax B to the running total for GrandTotal for THIS workorders in this report data\n\t\t\t\t\t\treportData.AllWOTotalTaxBs += Labor.TaxBViz; //this is where the actual adding to the running GRAND TOTAL for ALL workorders Tax Bs in this report data\n\t\t\t\t\t\treportData.AllWOTotalGrand += Labor.TaxBViz; //this is where the actual adding to the running GRAND TOTAL for ALL workorders Grand Totals in this report data\n \t \t\t}\t\t//NOTE if you customize this report template and do NOT need a key above, remove it to increase report performance\t\t\n\t\t\t}\n\n\t\t\tItem.ThisItemAllPartsNetViz = 0; //declare a key on the Item to hold all of this item's parts nets and set it initially to 0 \n\t\t\t\n\t\t\t//below is to Iterate through each Part record of the wo's Item\n\t\t\tfor (Part of Item.Parts)\n\t\t\t{\n\t\t\t//make sure it has a value before attempting to add it to the running total\n \tif (Part.NetViz != null) \n \t \t{\n \t \tItem.ThisItemAllPartsNetViz += Part.NetViz; //this IS where the actual adding to running total for this WOItem's Net Parts\n\t\t\t\t\t\tEachWO.ThisWOAllPartsNetViz += Part.NetViz;//this IS where the actual adding to the running total for this entire WO's Net Parts\n\t\t\t\t\t\tEachWO.ThisWOTotalNets += Part.NetViz; //this IS where the actual adding to the running total for ALL NETS for THIS workorders in this report data\n\t\t\t\t\t\tEachWO.ThisWOTotalGrand += Part.NetViz; //this IS where the actual adding to the running total for GrandTotal for THIS workorders in this report data\t\t\t\t\t\t\n\t\t\t\t\t\treportData.AllWOPartsNetViz += Part.NetViz; //this IS where the actual adding to the running total for all Parts for all workorders in this report data\t\n\t\t\t\t\t\treportData.AllWOTotalNets += Part.NetViz; //this is where the actual adding to the running total for all workorder Nets in this report data\n\t\t\t\t\t\treportData.AllWOTotalGrand += Part.NetViz; //this is where the actual adding to the running GRAND TOTAL for ALL workorders Grand Totals in this report data\n\n\t\t\t\t\t\tEachWO.ThisWOTotalTaxAs += Part.TaxAViz; //this IS where the actual adding of Part's Tax A to the running total for ALL Tax A for THIS workorders in this report data\n\t\t\t\t\t\tEachWO.ThisWOTotalGrand += Part.TaxAViz; //this IS where the actual adding of Part's Tax A to the running total for GrandTotal for THIS workorders in this report data\n\t\t\t\t\t\treportData.AllWOTotalTaxAs += Part.TaxAViz; //this is where the actual adding to the running GRAND TOTAL for ALL workorders Tax As in this report data\n\t\t\t\t\t\treportData.AllWOTotalGrand += Part.TaxAViz; //this is where the actual adding to the running GRAND TOTAL for ALL workorders Grand Totals in this report data\n\t\t\t\t\t\t\n\t\t\t\t\t\tEachWO.ThisWOTotalTaxBs += Part.TaxBViz; //this IS where the actual adding of Part's Tax B to the running total for ALL Tax B for THIS workorders in this report data\n\t\t\t\t\t\tEachWO.ThisWOTotalGrand += Part.TaxBViz; //this IS where the actual adding of Part's Tax B to the running total for GrandTotal for THIS workorders in this report data\n\t\t\t\t\t\treportData.AllWOTotalTaxBs += Part.TaxBViz; //this is where the actual adding to the running GRAND TOTAL for ALL workorders Tax Bs in this report data\n\t\t\t\t\t\treportData.AllWOTotalGrand += Part.TaxBViz; //this is where the actual adding to the running GRAND TOTAL for ALL workorders Grand Totals in this report data\n \t \t\t}\t\t\t\t//NOTE if you customize this report template and do NOT need a key above, remove it to increase report performance\t\n\t\t\t}\n\n\t\t\tItem.ThisItemAllTravelsNetViz = 0; //declare a key on the Item to hold all of this item's travel nets and set it initially to 0 \n\t\t\t\n\t\t\t//below is to Iterate through each Travel record of the wo's Item\n\t\t\tfor (Travel of Item.Travels)\n\t\t\t{\n\t\t\t//make sure it has a value before attempting to add it to the running total\n \tif (Travel.NetViz != null) \n \t \t{\n\t\t\t\t\t\t\n \t \tItem.ThisItemAllTravelsNetViz += Travel.NetViz;//this IS where the actual adding to running total for this WOItem's Net Travels\n\t\t\t\t\t\tEachWO.ThisWOAllTravelsNetViz += Travel.NetViz;//this IS where the actual adding to the running total for this entire WO's Net Travels\n\t\t\t\t\t\tEachWO.ThisWOTotalNets += Travel.NetViz;//this IS where the actual adding to the running total for ALL NETS for THIS workorders in this report data\n\t\t\t\t\t\tEachWO.ThisWOTotalGrand += Travel.NetViz; //this IS where the actual adding to the running total for GrandTotal for THIS workorders in this report data\n\t\t\t\t\t\treportData.AllWOTravelsNetViz += Travel.NetViz;\t//this IS where the actual adding to the running total for all Travels for all workorders in this report data\t\t\t\n\t\t\t\t\t\treportData.AllWOTotalNets += Travel.NetViz; //this is where the actual adding to the running total for all workorder Nets in this report data\n\t\t\t\t\t\treportData.AllWOTotalGrand += Travel.NetViz; //this is where the actual adding to the running GRAND TOTAL for ALL workorders Grand Totals in this report data\n\n\t\t\t\t\t\tEachWO.ThisWOTotalTaxAs += Travel.TaxAViz; //this IS where the actual adding of Travel's Tax A to the running total for ALL Tax A for THIS workorders in this report data\n\t\t\t\t\t\tEachWO.ThisWOTotalGrand += Travel.TaxAViz; //this IS where the actual adding of Travel's Tax A to the running total for GrandTotal for THIS workorders in this report data\n\t\t\t\t\t\treportData.AllWOTotalTaxAs += Travel.TaxAViz; //this is where the actual adding to the running GRAND TOTAL for ALL workorders Tax As in this report data\n\t\t\t\t\t\treportData.AllWOTotalGrand += Travel.TaxAViz; //this is where the actual adding to the running GRAND TOTAL for ALL workorders Grand Totals in this report data\n\t\t\t\t\t\t\n\t\t\t\t\t\tEachWO.ThisWOTotalTaxBs += Travel.TaxBViz; //this IS where the actual adding of Travel's Tax B to the running total for ALL Tax B for THIS workorders in this report data\n\t\t\t\t\t\tEachWO.ThisWOTotalGrand += Travel.TaxBViz; //this IS where the actual adding of Travel's Tax B to the running total for GrandTotal for THIS workorders in this report data\n\t\t\t\t\t\treportData.AllWOTotalTaxBs += Travel.TaxBViz; //this is where the actual adding to the running GRAND TOTAL for ALL workorders Tax Bs in this report data\n\t\t\t\t\t\treportData.AllWOTotalGrand += Travel.TaxBViz; //this is where the actual adding to the running GRAND TOTAL for ALL workorders Grand Totals in this report data\n \t \t\t}\t\t\t\t//NOTE if you customize this report template and do NOT need a key above, remove it to increase report performance\t\n\t\t\t}\n\n\t\t\t//note additional statements for misc expense to ONLY add to running totals if ChargeToCustomer is true\n\t\t\t\n\t\t\tItem.ThisItemAllExpsNetChargeAmount = 0; //declare a key on the Item to hold all of this item's misc nets and set it initially to 0 \n\t\t\t\n\t\t\t//below is to Iterate through each Exp record of the wo's Item\n\t\t\tfor (Exp of Item.Expenses)\n\t\t\t{\n\t\t\t//if this expense has a ChargeAmount value AND the ChargeToCustomer is true then adds the ChargeAmount to running totals\n \tif (Exp.ChargeAmount != null && Exp.ChargeToCustomer == true) \n \t \t{\n\t\t\t\t\t\t\n \t \tItem.ThisItemAllExpsNetChargeAmount += Exp.ChargeAmount;//this IS where the actual adding to running total for this WOItem's Net Exps\n\t\t\t\t\t\tEachWO.ThisWOAllExpsNetChargeAmount += Exp.ChargeAmount;//this IS where the actual adding to the running total for this entire WO's Net ChargeAmounts\n\t\t\t\t\t\tEachWO.ThisWOTotalNets += Exp.ChargeAmount;//this IS where the actual adding to the running total for ALL NET ChargeAmountS for THIS workorders in this report data\n\t\t\t\t\t\tEachWO.ThisWOTotalGrand += Exp.ChargeAmount; //this IS where the actual adding to the running total for GrandTotal for THIS workorders in this report data\n\t\t\t\t\t\treportData.AllWOExpsNetChargeAmount += Exp.ChargeAmount;//this IS where the actual adding to the running total for all Exp ChargeAmount for all workorders in this report data\t\t\t\t\n\t\t\t\t\t\treportData.AllWOTotalNets += Exp.ChargeAmount;//this is where the actual adding to the running total for all workorder Net ChargeAmount in this report data\n\t\t\t\t\t\treportData.AllWOTotalGrand += Exp.ChargeAmount; //this is where the actual adding to the running GRAND TOTAL for ALL workorders Grand Totals in this report data\n \t \t\t}\t\t\t\t//NOTE if you customize this report template and do NOT need a key above, remove it to increase report performance\t\n\n\t\t\t//if this expense the ChargeToCustomer is true AND ChargeTaxCode has a value then adds the TaxAViz and TaxBViz to running totals\t\t\n\t\t\t\t\tif (Exp.ChargeToCustomer == true && Exp.ChargeTaxCodeId != null ) \n \t \t{\n\t\t\t\t\t\tEachWO.ThisWOTotalTaxAs += Exp.TaxAViz; //this IS where the actual adding of Exp's Tax A to the running total for ALL Tax A for THIS workorders in this report data\n\t\t\t\t\t\tEachWO.ThisWOTotalGrand += Exp.TaxAViz; //this IS where the actual adding of Exp's Tax A to the running total for GrandTotal for THIS workorders in this report data\n\t\t\t\t\t\treportData.AllWOTotalTaxAs += Exp.TaxAViz; //this is where the actual adding to the running GRAND TOTAL for ALL workorders Tax As in this report data\n\t\t\t\t\t\treportData.AllWOTotalGrand += Exp.TaxAViz; //this is where the actual adding to the running GRAND TOTAL for ALL workorders Grand Totals in this report data\n\t\t\t\t\t\t\n\t\t\t\t\t\tEachWO.ThisWOTotalTaxBs += Exp.TaxBViz; //this IS where the actual adding of Exp's Tax B to the running total for ALL Tax B for THIS workorders in this report data\n\t\t\t\t\t\tEachWO.ThisWOTotalGrand += Exp.TaxBViz; //this IS where the actual adding of Exp's Tax B to the running total for GrandTotal for THIS workorders in this report data\n\t\t\t\t\t\treportData.AllWOTotalTaxBs += Exp.TaxBViz; //this is where the actual adding to the running GRAND TOTAL for ALL workorders Tax Bs in this report data\n\t\t\t\t\t\treportData.AllWOTotalGrand += Exp.TaxBViz; //this is where the actual adding to the running GRAND TOTAL for ALL workorders Grand Totals in this report data\n \t \t\t}\t\t\t\t//NOTE if you customize this report template and do NOT need a key above, remove it to increase report performance\t\n\t\t\t\t\telse if (Exp.ChargeToCustomer == true && Exp.ChargeTaxCodeId == null ) //else if ChargeToCustomer is true AND ChargeTaxCodeID is null, then add TaxPaid to TaxA running total and Grand Total\t\t\n\t\t\t\t\t\t{\n\t\t\t\t\t\tEachWO.ThisWOTotalTaxAs += Exp.TaxPaid; //this IS where the actual adding of Exp's TaxPaid to the running total for ALL Tax A for THIS workorders in this report data\n\t\t\t\t\t\tEachWO.ThisWOTotalGrand += Exp.TaxPaid; //this IS where the actual adding of Exp's TaxPaid to the running total for GrandTotal for THIS workorders in this report data\n\t\t\t\t\t\treportData.AllWOTotalTaxAs += Exp.TaxPaid; //this is where the actual adding to the running GRAND TOTAL for ALL workorders Tax As in this report data\n\t\t\t\t\t\treportData.AllWOTotalGrand += Exp.TaxPaid; //this is where the actual adding to the running GRAND TOTAL for ALL workorders Grand Totals in this report data\n\n\t\t\t\t\t\t}\n\n\t\t\t}\n\n\t\t\t\n\t\t\tItem.ThisItemAllLoansNetViz = 0; //declare a key on the Item to hold all of this item's loans nets and set it initially to 0 \n\t\t\t\n\t\t\t//below is to Iterate through each Loan record of the wo's Item\n\t\t\tfor (Loan of Item.Loans)\n\t\t\t{\n\t\t\t//make sure it has a value before attempting to add it to the running total\n \tif (Loan.NetViz != null) \n \t \t{\n \t \tItem.ThisItemAllLoansNetViz += Loan.NetViz;//this IS where the actual adding to running total for this WOItem's Net Loans\n\t\t\t\t\t\tEachWO.ThisWOAllLoansNetViz += Loan.NetViz;//this IS where the actual adding to the running total for this entire WO's Net Loans\n\t\t\t\t\t\tEachWO.ThisWOTotalNets += Loan.NetViz;//this IS where the actual adding to the running total for ALL NETS for THIS workorders in this report data\n\t\t\t\t\t\tEachWO.ThisWOTotalGrand += Loan.NetViz; //this IS where the actual adding to the running total for GrandTotal for THIS workorders in this report data\n\t\t\t\t\t\treportData.AllWOLoansNetViz += Loan.NetViz;\t\t//this IS where the actual adding to the running total for all Loans for all workorders in this report data\t\t\n\t\t\t\t\t\treportData.AllWOTotalNets += Loan.NetViz;//this is where the actual adding to the running total for all workorder Nets in this report data\n\t\t\t\t\t\treportData.AllWOTotalGrand += Loan.NetViz; //this is where the actual adding to the running GRAND TOTAL for ALL workorders Grand Totals in this report data\n\n\t\t\t\t\t\tEachWO.ThisWOTotalTaxAs += Loan.TaxAViz; //this IS where the actual adding of Loan's Tax A to the running total for ALL Tax A for THIS workorders in this report data\n\t\t\t\t\t\tEachWO.ThisWOTotalGrand += Loan.TaxAViz; //this IS where the actual adding of Loan's Tax A to the running total for GrandTotal for THIS workorders in this report data\n\t\t\t\t\t\treportData.AllWOTotalTaxAs += Loan.TaxAViz; //this is where the actual adding to the running GRAND TOTAL for ALL workorders Tax As in this report data\n\t\t\t\t\t\treportData.AllWOTotalGrand += Loan.TaxAViz; //this is where the actual adding to the running GRAND TOTAL for ALL workorders Grand Totals in this report data\n\t\t\t\t\t\t\n\t\t\t\t\t\tEachWO.ThisWOTotalTaxBs += Loan.TaxBViz; //this IS where the actual adding of Loan's Tax B to the running total for ALL Tax B for THIS workorders in this report data\n\t\t\t\t\t\tEachWO.ThisWOTotalGrand += Loan.TaxBViz; //this IS where the actual adding of Loan's Tax B to the running total for GrandTotal for THIS workorders in this report data\n\t\t\t\t\t\treportData.AllWOTotalTaxBs += Loan.TaxBViz; //this is where the actual adding to the running GRAND TOTAL for ALL workorders Tax Bs in this report data\n\t\t\t\t\t\treportData.AllWOTotalGrand += Loan.TaxBViz; //this is where the actual adding to the running GRAND TOTAL for ALL workorders Grand Totals in this report data\n \t \t\t}\t\t\t\t//NOTE if you customize this report template and do NOT need a key above, remove it to increase report performance\t\n\t\t\t}\n\n\t\t\tItem.ThisItemAllOutsidesNetViz = 0; //declare a key on the Item to hold all of this item's Outsie nets and set it initially to 0 \n\t\t\t\n\t\t\t//below is to Iterate through each Outside record of the wo's Item\n\t\t\tfor (Outside of Item.OutsideServices)\n\t\t\t{\n\t\t\t//make sure it has a value before attempting to add it to the running total\n \tif (Outside.NetViz != null) \n \t \t{\n\t\t\t\t\t\t\n \t \tItem.ThisItemAllOutsidesNetViz += Outside.NetViz;//this IS where the actual adding to running total for this WOItem's Net Outside\n\t\t\t\t\t\tEachWO.ThisWOAllOutsidesNetViz += Outside.NetViz;//this IS where the actual adding to the running total for this entire WO's Net Outsides\n\t\t\t\t\t\tEachWO.ThisWOTotalNets += Outside.NetViz;//this IS where the actual adding to the running total for ALL NETS for THIS workorders in this report data\n\t\t\t\t\t\tEachWO.ThisWOTotalGrand += Outside.NetViz; //this IS where the actual adding to the running total for GrandTotal for THIS workorders in this report data\n\t\t\t\t\t\treportData.AllWOOutsidesNetViz += Outside.NetViz;\t//this IS where the actual adding to the running total for all Outside for all workorders in this report data\t\t\t\n\t\t\t\t\t\treportData.AllWOTotalNets += Outside.NetViz;//this is where the actual adding to the running total for all workorder Nets in this report data\n\t\t\t\t\t\treportData.AllWOTotalGrand += Outside.NetViz; //this is where the actual adding to the running GRAND TOTAL for ALL workorders Grand Totals in this report data\n\n\t\t\t\t\t\tEachWO.ThisWOTotalTaxAs += Outside.TaxAViz; //this IS where the actual adding of Outside's Tax A to the running total for ALL Tax A for THIS workorders in this report data\n\t\t\t\t\t\tEachWO.ThisWOTotalGrand += Outside.TaxAViz; //this IS where the actual adding of Outside's Tax A to the running total for GrandTotal for THIS workorders in this report data\n\t\t\t\t\t\treportData.AllWOTotalTaxAs += Outside.TaxAViz; //this is where the actual adding to the running GRAND TOTAL for ALL workorders Tax As in this report data\n\t\t\t\t\t\treportData.AllWOTotalGrand += Outside.TaxAViz; //this is where the actual adding to the running GRAND TOTAL for ALL workorders Grand Totals in this report data\n\t\t\t\t\t\t\n\t\t\t\t\t\tEachWO.ThisWOTotalTaxBs += Outside.TaxBViz; //this IS where the actual adding of Outside's Tax B to the running total for ALL Tax B for THIS workorders in this report data\n\t\t\t\t\t\tEachWO.ThisWOTotalGrand += Outside.TaxBViz; //this IS where the actual adding of Outside's Tax B to the running total for GrandTotal for THIS workorders in this report data\n\t\t\t\t\t\treportData.AllWOTotalTaxBs += Outside.TaxBViz; //this is where the actual adding to the running GRAND TOTAL for ALL workorders Tax Bs in this report data\n\t\t\t\t\t\treportData.AllWOTotalGrand += Outside.TaxBViz; //this is where the actual adding to the running GRAND TOTAL for ALL workorders Grand Totals in this report data\n \t \t\t}\t\t\t\t//NOTE if you customize this report template and do NOT need a key above, remove it to increase report performance\t\n\t\t\t}\n\t\t}\n\t}\n\t\n\n return reportData;\n}","JsHelpers":"//Register custom Handlebars helpers here to use in your report script\n//https://handlebarsjs.com/guide/#custom-helpers\nHandlebars.registerHelper('loud', function (aString) {\n return aString.toUpperCase()\n})","RenderType":0,"HeaderTemplate":"    Todays date:    set in PDF Options","FooterTemplate":"  set in PDF Options  Page  of     ","DisplayHeaderFooter":true,"PaperFormat":10,"Landscape":true,"MarginOptionsBottom":"10mm","MarginOptionsLeft":"10mm","MarginOptionsRight":"10mm","MarginOptionsTop":"10mm","PageRanges":null,"PreferCSSPageSize":false,"PrintBackground":true,"Scale":1.00000} \ No newline at end of file diff --git a/server/AyaNova/resource/rpt/stock-report-templates/112 unfinished WO Dispatch example.ayrt b/server/AyaNova/resource/rpt/stock-report-templates/112 unfinished WO Dispatch example.ayrt deleted file mode 100644 index aa9b23a6..00000000 --- a/server/AyaNova/resource/rpt/stock-report-templates/112 unfinished WO Dispatch example.ayrt +++ /dev/null @@ -1 +0,0 @@ -{"Name":"112 unfinished WO Dispatch example","Active":true,"Notes":"#if_eq example custom Helper - if status is Completed show checkmark in checkbox\nHTML if examples - if part has serial numbers then show partnameviz + serials, else show only part\nREQUIRES ADDITIONAL EDITING - each workorder item to a single page, room for manual entry, ","Roles":124927,"AType":34,"IncludeWoItemDescendants":false,"Template":"\n\t\n\t\t
\t\n\n\t\t\n \t\n\t\t{{#each ayReportData}}\t \n\t\t \t\n \t\t\n\t\t\t\t\n\t\t\t\t\t\n\t\t\t\t\t\n\t\t\t\t\t\n\t\t\t\t\n\t\t\t\t \n\t\t\t\t\t\n\t\t\t\t\t\n\t\t\t\t\t\n\t\t\t\t\n\t\t\t\t \n\t\t\t\t\t\n\t\t\t\t\n\t\t\t\t \n\t\t\t\t\t\n\t\t\t\t\t\t\t\t\t\t\n\t\t\t\t\n\t\t\t\t\n\t\t\t\t\t\n\t\t\t\t \t\n\t\t\t\t \n\t\t\t\t\t\n\t\t\t\t\t\n\t\t\t\t\n\t\t\t\t \n\t\t\t\t\t\n\t\t\t\t\t\n\t\t\t\t\n\t\t\t\t\n\t\t\t\t\t\n\t\t\t\t \t \n \t\t\n \n \t\t\n\t\t\t\t{{#each Items}}\n\t\t\t\t\t\t\t\t\t \n\t\t\t\t\t\t \t\n \t\t\n\n\t\t\t\t\t{{#each Units}}\t\t\t\t\t\t\n\t\t\t\t\t\t\t\t\t\t \n\t\t\t\t\t\t\t \t\n \t\t\t\n \t\t\t{{/each}}\n\n\t\t\t\t\t\t\n\t\t\t\t\t\t\t\n\t\t\t\t\t\t\n\t\t\t\t\t\t\t\t\t\t \n\t\t\t\t\t\t\t \n\t\t\t\t\t\t\t \t\t\n \t\t\t\n \t\t\t{{#each ScheduledUsers}}\n \t\t\t\n\t\t\t\t\t\t\t\t\t\t \n\t\t\t\t\t\t\t\n\t\t\t\t\t\t\t\t\t\n \t\t\t\n\t\t\t\t\t\t\t\t\t\t \n\t\t\t\t\t\t\t\n\t\t\t\t\t\t\t\n\t\t\t\t\t\t\t\n\t\t\t\t\t\t\t\t\t\n \t\t\t\n\t\t\t\t\t\t\t\t\t\t \n\t\t\t\t\t\t\t\n\t\t\t\t\t\t\t\n\t\t\t\t\t\t\t\n\t\t\t\t\t\t\t\t\t\n \t\t\t\n\t\t\t\t\t\t\t\t\t\t \n\t\t\t\t\t\t\t\n\t\t\t\t\t\t\t\n\t\t\t\t\t\t\t\n\t\t\t\t\t\t\t\t\t\n \t\t\t\n\t\t\t\t\t\t\t\t\t\t \n\t\t\t\t\t\t\t\n\t\t\t\t\t\t\t\n\t\t\t\t\t\t\t\n\t\t\t\t\t\t\t\t\t\n \t\t\t\n\t\t\t\t\t\t \n\t\t\t\t\t\t\t\n\t\t\t\t\t\t\n \t\t\t{{/each}}\n\t\t\t\t\t\t\n\t\t\t\t\t\t\t\t\t\t \n\t\t\t\t\t\t\t\n\t\t\t\t\t\t\t \t\n\t\t\t\t\t\t\t\t\n \t\t\t\n\t\t\t\t\t{{#each Tasks}}\t\t\t\t\t\t\n\t\t\t\t\t\t\t\t\t\t \n\t\t\t\t\t\t\t\n\t\t\t\t\t\t\t\n\t\t\t\t\t\t\t{{#if_eq Status 2}}{{else}}{{/if_eq}} \t\n\t\t\t\t\t\t\t\t\n \t\t\t\n \t\t\t{{/each}}\n\n\t\t\t\t\t \t\t\t\t\t \n\t\t\t\t\t\t\t\n\t\t\t\t\t\t\t \n\t\t\t\t\t\t\t\t\n \t\t\t\n\t\t\t\t\t\t\t\t\t\t \n\t\t\t\t\t\t\t\n\t\t\t\t\t\t\t \n\t\t\t\t\t\t\t\t\n \t\t\t\n\n\t\t\t\t\t\t \n\t\t\t\t\t\t\t\n\t\t\t\t\t\t\n\t\t\t\t\t\t\n\t\t\t\t\t\t\t\n\t\t\t\t\t\t\t \n\t\t\t\t\t\t\t\n\t\t\t\t\t\t\t\t\t\n \t\t\t\n\t\t\t\t\t{{#each Parts}}\n \t\t\t\n\t\t\t\t\t\t\t\n\t\t\t\t\t\t\t \n\t\t\t\t\t\t\t\t\n\t\t\t\t\t\t\t\n\t\t\t\t\t\t\t{{#if Serials}} {{else}}\t {{/if}}\n \t\t\t\n \t\t\t{{/each}} \n\t\t\t\t\t \n\t\t\t\t\t \n\t\t\t\t\t \n\t\t\t\t\t\t\t\n\t\t\t\t\t\t\t \n\t\t\t\t\t\t\t\t\n\t\t\t\t\t\t\t\t\n \t\t\t\n\t\t\t\t\t\t\n\t\t\t\t\t\t\t\n\t\t\t\t\t\t\t \n\t\t\t\t\t\t\t\t\n\t\t\t\t\t\t\t\t\n \t\t\t\n\t\t\t\t\t\t \n\t\t\t\t\t\t\t\n\t\t\t\t\t\t\n\t\t\t\t\t\t\n\t\t\t\t\t\t\t\n\t\t\t\t\t\t\t\n \t\t\t\n\t\t\t\t\t\t \n\t\t\t\t\t\t\t\n\t\t\t\t\t\t\n\t\t\t\t\t\t \n\t\t\t\t\t\t\t\n\t\t\t\t\t\t\n\n\t\t\t\t{{/each}} \n\t\t\t \n\n\t\t\t \n\t\t\t\t\n\t\t\t\t\t\n\t\t\t\t\n\t\t\t\t\n\t\t\t\t\t\n\t\t\t\t \n\t\t\t\t \n\t\t\t\t\t\n\t\t\t\t\t{{#if TechSignature}} {{else}} {{/if}}\n\t\t\t\t\t \n\t\t\t\t\t{{#if CustomerSignature}} {{else}} {{/if}}\n\t\t\t\t \n\t\t\t\t\n\t\t\t\t\t\n\t\t\t\t\n\t\t\t\t\n\t\t\t\t\t\n\t\t\t\t \n\t\t\t\t \n\t\t\t\t\t\n\t\t\t\t\t{{#if TechSignatureCaptured}} {{else}} {{/if}} \n\t\t\t\t\t \n\t\t\t\t\t{{#if CustomerSignatureCaptured}} {{else}} {{/if}} \n\t\t\t\t \n\t\t\t\t\n\t\t\t\t\t\n\t\t\t\t \n \t\n
{{ ayLogo \"small\" }}Internal WO#:{{Serial}}
Service To Be Completed By:{{ayDateTime CompleteByDate}}
 
Customer: {{CustomerViz}}{{Address}}, {{City}} PHONE ETC NOT YET EXPOSED IN SAMPLE DATA
 
Summary of work: {{Notes}}
Scheduleable User Notes:PROPERTY FOR Scheduleable User Notes NOT YET EXPOSED IN SAMPLE DATA??
 
TechNotes for this work item: {{TechNotes}}
Unit to be serviced in this work item: {{UnitViz}}
 
Scheduled:Actual:
Tech: {{UserViz}}
 Expected Start: {{ayDateTime StartDate}}Actual Start:
 Expected Stop: {{ayDateTime StopDate}}Actual Stop:
 Expected Rate: {{ServiceRateViz}}Actual Rate:
 Expected Qty: {{EstimatedQuantity}}Actual Qty:
 
Task Status:TickBox:Task:
{{StatusViz}} {{Task}}
 
Need to add to wo?QtyWarehouse Part:
 {{Quantity}}{{PartWarehouseViz}}{{PartNameViz}}    Serial#: {{Serials}} {{PartNameViz}}
 
Additional Details of service:
 
 
 
 
Tech Signature: {{TechSignature}} ________________________________________Client Signature: {{CustomerSignature}} __________________________________________
 
 
Date: {{TechSignatureCaptured}} ________________________________________Date: {{CustomerSignatureCaptured}} __________________________________________
 
\n\n {{/each}}\n\n\n\t\t
\n\t\n","Style":"/* if not using a rule set or specific property it is recommended to comment out or delete fully for report performance*/\n\n.singlePage\n{\npage-break-after: always;\n}\n\ntable { \n table-layout: fixed; //setting this to fixed causes columns to be evenly spaced for the entire table regardless of cell content, and then colspan then \"works\" as expected\n font-family: 'Helvetica Neue', 'Helvetica', Helvetica, Arial, sans-serif;\n border-collapse: collapse;\n white-space: pre-wrap;\n font-size: 9pt;\n width: 100%;\n }\n\nthead {\n display: table-header-group; /* so as to print the table-header on all subsequent pages */\n /* NOTE if this IS here in your CSS but your thead contents are NOT displaying on subsequent pages (i.e. page 2 of a wo), you NEED to edit your thead so it is NO MORE than approx 20% of the page */\n}\n\n\n.heading {\n border-style: solid;\n border-width: 1pt;\n border-color: #e8e5e5; \n margin: 10pt;\n background-color: #e8e5e5;\n padding: 5pt; \n font-size: 10pt; \n} \n\ntbody tr:nth-child(even) {\n font-size: 9pt;\n background-color: lightgray; /* MUST checkmark Print background in PDF Options for this to show */\n} \ntbody tr:nth-child(odd) {\n font-size: 9pt;\n background-color: lightgoldenrodyellow; /* MUST checkmark Print background in PDF Options for this to show */\n} \n\ntfoot {\n display: table-footer-group; \n page-break-inside: avoid; \n font-size: 8pt; \n bottom: 0;\n width: 100%;\n border-top: 1px solid black; \n}\n\n.fontgreen {\n color: green;\n}\n.fontblue {\n color: blue;\n}\n.fontred {\n color:red;\n}\n\n\n.rightlean {\n text-align: right;\n}\n.leftlean {\n text-align: left;\n}\n.centerlean {\n text-align: center;\n}","JsPrerender":"async function ayPrepareData(reportData){ \n //this function (if present) is called with the report data \n //before the report is rendered\n //modify data as required here and return it to change the data before the report renders\n //see the help documentation for details\n return reportData;\n}","JsHelpers":"//Register custom Handlebars helpers here to use in your report script\n//https://handlebarsjs.com/guide/#custom-helpers\nHandlebars.registerHelper('loud', function (aString) {\n return aString.toUpperCase()\n})\n\n//custom helper so can do a direct comparison - i.e. if value equals xxxx, then show, else show yyyyy\n//note that this HAS to be added here in Helpers, is NOT built in\nHandlebars.registerHelper('if_eq', function(a, b, opts) {\n if(a == b) // Or === depending on your needs\n return opts.fn(this);\n else\n return opts.inverse(this);\n});\n","RenderType":0,"HeaderTemplate":"    (from PDF Options) Printed date: ","FooterTemplate":"  this is set in PDF Options  Note this is all pages of report  Page  of     ","DisplayHeaderFooter":true,"PaperFormat":10,"Landscape":false,"MarginOptionsBottom":"10mm","MarginOptionsLeft":"10mm","MarginOptionsRight":"10mm","MarginOptionsTop":"10mm","PageRanges":null,"PreferCSSPageSize":false,"PrintBackground":true,"Scale":1.00000} \ No newline at end of file diff --git a/server/AyaNova/resource/rpt/stock-report-templates/Example Inventory Reconciliation Form Grouped By Tag.ayrt b/server/AyaNova/resource/rpt/stock-report-templates/Example Inventory Reconciliation Form Grouped By Tag.ayrt deleted file mode 100644 index 75f43cce..00000000 --- a/server/AyaNova/resource/rpt/stock-report-templates/Example Inventory Reconciliation Form Grouped By Tag.ayrt +++ /dev/null @@ -1 +0,0 @@ -{"Name":"Example Inventory Reconciliation Form Grouped By Tag","Active":true,"Notes":"Example custom Prepare that groups by the Tags - nothing shows if no tags\nRecommended to use datalist Filter \"Contains\" to first filter by the Tag(s) desired","Roles":49258,"AType":90,"IncludeWoItemDescendants":false,"Template":"\n\n\t
\t \n\t\t \n \t\t\n\t\t\t\t\n\t\t\t\t\n\t\t\t\t\n\t\t\t\t\n\t\t\t\t\n\t\t\t\t\n\t\t\t\t\n\t\t\t\t\n\t\t\t\t\n\t\t\t\t\n\t\t\t\t\n\t\t\t\t\t\n\t\t\t\t\t\n\t\t\t\t\t\n\t\t\t\t\t\n\t\t\t\t\t\n\t\t\t\t\t\n\t\t\t\t\t\n\t\t\t\t \n \t\t\n\n\t\t\t \n\t\t\t\t{{#each ayReportData}} \n\t\t\t\t \n\t\t\t \t\t\n\t\t\t \t\t\n \t\t\n\t\t\t\t \t\t{{#each items}}\n\t\t\t\t\t\t\n\t\t\t\t\t\t\t\n\t\t\t\t\t\t\t\n\t\t\t\t\t\t\t\n\t\t\t\t\t\t\t\n\t\t\t\t\t\t\t\n\t\t\t\t\t\t\t\n\t\t\t\t\t\t\t\n\t\t\t\t\t\t\n\t\t\t\t\t\t{{/each}}\n\t\t\t\t\n\t\t\t \t\n \t\t\n\t\t\t\t{{/each}}\n\t\t\t \n\n\t\t\t \n\t\t\t\t\n\t\t\t\t\n\t\t\t\t\n\t\t\t\t\n\t\t\t\t\n\t\t\t\t\n\t\t\t\t\n\t\t\t\t\n\t\t\t\t\n\t\t\t\t\n\t\t\t\t\n\t\t\t\t\n\t\t\t\t\n\t\t\t\t\n\t\t\t\t\n\t\t\t\t\n\t\t\t\t\n\t\t\t\t\n\t\t\t\t\n\t\t\t\t\n\t\t\t \n \n\t\n\n","Style":".singlePage\n{\npage-break-after: always;\n}\n\ntable { \n font-family: 'Helvetica Neue', 'Helvetica', Helvetica, Arial, sans-serif;\n border-collapse: collapse;\n white-space: pre-wrap;\n font-size: 9pt;\n width: 100%;\n table-layout: fixed;\n }\n\nthead {\n display: table-header-group; /* so as to print the table-header on all subsequent pages */\n}\n\n.heading {\n border-style: solid;\n border-width: 1pt;\n border-color: #e8e5e5; \n margin: 10pt;\n background-color: #e8e5e5;\n padding: 5pt; \n font-size: 14pt; \n text-align: center;\n} \n\n.bodyhead {\n border-style: solid;\n border-width: 1pt;\n border-color: #e8e5e5; \n margin: 10pt;\n background-color: #e8e5e5;\n font-size: 11pt; \n}\n\n\n.rightlean {\n text-align: right;\n}\n.leftlean {\n text-align: left;\n}\n.centerlean {\n text-align: center;\n}\ntbody tr:nth-child(even) {\n font-size: 9pt;\n background-color: lightgray; /* MUST checkmark Print background in PDF Options for this to show */\n height: 50px;\n} \ntbody tr:nth-child(odd) {\n font-size: 9pt;\n background-color: lightgoldenrodyellow; /* MUST checkmark Print background in PDF Options for this to show */\n height: 50px;\n} \n\n\ntfoot {\n /* display: table-footer-group; uncomment to print the table-footer on all pages, not just last page - */\n page-break-inside: avoid;\n /* position: fixed; uncommenting position: will force footer to bottom BUT then leftlean and rightlean don't work AND tbody overwrites */\n \n bottom: 0;\n width: 100%;\n border-top: 1px solid black; \n}\n\n\n.fontgreen {\n color: green;\n font-size: 16pt;\n}\n.fontblue {\n color: blue;\n}\n.fontred {\n color:red;\n}\n\n","JsPrerender":"async function ayPrepareData(ayData) {\n\n\n //Group by all tags no filter\n ayData.ayReportData = ayGroupByTag(ayData.ayReportData);\n\n //Group by filtered tags that contain 'zone'\n //ayData.ayReportData = ayGroupByTag(ayData.ayReportData, 'zone');\n\n return ayData;\n}\n\nfunction ayGroupByTag(reportDataArray, tagContains) {\n //array to hold grouped data\n const ret = [];\n const containsQuery = tagContains != null && tagContains != '';\n\n//NOTE that tags are referred to as PartTags so this custom Prepare must reference PartTags, not Tags\n\n //iterate through the raw reprot data \n for (let i = 0; i < reportDataArray.length; i++) {\n //get a reference to each object to save typing\n let o = reportDataArray[i];\n //don't bother with any that don't have tags at all\n if (o.PartTags && o.PartTags.length) {\n //loop through all tags for this record\n o.PartTags.forEach(t => {//t=each tag\n //if not a contains query just process it, if it is a contains query then only process if tag contains tagContains\n if (!containsQuery || t.includes(tagContains)) {\n let groupObject = ret.find(z => z.group == t);\n if (groupObject != undefined) {\n //there is already a matching group in the return array so just push this raw report data record into it\n groupObject.items.push(o);\n //update the count for this group's items\n groupObject.count++;\n } else {\n //No group yet, so start a new one in the ret array and push this raw report data record\n ret.push({ group: t, items: [o], count: 1 });\n }\n }\n })\n }\n }\n\n //Sort based on the group name in a locale aware manner\n ret.sort(function (a, b) {\n return a.group.localeCompare(b.group);\n });\n return ret;\n}","JsHelpers":"//Register custom Handlebars helpers here to use in your report script\n//https://handlebarsjs.com/guide/#custom-helpers\nHandlebars.registerHelper('loud', function (aString) {\n return aString.toUpperCase()\n})","RenderType":0,"HeaderTemplate":"    (set in report template's PDF Options) Printed date: ","FooterTemplate":"  (set in report template's PDF Options showing x of ALL pages printed)  Page  of ","DisplayHeaderFooter":true,"PaperFormat":10,"Landscape":true,"MarginOptionsBottom":"10mm","MarginOptionsLeft":"10mm","MarginOptionsRight":"10mm","MarginOptionsTop":"10mm","PageRanges":null,"PreferCSSPageSize":false,"PrintBackground":true,"Scale":1.00000} \ No newline at end of file diff --git a/server/AyaNova/resource/rpt/stock-report-templates/Example Inventory Reconciliation Form.ayrt b/server/AyaNova/resource/rpt/stock-report-templates/Example Inventory Reconciliation Form.ayrt deleted file mode 100644 index 92c4526a..00000000 --- a/server/AyaNova/resource/rpt/stock-report-templates/Example Inventory Reconciliation Form.ayrt +++ /dev/null @@ -1 +0,0 @@ -{"Name":"Example Inventory Reconciliation Form","Active":true,"Notes":"","Roles":49258,"AType":90,"IncludeWoItemDescendants":false,"Template":"\n\n\t
\t \n\t\t
 
My Company NameInventory Reconciliation Form
 
WarehouseCategoryPart Number and NameRetailOn HandActual CountDifference + / (-)
Parts tagged with: {{group}}# of parts for {{group}}: {{count}}
{{PartWarehouseName}}{{PartTags}} {{PartName}}{{ayCurrency PartRetail}}{{OnHandQty}}
 
 
Count By:__________________________________________Count Date:__________________________________________
 
 
Signature:__________________________________________
\n \t\t\n\t\t\t\t\n\t\t\t\t\n\t\t\t\t\n\t\t\t\t\n\t\t\t\t\n\t\t\t\t\n\t\t\t\t\n\t\t\t\t\n\t\t\t\t\n\t\t\t\t\n\t\t\t\t\n\t\t\t\t\t\n\t\t\t\t\t\n\t\t\t\t\t\n\t\t\t\t\t\n\t\t\t\t\t\n\t\t\t\t\t\n\t\t\t\t \n \t\t\n\n\t\t\t \n\t\t\t\t {{#each ayReportData}} \n\t\t\t\t \n\t\t\t\t\t\n\t\t\t\t\t\n\t\t\t\t\t\n\t\t\t\t\t\n\t\t\t\t\t\n\t\t\t\t\t\n\t\t\t\t \n\t\t\t\t {{/each}}\n\t\t\t \n\n\t\t\t \n\t\t\t\t\n\t\t\t\t\n\t\t\t\t\n\t\t\t\t\n\t\t\t\t\n\t\t\t\t\n\t\t\t\t\n\t\t\t\t\n\t\t\t\t\n\t\t\t\t\n\t\t\t\t\n\t\t\t\t\n\t\t\t\t\n\t\t\t\t\n\t\t\t\t\n\t\t\t\t\n\t\t\t\t\n\t\t\t\t\n\t\t\t\t\n\t\t\t\t\n\t\t\t \n \n\t\n\n","Style":".singlePage\n{\npage-break-after: always;\n}\n\ntable { \n font-family: 'Helvetica Neue', 'Helvetica', Helvetica, Arial, sans-serif;\n border-collapse: collapse;\n white-space: pre-wrap;\n font-size: 9pt;\n width: 100%;\n table-layout: fixed;\n }\n\nthead {\n display: table-header-group; /* so as to print the table-header on all subsequent pages */\n}\n\n.heading {\n border-style: solid;\n border-width: 1pt;\n border-color: #e8e5e5; \n margin: 10pt;\n background-color: #e8e5e5;\n padding: 5pt; \n font-size: 14pt; \n text-align: center;\n} \n\n.bodyhead {\n border-style: solid;\n border-width: 1pt;\n border-color: #e8e5e5; \n margin: 10pt;\n background-color: #e8e5e5;\n font-size: 11pt; \n}\n\n\n.rightlean {\n text-align: right;\n}\n.leftlean {\n text-align: left;\n}\n.centerlean {\n text-align: center;\n}\ntbody tr:nth-child(even) {\n font-size: 9pt;\n background-color: lightgray; /* MUST checkmark Print background in PDF Options for this to show */\n height: 50px;\n} \ntbody tr:nth-child(odd) {\n font-size: 9pt;\n background-color: lightgoldenrodyellow; /* MUST checkmark Print background in PDF Options for this to show */\n height: 50px;\n} \n\n\ntfoot {\n /* display: table-footer-group; uncomment to print the table-footer on all pages, not just last page - */\n page-break-inside: avoid;\n /* position: fixed; uncommenting position: will force footer to bottom BUT then leftlean and rightlean don't work AND tbody overwrites */\n \n bottom: 0;\n width: 100%;\n border-top: 1px solid black; \n}\n\n\n.fontgreen {\n color: green;\n font-size: 16pt;\n}\n.fontblue {\n color: blue;\n}\n.fontred {\n color:red;\n}\n\n","JsPrerender":"async function ayPrepareData(reportData){ \n //this function (if present) is called with the report data \n //before the report is rendered\n //modify data as required here and return it to change the data before the report renders\n //see the help documentation for details\n return reportData;\n}","JsHelpers":"//Register custom Handlebars helpers here to use in your report script\n//https://handlebarsjs.com/guide/#custom-helpers\nHandlebars.registerHelper('loud', function (aString) {\n return aString.toUpperCase()\n})","RenderType":0,"HeaderTemplate":"    (set in report template's PDF Options) Printed date: ","FooterTemplate":"  (set in report template's PDF Options showing x of ALL pages printed)  Page  of ","DisplayHeaderFooter":true,"PaperFormat":10,"Landscape":true,"MarginOptionsBottom":"10mm","MarginOptionsLeft":"10mm","MarginOptionsRight":"10mm","MarginOptionsTop":"10mm","PageRanges":null,"PreferCSSPageSize":false,"PrintBackground":true,"Scale":1.00000} \ No newline at end of file diff --git a/server/AyaNova/resource/rpt/stock-report-templates/Example PO Items Received vs Ordered.ayrt b/server/AyaNova/resource/rpt/stock-report-templates/Example PO Items Received vs Ordered.ayrt deleted file mode 100644 index 34faaf69..00000000 --- a/server/AyaNova/resource/rpt/stock-report-templates/Example PO Items Received vs Ordered.ayrt +++ /dev/null @@ -1 +0,0 @@ -{"Name":"Example PO Items Received vs Ordered","Active":true,"Notes":"Includes Prepare that determines the difference between Ordered and Received for display, and #if_eq Helper used to display red if difference between QuantityReceived and QuantityOrdered","Roles":33130,"AType":26,"IncludeWoItemDescendants":false,"Template":"\n\n\t
\t \n\t\t
 
My Company NameInventory Reconciliation Form
 
WarehouseCategoryPart Number and NameOn HandActual CountDifference + / (-)
{{PartWarehouseName}}{{PartTags}} {{PartName}}{{OnHandQty}}
 
Count By:__________________________________________Count Date:__________________________________________
 
 
Signature:__________________________________________
\n \t\t\n \n \n \n \n \n \n \n \n \n\t\t\t \n \n \n \n \n \n\t\t\t \n \n \n \n \n \t\t\n \n \n {{#each ayReportData}}\n {{#each Items}}\n \n\t\t\t\t\n\t\t\t\t \n \n\t\t\t \n \n \n \n \n \n {{#if_eq QuantityOrdered QuantityReceived }} {{else}}{{/if_eq}}\n\t\t\t \n\t\t\t\t\n\n \t {{/each}} \n {{/each}} \n \n\n
Purchase Order Items Received compared to Ordered
 
PO StatusPO#VendorPO Ordered DateItem Received DatePartQty OrderedQty ReceivedDiff +/-
 
{{../StatusViz}}{{../Serial}} {{../VendorViz}} {{ayDate ../OrderedDate}} {{ayDate ReceivedDate}}{{PartNameViz}} {{PartDescriptionViz}}{{QuantityOrdered}}{{QuantityReceived}}{{ThisItemQtyDiff}}{{ThisItemQtyDiff}}
\n\n \n\t
\n\n","Style":".singlePage\n{\npage-break-after: always;\n}\n\ntable { \n font-family: 'Helvetica Neue', 'Helvetica', Helvetica, Arial, sans-serif;\n border-collapse: collapse;\n white-space: pre-wrap;\n width: 100%;\n table-layout: fixed;\n }\n\nthead {\n display: table-header-group; /* so as to print the table-header on all subsequent pages */\n}\n\n.heading {\n border-style: solid;\n border-width: 1pt;\n border-color: #e8e5e5; \n margin: 10pt;\n background-color: #e8e5e5;\n padding: 5pt; \n font-size: 14pt; \n text-align: center;\n} \n\n.bodyhead {\n border-style: solid;\n border-width: 1pt;\n border-color: #e8e5e5; \n margin: 10pt;\n background-color: #e8e5e5;\n font-size: 12pt; \n}\n\n\n.rightlean {\n text-align: right;\n}\n.leftlean {\n text-align: left;\n}\n.centerlean {\n text-align: center;\n}\ntbody tr:nth-child(even) {\n font-size: 9pt;\n background-color: lightgray; /* MUST checkmark Print background in PDF Options for this to show */\n height: 50px;\n overflow-wrap: break-word;\n} \ntbody tr:nth-child(odd) {\n font-size: 9pt;\n background-color: lightgoldenrodyellow; /* MUST checkmark Print background in PDF Options for this to show */\n height: 50px;\n overflow-wrap: break-word;\n} \n\n\ntfoot {\n /* display: table-footer-group; uncomment to print the table-footer on all pages, not just last page - */\n page-break-inside: avoid;\n /* position: fixed; uncommenting position: will force footer to bottom BUT then leftlean and rightlean don't work AND tbody overwrites */\n \n bottom: 0;\n width: 100%;\n border-top: 1px solid black; \n}\n\n\n.fontgreen {\n color: green;\n}\n.fontblue {\n color: blue;\n}\n.fontred {\n color:red;\n}\n","JsPrerender":"async function ayPrepareData(reportData){ \n //this function (if present) is called with the report data \n //before the report is rendered\n //modify data as required here and return it to change the data before the report renders\n //see the help documentation for details\n\n\n \n //Iterate through all the records in the reportData adding the dollar amount of each item to the AllPONet variable\n for (EachPO of reportData.ayReportData) \n {\n \n for (Item of EachPO.Items) //Iterate through all the poitems of THIS po \n\t\n {\n let ThisItemQtyDiff = 0; //Declare a temporary variable to hold the difference for this item\n \n if (Item.QuantityOrdered != null) //make sure QuantityOrdered has a value before attempting to use it\n {\n \n ThisItemQtyDiff = Item.QuantityOrdered - Item.QuantityReceived;\n }\n Item.ThisItemQtyDiff=ThisItemQtyDiff;\n }\n }\n\n\n\n\n\n return reportData;\n}","JsHelpers":"//Register custom Handlebars helpers here to use in your report script\n//https://handlebarsjs.com/guide/#custom-helpers\nHandlebars.registerHelper('loud', function (aString) {\n return aString.toUpperCase()\n})\n\n//custom helper so can do a direct comparison - i.e. if value equals xxxx, then show, else show yyyyy\n//note that this HAS to be added here in Helpers, is NOT built in\nHandlebars.registerHelper('if_eq', function(a, b, opts) {\n if(a == b) // Or === depending on your needs\n return opts.fn(this);\n else\n return opts.inverse(this);\n});","RenderType":0,"HeaderTemplate":"    (set in report template's PDF Options) Printed date: ","FooterTemplate":"  (set in report template's PDF Options showing x of ALL pages printed)  Page  of ","DisplayHeaderFooter":true,"PaperFormat":10,"Landscape":true,"MarginOptionsBottom":"10mm","MarginOptionsLeft":"10mm","MarginOptionsRight":"10mm","MarginOptionsTop":"10mm","PageRanges":null,"PreferCSSPageSize":false,"PrintBackground":true,"Scale":1.00000} \ No newline at end of file diff --git a/server/AyaNova/resource/rpt/stock-report-templates/Example Parts grouped by Tags with optional filter by contains.ayrt b/server/AyaNova/resource/rpt/stock-report-templates/Example Parts grouped by Tags with optional filter by contains.ayrt deleted file mode 100644 index 72d01d28..00000000 --- a/server/AyaNova/resource/rpt/stock-report-templates/Example Parts grouped by Tags with optional filter by contains.ayrt +++ /dev/null @@ -1 +0,0 @@ -{"Name":"Example Parts grouped by Tags with optional filter by contains","Active":true,"Notes":"Example custom Prepare that groups by the Tags - nothing shows if no tags\nRecommended to use datalist Filter \"Contains\" to first filter by the Tag(s) desired","Roles":124927,"AType":20,"IncludeWoItemDescendants":false,"Template":"\n\n\t
\t \n\t\t \n \t\t\n\n \n \n \n \n \t\n \n \n\t\t\t\t\n\t\t\t\t\n\t\t\t\t\n\t\t\t\t\n\t\t\t\t\n\t\t\t\t \n \n \n \t\t\n \t\n \t\t\n \n \n {{#each ayReportData}}\n \n \n\t\t\t \n\t\t\t \n \n\t\t {{#each items}}\n\t\t \n\t\t\t \n\t\t\t\t\n\t\t\t\t\n\t\t\t\t\n\t\t\t\t\n\t\t\t\t \n \n\t\t\t{{/each}}\n\t\t\t\n\t\t\t \n \n \t {{/each}}\n \n
Parts by Tag
 
TagPartNameNameManufacturerVizCostRetail
 
{{group}}# of parts for {{group}}: {{count}}
 {{PartName}}{{Name}}{{ManufacturerViz}}{{ayCurrency Cost}}{{ayCurrency Retail}}
 
\n\n\n \n\t
\n\n","Style":".singlePage\r\n{\r\npage-break-after: always;\r\n}\r\n\r\ntable { \r\n font-family: 'Helvetica Neue', 'Helvetica', Helvetica, Arial, sans-serif;\r\n border-collapse: collapse;\r\n white-space: pre-wrap;\r\n width: 100%;\r\n table-layout: fixed;\r\n }\r\n\r\nthead {\r\n display: table-header-group; /* so as to print the table-header on all subsequent pages */\r\n}\r\n\r\n.heading {\r\n border-style: solid;\r\n border-width: 1pt;\r\n border-color: #e8e5e5; \r\n margin: 10pt;\r\n background-color: #e8e5e5;\r\n padding: 5pt; \r\n font-size: 14pt; \r\n text-align: center;\r\n} \r\n\r\n.bodyhead {\r\n border-style: solid;\r\n border-width: 1pt;\r\n border-color: #e8e5e5; \r\n margin: 10pt;\r\n background-color: #e8e5e5;\r\n font-size: 12pt; \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\ntbody tr:nth-child(even) {\r\n font-size: 9pt;\r\n background-color: lightgray; /* MUST checkmark Print background in PDF Options for this to show */\r\n height: 50px;\r\n overflow-wrap: break-word;\r\n} \r\ntbody tr:nth-child(odd) {\r\n font-size: 9pt;\r\n background-color: lightgoldenrodyellow; /* MUST checkmark Print background in PDF Options for this to show */\r\n height: 50px;\r\n overflow-wrap: break-word;\r\n} \r\n\r\n\r\ntfoot {\r\n /* display: table-footer-group; uncomment to print the table-footer on all pages, not just last page - */\r\n page-break-inside: avoid;\r\n /* position: fixed; uncommenting position: will force footer to bottom BUT then leftlean and rightlean don't work AND tbody overwrites */\r\n \r\n bottom: 0;\r\n width: 100%;\r\n border-top: 1px solid black; \r\n}\r\n\r\n\r\n.fontgreen {\r\n color: green;\r\n}\r\n.fontblue {\r\n color: blue;\r\n}\r\n.fontred {\r\n color:red;\r\n}\r\n\r\n","JsPrerender":"async function ayPrepareData(ayData) {\n\n\n //Group by all tags no filter\n ayData.ayReportData = ayGroupByTag(ayData.ayReportData);\n\n //Group by filtered tags that contain 'zone'\n //ayData.ayReportData = ayGroupByTag(ayData.ayReportData, 'zone');\n\n return ayData;\n}\n\nfunction ayGroupByTag(reportDataArray, tagContains) {\n //array to hold grouped data\n const ret = [];\n const containsQuery = tagContains != null && tagContains != '';\n\n //iterate through the raw reprot data \n for (let i = 0; i < reportDataArray.length; i++) {\n //get a reference to each object to save typing\n let o = reportDataArray[i];\n //don't bother with any that don't have tags at all\n if (o.Tags && o.Tags.length) {\n //loop through all tags for this record\n o.Tags.forEach(t => {//t=each tag\n //if not a contains query just process it, if it is a contains query then only process if tag contains tagContains\n if (!containsQuery || t.includes(tagContains)) {\n let groupObject = ret.find(z => z.group == t);\n if (groupObject != undefined) {\n //there is already a matching group in the return array so just push this raw report data record into it\n groupObject.items.push(o);\n //update the count for this group's items\n groupObject.count++;\n } else {\n //No group yet, so start a new one in the ret array and push this raw report data record\n ret.push({ group: t, items: [o], count: 1 });\n }\n }\n })\n }\n }\n\n //Sort based on the group name in a locale aware manner\n ret.sort(function (a, b) {\n return a.group.localeCompare(b.group);\n });\n return ret;\n}","JsHelpers":"","RenderType":0,"HeaderTemplate":"    (set in report template's PDF Options) Printed date: ","FooterTemplate":"  (set in report template's PDF Options showing x of ALL pages printed)  Page  of ","DisplayHeaderFooter":true,"PaperFormat":10,"Landscape":false,"MarginOptionsBottom":"10mm","MarginOptionsLeft":"10mm","MarginOptionsRight":"10mm","MarginOptionsTop":"10mm","PageRanges":null,"PreferCSSPageSize":false,"PrintBackground":true,"Scale":1.00000} \ No newline at end of file diff --git a/server/AyaNova/resource/rpt/stock-report-templates/Example Parts with available serial numbers.ayrt b/server/AyaNova/resource/rpt/stock-report-templates/Example Parts with available serial numbers.ayrt deleted file mode 100644 index eba06dc9..00000000 --- a/server/AyaNova/resource/rpt/stock-report-templates/Example Parts with available serial numbers.ayrt +++ /dev/null @@ -1 +0,0 @@ -{"Name":"Example Parts with available serial numbers","Active":true,"Notes":"Uses #if_eq custom Helper to ONLY display parts from the datalist that HAVE serial numbers \n","Roles":115050,"AType":20,"IncludeWoItemDescendants":false,"Template":"\n\n\t
\t \n\t\t \n \t\t\n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \t\t\n \n \n {{#each ayReportData}}\n \n\n {{#if_eq PartSerialsViz \"\"}} \n {{else}} \n \n \n \n \n \n \n \n \n {{/if_eq}}\n \t {{/each}} \n \n\n
Parts with Serials Report
 
Part NumberPart NameManufacturerCostRetailSerials
 
{{PartName}}{{Name}}{{ManufacturerViz}}{{ayCurrency Cost}}{{ayCurrency Retail}}{{PartSerialsViz}}
\n\n \n\t
\n\n","Style":".singlePage\n{\npage-break-after: always;\n}\n\ntable { \n font-family: 'Helvetica Neue', 'Helvetica', Helvetica, Arial, sans-serif;\n border-collapse: collapse;\n white-space: pre-wrap;\n width: 100%;\n table-layout: fixed;\n }\n\nthead {\n display: table-header-group; /* so as to print the table-header on all subsequent pages */\n}\n\n.heading {\n border-style: solid;\n border-width: 1pt;\n border-color: #e8e5e5; \n margin: 10pt;\n background-color: #e8e5e5;\n padding: 5pt; \n font-size: 14pt; \n text-align: center;\n} \n\n.bodyhead {\n border-style: solid;\n border-width: 1pt;\n border-color: #e8e5e5; \n margin: 10pt;\n background-color: #e8e5e5;\n font-size: 12pt; \n}\n\n\n.rightlean {\n text-align: right;\n}\n.leftlean {\n text-align: left;\n}\n.centerlean {\n text-align: center;\n}\ntbody tr:nth-child(even) {\n font-size: 9pt;\n background-color: lightgray; /* MUST checkmark Print background in PDF Options for this to show */\n height: 50px;\n overflow-wrap: break-word;\n} \ntbody tr:nth-child(odd) {\n font-size: 9pt;\n background-color: lightgoldenrodyellow; /* MUST checkmark Print background in PDF Options for this to show */\n height: 50px;\n overflow-wrap: break-word;\n} \n\n\ntfoot {\n /* display: table-footer-group; uncomment to print the table-footer on all pages, not just last page - */\n page-break-inside: avoid;\n /* position: fixed; uncommenting position: will force footer to bottom BUT then leftlean and rightlean don't work AND tbody overwrites */\n \n bottom: 0;\n width: 100%;\n border-top: 1px solid black; \n}\n\n\n.fontgreen {\n color: green;\n font-size: 16pt;\n}\n.fontblue {\n color: blue;\n}\n.fontred {\n color:red;\n}\n","JsPrerender":"async function ayPrepareData(reportData){ \n //this function (if present) is called with the report data \n //before the report is rendered\n //modify data as required here and return it to change the data before the report renders\n //see the help documentation for details\n return reportData;\n\n \n}","JsHelpers":"//Register custom Handlebars helpers here to use in your report script\n//https://handlebarsjs.com/guide/#custom-helpers\nHandlebars.registerHelper('loud', function (aString) {\n return aString.toUpperCase()\n})\n\n//custom helper so can do a direct comparison - i.e. if value equals xxxx, then show, else show yyyyy\n//note that this HAS to be added here in Helpers, is NOT built in\nHandlebars.registerHelper('if_eq', function(a, b, opts) {\n if(a == b) // Or === depending on your needs\n return opts.fn(this);\n else\n return opts.inverse(this);\n});","RenderType":0,"HeaderTemplate":"    (set in report template's PDF Options) Printed date: ","FooterTemplate":"  (set in report template's PDF Options showing x of ALL pages printed)  Page  of ","DisplayHeaderFooter":true,"PaperFormat":10,"Landscape":true,"MarginOptionsBottom":"10mm","MarginOptionsLeft":"10mm","MarginOptionsRight":"10mm","MarginOptionsTop":"10mm","PageRanges":null,"PreferCSSPageSize":false,"PrintBackground":true,"Scale":1.00000} \ No newline at end of file diff --git a/server/AyaNova/resource/rpt/stock-report-templates/Example Purchase Order Detailed w Custom.c1 Shipping.ayrt b/server/AyaNova/resource/rpt/stock-report-templates/Example Purchase Order Detailed w Custom.c1 Shipping.ayrt deleted file mode 100644 index b65c4a88..00000000 --- a/server/AyaNova/resource/rpt/stock-report-templates/Example Purchase Order Detailed w Custom.c1 Shipping.ayrt +++ /dev/null @@ -1 +0,0 @@ -{"Name":"Example Purchase Order Detailed w Custom.c1 Shipping","Active":true,"Notes":"HTML If else /if \nNOT YET COMPLETED TO USE custom.c1 with shipping charge\nWhy is it called \"VendorPartNumber \" when in the Part record itself, is referred to as WholesalerNumber??","Roles":98,"AType":26,"IncludeWoItemDescendants":false,"Template":"\n\n\t
\t\n {{#each ayReportData}}\t \n\t\t \t\n \t\t\n \n \n \n \n \n {{#if DropShipToCustomerViz}}{{else}} {{/if}}\n {{#if DropShipToCustomerViz}}{{else}} {{/if}}\n \n \n \n {{#if DropShipToCustomerViz}}{{else}} {{/if}}\n \n \n \n \n {{#if DropShipToCustomerViz}}{{else}} {{/if}} \n \n \n \n \n {{#if DropShipToCustomerViz}}{{else}} {{/if}} \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n\n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \t\t\n\t\t\t\t{{#each Items}} \n\t\t\t\t \n \n \n \n \n \n \n \n {{#if TaxAViz}}{{else}}{{/if}}\n {{#if TaxBViz}}{{else}}{{/if}}\n \n \n\t\t\t \t{{/each}}\n\t\t\t\n \n \n \n\t\t\t\t\n\t\t\t\t\n \t\t\t\n \n\t\t\t\t\n\t\t\t\t\n \n \n\t\t\t\t\n \n\t\t\t\t\n\t\t\t\t\n \n\t\t\t\t\n\t\t\t\t\n \n \n\t\t\t\t\n\t\t\t\t\n\t\t\t\t\n \n\t\t\t\t\n\t\t\t\t\n\t\t\t\t\n\t\t\t\t\n \n \n\t\t\t\t\n {{#if ThisPOTaxA}}{{else}} {{/if}}\n\t\t\t\t\n\t\t\t\t\n\t\t\t\t\n\t\t\t\t\n\t\t\t\t{{#if ThisPOTaxB}}{{else}} {{/if}}\n\t\t\t\t\n\n \n\t\t\t\t\n\t\t\t\t\n\n \t\t\t\n \t\t\t\n \t\t\t\n \t\t\t \n \t\t\t\n \n \t\t\t\n \t\t\t\n \t\t\t{{#if CustomFields.c1}}{{else}}{{/if}}\n \t\t\t\n\n \n\t\t\t\t\n\t\t\t\t\n\n \n\t\t\t\t\n\t\t\t\t\n\t\t\t\t\n\t\t\t\t\n \n \n \n\t\t
 
PO#: {{Serial}}SHIP TO CLIENT:BILL TO:BILL TO & SHIP TO:
Ref#: {{ReferenceNumber}}{{DropShipToCustomerViz}}My Company Name
Ordered Date: {{ayDate OrderedDate}}{{DropShipToCustomerAddressViz}} {{DropShipToCustomerCityViz}} {{DropShipToCustomerRegionViz}} 123 - 123 MyStreetname Ave
 {{DropShipToCustomerEmailAddressViz}} {{DropShipToCustomerPhone1Viz}} My City, My State, My Postal
VENDOR: {{VendorViz}}TEL: My telephone
{{VendorPostAddressViz}} {{VendorPostCityViz}} {{VendorPostRegionViz}} {{VendorPostCodeViz}}Email: My email address
{{VendorContactViz}} {{VendorPhone1Viz}} {{VendorEmailAddressViz}} Acct#: VendorAccountNumberViz
 
QtyUOMOur Part#MFG#Vendor#Price PerNetTaxATaxBLine Total
{{QuantityOrdered}}{{PartUnitOfMeasureViz}}{{PartNameViz}} {{PartDescriptionViz}}{{PartManufacturerNumberViz}} {{VendorPartNumber}} {{ayCurrency PurchaseOrderCost}}{{ayCurrency NetTotalViz}}{{ayCurrency TaxAViz}}0.00{{ayCurrency TaxBViz}}0.00{{ayCurrency LineTotalViz}}
 
**Please note all packing slips and invoices REQUIRE line pricing**Total Qty of Parts Ordered: {{ThisPOTotalQty}}
**Approval for off-specification items or changes MUST be obtained via a NEW purchase order** 
 
PO VENDOR MEMO:{{VendorMemo}} Net Total:{{ ayCurrency ThisPONet }}
 
VENDOR ALERT MEMO:{{VendorAlertNotesViz}} TaxA Total:{{ ayCurrency ThisPOTaxA }}0.00
TaxB Total:{{ ayCurrency ThisPOTaxB }}0.00
 
ThisPODollarAmountBeforeShip Total before custom shipping amount:{{ ayCurrency ThisPODollarAmountBeforeShip }}
Custom Shipping currency amount in CustomFields.c1:{{ ayCurrency CustomFields.c1 }}0.00
 
Direct all inquiries to My Company 1-888-555-5555 or mycompany@mycompany.comThisPODollarAmountWithShip:{{ ayCurrency ThisPODollarAmountWithShip }}
\n {{/each}}\n","Style":".singlePage\n{\npage-break-after: always;\n}\n\ntable { \n font-family: 'Helvetica Neue', 'Helvetica', Helvetica, Arial, sans-serif;\n border-collapse: collapse;\n white-space: pre-wrap;\n font-size: 9pt;\n width: 100%;\n table-layout: fixed;\n }\n\nthead {\n display: table-header-group; /* so as to print the table-header on all subsequent pages */\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.bold13 {\n font-size: 13pt;\n font-weight: bold;\n}\n.bold12 {\n font-size: 12pt;\n font-weight: bold;\n}\n.bold10 {\n font-size: 10;\n font-weight: bold;\n}\n\n.bkyellow {\n background-color: lightyellow;\n}\n\n.bodyhead {\n border-style: solid;\n border-width: 1pt;\n border-color: #e8e5e5; \n margin: 10pt;\n background-color: #e8e5e5;\n /* padding: 5pt; */\n font-size: 10pt; \n font-weight: bold; \n} \n\ntbody tr:nth-child(even) {\n font-size: 9pt; \n background-color: lightgray; /* MUST checkmark Print background in PDF Options for this to show */\n} \ntbody tr:nth-child(odd) {\n font-size: 9pt; \n background-color: lightgoldenrodyellow; /* MUST checkmark Print background in PDF Options for this to show */\n} \n\ntfoot {\n display: table-footer-group; /* so as to print the table-footer on all subsequent pages */\n page-break-inside: avoid;\n font-size: 8pt; \n bottom: 0;\n width: 100%;\n border-top: 1px solid black; \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 //Example of both manipulating the reportData before rendering the report (by adding a running total field)\n //and adding a field to the overall data calculating the total dollar amount for all records\n\n\n//remove statements not needed, for example ALLPOxxx are not needed\n//let AllPONet = 0; //Declare a temporary variable to hold the running net total for all POs in this list\n//let AllPOTaxA = 0; //Declare a temporary variable to hold the running Tax A total for all POs in the list\n//let AllPOTaxB = 0; //Declare a temporary variable to hold the running Tax B total for all POs in the list\n//let AllPODollarAmountBeforeShip = 0; //Declare a temporary variable to hold the running total of all POs (no shipping) in this list\n//let AllPODollarAmountWithShip = 0; //Declare a temporary variable to hold the running total of all POs with shipping custom amount\n \n\n //Iterate through all the records in the reportData adding the dollar amount of each specified property to the appropriate declared variable\n\n for (EachPO of reportData.ayReportData) \n {\n let ThisPONet = 0; //Declare a temporary variable to hold the running net total for THIS po\n for (Item of EachPO.Items) //Iterate through all the poitems of THIS po adding the dollar amount of each item to the ThisPONet variable\n {\n //make sure it has a value before attempting to add it to the running total\n if (Item.NetTotalViz != null) \n {\n ThisPONet += Item.NetTotalViz;\n }\n Item.PONetRunning=ThisPONet;\n }\n EachPO.ThisPONet=ThisPONet;\n // AllPONet += ThisPONet; //remove statements not needed, for example ALLPOxxx are not needed\n\n let ThisPOTaxA = 0; //Declare a temporary variable to hold the running Tax A total for THIS po\n for (Item of EachPO.Items) //Iterate through all the poitems of THIS po adding the dollar amount of each item to the ThisPOTaxA variable\n {\n //make sure it has a value before attempting to add it to the running total\n if (Item.TaxAViz != null) \n {\n ThisPOTaxA += Item.TaxAViz;\n }\n Item.POTaxARunning=ThisPOTaxA;\n }\n EachPO.ThisPOTaxA=ThisPOTaxA;\n // AllPOTaxA += ThisPOTaxA; //remove statements not needed, for example ALLPOxxx are not needed\n\n let ThisPOTaxB = 0; //Declare a temporary variable to hold the running Tax B total for THIS po\n for (Item of EachPO.Items) //Iterate through all the poitems of THIS po adding the dollar amount of each item to the ThisPOTaxB variable\n {\n //make sure it has a value before attempting to add it to the running total\n if (Item.TaxBViz != null) \n {\n ThisPOTaxB += Item.TaxBViz;\n }\n Item.POTaxBRunning=ThisPOTaxB;\n }\n EachPO.ThisPOTaxB=ThisPOTaxB;\n // AllPOTaxB += ThisPOTaxB; //remove statements not needed, for example ALLPOxxx are not needed\n\n let ShipCharge=0; // has to be declared first before below \n if ( EachPO.CustomFields != null && EachPO.CustomFields.c1 != null )// then this - this first checks that CustomFields is NOT null, if so then checks that c1 isNOT null\n {\n const tempc1 = parseFloat(EachPO.CustomFields.c1); // const instead of let because not declaring it more than once per PO\n if ( tempc1 != NaN) // don't check if Null, instead check if NaN because return value for parseFloat is either NaN or the floating point number \n {\n ShipCharge = tempc1; //don't declare, update the existing instead\n }\n \n }\n\n let ThisPOTotalDollar = 0; //Declare a temporary variable to hold the running total of THIS PO \n for (Item of EachPO.Items)\n {\n //make sure it has a value before attempting to add it to the running total\n if (Item.LineTotalViz != null) \n {\n ThisPOTotalDollar += Item.LineTotalViz;\n }\n Item.PORunningTotal=ThisPOTotalDollar;\n }\n \n EachPO.ThisPOTotalDollar =ThisPOTotalDollar; // \n \n\n let ThisPODollarAmountBeforeShip = 0; //Declare a temporary variable to hold the running total of THIS PO before adding shipcharge\n let ThisPODollarAmountWithShip = 0; //Declare a temporary variable to hold the running total of THIS PO WITH shipcharge\n for (Item of EachPO.Items)\n {\n //make sure it has a value before attempting to add it to the running total\n if (Item.LineTotalViz != null) \n {\n ThisPODollarAmountBeforeShip += Item.LineTotalViz;\n }\n Item.PORunningTotal=ThisPODollarAmountBeforeShip;\n ThisPODollarAmountWithShip=ThisPODollarAmountBeforeShip + ShipCharge; // this working when using ShipCharge = 12 for testing, BUT while trying to use CustomFields.c1\n //isn't \"seeing\" CustomFields.c1 or EachPO.CustomFields.c1 value resulting in AllPODollarAmountWithShip showing innvalid number as well as ThisPODollarAmountWithShip not includes the actual shipping$\n }\n \n EachPO.ThisPODollarAmountBeforeShip =ThisPODollarAmountBeforeShip; // \n EachPO.ThisPODollarAmountWithShip = ThisPODollarAmountWithShip; // \n \n \n // AllPODollarAmountBeforeShip += ThisPODollarAmountBeforeShip; //remove statements not needed, for example ALLPOxxx are not needed\n // AllPODollarAmountWithShip += ThisPODollarAmountWithShip; //remove statements not needed, for example ALLPOxxx are not needed\n \n\n // ThisPOTotalDollar += AllPOTotalDollar; //remove statements not needed, for example ALLPOxxx are not needed\n \n let ThisPOTotalQty = 0; //Declare a temporary variable to hold the running Qty total for THIS po\n for (Item of EachPO.Items) //Iterate through all the poitems of THIS po adding the Qty amount of each item to the ThisPOTotalQty variable\n {\n //make sure it has a value before attempting to add it to the running total\n if (Item.QuantityOrdered != null) \n {\n ThisPOTotalQty += Item.QuantityOrdered;\n }\n Item.QuantityOrderedRunning=ThisPOTotalQty;\n }\n EachPO.ThisPOTotalQty=ThisPOTotalQty;\n\n\n\n\n }\n \n // reportData.AllPONetRunning=AllPONet; //Add the AllPONet variable to the reportData so it can be accessed in the report template i.e. a final running total of ALL PO's Net\n // reportData.AllPOTaxARunning=AllPOTaxA; //Add the AllPONet variable to the reportData so it can be accessed in the report template i.e. a final running total of ALL PO's Tax A\n // reportData.AllPOTaxBRunning=AllPOTaxB; //Add the AllPOTaxB variable to the reportData so it can be accessed in the report template i.e. a final running total of ALL PO's Tax B\n // reportData.AllPORunningTotalwithoutShip=AllPODollarAmountBeforeShip; \n // reportData.AllPORunningTotalwithShip=AllPODollarAmountWithShip; \n \n\n\n return reportData;\n}","JsHelpers":"//Register custom Handlebars helpers here to use in your report script\n//https://handlebarsjs.com/guide/#custom-helpers\nHandlebars.registerHelper('loud', function (aString) {\n return aString.toUpperCase()\n})","RenderType":0,"HeaderTemplate":"          (set in report template's PDF Options) Printed date: ","FooterTemplate":"  (set in report template's PDF Options showing x of ALL pages printed)  Page  of ","DisplayHeaderFooter":true,"PaperFormat":10,"Landscape":true,"MarginOptionsBottom":"10mm","MarginOptionsLeft":"10mm","MarginOptionsRight":"10mm","MarginOptionsTop":"10mm","PageRanges":null,"PreferCSSPageSize":false,"PrintBackground":true,"Scale":1.00000} \ No newline at end of file diff --git a/server/AyaNova/resource/rpt/stock-report-templates/Example Purchase Order Detailed.ayrt b/server/AyaNova/resource/rpt/stock-report-templates/Example Purchase Order Detailed.ayrt deleted file mode 100644 index 6720dbcb..00000000 --- a/server/AyaNova/resource/rpt/stock-report-templates/Example Purchase Order Detailed.ayrt +++ /dev/null @@ -1 +0,0 @@ -{"Name":"Example Purchase Order Detailed","Active":true,"Notes":"AS OF 131: why is it called VendorPartNumber?\nIncludes IF/ELSE ship to client; ","Roles":98,"AType":26,"IncludeWoItemDescendants":false,"Template":"\n\n\t
\t\n {{#each ayReportData}}\t \n\t\t \t\n \t\t\n \n \n \n \n \n {{#if DropShipToCustomerViz}}{{else}} {{/if}}\n {{#if DropShipToCustomerViz}}{{else}} {{/if}}\n \n \n \n {{#if DropShipToCustomerViz}}{{else}} {{/if}}\n \n \n \n \n {{#if DropShipToCustomerViz}}{{else}} {{/if}} \n \n \n \n \n {{#if DropShipToCustomerViz}}{{else}} {{/if}} \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n\n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \t\t\n\t\t\t\t{{#each Items}} \n\t\t\t\t \n \n \n \n \n \n \n \n {{#if TaxAViz}}{{else}}{{/if}}\n {{#if TaxBViz}}{{else}}{{/if}}\n \n \n\t\t\t \t{{/each}}\n\t\t\t\n \n \n \n\t\t\t\t\n\t\t\t\t\n \t\t\t\n \n\t\t\t\t\n\t\t\t\t\n \t\t\t\n \n \n\t\t\t\t\n \n\t\t\t\t\n\t\t\t\t\n\t\t\t\t\n\t\t\t\t\n \n \n\t\t\t\t\n\t\t\t\t\n\t\t\t\t\n \n\t\t\t\t\n\t\t\t\t\n\t\t\t\t\n\t\t\t\t\n \n \n\t\t\t\t\n {{#if ThisPOTaxA}}{{else}} {{/if}}\n\t\t\t\t\n\t\t\t\t\n\t\t\t\t\n\t\t\t\t\n\t\t\t\t{{#if ThisPOTaxB}}{{else}} {{/if}}\n\t\t\t\t\n\n \n\t\t\t\t\n\t\t\t\t\n\n \n\t\t\t\t\n\t\t\t\t\n\t\t\t\t\n\t\t\t\t\n \n \n \n\t\t
 
PO#: {{Serial}}SHIP TO CLIENT:BILL TO:BILL TO & SHIP TO:
Ref#: {{ReferenceNumber}}{{DropShipToCustomerViz}}My Company Name
Ordered Date: {{ayDate OrderedDate}}{{DropShipToCustomerAddressViz}} {{DropShipToCustomerCityViz}} {{DropShipToCustomerRegionViz}} 123 - 123 MyStreetname Ave
 {{DropShipToCustomerEmailAddressViz}} {{DropShipToCustomerPhone1Viz}} My City, My State, My Postal
VENDOR: {{VendorViz}}TEL: My telephone
{{VendorPostAddressViz}} {{VendorPostCityViz}} {{VendorPostRegionViz}} {{VendorPostCodeViz}}Email: My email address
{{VendorContactViz}} {{VendorPhone1Viz}} {{VendorEmailAddressViz}} Acct#: VendorAccountNumberViz
 
QtyUOMOur Part#MFG#Vendor#Price PerNetTaxATaxBLine Total
{{QuantityOrdered}}{{PartUnitOfMeasureViz}}{{PartNameViz}} {{PartDescriptionViz}}{{PartManufacturerNumberViz}} {{VendorPartNumber}} {{ayCurrency PurchaseOrderCost}}{{ayCurrency NetTotalViz}}{{ayCurrency TaxAViz}}0.00{{ayCurrency TaxBViz}}0.00{{ayCurrency LineTotalViz}}
 
**Please note all packing slips and invoices REQUIRE line pricing**Total Qty of Parts Ordered: {{ThisPOTotalQty}}
**Approval for off-specification items or changes MUST be obtained via a NEW purchase order** 
 
PO VENDOR MEMO:{{VendorMemo}} Net Total:{{ ayCurrency ThisPONet }}
 
VENDOR ALERT MEMO:{{VendorAlertNotesViz}} TaxA Total:{{ ayCurrency ThisPOTaxA }}0.00
TaxB Total:{{ ayCurrency ThisPOTaxB }}0.00
 
Direct all inquiries to My Company 1-888-555-5555 or mycompany@mycompany.comPurchase Order Total:{{ ayCurrency ThisPOTotalDollar }}
\n {{/each}}\n\n\t
\n\n","Style":".singlePage\n{\npage-break-after: always;\n}\n\ntable { \n font-family: 'Helvetica Neue', 'Helvetica', Helvetica, Arial, sans-serif;\n border-collapse: collapse;\n white-space: pre-wrap;\n font-size: 9pt;\n width: 100%;\n table-layout: fixed;\n }\n\nthead {\n display: table-header-group; /* so as to print the table-header on all subsequent pages */\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.bold13 {\n font-size: 13pt;\n font-weight: bold;\n}\n.bold12 {\n font-size: 12pt;\n font-weight: bold;\n}\n.bold10 {\n font-size: 10;\n font-weight: bold;\n}\n\n.bkyellow {\n background-color: lightyellow;\n}\n\n.italic {\n font-style: italic;\n}\n\n.bodyhead {\n border-style: solid;\n border-width: 1pt;\n border-color: #e8e5e5; \n margin: 10pt;\n background-color: #e8e5e5;\n /* padding: 5pt; */\n font-size: 10pt; \n font-weight: bold; \n} \n\ntbody tr:nth-child(even) {\n font-size: 9pt; \n background-color: lightgray; /* MUST checkmark Print background in PDF Options for this to show */\n} \ntbody tr:nth-child(odd) {\n font-size: 9pt; \n background-color: lightgoldenrodyellow; /* MUST checkmark Print background in PDF Options for this to show */\n} \n\ntfoot {\n display: table-footer-group; /* so as to print the table-footer on all subsequent pages */\n page-break-inside: avoid;\n font-size: 8pt; \n bottom: 0;\n width: 100%;\n border-top: 1px solid black; \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 //Example of both manipulating the reportData before rendering the report (by adding a running total field)\n //and adding a field to the overall data calculating the total dollar amount for all records\n\n\n//remove statements not needed, for example ALLPOxxx are not needed\n//let AllPONet = 0; //Declare a temporary variable to hold the running net total for all POs in this list\n//let AllPOTaxA = 0; //Declare a temporary variable to hold the running Tax A total for all POs in the list\n//let AllPOTaxB = 0; //Declare a temporary variable to hold the running Tax B total for all POs in the list\n\n\n //Iterate through all the records in the reportData adding the dollar amount of each specified property to the appropriate declared variable\n for (EachPO of reportData.ayReportData) \n {\n let ThisPONet = 0; //Declare a temporary variable to hold the running net total for THIS po\n for (Item of EachPO.Items) //Iterate through all the poitems of THIS po adding the dollar amount of each item to the ThisPONet variable\n {\n //make sure it has a value before attempting to add it to the running total\n if (Item.NetTotalViz != null) \n {\n ThisPONet += Item.NetTotalViz;\n }\n Item.PONetRunning=ThisPONet;\n }\n EachPO.ThisPONet=ThisPONet;\n // AllPONet += ThisPONet; //remove statements not needed, for example ALLPOxxx are not needed\n\n let ThisPOTaxA = 0; //Declare a temporary variable to hold the running Tax A total for THIS po\n for (Item of EachPO.Items) //Iterate through all the poitems of THIS po adding the dollar amount of each item to the ThisPOTaxA variable\n {\n //make sure it has a value before attempting to add it to the running total\n if (Item.TaxAViz != null) \n {\n ThisPOTaxA += Item.TaxAViz;\n }\n Item.POTaxARunning=ThisPOTaxA;\n }\n EachPO.ThisPOTaxA=ThisPOTaxA;\n // AllPOTaxA += ThisPOTaxA; //remove statements not needed, for example ALLPOxxx are not needed\n\n let ThisPOTaxB = 0; //Declare a temporary variable to hold the running Tax B total for THIS po\n for (Item of EachPO.Items) //Iterate through all the poitems of THIS po adding the dollar amount of each item to the ThisPOTaxB variable\n {\n //make sure it has a value before attempting to add it to the running total\n if (Item.TaxBViz != null) \n {\n ThisPOTaxB += Item.TaxBViz;\n }\n Item.POTaxBRunning=ThisPOTaxB;\n }\n EachPO.ThisPOTaxB=ThisPOTaxB;\n // AllPOTaxB += ThisPOTaxB; //remove statements not needed, for example ALLPOxxx are not needed\n\n let ThisPOTotalDollar = 0; //Declare a temporary variable to hold the running total of THIS PO \n for (Item of EachPO.Items)\n {\n //make sure it has a value before attempting to add it to the running total\n if (Item.LineTotalViz != null) \n {\n ThisPOTotalDollar += Item.LineTotalViz;\n }\n Item.PORunningTotal=ThisPOTotalDollar;\n }\n \n EachPO.ThisPOTotalDollar =ThisPOTotalDollar; // \n \n \n // ThisPOTotalDollar += AllPOTotalDollar; //remove statements not needed, for example ALLPOxxx are not needed\n \n let ThisPOTotalQty = 0; //Declare a temporary variable to hold the running Qty total for THIS po\n for (Item of EachPO.Items) //Iterate through all the poitems of THIS po adding the Qty amount of each item to the ThisPOTotalQty variable\n {\n //make sure it has a value before attempting to add it to the running total\n if (Item.QuantityOrdered != null) \n {\n ThisPOTotalQty += Item.QuantityOrdered;\n }\n Item.QuantityOrderedRunning=ThisPOTotalQty;\n }\n EachPO.ThisPOTotalQty=ThisPOTotalQty;\n\n\n }\n \n // reportData.AllPONetRunning=AllPONet; //Add the AllPONet variable to the reportData so it can be accessed in the report template i.e. a final running total of ALL PO's Net\n // reportData.AllPOTaxARunning=AllPOTaxA; //Add the AllPONet variable to the reportData so it can be accessed in the report template i.e. a final running total of ALL PO's Tax A\n // reportData.AllPOTaxBRunning=AllPOTaxB; //Add the AllPOTaxB variable to the reportData so it can be accessed in the report template i.e. a final running total of ALL PO's Tax B\n // reportData.AllPORunningTotal=AllPODollarAmount; \n\n \n\n\n return reportData;\n}","JsHelpers":"//Register custom Handlebars helpers here to use in your report script\n//https://handlebarsjs.com/guide/#custom-helpers\nHandlebars.registerHelper('loud', function (aString) {\n return aString.toUpperCase()\n})","RenderType":0,"HeaderTemplate":"       (set in report template's PDF Options) Printed date: \n","FooterTemplate":"\n  (set in report template's PDF Options showing x of ALL pages printed)  Page  of ","DisplayHeaderFooter":true,"PaperFormat":10,"Landscape":true,"MarginOptionsBottom":"10mm","MarginOptionsLeft":"10mm","MarginOptionsRight":"10mm","MarginOptionsTop":"10mm","PageRanges":null,"PreferCSSPageSize":false,"PrintBackground":true,"Scale":1.00000} \ No newline at end of file diff --git a/server/AyaNova/resource/rpt/stock-report-templates/Example Purchase Order Summary single line per PO.ayrt b/server/AyaNova/resource/rpt/stock-report-templates/Example Purchase Order Summary single line per PO.ayrt deleted file mode 100644 index 1155683b..00000000 --- a/server/AyaNova/resource/rpt/stock-report-templates/Example Purchase Order Summary single line per PO.ayrt +++ /dev/null @@ -1 +0,0 @@ -{"Name":"Example Purchase Order Summary single line per PO","Active":true,"Notes":"example of custom Prepare - derived running totals for nets, taxes and totals for EACH PO on single line, and running total for all POs Nets, Taxes, Totals at bottom of report","Roles":49258,"AType":26,"IncludeWoItemDescendants":false,"Template":"\n\n\t
\t \n\t\t \n \t\t\n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \t\t\n \n \n {{#each ayReportData}}\n \n \n \n \n \n \n \n \n \n {{#if ThisPOTaxA}}{{else}} {{/if}} \n {{#if ThisPOTaxB}}{{else}} {{/if}}\n \n \n \t {{/each}}\n \n
Header on every page
One line of Net totals for each PO in body
Footer of derived Net totals at bottom to display final totals
 
VendorPO StatusRef#PO#Expected DateOrdered DatePO NetPO TaxAPO TaxBPO Total
 
{{VendorViz}}{{StatusViz}}{{ReferenceNumber}}{{Serial}}{{ayDate ExpectedReceiveDate}}{{ayDate OrderedDate}}{{ayCurrency ThisPONet}}{{ayCurrency ThisPOTaxA}}$0.00{{ayCurrency ThisPOTaxB}}$0.00{{ayCurrency ThisPOTotalofLines}}
\n\n \n \n \n \n \n \n \n \n \n \n \n \n {{#if AllPOTaxARunning}}{{else}} {{/if}} \n {{#if AllPOTaxBRunning}}{{else}} {{/if}} \n \n \n \n
All NetAll TaxAAll TaxBAll Total
{{ ayCurrency AllPONetRunning }}{{ ayCurrency AllPOTaxARunning }}$0.00{{ ayCurrency AllPOTaxBRunning }}$0.00 {{ ayCurrency AllPOTotal }}
\n \n\t
\n\n","Style":".singlePage\n{\npage-break-after: always;\n}\n\ntable { \n font-family: 'Helvetica Neue', 'Helvetica', Helvetica, Arial, sans-serif;\n border-collapse: collapse;\n white-space: pre-wrap;\n width: 100%;\n table-layout: fixed;\n }\n\nthead {\n display: table-header-group; /* so as to print the table-header on all subsequent pages */\n}\n\n.heading {\n border-style: solid;\n border-width: 1pt;\n border-color: #e8e5e5; \n margin: 10pt;\n background-color: #e8e5e5;\n padding: 5pt; \n font-size: 14pt; \n text-align: center;\n} \n\n.bodyhead {\n border-style: solid;\n border-width: 1pt;\n border-color: #e8e5e5; \n margin: 10pt;\n background-color: #e8e5e5;\n font-size: 12pt; \n}\n\n\n.rightlean {\n text-align: right;\n}\n.leftlean {\n text-align: left;\n}\n.centerlean {\n text-align: center;\n}\ntbody tr:nth-child(even) {\n font-size: 10pt;\n background-color: lightgray; /* MUST checkmark Print background in PDF Options for this to show */\n height: 50px;\n} \ntbody tr:nth-child(odd) {\n font-size: 10pt;\n background-color: lightgoldenrodyellow; /* MUST checkmark Print background in PDF Options for this to show */\n height: 50px;\n} \n\n\ntfoot {\n /* display: table-footer-group; uncomment to print the table-footer on all pages, not just last page - */\n page-break-inside: avoid;\n /* position: fixed; uncommenting position: will force footer to bottom BUT then leftlean and rightlean don't work AND tbody overwrites */\n \n bottom: 0;\n width: 100%;\n border-top: 1px solid black; \n}\n\n\n.fontgreen {\n color: green;\n font-size: 16pt;\n}\n.fontblue {\n color: blue;\n}\n.fontred {\n color:red;\n}\n\n","JsPrerender":"async function ayPrepareData(reportData) {\n //Example of both manipulating the reportData before rendering the report (by adding a running total field)\n //and adding a field to the overall data calculating the total dollar amount for all records\n\nlet AllPONet = 0; //Declare a temporary variable to hold the running net total for all POs in this list\n //Iterate through all the records in the reportData adding the dollar amount of each item to the AllPONet variable\n for (EachPO of reportData.ayReportData) \n {\n let ThisPONet = 0; //Declare a temporary variable to hold the running net total for THIS po\n for (Item of EachPO.Items) //Iterate through all the poitems of THIS po adding the dollar amount of each item to the ThisPONet variable\n {\n //make sure it has a value before attempting to add it to the running total\n if (Item.NetTotalViz != null) \n {\n ThisPONet += Item.NetTotalViz;\n }\n Item.PONetRunning=ThisPONet;\n }\n EachPO.ThisPONet=ThisPONet;\n AllPONet += ThisPONet; //Use ThisPONet to display the running Net total for THIS PO\n }\n //Add the AllPONet variable to the reportData so it can be accessed in the report template i.e. a final running total of ALL PO's Net\n reportData.AllPONetRunning=AllPONet;\n \nlet AllPOTaxA = 0; //Declare a temporary variable to hold the running Tax A total for all POs in the list\n //Iterate through all the records in the reportData adding the Tax A dollar amount of each item to the AllPOTaxA variable\n for (EachPO of reportData.ayReportData) \n {\n let ThisPOTaxA = 0; //Declare a temporary variable to hold the running Tax A total for THIS po\n for (Item of EachPO.Items) //Iterate through all the poitems of THIS po adding the dollar amount of each item to the ThisPOTaxA variable\n {\n //make sure it has a value before attempting to add it to the running total\n if (Item.TaxAViz != null) \n {\n ThisPOTaxA += Item.TaxAViz;\n }\n Item.POTaxARunning=ThisPOTaxA;\n }\n EachPO.ThisPOTaxA=ThisPOTaxA;\n AllPOTaxA += ThisPOTaxA; // Use ThisPOTaxA to display the running Tax A total for THIS PO\n }\n //Add the AllPONet variable to the reportData so it can be accessed in the report template i.e. a final running total of ALL PO's Tax A\n reportData.AllPOTaxARunning=AllPOTaxA; \n \nlet AllPOTaxB = 0; //Declare a temporary variable to hold the running Tax B total for all POs in the list\n //Iterate through all the records in the reportData adding the Tax B dollar amount of each item to the AllPOTaxA variable\n for (EachPO of reportData.ayReportData) \n {\n let ThisPOTaxB = 0; //Declare a temporary variable to hold the running Tax B total for THIS po\n for (Item of EachPO.Items) //Iterate through all the poitems of THIS po adding the dollar amount of each item to the ThisPOTaxB variable\n {\n //make sure it has a value before attempting to add it to the running total\n if (Item.TaxBViz != null) \n {\n ThisPOTaxB += Item.TaxBViz;\n }\n Item.POTaxBRunning=ThisPOTaxB;\n }\n EachPO.ThisPOTaxB=ThisPOTaxB;\n AllPOTaxB += ThisPOTaxB; // Use ThisPOTaxB to display the running Tax B total for THIS PO\n }\n //Add the AllPOTaxB variable to the reportData so it can be accessed in the report template i.e. a final running total of ALL PO's Tax B\n reportData.AllPOTaxBRunning=AllPOTaxB; \n\nlet AllPODollarTotalRunning = 0; //Declare a temporary variable to hold the running total of all POs in this list\n//let ThisPOTotal = 0; //if declare this at this stage will NOT get correct EachPO.ThisPOTotalofLines\n for (EachPO of reportData.ayReportData) \n { \n let ThisPOTotal = 0; \n // need to declared let ThisPOTotal = 0; at this stage so then it will reset ThisPOTotal back to 0 before being able to add to EachPO.POsRunningTotalSoFar\n //BUT OH OH - now the entire AllPOTotal is off hmmmmmmmmmm \n for (Item of EachPO.Items)\n {\n //make sure it has a value before attempting to add it to the running total\n if (Item.LineTotalViz != null) \n {\n ThisPOTotal += Item.LineTotalViz;\n }\n Item.ThisPORunningTotal=ThisPOTotal;\n } \n EachPO.ThisPOTotalofLines =ThisPOTotal; \n //add a new key to each record in the reportData object named \"EachPO.POsRunningTotalSoFar\" with the running total so far\n EachPO.POsRunningTotalSoFar=ThisPOTotal; \n\n AllPODollarTotalRunning += ThisPOTotal; \n }\n //set the AllPODollarTotalRunning variable to the reportData so the reportData.AllPOTotal can be accessed in the report template outside of the #each \n //- i.e. in a separate footer that displays once at end of report\n reportData.AllPOTotal=AllPODollarTotalRunning; \n \n\n return reportData;\n}","JsHelpers":"//Register custom Handlebars helpers here to use in your report script\n//https://handlebarsjs.com/guide/#custom-helpers\nHandlebars.registerHelper('loud', function (aString) {\n return aString.toUpperCase()\n})\n\n","RenderType":0,"HeaderTemplate":"    (set in report template's PDF Options) Printed date: ","FooterTemplate":"  (set in report template's PDF Options showing x of ALL pages printed)  Page  of ","DisplayHeaderFooter":true,"PaperFormat":10,"Landscape":true,"MarginOptionsBottom":"10mm","MarginOptionsLeft":"10mm","MarginOptionsRight":"10mm","MarginOptionsTop":"10mm","PageRanges":null,"PreferCSSPageSize":false,"PrintBackground":true,"Scale":1.00000} \ No newline at end of file diff --git a/server/AyaNova/resource/rpt/stock-report-templates/Example Units Per Customer .ayrt b/server/AyaNova/resource/rpt/stock-report-templates/Example Units Per Customer .ayrt deleted file mode 100644 index f0b60ef6..00000000 --- a/server/AyaNova/resource/rpt/stock-report-templates/Example Units Per Customer .ayrt +++ /dev/null @@ -1 +0,0 @@ -{"Name":"Example Units Per Customer ","Active":true,"Notes":"Uses built in Helper ayGroupByKey ","Roles":50554,"AType":31,"IncludeWoItemDescendants":false,"Template":"\n\n\t
\t \n\t\t \n \t\t\n\n \n \n \n \n \t\n \n \n\t\t\t\t\n\t\t\t\t\n\t\t\t\t\n\t\t\t\t\n\t\t\t\t\n\t\t\t\t \n \n \n \t\t\n \t\n \t\t\n \n \n {{#each ayReportData}}\n \n \n\t\t\t \n\t\t\t \n \n\t\t {{#each items}}\n\t\t \n\t\t\t \n\t\t\t\t\n\t\t\t\t\n\t\t\t\t\n\t\t\t\t\n\t\t\t\t \n \n\t\t\t{{/each}}\n\t\t\t\n\t\t\t \n \n \t {{/each}}\n \n
Units per Customer
 
CustomerSerial NumberUnit ModelLast Closed Service DateLast Closed WONotes
 
{{group}}# of units for {{group}}: {{count}}
 {{Serial}}{{UnitModelNameViz}}{{ayDate LastServiceDateViz}}{{LastWorkOrderViz}}{{Notes}}
 
\n\n\n \n\t
\n\n","Style":".singlePage\n{\npage-break-after: always;\n}\n\ntable { \n font-family: 'Helvetica Neue', 'Helvetica', Helvetica, Arial, sans-serif;\n border-collapse: collapse;\n white-space: pre-wrap;\n width: 100%;\n table-layout: fixed;\n }\n\nthead {\n display: table-header-group; /* so as to print the table-header on all subsequent pages */\n}\n\n.heading {\n border-style: solid;\n border-width: 1pt;\n border-color: #e8e5e5; \n margin: 10pt;\n background-color: #e8e5e5;\n padding: 5pt; \n font-size: 14pt; \n text-align: center;\n} \n\n.bodyhead {\n border-style: solid;\n border-width: 1pt;\n border-color: #e8e5e5; \n margin: 10pt;\n background-color: #e8e5e5;\n font-size: 12pt; \n}\n\n\n.rightlean {\n text-align: right;\n}\n.leftlean {\n text-align: left;\n}\n.centerlean {\n text-align: center;\n}\ntbody tr:nth-child(even) {\n font-size: 9pt;\n background-color: lightgray; /* MUST checkmark Print background in PDF Options for this to show */\n height: 50px;\n overflow-wrap: break-word;\n} \ntbody tr:nth-child(odd) {\n font-size: 9pt;\n background-color: lightgoldenrodyellow; /* MUST checkmark Print background in PDF Options for this to show */\n height: 50px;\n overflow-wrap: break-word;\n} \n\n\ntfoot {\n /* display: table-footer-group; uncomment to print the table-footer on all pages, not just last page - */\n page-break-inside: avoid;\n /* position: fixed; uncommenting position: will force footer to bottom BUT then leftlean and rightlean don't work AND tbody overwrites */\n \n bottom: 0;\n width: 100%;\n border-top: 1px solid black; \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\n //send the raw report data to the groupByKey function which will return a new array grouped by the key name provided\n reportData.ayReportData = ayGroupByKey(reportData.ayReportData, 'CustomerViz')\n\n //return the data into the pipeline to send to the report template\n return reportData;\n}\n\n","JsHelpers":"//Register custom Handlebars helpers here to use in your report script\n//https://handlebarsjs.com/guide/#custom-helpers\nHandlebars.registerHelper('loud', function (aString) {\n return aString.toUpperCase()\n})","RenderType":0,"HeaderTemplate":"    (set in report template's PDF Options) Printed date: ","FooterTemplate":"  (set in report template's PDF Options showing x of ALL pages printed)  Page  of ","DisplayHeaderFooter":true,"PaperFormat":10,"Landscape":true,"MarginOptionsBottom":"10mm","MarginOptionsLeft":"10mm","MarginOptionsRight":"10mm","MarginOptionsTop":"10mm","PageRanges":null,"PreferCSSPageSize":false,"PrintBackground":true,"Scale":1.00000} \ No newline at end of file diff --git a/server/AyaNova/resource/rpt/stock-report-templates/Example Units Per Customer using built in Helper and Prepare.ayrt b/server/AyaNova/resource/rpt/stock-report-templates/Example Units Per Customer using built in Helper and Prepare.ayrt deleted file mode 100644 index 37eb5cf9..00000000 --- a/server/AyaNova/resource/rpt/stock-report-templates/Example Units Per Customer using built in Helper and Prepare.ayrt +++ /dev/null @@ -1 +0,0 @@ -{"Name":"Example Units Per Customer using built in Helper and Prepare","Active":true,"Notes":"Uses built in Helper ayGroupByKey via the Prepare to group Units by the same customer","Roles":50554,"AType":31,"IncludeWoItemDescendants":false,"Template":"\n\n\t
\t \n\t\t \n \t\t\n\n \n \n \n \n \t\n \n \n\t\t\t\t\n\t\t\t\t\n\t\t\t\t\n\t\t\t\t\n\t\t\t\t\n\t\t\t\t \n \n \n \t\t\n \t\n \t\t\n \n \n {{#each ayReportData}}\n \n \n\t\t\t \n\t\t\t \n \n\t\t {{#each items}}\n\t\t \n\t\t\t \n\t\t\t\t\n\t\t\t\t\n\t\t\t\t\n\t\t\t\t\n\t\t\t\t \n \n\t\t\t{{/each}}\n\t\t\t\n\t\t\t \n \n \t {{/each}}\n \n
Units per Customer
 
CustomerSerial NumberUnit ModelLast Closed Service DateLast Closed WONotes
 
{{group}}# of units for {{group}}: {{count}}
 {{Serial}}{{UnitModelNameViz}}{{ayDate LastServiceDateViz}}{{LastWorkOrderViz}}{{Notes}}
 
\n\n\n \n\t
\n\n","Style":".singlePage\n{\npage-break-after: always;\n}\n\ntable { \n font-family: 'Helvetica Neue', 'Helvetica', Helvetica, Arial, sans-serif;\n border-collapse: collapse;\n white-space: pre-wrap;\n width: 100%;\n table-layout: fixed;\n }\n\nthead {\n display: table-header-group; /* so as to print the table-header on all subsequent pages */\n}\n\n.heading {\n border-style: solid;\n border-width: 1pt;\n border-color: #e8e5e5; \n margin: 10pt;\n background-color: #e8e5e5;\n padding: 5pt; \n font-size: 14pt; \n text-align: center;\n} \n\n.bodyhead {\n border-style: solid;\n border-width: 1pt;\n border-color: #e8e5e5; \n margin: 10pt;\n background-color: #e8e5e5;\n font-size: 12pt; \n}\n\n\n.rightlean {\n text-align: right;\n}\n.leftlean {\n text-align: left;\n}\n.centerlean {\n text-align: center;\n}\ntbody tr:nth-child(even) {\n font-size: 9pt;\n background-color: lightgray; /* MUST checkmark Print background in PDF Options for this to show */\n height: 50px;\n overflow-wrap: break-word;\n} \ntbody tr:nth-child(odd) {\n font-size: 9pt;\n background-color: lightgoldenrodyellow; /* MUST checkmark Print background in PDF Options for this to show */\n height: 50px;\n overflow-wrap: break-word;\n} \n\n\ntfoot {\n /* display: table-footer-group; uncomment to print the table-footer on all pages, not just last page - */\n page-break-inside: avoid;\n /* position: fixed; uncommenting position: will force footer to bottom BUT then leftlean and rightlean don't work AND tbody overwrites */\n \n bottom: 0;\n width: 100%;\n border-top: 1px solid black; \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\n //send the raw report data to the groupByKey function which will return a new array grouped by the key name provided\n reportData.ayReportData = ayGroupByKey(reportData.ayReportData, 'CustomerViz')\n\n //return the data into the pipeline to send to the report template\n return reportData;\n}\n\n","JsHelpers":"//Register custom Handlebars helpers here to use in your report script\n//https://handlebarsjs.com/guide/#custom-helpers\nHandlebars.registerHelper('loud', function (aString) {\n return aString.toUpperCase()\n})","RenderType":0,"HeaderTemplate":"    (set in report template's PDF Options) Printed date: ","FooterTemplate":"  (set in report template's PDF Options showing x of ALL pages printed)  Page  of ","DisplayHeaderFooter":true,"PaperFormat":10,"Landscape":true,"MarginOptionsBottom":"10mm","MarginOptionsLeft":"10mm","MarginOptionsRight":"10mm","MarginOptionsTop":"10mm","PageRanges":null,"PreferCSSPageSize":false,"PrintBackground":true,"Scale":1.00000} \ No newline at end of file diff --git a/server/AyaNova/resource/rpt/stock-report-templates/Example Vendor Contact Report.ayrt b/server/AyaNova/resource/rpt/stock-report-templates/Example Vendor Contact Report.ayrt deleted file mode 100644 index 18b0f5ff..00000000 --- a/server/AyaNova/resource/rpt/stock-report-templates/Example Vendor Contact Report.ayrt +++ /dev/null @@ -1 +0,0 @@ -{"Name":"Example Vendor Contact Report","Active":true,"Notes":"","Roles":114815,"AType":33,"IncludeWoItemDescendants":false,"Template":"\n\n\t
\t \n\t\t \n \t\t\n\n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \t\n \t\n \t\t\n \n \n {{#each ayReportData}}\n \n \n\t\t\t \n \n \n \n \n \n \n \t {{/each}}\n \n\n\t\t \n\t\t \n\n
Vendor Contact List
 
VendorTagsPrimary PhoneEmail AddressWebsiteNotes
 
{{Name}}{{Tags}}{{Phone1}}{{EmailAddress}}{{WebAddress}}{{Notes}}
\n\n \n\t
\n\n","Style":".singlePage\n{\npage-break-after: always;\n}\n\ntable { \n font-family: 'Helvetica Neue', 'Helvetica', Helvetica, Arial, sans-serif;\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 of equal width throughout */\n }\n\nthead {\n display: table-header-group; /* so as to print the table-header on all subsequent pages */\n}\n\n.heading {\n border-style: solid;\n border-width: 1pt;\n border-color: #e8e5e5; \n margin: 10pt;\n background-color: #e8e5e5;\n padding: 5pt; \n font-size: 14pt; \n text-align: center;\n} \n\n.bodyhead {\n border-style: solid;\n border-width: 1pt;\n border-color: #e8e5e5; \n margin: 10pt;\n background-color: #e8e5e5;\n font-size: 12pt; \n}\n\n\n.rightlean {\n text-align: right;\n}\n.leftlean {\n text-align: left;\n}\n.centerlean {\n text-align: center;\n}\ntbody tr:nth-child(even) {\n font-size: 8pt;\n background-color: lightgray; /* MUST checkmark Print background in PDF Options for this to show */\n height: 50px;\n word-wrap: break-word;\n} \ntbody tr:nth-child(odd) {\n font-size: 8pt;\n background-color: lightgoldenrodyellow; /* MUST checkmark Print background in PDF Options for this to show */\n height: 50px;\n word-wrap: break-word;\n} \n\n\ntfoot {\n /* display: table-footer-group; uncomment to print the table-footer on all pages, not just last page - */\n page-break-inside: avoid;\n /* position: fixed; uncommenting position: will force footer to bottom BUT then leftlean and rightlean don't work AND tbody overwrites */\n \n bottom: 0;\n width: 100%;\n border-top: 1px solid black; \n}\n\n\n.fontgreen {\n color: green;\n font-size: 16pt;\n}\n.fontblue {\n color: blue;\n}\n.fontred {\n color:red;\n}\n\n","JsPrerender":"async function ayPrepareData(reportData){ \n //this function (if present) is called with the report data \n //before the report is rendered\n //modify data as required here and return it to change the data before the report renders\n //see the help documentation for details\n return reportData;\n}","JsHelpers":"//Register custom Handlebars helpers here to use in your report script\n//https://handlebarsjs.com/guide/#custom-helpers\nHandlebars.registerHelper('loud', function (aString) {\n return aString.toUpperCase()\n})","RenderType":0,"HeaderTemplate":"    (set in report template's PDF Options) Printed date: ","FooterTemplate":"  (set in report template's PDF Options showing x of ALL pages printed)  Page  of ","DisplayHeaderFooter":true,"PaperFormat":10,"Landscape":true,"MarginOptionsBottom":"10mm","MarginOptionsLeft":"10mm","MarginOptionsRight":"10mm","MarginOptionsTop":"10mm","PageRanges":null,"PreferCSSPageSize":false,"PrintBackground":true,"Scale":1.00000} \ No newline at end of file diff --git a/server/AyaNova/resource/rpt/stock-report-templates/Sample Units with API method to get additional customer data.ayrt b/server/AyaNova/resource/rpt/stock-report-templates/Sample Units with API method to get additional customer data.ayrt deleted file mode 100644 index c899dd88..00000000 --- a/server/AyaNova/resource/rpt/stock-report-templates/Sample Units with API method to get additional customer data.ayrt +++ /dev/null @@ -1 +0,0 @@ -{"Name":"Sample Units with API method to get additional customer data","Active":true,"Notes":"Shows example of using Prepare to obtain additional data via the CustomerId\nNOTE: NEEDS UPDATING presently using 135 alpha key for Last WO and Last Service Date","Roles":124927,"AType":31,"IncludeWoItemDescendants":false,"Template":"\n \n\t
\t\n \n \n\t\t\t\t\n\t\t\t\t\n\t\t\t\t\n \n\t\t\t\t\n \n\t\t\t\t\n\t\t\t\t\n\t\t\t\t\n\t\t\t\t\n\t\t\t\t\n\t\t\t\t\t\n \n\t\t\t\t\t\n\t\t\t\t\t\t\t\t\t\t\n\t\t\t\t\t\n\t\t\t\t\t\n\t\t\t\t\t\n\t\t\t\t \n \t\t\n\t\t\t \n\t\t\t\t {{#each ayReportData}} \n \n\t\t\t\t\t\n \n\t\t\t\t\t\n\t\t\t\t\t\t\t\t\t\t\n\t\t\t\t\t\n\t\t\t\t\t\n\t\t\t\t\t\n\t\t\t\t \n\t\t\t\t {{/each}}\n\t\t\t \n
 
{{ ayLogo \"small\" }} 
Report using API method to obtain additional data about Customer
SerialUnit ModelCustomerLast WOLast Service DateCustomer Phone via APIUnit Notes
{{Serial}}{{UnitModelNameViz}}{{CustomerViz}}{{LastWorkOrderViz}}{{ayDate LastServiceDateViz}}{{myCustomerInfo.phone1}}{{Notes}}
\n\n \n {{#each ayReportData}}\n \n \n \n \n \n\t\t\t \n \n \n {{/each}}\n
This is a printout of the data returned from the Custom Prepare that this report now uses for each unit in the datalist. To display any of the Customer data ported over, just identify in mustaches myCustomerInfo.xxxx where xxx is the key as in CustomerInfo.phone1
{{ayJSON this}}
\n\n
\n\n","Style":".singlePage\r\n{\r\npage-break-after: always;\r\n}\r\n\r\ntable { \r\n font-family: 'Helvetica Neue', 'Helvetica', Helvetica, Arial, sans-serif;\r\n border-collapse: collapse;\r\n white-space: pre-wrap;\r\n width: 100%;\r\n table-layout: fixed;\r\n }\r\n\r\nthead {\r\n display: table-header-group; /* so as to print the table-header on all subsequent pages */\r\n}\r\n\r\n.heading {\r\n border-style: solid;\r\n border-width: 1pt;\r\n border-color: #e8e5e5; \r\n margin: 10pt;\r\n background-color: #e8e5e5;\r\n padding: 5pt; \r\n font-size: 14pt; \r\n text-align: center;\r\n} \r\n\r\n.bodyhead {\r\n border-style: solid;\r\n border-width: 1pt;\r\n border-color: #e8e5e5; \r\n margin: 10pt;\r\n background-color: #e8e5e5;\r\n font-size: 12pt; \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\ntbody tr:nth-child(even) {\r\n font-size: 9pt;\r\n background-color: lightgray; /* MUST checkmark Print background in PDF Options for this to show */\r\n height: 50px;\r\n overflow-wrap: break-word;\r\n} \r\ntbody tr:nth-child(odd) {\r\n font-size: 9pt;\r\n background-color: lightgoldenrodyellow; /* MUST checkmark Print background in PDF Options for this to show */\r\n height: 50px;\r\n overflow-wrap: break-word;\r\n} \r\n\r\n\r\ntfoot {\r\n /* display: table-footer-group; uncomment to print the table-footer on all pages, not just last page - */\r\n page-break-inside: avoid;\r\n /* position: fixed; uncommenting position: will force footer to bottom BUT then leftlean and rightlean don't work AND tbody overwrites */\r\n \r\n bottom: 0;\r\n width: 100%;\r\n border-top: 1px solid black; \r\n}\r\n\r\n\r\n.fontgreen {\r\n color: green;\r\n}\r\n.fontblue {\r\n color: blue;\r\n}\r\n.fontred {\r\n color:red;\r\n}\r\n\r\n","JsPrerender":"async function ayPrepareData(ayData) {\n\n //Loop through all the records in the raw report data\n for (let i = 0; i < ayData.ayReportData.length; i++) {\n //set a temporary variable to each record to save typing it all out\n let item = ayData.ayReportData[i];\n\n //call into the AyaNova API and get the customer record for this report data's customer id\n const apiResult = await ayGetFromAPI(`customer/${item.CustomerId}`);\n\n //if a result comes back, insert it into the report data so it's available to the template\n if (apiResult) {\n //put the return data customer record on a key in each record called 'myCustomerInfo' (you can call it anything as long as it doesn't conflict with an existing key)\n item.myCustomerInfo = apiResult.data\n }\n }\n return ayData;\n}","JsHelpers":"","RenderType":0,"HeaderTemplate":"    (set in report template's PDF Options) Printed date: ","FooterTemplate":"  (set in report template's PDF Options showing x of ALL pages printed)  Page  of ","DisplayHeaderFooter":true,"PaperFormat":10,"Landscape":true,"MarginOptionsBottom":"10mm","MarginOptionsLeft":"10mm","MarginOptionsRight":"10mm","MarginOptionsTop":"10mm","PageRanges":null,"PreferCSSPageSize":false,"PrintBackground":true,"Scale":1.00000} \ No newline at end of file diff --git a/server/AyaNova/resource/rpt/stock-report-templates/Test API method to get customer data.ayrt b/server/AyaNova/resource/rpt/stock-report-templates/Test API method to get customer data.ayrt deleted file mode 100644 index 79bfab0e..00000000 --- a/server/AyaNova/resource/rpt/stock-report-templates/Test API method to get customer data.ayrt +++ /dev/null @@ -1 +0,0 @@ -{"Name":"Test API method to get customer data","Active":true,"Notes":"","Roles":124927,"AType":31,"IncludeWoItemDescendants":false,"Template":"\n\n\n {{#each ayReportData}}\n\n

{{ CustomerViz }}

\n Email: {{myCustomerInfo.emailAddress}}\n\n \n
\n    {{ayJSON this}}\n    
\n\n
\n\n {{/each}}\n\n\n","Style":"","JsPrerender":"async function ayPrepareData(ayData) {\n\n //Loop through all the records in the raw report data\n for (let i = 0; i < ayData.ayReportData.length; i++) {\n //set a temporary variable to each record to save typing it all out\n let item = ayData.ayReportData[i];\n\n //call into the AyaNova API and get the customer record for this report data's customer id\n const apiResult = await ayGetFromAPI(`customer/${item.CustomerId}`);\n\n //if a result comes back, insert it into the report data so it's available to the template\n if (apiResult) {\n //put the return data customer record on a key in each record called 'myCustomerInfo' (you can call it anything as long as it doesn't conflict with an existing key)\n item.myCustomerInfo = apiResult.data\n }\n }\n return ayData;\n}","JsHelpers":"","RenderType":0,"HeaderTemplate":null,"FooterTemplate":null,"DisplayHeaderFooter":false,"PaperFormat":10,"Landscape":false,"MarginOptionsBottom":null,"MarginOptionsLeft":null,"MarginOptionsRight":null,"MarginOptionsTop":null,"PageRanges":null,"PreferCSSPageSize":false,"PrintBackground":false,"Scale":1.00000} \ No newline at end of file