<div id="cierre" 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"> Cierres de caja</h4>
            </div>
            <div class="modal-body">
                <form method="get" action="" target=”_blank”>
                    <label>Desde</label>
                    <input type="date" class="form-control" value="<?php echo  date('Y-m-d');?>"  name="desde" autocomplete="off" >
                    
                    <label>Hasta</label>
                    <input type="date" class="form-control " value="<?php echo  date('Y-m-d');?>" name="hasta" autocomplete="off" >
                    
                    <label>Vendedor</label>
                    <section id="intro" >
                        <select name="empleadoo" id="empleadoo"  class="form-control name_list" required>
                            <?php
                                $datos=mysqli_query($con,"SELECT * FROM usuario WHERE sucursal='$sucursal' and empresa_emp_id='$empresa'");
                                    while( $fila = mysqli_fetch_array( $datos ) )
                                    {
                                    echo' <option value="'.$fila['usu_id'].'">'.$fila['usu_nombre'].'</option>';
                                    }
                              ?>
                        </select>
                    </section> 
                    <div class="modal-footer">
                        <button type="button" class="btn btn-default" data-dismiss="modal">Cancelar</button>
                        <button type="submit"  class="btn btn-danger" name="reporte_caja_cierre" value="reporte_caja_cierre" id="reporte_caja_cierre" dir="libraries/pdf/pdf_reportes/caja_cierres.php" >PDF</button>

                         <button type="submit" class="btn btn-success" name="reporte_caja_cierre2" value="reporte_caja_cierre2" id="reporte_caja_cierre2"  dir="libraries/php_excel/excel_caja_cierres.php">EXCEL</button>
                    </div>
                </form>
            </div><!-- /.modal-content -->
        </div><!-- /.modal-dialog -->
    </div> 
</div>

<div id="detalles" 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"> Detalle de Movimientos</h4>
            </div>
            <div class="modal-body">
                <form method="get" action="" target=”_blank”>
                    <div class="col-md-6 ">
                        <label>Desde</label>
                        <input type="date" class="form-control" value="<?php echo  date('Y-m-d');?>" name="desde" autocomplete="off" >
                    </div>
                    <div class="col-md-6 ">
                        <label class="pull-left">Hora Inicio</label>
                        <input type="time" class="form-control date-picker" name="horadesde" autocomplete="off" value="00:00:00" >
                    </div>

                    <div class="col-md-6 ">
                        <label>Hasta</label>
                        <input type="date" class="form-control " value="<?php echo  date('Y-m-d');?>" name="hasta" autocomplete="off" >
                    </div>
                    <div class="col-md-6 ">
                        <label class="pull-left">Hora Fin</label> 
                        <input type="time" class="form-control date-picker" name="horahasta" autocomplete="off" value="23:59:59">
                    </div>
                    
                    <label>Tipo de Movimiento</label>
                    <select name="tipo_movimiento" id="tipo_movimiento" class="form-control name_list input-sm" required>
                        <!--<option value="0">Todos</option>-->
                        <option value="Ventas">Ventas</option>
                        <option value="CXC">CXC</option>
                        <option value="Apartados">Apartados</option>
                        <option value="Abono Adelantado">Abono Adelantados</option>
                        <!--<option value="CXP">CXP</option>-->
                        <option value="Egresos">Egresos</option>
                        <!--<option value="Devolucion De Efectivo">Devolucion De Efectivo</option>-->
                    </select>
                    
                    <label>Medio de Pago</label>
                    <select name="medio_pago" id="medio_pago" class="form-control name_list input-sm" required>
                        <option value="0">Todos</option>
                        <option value="Efectivo">Efectivo</option>
                        <?php
                            $datos = mysqli_query($con,"SELECT * FROM banco WHERE empresa='$empresa' order by ban_nombre asc") ;
                            while( $fila = mysqli_fetch_array( $datos ) )
                            {
                                echo' <option value="'.$fila['ban_nombre'].'">'.$fila['ban_nombre'].'</option>';
                            }
                        ?>
                    </select>
                    <div class="modal-footer">
                        <button type="button" class="btn btn-default" data-dismiss="modal">Cancelar</button>
                        <button type="submit" class="btn btn-danger" name="reporte_caja_movi" value="reporte_caja_movi" id="reporte_caja_movi" dir="libraries/pdf/pdf_reportes/caja_movimientos.php">PDF</button>

                         <button type="submit" class="btn btn-success" name="reporte_caja_movi2" value="reporte_caja_movi2" id="reporte_caja_movi2"  dir="libraries/php_excel/excel_caja_movimientos.php">EXCEL</button>
                    </div>
                </form>
            </div><!-- /.modal-content -->
        </div><!-- /.modal-dialog -->
    </div> 
</div>

<div id="egresos" 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">Egresos</h4>
            </div>
            <div class="modal-body">
                <form method="get" action=""  target=”_blank”>
                    <label>Desde</label>
                    <input type="date" class="form-control" value="<?php echo  date('Y-m-d');?>" name="desde" autocomplete="off" >
                    <label>Hasta</label>
                    <input type="date" class="form-control" value="<?php echo  date('Y-m-d');?>" name="hasta" autocomplete="off" >
                    
                    <div class="modal-footer">
                        <button type="button" class="btn btn-default" data-dismiss="modal">Cancelar</button>
                        
                        <button type="submit"  class="btn btn-info" name="reporte_caja_egre" value="reporte_caja_egre0" id="reporte_caja_egre0" dir="R_reportes_egresos.php">BUSCAR</button>

                       
                    </div>
                </form>
            </div><!-- /.modal-content -->
        </div><!-- /.modal-dialog -->
    </div> 
</div>

<div id="abono_adelantado" 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"> Historial abono adelantados</h4>
            </div>
            <div class="modal-body">
                <form method="get" action="" target=”_blank”>
                    <label>Desde</label>
                    <input type="date" class="form-control" value="<?php echo date('Y-m-d');?>" name="desde" autocomplete="off" >
                    
                    <div class="modal-footer">
                        <button type="button" class="btn btn-default" data-dismiss="modal">Cancelar</button>
                        <button type="submit"  class="btn btn-danger" name="reporte_caja_cierre" value="reporte_caja_cierre" id="reporte_caja_cierre" dir="libraries/pdf/pdf_reportes/caja_abonos_adelantados.php" >PDF</button>

                        <!-- <button type="submit" class="btn btn-success" name="reporte_caja_cierre2" value="reporte_caja_cierre2" id="reporte_caja_cierre2"  dir="libraries/php_excel/excel_abonos_adelantados.php">EXCEL</button>-->
                    </div>
                </form>
            </div><!-- /.modal-content -->
        </div><!-- /.modal-dialog -->
    </div> 
</div>

<!-- script para formulario con dos botones y redireccionamiento a paginas desde boton-->
<script type="text/javascript">
$(document).ready(function()
{
  $("button[type=submit]").click(function()
   {
    var accion = $(this).attr('dir');

    $('form').attr('action', accion);
  
   });
  
});
</script> 