public function pdfPropostasAnaliseVisualTecnicoAction() { $this->_helper->layout->disableLayout(); $this->_helper->viewRenderer->setNoRender(); $usuario = $_SESSION['Zend_Auth']['storage']->usu_orgao; $tblProposta = new Proposta(); $rsProposta = $tblProposta->buscarPropostaAnaliseVisualTecnico(array("idOrgao = " => $usuario), array("Tecnico ASC")); $arrTecnicos = array(); foreach ($rsProposta as $proposta) { $arrTecnicosPropostas[$proposta->Tecnico][] = $proposta; } $html = ' <table width="100%"> <tr> <th style="font-size:36px;"> Avaliação: Reavaliação </th> </tr> '; $ultimoRegistro = null; $ct = 1; if (!empty($arrTecnicosPropostas)) { foreach ($arrTecnicosPropostas as $tecnico => $propostas) { $html .= ' <tr> <td align="left" style="border:1px #000000 solid; font-size:14px; font-weight:bold;"> Analista : ' . $tecnico . ' </td> </tr> <tr> <td> <table width="100%" cellpadding="2" cellspacing="2" style="border:1px #000000 solid;"> <tr> <th width="15%" style="border-bottom:1px #000000 solid;">Nr. Proposta</th> <th width="65%" style="border-bottom:1px #000000 solid;">Nome da Proposta</th> <th width="20%" style="border-bottom:1px #000000 solid;">Dt. Movimentação</th> </tr> '; foreach ($propostas as $proposta) { if ($proposta->ConformidadeOK == 0) { $html .= ' <tr> <td align="center" style="font-size:12px;">' . $proposta->idProjeto . '</td> <td align="center" style="font-size:12px;">' . $proposta->NomeProjeto . '</td> <td align="center" style="font-size:12px;">' . ConverteData($proposta->DtMovimentacao, 5) . '</td> </tr> '; } } $html .= ' </table> </td> </tr> '; $ct++; } } $html .= ' </table> '; $html .= ' <table width="100%"> <tr> <th style="font-size:36px;"> Avaliação: Inicial </th> </tr> '; $ultimoRegistro = null; $ct = 1; if (!empty($arrTecnicosPropostas)) { foreach ($arrTecnicosPropostas as $tecnico => $propostas) { $html .= ' <tr> <td align="left" style="border:1px #000000 solid; font-size:14px; font-weight:bold;"> Analista : ' . $tecnico . ' </td> </tr> <tr> <td> <table width="100%" cellpadding="2" cellspacing="2" style="border:1px #000000 solid;"> <tr> <th width="15%" style="border-bottom:1px #000000 solid;">Nr. Proposta</th> <th width="65%" style="border-bottom:1px #000000 solid;">Nome da Proposta</th> <th width="20%" style="border-bottom:1px #000000 solid;">Dt. Movimentação</th> </tr> '; foreach ($propostas as $proposta) { if ($proposta->ConformidadeOK == 9) { $html .= ' <tr> <td align="center" style="font-size:12px;">' . $proposta->idProjeto . '</td> <td align="center" style="font-size:12px;">' . $proposta->NomeProjeto . '</td> <td align="center" style="font-size:12px;">' . ConverteData($proposta->DtMovimentacao, 5) . '</td> </tr> '; } } $html .= ' </table> </td> </tr> '; $ct++; } } $html .= ' </table> '; //echo $html; die; $pdf = new PDF($html, 'pdf'); $pdf->gerarRelatorio(); }