Hi there,

i am trying to do some calculations ( to work up a number of packaging units per packing slip) , and the best place to do so seems to be tradeTotals.calc method… total weight, remaining weight and remaining Quantities are all calculated there, and passed to salesShippingStat table via initFromSalesTotals method

but, as soon as i even declare a variable in classDeclaration in tradeTotals, and try to post a packing slip, there is an error - wrong type of argument in variable assignment. , and its happening in tradeTotals.clear, right before a new map is created for orderBalances., or, if i exclude the line

…myVariable = 0

from the clear method, it breaks in method new (tradeTotals), right before initRecordSorted… line

i declare my variable as InventQty, because i know it works for remain quantities … its Real, anyways…

Compilation gets me no errors, yet when i start debugging, my variable is not even in the list of variables…

i can declare it in teh calc method and calculation works, but than its out of scope to be returned from tradeTotals, as other values do.

all of salesTotals_* classes inherits from tradeTotals… so declaring there should make it available for all child classes, right?

so where would be a right place to declare a variable you want to use in tradetotals/calc, and return it to salesShippingStat table, where all other shipping values are kept?