$row["QUIEBRA"] = $row["QUIEBRA"]." (".$row["PERQUIEBRA"].")"; // Traigo los registros del detalle para saber cuantas hojas voy a generar.. $params = array(":contrato" => $_REQUEST["id"]); $sql = getSqlDetalle($row, $sqlFilas); $stmt = DBExecSql($conn, $sql, $params); // ******* INICIO - Armado del reporte.. ******* $pdf = new FPDI("L", "mm", array(232, 280)); $pdf->setSourceFile($_SERVER["DOCUMENT_ROOT"]."/modules/estado_cuenta/templates/estado_cuenta.pdf"); $pdf->SetFont("Arial", "", 7); $textoLeyendaFinal = getLeyendaFinal($_REQUEST["id"]); $pdf->wordWrap($textoLeyendaFinal, 196); $textoLeyendaFinal = explode("\n", $textoLeyendaFinal); $fila = 1; $pagina = 1; while ($rowDetalle = DBGetQuery($stmt, 1, false)) { if ($fila == 1) setDatosEstaticos($pdf, $row, $pagina, $entidad, $vendedor, $ejecutivo, $estudio, $gestor); // Muestro el detalle.. $pdf->SetFont("Arial", "", 7); $pdf->SetX(0); $pdf->SetY(79 + ($fila * 4)); $pdf->Cell(0.2); $pdf->Cell(13, 0, $rowDetalle["PERIODO"]);