I have two proceses txbal1 and txbal2
txbal1 creaes a non persistent bo then does a find and orders by txdate, then calls txbal12
txbal2 is set to accept the npbo and the TX bo as input.
it is meant to retrospectively create opening and closing balances on the TX's by reading a number from the npbo, setting this as opening bal, then adding it to the nett value of he ransaction to create the closing bal then writing the closig bal back into the npbo.
According to the logs, The calculations work fine except that the process doesn't start at the first tx date as expected, it starts at some random place in the list and seems to be totally unordered. Subsequent entries in the list then have incorrect opening balances
Am I missing something here