Much weirdness Creating Purchase Order via the SDK

i'm creating purchase orders via the SDK using the examples in the help as a template.  basically create a poporder,  assign the supplier, add lines confirm and post.

What appears to be happening randomly (on customer site, i have not managed to see it in testing) is that randomly some purchase orders do not reflect the correct gross figure. 

For Sterling orders it typically shows the net, and vat but the gross shows the same value as the net total.

For Euro orders it typically shows the net and vat correctly, but the gross shows the base currency value of the net.  IE net shows 100 euro and the gross shows 90.90 (ex rate = 1.1) we would expect to see 100 Euro in the gross as we are using ROW Vat. so it should show the gross as the same as the net

it appears to be random, and like i said I have not seen happen on my development system.

i have added poporder.recalculatevalues in the code (before and after the confirm and post steps)  but this does not appear to have made a difference.

has anyone seen this before, got any hints to what might be missing from the Sage examples?