diff --git a/entity/Offer_entity/Offer_entity.aod b/entity/Offer_entity/Offer_entity.aod
index eee788f8abc4f9500d79254b997373295b359bca..5bb9a98c287822037d485f6e7eb38d1b1209c8a1 100644
--- a/entity/Offer_entity/Offer_entity.aod
+++ b/entity/Offer_entity/Offer_entity.aod
@@ -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>
diff --git a/entity/Offer_entity/entityfields/discounted_net/stateProcess.js b/entity/Offer_entity/entityfields/discounted_net/stateProcess.js
new file mode 100644
index 0000000000000000000000000000000000000000..7443b0c0dcb6c9e38045968ddaa64b5763dfd85e
--- /dev/null
+++ b/entity/Offer_entity/entityfields/discounted_net/stateProcess.js
@@ -0,0 +1,10 @@
+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
diff --git a/entity/Offer_entity/entityfields/totalgross/valueProcess.js b/entity/Offer_entity/entityfields/totalgross/valueProcess.js
index 969aa80e1c852784e3a24f0030b9cd0871505bf3..0be973c0986b888f1cac0f7f04193ce82b0209a6 100644
--- a/entity/Offer_entity/entityfields/totalgross/valueProcess.js
+++ b/entity/Offer_entity/entityfields/totalgross/valueProcess.js
@@ -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