From 5e9379ee891379ece7ea928d38d4ea9a871f818e Mon Sep 17 00:00:00 2001 From: "p.neub" <p.neub@adito.de> Date: Fri, 21 May 2021 13:15:08 +0200 Subject: [PATCH] =?UTF-8?q?[Projekt:=20xRM-Sales][TicketNr.:=201079936][[A?= =?UTF-8?q?ngebot]=20Button=20"Zu=20Angebot=20hinzuf=C3=BCgen"=20inaktiv?= =?UTF-8?q?=20setzen,=20wenn=20Angebot=20nicht=20mehr=20bearbeitbar]?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../entityfields/addtooffer/stateProcess.js | 16 ++++++---------- 1 file changed, 6 insertions(+), 10 deletions(-) diff --git a/entity/Product_entity/entityfields/addtooffer/stateProcess.js b/entity/Product_entity/entityfields/addtooffer/stateProcess.js index a28ffee7b2..e04ccbdcb9 100644 --- a/entity/Product_entity/entityfields/addtooffer/stateProcess.js +++ b/entity/Product_entity/entityfields/addtooffer/stateProcess.js @@ -3,16 +3,12 @@ import("system.result"); import("Offer_lib"); import("system.vars"); - - if(vars.get("$param.ShownInOfferMainView_param")) { - - var res; - res = OfferUtils.isEditable(vars.get("$param.OrderOfferInformations_param")["OfferStatus_param"])? - neon.COMPONENTSTATE_EDITABLE: neon.COMPONENTSTATE_DISABLED; - - - result.string(res); + result.string( + OfferUtils.isEditable(JSON.parse( + vars.get("$param.OrderOfferInformations_param") + )["OfferStatus_param"]) ? + neon.COMPONENTSTATE_EDITABLE: neon.COMPONENTSTATE_DISABLED + ); } - \ No newline at end of file -- GitLab