From c5951faeee43b148d720bfaaea460de6d886bb75 Mon Sep 17 00:00:00 2001 From: John Cardinal Date: Tue, 29 Sep 2020 17:17:51 +0000 Subject: [PATCH] --- .vscode/launch.json | 2 +- .../SAMPLE Additional Today's Date Time Helpers.ayrt | 1 + .../SAMPLE one object prints per page.ayrt | 1 + .../SAMPLE showing IF ELSE inline html.ayrt | 1 + .../SAMPLE showing tag only if has specific tagword.ayrt | 1 + .../SAMPLE widgets invoice rpt footer last pg only.ayrt | 1 + .../SAMPLE widgets invoice rpt head footer repeats.ayrt | 1 + 7 files changed, 7 insertions(+), 1 deletion(-) create mode 100644 server/AyaNova/resource/rpt/stock-report-templates/SAMPLE Additional Today's Date Time Helpers.ayrt create mode 100644 server/AyaNova/resource/rpt/stock-report-templates/SAMPLE one object prints per page.ayrt create mode 100644 server/AyaNova/resource/rpt/stock-report-templates/SAMPLE showing IF ELSE inline html.ayrt create mode 100644 server/AyaNova/resource/rpt/stock-report-templates/SAMPLE showing tag only if has specific tagword.ayrt create mode 100644 server/AyaNova/resource/rpt/stock-report-templates/SAMPLE widgets invoice rpt footer last pg only.ayrt create mode 100644 server/AyaNova/resource/rpt/stock-report-templates/SAMPLE widgets invoice rpt head footer repeats.ayrt diff --git a/.vscode/launch.json b/.vscode/launch.json index 3390857f..d0c5b057 100644 --- a/.vscode/launch.json +++ b/.vscode/launch.json @@ -52,7 +52,7 @@ "AYANOVA_FOLDER_USER_FILES": "c:\\temp\\RavenTestData\\userfiles", "AYANOVA_FOLDER_BACKUP_FILES": "c:\\temp\\RavenTestData\\backupfiles", "AYANOVA_FOLDER_TEMPORARY_SERVER_FILES": "c:\\temp\\RavenTestData\\tempfiles", - "AYANOVA_SERVER_TEST_MODE": "false", + "AYANOVA_SERVER_TEST_MODE": "true", "AYANOVA_SERVER_TEST_MODE_SEEDLEVEL": "small", "AYANOVA_SERVER_TEST_MODE_TZ_OFFSET": "-7", "AYANOVA_BACKUP_PG_DUMP_PATH": "C:\\data\\code\\PostgreSQLPortable_12.0\\App\\PgSQL\\bin\\" diff --git a/server/AyaNova/resource/rpt/stock-report-templates/SAMPLE Additional Today's Date Time Helpers.ayrt b/server/AyaNova/resource/rpt/stock-report-templates/SAMPLE Additional Today's Date Time Helpers.ayrt new file mode 100644 index 00000000..a43f74bf --- /dev/null +++ b/server/AyaNova/resource/rpt/stock-report-templates/SAMPLE Additional Today's Date Time Helpers.ayrt @@ -0,0 +1 @@ +{"Name":"SAMPLE Additional Today's Date Time Helpers","Active":true,"Notes":"","Roles":124927,"ObjectType":2,"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\n\nHandlebars.registerHelper('todaysLocaleStringDate', function() {\n var dt2=new Date();\n return dt2.toLocaleDateString() \n});// today's date displayed in the localedatestring\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 \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\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}`;\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":0,"Landscape":false,"MarginOptionsBottom":null,"MarginOptionsLeft":null,"MarginOptionsRight":null,"MarginOptionsTop":null,"PageRanges":null,"PreferCSSPageSize":false,"PrintBackground":false,"Scale":1.0000} \ No newline at end of file diff --git a/server/AyaNova/resource/rpt/stock-report-templates/SAMPLE one object prints per page.ayrt b/server/AyaNova/resource/rpt/stock-report-templates/SAMPLE one object prints per page.ayrt new file mode 100644 index 00000000..406db699 --- /dev/null +++ b/server/AyaNova/resource/rpt/stock-report-templates/SAMPLE one object prints per page.ayrt @@ -0,0 +1 @@ +{"Name":"SAMPLE one object prints per page","Active":true,"Notes":"","Roles":124927,"ObjectType":2,"Template":"\n\n\n\n\t

