Skip to content
Snippets Groups Projects
Commit bdef2e5c authored by s.neumaier's avatar s.neumaier
Browse files

[Projekt: Entwicklung - xRM][TicketNr.: 1068641][Angebote - Gesamtrabatt / Rechnungsrabatt]

parent 7f4fba15
No related branches found
No related tags found
No related merge requests found
......@@ -1075,6 +1075,7 @@
<outputFormat>#,##0.00</outputFormat>
<inputFormat>#,##0.00</inputFormat>
<state>READONLY</state>
<stateProcess>%aditoprj%/entity/Offer_entity/entityfields/discounted_net/stateProcess.js</stateProcess>
<displayValueProcess>%aditoprj%/entity/Offer_entity/entityfields/discounted_net/displayValueProcess.js</displayValueProcess>
</entityField>
<entityParameter>
......
import("system.vars");
import("system.neon");
import("system.result");
var discount = vars.get("$field.DISCOUNT");
if(parseInt(discount) == parseInt("0") || !discount)
result.string(neon.COMPONENTSTATE_INVISIBLE);
else
result.string(neon.COMPONENTSTATE_READONLY);
\ No newline at end of file
......@@ -2,7 +2,8 @@ import("system.result");
import("system.vars");
import("system.eMath");
var netValue = vars.get("$field.DISCOUNTED_NET");
var discount = vars.get("$field.DISCOUNT");
var netValue = discount && parseInt(discount) != parseInt("0") ? vars.get("$field.DISCOUNTED_NET") : vars.get("$field.NET")
var vatValue = vars.get("$field.VAT");
result.string( eMath.addDec(netValue, vatValue) );
\ 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