Skip to content
Snippets Groups Projects
Commit 92145b9e authored by Sebastian Pongratz's avatar Sebastian Pongratz :ping_pong:
Browse files

Merge branch 'sales_1083290_FixOfferItemInsertChangeQuantity' into '2021.1.1'

[Projekt: xRM-Sales][TicketNr.: 1083290][Angebotsposten hinzufügen - Menge ändern Exception]

See merge request xrm/basic!1106
parents e82b73f6 8a00b805
No related branches found
No related tags found
No related merge requests found
......@@ -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"]);
}
}
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment