<div class="widget stacked">
    <div class="widget-content">
        <div class="shortcuts" >
            <?PHP if($tipo_soft<>'2'){ ?>
            <?php
                $permi1=mysqli_query($con,"SELECT * from permiso where modulo_mod_id ='4' and usuario_usu_id='$usu_id'") or die(mysqli_error($con));
                $permi1=mysqli_fetch_array($permi1);
                  if($permi1['per_visualizar']=='Activo'){
            ?>
            <div class="col-lg-6 col-md-12 col-sm-2 col-xs-4" >
                <a href="I_familias.php" class="shortcut <?php echo $m_familias;?>" >
                    <i class="shortcut-icon icon-sitemap" ></i>
                    <span class="shortcut-label"><strong>CATEGORIAS</strong></span>
                </a>
            </div>
            <?php } ?>


            <?php
                $permi1=mysqli_query($con,"SELECT * from permiso where modulo_mod_id ='5' and usuario_usu_id='$usu_id'") or die(mysqli_error($con));
                $permi1=mysqli_fetch_array($permi1);
                  if($permi1['per_visualizar']=='Activo'){
            ?>
            <div class="col-lg-6 col-md-12 col-sm-2 col-xs-4" >
                <a href="I_articulos.php" class="shortcut <?php echo $m_articulos;?>" >
                    <i class="shortcut-icon icon-list-alt "></i>
                    <span class="shortcut-label"><strong>ARTICULOS</strong></span>               
                </a>
            </div>
            <?php } ?>


            <?php
                $permi1=mysqli_query($con,"SELECT * from permiso where modulo_mod_id ='6' and usuario_usu_id='$usu_id'") or die(mysqli_error($con));
                $permi1=mysqli_fetch_array($permi1);
                  if($permi1['per_visualizar']=='Activo'){
            ?>
            <div class="col-lg-6 col-md-12 col-sm-2 col-xs-4" >
                <a href="I_combos.php" class="shortcut <?php echo $m_combos;?>" >
                    <i class="shortcut-icon icon-gift "></i>
                    <span class="shortcut-label"><strong>COMBOS</strong></span>               
                </a>
            </div>
            <?php } ?>



            <?php
                $permi1=mysqli_query($con,"SELECT * from permiso where modulo_mod_id ='32' and usuario_usu_id='$usu_id'") or die(mysqli_error($con));
                $permi1=mysqli_fetch_array($permi1);
                  if($permi1['per_visualizar']=='Activo'){
            ?>
            <?php if($negocio_neg_id=='2' or $negocio_neg_id=='6' ){?>
            <div class="col-lg-6 col-md-12 col-sm-2 col-xs-4" >
                <a href="I_produccion.php" class="shortcut <?php echo $m_productos;?>" >
                    <i class="shortcut-icon fas fa-hamburger"></i>
                    <span class="shortcut-label" ><strong>PRODUCCION</strong></span>               
                </a>
            </div>
            <?php } ?>
            <?php } ?>
            <?php
                $permi1=mysqli_query($con,"SELECT * from permiso where modulo_mod_id ='7' and usuario_usu_id='$usu_id'") or die(mysqli_error($con));
                $permi1=mysqli_fetch_array($permi1);
                  if($permi1['per_visualizar']=='Activo'){
            ?> 
            <div class="col-lg-6 col-md-12 col-sm-2 col-xs-4" >
                <a href="I_servicios.php" class="shortcut <?php echo $m_servicios;?>" >
                    <i class="shortcut-icon icon-cogs" ></i>
                    <span class="shortcut-label"><strong>SERVICIOS</strong></span>               
                </a>
            </div>
            <?php } ?>
            <?php
                $permi1=mysqli_query($con,"SELECT * from permiso where modulo_mod_id ='9' and usuario_usu_id='$usu_id'") or die(mysqli_error($con));
                $permi1=mysqli_fetch_array($permi1);
                  if($permi1['per_visualizar']=='Activo'){
            ?>
            <div class="col-lg-6 col-md-12 col-sm-2 col-xs-4" >
                <a href="I_ajuste_inventario.php" class="shortcut <?php echo $m_ajustes;?>">
                    <i class="shortcut-icon icon-file-text" ></i>
                    <span class="shortcut-label"><strong>AJUSTES DE INVENTARIO</strong></span>
                </a>
            </div>
            <?php } ?>
            

             <?php
                $mod7=mysqli_query($con,"SELECT * FROM modulo where mod_nombre='Traslados' ") or die(mysqli_error($con)); 
                $mod7=mysqli_fetch_array($mod7);
                if ($mod7['estado']=='Activo')
                {
                    $permi1=mysqli_query($con,"SELECT * from permiso where modulo_mod_id ='8' and usuario_usu_id='$usu_id'") or die(mysqli_error($con));
                    $permi1=mysqli_fetch_array($permi1);
                    if($permi1['per_visualizar']=='Activo')
                    {
                        $can2=mysqli_query($con,"SELECT * FROM sucursal where empresa='$empresa'") or die(mysqli_error($con)); 
                        $result1 = mysqli_num_rows($can2);    
                        if($result1>=2) 
                        {
            ?> 
                        <div class="col-lg-6 col-md-12 col-sm-2 col-xs-4" >
                            <a href="I_traslado.php" class="shortcut <?php echo $m_traslados;?>">
                                <i class="shortcut-icon icon-truck" ></i>
                                <span class="shortcut-label"><strong>TRASLADOS</strong></span>
                            </a>
                        </div>
                <?php   }   ?>


                <?php  
                    $can2=mysqli_query($con,"SELECT * FROM empresa ") or die(mysqli_error($con)); 
                    $result1 = mysqli_num_rows($can2);    
                    if($result1>=2) 
                    { 
                ?>
                        <div class="col-lg-6 col-md-12 col-sm-2 col-xs-4" >
                            <a href="I_traslado_emp.php" class="shortcut <?php echo $m_traslados;?>">
                                <i class="shortcut-icon icon-truck" ></i>
                                <span class="shortcut-label"><strong>TRASLADOS</strong></span>
                            </a>
                        </div>
            <?php   }   }   }  ?>














            <?php
                $permi1=mysqli_query($con,"SELECT * from permiso where modulo_mod_id ='10' and usuario_usu_id='$usu_id'") or die(mysqli_error($con));
                $permi1=mysqli_fetch_array($permi1);
                  if($permi1['per_visualizar']=='Activo'){
            ?>


             <?php
                $can=mysqli_query($con,"SELECT * FROM modulo where mod_id='10' and estado='Activo' ") or die(mysqli_error($con)); 
                $to=mysqli_fetch_array($can);
                if($to>0)
                { ?>

            <div class="col-lg-6 col-md-12 col-sm-2 col-xs-4" >
                <a href="I_etiquetas.php"  class="shortcut <?php echo $m_etiquetas;?>">
                    <i class="shortcut-icon icon-barcode" ></i>
                    <span class="shortcut-label"><strong>ETIQUETAS</strong></span>
                </a>
            </div>
             <?php }  ?>
             <?php } ?>
            <?php
                $permi1=mysqli_query($con,"SELECT * from permiso where modulo_mod_id ='11' and usuario_usu_id='$usu_id'") or die(mysqli_error($con));
                $permi1=mysqli_fetch_array($permi1);
                  if($permi1['per_visualizar']=='Activo'){
            ?>
            <div class="col-lg-6 col-md-12 col-sm-2 col-xs-4" >
                <a href="I_tarifas.php" class="shortcut <?php echo $m_tarifas;?>">
                    <i class="shortcut-icon icon-usd" ></i>
                    <span class="shortcut-label"><strong>TARIFAS</strong></span>                
                </a> 
            </div>
            <?php } ?>
            <?php
                $permi1=mysqli_query($con,"SELECT * from permiso where modulo_mod_id ='12' and usuario_usu_id='$usu_id'") or die(mysqli_error($con));
                $permi1=mysqli_fetch_array($permi1);
                  if($permi1['per_visualizar']=='Activo'){
            ?>
            <?php if($negocio_neg_id=='3' or $negocio_neg_id=='2' or $negocio_neg_id=='6'){ ?>
            <div class="col-lg-6 col-md-12 col-sm-2 col-xs-4" >
                <a href="I_ubicacion.php" class="shortcut <?php echo $m_ubicacion;?>"  style="padding: 0px;">
                    <i class="shortcut-icon fab fa-buromobelexperte fa-4x" ></i>
                    <span class="shortcut-label" style="padding-top: -20px;"><strong>UBICACIÓN</strong></span>                
                </a>
            </div>
            <?php } ?> 
            <?php } ?>
            <div class="col-lg-6 col-md-12 col-sm-2 col-xs-4" >
                <a href="#reporte" data-toggle="modal"  class="shortcut">
                    <i class="shortcut-icon icon-edit" ></i>
                    <span class="shortcut-label">TOMA DE INVENTARIO</span>
                </a>
            </div>

            <?php
            if ($tienda_online=='si' && $negocio_neg_id<>'4') {
               
               $permi1=mysqli_query($con,"SELECT * from permiso where modulo_mod_id ='33' and usuario_usu_id='$usu_id'") or die(mysqli_error($con));
                $permi1=mysqli_fetch_array($permi1);
                  if($permi1['per_visualizar']=='Activo'){
            ?>
            <div class="col-lg-6 col-md-12 col-sm-2 col-xs-4" >
                <a href="I_marca.php" class="shortcut <?php echo $m_marca;?>" >
                    <i class="shortcut-icon icon-tags" ></i>
                    <span class="shortcut-label"><strong>MARCA</strong></span>
                </a>
            </div>
            <?php } 
        }
             

        } else { ?>

            <?php if($negocio_neg_id=='2'){?>

            <div class="col-lg-6 col-md-12 col-sm-2 col-xs-4" >
                <a href="I_familias.php" class="shortcut <?php echo $m_familias;?>" >
                    <i class="shortcut-icon icon-sitemap" ></i>
                    <span class="shortcut-label"><strong>CATEGORIAS</strong></span>
                </a>
            </div>
            <div class="col-lg-6 col-md-12 col-sm-2 col-xs-4" >
                <a href="I_produccion.php" class="shortcut <?php echo $m_productos;?>" >
                    <i class="shortcut-icon fas fa-hamburger"></i>
                    <span class="shortcut-label" ><strong>PRODUCCION</strong></span>               
                </a>
            </div>
            <?php } else { ?>
            <div class="col-lg-12 col-md-12 col-sm-2 col-xs-4" >
                <a href="I_servicios.php" class="shortcut <?php echo $m_servicios;?>" >
                    <i class="shortcut-icon icon-list-alt "></i>
                    <span class="shortcut-label"><strong>ARTICULOS</strong></span>               
                </a>
            </div>


           
            <?php } }?>

        </div>
    </div> <!-- /widget-content -->
