diff --git a/server/AyaNova/resource/rpt/stock-report-templates/z_custom fields.ayrt b/server/AyaNova/resource/rpt/stock-report-templates/z_custom fields.ayrt index d01b4c36..86185113 100644 --- a/server/AyaNova/resource/rpt/stock-report-templates/z_custom fields.ayrt +++ b/server/AyaNova/resource/rpt/stock-report-templates/z_custom fields.ayrt @@ -1 +1 @@ -{"Name":"z_custom fields","Active":true,"Notes":"example of using AyaNova provided Helpers to format custom fields - requires the object to have custom fields enabled\n","Roles":50538,"AType":34,"IncludeWoItemDescendants":false,"Template":"\n\n\n
\n

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

\n\n\n {{#each ayReportData}}\n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n {{#each Items}}\n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n {{#each Units}}\n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n {{/each}}\n {{/each}} \n \n
{{ayT 'WorkOrder'}} {{ayT 'WorkOrderServiceNumber'}}{{ Serial }}
 
{{ayT 'WorkOrder'}} {{ayT 'WorkOrderCustom1'}} displayed with no additional formating{{ CustomFields.c1 }}
 
{{ayT 'WorkOrder'}} {{ayT 'WorkOrderCustom2'}} displayed with no additional formating{{ CustomFields.c2 }}
If {{ayT 'WorkOrderCustom2'}} has {{ayT 'ObjectCustomFieldFieldType'}} of DateTime, shows with additional formating via ayDateTime{{ ayDateTime CustomFields.c2 }}
 
{{ayT 'WorkOrder'}} {{ayT 'WorkOrderCustom3'}} displayed with no additional formating{{ CustomFields.c3 }}
If {{ayT 'WorkOrderCustom3'}} has {{ayT 'ObjectCustomFieldFieldType'}} of Money, shows with additional formating via ayCurrency{{ayCurrency CustomFields.c3 }}
 
 {{ayT 'WorkOrderItem'}} {{ayT 'WorkOrderItemSummary'}}{{Notes}}
 {{ayT 'WorkOrderItem'}} {{ayT 'WorkOrderItemCustom1'}} displayed with no additional formating{{CustomFields.c1}}
 
 {{ayT 'WorkOrderItem'}} {{ayT 'WorkOrderItemCustom2'}} displayed with no additional formating{{CustomFields.c2}}
 If {{ayT 'WorkOrderItemCustom2'}} has {{ayT 'ObjectCustomFieldFieldType'}} of DateTime, shows with additional formating via ayDateTime{{ayDateTime CustomFields.c2}}
 
 {{ayT 'WorkOrderItem'}} {{ayT 'WorkOrderItemCustom3'}} displayed with no additional formating{{CustomFields.c3}}
 If {{ayT 'WorkOrderItemCustom3'}} has {{ayT 'ObjectCustomFieldFieldType'}} of Money, shows with additional formating via ayCurrency{{ayCurrency CustomFields.c3}}
 
 {{ayT 'WorkOrderItemUnit'}}{{UnitViz}} - {{UnitModelNameViz}}
 {{ayT 'WorkOrderItemUnit'}} {{ayT 'WorkOrderItemUnitCustom1'}} displayed with no additional formating{{CustomFields.c1}}
 
 {{ayT 'WorkOrderItemUnit'}} {{ayT 'WorkOrderItemUnitCustom2'}} displayed with no additional formating{{CustomFields.c2}}
 If {{ayT 'WorkOrderItemCustom2'}} has {{ayT 'ObjectCustomFieldFieldType'}} of DateTime, shows with additional formating via ayDateTime{{ayDateTime CustomFields.c2}}
 
 {{ayT 'WorkOrderItemUnit'}} {{ayT 'WorkOrderItemUnitCustom3'}} displayed with no additional formating{{CustomFields.c3}}
 If {{ayT 'WorkOrderItemUnit'}} has {{ayT 'ObjectCustomFieldFieldType'}} of Money, shows with additional formating via ayCurrency{{ayCurrency CustomFields.c3}}
 
\n {{/each}}\n
\n\n\n\n","Style":".singlePage\n{\npage-break-after: always;\n}\n\nbody {\n font-family: 'Helvetica', 'Helvetica Neue', Arial, sans-serif; \n}\n\n.reporttitle { \n margin-bottom: 20pt; \n font-weight: bold; \n font-size: 13pt; \n} \n\ntable { \n table-layout: fixed; \n border-collapse: collapse;\n white-space: pre-wrap;\n font-size: 8pt;\n width: 100%;\n }\n\n\nth {\n height: 20px;\n color: #9e9e9e;\n}\n\ntbody tr {\n height: 5px;\n word-wrap: break-word;\n}\n\ntbody tr:nth-child(even) {\n background-color: #f8f8f8; /* MUST checkmark Print background in PDF Options for this to show */\n}\n\n.fontgreen {\n color: green;\n}\n.fontblue {\n color: blue;\n}\n.fontred {\n color:red;\n}\n\n\n.rightlean {\n text-align: right;\n}\n.leftlean {\n text-align: left;\n}\n.centerlean {\n text-align: center;\n}","JsPrerender":"async function ayPrepareData(reportData){ \n //this function (if present) is called with the report data \n //before the report is rendered\n //modify data as required here and return it to change the data before the report renders\n //see the help documentation for details\n\n\tawait ayGetTranslations([ \"ObjectCustomFieldFieldType\", \"WorkOrder\", \"WorkOrderServiceNumber\", \"WorkOrderCustom1\", \"WorkOrderCustom2\",\"WorkOrderCustom3\", \"WorkOrderItemSummary\", \"WorkOrderItem\", \"WorkOrderItemCustom1\", \"WorkOrderItemCustom2\", \"WorkOrderItemCustom3\", \"WorkOrderItemUnit\", \"WorkOrderItemUnitCustom1\", \"WorkOrderItemUnitCustom2\", \"WorkOrderItemUnitCustom3\" ]);\n\n\n\n\n return reportData;\n}","JsHelpers":"\n","RenderType":0,"HeaderTemplate":" ","FooterTemplate":"          Printed date: \n   Page  of         ","DisplayHeaderFooter":true,"PaperFormat":10,"Landscape":false,"MarginOptionsBottom":"15mm","MarginOptionsLeft":"15mm","MarginOptionsRight":"10mm","MarginOptionsTop":"10mm","PageRanges":null,"PreferCSSPageSize":false,"PrintBackground":true,"Scale":1.00000} \ No newline at end of file +{"Name":"z_custom fields","Active":true,"Notes":"example of using AyaNova provided Helpers to format custom fields - requires the object to have custom fields enabled\n","Roles":50538,"AType":34,"IncludeWoItemDescendants":false,"Template":"\n\n\n
\n

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

\n\n\n {{#each ayReportData}}\n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n {{#each Items}}\n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n {{#each Units}}\n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n {{/each}}\n {{/each}} \n \n
{{ayT 'WorkOrder'}} {{ayT 'WorkOrderServiceNumber'}}{{ Serial }}
 
{{ayT 'WorkOrder'}} {{ayT 'WorkOrderCustom1'}} displayed with no additional formating{{ CustomFields.c1 }}
 
{{ayT 'WorkOrder'}} {{ayT 'WorkOrderCustom2'}} displayed with no additional formating{{ CustomFields.c2 }}
If {{ayT 'WorkOrderCustom2'}} has {{ayT 'UiFieldDataType'}} of DateTime, shows with additional formating via ayDateTime{{ ayDateTime CustomFields.c2 }}
 
{{ayT 'WorkOrder'}} {{ayT 'WorkOrderCustom3'}} displayed with no additional formating{{ CustomFields.c3 }}
If {{ayT 'WorkOrderCustom3'}} has {{ayT 'UiFieldDataType'}} of Money, shows with additional formating via ayCurrency{{ayCurrency CustomFields.c3 }}
 
 {{ayT 'WorkOrderItem'}} {{ayT 'WorkOrderItemSummary'}}{{Notes}}
 {{ayT 'WorkOrderItem'}} {{ayT 'WorkOrderItemCustom1'}} displayed with no additional formating{{CustomFields.c1}}
 
 {{ayT 'WorkOrderItem'}} {{ayT 'WorkOrderItemCustom2'}} displayed with no additional formating{{CustomFields.c2}}
 If {{ayT 'WorkOrderItemCustom2'}} has {{ayT 'UiFieldDataType'}} of DateTime, shows with additional formating via ayDateTime{{ayDateTime CustomFields.c2}}
 
 {{ayT 'WorkOrderItem'}} {{ayT 'WorkOrderItemCustom3'}} displayed with no additional formating{{CustomFields.c3}}
 If {{ayT 'WorkOrderItemCustom3'}} has {{ayT 'UiFieldDataType'}} of Money, shows with additional formating via ayCurrency{{ayCurrency CustomFields.c3}}
 
 {{ayT 'WorkOrderItemUnit'}}{{UnitViz}} - {{UnitModelNameViz}}
 {{ayT 'WorkOrderItemUnit'}} {{ayT 'WorkOrderItemUnitCustom1'}} displayed with no additional formating{{CustomFields.c1}}
 
 {{ayT 'WorkOrderItemUnit'}} {{ayT 'WorkOrderItemUnitCustom2'}} displayed with no additional formating{{CustomFields.c2}}
 If {{ayT 'WorkOrderItemCustom2'}} has {{ayT 'UiFieldDataType'}} of DateTime, shows with additional formating via ayDateTime{{ayDateTime CustomFields.c2}}
 
 {{ayT 'WorkOrderItemUnit'}} {{ayT 'WorkOrderItemUnitCustom3'}} displayed with no additional formating{{CustomFields.c3}}
 If {{ayT 'WorkOrderItemUnit'}} has {{ayT 'UiFieldDataType'}} of Money, shows with additional formating via ayCurrency{{ayCurrency CustomFields.c3}}
 
\n {{/each}}\n
\n\n\n\n","Style":".singlePage\n{\npage-break-after: always;\n}\n\nbody {\n font-family: 'Helvetica', 'Helvetica Neue', Arial, sans-serif; \n}\n\n.reporttitle { \n margin-bottom: 20pt; \n font-weight: bold; \n font-size: 13pt; \n} \n\ntable { \n table-layout: fixed; \n border-collapse: collapse;\n white-space: pre-wrap;\n font-size: 8pt;\n width: 100%;\n }\n\n\nth {\n height: 20px;\n color: #9e9e9e;\n}\n\ntbody tr {\n height: 5px;\n word-wrap: break-word;\n}\n\ntbody tr:nth-child(even) {\n background-color: #f8f8f8; /* MUST checkmark Print background in PDF Options for this to show */\n}\n\n.fontgreen {\n color: green;\n}\n.fontblue {\n color: blue;\n}\n.fontred {\n color:red;\n}\n\n\n.rightlean {\n text-align: right;\n}\n.leftlean {\n text-align: left;\n}\n.centerlean {\n text-align: center;\n}","JsPrerender":"async function ayPrepareData(reportData){ \n //this function (if present) is called with the report data \n //before the report is rendered\n //modify data as required here and return it to change the data before the report renders\n //see the help documentation for details\n\n\tawait ayGetTranslations([ \"UiFieldDataType\", \"WorkOrder\", \"WorkOrderServiceNumber\", \"WorkOrderCustom1\", \"WorkOrderCustom2\",\"WorkOrderCustom3\", \"WorkOrderItemSummary\", \"WorkOrderItem\", \"WorkOrderItemCustom1\", \"WorkOrderItemCustom2\", \"WorkOrderItemCustom3\", \"WorkOrderItemUnit\", \"WorkOrderItemUnitCustom1\", \"WorkOrderItemUnitCustom2\", \"WorkOrderItemUnitCustom3\" ]);\n\n\n\n\n return reportData;\n}","JsHelpers":"\n","RenderType":0,"HeaderTemplate":" ","FooterTemplate":"          Printed date: \n   Page  of         ","DisplayHeaderFooter":true,"PaperFormat":10,"Landscape":false,"MarginOptionsBottom":"15mm","MarginOptionsLeft":"15mm","MarginOptionsRight":"10mm","MarginOptionsTop":"10mm","PageRanges":null,"PreferCSSPageSize":false,"PrintBackground":true,"Scale":1.00000} \ No newline at end of file