- Check for Grouped / variable published products where have stock quantities or manage stock = yes
- Check for any set to out of stock as well..
- Consider: any published Grouped products should be accounted for in manual stock on hand
select * from vProducts where product_type <> 'simple';
- Check for Simple Published products where stock management not set correctly, should all be Manage Stock = yes except for custom services/addons e.g. additional shipping, custom mill/drill
select * from vProducts where pm_manage_stock = 'no' and product_type = 'simple' and post_status = 'publish';
- Check for Simple products where stock > 0 and no sm_cost_wavg
select * from vProducts
where product_type = 'simple'
and (
coalesce(sm_cost_wavg, 0) = 0 or sm_cost_wavg = ''
)
and pm_stock is not null and pm_stock > 0;
- Check products that have a manual replace_cost keyed
- Note: We won’t use Replace_cost this year for simple products (if ever, still considering if it is needed)
select * from vProducts
where product_type = 'simple'
and replace_cost is not null and replace_cost > 0;
- Run the stock valuation for Simple products
- Dump it into Excel and do the sums
select wp_post_id, product_type, post_status, post_title, pm_stock, sm_cost_wavg
from vProducts
where product_type = 'simple' and post_status = 'publish' limit 10000;