Error in stock notice Magento

Job ID: 32863953

Budget: $30 – $250 USD

There is a module in the site caminoacasa.com, currently the notice shows up for all products that have at least a product in stock, and is a mistake, it should show up when the clients request more of the quantities that exist in stock.

The conditions are:
When the client requests a quantitative of products and is not enough stock
For example, in stock, there is a chair and the client requests 4 chairs, the notice must show up.
When there is a 0 in stock must not show the notice

Attached is the photo of the notice
Related categories: PHP Magento eCommerce MySQL HTML