<div id="reporte_iva" 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"> Total Compras</h4>
            </div>
            <div class="modal-body">
                <form method="get" action="" target=”_blank”>
                    <div  class="col-md-12">
                        <div class="form-group">
                            <label class="pull-left">Desde</label>
                            <input type="date" class="form-control date-picker" data-date-format="yyyy-mm-dd" name="desde" autocomplete="off" value="<?php echo  date('Y-m-d');?>" >
                            <label class="pull-left">Hasta</label>
                            <input type="date" class="form-control date-picker" data-date-format="dd-mm-yyyy"  name="hasta" autocomplete="off" value="<?php echo  date('Y-m-d');?>"> 
                             <label class="pull-left">Proveedor</label>
                            <section id="intro" >
                                <select name="proveedor" id="proveedor"  class="form-control name_list" required>
                                 <option value="0">TODOS</option>    
                                 <?php
                                $datos=mysqli_query($con,"SELECT * FROM proveedor WHERE empresa='$empresa'") ;
                                while($fila=mysqli_fetch_array($datos))
                                {
                                echo' <option value="'.$fila['pro_id'].'">'.$fila['pro_nombre'].'</option>';
                                }
                            ?>
                                </select>
                            </section>                    
                        </div>
                    </div> <!-- /.form-group -->
                    <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_compras_iva" value="reporte_compras_iva" id="reporte_compras_iva" dir="libraries/pdf/pdf_reportes/compras_total.php">PDF</button>

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



<div id="iva_detallado" 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"> Total Compras detallado por Impuesto</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-danger" name="reporte_compra_total" value="reporte_compra_total" id="reporte_compra_total" dir="libraries/pdf/pdf_reportes/compras_iva_detallado.php" >PDF</button>

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




<div id="retenciones" 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">Retenciones</h4>
             </div>
            <div class="modal-body">
                <form method="get" action="" target=”_blank”>
                <!--<form method="get" action="libraries/pdf/pdf_reportes/ventas_detalladas.php" target=”_blank”>-->
                    <div class="col-md-12">
                        <div class="form-group">
                            <label class="pull-left">Desde</label>
                            <input type="date" class="form-control date-picker"  value="<?php echo  date('Y-m-d');?>" data-date-format="yyyy-mm-dd" name="desde" autocomplete="off" >

                            <label class="pull-left">Hasta</label>
                            <input type="date" class="form-control date-picker"  value="<?php echo  date('Y-m-d');?>" data-date-format="dd-mm-yyyy"  name="hasta" autocomplete="off" >
                        </div>
                    </div> <!-- /.form-group -->
                    <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_compra_rete" value="reporte_compra_rete" id="reporte_compra_rete" dir="libraries/tcpdf/documentos/reporte_compras_retenciones.php">PDF</button>

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



<div id="cuentas_por_pagar" 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">Cuentas por pagar</h4>
            </div>
            <div class="modal-body">
                <form method="get" action=""  target=”_blank”>
                     <label class="pull-left">Proveedor</label>
                     <section id="intro" >
                        <select name="proveedor" id="proveedor"  class="form-control name_list" required>
                             <option value="0">TODOS</option>    
                             <?php
                            $datos=mysqli_query($con,"SELECT * FROM proveedor WHERE empresa='$empresa'") ;
                            while($fila=mysqli_fetch_array($datos))
                            {
                            echo' <option value="'.$fila['pro_id'].'">'.$fila['pro_nombre'].'</option>';
                            }
                        ?>
                         </select>
                    </section>
                    <label class="pull-left">Hasta</label>
                    <input type="date" class="form-control date-picker"  value="<?php echo  date('Y-m-d');?>" data-date-format="dd-mm-yyyy"  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-danger" name="reporte_caja_egre" value="reporte_caja_egre" id="reporte_caja_egre" dir="libraries/pdf/pdf_reportes/compras_por_pagar.php" >PDF</button>

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



<div id="documento" 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">Documento Soporte</h4>
             </div>
            <div class="modal-body">
                <form method="get" action="" target=”_blank”>
                <!--<form method="get" action="libraries/pdf/pdf_reportes/ventas_detalladas.php" target=”_blank”>-->
                    <div class="col-md-12">
                        <div class="form-group">
                            <label class="pull-left">Desde</label>
                            <input type="date" class="form-control date-picker"  value="<?php echo  date('Y-m-d');?>" data-date-format="yyyy-mm-dd" name="desde" autocomplete="off" >

                            <label class="pull-left">Hasta</label>
                            <input type="date" class="form-control date-picker"  value="<?php echo  date('Y-m-d');?>" data-date-format="dd-mm-yyyy"  name="hasta" autocomplete="off" >
                        </div>
                    </div> <!-- /.form-group -->
                    <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_doc_soporte" value="reporte_doc_soporte" id="reporte_doc_soporte" dir="libraries/tcpdf/documentos/reporte_documento_soporte.php">PDF</button>

                       <button type="submit" class="btn btn-success" name="reporte_doc_soporte2" value="reporte_doc_soporte2" id="reporte_doc_soporte2"  dir="libraries/php_excel/excel_compras_documento_soporte.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> 