try {
			$_REQUEST["actual"] = $row["PRIMAANUALCOMPSINFORMATO"];
			$_REQUEST["archivo"] = "W_".$_SESSION["usuario"]."_".date("YmdHis").".png";
			$_REQUEST["provart"] = $row["PRIMAANUALSINFORMATO"];

			require_once($_SERVER["DOCUMENT_ROOT"]."/modules/solicitud_cotizacion/generar_grafico_comparativo.php");
			$graficoOk = true;
		}
		catch (Exception $e) {
			$graficoOk = false;
		}
		// FIN - Generación de gráfico que va incrustado en el reporte..

if ($graficoOk) {
		$pdf->setSourceFile($_SERVER["DOCUMENT_ROOT"]."/modules/solicitud_cotizacion/plantillas/analisis_comparativo_costos.pdf");
		$pdf->SetDrawColor(255, 255, 255);
		$pdf->SetFillColor(255, 255, 255);

		$pdf->AddPage();
		$tplIdx = $pdf->importPage(1);
		$pdf->useTemplate($tplIdx);
		$pdf->SetFont("Arial", "B", 10);

		$pdf->Ln(33);
		$pdf->Cell(40);
		$pdf->Cell(144, 0, $row["RAZONSOCIAL"]);

		$pdf->Ln(6.6);
		$pdf->Cell(28);
		$pdf->Cell(36, 0, $row["CUIT"]);
Example #2
0
$_REQUEST["y"] = $_REQUEST["y"] * 0.728;

if ($_REQUEST["tipoSello"] == "n") {
	$pdf->SetFont("Arial", "B", 14);
	$pdf->SetTextColor(0, 0, 0);

	$pdf->SetXY($_REQUEST["x"] + 8, $_REQUEST["y"] + 18);
	$pdf->Cell(0, 0, "NO CORRESPONDE PRESENTACIÓN");
	$pdf->SetXY($_REQUEST["x"] + 11, $_REQUEST["y"] + 24);
	$pdf->Cell(0, 0, "POR ACTIVIDAD DESARROLLADA");
}
else {
	$pdf->SetFont("Arial", "B", 16);
	switch ($_REQUEST["tipoSello"]) {
		case "e":
			$pdf->SetDrawColor(0, 0, 196);
			$pdf->SetTextColor(0, 0, 196);
			break;
		case "h":
			$pdf->SetDrawColor(196, 0, 0);
			$pdf->SetTextColor(196, 0, 0);
			break;
		case "i":
			$pdf->SetDrawColor(0, 0, 196);
			$pdf->SetTextColor(0, 0, 196);
			break;
		case "s":
			$pdf->SetDrawColor(0, 0, 196);
			$pdf->SetTextColor(0, 0, 196);
			break;
	}
Example #3
0
	$pdf->Cell(24.4, 0, $rowResponsable["RR_TITULO"]);
	$pdf->Cell(1);
	$pdf->Cell(28, 0, $rowResponsable["RR_MATRICULA"]);
	$pdf->Cell(1);
	$pdf->Cell(37, 0, $rowResponsable["RR_ENTIDAD"]);
	$pdf->Ln(3);
}

$pdf->Ln(6);
$pdf->Cell(-5);
$pdf->Cell(0, 0, "El que suscribe en el carácter de responsable firmante declara bajo juramento que los datos consignados en la presente son correctos y completos, y que esta declaración ha sido confeccionada sin omitir");
$pdf->Ln(2.4);
$pdf->Cell(-5);
$pdf->Cell(0, 0, "ni falsear dato alguno que deba contener, siendo fiel expresión de la verdad.");

$pdf->Ln(8);
$pdf->SetDrawColor(0, 0, 0);
$pdf->Line($pdf->GetX() + 4, $pdf->GetY() + 4, $pdf->GetX() + 92, $pdf->GetY() + 4);
$pdf->Line($pdf->GetX() + 104, $pdf->GetY() + 4, $pdf->GetX() + 192, $pdf->GetY() + 4);

$pdf->Ln(6);
$pdf->SetFont("Arial", "B", 6);
$pdf->Cell(4);
$pdf->Cell(112, 0, "FIRMA, ACLARACIÓN Y SELLO DEL RESPONSABLE DE LOS DATOS DECLARADOS");
$pdf->Cell(0, 0, "FIRMA, ACLARACIÓN Y SELLO DEL RESPONSABLE DE HyS");


if ($autoPrint)
	$pdf->AutoPrint(false);
$pdf->Output();
?>
 public function generatesExternalReport($id = -1)
 {
     /* 
      * Loading libraries and helpers
      */
     $this->load->library(array('rb', 'fpdf_gen'));
     $this->load->helper(array('date', 'utility'));
     /*
      * The request id is not set 
      */
     if ($id == -1) {
         echo "Parece que não foi especificado qual o id da Solicitação.";
         exit;
     }
     /* 
      * Loading request
      */
     $request = R::findOne('request', 'id=?', array($id));
     /* 
      * Request exists
      */
     if ($request == null) {
         echo 'Parece que a solicitação não existe.';
         exit;
     }
     /* 
      * Creating PDF
      */
     $pdf = new FPDI();
     $pdf->addPage('L');
     /* *********************************************************
      * BEGIN  - HEADER
      ********************************************************* */
     $pdf->image(public_url('img/' . $this->config->item('system_report_logo')), 140, 5);
     $pdf->ln(14);
     $pdf->SetFont('Courier', 'B', 9);
     $pdf->Cell(0, 0, utf8_decode($this->config->item('system_name')), 0, 0, 'C');
     $pdf->Ln(5);
     $pdf->SetFont('Courier', '', 9);
     $pdf->Cell(0, 0, utf8_decode("SOLICITAÇÃO DE INFORMAÇÃO"), 0, 0, 'C');
     /* *********************************************************
      * END - HEADER
      ********************************************************* */
     $pdf->Ln(10);
     $pdf->SetFont('Courier', 'B', 9);
     $pdf->SetDrawColor(217, 217, 217);
     $pdf->SetFillColor(217, 217, 217);
     $pdf->Cell(0, 10, utf8_decode(' DADOS DA SOLICITAÇÃO'), 'LRTB', 0, 'L', true);
     $pdf->Ln(10);
     $pdf->Cell(24, 10, utf8_decode(' PROTOCOLO: '), 'LTB', 0, 'L', false);
     $pdf->SetFont('Courier', '', 9);
     $pdf->Cell(110, 10, utf8_decode($request->protocol), 'TBR', 0, 'L', false);
     $pdf->SetFont('Courier', 'B', 9);
     $pdf->Cell(32, 10, utf8_decode(' SOLICITADA EM: '), 'TB', 0, 'L', false);
     $pdf->SetFont('Courier', '', 9);
     $pdf->Cell(111, 10, utf8_decode(mdate('%d/%m/%Y', strtotime($request->createdAt))), 'TBR', 0, 'L', false);
     $pdf->Ln(10);
     $pdf->SetFont('Courier', 'B', 9);
     $pdf->Cell(24, 10, utf8_decode(' SITUAÇÃO: '), 'LB', 0, 'L', false);
     $pdf->SetFont('Courier', '', 9);
     $pdf->Cell(253, 10, utf8_decode(status_text($request->status)), 'TBR', 0, 'L', false);
     $pdf->Ln(10);
     $pdf->SetFont('Courier', 'B', 9);
     $pdf->Cell(0, 10, utf8_decode(' SOLICITAÇÃO: '), 'LR', 0, 'L', false);
     $pdf->Ln(8);
     $pdf->SetFont('Courier', '', 9);
     $pdf->MultiCell(0, 5, utf8_decode(' ' . $request->request), 'LR', 'L', false);
     $pdf->Cell(0, 4, '', 'LR', 0, 'L', false);
     $pdf->Ln(4);
     $pdf->SetFont('Courier', 'B', 9);
     $pdf->Cell(0, 10, utf8_decode(' TRÂMITAÇÃO'), 'LRTB', 0, 'L', true);
     $pdf->Ln(10);
     $pdf->SetFont('Courier', '', 9);
     $statuses = R::find('status', ' request_id = ? ORDER BY created_at ASC ', array($request->id));
     if (!count($statuses)) {
         $pdf->Cell(0, 10, utf8_decode(' Nenhuma trâmitação ainda'), 'LRB', 0, 'L', false);
     } else {
         foreach ($statuses as $s) {
             $pdf->SetFont('Courier', 'B', 9);
             $pdf->Cell(0, 10, utf8_decode(' ' . status_text($s->type) . ' [' . date('d/m/Y', strtotime($s->createdAt)) . ']'), 'LR', 0, 'L', false);
             $pdf->Ln(10);
             $pdf->SetFont('Courier', '', 9);
             $pdf->MultiCell(0, 5, utf8_decode(' ' . $s->response), 'LRB', 'L', false);
         }
     }
     $pdf->Ln(10);
     $pdf->Output();
 }