public function actionDownload()
 {
     parent::actionDownload();
     $pdf = new PDF();
     $pdf->title = 'Unit of Measure List';
     $pdf->AddPage('P');
     $pdf->setFont('Arial', 'B', 12);
     // definisi font
     $pdf->setFont('Arial', 'B', 8);
     // menuliskan tabel
     $connection = Yii::app()->db;
     $sql = "select a.uomcode,a.description\r\n      from unitofmeasure a";
     $command = $connection->createCommand($sql);
     $dataReader = $command->queryAll();
     $pdf->setaligns(array('C', 'C', 'C', 'C'));
     $pdf->setwidths(array(50, 90));
     $pdf->Row(array('Unit of Measure', 'Description'));
     $pdf->setaligns(array('L', 'L'));
     foreach ($dataReader as $row1) {
         $pdf->row(array($row1['uomcode'], $row1['description']));
     }
     // me-render ke browser
     $pdf->Output('unitofmeasure.pdf', 'D');
 }
 public function actionDownload()
 {
     parent::actionDownload();
     $pdf = new PDF();
     $pdf->title = 'Form Permintaan (Barang/Jasa)';
     $pdf->AddPage('P');
     $pdf->setFont('Arial', 'B', 12);
     // definisi font
     $pdf->setFont('Arial', 'B', 8);
     // menuliskan tabel
     $connection = Yii::app()->db;
     $sql = "select a.dano,a.dadate,a.headernote,a.deliveryadviceid\n      from deliveryadvice a\n      where deliveryadviceid = " . $_GET['id'];
     $command = $connection->createCommand($sql);
     $dataReader = $command->queryAll();
     foreach ($dataReader as $row) {
         $pdf->setFont('Arial', 'B', 8);
         $pdf->text(10, 30, 'No ');
         $pdf->text(50, 30, ': ' . $row['dano']);
         $pdf->text(10, 35, 'Date ');
         $pdf->text(50, 35, ': ' . $row['dadate']);
         $pdf->text(10, 40, 'Note ');
         $pdf->text(50, 40, ': ' . $row['headernote']);
         $sql1 = "select b.productname, a.qty, c.uomcode, a.itemtext\n        from deliveryadvicedetail a\n        left join product b on b.productid = a.productid\n        left join unitofmeasure c on c.unitofmeasureid = a.unitofmeasureid\n        where deliveryadviceid = " . $row['deliveryadviceid'];
         $command1 = $connection->createCommand($sql1);
         $dataReader1 = $command1->queryAll();
         $pdf->text(10, 50, 'Items');
         $pdf->SetY(55);
         $pdf->setFont('Arial', 'B', 6);
         $pdf->setaligns(array('C', 'C', 'C', 'C', 'C'));
         $pdf->setwidths(array(10, 90, 25, 25, 40));
         $pdf->setFont('Arial', '', 6);
         $pdf->Row(array('No', 'Items', 'Qty', 'Unit', 'Remark'));
         $pdf->setaligns(array('L', 'L', 'L', 'L', 'L'));
         $i = 0;
         foreach ($dataReader1 as $row1) {
             $i = $i + 1;
             $pdf->row(array($i, $row1['productname'], Yii::app()->numberFormatter->format(Yii::app()->params["defaultnumberqty"], $row1['qty']), $row1['uomcode'], $row1['itemtext']));
         }
         $pdf->text(100, $pdf->gety() + 5, 'Jakarta, ' . $row['dadate']);
         $pdf->text(10, $pdf->gety() + 10, 'Approved By');
         $pdf->text(100, $pdf->gety() + 10, 'Proposed By');
         $pdf->text(10, $pdf->gety() + 20, '------------ ');
         $pdf->text(100, $pdf->gety() + 20, '------------');
         $pdf->AddPage('P');
     }
     $pdf->Output();
 }
