Hi all,
I have strange issue with a field who calculates a total price based on function.
I have 2 windows above window which displays total prices. The window below has the specs.
When I duplicate a spec and change the price of the spec the total price in the above window is not calculated or does a strange calculation.
After editing/changing the price in the spec the total price is calculated normally.
The total price field has the dataProvider set to the function below
function:
function calc_inkoopprijs()
{
if(databaseManager.hasRecords(bcom_full_verkorderregels_to_inkorderspecregels))
{
var Aantal = databaseManager.getFoundSetCount(bcom_full_verkorderregels_to_inkorderspecregels.foundset) //(getfoundsetcount ivm >200)
var _tot1 = 0.00
for(var i = 1; i <= Aantal; i++)
{
var vRecord = bcom_full_verkorderregels_to_inkorderspecregels.getRecord(i);
_tot1 = _tot1 +(vRecord.inkorsrgl_ik_prijs * vRecord.calc_aantal_totaal)
}
return _tot1;
}
else
{
return 0;
}
}
Has this something to do with the loaded foundset? Or can someone explain this issue to me?
Servoy 7.3.1
Postgresql 9.3
Tnx in advance
Derk