diff --git a/entity/Offer_entity/entityfields/attributes/stateProcess.js b/entity/Offer_entity/entityfields/attributes/stateProcess.js
index 0a6a6c21d28963cf2bf06df2749337986db749b5..0fbe4590d5cc1f3881ba963a4c4e9f61cd9837d2 100644
--- a/entity/Offer_entity/entityfields/attributes/stateProcess.js
+++ b/entity/Offer_entity/entityfields/attributes/stateProcess.js
@@ -1,20 +1,17 @@
+import("system.result");
+import("system.neon");
+import("system.vars");
 import("Context_lib");
 import("Attribute_lib");
 import("Offer_lib");
-import("Sql_lib");
-import("system.vars");
-import("system.db");
-import("system.neon");
-import("system.result");
 
-if (OfferUtils.isEditable(vars.get("$field.STATUS"))) 
+var state = neon.COMPONENTSTATE_INVISIBLE;
+if(AttributeUtil.hasAttributes(ContextUtils.getCurrentContextId()))
 {
-    if (AttributeUtil.hasAttributes(ContextUtils.getCurrentContextId()))
-        result.string(neon.COMPONENTSTATE_EDITABLE);
-    else
-        result.string(neon.COMPONENTSTATE_INVISIBLE);
+    state = neon.COMPONENTSTATE_READONLY;
+    if(OfferUtils.isEditable(vars.get("$field.STATUS"))) 
+    {
+        state = neon.COMPONENTSTATE_EDITABLE;
+    }
 }
-else
-{
-    result.string(neon.COMPONENTSTATE_READONLY);
-}
\ No newline at end of file
+result.string(state);