function dibujarCabecera($tipoCabecera, $dibujarTitulo) { global $pdf; global $row; setNumeroSolicitud($row["CUIT"], $row["FO_FORMULARIO"]); $pdf->SetFont("Arial", "B", 8); $pdf->Ln(-7.2); $pdf->Cell(4); $pdf->Cell(0, 0, $row["FECHAALTA"]); $pdf->SetFont("Arial", "B", 9); $pdf->Ln(3); $pdf->Cell(192, 0, $row["TITULO"], 0, 0, "C"); $pdf->SetFont("Arial", "B", 8); $pdf->Ln(8); $pdf->Cell(-6); $pdf->Cell(48, 0, "C.U.I.T./C.U.I.P. Nº ".ponerGuiones($row["CUIT"])); $pdf->Cell(0, 0, "Nº Establecimiento ".$row["NROESTABLECIMIENTO"]); $pdf->Ln(12); $pdf->SetFillColor(255, 255, 255); $pdf->Rect(2, 22, 210, 80, "F"); $pdf->SetFillColor(0, 0, 0); if ($tipoCabecera == 1) { $pdf->Rect(5, 22, 5.4, 4, "F"); $pdf->Rect(11.0, 22, 116.4, 4, "F"); $pdf->Rect(127.8, 22, 3.2, 4, "F"); $pdf->Rect(131.4, 22, 4, 4, "F"); $pdf->Rect(135.8, 22, 8.8, 4, "F"); $pdf->Rect(145.2, 22, 12.6, 4, "F"); $pdf->Rect(158.4, 22, 52.2, 4, "F"); $pdf->SetTextColor(255, 255, 255); $pdf->Ln(-8.4); $pdf->SetFont("Arial", "B", 6); $pdf->Cell(87); $pdf->Cell(0, 0, "FECHA", 0, 0, "C"); $pdf->Ln(0.4); $pdf->SetFont("Arial", "B", 7); $pdf->Cell(126.2); $pdf->Cell(8, 0, "NO", 0, 0, "C"); $pdf->Ln(0.4); $pdf->Cell(-4.4); $pdf->Cell(6, 0, "Nº"); $pdf->Cell(115.6, 0, "-"); $pdf->Cell(4.8, 0, "SÍ"); $pdf->Cell(-1.4); $pdf->Cell(39, 0, "NO"); $pdf->Cell(53, 0, "NORMATIVAVIGENTE"); $pdf->Ln(1.2); $pdf->SetFont("Arial", "B", 6); $pdf->Cell(125.4); $pdf->Cell(0, 0, "APLICA"); $pdf->Ln(0); $pdf->SetFont("Arial", "B", 4); $pdf->Cell(134.2); $pdf->Cell(0, 0, "REGULARIZACIÓN"); $pdf->Ln(2); $pdf->SetTextColor(0, 0, 0); } if ($tipoCabecera == 2) { // Cancerígenos.. $pdf->Ln(-9.6); $pdf->SetFillColor(0, 0, 0); $pdf->Rect($pdf->GetX() - 5, $pdf->GetY(), 51, 4, "F"); $pdf->Rect($pdf->GetX() + 46.4, $pdf->GetY(), 51, 4, "F"); $pdf->Rect($pdf->GetX() + 98, $pdf->GetY(), 51, 4, "F"); $pdf->Rect($pdf->GetX() + 149.4, $pdf->GetY(), 51, 4, "F"); $pdf->SetTextColor(255, 255, 255); $pdf->Ln(2); $pdf->SetFont("Arial", "B", 6); $pdf->Cell(-5); $pdf->Cell(39, 0, "DESCRIPCIÓN"); $pdf->Cell(6, 0, "SÍ"); $pdf->Cell(7, 0, "NO"); $pdf->Cell(38, 0, "DESCRIPCIÓN"); $pdf->Cell(6, 0, "SÍ"); $pdf->Cell(7.6, 0, "NO"); $pdf->Cell(38, 0, "DESCRIPCIÓN"); $pdf->Cell(6, 0, "SÍ"); $pdf->Cell(7.6, 0, "NO"); $pdf->Cell(38, 0, "DESCRIPCIÓN"); $pdf->Cell(6, 0, "SÍ"); $pdf->Cell(7, 0, "NO"); $pdf->SetTextColor(0, 0, 0); $pdf->Ln(-15); } if ($tipoCabecera == 3) { // Difenilos.. $pdf->Ln(-9.6); $pdf->SetFillColor(0, 0, 0); $pdf->Rect($pdf->GetX() - 5, $pdf->GetY(), 51, 4, "F"); $pdf->Rect($pdf->GetX() + 46.4, $pdf->GetY(), 51, 4, "F"); $pdf->Rect($pdf->GetX() + 98, $pdf->GetY(), 51, 4, "F"); $pdf->Rect($pdf->GetX() + 149.4, $pdf->GetY(), 51, 4, "F"); $pdf->SetTextColor(255, 255, 255); $pdf->Ln(2); $pdf->SetFont("Arial", "B", 6); $pdf->Cell(-5); $pdf->Cell(39, 0, "DESCRIPCIÓN"); $pdf->Cell(6, 0, "SÍ"); $pdf->Cell(7, 0, "NO"); $pdf->Cell(38, 0, "DESCRIPCIÓN"); $pdf->Cell(6, 0, "SÍ"); $pdf->Cell(7.6, 0, "NO"); $pdf->Cell(38, 0, "DESCRIPCIÓN"); $pdf->Cell(6, 0, "SÍ"); $pdf->Cell(7.6, 0, "NO"); $pdf->Cell(38, 0, "DESCRIPCIÓN"); $pdf->Cell(6, 0, "SÍ"); $pdf->Cell(7, 0, "NO"); $pdf->SetTextColor(0, 0, 0); $pdf->Ln(-15); } if ($tipoCabecera == 4) { // Químicas.. $pdf->Ln(-9); if ($dibujarTitulo) { $pdf->Ln(4); $pdf->SetFont("Arial", "B", 8); $pdf->Cell(-4); $pdf->Cell(0, 0, "PLANILLA C | SUSTANCIAS QUÍMICAS A DECLARAR"); $pdf->Ln(4); } $pdf->SetFillColor(0, 0, 0); $pdf->Rect($pdf->GetX() - 5, $pdf->GetY(), 102.4, 4, "F"); $pdf->Rect($pdf->GetX() + 98, $pdf->GetY(), 102.4, 4, "F"); $pdf->SetTextColor(255, 255, 255); $pdf->SetFont("Arial", "B", 6); $pdf->Ln(1.2); $pdf->Cell(79.6, 0, "CANTIDAD", 0, 0, "R"); $pdf->Cell(103, 0, "CANTIDAD", 0, 0, "R"); $pdf->Ln(1.8); $pdf->Cell(-5); $pdf->Cell(70, 0, "DESCRIPCIÓN", 0, 0, "C"); $pdf->Cell(16, 0, "UMBRAL(TN)", 0, 0, "C"); $pdf->Cell(8, 0, "SÍ", 0, 0, "C"); $pdf->Cell(8, 0, "NO", 0, 0, "C"); $pdf->Cell(71, 0, "DESCRIPCIÓN", 0, 0, "C"); $pdf->Cell(16, 0, "UMBRAL(TN)", 0, 0, "C"); $pdf->Cell(8, 0, "SÍ", 0, 0, "C"); $pdf->Cell(8, 0, "NO", 0, 0, "C"); $pdf->SetTextColor(0, 0, 0); } }
$pdf->useTemplate($tplIdx); $pdf->SetFont("Arial", "", 10); $pdf->Ln(15); $pdf->Cell(196, 0, setNumeroSolicitud($row2["CUITSUSCRIPCION"], $row2["FO_FORMULARIO"]), 0, 0, "C"); $pdf->SetFont("Arial", "B", 8); $pdf->Ln(240.4); $pdf->Cell(144); $pdf->Cell(0, 0, ponerGuiones($row2["SC_CUIT"])); //Página 3.. $pdf->AddPage(); $tplIdx = $pdf->importPage(3); $pdf->useTemplate($tplIdx); $pdf->SetFont("Arial", "", 10); $pdf->Ln(15); $pdf->Cell(196, 0, setNumeroSolicitud($row2["CUITSUSCRIPCION"], $row2["FO_FORMULARIO"]), 0, 0, "C"); $pdf->SetFont("Arial", "B", 8); $pdf->Ln(177.6); $pdf->Cell(148); $pdf->Cell(0, 0, ponerGuiones($row2["SC_CUIT"])); if ($autoPrint) $pdf->AutoPrint(false); $pdf->Output(); ?>
AND se_provincia = pv_codigo AND se_fechabaja IS NULL AND se_idsolicitud = :idsolicitud ORDER BY se_nroestableci"; $stmt = DBExecSql($conn, $sql, $params); $i = 8; $pdf->Ln(26); while ($rowEstablecimientos = DBGetQuery($stmt, 1, false)) { if (($i%7) == 6) { ocultarParteInferior(); $pdf->AddPage(); $tplIdx = $pdf->importPage(1); $pdf->useTemplate($tplIdx); ocultarParteSuperior(); setNumeroSolicitud($row2["CUIT"], $row2["FO_FORMULARIO"]); $pdf->Ln(2); } dibujarEstablecimiento(); $i++; } if ($autoPrint) $pdf->AutoPrint(false); $pdf->Output(); ?>