diff --git a/vendor/view/financial_movements/financial_movements_tickets_list copy.php b/vendor/view/financial_movements/financial_movements_tickets_list copy.php new file mode 100644 index 0000000..8e1be75 --- /dev/null +++ b/vendor/view/financial_movements/financial_movements_tickets_list copy.php @@ -0,0 +1,171 @@ +verifyToken()){ + + /** Instânciamento de classes */ + $CompaniesValidate = new CompaniesValidate(); + $ApiSicoob = new ApiSicoob(); + $Companies = new Companies(); + + /** Parametros de entrada */ + $companyId = isset($_POST['company_id']) ? (int)filter_input(INPUT_POST,'company_id', FILTER_SANITIZE_NUMBER_INT) : 0; + + /** Validando os campos de entrada */ + $CompaniesValidate->setCompanyId($companyId); + + /** Verifico a existência de erros */ + if (empty($CompaniesValidate->getErrors())) { + + /** Consulta os dados do cliente */ + $CompaniesResult = $Companies->Get($CompaniesValidate->getCompanyId()); + + /** Parametros a serem enviados */ + $params = $Main->ClearDoc($CompaniesResult->document); + $params .= '?numeroContrato='.$Main->LoadConfigPublic()->app->ticket->numero_contrato; + $params .= '&codigoSituacao=1'; + $params .= '&dataInicio='.date("Y-m-01"); + $params .= '&dataFim='.date("Y-m-d"); + + /** REQUISIÇÃO RESPONSÁVEL EM GERAR O TOKEN */ + $ApiSicoob->accessToken(); + + /** Verifica se foi retornado erros */ + if(empty($ApiSicoob->getErrors())){ + + /** Envia a solicitação */ + $ApiSicoob->sendService('cobranca_boletos_listar_por_pagador', [$params], NULL); + + + /** Verifica possíveis erros */ + if(empty($ApiSicoob->getErrors())){ + + + ?> + +
+ +
+ +
+ +
+
+ +

Boletos

+ +
+
+ +
+ +
+ + + + + + + + + + + + + + + + + + + + getResponseObject(); + + /** Lista o resultado da consulta */ + for($i=0; $iresultado); $i++){ + + ?> + + + + + + + + + + + + + + + + + +
IDNosso NºBanco NºEmissãoValor R$DescriçãoSituaçãoLinha Digitável
resultado[$i]->identificacaoBoletoEmpresa;?>resultado[$i]->seuNumero;?>resultado[$i]->nossoNumero;?>resultado[$i]->dataEmissao));?>resultado[$i]->valor, 2, ',', '.');?>resultado[$i]->mensagensInstrucao->mensagens[0];?>resultado[$i]->situacaoBoleto;?>resultado[$i]->linhaDigitavel;?>
+ +
+ +
+ +
+ + getErrors(), 0); + } + + } else { + + /** Retorna a mensagem com seu respectivo erro **/ + throw new InvalidArgumentException($ApiSicoobValidate->getErrors(), 0); + } + + } else { + + /** Retorna a mensagem com seu respectivo erro **/ + throw new InvalidArgumentException($CompaniesValidate->getErrors(), 0); + } + + /** Caso o token de acesso seja inválido, informo */ + }else{ + + /** Informa que o usuário precisa efetuar autenticação junto ao sistema */ + $authenticate = true; + + /** Informo */ + throw new InvalidArgumentException('Sua sessão expirou é necessário efetuar nova autenticação junto ao sistema', 0); + } + + +}catch(Exception $exception){ + + /** Preparo o formulario para retorno **/ + $result = [ + + 'cod' => 0, + 'message' => '', + 'title' => 'Erro Interno', + 'type' => 'exception', + 'authenticate' => $authenticate + + ]; + + /** Envio **/ + echo json_encode($result); + + /** Paro o procedimento **/ + exit; +} \ No newline at end of file diff --git a/vendor/view/financial_movements/financial_movements_tickets_list.php b/vendor/view/financial_movements/financial_movements_tickets_list.php index c362f8a..a814366 100644 --- a/vendor/view/financial_movements/financial_movements_tickets_list.php +++ b/vendor/view/financial_movements/financial_movements_tickets_list.php @@ -1,171 +1 @@ -verifyToken()){ - - /** Instânciamento de classes */ - $CompaniesValidate = new CompaniesValidate(); - $ApiSicoob = new ApiSicoob(); - $Companies = new Companies(); - - /** Parametros de entrada */ - $companyId = isset($_POST['company_id']) ? (int)filter_input(INPUT_POST,'company_id', FILTER_SANITIZE_NUMBER_INT) : 0; - - /** Validando os campos de entrada */ - $CompaniesValidate->setCompanyId($companyId); - - /** Verifico a existência de erros */ - // if (empty($CompaniesValidate->getErrors())) { - - // /** Consulta os dados do cliente */ - // $CompaniesResult = $Companies->Get($CompaniesValidate->getCompanyId()); - - // /** Parametros a serem enviados */ - // $params = $Main->ClearDoc($CompaniesResult->document); - // $params .= '?numeroContrato='.$Main->LoadConfigPublic()->app->ticket->numero_contrato; - // $params .= '&codigoSituacao=1'; - // $params .= '&dataInicio='.date("Y-m-01"); - // $params .= '&dataFim='.date("Y-m-d"); - - // /** REQUISIÇÃO RESPONSÁVEL EM GERAR O TOKEN */ - // $ApiSicoob->accessToken(); - - // /** Verifica se foi retornado erros */ - // if(empty($ApiSicoob->getErrors())){ - - // /** Envia a solicitação */ - // $ApiSicoob->sendService('cobranca_boletos_listar_por_pagador', [$params], NULL); - - - // /** Verifica possíveis erros */ - // if(empty($ApiSicoob->getErrors())){ - - - // ?> - - - - getErrors(), 0); - // } - - // } else { - - // /** Retorna a mensagem com seu respectivo erro **/ - // throw new InvalidArgumentException($ApiSicoobValidate->getErrors(), 0); - // } - - // } else { - - // /** Retorna a mensagem com seu respectivo erro **/ - // throw new InvalidArgumentException($CompaniesValidate->getErrors(), 0); - // } - - /** Caso o token de acesso seja inválido, informo */ - }else{ - - /** Informa que o usuário precisa efetuar autenticação junto ao sistema */ - $authenticate = true; - - /** Informo */ - throw new InvalidArgumentException('Sua sessão expirou é necessário efetuar nova autenticação junto ao sistema', 0); - } - - -}catch(Exception $exception){ - - /** Preparo o formulario para retorno **/ - $result = [ - - 'cod' => 0, - 'message' => '', - 'title' => 'Erro Interno', - 'type' => 'exception', - 'authenticate' => $authenticate - - ]; - - /** Envio **/ - echo json_encode($result); - - /** Paro o procedimento **/ - exit; -} \ No newline at end of file +