Debug
This commit is contained in:
parent
f726f05047
commit
f12e23b077
1 changed files with 6 additions and 6 deletions
|
|
@ -17,13 +17,13 @@ try{
|
|||
$DocumentsValidate = new DocumentsValidate();
|
||||
|
||||
/** Parametros de entrada */
|
||||
$clientsId = isset($_POST['clients_id']) ? (int)$Main->antiInjection(filter_input(INPUT_POST, 'clients_id', FILTER_SANITIZE_NUMBER_INT)) : 0;
|
||||
$companyId = isset($_POST['company_id']) ? (int)$Main->antiInjection(filter_input(INPUT_POST, 'company_id', FILTER_SANITIZE_NUMBER_INT)) : 0;
|
||||
|
||||
/** Valida o campo */
|
||||
$DocumentsValidate->setClientsId($clientsId);
|
||||
$DocumentsValidate->setcompanyId($companyId);
|
||||
|
||||
/** Consulta a quantidade de registros */
|
||||
$NumberRecords = $Documents->Count(null, null, null, $clientsId);
|
||||
$NumberRecords = $Documents->Count(null, null, null, $companyId);
|
||||
|
||||
/** Verifica se existem documentos
|
||||
* a serem listados */
|
||||
|
|
@ -46,7 +46,7 @@ try{
|
|||
|
||||
<div class="col-md-3 text-right mb-2">
|
||||
|
||||
<button type="button" class="btn btn-secondary btn-sm float-right" onclick="request('FOLDER=view&TABLE=documents&ACTION=documents_form&clients_id=<?php echo $clientsId;?>', '#loadContent', true, '', '', '', 'Preparando formulário', 'blue', 'circle', 'sm', true)">
|
||||
<button type="button" class="btn btn-secondary btn-sm float-right" onclick="request('FOLDER=view&TABLE=documents&ACTION=documents_form&company_id=<?php echo $companyId;?>', '#loadContent', true, '', '', '', 'Preparando formulário', 'blue', 'circle', 'sm', true)">
|
||||
<i class="fas fa-plus-circle mr-1"></i>Cadastrar documento
|
||||
</button>
|
||||
|
||||
|
|
@ -77,7 +77,7 @@ try{
|
|||
<?php
|
||||
|
||||
/** Consulta os usuário cadastrados*/
|
||||
$DocumentsResult = $Documents->All($start, $max, (int)$documentsCategorysId, (string)$tag, (string)$label, $clientsId);
|
||||
$DocumentsResult = $Documents->All($start, $max, (int)$documentsCategorysId, (string)$tag, (string)$label, $companyId);
|
||||
foreach($DocumentsResult as $DocumentsKey => $Result){
|
||||
?>
|
||||
|
||||
|
|
@ -107,7 +107,7 @@ try{
|
|||
}else{
|
||||
|
||||
/** Informo */
|
||||
throw new InvalidArgumentException('Não há documentos cadastrados <button type="button" class="btn btn-secondary btn-sm float-right ml-2" onclick="request(\'FOLDER=view&TABLE=documents&ACTION=documents_form&clients_id=<?php echo $clientsId;?>\', \'#loadContent\', true, \'\', \'\', \'\', \'Preparando formulário\', \'blue\', \'circle\', \'sm\', true)"><i class="fas fa-plus-circle mr-1"></i>Cadastrar documento</button> ', 0);
|
||||
throw new InvalidArgumentException('Não há documentos cadastrados <button type="button" class="btn btn-secondary btn-sm float-right ml-2" onclick="request(\'FOLDER=view&TABLE=documents&ACTION=documents_form&company_id='.$companyId.'\', \'#loadContent\', true, \'\', \'\', \'\', \'Preparando formulário\', \'blue\', \'circle\', \'sm\', true)"><i class="fas fa-plus-circle mr-1"></i>Cadastrar documento</button> ', 0);
|
||||
}
|
||||
|
||||
/** Caso o token de acesso seja inválido, informo */
|
||||
|
|
|
|||
Loading…
Add table
Reference in a new issue