Ajustando Users_datagrid
This commit is contained in:
parent
3f403eb89b
commit
43ee281888
2 changed files with 3 additions and 10 deletions
11
vendor/model/Users.class.php
vendored
11
vendor/model/Users.class.php
vendored
|
|
@ -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
|
||||
|
|
|
|||
2
vendor/view/users/users_datagrid.php
vendored
2
vendor/view/users/users_datagrid.php
vendored
|
|
@ -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){?>
|
||||
|
|
|
|||
Loading…
Add table
Reference in a new issue