Prevent Shipping of Qty > on hand

I'm not sure why I'm having trouble with this, but does anyone know how we can prevent the shipping/invoicing of an item if qty on hand = 0?