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

Merge branch 'sales_2002919' into '2021.2.3'

[Projekt: xRM-Sales][TicketNr.: 2002919][Produkte - Fehlermeldung beim...

See merge request xrm/basic!1564
parents 24cb879b 29f8a103
No related branches found
No related tags found
No related merge requests found
......@@ -2,6 +2,7 @@ import("system.neon");
import("system.entities");
import("system.vars");
import("Sql_lib");
import("Offer_lib");
if(vars.get("$local.recordstate") == neon.OPERATINGSTATE_EDIT)
{
......
......@@ -40,6 +40,10 @@
<consumer>Products</consumer>
<mandatory v="true" />
<onValueChange>%aditoprj%/entity/Prod2prod_entity/entityfields/source_id/onValueChange.js</onValueChange>
<onValueChangeTypes>
<element>MASK</element>
<element>PROCESS_SETVALUE</element>
</onValueChangeTypes>
</entityField>
<entityField>
<name>TAKEPRICE</name>
......
......@@ -166,17 +166,20 @@ function _calcPrices()
}
for (i = 0; i < productAndChildProducts[null].length; i++)
if(productAndChildProducts[null])
{
var currentProdId = productAndChildProducts[null][i];
if(Utils.isNotNullOrEmptyString(productPrices[currentProdId]["PP"]))
{
buyPrice = eMath.addDec(buyPrice, productPrices[currentProdId]["PP"]);
}
if(Utils.isNotNullOrEmptyString(productPrices[currentProdId]["SP"]))
for(i = 0; i < productAndChildProducts[null].length; i++)
{
sellPrice = eMath.addDec(sellPrice, productPrices[currentProdId]["SP"]);
var currentProdId = productAndChildProducts[null][i];
if(Utils.isNotNullOrEmptyString(productPrices[currentProdId]["PP"]))
{
buyPrice = eMath.addDec(buyPrice, productPrices[currentProdId]["PP"]);
}
if(Utils.isNotNullOrEmptyString(productPrices[currentProdId]["SP"]))
{
sellPrice = eMath.addDec(sellPrice, productPrices[currentProdId]["SP"]);
}
}
}
buyPrice =(
......
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