case 4025 replaced partnumber with partname and changed partname to partdescription
This commit is contained in:
2
.vscode/launch.json
vendored
2
.vscode/launch.json
vendored
@@ -55,7 +55,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": "-8",
|
||||
"AYANOVA_BACKUP_PG_DUMP_PATH": "C:\\data\\code\\postgres_14\\bin\\"
|
||||
|
||||
@@ -384,7 +384,7 @@ namespace AyaNova.Biz
|
||||
{
|
||||
List<FormField> l = new List<FormField>();
|
||||
l.Add(new FormField { TKey = "PartName", FieldKey = "Name" });
|
||||
l.Add(new FormField { TKey = "PartDescription", FieldKey = "Description" });
|
||||
l.Add(new FormField { TKey = "PartDescription", FieldKey = "DESCRIPTION" });
|
||||
l.Add(new FormField { TKey = "UnitOfMeasure", FieldKey = "UnitOfMeasure" });
|
||||
l.Add(new FormField { TKey = "PartUPC", FieldKey = "UPC" });
|
||||
l.Add(new FormField { TKey = "PartManufacturerID", FieldKey = "ManufacturerID" });
|
||||
|
||||
@@ -605,9 +605,9 @@
|
||||
"PartList": "Teile",
|
||||
"PartManufacturerID": "Hersteller",
|
||||
"PartManufacturerNumber": "Herstellernummer",
|
||||
"PartName": "Teil - Name",
|
||||
"PartName": "Name",
|
||||
"PartNotes": "Anmerkungen",
|
||||
"PartName": "Teilenummer",
|
||||
"PartDescription": "Beschreibung",
|
||||
"PartRetail": "Einzelhandel",
|
||||
"PartCost": "Kosten",
|
||||
"PartTrackSerialNumber": "Seriennummer verfolgen",
|
||||
|
||||
@@ -605,9 +605,9 @@
|
||||
"PartList": "Parts",
|
||||
"PartManufacturerID": "Manufacturer",
|
||||
"PartManufacturerNumber": "Manufacturer Number",
|
||||
"PartName": "Part Name",
|
||||
"PartName": "Name",
|
||||
"PartNotes": "Notes",
|
||||
"PartDescription": "Part Number",
|
||||
"PartDescription": "Description",
|
||||
"PartRetail": "Retail",
|
||||
"PartCost": "Cost",
|
||||
"PartTrackSerialNumber": "Track Serial Number",
|
||||
|
||||
@@ -604,9 +604,9 @@
|
||||
"PartList": "Piezas",
|
||||
"PartManufacturerID": "Fabricante",
|
||||
"PartManufacturerNumber": "Número de fabricante",
|
||||
"PartName": "Nombre de la pieza",
|
||||
"PartName": "Nombre",
|
||||
"PartNotes": "Notas",
|
||||
"PartName": "Número de pieza",
|
||||
"PartDescription": "Descripción",
|
||||
"PartRetail": "Minorista",
|
||||
"PartCost": "Coste",
|
||||
"PartTrackSerialNumber": "Seguimiento número de serie",
|
||||
|
||||
@@ -605,9 +605,9 @@
|
||||
"PartList": "Pièces",
|
||||
"PartManufacturerID": "Fabricant",
|
||||
"PartManufacturerNumber": "Numéro de fabricant",
|
||||
"PartName": "Nom de pièce",
|
||||
"PartName": "Nom",
|
||||
"PartNotes": "Remarques",
|
||||
"PartName": "Numéro de pièce",
|
||||
"PartDescription": "La description",
|
||||
"PartRetail": "Détail",
|
||||
"PartCost": "Coût",
|
||||
"PartTrackSerialNumber": "Numéro de série de suivi",
|
||||
|
||||
@@ -1 +1 @@
|
||||
{"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":"<html>\n\n<body>\n\t{{#each ayReportData}} \n\t<p>PO: {{ Serial }}</p>\n\t\t{{#each Items}}\n\t\t<p> LineTotalViz: {{ ayCurrency LineTotalViz}}, RunningTotal: {{ ayCurrency PORunningTotal }} <p/>\n\t\t{{/each}}\n\t<p>This PO total dollar amount: {{ ayCurrency ThisPODollarAmount }}</p>\n\t<hr> \n\t\n\t{{/each}}\n <h2> ALL POS: {{ayCurrency AllPORunningTotal}} </h2>\n\n</body>\n\n</html>","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}
|
||||
{"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":"<html>\n\n<body>\n\t{{#each ayReportData}} \n\t<p>PO: {{ Serial }}</p>\n\t\t{{#each Items}}\n\t\t<p> LineTotalViz: {{ ayCurrency LineTotalViz}}, RunningTotal: {{ ayCurrency PORunningTotal }} <p/>\n\t\t{{/each}}\n\t<p>This PO total dollar amount: {{ ayCurrency ThisPODollarAmount }}</p>\n\t<hr> \n\t\n\t{{/each}}\n <h2> ALL POS: {{ayCurrency AllPORunningTotal}} </h2>\n\n</body>\n\n</html>","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}
|
||||
File diff suppressed because one or more lines are too long
@@ -1 +1 @@
|
||||
{"Name":"109x EXAMPLE PO Barcode using built in helper","Active":true,"Notes":"","Roles":124927,"AType":26,"IncludeWoItemDescendants":false,"Template":"<html>\n\n<body>\n\t<h2>Example: Bar code helper </h2>\n\t<p>See Report editor help documentation for details</p>\n\n\t{{#each ayReportData}}\n\tPO #: {{Serial}}\n\t<div>\n\t\tPO # as \"CODE-128\" BarCode:<br/>\n\t\t{{ ayBC Serial '{ \"bcid\": \"code128\",\"includetext\":true, \"scale\":1}' }}\n\t</div>\n\t<br/>\n\t<div>\n\t\tPO # as \"QR\" Code:<br/>\n\t\t{{ ayBC Serial '{ \"bcid\": \"qrcode\",\"includetext\":true, \"scale\":3}' }}\n\t</div>\n\t<br/>\n\t<div>\n\t\tSample \"UPC-A\" Code (PO # wouldn't be a valid UPC code so hard coded the numbers 712345678904 as example here):<br/>\n\t\t{{ ayBC \"712345678904\" '{ \"bcid\": \"upca\",\"includetext\":true, \"scale\":1}' }}\n\t</div>\n\t<br/>\n\t<br/>\n\t<hr/>\n\t{{/each}}\n</body>\n\n</html>","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}
|
||||
{"Name":"💡109x EXAMPLE PO Barcode using built in helper","Active":true,"Notes":"","Roles":124927,"AType":26,"IncludeWoItemDescendants":false,"Template":"<html>\n\n<body>\n\t<h2>Example: Bar code helper </h2>\n\t<p>See Report editor help documentation for details</p>\n\n\t{{#each ayReportData}}\n\tPO #: {{Serial}}\n\t<div>\n\t\tPO # as \"CODE-128\" BarCode:<br/>\n\t\t{{ ayBC Serial '{ \"bcid\": \"code128\",\"includetext\":true, \"scale\":1}' }}\n\t</div>\n\t<br/>\n\t<div>\n\t\tPO # as \"QR\" Code:<br/>\n\t\t{{ ayBC Serial '{ \"bcid\": \"qrcode\",\"includetext\":true, \"scale\":3}' }}\n\t</div>\n\t<br/>\n\t<div>\n\t\tSample \"UPC-A\" Code (PO # wouldn't be a valid UPC code so hard coded the numbers 712345678904 as example here):<br/>\n\t\t{{ ayBC \"712345678904\" '{ \"bcid\": \"upca\",\"includetext\":true, \"scale\":1}' }}\n\t</div>\n\t<br/>\n\t<br/>\n\t<hr/>\n\t{{/each}}\n</body>\n\n</html>","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}
|
||||
@@ -1 +1 @@
|
||||
{"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":"<html>\n<body>\t\n\t<table>\t\t\n\t<thead><!-- this indicates start of your table header section -->\n\t\t<tr><!-- this indicates start of one row in your thead -->\n\t\t\t<th>column header 1</th> <!-- The text in <th> elements are bold and centered by default, can also override by setting specifics in your CSS -->\n\t\t\t<th>column header 2</th>\n\t\t\t<th>column header 3</th>\n\t\t\t<th>column header 4</th>\n\t\t</tr><!-- this indicates end of that one row in your thead -->\n\t</thead><!-- this indicates end of your table header section -->\n\t{{#each ayReportData}}<!-- this #each encompasses the area that repeats for each object (i.e. each PO) in your Sample Data -->\n\t<!-- if want the header repeated for every PO, the #each to encompass the thead area too, otherwise encompass the tbody -->\t\n\t<tbody>\t<!-- this indicates start of your table body section -->\t\n\t\t{{#each Items}} <!-- this #each encompasses the area that repeats for each Child object (i.e. each PO Item) in your Sample Data -->\n\t\t\t<tr><!-- this indicates start of one row in your tbody -->\n\t\t\t\t<td>TBODY PO# {{../Serial}}</td> <!-- to display a Parent value when the #each references a Child, use a ../ in front of the Property name in the mustaches -->\n\t\t\t\t<td class=\"fontgreen\">TBODY Part #: {{PartViz}} </td> <!-- to display a value when the #each references a Child, encompass the Property name in mustaches -->\n\t\t\t\t<td>TBODY Qty Ordered: {{QuantityOrdered}}</td><!-- The text in <td> elements are regular and left-aligned by default, can also set specifics in your CSS -->\n\t\t\t\t<td>TBODY Serials: {{Serials}}</td><!-- in this instance, Serials with an S refers to the serials received for that PO Item -->\n\t\t\t</tr>\n\t\t{{/each}}<!-- this closes the emcompassed area that repeats for each Child object (i.e. each PO Item) in your Sample Data -->\t\t\n\t</tbody><!-- this indicates end of your table body section -->\n\t{{/each}}<!-- this closes the emcompassed area that repeats for each object (i.e. each PO) in your Sample Data -->\n\t<tfoot class=\"footertext\"><!-- this applies specific CSS class attributes to all of tfoot and its td's -->\n\t\t<tr>\n\t\t\t<td>footer stuff 1</td>\n\t\t\t<td colspan=\"2\">expands across two columns with or without having to have text</td><!-- this inline colspan spans multiple columns -->\n\t\t\t<td>footer stuff 3</td>\n\t\t</tr>\n\t</tfoot><!-- this indicates end of your table footer section -->\t\t\n\t</table>\t\t\n</body>\n</html>","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":"<span style=\"font-size:6pt;width: 94%; text-align:left; \"> Todays date: <span class=\"date\"></span> set in PDF Options</span>","FooterTemplate":"<span style=\"font-size:6pt;width: 94%; text-align: right; \"> set in PDF Options Page <span class=\"pageNumber\"></span> of <span class=\"totalPages\"></span> </span>","DisplayHeaderFooter":true,"PaperFormat":10,"Landscape":false,"MarginOptionsBottom":"15mm","MarginOptionsLeft":"10mm","MarginOptionsRight":"10mm","MarginOptionsTop":"15mm","PageRanges":null,"PreferCSSPageSize":false,"PrintBackground":true,"Scale":1.00000}
|
||||
{"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":"<html>\n<body>\t\n\t<table>\t\t\n\t<thead><!-- this indicates start of your table header section -->\n\t\t<tr><!-- this indicates start of one row in your thead -->\n\t\t\t<th>column header 1</th> <!-- The text in <th> elements are bold and centered by default, can also override by setting specifics in your CSS -->\n\t\t\t<th>column header 2</th>\n\t\t\t<th>column header 3</th>\n\t\t\t<th>column header 4</th>\n\t\t</tr><!-- this indicates end of that one row in your thead -->\n\t</thead><!-- this indicates end of your table header section -->\n\t{{#each ayReportData}}<!-- this #each encompasses the area that repeats for each object (i.e. each PO) in your Sample Data -->\n\t<!-- if want the header repeated for every PO, the #each to encompass the thead area too, otherwise encompass the tbody -->\t\n\t<tbody>\t<!-- this indicates start of your table body section -->\t\n\t\t{{#each Items}} <!-- this #each encompasses the area that repeats for each Child object (i.e. each PO Item) in your Sample Data -->\n\t\t\t<tr><!-- this indicates start of one row in your tbody -->\n\t\t\t\t<td>TBODY PO# {{../Serial}}</td> <!-- to display a Parent value when the #each references a Child, use a ../ in front of the Property name in the mustaches -->\n\t\t\t\t<td class=\"fontgreen\">TBODY Part #: {{PartViz}} </td> <!-- to display a value when the #each references a Child, encompass the Property name in mustaches -->\n\t\t\t\t<td>TBODY Qty Ordered: {{QuantityOrdered}}</td><!-- The text in <td> elements are regular and left-aligned by default, can also set specifics in your CSS -->\n\t\t\t\t<td>TBODY Serials: {{Serials}}</td><!-- in this instance, Serials with an S refers to the serials received for that PO Item -->\n\t\t\t</tr>\n\t\t{{/each}}<!-- this closes the emcompassed area that repeats for each Child object (i.e. each PO Item) in your Sample Data -->\t\t\n\t</tbody><!-- this indicates end of your table body section -->\n\t{{/each}}<!-- this closes the emcompassed area that repeats for each object (i.e. each PO) in your Sample Data -->\n\t<tfoot class=\"footertext\"><!-- this applies specific CSS class attributes to all of tfoot and its td's -->\n\t\t<tr>\n\t\t\t<td>footer stuff 1</td>\n\t\t\t<td colspan=\"2\">expands across two columns with or without having to have text</td><!-- this inline colspan spans multiple columns -->\n\t\t\t<td>footer stuff 3</td>\n\t\t</tr>\n\t</tfoot><!-- this indicates end of your table footer section -->\t\t\n\t</table>\t\t\n</body>\n</html>","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":"<span style=\"font-size:6pt;width: 94%; text-align:left; \"> Todays date: <span class=\"date\"></span> set in PDF Options</span>","FooterTemplate":"<span style=\"font-size:6pt;width: 94%; text-align: right; \"> set in PDF Options Page <span class=\"pageNumber\"></span> of <span class=\"totalPages\"></span> </span>","DisplayHeaderFooter":true,"PaperFormat":10,"Landscape":false,"MarginOptionsBottom":"15mm","MarginOptionsLeft":"10mm","MarginOptionsRight":"10mm","MarginOptionsTop":"15mm","PageRanges":null,"PreferCSSPageSize":false,"PrintBackground":true,"Scale":1.00000}
|
||||
@@ -1 +1 @@
|
||||
{"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":"<html>\n\n<body>\n\t<div>\n\t\t<h2>Example: custom fields usage </h2>\n\t\t<p>See help documentation for details</p>\n\t\t<hr>\n\t</div>\n\t<div >\n\t\t{{#each ayReportData}} <!-- this #each is for iterating through each PO, note further below its corresponding /each to close -->\n\t\t<h2>PO # (internal key is Serial, to indicate a unique number ): {{ Serial }} </h2><br/>\n\t\tTags (if any tags, otherwise will show blank if none): {{Tags}} <br/>\n\t\t<h3>Custom fields </h3>\n\t\t<p class=\"example\">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.</p>\n\t\t<p class=\"example\">(note, example assumes generated sample data and that c1 and c5 have data)</p>\n\t\t<strong>Custom c1 as DateTime: {{ ayDateTime CustomFields.c1}}</strong> <br/>\n\t\t<strong>custom c5 as Number: {{ ayDecimal CustomFields.c5}}</strong> <br/>\t\t\n\n\t\t\t{{#each Items}} <!-- this #each is for iterating through each po items, note further below its corresponding /each to close -->\n\t\t\t<h2>For each PO Item (non custom fields) </h2>\t\n\t\t\tPurchaseOrderCost as is in database: {{ PurchaseOrderCost}} <br/>\t\t\n\t\t\tPurchaseOrderCost as Decimal Number (defaults to three decimal places): {{ ayDecimal PurchaseOrderCost}} <br/>\t\t\n\t\t\tPurchaseOrderCost as Currency: {{ ayCurrency PurchaseOrderCost}} <br/>\t\t\t\n\t\t\t{{/each}} <!-- this /each closes the iterating through each po items -->\n\t\t\t<hr />\n\t\t{{/each}} <!-- this /each closes the iterating through each PO -->\n\t\t<hr >\n\n\t</div>\n\n</body>\n\n</html>","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}
|
||||
{"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":"<html>\n\n<body>\n\t<div>\n\t\t<h2>Example: custom fields usage </h2>\n\t\t<p>See help documentation for details</p>\n\t\t<hr>\n\t</div>\n\t<div >\n\t\t{{#each ayReportData}} <!-- this #each is for iterating through each PO, note further below its corresponding /each to close -->\n\t\t<h2>PO # (internal key is Serial, to indicate a unique number ): {{ Serial }} </h2><br/>\n\t\tTags (if any tags, otherwise will show blank if none): {{Tags}} <br/>\n\t\t<h3>Custom fields </h3>\n\t\t<p class=\"example\">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.</p>\n\t\t<p class=\"example\">(note, example assumes generated sample data and that c1 and c5 have data)</p>\n\t\t<strong>Custom c1 as DateTime: {{ ayDateTime CustomFields.c1}}</strong> <br/>\n\t\t<strong>custom c5 as Number: {{ ayDecimal CustomFields.c5}}</strong> <br/>\t\t\n\n\t\t\t{{#each Items}} <!-- this #each is for iterating through each po items, note further below its corresponding /each to close -->\n\t\t\t<h2>For each PO Item (non custom fields) </h2>\t\n\t\t\tPurchaseOrderCost as is in database: {{ PurchaseOrderCost}} <br/>\t\t\n\t\t\tPurchaseOrderCost as Decimal Number (defaults to three decimal places): {{ ayDecimal PurchaseOrderCost}} <br/>\t\t\n\t\t\tPurchaseOrderCost as Currency: {{ ayCurrency PurchaseOrderCost}} <br/>\t\t\t\n\t\t\t{{/each}} <!-- this /each closes the iterating through each po items -->\n\t\t\t<hr />\n\t\t{{/each}} <!-- this /each closes the iterating through each PO -->\n\t\t<hr >\n\n\t</div>\n\n</body>\n\n</html>","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}
|
||||
@@ -1 +1 @@
|
||||
{"Name":"109x EXAMPLE PO Wiki displayed","Active":true,"Notes":"","Roles":124927,"AType":26,"IncludeWoItemDescendants":false,"Template":"<html>\n\n<body>\n\t<h2>Example: WIKI / markdown field usage </h2>\n\t<p>See help documentation for details</p>\n\n\t{{#each ayReportData}}\n\t<h1>FOR PO# {{Serial}} from vendor: {{VendorViz}}</h1>\n\t<h1>Below is Wiki for above PO:</h1>\n\t<div>\n\t{{ ayWiki Wiki }}\n\t</div>\n\t<hr>\n\t{{/each}}\n\t\n</body>\n\n</html>","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}
|
||||
{"Name":"💡109x EXAMPLE PO Wiki displayed","Active":true,"Notes":"","Roles":124927,"AType":26,"IncludeWoItemDescendants":false,"Template":"<html>\n\n<body>\n\t<h2>Example: WIKI / markdown field usage </h2>\n\t<p>See help documentation for details</p>\n\n\t{{#each ayReportData}}\n\t<h1>FOR PO# {{Serial}} from vendor: {{VendorViz}}</h1>\n\t<h1>Below is Wiki for above PO:</h1>\n\t<div>\n\t{{ ayWiki Wiki }}\n\t</div>\n\t<hr>\n\t{{/each}}\n\t\n</body>\n\n</html>","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}
|
||||
File diff suppressed because one or more lines are too long
@@ -1 +1 @@
|
||||
{"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":"<html>\n<body>\n\t\n\t<table>\n \n <thead>\n <tr>\n <td>PO#:</td>\n <td>Part#:</td>\n <td>QTY Ordered:</td>\n <td>QTY Received:</td>\n <td>Serials Received:</td>\n </tr>\n </thead>\n {{#each ayReportData}}\n <tbody> \n {{#each Items}} \n <tr> <!--note the additional Helper created #if_eq with which to do a direct comparison -->\n <td>{{../Serial}}</td> <!-- reference the 'parent' scope by placing ../ in front of the property name -->\n <td>{{PartViz}} </td> <!-- whereas this is within 'Items' so no prefix of ../ -->\n <td>{{QuantityOrdered}}</td>\n\n <!-- if_eq else statements below basically does: if received equals ordered display in green, if not equal, displays in red -->\n {{#if_eq QuantityOrdered QuantityReceived}}<td class=\"fontgreen\">same as ordered {{QuantityReceived}}</td> {{else}}<td class=\"fontred\">different than ordered {{QuantityReceived}}</td>{{/if_eq}}\n\t\t\t\t\t<!-- if else statements below basically does: if poitem has any serial numbers display, else if no serial display that preset text in red -->\n {{#if Serials}}<td>{{Serials}}</td>{{else}}<td class=\"fontblue\">no serials documented</td>{{/if}}\n </tr>\n {{/each}}\n </tbody>\n {{/each}}\n </table>\n\t\n</body>\n</html>","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}
|
||||
{"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":"<html>\n<body>\n\t\n\t<table>\n \n <thead>\n <tr>\n <td>PO#:</td>\n <td>Part#:</td>\n <td>QTY Ordered:</td>\n <td>QTY Received:</td>\n <td>Serials Received:</td>\n </tr>\n </thead>\n {{#each ayReportData}}\n <tbody> \n {{#each Items}} \n <tr> <!--note the additional Helper created #if_eq with which to do a direct comparison -->\n <td>{{../Serial}}</td> <!-- reference the 'parent' scope by placing ../ in front of the property name -->\n <td>{{PartViz}} </td> <!-- whereas this is within 'Items' so no prefix of ../ -->\n <td>{{QuantityOrdered}}</td>\n\n <!-- if_eq else statements below basically does: if received equals ordered display in green, if not equal, displays in red -->\n {{#if_eq QuantityOrdered QuantityReceived}}<td class=\"fontgreen\">same as ordered {{QuantityReceived}}</td> {{else}}<td class=\"fontred\">different than ordered {{QuantityReceived}}</td>{{/if_eq}}\n\t\t\t\t\t<!-- if else statements below basically does: if poitem has any serial numbers display, else if no serial display that preset text in red -->\n {{#if Serials}}<td>{{Serials}}</td>{{else}}<td class=\"fontblue\">no serials documented</td>{{/if}}\n </tr>\n {{/each}}\n </tbody>\n {{/each}}\n </table>\n\t\n</body>\n</html>","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}
|
||||
File diff suppressed because one or more lines are too long
@@ -1 +1 @@
|
||||
{"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":"<html>\n<body>\n\t\n\t<table>\n {{#each ayReportData}}\n <thead>\n <tr>\n <td>MAIN HEADER PO#: {{Serial}}</td> <!-- note NO ../ in front of the variable name here as this #each references the object directly -->\n <td>MAIN HEADER empty1</td>\n <td>MAIN HEADER empty2</td>\n </tr>\n </thead>\n <tbody> \n {{#each Items}} \n \n <tr>\n \n <td>TBODY PO# {{../Serial}}</td> <!-- note the ../ in front of the variable name when calling a variable from 'above' the Items array of the object -->\n <td>TBODY Part #: {{PartViz}} </td>\n <td>TBODY Qty Ordered: {{QuantityOrdered}}</td> <!-- whereas these are from the #each Items array of the object -->\n \n </tr>\n {{/each}}\n </tbody>\n {{/each}}\n </table>\n\t\n</body>\n</html>","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":"<span style=\"font-size:6pt;width: 94%; text-align:left; \"> (from PDF Options) Printed date: <span class=\"date\"></span></span>","FooterTemplate":"<span style=\"font-size:6pt;width: 94%; text-align: right; \"> set in PDF Options Page <span class=\"pageNumber\"></span> of <span class=\"totalPages\"></span> </span>","DisplayHeaderFooter":true,"PaperFormat":10,"Landscape":false,"MarginOptionsBottom":"10mm","MarginOptionsLeft":"10mm","MarginOptionsRight":"10mm","MarginOptionsTop":"10mm","PageRanges":null,"PreferCSSPageSize":false,"PrintBackground":true,"Scale":1.00000}
|
||||
{"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":"<html>\n<body>\n\t\n\t<table>\n {{#each ayReportData}}\n <thead>\n <tr>\n <td>MAIN HEADER PO#: {{Serial}}</td> <!-- note NO ../ in front of the variable name here as this #each references the object directly -->\n <td>MAIN HEADER empty1</td>\n <td>MAIN HEADER empty2</td>\n </tr>\n </thead>\n <tbody> \n {{#each Items}} \n \n <tr>\n \n <td>TBODY PO# {{../Serial}}</td> <!-- note the ../ in front of the variable name when calling a variable from 'above' the Items array of the object -->\n <td>TBODY Part #: {{PartViz}} </td>\n <td>TBODY Qty Ordered: {{QuantityOrdered}}</td> <!-- whereas these are from the #each Items array of the object -->\n \n </tr>\n {{/each}}\n </tbody>\n {{/each}}\n </table>\n\t\n</body>\n</html>","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":"<span style=\"font-size:6pt;width: 94%; text-align:left; \"> (from PDF Options) Printed date: <span class=\"date\"></span></span>","FooterTemplate":"<span style=\"font-size:6pt;width: 94%; text-align: right; \"> set in PDF Options Page <span class=\"pageNumber\"></span> of <span class=\"totalPages\"></span> </span>","DisplayHeaderFooter":true,"PaperFormat":10,"Landscape":false,"MarginOptionsBottom":"10mm","MarginOptionsLeft":"10mm","MarginOptionsRight":"10mm","MarginOptionsTop":"10mm","PageRanges":null,"PreferCSSPageSize":false,"PrintBackground":true,"Scale":1.00000}
|
||||
@@ -1 +1 @@
|
||||
{"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":"<html>\n\n<body>\n\t<h2>Example: Helpers to show if has a specific Tag / Custom fields usage </h2>\n\t<p>See the specific Helpers in this report template, and the help documentation for additional details</p>\n\n\t<table>\n\t\t{{#each ayReportData}}\n\t\t<thead>\n\t\t\t<tr>\n\t\t\t\t<th> </th>\n\t\t\t\t<th> </th>\n\t\t\t</tr>\n\t\t</thead> \n\t\t<tbody>\n\t\t\t<tr>\n\t\t\t\t<th>For PO#:</th> <!--th styles this as a heading column -->\n\t\t\t\t<th>{{ Serial }}</th><!--th styles this as a heading column -->\n\t\t\t</tr>\n\t\t\t<tr>\n\t\t\t\t<td>Display 1st Tag only:</td><!--td styles this as a data column -->\n\t\t\t\t<td>{{ Tags.[0]}} </td>\n\t\t\t</tr>\n\t\t\t<tr>\n\t\t\t\t<td>Called ayReportData's to display all tags for this PO:</td>\n\t\t\t\t<td class=\"blueMe\">{{ Tags}}</td>\n\t\t\t</tr>\n\t\t\t<tr>\n\t\t\t\t<td>Called custom Helper to display if has tag 'gold':</td>\n\t\t\t\t<td class=\"blueMe\">{{ isInTag Tags}}</td>\n\t\t\t</tr>\n\t\t\t<tr>\n\t\t\t\t<td>Called custom Helper to display if has tag 'brown':</td>\n\t\t\t\t<td class=\"blueMe\">{{ isInTag2 Tags}}</td>\n\t\t\t</tr>\n\t\t\t<tr>\n\t\t\t\t<td>Called custom Helper to display if has tag 'yellow':</td>\n\t\t\t\t<td class=\"blueMe\">{{ isInTag3 Tags}}</td>\n\t\t\t</tr>\n\t\t\t<tr>\n\t\t\t\t<td>If CustomFields.c1 has value, will display greenfont else will display redfont</td>\n\t\t\t\t{{#if CustomFields.c1}} <td class='greenMe' >{{CustomFields.c1}}</td> {{else}} <td class='redMe' >nope nothing here</td> {{/if}}\n\t\t\t</tr>\n\t\t\t{{#each Items}}\n\t\t\t<tr>\n\t\t\t\t<td>For each POitem will display in redfont if QuantyReceived is false, undefined, null, \"\", 0, or []</td>\n\t\t\t\t{{#if QuantityReceived}} <td class='greenMe' >For {{PartViz}} have received: {{QuantityReceived}}</td> {{else}} <td class='redMe' >Nothing received yet for {{PartViz}}</td> {{/if}}\n\t\t\t</tr>\n\t\t\t{{/each}}\n\t\t</tbody>\n\t\t{{/each}}\n\t</table>\n \n</body>\n\n</html>","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<Tags.length; i++) \n\t{\n if (Tags[i].match('gold'))\n\t\t{ \n return 'gold'; \n\t\t}\n }\n return 'no gold tag';\n});\n\nHandlebars.registerHelper('isInTag2', function (Tags) \n{\n for (var i=0; i<Tags.length; i++) \n\t{\n if (Tags[i].match('brown'))\n\t\t{ \n\t\t\treturn 'THE WORD or part of brown IS IN HERE';\n\t\t}\n }\n return 'NOPE part of full word with \\'brown\\' is NOT HERE';\n});\n\nHandlebars.registerHelper('isInTag3', function (Tags) \n{\n for (var i=0; i<Tags.length; i++) \n\t{\n if (Tags[i].match('yellow'))\n\t\t{ \n\t\t\treturn new Handlebars.SafeString(\"<p class='greenMe' >\" + \"yellow is in here!! see how this shows in greenfont!\" +\"</p>\"); //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}
|
||||
{"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":"<html>\n\n<body>\n\t<h2>Example: Helpers to show if has a specific Tag / Custom fields usage </h2>\n\t<p>See the specific Helpers in this report template, and the help documentation for additional details</p>\n\n\t<table>\n\t\t{{#each ayReportData}}\n\t\t<thead>\n\t\t\t<tr>\n\t\t\t\t<th> </th>\n\t\t\t\t<th> </th>\n\t\t\t</tr>\n\t\t</thead> \n\t\t<tbody>\n\t\t\t<tr>\n\t\t\t\t<th>For PO#:</th> <!--th styles this as a heading column -->\n\t\t\t\t<th>{{ Serial }}</th><!--th styles this as a heading column -->\n\t\t\t</tr>\n\t\t\t<tr>\n\t\t\t\t<td>Display 1st Tag only:</td><!--td styles this as a data column -->\n\t\t\t\t<td>{{ Tags.[0]}} </td>\n\t\t\t</tr>\n\t\t\t<tr>\n\t\t\t\t<td>Called ayReportData's to display all tags for this PO:</td>\n\t\t\t\t<td class=\"blueMe\">{{ Tags}}</td>\n\t\t\t</tr>\n\t\t\t<tr>\n\t\t\t\t<td>Called custom Helper to display if has tag 'gold':</td>\n\t\t\t\t<td class=\"blueMe\">{{ isInTag Tags}}</td>\n\t\t\t</tr>\n\t\t\t<tr>\n\t\t\t\t<td>Called custom Helper to display if has tag 'brown':</td>\n\t\t\t\t<td class=\"blueMe\">{{ isInTag2 Tags}}</td>\n\t\t\t</tr>\n\t\t\t<tr>\n\t\t\t\t<td>Called custom Helper to display if has tag 'yellow':</td>\n\t\t\t\t<td class=\"blueMe\">{{ isInTag3 Tags}}</td>\n\t\t\t</tr>\n\t\t\t<tr>\n\t\t\t\t<td>If CustomFields.c1 has value, will display greenfont else will display redfont</td>\n\t\t\t\t{{#if CustomFields.c1}} <td class='greenMe' >{{CustomFields.c1}}</td> {{else}} <td class='redMe' >nope nothing here</td> {{/if}}\n\t\t\t</tr>\n\t\t\t{{#each Items}}\n\t\t\t<tr>\n\t\t\t\t<td>For each POitem will display in redfont if QuantyReceived is false, undefined, null, \"\", 0, or []</td>\n\t\t\t\t{{#if QuantityReceived}} <td class='greenMe' >For {{PartViz}} have received: {{QuantityReceived}}</td> {{else}} <td class='redMe' >Nothing received yet for {{PartViz}}</td> {{/if}}\n\t\t\t</tr>\n\t\t\t{{/each}}\n\t\t</tbody>\n\t\t{{/each}}\n\t</table>\n \n</body>\n\n</html>","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<Tags.length; i++) \n\t{\n if (Tags[i].match('gold'))\n\t\t{ \n return 'gold'; \n\t\t}\n }\n return 'no gold tag';\n});\n\nHandlebars.registerHelper('isInTag2', function (Tags) \n{\n for (var i=0; i<Tags.length; i++) \n\t{\n if (Tags[i].match('brown'))\n\t\t{ \n\t\t\treturn 'THE WORD or part of brown IS IN HERE';\n\t\t}\n }\n return 'NOPE part of full word with \\'brown\\' is NOT HERE';\n});\n\nHandlebars.registerHelper('isInTag3', function (Tags) \n{\n for (var i=0; i<Tags.length; i++) \n\t{\n if (Tags[i].match('yellow'))\n\t\t{ \n\t\t\treturn new Handlebars.SafeString(\"<p class='greenMe' >\" + \"yellow is in here!! see how this shows in greenfont!\" +\"</p>\"); //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}
|
||||
File diff suppressed because one or more lines are too long
File diff suppressed because one or more lines are too long
File diff suppressed because one or more lines are too long
File diff suppressed because one or more lines are too long
File diff suppressed because one or more lines are too long
File diff suppressed because one or more lines are too long
File diff suppressed because one or more lines are too long
@@ -22,7 +22,7 @@ namespace AyaNova.Util
|
||||
//!!!!WARNING: BE SURE TO UPDATE THE DbUtil::EmptyBizDataFromDatabaseForSeedingOrImportingAsync WHEN NEW TABLES ADDED!!!!
|
||||
private const int DESIRED_SCHEMA_LEVEL = 1;
|
||||
|
||||
internal const long EXPECTED_COLUMN_COUNT = 1319;
|
||||
internal const long EXPECTED_COLUMN_COUNT = 1320;
|
||||
internal const long EXPECTED_INDEX_COUNT = 153;
|
||||
internal const long EXPECTED_CHECK_CONSTRAINTS = 518;
|
||||
internal const long EXPECTED_FOREIGN_KEY_CONSTRAINTS = 198;
|
||||
@@ -31,7 +31,7 @@ namespace AyaNova.Util
|
||||
|
||||
//!!!!WARNING: BE SURE TO UPDATE THE DbUtil::EmptyBizDataFromDatabaseForSeedingOrImportingAsync WHEN NEW TABLES ADDED!!!!
|
||||
|
||||
///////////////////////////////////////////////////////////////// C1319:I153:CC518:FC198:V11:R2
|
||||
///////////////////////////////////////////////////////////////// C1320:I153:CC518:FC198:V11:R2
|
||||
|
||||
|
||||
|
||||
|
||||
Reference in New Issue
Block a user