Stock method "0"

Stock method "0"

Hi
Team I need to create a method that when the stock is "0" it does not allow to make any sale or create invoice.