How does stock decrement when a Physical order is placed?
When a physical order is placed, the system decrements the relevant per-branch stock for the purchased product (and variant). The decrement is atomic and concurrency-safe: branch-stock rows carry a concurrency token (RowVersion), and the update only succeeds if the row hasn't changed since it was read, so two simultaneous orders for the last unit can't both succeed and drive stock…
When a physical order is placed, the system decrements the relevant per-branch stock for the purchased product (and variant). The decrement is atomic and concurrency-safe: branch-stock rows carry a concurrency token (RowVersion), and the update only succeeds if the row hasn't changed since it was read, so two simultaneous orders for the last unit can't both succeed and drive stock negative. This prevents overselling during traffic spikes. Because stock is per branch, the draw-down hits the specific location fulfilling the order, while the shared master catalogue is unaffected. Every change is recorded as a stock movement for traceability.