// Replace shop->addSqlRestriction() and shop->addSqlRestrictionOnLang() by static versions

This commit is contained in:
rMalie committed 2012-02-27 12:15:30 +00:00
1 parent d86fb7ec9b
commit 8f0257fc87
58 files changed
+210 -241

No files matched your search

@@ -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(Shop::SHARE_ORDER, 'o').'
'.Shop::addSqlRestriction(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(Shop::SHARE_ORDER, 'o').'
'.Shop::addSqlRestriction(Shop::SHARE_ORDER, 'o').'
AND o.valid = 1
AND s.id_supplier IS NOT NULL
GROUP BY p.id_supplier';