%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/content_resguardos_baja.php

<?php

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



$conf = new Configuracion();

$conf->conectarBD();







                                               $sql2u = "SELECT pla.id_empleado,ee.id as id_resguardante_nuevo,ib.id_resguardante_ant,e.rfc,GROUP_CONCAT(ib.id_inventario) as articulos, e.id, a.area as area2,CONCAT(ee.nombre, ' ', ee.apellido1, ' ', ee.apellido2) AS nombree2, CONCAT(e.nombre, ' ', e.apellido1, ' ', e.apellido2) AS nombree, a.id_area,p.id_puesto,p.puesto,pla.plaza,ib.fecha_baja

                                                                FROM inventario_bajas_resguardantes ib

                                                                LEFT JOIN tjam_empleados e ON (ib.id_resguardante_ant = e.id)

                                                                JOIN tjam_empleados_plazas pla ON (pla.id_plaza = ib.id_plaza)

                                                                LEFT JOIN tjam_empleados ee ON (pla.id_empleado = ee.id)

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

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

                                                                WHERE id_resguardante_new = 0 AND ib.id_plaza = $id_plaza";





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



                            $id_resguardante_ant = $rst1[0]['id_resguardante_ant'];

                             $id_articulos = $rst1[0]['articulos'];

                            $id_resguardante_nuevo = $rst1[0]['id_empleado'];

                            

     

                             $puesto = $rst1[0]['puesto'];

                              $area = $rst1[0]['area2'];

                              

                            $id_puesto = $rst1[0]['id_puesto'];

                            $id_area = $rst1[0]['id_area'];

?>





