コード例 #1
0
ファイル: informe.php プロジェクト: alexeimun/SDCE
 public function imprimirgastostransporte($id)
 {
     if (isset($id) && is_numeric($id)) {
         $Gastos = $this->informes_model->TraeGastosTransporte($id);
         if (!is_null($Gastos)) {
             if ($Gastos->num_rows() == 0) {
                 redirect(site_url(), 'refresh');
             }
         } else {
             redirect(site_url(), 'refresh');
         }
     } else {
         redirect(site_url(), 'refresh');
     }
     $pdf = new PDF();
     $pdf->AddPage();
     $Detalle = $this->informes_model->TraeRegistro($id, 'GT');
     $pdf->Image(base_url('public/images/logo.jpg'), 10, 15, 70, 15);
     $pdf->SetFont('Arial', 'B', 10);
     #ENCABEZADO
     $pdf->Text(180, 45, 'DO-69-F');
     $pdf->Text(70, 48, 'FORMATO REPORTE GASTOS DE TRANSPORTE');
     $pdf->Text(75, 55, 'FUNDACIÓN UNIVERSITARIA MARÍA CANO');
     $pdf->Text(78, 60, 'PROGRAMA DE INGENIERÍA DE SISTEMAS');
     $pdf->SetFont('Arial', '', 10);
     $pdf->Text(10, 65, 'Período: ' . (date('m', strtotime($Detalle->FECHA_REGISTRO)) > 6 ? 2 : 1) . ' Semestre ' . date('Y', strtotime($Detalle->FECHA_REGISTRO)));
     $pdf->Text(10, 75, 'Páguese a nombre de: ' . $this->session->userdata('NOMBRE_USUARIO') . '   C.C ' . number_format($this->session->userdata('DOCUMENTO'), 0, ',', ','));
     #Headers
     $pdf->SetFont('Arial', 'B', 9);
     $pdf->SetXY(5, 82);
     $pdf->Cell(25, 10, 'FECHA', 1, 0, 'C');
     $pdf->SetXY(30, 82);
     $pdf->Cell(50, 10, 'LUGAR', 1, 0, 'C');
     $pdf->SetXY(80, 82);
     $pdf->Cell(40, 10, 'ACTIVIDAD', 1, 0, 'C');
     $pdf->SetXY(120, 82);
     $pdf->MultiCell(34, 5, 'NÚMERO DE DESPLAZAMIENTOS', 1, 'C');
     $pdf->SetXY(154, 82);
     $pdf->MultiCell(25, 5, 'VALOR UNITARIO', 1, 'C');
     $pdf->SetXY(179, 82);
     $pdf->MultiCell(27, 10, 'VALOR TOTAL', 1, 'C');
     $pdf->SetFont('Arial', '', 9);
     $pdf->SetWidths([25, 50, 40, 34, 25, 27]);
     $pdf->SetAligns(['C', 'C', 'C', 'C', 'C']);
     $Total = 0;
     foreach ($Gastos->result() as $gasto) {
         $pdf->SetX(5);
         $pdf->Row([Fecha($gasto->FECHA_GASTO), utf8_encode($gasto->LUGAR), utf8_encode($gasto->ACTIVIDAD), $gasto->NUMERO_DESPLAZAMIENTOS, number_format($gasto->VALOR_UNITARIO, 0, '', ','), number_format($gasto->VALOR_TOTAL, 0, '', ',')]);
         $Total += $gasto->VALOR_TOTAL;
     }
     $pdf->SetFont('Arial', 'B', 9);
     $pdf->SetX(5);
     $pdf->Row(['', '', '', '', 'Total', number_format($Total, 0, '', ',')]);
     #Footer
     $pdf->Text(25, $pdf->GetY() + 20, 'Firma Coordinador de Práctica');
     $pdf->Line(10, $pdf->GetY() + 15, 90, $pdf->GetY() + 15);
     $pdf->Text(140, $pdf->GetY() + 20, 'CENTRO DE PRÁCTICAS');
     $pdf->Output();
     $pdf->Cell($pdf->PageNo());
 }