Example: Translation helper

\n\t

See Report editor help documentation for details

\n\t

this will show on the first page only as is HTML code BEFORE the #each aspect which is used for iteration

\n\t

if want this on its own page unto itself, wrap it also in a class that does a page-break

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

{{ayT 'WidgetName' }}: {{ Name }}

\n\t\t
{{ayT 'WidgetSerial' }}:{{ Serial }}
\n\t\t
{{ayT 'WidgetDollarAmount' }}:{{ DollarAmount }}
\n\t\t
{{ayT 'WidgetStartDate' }}:{{ StartDate }}
\n\t\t
{{ayT 'WidgetNotes' }}:{{ Notes }}
\t\t\n\t
\n{{/each}}\n\n\n\n\n","Style":".example {\n color: blue;\n}\n\n\n.singlePage\n{\npage-break-after: always;\n}","JsPrerender":"async function ayPrepareData(reportData) {\n //Fetch translation keys required for report \n //Server will get the translations that match the current logged in user's language\n //Only translation keys pre-fetched here will be available for use with the ayT translation helper\n\n //NOTE: you *must* await the call to ayGetTranslations or they will not be present for the report template use\n\n await ayGetTranslations([\n \"Widget\",\n \"WidgetName\",\n \"WidgetSerial\",\n \"WidgetDollarAmount\",\n \"WidgetCount\",\n \"WidgetStartDate\",\n \"WidgetEndDate\",\n \"WidgetNotes\",\n \"WidgetCustom1\",\n \"WidgetCustom2\",\n \"WidgetCustom3\",\n \"WidgetCustom4\",\n \"WidgetCustom5\",\n \"WidgetCustom6\",\n \"WidgetCustom7\",\n \"WidgetCustom8\",\n \"WidgetCustom9\",\n \"WidgetCustom10\",\n \"WidgetCustom11\",\n \"WidgetCustom12\",\n \"WidgetCustom13\",\n \"WidgetCustom14\",\n \"WidgetCustom15\",\n \"WidgetCustom16\",\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":null,"FooterTemplate":null,"DisplayHeaderFooter":false,"PaperFormat":0,"Landscape":false,"MarginOptionsBottom":null,"MarginOptionsLeft":null,"MarginOptionsRight":null,"MarginOptionsTop":null,"PageRanges":null,"PreferCSSPageSize":false,"PrintBackground":false,"Scale":1.0000} \ No newline at end of file diff --git a/server/AyaNova/resource/rpt/stock-report-templates/SAMPLE showing IF ELSE inline html.ayrt b/server/AyaNova/resource/rpt/stock-report-templates/SAMPLE showing IF ELSE inline html.ayrt new file mode 100644 index 00000000..2053d9ca --- /dev/null +++ b/server/AyaNova/resource/rpt/stock-report-templates/SAMPLE showing IF ELSE inline html.ayrt @@ -0,0 +1 @@ +{"Name":"SAMPLE showing IF ELSE inline html","Active":true,"Notes":"","Roles":124927,"ObjectType":2,"Template":"\n\n\n\t

Example: custom fields usage

\n\t

this is an examle report template that shows value of Count in red if has 0 or null, or shows green if has ANY value

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

Name: {{ Name }}

\n\t\t{{#if Count}}

Count is: {{ Count }}

{{else}}

has 0 or null

{{/if}}\n\t\t
\t\t\n\t\t{{/each}}\n\t
\n\n\n","Style":".redFont {\r\n color: red;\r\n}\r\n\r\n.greenFont {\r\n color: green;\r\n}\r\n","JsPrerender":"async function ayPrepareData(reportData){ \n return reportData;\n}","JsHelpers":"","RenderType":0,"HeaderTemplate":null,"FooterTemplate":null,"DisplayHeaderFooter":false,"PaperFormat":0,"Landscape":false,"MarginOptionsBottom":null,"MarginOptionsLeft":null,"MarginOptionsRight":null,"MarginOptionsTop":null,"PageRanges":null,"PreferCSSPageSize":false,"PrintBackground":false,"Scale":1.0000} \ No newline at end of file diff --git a/server/AyaNova/resource/rpt/stock-report-templates/SAMPLE showing tag only if has specific tagword.ayrt b/server/AyaNova/resource/rpt/stock-report-templates/SAMPLE showing tag only if has specific tagword.ayrt new file mode 100644 index 00000000..12ad01c6 --- /dev/null +++ b/server/AyaNova/resource/rpt/stock-report-templates/SAMPLE showing tag only if has specific tagword.ayrt @@ -0,0 +1 @@ +{"Name":"SAMPLE showing tag only if has specific tagword","Active":true,"Notes":"","Roles":124927,"ObjectType":2,"Template":"\n\n\n\t

Example: custom fields usage

\n\t

See help documentation for details

\n\n\t
\n\t\t{{#each ayReportData}}\n\n\t\tName: {{ Name }}
\n\t\t\n\t\t

Tags:

\n\t\t

Displays first tag :::::{{ Tags.[0]}}

\n\t\t

Displays all tags for this object::::: {{ Tags}}

\n\t\t

Displays if has brown in its tags::::: {{ isInTag2 Tags}}

\n\t\t

Count: {{Count}}

\n\t\t\n\t\t\n\t\t
    \n\t\t\t {{#if CustomFields.c4}}
  • true custom fields c4 is true
  • {{else}}
  • custom fields c4 is false
  • {{/if}}\n\t\t\t
  • Actual Count value: {{Count}}
  • \n\t\t\t {{#if Count}}
  • renders in red font if 'Count' has any value
  • {{else}}
  • renders in green font if false, undefined, null, \"\", 0, or []
  • {{/if}}\n\t\t
\n\n\t\t

{{isInTag3 Tags}}

\n\t\t\n\t\t{{/each}}\n\t
\n\n\n","Style":".redMe {\r\n color: red;\r\n}\r\n\r\n.greenMe {\r\n color: green;\r\n}\r\n\r\n.redfont {\r\n color: red;\r\n}","JsPrerender":"async function ayPrepareData(reportData){ \n return reportData;\n}","JsHelpers":"\r\n\r\nHandlebars.registerHelper('isInTag', function (Tags) \r\n{\r\n for (var i=0; i\" + \"brownbrwnbrown is in here!!!!!!!!!!!!\" +\"

\");\r\n\t\t}\r\n }\r\n return 'some other text'; //if don't want to return any element at all, comment this else aspect out fully\r\n});\r\n","RenderType":0,"HeaderTemplate":null,"FooterTemplate":null,"DisplayHeaderFooter":false,"PaperFormat":0,"Landscape":false,"MarginOptionsBottom":null,"MarginOptionsLeft":null,"MarginOptionsRight":null,"MarginOptionsTop":null,"PageRanges":null,"PreferCSSPageSize":false,"PrintBackground":false,"Scale":1.0000} \ No newline at end of file diff --git a/server/AyaNova/resource/rpt/stock-report-templates/SAMPLE widgets invoice rpt footer last pg only.ayrt b/server/AyaNova/resource/rpt/stock-report-templates/SAMPLE widgets invoice rpt footer last pg only.ayrt new file mode 100644 index 00000000..2991f56f --- /dev/null +++ b/server/AyaNova/resource/rpt/stock-report-templates/SAMPLE widgets invoice rpt footer last pg only.ayrt @@ -0,0 +1 @@ +{"Name":"SAMPLE widgets invoice rpt footer last pg only","Active":true,"Notes":"","Roles":124927,"ObjectType":2,"Template":"\n\n\n\n\n\n\t
\t\t\n\t\t\n\t\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 \n \n \n \n \n \n \n \n \n \n \n \n \n\t\t\t\n\t\t\t\t{{#each ayReportData}}\n\t\t\t\t\t\t\t\t\n\t\t\t\t\n \t\t \n \t\t\n \t\t\n \t\t\n \t\t\n \t\t \t\t\n\t\t\t\t\n\t\t\t \t{{/each}}\n\t\t\t\n\t\t
{{ ayLogo \"small\" }}PO#: A1A1G43Our Account #: 198453
Ordered Date: 2020-09-13
ETA Date: 2020-09-19
VENDOR:DELIVER TO:
vendorNameMy Company Name
vstaddress123 - 123 MyStreetname Ave
vstcity vststate vstpostalMy City, My State, My Postal
Contact: vcontact vphone vemailOrdered By: creator Phone: creatorphone
 
Our Part#:Serial#Price Per:Net:Tax A:Tax B:Line Total:
{{Name}}{{Serial}}{{ayCurrency DollarAmount}}xx.xxx.xxx.xx{{ayCurrency DollarAmount}}
\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\n\t\t\t\t\n\t\t\t\t\n\t\t\t\t\n\t\t\t\t\n\t\t\t\t\n\t\t\t\t\n \t\t\t\n \t\t\t\n \t\t\t\n \t\t\t\n \t\t\t\n \n
 
Net Total: $xxx.xx
 Tax A Total: $xx.xx
Direct all inquiries to My Company 1-888-555-5555Tax B Total:$xx.xx
Approval for off-specification goods must be obtained via a new purchase orderPO Total:{{ ayCurrency MyTotalDollarAmount }}
\n\n\t
\n \n\n\n\n\n","Style":"\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}\ntfoot {\n page-break-inside: avoid;\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: 11pt; \n} \n.fontsizeBig {\n font-size: 11pt;\n font-weight: bold ;\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\ntbody tr:nth-child(even) {\n background-color: lightgray; /* MUST checkmark Print background in PDF Options for this to show */\n} \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\n\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 let TotalDollarAmount = 0; //Declare a temporary variable to hold the running total\n\n //Iterate through all the records in the reportData\n //adding the dollar amount of each item to the TotalDollarAmount variable\n for (EachItem of reportData.ayReportData) { //EachItem is name i've give, reportData.ayReportData is set\n\n //make sure it has a value before attempting to add it to the running total\n if (EachItem.DollarAmount != null) { //EachItem is name I've given, DollarAmount is the \n TotalDollarAmount += EachItem.DollarAmount;\n }\n\n //add a new key to each record in the reportData object named \"MyRunningTotal\" with the running total so far\n EachItem.MyRunningTotal=TotalDollarAmount;\n }\n\n //Add the TotalDollarAmount variable to the reportData so it can be \n //accessed in the report template\n reportData.MyTotalDollarAmount=TotalDollarAmount;\n\n\n\n//below gets your translations for the following field labels\nawait ayGetTranslations([\n \"Widget\",\n \"WidgetName\",\n \"WidgetSerial\",\n \"WidgetDollarAmount\",\n \"WidgetCount\",\n \"WidgetStartDate\",\n \"WidgetEndDate\",\n \"WidgetNotes\",\n \"WidgetCustom1\",\n \"WidgetCustom2\",\n \"WidgetCustom3\",\n \"WidgetCustom4\",\n \"WidgetCustom5\",\n \"WidgetCustom6\",\n \"WidgetCustom7\",\n \"WidgetCustom8\",\n \"WidgetCustom9\",\n \"WidgetCustom10\",\n \"WidgetCustom11\",\n \"WidgetCustom12\",\n \"WidgetCustom13\",\n \"WidgetCustom14\",\n \"WidgetCustom15\",\n \"WidgetCustom16\",\n ]);\n\n return reportData;\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})\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\n","RenderType":0,"HeaderTemplate":"  Todays date: \nPage  of   \n","FooterTemplate":"  ","DisplayHeaderFooter":true,"PaperFormat":10,"Landscape":false,"MarginOptionsBottom":"15mm","MarginOptionsLeft":"10mm","MarginOptionsRight":"10mm","MarginOptionsTop":"15mm","PageRanges":null,"PreferCSSPageSize":false,"PrintBackground":true,"Scale":1.0000} \ No newline at end of file diff --git a/server/AyaNova/resource/rpt/stock-report-templates/SAMPLE widgets invoice rpt head footer repeats.ayrt b/server/AyaNova/resource/rpt/stock-report-templates/SAMPLE widgets invoice rpt head footer repeats.ayrt new file mode 100644 index 00000000..c9c23e3e --- /dev/null +++ b/server/AyaNova/resource/rpt/stock-report-templates/SAMPLE widgets invoice rpt head footer repeats.ayrt @@ -0,0 +1 @@ +{"Name":"SAMPLE widgets invoice rpt head footer repeats","Active":true,"Notes":"","Roles":124927,"ObjectType":2,"Template":"\n\n\n\n\n\n\t
\t\t\n\t\t\n\t\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\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\t\t\t\t\n\t\t\t\t\n\t\t\t\t\n\t\t\t\t\n\t\t\t\t\n\t\t\t\t\n\t\t\t\t\n\t\t\t\t\n\t\t\t\t\n\t\t\t\t\n\t\t\t\t\n\t\t\t\t\n\t\t\t\t\n\t\t\t\t\n\t\t\t\t\n \t\t\t\n \t\t\t\n \t\t\t\n \t\t\t\n \t\t\t\n \n\t\t\t\n\t\t\t\t{{#each ayReportData}}\n\t\t\t\t\t\t\t\t\n\t\t\t\t\n \t\t \n \t\t\n \t\t\n \t\t\n \t\t\n \t\t \t\t\n\t\t\t\t\n\t\t\t \t{{/each}}\n\t\t\t\n\t\t
{{ ayLogo \"small\" }}PO#: A1A1G43Our Account #: 198453
Ordered Date: 2020-09-13
ETA Date: 2020-09-19
VENDOR:DELIVER TO:
vendorNameMy Company Name
vstaddress123 - 123 MyStreetname Ave
vstcity vststate vstpostalMy City, My State, My Postal
Contact: vcontact vphone vemailOrdered By: creator Phone: creatorphone
 
Our Part#:Serial#Price Per:Net:Tax A:Tax B:Line Total:
 
Net Total for all pages: $xxx.xx
 Tax A Total for all pages: $xx.xx
Direct all inquiries to My Company 1-888-555-5555Tax B Total for all pages:$xx.xx
Approval for off-specification goods must be obtained via a new purchase orderPO Total for all pages:{{ ayCurrency MyTotalDollarAmount }}
{{Name}}{{Serial}}{{ayCurrency DollarAmount}}xx.xxx.xxx.xx{{ayCurrency DollarAmount}}
\n\n\n\n\t
\n \n\n\n\n\n","Style":"\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}\ntfoot {\n display: table-footer-group; /* so as to print the table-footer on all subsequent pages */\n page-break-inside: avoid;\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: 11pt; \n} \n.fontsizeBig {\n font-size: 10pt;\n font-weight: bold ;\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\ntbody tr:nth-child(even) {\n background-color: lightgray; /* MUST checkmark Print background in PDF Options for this to show */\n} \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\n\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 let TotalDollarAmount = 0; //Declare a temporary variable to hold the running total\n\n //Iterate through all the records in the reportData\n //adding the dollar amount of each item to the TotalDollarAmount variable\n for (EachItem of reportData.ayReportData) { //EachItem is name i've give, reportData.ayReportData is set\n\n //make sure it has a value before attempting to add it to the running total\n if (EachItem.DollarAmount != null) { //EachItem is name I've given, DollarAmount is the \n TotalDollarAmount += EachItem.DollarAmount;\n }\n\n //add a new key to each record in the reportData object named \"MyRunningTotal\" with the running total so far\n EachItem.MyRunningTotal=TotalDollarAmount;\n }\n\n //Add the TotalDollarAmount variable to the reportData so it can be \n //accessed in the report template\n reportData.MyTotalDollarAmount=TotalDollarAmount;\n\n\n\n//below gets your translations for the following field labels\nawait ayGetTranslations([\n \"Widget\",\n \"WidgetName\",\n \"WidgetSerial\",\n \"WidgetDollarAmount\",\n \"WidgetCount\",\n \"WidgetStartDate\",\n \"WidgetEndDate\",\n \"WidgetNotes\",\n \"WidgetCustom1\",\n \"WidgetCustom2\",\n \"WidgetCustom3\",\n \"WidgetCustom4\",\n \"WidgetCustom5\",\n \"WidgetCustom6\",\n \"WidgetCustom7\",\n \"WidgetCustom8\",\n \"WidgetCustom9\",\n \"WidgetCustom10\",\n \"WidgetCustom11\",\n \"WidgetCustom12\",\n \"WidgetCustom13\",\n \"WidgetCustom14\",\n \"WidgetCustom15\",\n \"WidgetCustom16\",\n ]);\n\n return reportData;\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})\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\n","RenderType":0,"HeaderTemplate":"    Todays date: \nPage  of     \n","FooterTemplate":"  ","DisplayHeaderFooter":true,"PaperFormat":10,"Landscape":false,"MarginOptionsBottom":"15mm","MarginOptionsLeft":"10mm","MarginOptionsRight":"10mm","MarginOptionsTop":"15mm","PageRanges":null,"PreferCSSPageSize":false,"PrintBackground":true,"Scale":1.0000} \ No newline at end of file