// Improved filters

This commit is contained in:
bMancone
2012-03-06 13:35:05 +00:00
parent d86f601bec
commit 3aef2ec94b
4 changed files with 70 additions and 4 deletions
@@ -190,8 +190,13 @@ class AdminStockCoverControllerCore extends AdminController
$this->_select = 'a.id_product as id, COUNT(pa.id_product_attribute) as variations, SUM(s.usable_quantity) as stock';
$this->_join = 'LEFT JOIN `'._DB_PREFIX_.'product_attribute` pa ON (pa.id_product = a.id_product)
INNER JOIN `'._DB_PREFIX_.'stock` s ON (s.id_product = a.id_product)';
self::$currentIndex .= '&coverage_period='.(int)$this->getCurrentCoveragePeriod().'&warn_days='.(int)$this->getCurrentWarning();
if ($this->getCurrentCoverageWarehouse() != -1)
$this->_where .= ' AND s.id_warehouse = '.$this->getCurrentCoverageWarehouse();
{
$this->_where .= ' AND s.id_warehouse = '.(int)$this->getCurrentCoverageWarehouse();
self::$currentIndex .= '&id_warehouse='.(int)$this->getCurrentCoverageWarehouse();
}
// Hack for multi shop ..
$this->_where .= ' AND b.id_shop = 1';