diff --git a/modules/qlostatsserviceproducts/qlostatsserviceproducts.php b/modules/qlostatsserviceproducts/qlostatsserviceproducts.php index 4644d0828..07ff01608 100644 --- a/modules/qlostatsserviceproducts/qlostatsserviceproducts.php +++ b/modules/qlostatsserviceproducts/qlostatsserviceproducts.php @@ -229,10 +229,6 @@ public function setQueryForServices($dateBetween) ) AND p.`booking_product` = 0)'; - $this->_totalCount = Db::getInstance(_PS_USE_SQL_SLAVE_)->getValue( - 'SELECT COUNT(p.`id_product`) FROM '._DB_PREFIX_.'product p WHERE p.`booking_product` = 0 AND p.`active` = 1' - ); - $this->option = 'services'; } @@ -278,10 +274,6 @@ public function setQueryForFacilities($dateBetween) WHERE o.valid = 1 AND o.invoice_date BETWEEN '.$dateBetween.' '.HotelBranchInformation::addHotelRestriction(false, 'hbd').' ))'; - $this->_totalCount = Db::getInstance(_PS_USE_SQL_SLAVE_)->getValue( - 'SELECT COUNT(`id_global_demand`) FROM '._DB_PREFIX_.'htl_room_type_global_demand' - ); - $this->option = 'facilities'; } @@ -299,6 +291,7 @@ public function getData() $this->query .= ' LIMIT '.(int)$this->_start.', '.(int)$this->_limit; $values = Db::getInstance(_PS_USE_SQL_SLAVE_)->executeS($this->query); + $this->_totalCount = Db::getInstance()->NumRows(); foreach ($values as &$value) { if (!Tools::getValue('export')) {