Accumulated Values Help Bulk Inventory

I have a simple bulk inventory table with an inventory item that arrives in bags.  In my single table I have entries for number of bags received and where they were received from and entries for bags shipped and where they were shipped to.  I would like to have a running total of bags remaining by incoming transaction number.  Say I receive 400 bags in one delivery and ship out 75 bags, then I receive another 200 bags and ship out another 100.  I still have 225 bags from the initial delivery and 200 new bags for a total of 425 bags left and 175 bags shipped.  How do I show a rolling count of bags remaining from each receiving load assuming oldest bags out first.  I can't figure out how to do it.  For those that are visual, this is what I am trying to accomplish:

 

  • Received Transaction #1 400 bags
  • Shipped Transaction #2  75 bags
  • Received Transaction #3 200 bags
  • Shipped Transaction #4 100 bags
  • Total bags remaining = 425
  • Total bags remaining from Transaction #1 = 225 bags
  • Total bags remaining from Transaction #2 = 200 bags

Any help would be greatly appreciated.