A store, and a till
The online store keeps its own stock and the point of sale keeps its own. They agree on the day somebody synchronises them and drift apart from then on, and the way you find out is a customer who paid online for the last one an hour after it was sold at the counter.