Skip to content

Commit

Permalink
Fixed: Invalid num rows mentioned extra services overview module.
Browse files Browse the repository at this point in the history
  • Loading branch information
shreesh-webkul committed Apr 22, 2024
1 parent 8dcfc9e commit bbc6985
Showing 1 changed file with 1 addition and 8 deletions.
9 changes: 1 addition & 8 deletions modules/qlostatsserviceproducts/qlostatsserviceproducts.php
Original file line number Diff line number Diff line change
Expand Up @@ -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';
}

Expand Down Expand Up @@ -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';
}

Expand All @@ -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')) {
Expand Down

0 comments on commit bbc6985

Please sign in to comment.