Exemple #1
0
/*  $pdf->SetFont('Arial','B',10);
  $pdf->Cell(200,5,' ',0,1,'C');
   $pdf->Cell(200,5,'CONCURSO ARTE JOVEN 2014',0,1,'C');
  $pdf->ln(10);	  */
$pdf->SetFont('Arial', 'B', 10);
$rs = mysql_query($ejec, $con);
$tot = 0;
$pdf->SetFont('Arial', '', 8);
$espe = 'x';
/*   $pdf->SetWidths(array(8,40,15,65,40,30,75));
 $pdf->SetAligns(array('L','L','L','L','L','L','L'));
 $pdf->Row(array("Insc.","Nombre","DNI","Contacto","Titulo","Tamaño(alto-ancho)","Procedimiento"));*/
while ($row = mysql_fetch_assoc($rs)) {
    if ($espe != substr($row["especialidad"], 0, 1)) {
        if ($tot != 0) {
            $pdf->Cell(200, 5, '  ' . $tot, 0, 1);
            $tot = 0;
        }
        $pdf->Cell(200, 5, $row["especialidad"], 0, 1, 'C');
        $pdf->SetFont('Arial', 'B', 8);
        $pdf->SetWidths(array(8, 40, 15, 65, 40, 30, 75));
        $pdf->SetAligns(array('L', 'L', 'L', 'L', 'L', 'L', 'L'));
        $pdf->Row(array("Insc", "Nombre", "DNI", "Contacto", "Titulo", "Tamaño(alto-ancho)", "Procedimiento"));
        $pdf->SetFont('Arial', '', 8);
    }
    $espe = substr($row["especialidad"], 0, 1);
    $pdf->Row(array($row["nro"], substr($row["nombre"], 0, 23), $row["nro_documento"], $row['domicilio'] . ' ' . $row['localidad'] . ' CP:' . $row['cp'] . '  Tel:' . $row['telefono'] . '  ' . $row['correo_electronico'], $row["titulo"], $row['dimension_al'] . 'cm -' . $row['dimension_an'] . ' cm', ltrim($row["procedimiento"])));
    $tot = $tot + 1;
}
if ($tot != 0) {
    $pdf->Cell(200, 5, '  ' . $tot, 0, 1);
Exemple #2
0
 function reporteInventario()
 {
     $reporte = $this->AutoLoadModel('reporte');
     $actor = $this->AutoLoadModel('actor');
     $idInventario = $_REQUEST['lstInventario'];
     $idBloque = $_REQUEST['lstBloques'];
     $idProducto = $_REQUEST['idProducto'];
     $data = $reporte->reporteInventario($idInventario, $idBloque, $idProducto);
     $cantidadData = count($data);
     $pdf = new PDF_Mc_Table("L", "mm", "A4");
     $titulos = array(utf8_decode('N°'), 'Codigo', 'Descripcion', 'Bueno', 'Mala', 'Servicio', 'S.Room', 'Total', 'Stock', 'Dif', 'Precio');
     $ancho = array(10, 32, 113, 15, 15, 15, 15, 15, 15, 15, 15);
     $orientacion = array('C', '', '', 'C', 'C', 'C', 'C', 'C', 'C', 'C', 'R');
     $pdf->_titulo = "INVENTARIO GENERAL CELESTIUM";
     $pdf->AddPage();
     //un arreglo con su medida  a lo ancho
     $pdf->SetWidths($ancho);
     //un arreglo con alineacion de cada celda
     $pdf->SetAligns($orientacion);
     $contB = 0;
     $contS = 0;
     for ($i = 0; $i < $cantidadData; $i++) {
         $bloqueA = $data[$i - 1]['idbloque'];
         if ($bloqueA != $data[$i]['idbloque'] || $i == 0) {
             if ($i != 0) {
                 $pdf->AddPage();
             }
             $relleno = true;
             $pdf->SetFillColor(202, 232, 234);
             $pdf->SetTextColor(12, 78, 139);
             $pdf->SetDrawColor(12, 78, 139);
             $pdf->SetLineWidth(0.3);
             $pdf->SetFont('Helvetica', 'B', 8);
             $pdf->fill($relleno);
             $pdf->Cell(20, 7, 'Fecha', 1, 0, 'C', true);
             $pdf->Cell(20, 7, $data[$i]['fechainv'], 1, 0, 'C', false);
             $pdf->Cell(40, 7, 'Hora Inicio', 1, 0, 'C', true);
             $pdf->Cell(30, 7, $data[$i]['horainicio'], 1, 0, 'C', false);
             $pdf->Cell(55, 7, 'Hora Termino', 1, 0, 'C', true);
             $pdf->Cell(30, 7, $data[$i]['horatermino'], 1, 0, 'C', false);
             $pdf->Cell(50, 7, 'Bloque y/o Anaquel', 1, 0, 'C', true);
             $pdf->Cell(30, 7, $data[$i]['codigo'], 1, 0, 'C', false);
             $pdf->ln();
             $pdf->Cell(30, 7, 'Responsable', 1, 0, 'C', true);
             if (!empty($data[$i]['responsable'])) {
                 $dataResponsable = $actor->buscarxid($data[$i]['responsable']);
             }
             $pdf->Cell(100, 7, $dataResponsable[0]['nombres'] . ' ' . $dataResponsable[0]['apellidopaterno'] . ' ' . $dataResponsable[0]['apellidomaterno'], 1, 0, '', false);
             $pdf->Cell(30, 7, 'Auxiliar', 1, 0, 'C', true);
             if (!empty($data[$i]['auxiliar'])) {
                 $dataAuxiliar = $actor->buscarxid($data[$i]['auxiliar']);
             }
             $pdf->Cell(115, 7, $dataAuxiliar[0]['nombres'] . ' ' . $dataAuxiliar[0]['apellidopaterno'] . ' ' . $dataAuxiliar[0]['apellidomaterno'], 1, 0, '', false);
             $pdf->ln();
             $fila = $titulos;
             $pdf->Row($fila);
         }
         $diferencia = $data[$i]['buenos'] + $data[$i]['malos'] + $data[$i]['servicio'] + $data[$i]['showroom'] - $data[$i]['stockinventario'];
         if ($diferencia > 0) {
             $contB += $diferencia * $data[$i]['precio'];
         } else {
             if ($diferencia < 0) {
                 $contS += $diferencia * $data[$i]['precio'];
             }
         }
         $pdf->SetFillColor(224, 235, 255);
         $pdf->SetTextColor(0);
         $pdf->SetFont('');
         $fila = array($i + 1, html_entity_decode($data[$i]['codigopa'], ENT_QUOTES, 'UTF-8'), html_entity_decode(utf8_decode($data[$i]['nompro']), ENT_QUOTES, 'UTF-8'), $data[$i]['buenos'], $data[$i]['malos'], $data[$i]['servicio'], $data[$i]['showroom'], $data[$i]['buenos'] + $data[$i]['malos'] + $data[$i]['servicio'] + $data[$i]['showroom'], $data[$i]['stockinventario'], $diferencia, $data[$i]['precio']);
         $pdf->Row($fila);
         $relleno = !$relleno;
         $pdf->fill($relleno);
     }
     $ancho = array(26, 26, 26, 26, 26, 26, 26, 26, 26, 41);
     $pdf->SetWidths($ancho);
     $orientacion = array('C', '', '', 'C', 'C', 'C', 'C', 'C', 'C', 'C');
     $pdf->ln();
     $fila2 = array("Total a Favor", "S/." . number_format($contB, 2), "", "", "Total en Contra", "S/." . number_format(abs($contS), 2), "", "", "Total", "S/." . number_format($contB + $contS, 2));
     $pdf->Row($fila2);
     $pdf->AliasNbPages();
     $pdf->Output();
 }
Exemple #3
0
    }
}
//Creación del objeto de la clase heredada
//$pdf=new PDF();
$pdf = new PDF_Mc_Table();
$pdf->AliasNbPages();
$pdf->AddPage();
//$pdf->SetFont('Arial','B',10);
//$pdf->Cell(200,5,'Centro Provincial de las Artes "Teatro Argentino"',0,1,'C');
//$pdf->Cell(200,5,'Sistema de Selección',0,1,'C');
//$pdf->ln(10);
// $pdf->SetFont('Arial','B',10);
$rs = mysql_query($ejec, $con);
$row = mysql_fetch_assoc($rs);
$pdf->SetFont('Arial', 'B', 10);
$pdf->Cell(50, 5, 'INSCRIPCION Nro:' . $row["nro"], 0, 0, 'L');
$pdf->Cell(130, 5, ' ', 0, 1, 'R');
$pdf->Cell(190, 5, 'ARTE JOVEN 2014', 0, 1, 'C');
$pdf->ln(4);
$pdf->SetFont('Arial', '', 10);
$pdf->Cell(190, 5, 'FORMULARIO DE INSCRIPCION DEL POSTULANTE', 0, 1, 'C');
$pdf->ln(5);
$pdf->SetFont('Arial', 'B', 8);
$pdf->ln(5);
$pdf->Cell(100, 5, 'DATOS PERSONALES', 0, 1);
$pdf->SetFont('Arial', '', 8);
$pdf->Cell(0, 5, 'Apellido y Nombres:   ' . $row["nombre"], 0, 1);
$pdf->Cell(0, 5, 'Documento:   ' . $row["nro_documento"] . '   F.Nacimiento:   ' . $row["f_nacimiento"], 0, 1);
$pdf->Cell(0, 5, 'Domicilio :   ' . $row["domicilio"] . '   ' . $row["localidad"] . '  CP ' . $row["cp"] . '  Tel (' . $row["caract_tel"] . ') ' . $row["telefono"], 0, 1);
$pdf->Cell(0, 5, 'Correo electronico:   ' . $row["correo_electronico"], 0, 1);
$pdf->SetFont('Arial', 'B', 8);