repositório com os arquivos utilizados para integração entre o sistema SimplesIP e diversos sistemas.
You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
 
 

29 lines
846 B

<?php
require "SGP.php";
$sgp = new SGP();
$contrato = $sgp->agi()->get_variable('CONTRATO', true);
$nomenclatura = str_replace("IDENTIFICACAO", "", $sgp->db()->getUraMovimentoByUniqueid($uid)['umv_ura_nome']);
$faturas = $sgp->segundaVia($contrato);
$pendente = 0;
foreach ($faturas['links'] as $faturadata) {
$datavencimento = $faturadata['vencimento_original'] . ' 23:59:59';
if (strtotime($datavencimento) < time()) {
$pendente = 1;
break;
}
}
if($pendente){
$redirecionamento_dados = $sgp->db()->redirectUraDestino("REDIR_CONSULTA_PENDENCIA", "SUCESSO", $nomenclatura); //PENDENTE
} else {
$redirecionamento_dados = $sgp->db()->redirectUraDestino("REDIR_CONSULTA_PENDENCIA", "FALHA", $nomenclatura); //OK
}
$sgp->executarFluxo($redirecionamento_dados["TIPO"], $redirecionamento_dados["NOME"]);
?>