Topic: Handling Negative Inventory

We have a function handle_negative_inventory() in includes/db/inventory_db.inc.

This function performs action when inventory of an stock is going to be negative or ZERO with following condition.

if ($qoh + $quantity <= 0 && $qoh > 0) //Positive inventory turning zero/negative

But I think this should only check if Inventory is going to be negative. Zero Inventory is not an issue while Negative inventory is an issue.

I may be wrong in a broader scenarios but in one recent scenario I found the condition to be as below.

if ($qoh + $quantity < 0 && $qoh > 0) //Positive inventory turning negative

Just putting it here so that may get some expert advices.

Regards.

www.boxygen.pk