Viewing file: detalharRegistroBoleto.php (6.02 KB) -rwxr-xr-x Select action/file-type: (+) | (+) | (+) | Code (+) | Session (+) | (+) | SDB (+) | (+) | (+) | (+) | (+) | (+) |
<?php
require_once "../../incCaminho.php";
$CaminhoConexao = "../{$CaminhoConexao}";
require_once "{$CaminhoConexao}/inc_Conexao.php";
require_once("{$_SERVER['DOCUMENT_ROOT']}/incValidaSessao.php");
require_once "{$CaminhoConexao}/inc_Funcoes.php";
//debug("{$CaminhoConexao}/inc_Funcoes.php");
$linkECert = $conecta;
require_once('includes/inc_dadosCombo.php');
$get['pedido'] = (int) $_GET['pedido'];
$sql = "
select PED_RowID as pedido, PED_NossoNumeroWS as nossoNumero, DAS_Nome as nome, DAS_Cidade as localidade,
concat(DAS_DDDf, ' ', DAS_Telefone) as fone, CCW_Grupo as codModalidade, CCW_DescricaoGrupo as modalidade,
PED_PagoSN as pago, SCW_NossoNumeroWS as boleto,
SCW_DataProcessamento as data, SCW_TipoRegistroConsultaRC as tipo
from CER_Pedidos
left join ECE_RegistroSolicitacaoComunicacaoWS on SCW_Pedidos_DR = PED_RowID
inner join ECE_RegistroConfiguracaoComunicacaoWS on CCW_RowID = PED_RegistroConfiguracaoComunicacaoWS_DR
inner join CER_DadosSolicitante on DAS_RowID = PED_Solicitante_DR
where PED_RowID = '{$get['pedido']}'
order by SCW_DataProcessamento desc
";
//debug($sql);
$rsPedido = executa($sql, $linkFunarpen);
//debug($rsPedido, 1);
//debug($dadosOperacao);
?>
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml">
<head>
<meta http-equiv="Content-Type" content="text/html; charset=utf-8" />
<title> E-CERTIDÕES ON-LINE </title>
<link href="../<?= $caminhoCss?>/estilo_site.css" rel="stylesheet" type="text/css" />
<!--script type="text/javascript" src="../../js/jquery-1.3.2.js"></script-->
<script language="javascript" src="includes/jquery.min.js"></script>
<script language="javascript" src="includes/js.js"></script>
<style type="text/css">
.listagem {
width:95%;
}
.topoListagem .tituloListagem {
text-transform:uppercase;
width:100%;
}
.nenhumRegistro {
background-position:280px 40px;
text-indent:200px;
}
</style>
<!--link rel="stylesheet" type="text/css" href="includes/css.css"/-->
</head>
<body>
<body>
<div id="geral">
<div id="corpo">
<p> </p>
<div class="listagem">
<div class="topoListagem">
<div class="tituloListagem noPrint">DETALHAMENTO DE REGISTRO DE BOLETO</div>
<div class="opcoes noPrint"> </div>
</div>
<table width="95%" border="0" align="center" cellpadding="2" cellspacing="0">
<tr>
<td width="25%"></td>
<td width="20%"></td>
<td width="30%"></td>
<td width="25%"></td>
</tr>
<tr>
<td></td>
<td align="right"><label for="selModalidade">Pedido: </label></td>
<td><?= $rsPedido[0]['pedido']; ?></td>
<td></td>
</tr>
<tr>
<td></td>
<td align="right"><label for="selModalidade">Boleto: </label></td>
<td><?= $rsPedido[0]['nossoNumero']; ?></td>
<td></td>
</tr>
<tr>
<td colspan="4"> </td>
</tr>
<tr>
<td></td>
<td align="right"><label for="txtPedido">Nome solicitante: </label></td>
<td colspan="2"><?= $rsPedido[0]['nome']; ?></td>
</tr>
<tr>
<td></td>
<td align="right"><label for="txtBoleto">Localidade: </label></td>
<td><?= $rsPedido[0]['localidade']; ?></td>
<td></td>
</tr>
<tr>
<td></td>
<td align="right"><label for="txtBoleto">Telefone: </label></td>
<td><?= $rsPedido[0]['fone']; ?></td>
<td></td>
</tr>
</table>
<br/><br/>
<table width="95%" border="0" align="center" cellpadding="2" cellspacing="0">
<tr>
<th width="50%">Modalidade</th>
<th width="25%">Operação</th>
<th width="25%">Data</th>
</tr>
<?php
foreach ($rsPedido as $key => $ped) {
//debug($ped);
$tr_class = '';
if ($key % 2 == 0) {
$tr_class = 'class="par"';
} else {
$tr_class = 'class="impar"';
}
if ($ped['codModalidade']==5) {
$tr_class = 'class="rejeitado"';
}
$tr_color = '';
if ($key % 2 == 0) {
$tr_color = '#FFF';
} else {
$tr_color = '#EEE';
}
if ($res['codModalidade']==5) {
$tr_color = 'red';
}
$td_class_sit = '';
switch ($ped['pago']) {
case 'S':
$td_class_sit = 'class="pago"';
break;
case 'N':
$td_class_sit = 'class="pendente"';
break;
}
$ped['data'] = format_data($ped['data'], false, 'd/m/Y H:i:s');
echo "
<tr style=\"background-color:{$tr_color}\">
<td class=\"bordaLateralTD\">{$ped['modalidade']}</td>
<td class=\"bordaLateralTD\">{$dadosOperacao[$ped['tipo']]}</td>
<td>{$ped['data']}</td>
</tr>
";
}
$disabled['btnRegistrar'] = '';
$disabled['btnConsultar'] = '';
// ve a modalidade do primeiro registro, pois é o mais recente
if (in_array($rsPedido[0]['codModalidade'], array(1,2,3,4,5)) || $rsPedido[0]['pago'] == 'S') {
$disabled['btnRegistrar'] = 'disabled';
}
if (in_array($rsPedido[0]['codModalidade'], array(4,5)) || $rsPedido[0]['pago'] == 'S') {
$disabled['btnConsultar'] = 'disabled';
}
?>
</table>
<br/>
<p align="center">
<input class="" type="button" id="btnRegistrar" <?= $disabled['btnRegistrar']; ?> value="Registrar Boleto" />
<input class="" type="button" id="btnConsultar" <?= $disabled['btnConsultar']; ?> value="Consultar Situação" />
</p>
<br/>
<p align="center">
<input class="botaoPadrao2" type="button" id="btnFechar" value="Fechar" />
</p>
<script language="javascript" >
$('#btnRegistrar').click(function () {
$('#btnRegistrar').prop('disabled', true);
var url = 'geraWSCobrancaRegistrada.php?PED_RowID=' + '<?= $rsPedido[0]['pedido']; ?>';
enviaAjax(url);
});
$('#btnConsultar').click(function () {
$('#btnConsultar').prop('disabled', true);
var url = 'consultaWSCobrancaRegistrada.php?PED_RowID=' + '<?= $rsPedido[0]['pedido']; ?>';
enviaAjax(url);
});
$('#btnFechar').click(function () {
window.opener.location.reload();
window.close();
});
</script>
</body>
</html>
|