Skip to content
Snippets Groups Projects
Commit 4731a28f authored by Johannes Hörmann's avatar Johannes Hörmann
Browse files

refactor display values

parent 84a0a360
No related branches found
No related tags found
No related merge requests found
......@@ -109,10 +109,9 @@
</entityField>
<entityField>
<name>VAT</name>
<title>VAT in %</title>
<title>VAT</title>
<contentType>NUMBER</contentType>
<outputFormat>#,##0.00</outputFormat>
<inputFormat>#,##0.00</inputFormat>
<inputFormat>0.00</inputFormat>
<state>READONLY</state>
<displayValueProcess>%aditoprj%/entity/Offeritem_entity/entityfields/vat/displayValueProcess.js</displayValueProcess>
</entityField>
......
import("Util_lib");
import("system.text");
import("system.vars");
import("system.translate");
import("system.result");
result.string(NumberUtils.formatWithCurrency(vars.get("$this.value"), translate.text("#,##0.00"), vars.get("$param.Currency_param")));
\ No newline at end of file
if (vars.get("$this.value"))
result.string(text.formatDouble(vars.get("$this.value"), "0.00") + "%");
......@@ -95,10 +95,10 @@
</entityField>
<entityField>
<name>VAT</name>
<title>VAT in %</title>
<title>VAT</title>
<contentType>NUMBER</contentType>
<outputFormat>#,##0.00</outputFormat>
<inputFormat>#,##0.00</inputFormat>
<outputFormat>0.00 %</outputFormat>
<inputFormat>0.00</inputFormat>
<state>AUTO</state>
<displayValueProcess>%aditoprj%/entity/Orderitem_entity/entityfields/vat/displayValueProcess.js</displayValueProcess>
</entityField>
......
import("Util_lib");
import("system.text");
import("system.vars");
import("system.translate");
import("system.result");
result.string(NumberUtils.formatWithCurrency(vars.get("$this.value"), translate.text("#,##0.00"), vars.get("$param.Currency_param")));
\ No newline at end of file
if (vars.get("$this.value"))
result.string(text.formatDouble(vars.get("$this.value"), "0.00") + "%");
\ No newline at end of file
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment