From 8a00b8058095e48716ced6c8c12937b4ebfd2631 Mon Sep 17 00:00:00 2001 From: "b.ulrich" <b.ulrich@adito.de> Date: Mon, 5 Jul 2021 08:36:29 +0200 Subject: [PATCH] =?UTF-8?q?[Projekt:=20xRM-Sales][TicketNr.:=201083290][An?= =?UTF-8?q?gebotsposten=20hinzuf=C3=BCgen=20-=20Menge=20=C3=A4ndern=20Exce?= =?UTF-8?q?ption]?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../Offeritem_entity/entityfields/quantity/onValueChange.js | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/entity/Offeritem_entity/entityfields/quantity/onValueChange.js b/entity/Offeritem_entity/entityfields/quantity/onValueChange.js index 3e3d47e47f4..d633387f8c7 100644 --- a/entity/Offeritem_entity/entityfields/quantity/onValueChange.js +++ b/entity/Offeritem_entity/entityfields/quantity/onValueChange.js @@ -26,9 +26,9 @@ if(pId != "" && vars.get("$sys.recordstate") == neon.OPERATINGSTATE_NEW) var partsListObject = oiUtils.insertPartsList(pId, vars.get("$field.OFFERITEMID"), curr, contactid, language, quantity, true, vars.get("$field.OFFER_ID"), sumUpTop); neon.setFieldValue("$field.itemInsertStatements", JSON.stringify(partsListObject["partsList"])); - if(sumUpTop)//only sum-up this price if there is no valid Price + if((sumUpTop && partsListObject["topProductInfo"]))//only sum-up this price if there is no valid Price { - neon.setFieldValue("$field.PRICE", partsListObject["topProductInfo"]["price"]); - neon.setFieldValue("$field.VAT", partsListObject["topProductInfo"]["vat"]); + neon.setFieldValue("$field.PRICE", partsListObject["topProductInfo"]["price"]); + neon.setFieldValue("$field.VAT", partsListObject["topProductInfo"]["vat"]); } } -- GitLab