Пример #3
0
 $pdf->SetFont('helvetica', 'B', 14);
 $pdf->Ln(5);
 $pdf->Cell(195, 5, utf8_decode('CERTIFICADO DE HABILITACIÓN'), 0, FALSE, 'C');
 $pdf->Ln(4);
 $pdf->SetFont('helvetica', '', 10);
 $pdf->Cell(195, 5, utf8_decode('CODIGO: ') . $rs->id, 0, FALSE, 'C');
 $style = array('width' => 1, 'cap' => 'butt', 'join' => 'miter', 'dash' => '10, 20, 5, 10', 'phase' => 30, 'color' => array(255, 0, 0));
 $pdf->Line(15, 45, 195, 45, $style);
 $pdf->Ln(10);
 $pdf->SetWidths(array(60, 120));
 $pdf->SetAligns(array('L', 'L'));
 //$pdf->Row(array());
 $pdf->MultiCell(180, 5, utf8_decode("El presente documento certifica la habilitación del Consultor " . strtoupper($rs->nombre_completo) . ". para la participación en distintos proyectos dependientes de la Agencia Estatal de Vivienda, con todos los derechos y que ello conlleva."), 0, 'J');
 $pdf->Ln(10);
 $pdf->SetFont('helvetica', '', 8);
 $pdf->Row(array('NOMBRE DEL CONSULTOR', strtoupper($rs->nombre_completo)));
 $pdf->Row(array('CI', $rs->ci));
 $pdf->Row(array('PROFESION', $rs->profesion));
 $pdf->Row(array('PROCEDENCIA', $rs->procedencia));
 $pdf->Row(array('TELEFONO/CELULAR', $rs->telefonos . " / " . $rs->celular));
 $pdf->Row(array(utf8_decode('CORREO ELECTRÓNICO'), $rs->mail));
 $pdf->Row(array('FECHA DE REGISTRO', $rs->fecharegistro));
 $pdf->SetFont('helvetica', 'B', 8);
 $pdf->Cell(180, 12, utf8_decode('Toda la información ingresada en el presente registro tiene validez de DECLARACION JURADA y tendrá el tratamiento legal correspondiente.'), 0, FALSE, 'C');
 $pdf->Ln(20);
 $pdf->Cell(60);
 $pdf->Cell(60, 40, '', 1, FALSE, 'C');
 $pdf->Ln();
 $pdf->Cell(60);
 $pdf->Cell(60, 10, 'FIRMA Y SELLO TECNICO LEGAL', 1, FALSE, 'C');
 /*
 $pdf->PrintHeader();
 $pdf->SetFillColor(255, 255, 255);
 $pdf->SetFont('Times', '', 11);
 $q3 = mysql_query("select * from grade_history where grade_history_quarter = '{$reportid}' and grade_history_student='{$studentid}'");
 while ($r3 = mysql_fetch_array($q3)) {
     $q25 = mysql_query("select * from grade_subjects where grade_subject_id = {$r3['grade_history_subject']}");
     $r25 = mysql_fetch_array($q25);
     $info[0] = $r25['grade_subject_desc'];
     $q4 = mysql_query("select * from web_users where web_users_id = {$r3['grade_history_user']}");
     $r4 = mysql_fetch_array($q4);
     $info[1] = $r4['web_users_flname'];
     $info[2] = $r3['grade_history_grade'];
     $info[3] = $r3['grade_history_effort'];
     $info[4] = $r3['grade_history_conduct'];
     $info[5] = $r3['grade_history_notes'];
     $pdf->Row($info);
 }
 $pdf->SetLineWidth(2);
 $pdf->Rect(25, 25, 245, 130, '');
 if ($reportid > 1) {
     $pdf->AddPage();
     $pdf->SetFont('Times', 'IB', 16);
     $pdf->Write(1, $school);
     $pdf->SetFont('Times', '', 14);
     $pdf->Ln();
     $pdf->SetXY(30, 50);
     $pdf->Write(1, $name);
     $pdf->Ln();
     $pdf->SetXY(30, 55);
     $pdf->Write(1, $address1);
     $pdf->Ln();
 public function actionDownload()
 {
     parent::actionDownload();
     $pdf = new PDF();
     $pdf->title = 'Material Status List';
     $pdf->AddPage('P');
     $pdf->setFont('Arial', 'B', 12);
     // definisi font
     $pdf->setFont('Arial', 'B', 8);
     // menuliskan tabel
     $connection = Yii::app()->db;
     $sql = "select a.materialstatusname\r\n      from materialstatus a";
     $command = $connection->createCommand($sql);
     $dataReader = $command->queryAll();
     $pdf->setaligns(array('C', 'C'));
     $pdf->setwidths(array(50, 70));
     $pdf->Row(array('Material Status Name'));
     $pdf->setaligns(array('L', 'L'));
     foreach ($dataReader as $row1) {
         $pdf->row(array($row1['materialstatusname']));
     }
     // me-render ke browser
     $pdf->Output('materialstatus.pdf', 'D');
 }
Пример #6
0
$pdf->Cell(0, 3, utf8_decode("O.T. 916I - 2015"), 0, 1, 'R');
$pdf->Ln();
$pdf->SetTextColor(0);
$pdf->SetFont('Arial', 'B', 10);
$pdf->Cell(0, 5, utf8_decode('5. REFERENCIAS PARA LA EVALUACIÓN'), 0, 1, 'L');
$pdf->Ln();
$pdf->SetFont('Arial', '', 10);
$pdf->MultiCell(0, 5, utf8_decode("Con el propósito de evaluar los resultados de las mediciones practicadas a continuación se proporcionan los niveles mínimos de iluminación recomendados por la norma de referencia."), 0, 'J');
$pdf->Ln();
$pdf->SetFillColor(116, 144, 119);
$pdf->SetTextColor(255);
$pdf->SetWidths(array(70, 60, 35));
$pdf->SetFonts(array('B'));
$pdf->SetFontSizes(array(9));
$pdf->SetAligns(array('C', 'C', 'C'));
$pdf->Row(array(utf8_decode('TAREA VISUAL DEL PUESTO DE TRABAJO'), utf8_decode('AREA DE TRABAJO'), utf8_decode('NIVELES MÍNIMOS DE ILUMINACIÓN EN LUX')), true);
$valores = array(array('Tarea' => 'En exteriores: distinguir el área de tránsito, desplazarse caminando, vigilancia, movimiento de vehículo', 'Area' => 'Áreas generales, exteriores, patios y estacionamientos', 'Niveles' => '20'), array('Tarea' => 'En interiores distinguir el área de tránsito, desplazarse caminando, vigilancia, movimiento de vehículos', 'Area' => 'Áreas generales interiores: Almacenes de poco movimiento, pasillos, escaleras, estacionamientos cubiertos, labores en minas, iluminación de emergencia.', 'Niveles' => '50'), array('Tarea' => 'En interiores ', 'Area' => 'Áreas de circulación y pasillos; salas de espera; salas de descanso:;  cuartos de almacén;  plataformas; cuartos de calderas', 'Niveles' => '100'), array('Tarea' => 'Requerimiento visual simple: Inspección visual, recuento de piezas, trabajo en banco y máquina', 'Area' => 'Áreas de servicios al personal: Almacenaje rudo, recepción y despacho, casetas de vigilancia, cuartos de compresores y pailería', 'Niveles' => '200'), array('Tarea' => 'Distinción moderada de detalles: Ensamble simple, trabajo medio en banco y máquina, inspección simple, empaque y trabajo de oficina', 'Area' => 'Áreas de servicios al personal: Almacenaje rudo, recepción y despacho, casetas de vigilancia, cuartos de compresores y pailería', 'Niveles' => '300'), array('Tarea' => 'Distinción clara de detalles: maquinado y acabados delicados, ensamble inspección moderadamente difícil, captura y procesamiento de información, manejo de instrumentos y equipos de laboratorio', 'Area' => 'Talleres de precisión, salas de cómputo, áreas de dibujo, laboratorios', 'Niveles' => '500'), array('Tarea' => 'Distinción fina de detalles: Maquinado de precisión, ensamble e inspección de trabajos delicados, manejo de instrumentos y equipo de precisión, manejo de piezas pequeñas', 'Area' => 'Talleres de alta precisión: De pintura y acabado de superficies y laboratorios de control de calidad', 'Niveles' => '750'), array('Tarea' => 'Alta exactitud en la distinción de detalles: Ensamble, proceso e inspección de piezas pequeñas y complejas y acabado con pulidos finos', 'Area' => 'Áreas de proceso: Ensamble e inspección de piezas complejas y acabados con pulido fino', 'Niveles' => '1000'), array('Tarea' => 'Alto grado de especialización en la distinción de detalles ', 'Area' => 'Áreas de proceso de gran exactitud', 'Niveles' => '2000'));
$pdf->SetFonts(array(''));
$pdf->SetAligns(array('J', 'J', 'C'));
$pdf->SetFontSizes(array(8));
blanco($pdf);
foreach ($valores as $key => $value) {
    $pdf->noEnterRow(array(utf8_decode($value['Tarea']), utf8_decode($value['Area']), utf8_decode($value['Niveles'])));
}
$pdf->SetFont('Arial', '', 8);
$pdf->Cell(0, 5, utf8_decode('Tomado de la tabla 1 de la NOM-025-STPS-2008.'), 0, 1, 'L');
$pdf->Ln();
$pdf->SetFont('Arial', 'B', 8);
$pdf->MultiCell(0, 4, utf8_decode("Las áreas evaluadas fueron comparadas con 50 lux (Pasillos), 200 lux (Requerimiento visual simple) y 300 lux (Distinción moderada de detalles)."), 0, 'L');
$pdf->Ln();
/**************************************************************************************************/
Пример #7
0
		and b.id_usuario=u.id_usuario and b.id_tipo_maestro=t.id_maestro
		and b.bolborrado=0 and e.bolborrado=0 and m.bolborrado=0 and p.bolborrado=0 and u.bolborrado=0 and t.bolborrado=0 ORDER BY id_beneficiario ASC";
		
        $conn= new Conexion();
        $conn->abrirConexion();
		$conn->sql=$sql;
        $data=$conn->ejecutarSentencia(2);
		$fila_tabla=1;
				
		if ($data){
			for ($i= 0; $i < count($data); $i++){
				$pdf->SetFillColor(255,255,255);
                $pdf->SetTextColor(0);
                $pdf->SetFont('Arial','',5);
                $pdf->SetAligns(array('C', 'C','C', 'C', 'C', 'C','C', 'C', 'C', 'C', 'C', 'C', 'C', 'C','C','C','C','C'));
                $pdf->Row(array(utf8_decode(trim($data[$i]["dtmfecha_registro"])),utf8_decode(trim($data[$i]["estado"])), utf8_decode(trim($data[$i]["municipio"])), utf8_decode(trim($data[$i]["parroquia"])), $data[$i]["beneficiario"],utf8_decode(trim($data[$i]['strcedula'])),utf8_decode(trim($data[$i]["strtelefono"])),utf8_decode(trim($data[$i]['tipo']))));
			}
			$pdf->SetWidths(array(260));
			$pdf->SetAligns(array('R','R'));
			$pdf->SetFont('Arial','B',7);
			$pdf->Row(array('Total de Caficultores Registrados '.$i));
            $pdf->Output();
		}else{
            //echo "<script>alert('No existen registros para mostrar');window.close(this);</script>";
        }
        $conn->cerrarConexion();
		$pdf->Output();
