<?php

include "tupi.inicializar.php";
$codTemplate = "relatorio";
include "tupi.template.inicializar.php";
$codAcesso = 13;
include "tupi.seguranca.php";
$pag = new Pagamento();
$cheque = new Cheque();
$moeda = new Moeda();
$pag->getById($pag->md5_decrypt($_REQUEST['idPagamento']));
$cliente = $pag->participante->cliente;
$grupo = $pag->participante->grupo;
$moeda = $pag->moeda;
$oTipoP = new TipoPagamento();
if ($cliente->sexo == "F") {
    $tpl->ARTIGO = "a";
    $tpl->SENHOR = "Sra.";
} else {
    $tpl->ARTIGO = "o";
    $tpl->SENHOR = "Sr.";
}
$tpl->NUMERO = str_pad($pag->id, 6, "0", STR_PAD_LEFT);
$tpl->NOME_COMPLETO = $cliente->nomeCompleto;
$tpl->VALOR = $pag->money($pag->CALCULA_REAL(), "atb");
//$velhos = array("Reais", "REAIS", "REAL", "Real");
//$novos   = array($moeda->plural, strtoupper($moeda->plural), strtoupper($moeda->descricao),$moeda->descricao);
$extenso = $pag->extenso($pag->money($pag->CALCULA_REAL(), "atb"), true);
$tpl->VALOR_EXTENSO = $extenso;
$tpl->REFERENTE = $pag->obs;
$tpl->FINALIDADE = $pag->finalidade->descricao;
<?php

include "tupi.inicializar.php";
include "tupi.template.inicializar.php";
$codAcesso = 13;
include "tupi.seguranca.php";
$oMoeda = new Moeda();
$oPagamento = new Pagamento();
$oParticipante = new Participante();
$oGrupo = new Grupo();
$idPagamento = $oPagamento->md5_decrypt($_REQUEST['idPagamento']);
$oPagamento->getById($idPagamento);
$nomeGrupo = $oPagamento->participante->grupo->nomePacote;
$idGrupo = $oPagamento->md5_encrypt($oPagamento->participante->grupo->id);
$idParticHash = $oPagamento->md5_encrypt($oPagamento->participante->id);
$valorPagamento = $oPagamento->valorPagamento;
$idPartic = 0;
$idGrupo = 0;
$ano = 0;
if (!isset($_REQUEST['ajax'])) {
    $tpl->BREADCRUMB = '    <ul class="breadcrumb">
    <li>
    <a href="home.php">Home</a> <span class="divider">/</span>
    </li>
    <li>
    <a href="grupos.andamento.php">Grupos</a> <span class="divider">/</span>
    </li>
	<li>
    <a href="participante.lista.php?idGrupo=' . $idGrupo . '">Participantes</a> <span class="divider">/</span>
    </li>
	<li>