$ListaPendencia = $objImpressao->GetLista(); // $controlador->SomaValorFatura($pendencias->getCodFechamentoSigmo()) $CodFechamento = ""; ?> <body onload="window.print();"> <div class="container" align="center" style="width:700px;"> <?php foreach ($ListaPendencia as $pendencias){ ?> <table border="1" class="tabela table-hover table-responsive"> <?php if ($pendencias->getCodFechamentoSigmo() != $CodFechamento) { $TotalFatura = $Cbanco->RealizaSumSelect("SELECT * FROM F_FECHAMENTO_FATURA WHERE 1=1", "F_FECHAMENTO_FATURA.VALOR_PERIODO", " AND NUMERO_FATURA_SIGMO = " . $pendencias->getCodFechamentoSigmo()); ?> <hr> <span class='label label-warning'>Referente ao fechamento</span> <span class="badge"><?php echo $pendencias->getCodFechamentoSigmo() . "</span> Valor Total = R$ " . $TotalFatura?> </span> <table border="1" class="tabela table-hover table-responsive"> <thead> <tr> <th align="center">Empresa</th> <th align="center">Observação</th> <th align="center">Dt. Fechamento</th> <th align="center">Tipo</th> <th align="center">Valor</th> </tr> </thead> <tbody>