I'm sure there's a simple solution to the but I'm having a brain fart today.
I have a simple solution that (should) calculates how much stock is left after something is sold. I start out with the amount of stack, then each sold item deletes the amount sold.
I made the starting amount of stock a global number then create a calc to delete SOLD from STOCK, i.e. REMAINING - STOCK - SOLD. However, the global gives me the wrong information in each record.