<div class="modal fade" id="cotizar" 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">Cotizar Venta</h4>
            </div>
            <form name="form_cotizar" id="form_cotizar" method="post" action="">
                <div class="modal-body">
                    <div id="resultado_cot"></div>
                    <div id="modal1">
                        <div class="modal-footer">
                            <button type="button" class="btn btn-default" data-dismiss="modal">NO</button>
                            <button name="btn_cotizar" value="btn_cotizar" type="submit" class="btn btn-info"><i class="icon-ok"></i> <strong>SI</strong></button>
                        </div>
                    </div>    
                </div>
            </form>
        </div><!-- /.modal-content -->
    </div><!-- /.modal-dialog -->
</div><!-- /.modal -->
<script type="text/javascript">
$("#form_cotizar" ).submit(function( event ) {
    $('#btn_cotizar').attr("disabled", true);
    $('#modal1').hide(); 
    var parametros = $(this).serialize();
    $.ajax({
        type: "POST",
        url: "php_facturar/registrar_cotizacion.php",
        data: parametros,
        beforeSend: function(objeto){
         $('#resultado_cot').html('<center><img src="./img/ajax-loader.gif"> CARGANDO...</center>');
        },
        success: function(datos){
        $("#resultado_cot").html(datos);
        $('#btn_cotizar').attr("disabled", false);
        loadTabla();
        loadtotal();
        loadcliente();
        limpiar_campos();
        limpiar_buscador();
        }
    });
    event.preventDefault();
})
</script>