<?php
session_start();
require_once('conexion.php');
require_once('include/sesiones.php');
if (isset($_SESSION['usu_nombre']))
{
    $regis=mysqli_query($con,"SELECT * from permiso where modulo_mod_id='24' and usuario_usu_id='$usu_id'") or die(mysqli_error($con));
    $reg=mysqli_fetch_array($regis);
    if($reg['per_visualizar']=="Activo")
    {
        if ($aper_num>'0')
        {
?>
<!DOCTYPE html>
<html lang="en">
<head>
	<?php include ('head.php'); ?>
    <link href="css/botones_factura.css" rel="stylesheet" media="all"> 

</head>
<body>
<?php
$inicio="";
$M_inventario="";
$M_contactos="";
$M_compras="";
$M_ventas="";
$M_pedidos="";
$M_pos="active";
$R_reportes="";

$ventas="";
$remisiones="";
$cajas="";
$apartadas="";
$orden="active";
$movimientos="";
$periodica="";  
include ('menu.php');
?> 
<div class="main">
    <div class="col-md-2">
        <?php include ('include/menu_pos.php');?>       
    </div> <!-- /span6 -->
    <div class="col-md-10">  
        <div class="widget stacked ">
            <div class="widget-content">
                <div class="widget stacked">
                    <div class="widget-content">
                        <section id="buttons">
                            <div class="col-md-6">
                                <a href="P_servicios_registrar.php" class="btn btn-info"> Nuevo</a>
                            </div>
                            <div class="col-md-3" style="padding-right: 15px;">
                                <section id="intro">
                                    <select id="estado" name="estado" class="form-control input-sm" onchange='load(1);'>
                                        <option value="EN TALLER">EN TALLER</option>
                                        <option value="TERMINADA">TERMINADAS</option>
                                        <option value="ENTREGADA">ENTREGADAS</option>
                                        <option value="ANULADA">ANULADAS</option>
                                        <option value="NO REPARADO">NO REPARADO</option>
                                    </select>
                                </section>
                            </div>
                            <div class="col-md-3">
                                <div class="form-group row">
                                    <input type="text" class="form-control input-sm" id="q" placeholder="Buscador" onKeyUp='load(1);' autofocus value="">
                                </div>      
                            </div>
                        </section>
                    </div> <!-- /widget-content -->
                </div> <!-- /widget --> 
                <?php //include ('php_orden_de_servicios/abonar_orden.php');?>  
                <center> <span id="loader"></span></center>
                <div id="resultados"></div><!-- Carga los datos ajax -->
                <div class='outer_div'></div><!-- Carga los datos ajax -->
            </div> <!-- /widget-content -->
        </div> <!-- /widget --></br></br></br>
    </div> <!-- /container -->
</div> <!-- /main -->
<div class="modal fade" id="modal_facturar" tabindex="-1" role="dialog" aria-labelledby="editModalLabel" aria-hidden="true">
    <div class="modal-dialog">
        <div class="modal-content">
            <div class="modal-header">
                <button type="button" class="close" data-dismiss="modal" aria-hidden="true">&times;</button>
                <h4 class="modal-title">Facturar</h4>
            </div>
            <div class="modal-body">
                <div id="form-facturar"></div>
            </div>
        </div><!-- /.modal-content -->
    </div><!-- /.modal-dialog -->
</div><!-- /.modal --> 
<?php
	include ('php_caja/caja_abrir.php');
	include ('script.php');
?>
<script src="php_orden_de_servicios\ajax.js"></script>
</body>
</html>
<?php
    }
else
    {
        echo '<script>alert("primero debes Abrir caja")</script>';
        echo '<script> setTimeout("history.back(1)", 0); </script>';
    }
}
else
    {
        echo '<script>alert("No tienes permiso para ver esta pagina")</script>';
        echo '<script> setTimeout("history.back(1)", 0); </script>';
    }
} 
else
    {
        echo '<script>location.href = "index.php";</script>';
    }
?>