From 9649d3e25aa27313d7cb9e6c3b1576def83a643c Mon Sep 17 00:00:00 2001 From: Johannes Hoermann <j.hoermann@adito.de> Date: Wed, 22 May 2019 10:23:44 +0200 Subject: [PATCH] some display value fixes --- entity/Order_entity/Order_entity.aod | 6 ++++++ entity/Salesproject_entity/Salesproject_entity.aod | 7 +++---- .../entityfields/volume/displayValueProcess.js | 5 +++++ .../entityfields/volume/titleProcess.js | 4 ---- 4 files changed, 14 insertions(+), 8 deletions(-) create mode 100644 entity/Salesproject_entity/entityfields/volume/displayValueProcess.js delete mode 100644 entity/Salesproject_entity/entityfields/volume/titleProcess.js diff --git a/entity/Order_entity/Order_entity.aod b/entity/Order_entity/Order_entity.aod index b2d2762e41..4a789fa06e 100644 --- a/entity/Order_entity/Order_entity.aod +++ b/entity/Order_entity/Order_entity.aod @@ -86,6 +86,8 @@ <entityField> <name>VAT</name> <title>Total VAT</title> + <contentType>NUMBER</contentType> + <outputFormat>#,##0.00</outputFormat> <state>READONLY</state> </entityField> <entityField> @@ -151,6 +153,8 @@ <entityField> <name>NET</name> <title>Total net</title> + <contentType>NUMBER</contentType> + <outputFormat>#,##0.00</outputFormat> <state>READONLY</state> <valueProcess></valueProcess> </entityField> @@ -158,6 +162,8 @@ <name>TotalGross</name> <documentation>%aditoprj%/entity/Order_entity/entityfields/totalgross/documentation.adoc</documentation> <title>Total gross</title> + <contentType>NUMBER</contentType> + <outputFormat>#,##0.00</outputFormat> <state>READONLY</state> <valueProcess>%aditoprj%/entity/Order_entity/entityfields/totalgross/valueProcess.js</valueProcess> </entityField> diff --git a/entity/Salesproject_entity/Salesproject_entity.aod b/entity/Salesproject_entity/Salesproject_entity.aod index 65e4ecf179..9ce26b107e 100644 --- a/entity/Salesproject_entity/Salesproject_entity.aod +++ b/entity/Salesproject_entity/Salesproject_entity.aod @@ -102,12 +102,11 @@ <entityField> <name>VOLUME</name> <title>Volume</title> - <description>The displayValue from the recoord container adds T € (translated)</description> + <description></description> <contentType>NUMBER</contentType> - <outputFormat>0</outputFormat> - <inputFormat>0</inputFormat> + <outputFormat>#0</outputFormat> + <inputFormat>#0</inputFormat> <searchable v="true" /> - <titleProcess>%aditoprj%/entity/Salesproject_entity/entityfields/volume/titleProcess.js</titleProcess> <displayValueProcess>%aditoprj%/entity/Salesproject_entity/entityfields/volume/displayValueProcess.js</displayValueProcess> </entityField> <entityConsumer> diff --git a/entity/Salesproject_entity/entityfields/volume/displayValueProcess.js b/entity/Salesproject_entity/entityfields/volume/displayValueProcess.js new file mode 100644 index 0000000000..d2aa644848 --- /dev/null +++ b/entity/Salesproject_entity/entityfields/volume/displayValueProcess.js @@ -0,0 +1,5 @@ +import("system.vars"); +import("system.translate"); +import("system.result"); + +result.string(parseInt(vars.get("$field.VOLUME")) + " " + translate.text("${EURO_SIGN}")) \ No newline at end of file diff --git a/entity/Salesproject_entity/entityfields/volume/titleProcess.js b/entity/Salesproject_entity/entityfields/volume/titleProcess.js deleted file mode 100644 index 2c5d74cb55..0000000000 --- a/entity/Salesproject_entity/entityfields/volume/titleProcess.js +++ /dev/null @@ -1,4 +0,0 @@ -import("system.result"); -import("system.translate"); - -result.string(translate.text("Volume") + " (" + translate.text("${EURO_SIGN}") + ")"); \ No newline at end of file -- GitLab