diff --git a/entity/Order_entity/Order_entity.aod b/entity/Order_entity/Order_entity.aod index 7e2f3776198f36560ce47649f0b4e064ee1eb483..74e49cad4413ed7e95cfe8373abf36812fb6b3c2 100644 --- a/entity/Order_entity/Order_entity.aod +++ b/entity/Order_entity/Order_entity.aod @@ -1044,6 +1044,11 @@ </entityParameter> </children> </entityConsumer> + <entityAggregateField> + <name>NET_aggregate</name> + <parentField>NET</parentField> + <displayValueProcess>%aditoprj%/entity/Order_entity/entityfields/net_aggregate/displayValueProcess.js</displayValueProcess> + </entityAggregateField> </entityFields> <recordContainers> <dbRecordContainer> @@ -1268,6 +1273,11 @@ <name>DISCOUNTED_VAT.value</name> <recordfield>SALESORDER.DISCOUNTED_VAT</recordfield> </dbRecordFieldMapping> + <aggregateFieldDbMapping> + <name>NET_aggregate.value</name> + <recordfield>SALESORDER.NET</recordfield> + <aggregateType>SUM</aggregateType> + </aggregateFieldDbMapping> </recordFieldMappings> <linkInformation> <linkInformation> diff --git a/entity/Order_entity/entityfields/net_aggregate/displayValueProcess.js b/entity/Order_entity/entityfields/net_aggregate/displayValueProcess.js new file mode 100644 index 0000000000000000000000000000000000000000..4f5588525c87828da34ddfda75321416af6420a8 --- /dev/null +++ b/entity/Order_entity/entityfields/net_aggregate/displayValueProcess.js @@ -0,0 +1,8 @@ +import("system.result"); +import("system.vars"); +import("system.translate"); +import("Util_lib"); +import("KeywordRegistry_basic"); + +// TODO: add multicurrency support +result.string(NumberUtils.formatWithCurrency(vars.get("$this.value"), translate.text("#,##0.00"), $KeywordRegistry.currency$eur())); diff --git a/neonView/OrderFilter_view/OrderFilter_view.aod b/neonView/OrderFilter_view/OrderFilter_view.aod index d4c712215b0fc63f599c6d48115e4d0b63b7b26a..24b1f14667a418ebe1a20f7a2d23ac36ddf69ecf 100644 --- a/neonView/OrderFilter_view/OrderFilter_view.aod +++ b/neonView/OrderFilter_view/OrderFilter_view.aod @@ -146,6 +146,7 @@ <neonTreeTableColumn> <name>7873c2f2-0dc4-4c54-814a-df970eddea65</name> <entityField>NET</entityField> + <aggregateEntityField>NET_aggregate</aggregateEntityField> </neonTreeTableColumn> </columns> </treeTableViewTemplate>