コード例 #2
0
ファイル: seguimiento.php プロジェクト: alexeimun/SDCE
 /**
  * @param PDF $pdf
  * @param $Persona1
  * @param $Persona2
  */
 private function FuncionSumativa($pdf, $Persona1, $Persona2 = null)
 {
     $pdf->AddPage('L');
     $this->item = 0;
     $Notas = [];
     if (is_null($Persona2)) {
         $Notas = $Persona1->NOTA;
     } else {
         foreach ($Persona1->NOTA as $i => $calificacion) {
             $Notas[] = number_format(($calificacion + $Persona2[$i]) / 2, 1);
         }
     }
     $pdf->Image(base_url('public/images/logo.jpg'), 20, 10, 40, 10);
     #ENCABEZADO
     $pdf->SetFont('Arial', 'B', 9);
     $pdf->SetFillColor(210, 200, 200);
     $pdf->Text(260, 15, 'DO-075-F');
     $pdf->Text(85, 20, 'FACULTAD DE CIENCIAS EMPRESARIALES Y FACULTAD DE INGENIERÍAS');
     $pdf->Text(103, 25, 'FORMATO SEGUIMIENTO A ESTUDIANTES EN PRÁCTICA');
     $pdf->Text(125, 30, 'FUNCIÓN SUMATIVA');
     #Fields
     $h = 9;
     $f = 0;
     $c = 25;
     $x = 30;
     $pdf->SetFont('Arial', '', 7);
     $pdf->Rect($x, $c + $h * ++$f, 240, 59);
     $pdf->Rect($x, $c + $h * $f, 240, 5);
     #NUMERACIÓN
     $pdf->Text($x + 64, $c + $h * $f + 3, '1°            2°');
     $pdf->Text($x + 144, $c + $h * $f + 3, '1°            2°');
     $pdf->Text($x + 224, $c + $h * $f + 3, '1°            2°');
     $pdf->SetXY($x, $c + $h * $f);
     $pdf->Cell(60, 5, 'SABER SER (33%)', 1, 0, 'C');
     #bar 1
     $pdf->SetXY($x + 60, $c + $h * $f + 5);
     $pdf->Cell(20, 54, '', 1, 0, 'C', true);
     $pdf->SetXY($x + 60, $c + $h * $f);
     $pdf->Cell(10, 59, '', 1, 0, 'C');
     $pdf->SetXY($x + 80, $c + $h * $f);
     $pdf->Cell(60, 5, 'SABER HACER (34%)', 1, 0, 'C');
     #bar 2
     $pdf->SetXY($x + 140, $c + $h * $f + 5);
     $pdf->Cell(20, 54, '', 1, 0, 'C', true);
     $pdf->SetXY($x + 140, $c + $h * $f);
     $pdf->Cell(10, 59, '', 1, 0, 'C');
     $pdf->SetXY($x + 160, $c + $h * $f);
     $pdf->Cell(60, 5, 'SABER SABER (33%)', 1, 0, 'C');
     #bar 3
     $pdf->SetXY($x + 220, $c + $h * $f + 5);
     $pdf->Cell(20, 54, '', 1, 0, 'C', true);
     $pdf->SetXY($x + 220, $c + $h * $f);
     $pdf->Cell(10, 59, '', 1, 0, 'C');
     $ff = $f;
     $x += 4;
     $c += 1;
     $t = 0;
     #Saber ser Text
     $pdf->Text($x, $c + $h * ++$f, '1.   ADAPTABILIDAD');
     $saberser = $this->Nota($x + 59, $c + $h * $f, $pdf, $Notas, true);
     if (isset($this->Notas2['Notas'])) {
         $this->Nota($x + 69, $c + $h * $f, $pdf, $this->Notas2['Notas'], true, $t);
     }
     $pdf->Text($x, $c + $h * ++$f, '2.   COLABORACIÓN');
     $saberser += $this->Nota($x + 59, $c + $h * $f, $pdf, $Notas, true);
     if (isset($this->Notas2['Notas'])) {
         $this->Nota($x + 69, $c + $h * $f, $pdf, $this->Notas2['Notas'], true, ++$t);
     }
     $pdf->Text($x, $c + $h * ++$f, '3.   CREATIVIDAD');
     $saberser += $this->Nota($x + 59, $c + $h * $f, $pdf, $Notas, true);
     if (isset($this->Notas2['Notas'])) {
         $this->Nota($x + 69, $c + $h * $f, $pdf, $this->Notas2['Notas'], true, ++$t);
     }
     $pdf->Text($x, $c + $h * ++$f, '4.   RELACIONES INTERPERSONALES');
     $saberser += $this->Nota($x + 59, $c + $h * $f, $pdf, $Notas, true);
     if (isset($this->Notas2['Notas'])) {
         $this->Nota($x + 69, $c + $h * $f, $pdf, $this->Notas2['Notas'], true, ++$t);
     }
     $pdf->Text($x, $c + $h * ++$f, '5.   RESPONSABILIDAD');
     $saberser += $this->Nota($x + 59, $c + $h * $f, $pdf, $Notas, true);
     if (isset($this->Notas2['Notas'])) {
         $this->Nota($x + 69, $c + $h * $f, $pdf, $this->Notas2['Notas'], true, ++$t);
     }
     $pdf->Text($x, $c + $h * ++$f, '6.   ÉTICA');
     $saberser += $this->Nota($x + 59, $c + $h * $f, $pdf, $Notas, true);
     if (isset($this->Notas2['Notas'])) {
         $this->Nota($x + 69, $c + $h * $f, $pdf, $this->Notas2['Notas'], true, ++$t);
     }
     $f = $ff;
     $x += 82;
     #Saber hacer Text
     $pdf->Text($x, $c + $h * ++$f, '1.   CUMPLIMIENTO DE OBJETIVOS');
     $saberhacer = $this->Nota($x + 57, $c + $h * $f, $pdf, $Notas, true);
     if (isset($this->Notas2['Notas'])) {
         $this->Nota($x + 67, $c + $h * $f, $pdf, $this->Notas2['Notas'], true, ++$t);
     }
     $pdf->Text($x, $c + $h * ++$f, '2.   MANEJO DE RECURSOS');
     $saberhacer += $this->Nota($x + 57, $c + $h * $f, $pdf, $Notas, true);
     if (isset($this->Notas2['Notas'])) {
         $this->Nota($x + 67, $c + $h * $f, $pdf, $this->Notas2['Notas'], true, ++$t);
     }
     $pdf->Text($x, $c + $h * ++$f, '3.   DETECCIÓN DE OPORTUNIDADES');
     $saberhacer += $this->Nota($x + 57, $c + $h * $f, $pdf, $Notas, true);
     if (isset($this->Notas2['Notas'])) {
         $this->Nota($x + 67, $c + $h * $f, $pdf, $this->Notas2['Notas'], true, ++$t);
     }
     $pdf->Text($x, $c + $h * ++$f, '4.   PLANEACIÓN');
     $saberhacer += $this->Nota($x + 57, $c + $h * $f, $pdf, $Notas, true);
     if (isset($this->Notas2['Notas'])) {
         $this->Nota($x + 67, $c + $h * $f, $pdf, $this->Notas2['Notas'], true, ++$t);
     }
     $pdf->Text($x, $c + $h * ++$f, '5.   COMUNICACIÓN ORAL Y ESCRITA');
     $saberhacer += $this->Nota($x + 57, $c + $h * $f, $pdf, $Notas, true);
     if (isset($this->Notas2['Notas'])) {
         $this->Nota($x + 67, $c + $h * $f, $pdf, $this->Notas2['Notas'], true, ++$t);
     }
     $pdf->Text($x, $c + $h * ++$f, '6.   CALIDAD DEL TRABAJO');
     $saberhacer += $this->Nota($x + 57, $c + $h * $f, $pdf, $Notas, true);
     if (isset($this->Notas2['Notas'])) {
         $this->Nota($x + 67, $c + $h * $f, $pdf, $this->Notas2['Notas'], true, ++$t);
     }
     $f = $ff;
     $x += 80;
     #Saber saber Text
     $pdf->Text($x, $c + $h * ++$f, '1.   INTERPRETACIÓN');
     $sabersaber = $this->Nota($x + 57, $c + $h * $f, $pdf, $Notas, true);
     if (isset($this->Notas2['Notas'])) {
         $this->Nota($x + 67, $c + $h * $f, $pdf, $this->Notas2['Notas'], true, ++$t);
     }
     $pdf->Text($x, $c + $h * ++$f, '2.   ANÁLISIS');
     $sabersaber += $this->Nota($x + 57, $c + $h * $f, $pdf, $Notas, true);
     if (isset($this->Notas2['Notas'])) {
         $this->Nota($x + 67, $c + $h * $f, $pdf, $this->Notas2['Notas'], true, ++$t);
     }
     $pdf->Text($x, $c + $h * ++$f, '3.   PROPOSICIÓN');
     $sabersaber += $this->Nota($x + 57, $c + $h * $f, $pdf, $Notas, true);
     if (isset($this->Notas2['Notas'])) {
         $this->Nota($x + 67, $c + $h * $f, $pdf, $this->Notas2['Notas'], true, ++$t);
     }
     $pdf->Text($x, $c + $h * ++$f, '4.   ARGUMENTACIÓN');
     $sabersaber += $this->Nota($x + 57, $c + $h * $f, $pdf, $Notas, true);
     if (isset($this->Notas2['Notas'])) {
         $this->Nota($x + 67, $c + $h * $f, $pdf, $this->Notas2['Notas'], true, ++$t);
     }
     $pdf->Text($x, $c + $h * ++$f, '5.   SÍNTESIS');
     $sabersaber += $this->Nota($x + 57, $c + $h * $f, $pdf, $Notas, true);
     if (isset($this->Notas2['Notas'])) {
         $this->Nota($x + 67, $c + $h * $f, $pdf, $this->Notas2['Notas'], true, ++$t);
     }
     $pdf->Text($x, $c + $h * ++$f, '6.   ACTUALIZACIÓN');
     $sabersaber += $this->Nota($x + 57, $c + $h * $f, $pdf, $Notas, true);
     if (isset($this->Notas2['Notas'])) {
         $this->Nota($x + 67, $c + $h * $f, $pdf, $this->Notas2['Notas'], true, $t);
     }
     ##########################
     $c = 30;
     $x = 30;
     $f = $ff;
     $pdf->Rect($x, $c + $h * $f, 240, 9);
     $pdf->Rect($x, $c + $h * ++$f, 240, 9);
     $pdf->Rect($x, $c + $h * ++$f, 240, 9);
     $pdf->Rect($x, $c + $h * ++$f, 240, 9);
     $pdf->Rect($x, $c + $h * ++$f, 240, 9);
     $pdf->Rect($x, $c + $h * ++$f, 240, 9);
     $saberser = number_format($saberser / 6 * 0.33, 2);
     $saberhacer = number_format($saberhacer / 6 * 0.34, 2);
     $sabersaber = number_format($sabersaber / 6 * 0.33, 2);
     $f++;
     $pdf->SetFont('Arial', 'B', 8);
     $pdf->SetWidths([50, 35, 35]);
     $pdf->SetAligns(['C', 'C', 'C']);
     $pdf->SetXY($x, $c + $h * ++$f);
     $pdf->Row(['TOTALES', 'PRIMER MOMENTO', 'SEGUNDO MOMENTO']);
     $pdf->SetAligns(['L', 'C', 'C']);
     $pdf->SetXY($x, $c + $h * $f + 5);
     $pdf->Row(['SABER SER (33%)', $saberser, isset($this->Notas2['Saberser']) ? $this->Notas2['Saberser'] : '']);
     $pdf->SetXY($x, $c + $h * $f + 10);
     $pdf->Row(['SABER HACER (34%)', $saberhacer, isset($this->Notas2['Saberhacer']) ? $this->Notas2['Saberhacer'] : '']);
     $pdf->SetXY($x, $c + $h * $f + 15);
     $pdf->Row(['SABER SABER (33%)', $sabersaber, isset($this->Notas2['Sabersaber']) ? $this->Notas2['Sabersaber'] : '']);
     $pdf->SetFont('Arial', '', 8);
     $f += 2;
     #######Nota Primer momento#########
     $nota1 = $sabersaber + $saberser + $saberhacer;
     $nota1 = $nota1 > 5 ? 5 : $nota1;
     $pdf->Text($x, $c + $h * ++$f, 'Nota primer momento');
     $pdf->SetXY($x + 32, $c + $h * $f - 3);
     $pdf->Cell(15, 4, number_format($nota1, 1), 1, 0, 'C');
     $pdf->Text($x + 48, $c + $h * $f, 'Fecha');
     $pdf->Text($x + 65, $c - 1 + $h * $f, Fecha($Persona1->FECHA_REGISTRO));
     $pdf->Line($x + 58, $c + $h * $f, 120, $c + $h * $f);
     $pdf->Text($x + 92, $c + $h * $f, 'Firma estudiante');
     $pdf->Line($x + 115, $c + $h * $f, 205, $c + $h * $f);
     $pdf->Text($x, $c + $h * ++$f, 'Firma asesor');
     $pdf->Line($x + 18, $c + $h * $f, 95, $c + $h * $f);
     $pdf->Text($x + 70, $c + $h * $f, 'Firma cooperador');
     $pdf->Line($x + 95, $c + $h * $f, 185, $c + $h * $f);
     ###Nota Segundo Memento########
     $pdf->Text($x, $c + $h * ++$f, 'Nota segundo momento');
     $nota2 = 0;
     if (isset($this->Notas2['Notas'])) {
         $nota2 = number_format($this->Notas2['Sabersaber'] + $this->Notas2['Saberser'] + $this->Notas2['Saberhacer'], 1);
         $nota2 = $nota2 > 5 ? 5 : $nota2;
     }
     $pdf->SetXY($x + 32, $c + $h * $f - 3);
     $pdf->Cell(15, 4, isset($this->Notas2['Notas']) ? $nota2 : '', 1, 0, 'C');
     $pdf->Text($x + 48, $c + $h * $f, 'Fecha');
     if (isset($this->Notas2['Notas'])) {
         $pdf->Text($x + 65, $c - 1 + $h * $f, Fecha($this->Notas2['Fecha']));
     }
     $pdf->Line($x + 58, $c + $h * $f, 120, $c + $h * $f);
     $pdf->Text($x + 92, $c + $h * $f, 'Firma estudiante');
     $pdf->Line($x + 115, $c + $h * $f, 205, $c + $h * $f);
     $pdf->Text($x, $c + $h * ++$f, 'Firma asesor');
     $pdf->Line($x + 18, $c + $h * $f, 95, $c + $h * $f);
     $pdf->Text($x + 70, $c + $h * $f, 'Firma cooperador');
     $pdf->Line($x + 95, $c + $h * $f, 185, $c + $h * $f);
     $pdf->Text($x, $c + $h * ++$f, 'Nota definitiva');
     $pdf->SetXY($x + 32, $c + $h * $f - 3);
     $pdf->Cell(15, 4, isset($this->Notas2['Notas']) ? number_format(($nota2 + $nota1) / 2, 1) : '', 1, 0, 'C');
     $pdf->SetFont('Arial', 'B', 8);
     $pdf->Text($x, $c + $h * ++$f, 'Escala de calificación 0-5');
     $pdf->SetFont('Arial', '', 8);
     $pdf->Text($x + 50, $c + $h * $f, 'V°B° Coordinador de práctica');
     $pdf->Line($x + 90, $c + $h * $f, 205, $c + $h * $f);
     $pdf->Text($x, $c + $h * ++$f, 'NOTA: Anexar a este, los registros de asesoría que dan cuenta del acompañamiento al estudiante en el semestre');
     $pdf->Text(270, $c + $h * ++$f + 5, 'Página ' . $pdf->PageNo());
 }