I'm getting a long list with items that are not in stock (0 avail.).
I finally found out what is wrong.
I have a contribution 'enable/disable' categories.
When an item is in a category that is disabled, but the item itself is active (but because the category is disabled, it's not showing up in the shop), I get that item in the reorder list.
Has anyone with the contribution enable/disable categories also this inventory report contrib?
If so, have you found a sollution?
I know where the problem is
$products_query_raw = "select p.products_id, p.products_quantity, p.products_reorder, p.products_reorder_to, p.products_model, pd.products_name, p.products_price, p.products_weight, p.manufacturers_id, m.manufacturers_name from " . TABLE_PRODUCTS . " p, " . TABLE_PRODUCTS_DESCRIPTION . " pd, " . TABLE_MANUFACTURERS . " m where p.products_status = '1' and p.products_id = pd.products_id and p.manufacturers_id = m.manufacturers_id and pd.language_id = '" . (int)$languages_id . "' and p.products_quantity <= p.products_reorder group by pd.products_id order by $db_orderby $sorted";
This piece of code also needs another join with the 'catagories'-table, and look if categories_status equals 1. If not, don't show the item.
But since my knowledge of writing SQL-statements is limited, esp. with (inner) joins, I request the help of the others here.
Thanks!