Ajustando Users_datagrid

This commit is contained in:
Kenio 2025-07-17 10:00:04 -03:00
parent 3f403eb89b
commit 43ee281888
2 changed files with 3 additions and 10 deletions

View file

@ -156,24 +156,17 @@ class Users
}
/** Contabiliza a quantidade de usuers cadastrados */
public function Count(int $companyId, ? int $clientsId)
public function Count(int $companyId)
{
/** Parametros de entrada */
$this->companyId = $companyId;
$this->clientsId = $clientsId;
/** Verifica se a empresa foi informada */
if($this->companyId > 0){
$this->and .= " and company_id = {$this->companyId} ";
}
/** Verifica se o cliente foi informado */
if($this->clientsId > 0){
$this->and .= " and company_id = {$this->clientsId} ";
}
}
/** Consulta SQL */
$this->sql = 'select count(user_id) as qtde

View file

@ -29,7 +29,7 @@ if($Main->verifyToken()){
$CompaniesValidate->setCompanyId($companiesId);
/** Consulta a quantidade de registros */
$NumberRecords = $Users->Count($CompanyValidate->getCompanyId(), $CompaniesValidate->getCompanyId())->qtde;
$NumberRecords = $Users->Count($CompanyValidate->getCompanyId())->qtde;
/** Verifico a quantidade de registros localizados */
if ($NumberRecords > 0){?>