Hi Mina,
I'd love to help you solve this issue but I need a little clarification to give the best advice.
How do you have your tables related? Your calculations will have to go through a parent record summary field in one way or another and if you've not set up those relationships, you'll have a heck of a time trying to figure it out.
I suspect you'll just need to create a few summary fields from table 2. This depends on how you're listing your "Main Stock" though. Does main stock include what's been allocated to your boxes, or only the stock that has not been distributed to boxes? In other words, is main stock the sum of whats in the boxes and on your shelves or is it only what's on your shelves?
------------------------------
Joshua Krohn
------------------------------