?>

<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml">
Пример #8
0
    $pdf->Text(183, 88, utf8_decode(strtoupper($fila[15])), 0, 'C', 0);
    ///FECHA VENCIMIENTO (X,Y)
    $pdf->Ln(32);
}
///////////////
$pdf->SetFont('Arial', '', 8);
$pdf->SetWidths(array(20, 130, 30, 30));
$pdf->SetFillColor(85, 107, 47);
$sql = pg_query("select detalle_factura_venta.cantidad,productos.articulo,detalle_factura_venta.precio_venta,detalle_factura_venta.total_venta from factura_venta,detalle_factura_venta,productos where factura_venta.id_factura_venta=detalle_factura_venta.id_factura_venta and detalle_factura_venta.cod_productos=productos.cod_productos and detalle_factura_venta.id_factura_venta='{$_GET['id']}'");
$numfilas = pg_num_rows($sql);
for ($i = 0; $i < $numfilas; $i++) {
    $fila = pg_fetch_row($sql);
    $pdf->SetFont('Arial', '', 8);
    $pdf->SetFillColor(255, 255, 255);
    $pdf->SetTextColor(0);
    $pdf->Row(array(utf8_decode($fila[0]), utf8_decode($fila[1]), utf8_decode($fila[2]), utf8_decode($fila[3])));
}
$temp = '';
$temp1 = '';
$t = 180;
$prod = 0;
$cont_prod = 0;
$sql = pg_query("select * from factura_venta where id_factura_venta='{$_GET['id']}' and estado='Pasivo'");
if (pg_num_rows($sql)) {
    $anulado = 1;
} else {
    $sql = pg_query("select id_factura_venta from detalle_factura_venta where id_Factura_venta='{$_GET['id']}'");
    if (pg_num_rows($sql) <= 7) {
        $sql = pg_query("select cod_productos from detalle_factura_venta where id_factura_venta='{$_GET['id']}'");
        while ($row = pg_fetch_row($sql)) {
            $sql1 = pg_query("select * from serie_venta where id_factura_venta='{$_GET['id']}' and cod_productos='{$row['0']}'");
 public function actionDownload()
 {
     parent::actionDownload();
     $pdf = new PDF();
     $pdf->title = 'Material Group List';
     $pdf->AddPage('P');
     $pdf->setFont('Arial', 'B', 12);
     // definisi font
     $pdf->setFont('Arial', 'B', 8);
     // menuliskan tabel
     $connection = Yii::app()->db;
     $sql = "select a.materialgroupcode, a.description,\r\n      b.materialgroupcode as parentgroupcode,c.materialtypecode as materialtype\r\n      from materialgroup a\r\n      left join materialgroup b on b.materialgroupid = a.parentmatgroupid \r\n      left join materialtype c on c.materialtypeid = a.materialtypeid";
     $command = $connection->createCommand($sql);
     $dataReader = $command->queryAll();
     $pdf->setaligns(array('C', 'C', 'C', 'C'));
     $pdf->setwidths(array(30, 50, 30, 30));
     $pdf->Row(array('Code', 'Material Type', 'Description', 'Parent Group Code'));
     $pdf->setaligns(array('L', 'L', 'L', 'L'));
     foreach ($dataReader as $row1) {
         $pdf->row(array($row1['materialgroupcode'], $row1['description'], $row1['materialtype'], $row1['parentgroupcode']));
     }
     // me-render ke browser
     $pdf->Output('materialgroup.pdf', 'D');
 }
Пример #10
0
 $pdf->SetFont('helvetica', 'B', 14);
 $pdf->Ln(5);
 $pdf->Cell(195, 5, utf8_decode('CERTIFICADO DE HABILITACIÓN'), 0, FALSE, 'C');
 $pdf->Ln(4);
 $pdf->SetFont('helvetica', '', 10);
 $pdf->Cell(195, 5, utf8_decode('CODIGO: ') . $rs->pin_empresa, 0, FALSE, 'C');
 $style = array('width' => 1, 'cap' => 'butt', 'join' => 'miter', 'dash' => '10, 20, 5, 10', 'phase' => 30, 'color' => array(255, 0, 0));
 $pdf->Line(15, 45, 195, 45, $style);
 $pdf->Ln(10);
 $pdf->SetWidths(array(60, 120));
 $pdf->SetAligns(array('L', 'L'));
 //$pdf->Row(array());
 $pdf->MultiCell(180, 5, utf8_decode("El presente documento certifica la habilitación a la Empresa " . strtoupper($rs->nombre_proponente) . ". Representada por el Sr(a). " . strtoupper($rs->nombres_representante) . " " . strtoupper($rs->paterno_representante) . " " . strtoupper($rs->materno_representante) . " para la participación en distintos proyectos dependientes de la Agencia Estatal de Vivienda, con todos los derechos y que ello conlleva."), 0, 'J');
 $pdf->Ln(10);
 $pdf->SetFont('helvetica', '', 8);
 $pdf->Row(array('ENTIDAD EJECUTORA', strtoupper($rs->nombre_proponente)));
 $pdf->Row(array('NOMBRE DEL REPRESENTANTE LEGAL', strtoupper($rs->nombres_representante) . " " . strtoupper($rs->paterno_representante) . " " . strtoupper($rs->materno_representante)));
 $pdf->Row(array('NIT', $rs->nit));
 $pdf->Row(array('FUNDAEMPRESA', $rs->matricula));
 $pdf->Row(array('DOMICILIO LEGAL', $rs->direccion));
 $pdf->Row(array('TELEFONO/CELULAR', $rs->telefonos . " / " . $rs->celular));
 $pdf->Row(array(utf8_decode('CORREO ELECTRÓNICO'), $rs->mail));
 $pdf->Row(array('FECHA DE REGISTRO', $rs->fecharegistro));
 $pdf->SetFont('helvetica', 'B', 8);
 $pdf->Cell(180, 12, utf8_decode('Toda la información ingresada en el presente registro tiene validez de DECLARACION JURADA y tendrá el tratamiento legal correspondiente.'), 0, FALSE, 'C');
 $pdf->Ln(20);
 $pdf->Cell(60);
 $pdf->Cell(60, 40, '', 1, FALSE, 'C');
 $pdf->Ln();
 $pdf->Cell(60);
 $pdf->Cell(60, 10, 'FIRMA Y SELLO TECNICO LEGAL', 1, FALSE, 'C');
Пример #11
0
    $pdf->Text(20, 8, utf8_decode('' . strtoupper($fila[8])), 0, 'C', 0);
    ////CLIENTE (X,Y)
    $pdf->Text(2, 13, utf8_decode('' . "DIR.:"), 0, 'C', 0);
    ////CLIENTE (X,Y)
    $pdf->Text(20, 13, utf8_decode('' . strtoupper($fila[18])), 0, 'C', 0);
    ////CLIENTE (X,Y)
    $pdf->Text(2, 18, utf8_decode('' . "FECHA.:"), 0, 'C', 0);
    ////CLIENTE (X,Y)
    $pdf->Text(20, 18, utf8_decode('' . strtoupper($fila[13])), 0, 'C', 0);
    ////CLIENTE (X,Y)
    $pdf->Ln(10);
}
$pdf->SetX(2);
$pdf->SetWidths(array(10, 33, 15, 15));
$sql = pg_query("select detalle_factura_venta.cantidad,productos.articulo,detalle_factura_venta.precio_venta,detalle_factura_venta.total_venta from factura_venta,detalle_factura_venta,productos where factura_venta.id_factura_venta=detalle_factura_venta.id_factura_venta and detalle_factura_venta.cod_productos=productos.cod_productos and detalle_factura_venta.id_factura_venta='{$_GET['id']}'");
$pdf->Row(array("Cant", utf8_decode("Descripción"), "Pre. Uni", "Pre. Tot"));
while ($fila = pg_fetch_row($sql)) {
    $pdf->SetX(2);
    $pdf->SetFont('Arial', '', 9);
    $descripcion = utf8_decode($fila[1]);
    if (strlen($descripcion) > 20) {
        $descripcion = substr($descripcion, 0, 15);
    }
    $pdf->SetX(2);
    $pdf->Row(array(utf8_decode($fila[0]), $descripcion, utf8_decode($fila[2]), utf8_decode($fila[3])));
}
$pdf->SetY(115);
$sql = pg_query("select tarifa0,tarifa12,iva_venta,descuento_venta,total_venta from factura_venta where id_factura_venta= '{$_GET['id']}'");
$sub0 = 0;
$sub12 = 0;
$iva = 0;
     case "fr":
         $pdf->SetWidths(array(10, 44, 61, 17, 26, 22));
         break;
     case "es":
         $pdf->SetWidths(array(16, 39, 60, 17, 26, 22));
         break;
     default:
         $pdf->SetWidths(array(12, 36, 67, 17, 26, 22));
         break;
 }
 $this->subtotal_left_margin = 143;
 srand(microtime() * 1000000);
 $pdf->SetAligns(array("R", "L", "L", "R", "R", "R"));
 $total_rows = count($pdfdata['data']);
 $pdf->SetFont('Arial', '', 9);
 $pdf->Row(array(utf8_decode(ucfirst($this->pi_getLL('qty'))), utf8_decode(ucfirst($this->pi_getLL('products_model'))), utf8_decode(ucfirst($this->pi_getLL('products_name'))), utf8_decode(ucfirst($this->pi_getLL('vat'))), utf8_decode(ucfirst($this->pi_getLL('normal_price'))), utf8_decode(ucfirst($this->pi_getLL('total')))), 1);
 for ($i = 0; $i < $total_rows; $i++) {
     $pdf->Row(array(utf8_decode($pdfdata['data'][$i][0]), utf8_decode($pdfdata['data'][$i][1]), utf8_decode($pdfdata['data'][$i][2]), $pdfdata['data'][$i][3], $pdfdata['data'][$i][4], $pdfdata['data'][$i][5]));
 }
 $pdf->Ln(5);
 // data table
 // total
 $array = array();
 $array[] = array($this->pi_getLL('subtotal'), $pdfdata['subtotal']);
 if ($pdfdata['shipping_method_costs']) {
     $array[] = array(utf8_decode($this->pi_getLL('shipping_costs')), $pdfdata['shipping_method_costs']);
 }
 if ($pdfdata['payment_method_costs']) {
     $array[] = array(utf8_decode($this->pi_getLL('payment_costs')), $pdfdata['payment_method_costs']);
 }
 if ($pdfdata['discount']) {
Пример #13
0
//HERMANOS POR PARTE DE MADRE
$datos_hpm = array();
if (count($list_hpm) > 0) {
    $datos_hpm = $list_hpm;
}
$datos_hp = array();
if (count($list_hp) > 0) {
    $datos_hp = $list_hp;
}
$datos_hm = array();
if (count($list_hm) > 0) {
    $datos_hm = $list_hm;
}
$salto = 5;
for ($i = 0; $i < 1; $i++) {
    $pdf->Row(array(utf8_decode('FORMULARIO DE ADMISION:')));
}
$pdf->SetWidths(array(90, 90));
$pdf->SetFont($family, 'B', 8);
$pdf->SetFillColor(1, 137, 105);
$pdf->SetTextColor(255);
$numfilas = 1;
for ($i = 0; $i < $numfilas; $i++) {
    $pdf->SetFont($family, '', 10);
    $pdf->SetFillColor(255, 255, 255);
    $pdf->SetTextColor(0);
    $pdf->Row(array('Actualmente Socio', $form_admision['actualmente_socio']));
}
$pdf->Ln($salto);
//######################################################################
// IDENTIFICACION DEL ESTUDIANTE
Пример #14
0
$f = $_GET['f'];
$m = $_GET['m'];
$o = $_GET['o'];
$pdf = new PDF('L', 'mm', 'Letter');
$pdf->Open();
$pdf->AddPage();
$pdf->SetMargins(20, 20, 20);
$pdf->SetFont('Arial', '', 8);
$pdf->SetTextColor(220, 50, 50);
$pdf->cell(222, -10, 'Receta No [' . $id . ' ]', 0, 0, 'C');
$pdf->Ln(1);
$pdf->SetWidths(array(150, 90));
$pdf->SetFont('Arial', '', 10);
$pdf->SetFillColor(255, 255, 255);
$pdf->SetTextColor(2);
$pdf->Row(array('Paciente : _' . $p, 'Fecha : _' . $f), 0);
$pdf->Ln(5);
$pdf->SetTextColor(0);
$pdf->Cell(0, 3, 'Medicamento: ', 0, 1);
$pdf->Write(6, "____________________________________________________________________________________________________________________");
$pdf->Ln(8);
$miarreglo = $m;
$renglon = explode('<br />', $miarreglo);
$i = 0;
while ($i <= 10) {
    $pdf->Write(7, $renglon[$i]);
    // porción1
    $pdf->Ln();
    $i++;
}
$pdf->Cell(0, 6, 'Observaciones: ', 0, 1);
 public function actionDownload()
 {
     parent::actionDownload();
     $pdf = new PDF();
     $pdf->title = 'Asset List';
     $pdf->AddPage('L');
     $pdf->setFont('Arial', 'B', 12);
     // definisi font
     $pdf->setFont('Arial', 'B', 8);
     // menuliskan tabel
     $connection = Yii::app()->db;
     $sql = "select b.productname,c.sloccode,a.expiredate,a.serialno,a.qty,d.uomcode,a.buydate,\r\n      a.buyprice,e.currencyname,a.picproduct,a.location,a.locationdate\r\n      from productdetail a\r\n      left join product b on b.productid = a.productid\r\n      left join sloc c on c.slocid = a.slocid\r\n      left join unitofmeasure d on d.unitofmeasureid = a.unitofmeasureid\r\n      left join currency e on e.currencyid = a.currencyid";
     $command = $connection->createCommand($sql);
     $dataReader = $command->queryAll();
     $pdf->setaligns(array('C', 'C', 'C', 'C', 'C', 'C', 'C', 'C', 'C', 'C', 'C', 'C'));
     $pdf->setwidths(array(50, 20, 20, 20, 20, 20, 20, 20, 20, 20, 20, 20));
     $pdf->Row(array('Material Name', 'Sloc', 'Expire Date', 'Serial No', 'Qty', 'UOM Code', 'Buy Date', 'Buy Price', 'Currency', 'PIC Product', 'Location', 'Loc Date'));
     $pdf->setaligns(array('L', 'L', 'L', 'L', 'L', 'L', 'L', 'L', 'L', 'L', 'L', 'L'));
     foreach ($dataReader as $row1) {
         $pdf->row(array($row1['productname'], $row1['sloccode'], $row1['expiredate'], $row1['serialno'], $row1['qty'], $row1['uomcode'], $row1['buydate'], $row1['buyprice'], $row1['currencyname'], $row1['picproduct'], $row1['location'], $row1['locationdate']));
     }
     // me-render ke browser
     $pdf->Output('productdetail.pdf', 'D');
 }
Пример #16
0
 $pdf->SetMargins(20, 20, 20);
 $pdf->Ln(10);
 //    $pdf->SetFont('Arial','',12);
 //    $pdf->Cell(0,6,'Clave: '.$fila['idViajero'],0,1);
 // $pdf->Cell(0,6,'Nombre: '.$fila['Nombre'].' '.$fila['Direccion'].' '.$fila['Telefono'],0,1);
 // $pdf->Cell(0,6,'Sexo: '.$fila['Correo'],0,1);
 // $pdf->Cell(0,6,'Domicilio: '.$fila['Correo'],0,1);
 // $pdf->Ln(10);
 $pdf->SetWidths(array(15, 55, 60, 40, 35, 35, 18));
 $pdf->SetFont('Arial', 'B', 10);
 $pdf->SetFillColor(85, 107, 47);
 $pdf->SetTextColor(255);
 $pdf->SetY(20);
 $pdf->setX(5);
 for ($i = 0; $i < 1; $i++) {
     $pdf->Row(array('Folio', 'Cliente', 'Vendedor', 'Fecha de Compra', 'Importe', 'Neto', 'Tipo'));
 }
 // $strConsulta  = "SELECT * FROM venta WHERE (`EstatusP`= 'Cerrado') AND (`FechaCompra` BETWEEN '$fecha' AND '$fechaFinal')";
 $strConsulta = "SELECT \n\t\tFolioPago as Folio,\n\t\tCantPago as Importe,\n\t\tFechaExpedicion as Fecha,\n\t\t`usuarios`.`nombre` as Vendedor,\n\t\t`cliente`.`nombre` as Cliente,\n\t\t`pagov`.`Tipo`,\n\t\tNeto\n\n\t\tFROM pagov\n\t\tLEFT JOIN venta ON (`pagov`.`FolioVenta` = `Venta`.`FolioVta`) \n\t\tLEFT JOIN usuarios ON (`venta`.`IdUsuario` = `usuarios`.`idUsuario`) \n\t\tleft join cliente on (`venta`.`idViajero`=`cliente`.`idViajero`)\n\t\tORDER BY FechaCompra DESC";
 $historial = mysql_query($strConsulta);
 $numfilas = mysql_num_rows($historial);
 for ($i = 0; $i < $numfilas; $i++) {
     $fila = mysql_fetch_array($historial);
     $pdf->SetFont('Arial', '', 10);
     $pdf->SetX(5);
     if ($i % 2 == 1) {
         $pdf->SetFillColor(153, 255, 153);
         $pdf->SetTextColor(0);
         $pdf->Row(array($fila['Folio'], utf8_decode($fila['Cliente']), utf8_decode($fila['Vendedor']), $fila['Fecha'], $fila['Importe'], $fila['Neto'], $fila['Tipo']));
     } else {
         $pdf->SetFillColor(102, 204, 51);
 public function actionDownload()
 {
     parent::actionDownload();
     $pdf = new PDF();
     $pdf->title = 'Schedule Master List';
     $pdf->AddPage('P');
     $pdf->setFont('Arial', 'B', 12);
     // definisi font
     $pdf->setFont('Arial', 'B', 8);
     // menuliskan tabel
     $connection = Yii::app()->db;
     $sql = "select a.employeestatusname, a.taxvalue\r\n      from employeestatus a";
     $command = $connection->createCommand($sql);
     $dataReader = $command->queryAll();
     $pdf->setaligns(array('C', 'C', 'C', 'C'));
     $pdf->setwidths(array(50, 30, 30, 30));
     $pdf->Row(array('Employee Status', 'Tax Value'));
     $pdf->setaligns(array('L', 'R', 'C', 'C'));
     foreach ($dataReader as $row1) {
         $pdf->row(array($row1['employeestatusname'], $row1['taxvalue']));
     }
     // me-render ke browser
     $pdf->Output('employeestatus.pdf', 'D');
 }
Пример #18
0
            }
        }
        return $nl;
    }
}
$pdf = new PDF("P", "mm", "a5");
$pdf->AddPage();
$pdf->SetFont('Arial', '', 10);
//Table with 20 rows and 4 columns
$pdf->SetWidths(array(24, 90, 16, 40));
srand(microtime() * 1000000);
$subtotal = 0;
for ($i = 0; $i < count($_SESSION["basket"]); $i++) {
    $quantity = $_SESSION["basket"][$i]["quantity"];
    $price = $_SESSION["basket"][$i]["Item"]->Price;
    $pdf->Row(array($quantity . "x", $_SESSION["basket"][$i]["Item"]->Name . ": " . $_SESSION["basket"][$i]["Item"]->Description, $price * $quantity));
    $subtotal += $price * $quantity;
}
$pdf->SetFont('Arial', 'B', 12);
$pdf->MultiCell(130, 10, " Subtotal    " . iconv("UTF-8", "ISO-8859-1", "£") . $subtotal, 0, "R");
$pdf->SetFont('Arial', '', 10);
$pdf->line(10, $pdf->GetY(), 140, $pdf->GetY());
$pdf->MultiCell(130, 5, "Note: Please make sure my food is not spicy!", 0, "L");
$pdf->Ln();
$pdf->MultiCell(60, 5, "Customer Info:", 0, "L");
$pdf->MultiCell(60, 5, "Saber Hamidi", 0, "L");
$pdf->MultiCell(60, 5, "100 Ourwebsite Road", 0, "L");
$pdf->MultiCell(60, 5, "Southampton", 0, "L");
$pdf->MultiCell(60, 5, "SO15 3FF", 0, "L");
$pdf->Ln();
$pdf->MultiCell(60, 5, "Tell: 07788998764", 0, "L");
 public function actionDownload()
 {
     parent::actionDownload();
     $pdf = new PDF();
     $pdf->title = 'Storage Location List';
     $pdf->AddPage('P');
     $pdf->setFont('Arial', 'B', 12);
     // definisi font
     $pdf->setFont('Arial', 'B', 8);
     // menuliskan tabel
     $connection = Yii::app()->db;
     $sql = "select b.plantcode, a.sloccode, a.description\r\n      from sloc a\r\n      left join plant b on b.plantid = a.plantid";
     $command = $connection->createCommand($sql);
     $dataReader = $command->queryAll();
     $pdf->setaligns(array('C', 'C', 'C', 'C'));
     $pdf->setwidths(array(30, 30, 70));
     $pdf->Row(array('Plant', 'Sloc Code', 'Description'));
     $pdf->setaligns(array('L', 'L', 'L'));
     foreach ($dataReader as $row1) {
         $pdf->row(array($row1['plantcode'], $row1['sloccode'], $row1['description']));
     }
     // me-render ke browser
     $pdf->Output('sloc.pdf', 'D');
 }