</div> <!-- /widget -->


<div id="reporte" class="modal fade" tabindex="-1" role="dialog" >
    <div class="modal-dialog">
        <div class="modal-content">
            <div class="modal-header">
                <button type="button" class="close" data-dismiss="modal" aria-hidden="true">×</button>
                <h4 class="modal-title">Reporte de Inventario</h4>
            </div>
            <div class="modal-body">
                <form name="form1" method="post" action="libraries/pdf/pdf_reportes/inventario.php" target="_blank">
                    <label>Categoria</label>
                    <select name="familia" class="form-control name_list" required >
                         <option value="0">Todo</option>
                        <?php
                            $datos = mysqli_query($con,"SELECT * FROM familias WHERE empresa='$empresa' order by fam_nombre asc ") ;
                            while( $fila = mysqli_fetch_array( $datos ) )
                            {
                                echo' <option value="'.$fila['fam_id'].'">'.$fila['fam_nombre'].'</option>';
                            }
                        ?>
                    </select>

                    <label>Marca</label>
                    <select name="marca" class="form-control name_list" required >
                        <option value="0">Todo</option>
                        <?php
                            $datosm = mysqli_query($con,"SELECT * FROM marca WHERE empresa='$empresa' order by mar_nombre asc ") ;
                            while( $filam = mysqli_fetch_array( $datosm ) )
                            {
                                echo' <option value="'.$filam['mar_id'].'">'.$filam['mar_nombre'].'</option>';
                            }
                        ?>
                    </select>

                    <label>Ordenar Por</label>
                    <select name="ordenar" class="form-control name_list" required >
                         <option value="art_referencia">Codigo</option>
                         <option value="art_referencia2">Referencia</option>
                         <option value="art_nombre">Nombre</option>
                         <option value="familias_fam_id">Categoria</option>
                    </select>
                    <div class="modal-footer">
                        <button type="button" class="btn btn-default" data-dismiss="modal">Cancelar</button>
                        <button name="registrar" value="registrar" type="submit" class="btn btn-danger"><i class="icon-ok"></i> <strong>Descargar</strong></button>
                    </div>
                </form>
            </div>
        </div><!-- /.modal-content -->
    </div><!-- /.modal-dialog -->
</div> 