Updates to stock variation calculations

I've updated the way stock levels are worked out, opting for more use of datalist filters, rather than looping in php. I've allowed for choosing two different "low stock" level strategies.