// Fix Shop::SHARE_ORDER and Shop::SHARE_CUSTOMER on statistics

git-svn-id: http://dev.prestashop.com/svn/v1/branches/1.5.x@7959 b9a71923-0436-4b27-9f14-aed3839534dd
This commit is contained in:
rMalie
2011-08-09 13:42:03 +00:00
parent a86e95fc5a
commit bdc18d1d39
12 changed files with 53 additions and 53 deletions
@@ -119,7 +119,7 @@ class StatsBestSuppliers extends ModuleGrid
LEFT JOIN '._DB_PREFIX_.'orders o ON o.id_order = od.id_order
LEFT JOIN '._DB_PREFIX_.'supplier s ON s.id_supplier = p.id_supplier
WHERE o.invoice_date BETWEEN '.$this->getDate().'
'.$this->sqlShopRestriction(false, 'o').'
'.$this->sqlShopRestriction(Shop::SHARE_ORDER, 'o').'
AND o.valid = 1
AND s.id_supplier IS NOT NULL';
return Db::getInstance(_PS_USE_SQL_SLAVE_)->getValue($sql);
@@ -135,7 +135,7 @@ class StatsBestSuppliers extends ModuleGrid
LEFT JOIN '._DB_PREFIX_.'orders o ON o.id_order = od.id_order
LEFT JOIN '._DB_PREFIX_.'supplier s ON s.id_supplier = p.id_supplier
WHERE o.invoice_date BETWEEN '.$this->getDate().'
'.$this->sqlShopRestriction(false, 'o').'
'.$this->sqlShopRestriction(Shop::SHARE_ORDER, 'o').'
AND o.valid = 1
AND s.id_supplier IS NOT NULL
GROUP BY p.id_supplier';