[-] BO: Fix PSCFV-3384 bad count of product on admin suppliers listing

This commit is contained in:
rGaillard
2012-08-03 15:24:45 +00:00
parent 844b97318e
commit 1bf53bc64b
@@ -37,7 +37,7 @@ class AdminSuppliersControllerCore extends AdminController
$this->addRowAction('delete');
$this->bulk_actions = array('delete' => array('text' => $this->l('Delete selected'), 'confirm' => $this->l('Delete selected items?')));
$this->_select = 'COUNT(ps.`id_product`) AS products';
$this->_select = 'COUNT(DISTINCT ps.`id_product`) AS products';
$this->_join = 'LEFT JOIN `'._DB_PREFIX_.'product_supplier` ps ON (a.`id_supplier` = ps.`id_supplier`)';
$this->_group = 'GROUP BY a.`id_supplier`';