Skip to content
Snippets Groups Projects
Commit 29f8a103 authored by Pascal Neub's avatar Pascal Neub
Browse files

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

[Projekt: xRM-Sales][TicketNr.: 2002919][Produkte - Fehlermeldung beim Hinzufügen eines Einzelproduktes]
parent 07b3caef
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)
{
......
......@@ -39,6 +39,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