Exemplo n.º 1
0
$tpl->PAGINA = $pagina;
foreach ($rsPartic as $key => $participante) {
    //$tpl->ID = $participante->id;
    //calcula o status dos pagamentos;
    $tpl->STATUS_ABAT = 'status-ok';
    $rsPag = $oP->getRows(0, 999, array("id" => "asc"), array("participante" => " = " . $participante->id, "cancelado" => "=0"));
    foreach ($rsPag as $key => $pagamento) {
        $totalAbatMoedaGrupo = $oA->totalAbatimentos($pagamento->id);
        $totalAbatMoedaPagamento = $pagamento->CALCULA_MOEDA($totalAbatMoedaGrupo, $participante->grupo->moeda->id);
        if ($totalAbatMoedaPagamento < $pagamento->valorPagamento && $pagamento->devolucao == 0) {
            $tpl->STATUS_ABAT = 'status-alert';
        }
    }
    $tpl->CIFRAO = $oGrupo->moeda->cifrao;
    $tpl->PAGO = $oParticipante->money($participante->recuperaValorPago(), "atb") . "/" . $oParticipante->money($participante->valorTotal, "atb");
    $tpl->RESTA = "Pendêndia: " . $oGrupo->moeda->cifrao . " " . $oParticipante->money($participante->valorTotal - $participante->recuperaValorPago(), "atb");
    $tpl->DT_INSCR = $participante->convdata($participante->dataInscricao, "mtn");
    $tpl->NOME = $participante->cliente->nomeCompleto;
    $tpl->OPCIONAL = $participante->pacoteOpcional ? "Sim" : "Não";
    $tpl->ID_CLIENTE_HASH = $oParticipante->md5_encrypt($participante->cliente->id);
    $tpl->CPF = $oParticipante->formataCPFCNPJ($participante->cliente->cpf);
    $tpl->SITUACAO = $participante->status->descricao;
    $tpl->ID_HASH = $oParticipante->md5_encrypt($participante->id);
    if ($participante->status->id != $oParticipante->STATUS_DESISTENTE()) {
        $tpl->block("BLOCK_ACTIONS");
    } else {
        $tpl->block("BLOCK_REATIVAR");
    }
    $tpl->block("BLOCK_ITEM_LISTA");
}
include "tupi.template.finalizar.php";