forked from Claudio/integracao
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.
25 lines
784 B
25 lines
784 B
<?php |
|
|
|
include 'HubSoft.php'; |
|
$hub = new HubSoft(); |
|
|
|
$codCliente = $hub->agi()->get_variable('CODCLIENTE', true); |
|
$retorno = $hub->consultaPendencia($codCliente); |
|
|
|
$pendencia = false; |
|
foreach ($retorno['faturas'] as $fatura){ |
|
$nova_data = explode('/', $fatura['data_vencimento']); |
|
$data_fatura = "{$nova_data[2]}-{$nova_data[1]}-{$nova_data[0]}"; |
|
|
|
if(strtotime($data_fatura) < time()){ |
|
$pendencia = true; |
|
} |
|
} |
|
|
|
if ($pendencia) { |
|
$hub->executarFluxo('ANUNCIO', 'INT_PENDENCIA'.CONF_NOME_EMPRESA); // CLIENTE PENDENTE |
|
} else { |
|
$hub->executarFluxo('ANUNCIO', 'INT_TRANSFERE_ATENDIMENTO'.CONF_NOME_EMPRESA); // CLIENTE EM DIA |
|
} |
|
|
|
?>
|
|
|