Everything is usually in a centralized database of orders that are tagged with the point of sale location and the store, warehouse, or vendor that the product came from.
Warehouses and retail stores also have inventory databases that tell them how quickly something sells, when they need to buy new supply, and where that supply needs to go.
It kind of doesn’t matter where the sale comes from as long as you know where inventory is and is not needed.