//REDIRECCION A LA PAGINA PRINCIPAL DE FACTURA document.getElementById('verFacturas').addEventListener('click', function () { var animacion = document.getElementsByClassName('xyz-in'); var ani = document.querySelectorAll('.xyz-in'); ani.forEach(function(animado, arrayIndex) { animado.classList.remove('xyz-in'); animado.classList.add('xyz-out'); }); setTimeout(function(){ window.location.href = 'portal.php'; },800); }); //INICIALIZACIÓN DE TABLA CON JQUERY PARA DATATABLES CON SUS ARGUMENTOS PARA DARLE CARACTERISTICAS $(document).ready(function () { var table = $('#facturasTable').DataTable({ lengthMenu: [10, 25, 50, 100], pageLength: 10, searching: true, paging: true, ordering: true, info: true, responsive: true, dom: 'Blfrtip', buttons: [ { extend: 'excel', className: 'btn btn-success', text: 'Exportar a Excel', filename: 'Historial_Cancelaciones', }, { extend: 'pdf', className: 'btn btn-danger', text: 'Exportar a PDF', filename: 'Historial_Cancelaciones', }], columns: [ {"className": "xyz-in"}, {"className": "xyz-in"}, {"className": "xyz-in"}, {"className": "xyz-in"}, {"className": "xyz-in"}, {"className": "xyz-in"}, {"className": "xyz-in"}, {"className": "xyz-in"}, {"className": "xyz-in"}, {"className": "xyz-in"}, ], columnDefs: [ { width: "5%", "targets": [0] }, { width: "10%", "targets": [1] }, { width: "5%", "targets": [2] }, { width: "5%", "targets": [3] }, { width: "20%", "targets": [4] }, { width: "18%", "targets": [5] }, { width: "5%", "targets": [6] }, { width: "10%", "targets": [7] }, { width: "10%", "targets": [8] }, { width: "7%", "targets": [9] }, ], }); // Agrega control de selección de longitud table.buttons().container().appendTo('#facturasTable_wrapper .col-md-6:eq(0)'); var responsesArray = []; var currentPage = 1; $('#facturasTable').off('page.dt').on('page.dt', function () { currentPage = table.page.info().page + 1; }); //CUANDO EL DOCUMENTO ESTE LISTO, SE EJECUTA ESTE CODIGO MANDANDO A LLAMAR UNA API PARA CONSULTAS DE SOLICITUDES CON EL STATUS 4 $(document).ready(function(){ var api = document.getElementById("api").value; var nombre_negocio = document.getElementById("nombre_negocio").value; //SE EJECUTA AJAX PARA MANDAR A LLAMAR A LA API, POR EL DATA SE MANDAN LOS PARAMETROS QUE NECESITA LA API PARA SU FUNCIONAMIENTO $.ajax({ data: {nombre_negocio:nombre_negocio}, //datos que se envian a traves de ajax url: api+'/api/historialSolicitudesCan', //archivo que recibe la peticion type: 'post', //método de envio dataType: 'json', beforeSend: function () { //SE MUESTRA UN MENSAJE DE CARGANDO MIENTRAS SE ESPERA UNA RESPUESTA $("#datos_soli").html('