diff --git a/entity/Offer_entity/Offer_entity.aod b/entity/Offer_entity/Offer_entity.aod index 3eeea68776f6dfddf0736b8794cfeb338f7eefcd..18e08a0f7e7abf4308ee5284749176425aee03bc 100644 --- a/entity/Offer_entity/Offer_entity.aod +++ b/entity/Offer_entity/Offer_entity.aod @@ -957,6 +957,7 @@ <contentType>NUMBER</contentType> <outputFormat>0.00'%'</outputFormat> <inputFormat>0.00</inputFormat> + <stateProcess>%aditoprj%/entity/Offer_entity/entityfields/discount/stateProcess.js</stateProcess> <valueProcess>%aditoprj%/entity/Offer_entity/entityfields/discount/valueProcess.js</valueProcess> <onValueChange>%aditoprj%/entity/Offer_entity/entityfields/discount/onValueChange.js</onValueChange> <onValueChangeTypes> diff --git a/entity/Offer_entity/entityfields/discount/stateProcess.js b/entity/Offer_entity/entityfields/discount/stateProcess.js new file mode 100644 index 0000000000000000000000000000000000000000..8c131df635e8bd89ea2f56d920eb56bb9c5af588 --- /dev/null +++ b/entity/Offer_entity/entityfields/discount/stateProcess.js @@ -0,0 +1,6 @@ +import("system.vars"); +import("system.result"); +import("system.neon"); +import("Offer_lib"); + +result.string(OfferUtils.isEditable(vars.get("$field.STATUS")) ? neon.COMPONENTSTATE_AUTO : neon.COMPONENTSTATE_DISABLED);