Пример #20
0
 $fechaanalisis = $orden['fechani'];
 if (!is_null($orden['fechanf'])) {
     $fechaanalisis .= ' al ' . date('d', strtotime($orden['fechanf']));
 }
 $pdf->Cell(0, 5, utf8_decode('LAPSO DE ANALISIS: ' . $fechaanalisis), 0, 1, 'C');
 $pdf->Cell(0, 5, utf8_decode('FECHA DE INFORME: ' . $orden['fechainforme']), 0, 1, 'C');
 $pdf->Ln(10);
 if ($gya) {
     $pdf->Cell(100, 5, utf8_decode('Parámetro: ' . $gya[0]['parametro']), 0, 0);
     $pdf->Cell(0, 5, utf8_decode('Método: ' . $gya[0]['metodo']), 0, 1, 'R');
     $pdf->SetFillColor(200);
     $pdf->SetWidths(array(20, 45, 40, 45, 15));
     $pdf->SetAligns(array('C'));
     $pdf->SetFonts(array('B'));
     $pdf->SetFontSizes(array(9));
     $pdf->Row(array('No. Mtra.', utf8_decode('Identificación'), 'Unidad', 'Resultado', 'M.C.'));
     $pdf->SetFillColor(255);
     $pdf->SetFonts(array(''));
     $pdf->SetAligns(array('C', 'L', 'C', 'C', 'C'));
     foreach ($gya as $key => $value) {
         $pdf->Row(array($value['muestranum'], utf8_decode($value['identificacion']), $value['unidades'], utf8_decode($value['resultado']), $value['LC']));
     }
     $pdf->Ln(10);
 }
 if ($coliformes) {
     $pdf->Cell(100, 5, utf8_decode('Parámetro: ' . $coliformes[0]['parametro']), 0, 0);
     $pdf->Cell(0, 5, utf8_decode('Método: ' . $coliformes[0]['metodo']), 0, 1, 'R');
     $pdf->SetFillColor(200);
     $pdf->SetWidths(array(20, 45, 40, 45, 15));
     $pdf->SetAligns(array('C'));
     $pdf->SetFonts(array('B'));
 public function actionDownload()
 {
     parent::actionDownload();
     $pdf = new PDF();
     $pdf->title = 'Employee Informal List';
     $pdf->AddPage('P');
     $sql1 = "select splettername, description, validperiod\r\n      from splettertype a";
     $pdf->setFont('Arial', 'B', 8);
     $connection = Yii::app()->db;
     $command1 = $connection->createCommand($sql1);
     $dataReader1 = $command1->queryAll();
     $pdf->text(10, 40, 'Course / Trainig / skill List');
     $pdf->SetY(45);
     $pdf->setaligns(array('C', 'C', 'C'));
     $pdf->setwidths(array(50, 40, 30));
     $pdf->Row(array('SP Letter Name', 'Description', 'Period'));
     $pdf->setaligns(array('L', 'L', 'L'));
     foreach ($dataReader1 as $row1) {
         $pdf->row(array($row1['splettername'], $row1['description'], $row1['validperiod']));
     }
     // me-render ke browser
     $pdf->Output('splettertype.pdf', 'D');
 }
	
	$pdf = new PDF('L','mm','A4');
	$pdf->AliasNbPages();	
	$titulos = array('GUIA','DESTINATARIO','DIRECCION','RECIBE','PAGADO','COBRAR','CREDITO');
	$medidas = array(23,90,80,25,20,20,20);
	
	//Carga de datos
	$pdf->SetFont('Arial','B',10);	
	$pdf->AddPage();	

	$pdf->SetWidths($medidas);
	$pdf->SetFont('Arial','B',6);	
	$pdf->Titulos($titulos,$medidas);
	$pdf->SetFont('Arial','B',6);
	for($i=0;$i<count($data);$i++){
		$pdf->Row($data[$i]);
	}
	
	$pdf->addLeyenda("TOTAL GUIAS A REPARTIR: ".$total."",170,10);
	$pdf->addLeyenda("RECIBI:_______________________________",175,10);
	$pdf->addLeyenda("CHOFERES: ".$fr->conductor1."",180,10);
	$pdf->addLeyenda("UNIDAD: ".$fr->unidad."",185,10);
	$pdf->addLeyenda("GUIAS DEVUELTAS:_____",180,150);
	$pdf->addLeyenda("ENCARGADO DE ALMACEN:_______________________________",185,150);
	$pdf->addLeyenda2("TOTAL:",160,226);
	$pdf->addLeyenda2("$".number_format($tpagado,2,'.',','),160,236);
	$pdf->addLeyenda2("$".number_format($tcobrar,2,'.',','),160,256);
	$pdf->addLeyenda2("$".number_format($tcredito,2,'.',','),160,276);
	
	$pdf->Output();
?>
Пример #23
0
 $pdf->Open();
 $pdf->AddPage();
 $pdf->setY(10);
 $pdf->setX(100);
 $pdf->Cell(60, 8, "Rooming List Correspondiente a: ", 0, 1);
 $pdf->setX(120);
 $pdf->Cell(60, 8, "Grupo " . utf8_decode($NombreGrupo) . " al " . utf8_decode($nombreHotel) . " del " . $FechaIn . " al " . $FechaOut, 0, 0);
 $pdf->SetMargins(20, 20, 20);
 $pdf->Ln(10);
 $pdf->setX(8);
 $pdf->SetWidths(array(8, 80, 15, 20, 20, 15, 75, 50));
 $pdf->SetFont('Arial', 'B', 8);
 $pdf->SetFillColor(85, 107, 47);
 $pdf->SetTextColor(255);
 for ($i = 0; $i < 1; $i++) {
     $pdf->Row(array('Hab', 'Pasajeros', 'TipoHab', 'Entrada', 'Salida', 'Adultos', 'Menores', 'Observaciones'));
 }
 $strConsulta = "SELECT \n\tNumeroHab as Hab,\n\t NombreTitular as Pasajeros,\n\t  NombreA as NombreA,\n\t   Menores as Menores,\n\t    Observaciones as Observaciones,\n\t     TipoHab as TipoHab,\n\t     EdadesMenores as Edades,\n\t    \tcantAdultos as Adultos,\n\t    \t`ventagrupo`.`FechaIn` as Entrada,\n\t    \t`ventagrupo`.`FechaOut` as Salida\n\t       FROM cuponesgrupo LEFT JOIN ventagrupo ON `cuponesgrupo`.`FolioGrupoC` = `ventagrupo`.`FolioGrupo`\n\t\twhere FolioGrupoC = '{$FolioGrupo}'";
 $historial = mysql_query($strConsulta) or die(mysql_error());
 $numfilas = mysql_num_rows($historial);
 for ($i = 0; $i < $numfilas; $i++) {
     $fila = mysql_fetch_array($historial);
     $pdf->SetFont('Arial', '', 8);
     $pdf->setX(8);
     if ($i % 2 == 1) {
         $pdf->SetFillColor(153, 255, 153);
         $pdf->SetTextColor(0);
         $pdf->Row(array($fila['Hab'], utf8_decode($fila['Pasajeros'] . "/" . $fila['NombreA']), utf8_decode($fila['TipoHab']), utf8_decode($fila['Entrada']), utf8_decode($fila['Salida']), utf8_decode($fila['Adultos']), utf8_decode($fila['Menores'] . " / " . $fila['Edades']), utf8_decode($fila['Observaciones'])));
     } else {
         $pdf->SetFillColor(102, 204, 51);
         $pdf->SetTextColor(0);
Пример #24
0
$pdf->SetFont('Arial', '', 8);
$pdf->SetTextColor(220, 50, 50);
$pdf->cell(222, -10, 'Recibo No [' . $id . ' ]', 0, 0, 'C');
$pdf->Ln(1);
$pdf->SetFont('Arial', '', 10);
//$pdf->SetWidths(array(150, 90));
//$pdf->SetFillColor(255,255,255);
$pdf->SetTextColor(2);
//$pdf->Row(array('Comprador:'.$p , 'Fecha: '.$f), 0);
$pdf->Cell(0, 6, 'Atendio: ', 0, 1);
$pdf->Cell(0, 6, 'Fecha: ', 0, 1);
$pdf->Cell(0, 6, 'Comprador: ', 0, 1);
$pdf->Ln(2);
$pdf->SetFont('Arial', '', 10);
$pdf->SetWidths(array(100, 20, 30, 30));
$pdf->SetFillColor(255, 255, 255);
$pdf->SetTextColor(2);
$pdf->Row(array('Descripcion', ' Cantidad', 'Precio Unit', 'Precio'), 0);
$pdf->Row(array('', ' ', ' ', ''), 0);
$pdf->Row(array('', ' ', ' Total_', ''), 0);
//$miarreglo = $m;
//error con los
//$miarreglo = explode (' ',$miarreglo);
//$pdf->Cell(0,50, $m,1,1);
//$pdf->Ln(5);
//$pdf->Cell(0,6, 'Observaciones: ',0,1);
//$pdf->Cell(0,50, $o,1,1);
//$pdf->Cell(0,6, $miarreglo[1],0,1);
//$pdf->Cell(0,6, $miarreglo[2],0,1);
$pdf->Output();
//mysql_close($strConsulta);
 public function actionDownload()
 {
     parent::actionDownload();
     $pdf = new PDF();
     $pdf->title = 'Schedule Master List';
     $pdf->AddPage('P');
     $pdf->setFont('Arial', 'B', 12);
     // definisi font
     $pdf->setFont('Arial', 'B', 8);
     // menuliskan tabel
     $connection = Yii::app()->db;
     $sql = "select a.onleavename, a.cutimax,a.cutistart,b.formatdoc,c.shortstat\r\n      from onleavetype a\r\n      left join snro b on b.snroid = a.snroid\r\n      left join absstatus c on c.absstatusid = a.absstatusid";
     $command = $connection->createCommand($sql);
     $dataReader = $command->queryAll();
     $pdf->setaligns(array('C', 'C', 'C', 'C', 'C'));
     $pdf->setwidths(array(50, 20, 20, 50, 20));
     $pdf->Row(array('Onleave', 'Cuti Max', 'Cuti Start', 'Format Doc', 'Cuti Status'));
     $pdf->setaligns(array('L', 'L', 'L', 'L', 'L'));
     foreach ($dataReader as $row1) {
         $pdf->row(array($row1['onleavename'], $row1['cutimax'], $row1['cutistart'], $row1['formatdoc'], $row1['shortstat']));
     }
     // me-render ke browser
     $pdf->Output('onleavetype.pdf', 'D');
 }
Пример #26
0
    $prod4 = array_shift($prod4);
    $prodtipo = $productotipo->MostrarRegistro($o['CodProductoTipo']);
    $prodtipo = array_shift($prodtipo);
    $TotalBs = number_format($o['TotalBs'], 2, ".", "");
    $ACuentaBs = number_format($o['ACuentaBs'], 2, ".", "");
    $ACuentaSus = number_format($o['ACuentaSus'], 2, ".", "");
    $SaldoBs = number_format($o['SaldoBs'], 2, ".", "");
    $DescuentoBs = number_format($o['DescuentoBs'], 2, ".", "");
    $CobrarBs = number_format($o['CobrarBs'], 2, ".", "");
    $TTotalBs += $TotalBs;
    $TACuentaBs += $ACuentaBs;
    $TACuentaSus += $ACuentaSus;
    $TSaldoBs += $SaldoBs;
    $TDescuentoBs += $DescuentoBs;
    $TCobrarBs += $CobrarBs;
    $datos = array($o['NumeroBoleta'], fecha2Str($o['FechaEmitido']) . " " . $o['HoraEmitido'], utf8_decode(mb_strtoupper($pac['Paterno'] . " " . $pac['Materno'] . " " . $pac['Nombres'], "utf8")), utf8_decode(mb_strtoupper($prod1['Nombre'] . " - " . $o['Detalle1'], "utf8")), utf8_decode(mb_strtoupper($prod2['Nombre'] . " - " . $o['Detalle2'], "utf8")), utf8_decode(mb_strtoupper($prod3['Nombre'] . " - " . $o['Detalle3'], "utf8")), utf8_decode(mb_strtoupper($prod4['Nombre'] . " - " . $o['Detalle4'], "utf8")), $TotalBs, $ACuentaBs, $ACuentaSus, $SaldoBs, utf8_decode(mb_strtoupper($o['Observaciones'], "utf8")));
    $pdf->Row($datos);
}
$TTotalBs = number_format($TTotalBs, 2, ".", "");
$TACuentaBs = number_format($TACuentaBs, 2, ".", "");
$TACuentaSus = number_format($TACuentaSus, 2, ".", "");
$TSaldoBs = number_format($TSaldoBs, 2, ".", "");
$TDescuentoBs = number_format($TDescuentoBs, 2, ".", "");
$TCobrarBs = number_format($TCobrarBs, 2, ".", "");
$pdf->Fuente("B", 9);
$pdf->CuadroCuerpo(165, "Total", 0, "R", 0, 9, "B");
$pdf->CuadroCuerpo(15, $TTotalBs, 1, "R", 1, 9, "B");
$pdf->CuadroCuerpo(15, $TACuentaBs, 1, "R", 1, 9, "B");
$pdf->CuadroCuerpo(15, $TACuentaSus, 1, "R", 1, 9, "B");
$pdf->CuadroCuerpo(15, $TSaldoBs, 1, "R", 1, 9, "B");
$pdf->Output("Reporte.pdf", "I");
Пример #27
0
 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());
 }
