Core concepts
Preorders: selling before you buy
Selling stock you haven't purchased yet is a normal preorder business — the app supports it natively. A sale beyond current stock becomes presold, awaiting stock (shown in red on the product and order). When the covering purchase order arrives, it fills presold units oldest-first at the arriving lot's landed cost, which retroactively becomes those sales' cost basis.
Until then, the order's profit shows as pending — profit is unknowable before cost is — and it's excluded from Overview totals (with a note). Deleting a purchase that covers sold units is refused, so sold stock can never be silently stranded.