This is a very minimal core example of the ATP scheduling function. The schedule of incoming/outgoing items is a linked list, and the constraints on each item are that it's sum must be large than 0 (so at any one time, stock is not negative), and the other constraint is that the sum is equal to the sum of the previous item plus your own value (positive or negative, depending if the item is incoming or outgoing)
Insert items by selecting a "time" and then enter a value and press RETURN.
Try adding an outgoing item at time 1, before anything was incoming. A small error will popup in the lower left corner telling you that this insertion would violate constraints, and the sale won't happen. Try to insert it after some incoming items with enough stock, and it will just work.