Пример #28
0
                        }
                    }
                }
            }
            $pdf->SetWidths(array($vwidth_array[0] + $vwidth_array[1]));
            $info = trim($info);
            $info = preg_replace("/^\\s*/", "", $info);
            $info = preg_replace("/\n{2,}/", "\n", $info);
            $info = preg_replace("/^/m", "\t\t\t\t\t", $info);
            if (!is_null($links_to_vulns[$hostIP_ctx][$r2n[$risk]])) {
                $link = $links_to_vulns[$hostIP_ctx][$r2n[$risk]];
                unset($links_to_vulns[$hostIP_ctx][$r2n[$risk]]);
            } else {
                $link = null;
            }
            $pdf->Row(array(_($risk) . ":\n\n" . $info), $link);
        }
    }
    $pdf->Ln();
}
$output_name = "ScanResult_" . $scanyear . $scanmonth . $scanday . "_" . str_replace(" ", "", $job_name) . ".pdf";
$pdf->Output($output_name, "I");
//matches risks number with colors
function getriskcolor($risk)
{
    switch ($risk) {
        case 1:
            $risk = array(200, 53, 237);
            //$risk=array(255,0,0);
            break;
        case 2:
Пример #29
0
 private function imprimirregistronotas()
 {
     $Notas = $this->seguimientos_model->TraeCalificaciones();
     $this->load->library('fpdf/pdf');
     $pdf = new PDF();
     $pdf->AddPage();
     $pdf->Image(base_url('public/images/logo.jpg'), 10, 15, 60, 15);
     $pdf->SetFont('Arial', 'B', 10);
     #ENCABEZADO
     //$pdf->SetXY(10,35);
     $pdf->Text(180, 35, 'D0-68-F');
     $pdf->Text(85, 40, 'FORMATO REGISTRO DE NOTAS');
     $pdf->Text(80, 50, 'FUNDACIÓN UNIVERSITARIA MARÍA CANO');
     $pdf->Text(83, 55, 'PROGRAMA: ' . Ucspecial(strtoupper($this->input->post('PROGRAMA'))));
     $pdf->Text(10, 66, 'MOMENTO EVALUATIVO: PRIMER Y SEGUNDO MOMENTO');
     $pdf->Text(150, 66, 'FECHA: ' . FechaFormal(date('Y-m-d'), false));
     $pdf->Text(10, 73, 'ASESOR: ' . Ucspecial($this->session->userdata('NOMBRE_USUARIO')));
     $pdf->SetFont('Arial', 'B', 9);
     #Headers
     $pdf->SetXY(5, 82);
     $pdf->Cell(50, 8, 'NOMBRES Y APELLIDOS', 1, 0, 'C');
     $pdf->SetXY(55, 82);
     $pdf->Cell(30, 8, 'CÓDIGO', 1, 0, 'C');
     $pdf->SetXY(85, 82);
     $pdf->Cell(30, 8, 'NIVEL PRÁCTICA', 1, 0, 'C');
     $pdf->SetXY(115, 82);
     $pdf->Cell(45, 8, 'AGENCIA PRÁCTICA', 1, 0, 'C');
     $pdf->SetXY(160, 82);
     $pdf->Cell(15, 8, 'NOTA 1', 1, 0, 'C');
     $pdf->SetXY(175, 82);
     $pdf->Cell(15, 8, 'NOTA 2', 1, 0, 'C');
     $pdf->SetXY(190, 82);
     $pdf->Cell(15, 8, 'DEF', 1, 0, 'C');
     $pdf->SetWidths([50, 30, 30, 45, 15, 15, 15]);
     $pdf->SetAligns(['C', 'C', 'C', 'C', 'C', 'C', 'C']);
     $pdf->SetFont('Arial', '', 9);
     $pdf->SetXY(5, 90);
     foreach ($Notas as $nota) {
         $pdf->SetX(5);
         $pdf->Row([utf8_encode($nota['NOMBRE_PRACTICANTE']), $nota['CODIGO'], utf8_encode($nota['MODALIDAD']), utf8_encode($nota['NOMBRE_AGENCIA']), $nota['NOTA1'], $nota['NOTA2'], number_format(($nota['NOTA1'] + $nota['NOTA2']) / 2, 1)]);
     }
     $pdf->SetFont('Arial', 'B', 9);
     #Footer
     $pdf->Text(12, $pdf->GetY() + 20, 'FIRMA DOCENTE:');
     $pdf->Line(132, $pdf->GetY() + 20, 42, $pdf->GetY() + 20);
     $pdf->Text(135, $pdf->GetY() + 20, 'CENTRO DE PRÁCTICAS');
     $pdf->SetFont('Arial', 'B', 10);
     $pdf->Output();
     $pdf->Cell($pdf->PageNo());
 }