<div class="page-content">



    <a href="../../page_home.php" class="btn btn-pink">Regresar <i class="fa fa-mail-reply"></i></a>



    <div class="row">

        <div class="col-md-13">



            <div id="generalTabContent" class="tab-content">

                <div id="tab-messages" class="tab-pane fade in active">

                    <div class="portlet box">





                        <div class="portlet-header">

                            <div class="caption">Resguardo de bienes que pasan a nuevo titular del puesto <?php echo $puesto;  ?> del área de <?php echo $area;  ?></div>

                        </div>



                        <div class="portlet-body">

                            

                            

                

                            

                            

                            <!-- CAMBIO DE FECHA -->

                            <form action="page_find_inventario.php" method="get">

                                <div class="portlet-body">

                                    <div class="row">

                                        <div class="col-md-6">

                                          



                                                <div class="col-md-12">

                                                    <select disabled class="select2-multi-value form-control"  name="resguardante" onchange="">

                                                       

                                                        <!-- <option value="0" <?php //if ($resguardador == '0') {echo 'selected'; $btnresguardador = 'No Asignados';} else {} ?>>Sin Asignar</option> -->

                                                        <?php

                                                        $consulta12 = "SELECT DISTINCT e.rfc, e.id,CONCAT(e.nombre, ' ', e.apellido1, ' ', e.apellido2) AS nombree

                                                                    FROM tjam_empleados e

                                                                    WHERE e.habilitado = 1 AND e.id = $id_resguardante_ant ORDER BY nombree ASC";

                                                        $rst12 = $conf->consulta($consulta12);



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

                                                            if ($id_usuario == $rst12[$i]['id']) {

                                                                echo '<option selected value="' . $rst12[$i]['id'] . '">' . $rst12[$i]['nombree'] .  '</option>';

                                                                $btnresguardador = $rst12[$i]['nombree'];

                                                            } else {

                                                                echo '<option value="' . $rst12[$i]['id'] . '">' . $rst12[$i]['nombree'] . '</option>';

                                                            }

                                                        }

                                                        ?>

                                                    </select>

                                                </div>





                                  



                                        </div>

                                        

                                        

                                            <div class="col-md-6">

                                          



                                                          <div class="col-md-12">

                                                    <select  class="select2-multi-value form-control"  name="resguardante" onchange="">

                                                       

                                                        <!-- <option value="0" <?php //if ($resguardador == '0') {echo 'selected'; $btnresguardador = 'No Asignados';} else {} ?>>Sin Asignar</option> -->

                                                        <?php

                                                        $consulta12 = "SELECT DISTINCT e.rfc, e.id,CONCAT(e.nombre, ' ', e.apellido1, ' ', e.apellido2) AS nombree

                                                                    FROM tjam_empleados e

                                                                    WHERE e.habilitado = 1 ORDER BY nombree ASC";

                                                        $rst12 = $conf->consulta($consulta12);



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

                                                            if ($id_resguardante_nuevo == $rst12[$i]['id']) {

                                                                echo '<option selected value="' . $rst12[$i]['id'] . '">' . $rst12[$i]['nombree'] .  '</option>';

                                                                $btnresguardador = $rst12[$i]['nombree'];

                                                            } else {

                                                                echo '<option value="' . $rst12[$i]['id'] . '">' . $rst12[$i]['nombree'] . '</option>';

                                                            }

                                                        }

                                                        ?>

                                                    </select>

                                                </div>







                                  



                                        </div>

                                             <div class="col-md-6">

                                        <?php

                                        

                                        echo '<a href="../administracion/pdfreporteresguardobaja.php?cap=5000&id_area=0&resguardador='.$id_resguardante_ant.'" target="_blank" > <img src="../../common/images/pdf.png" title="Expediente" height="50" width="50" /> Baja de resguardo de inventario </a>';

                                        

                                        ?>

                                          </div>

                                          

                                             <div class="col-md-6">

                                        <?php

                                        

                                        echo '<a href="../administracion/pdfreporteresguardoalta.php?cap=5000&id_resguardante_nuevo='.$id_resguardante_nuevo.'&id_area='.$id_area.'&id_puesto='.$id_puesto.'&id_articulos='.$id_articulos.'&resguardador='.$id_resguardante_nuevo.'" target="_blank" > <img src="../../common/images/pdf.png" title="Expediente" height="50" width="50" /> Alta de resguardo de inventario  </a>';

                                        

                                        ?>

                                          </div>

                                    </div>

                            </form>

                            <br>







                         

                        



                            <div class="row mbm">

                                <div class="col-lg-12">

                                    <div class="table-responsive">

                                        <table id="table_id" style="border-bottom:1px solid #ddd" class="table table-striped table-bordered table-hover">



                                            <thead>

                                                <tr>

                                                     <th>#</th>

                                                    <th>Estatus</th>

                                                    <th>Clave</th>

                                                    <th>Articulo</th>

                                                    <th>Marca</th>

                                                    <th>Modelo</th>

                                                    <th>Serie</th>

                                                </tr>

                                            </thead>



                                            <tbody>

                                                <?php



                                                $estatus = array("", "warning", "warning", "primary", "info", "success");





                                                $consulta = "SELECT i.*, e.rfc, e.id, CONCAT(e.nombre, ' ', e.apellido1, ' ', e.apellido2) AS nombree,s.estatus

                                                FROM inventario_inventario i

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

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

                                                WHERE i.habilitado = 1 AND i.id_inventario IN ($id_articulos)

                                                ORDER BY i.clave ASC";

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



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



                                                    $color = $estatus[$rst1[$i]["id_estatus"]];

                                         

                                                    if ($rst1[$i]["area2"] == '' || $rst1[$i]["area2"] == NULL) {

                                                        $area2 = 'N/A';

                                                    } else {

                                                        $area2 = ''.$rst1[$i]["area2"].'';

                                                    }



                                                    if ($rst1[$i]["nombree"] == '' || $rst1[$i]["nombree"] == NULL) {

                                                        $nombree = 'N/A';

                                                    } else {

                                                        $nombree = ''.$rst1[$i]["nombree"].'';

                                                    }



                                                    if ($rst1[$i]["nombreBaja"] == '' || $rst1[$i]["nombreBaja"] == NULL) {

                                                        $nombreBaja = 'N/A';

                                                    } else {

                                                        $nombreBaja = ''.$rst1[$i]["nombreBaja"].'';

                                                    }



                                                   if ($rst1[$i]["estatus"] == 'Baja') {

                                                        $estatus = 'Baja';

                                                        $estatusc = 'class="label label-danger"';

                                                    } 

                                                    if ($rst1[$i]["estatus"] == 'Mantenimiento') {

                                                        $estatus = 'Mantenimiento';

                                                        $estatusc = 'class="label label-warning"';

                                                    }

                                                    if ($rst1[$i]["estatus"] == 'Activo') {

                                                        $estatus = 'Activo';

                                                        $estatusc = 'class="label label-success"';

                                                    }

                                                    if ($rst1[$i]["estatus"] == 'Subasta') {

                                                        $estatus = 'Subasta';

                                                        $estatusc = 'class="label label-info"';

                                                    }

                                                    if ($rst1[$i]["estatus"] == 'Prestamo') {

                                                        $estatus = 'Prestamo';

                                                        $estatusc = 'class="label label-info"';

                                                    }

                                                    



                                                    echo "<tr>";

                                                     echo "<td>" . ($i + 1) . "</td>";

                                                    echo '<td><span ' . $estatusc . '>' . $estatus . '</span></td>';

                                                    echo "<td>" . $rst1[$i]["clave"] . "</td>";

                                                 

                                                    echo "<td>" . $rst1[$i]["descripcion"] . "</td>";

                                                    echo "<td>" . $rst1[$i]["marca"] . "</td>";

                                                    echo "<td>" . $rst1[$i]["modelo"] . "</td>";

                                                    echo "<td>" . $rst1[$i]["serie"] . "</td>";



                                                

                                                    echo '</tr>';

                                                }



                                                $conf->desconectarDB();

                                                ?>



                                            </tbody>

                                        </table>



                                    </div>

                                </div>

                            </div>

                            

                            

                            

                            <center>

                                

                                    <a href="#" class="btn btn-success" target="_blank" onclick="return confirm(\'Confirma el movimiento?\');">Confirmar baja <i class="fa fa-check"></i></a>

                                

                            </center>

                            

                            

                            

                            



                        </div>

                    </div>

                </div>

            </div>

        </div>

    </div>

</div>

Zerion Mini Shell 1.0