Ejemplo n.º 1
0
         $tpl->VARIASOMA = "";
     }
     $tpl->BLOCK('EACH_MENSAL');
     $z++;
 }
 $tpl->CONSTOTAL = tratarValor($mesConsTotal);
 $tpl->PAGOTOTAL = tratarValor($mesPagoTotal, true);
 $mediaUC = count($eachMes) > 0 ? $mesPagoTotal / count($eachMes) : 1;
 $tpl->MEDIA = tratarValor($mediaUC, true);
 $tpl->AUMENTO = getPorcentagem(end($eachMes)['valor'] * 100 / $mediaUC - 100, true);
 /*********************************
 		      MOSTRAR HISTÓRICO GERAL
 		 *********************************/
 $cumulativo = 0;
 $cons_soma = 0;
 if (count($uc->getAllNotas(false)) >= 1) {
     foreach ($uc->getAllNotas(false) as $notaRes) {
         $nota = new Nota($notaRes['id']);
         if (!$nota->isEmpenho()) {
             $tpl->NFMESANO = $nota->get('data_ref');
             $tpl->NFNUMERO = $nota->get('numero');
             $nota->get('nome') != "" ? $nota->get('numero') . " - " . $nota->get('nome') : $nota->get('numero');
             $tpl->NFNOME = $nota->get('nome') != "" ? "- " . $nota->get('nome') : "";
             $tpl->NFDATA = setDateDiaMesAno($nota->get('emissao'));
             $tpl->NFCONS = tratarValor($nota->get('consumo'));
             $tpl->NFPAGO = tratarValor($nota->get('valor'), true);
             $tpl->NFPROV = $nota->get('provisoria');
             $tpl->NFLANCPOR = $nota->get('usuario')->get('login');
             $tpl->NFSAIDA = setDateDiaMesAno($nota->get('saida'));
             $tpl->NFPAGODATA = setDateDiaMesAno($nota->get('pagoem'));
             $cumulativo += $nota->get('valor');