Great new modern admin nice work, but i find an issue:
this (line 20):
$low_query = tep_db_query("select distinct p.products_id, pd.products_name, p.products_quantity from products p, products_description pd where p.products_id = pd.products_id and p.products_quantity < '" . (int)$low_amount . "' and p.products_quantity <> '0' order by p.products_quantity");
// with that and p.products_quantity <> '0' you get also the minus quantity.
have to change to:
$low_query = tep_db_query("select distinct p.products_id, pd.products_name, p.products_quantity from products p, products_description pd where p.products_id = pd.products_id and p.products_quantity < '" . (int)$low_amount . "' and p.products_quantity > '0' order by p.products_quantity");
// with p.products_quantity > '0' you get only the range about STOCK_REORDER_LEVEL!
and this (line25):
$out_query = tep_db_query("select distinct p.products_id, pd.products_name, p.products_quantity from products p, products_description pd where p.products_id = pd.products_id and p.products_quantity = '0' order by p.products_quantity");
//with p.products_quantity = '0' you don't get the minus quantity
have to change to:
$out_query = tep_db_query("select distinct p.products_id, pd.products_name, p.products_quantity from products p, products_description pd where p.products_id = pd.products_id and p.products_quantity <= '0' order by p.products_quantity");
// with p.products_quantity <= '0' you get the minus quantity
And what's the reason to do in line 19 that:
$low_amount = STOCK_REORDER_LEVEL + 1;
To check STOCK_REORDER_LEVEL > 0 the resolution should be different.