(function($) {
    'use strict';
    $(function() {
        $('#bindSegHandlersToEl').DataTable({
            order: [
                [3, "asc"]
            ],
            "aLengthMenu": [
                [5, 10, 15, -1],
                [5, 10, 15, "Todo"]
            ],
            "iDisplayLength": 10,
            "language": idioma,
        });
        $('#bindSegHandlersToEl').each(function() {
            var datatable = $(this);
            // SEARCH - Add the placeholder for Search and Turn this into in-line form control
            var search_input = datatable.closest('.dataTables_wrapper').find('div[id$=_filter] input');
            search_input.attr('placeholder', 'Buscar');
            search_input.removeClass('form-control-sm');
            // LENGTH - Inline-Form control
            var length_sel = datatable.closest('.dataTables_wrapper').find('div[id$=_length] select');
            length_sel.removeClass('form-control-sm');
        });
    });
})(jQuery);

(function($) {
    'use strict';
    $(function() {
        $('#ats').DataTable({
            order: [
                [0, "desc"]
            ],
            "aLengthMenu": [
                [5, 10, 15, -1],
                [5, 10, 15, "Todo"]
            ],
            "iDisplayLength": 10,
            "language": idioma,
        });
        $('#ats').each(function() {
            var datatable = $(this);
            // SEARCH - Add the placeholder for Search and Turn this into in-line form control
            var search_input = datatable.closest('.dataTables_wrapper').find('div[id$=_filter] input');
            search_input.attr('placeholder', 'Buscar');
            search_input.removeClass('form-control-sm');
            // LENGTH - Inline-Form control
            var length_sel = datatable.closest('.dataTables_wrapper').find('div[id$=_length] select');
            length_sel.removeClass('form-control-sm');
        });
    });
})(jQuery);

(function($) {
    'use strict';
    $(function() {
        $('#tablaAbonos').DataTable({
            order: [
                [0, "desc"]
            ],
            "aLengthMenu": [
                [5, 10, 15, -1],
                [5, 10, 15, "Todo"]
            ],
            "iDisplayLength": 10,
            "language": idioma,
        });
        $('#tablaAbonos').each(function() {
            var datatable = $(this);
            // SEARCH - Add the placeholder for Search and Turn this into in-line form control
            var search_input = datatable.closest('.dataTables_wrapper').find('div[id$=_filter] input');
            search_input.attr('placeholder', 'Buscar');
            search_input.removeClass('form-control-sm');
            // LENGTH - Inline-Form control
            var length_sel = datatable.closest('.dataTables_wrapper').find('div[id$=_length] select');
            length_sel.removeClass('form-control-sm');
        });
    });
})(jQuery);

(function($) {
    'use strict';
    $(function() {
        $('#tablaVentas').DataTable({
            order: [
                [0, "desc"]
            ],
            "aLengthMenu": [
                [5, 10, 15, -1],
                [5, 10, 15, "Todo"]
            ],
            "iDisplayLength": 10,
            "language": idioma,
        });
        $('#tablaVentas').each(function() {
            var datatable = $(this);
            // SEARCH - Add the placeholder for Search and Turn this into in-line form control
            var search_input = datatable.closest('.dataTables_wrapper').find('div[id$=_filter] input');
            search_input.attr('placeholder', 'Buscar');
            search_input.removeClass('form-control-sm');
            // LENGTH - Inline-Form control
            var length_sel = datatable.closest('.dataTables_wrapper').find('div[id$=_length] select');
            length_sel.removeClass('form-control-sm');
        });
    });
})(jQuery);

(function($) {
    'use strict';
    $(function() {
        $('#tablaUsuarios').DataTable({
            order: [
                [0, "desc"]
            ],
            "aLengthMenu": [
                [5, 10, 15, -1],
                [5, 10, 15, "Todo"]
            ],
            "iDisplayLength": 12,
            "language": idioma,
        });
        $('#tablaUsuarios').each(function() {
            var datatable = $(this);
            // SEARCH - Add the placeholder for Search and Turn this into in-line form control
            var search_input = datatable.closest('.dataTables_wrapper').find('div[id$=_filter] input');
            search_input.attr('placeholder', 'Buscar');
            search_input.removeClass('form-control-sm');
            // LENGTH - Inline-Form control
            var length_sel = datatable.closest('.dataTables_wrapper').find('div[id$=_length] select');
            length_sel.removeClass('form-control-sm');
        });
    });
})(jQuery);

(function($) {
    'use strict';
    $(function() {
        $('#tablaProductosLista').DataTable({
            order: [
                [1, "asc"]
            ],
            "aLengthMenu": [
                [5, 10, 15, -1],
                [5, 10, 15, "Todo"]
            ],
            "iDisplayLength": 10,
            "language": idioma,
        });
        $('#tablaProductosLista').each(function() {
            var datatable = $(this);
            // SEARCH - Add the placeholder for Search and Turn this into in-line form control
            var search_input = datatable.closest('.dataTables_wrapper').find('div[id$=_filter] input');
            search_input.attr('placeholder', 'Buscar');
            search_input.removeClass('form-control-sm');
            // LENGTH - Inline-Form control
            var length_sel = datatable.closest('.dataTables_wrapper').find('div[id$=_length] select');
            length_sel.removeClass('form-control-sm');
        });
    });
})(jQuery);


(function($) {
    'use strict';
    $(function() {
        $('#tablaProductos1').DataTable({
            order: [
                [0, "desc"]
            ],
            "aLengthMenu": [
                [5, 10, 15, -1],
                [5, 10, 15, "Todo"]
            ],
            "iDisplayLength": 10,
            "language": idioma,
            retrieve: true, //opcion para evitar error de datatable por doble
            destroy: true,
        });
        $('#tablaProductos1').each(function() {
            var datatable = $(this);
            // SEARCH - Add the placeholder for Search and Turn this into in-line form control
            var search_input = datatable.closest('.dataTables_wrapper').find('div[id$=_filter] input');
            search_input.attr('placeholder', 'Buscar');
            search_input.removeClass('form-control-sm');
            // LENGTH - Inline-Form control
            var length_sel = datatable.closest('.dataTables_wrapper').find('div[id$=_length] select');
            length_sel.removeClass('form-control-sm');
        });
    });
})(jQuery);


(function($) {
    'use strict';
    $(function() {
        $('#tablaVentasVend').DataTable({
            order: [
                [0, "asc"]
            ],
            "aLengthMenu": [
                [5, 10, 15, -1],
                [5, 10, 15, "Todo"]
            ],
            "iDisplayLength": 10,
            "language": idioma,
        });
        $('#tablaVentasVend').each(function() {
            var datatable = $(this);
            // SEARCH - Add the placeholder for Search and Turn this into in-line form control
            var search_input = datatable.closest('.dataTables_wrapper').find('div[id$=_filter] input');
            search_input.attr('placeholder', 'Buscar');
            search_input.removeClass('form-control-sm');
            // LENGTH - Inline-Form control
            var length_sel = datatable.closest('.dataTables_wrapper').find('div[id$=_length] select');
            length_sel.removeClass('form-control-sm');
        });
    });
})(jQuery);

(function($) {
    'use strict';
    $(function() {
        $('#tablaVentasVend1').DataTable({
            order: [
                [0, "desc"]
            ],
            "aLengthMenu": [
                [5, 10, 15, -1],
                [5, 10, 15, "Todo"]
            ],
            "iDisplayLength": 10,
            "language": idioma,
        });
        $('#tablaVentasVend1').each(function() {
            var datatable = $(this);
            // SEARCH - Add the placeholder for Search and Turn this into in-line form control
            var search_input = datatable.closest('.dataTables_wrapper').find('div[id$=_filter] input');
            search_input.attr('placeholder', 'Buscar');
            search_input.removeClass('form-control-sm');
            // LENGTH - Inline-Form control
            var length_sel = datatable.closest('.dataTables_wrapper').find('div[id$=_length] select');
            length_sel.removeClass('form-control-sm');
        });
    });
})(jQuery);



(function($) {
    'use strict';
    $(function() {
        $('#tablaVentasVend2').DataTable({
            order: [
                [0, "desc"]
            ],
            "aLengthMenu": [
                [5, 10, 15, -1],
                [5, 10, 15, "Todo"]
            ],
            "iDisplayLength": 10,
            "language": idioma,
        });
        $('#tablaVentasVend2').each(function() {
            var datatable = $(this);
            // SEARCH - Add the placeholder for Search and Turn this into in-line form control
            var search_input = datatable.closest('.dataTables_wrapper').find('div[id$=_filter] input');
            search_input.attr('placeholder', 'Buscar');
            search_input.removeClass('form-control-sm');
            // LENGTH - Inline-Form control
            var length_sel = datatable.closest('.dataTables_wrapper').find('div[id$=_length] select');
            length_sel.removeClass('form-control-sm');
        });
    });
})(jQuery);

(function($) {
    'use strict';
    $(function() {
        $('#tablaVentasVend4').DataTable({
            order: [
                [0, "desc"]
            ],
            "aLengthMenu": [
                [5, 10, 15, -1],
                [5, 10, 15, "Todo"]
            ],
            "iDisplayLength": 10,
            "language": idioma,
        });
        $('#tablaVentasVend4').each(function() {
            var datatable = $(this);
            // SEARCH - Add the placeholder for Search and Turn this into in-line form control
            var search_input = datatable.closest('.dataTables_wrapper').find('div[id$=_filter] input');
            search_input.attr('placeholder', 'Buscar');
            search_input.removeClass('form-control-sm');
            // LENGTH - Inline-Form control
            var length_sel = datatable.closest('.dataTables_wrapper').find('div[id$=_length] select');
            length_sel.removeClass('form-control-sm');
        });
    });
})(jQuery);



(function($) {
    'use strict';
    $(function() {
        $('#tablaVentasPdv').DataTable({
            order: [
                [0, "desc"]
            ],
            "aLengthMenu": [
                [5, 10, 15, -1],
                [5, 10, 15, "Todo"]
            ],
            "iDisplayLength": 10,
            "language": idioma,
        });
        $('#tablaVentasPdv').each(function() {
            var datatable = $(this);
            // SEARCH - Add the placeholder for Search and Turn this into in-line form control
            var search_input = datatable.closest('.dataTables_wrapper').find('div[id$=_filter] input');
            search_input.attr('placeholder', 'Buscar');
            search_input.removeClass('form-control-sm');
            // LENGTH - Inline-Form control
            var length_sel = datatable.closest('.dataTables_wrapper').find('div[id$=_length] select');
            length_sel.removeClass('form-control-sm');
        });
    });
})(jQuery);

(function($) {
    'use strict';
    $(function() {
        $('#tablaProductosLista1').DataTable({
            order: [
                [0, "desc"]
            ],
            "aLengthMenu": [
                [5, 10, 15, -1],
                [5, 10, 15, "Todo"]
            ],
            "iDisplayLength": 10,
            "language": idioma,
            retrieve: true,
            destroy: true,
        });
        $('#tablaProductosLista1').each(function() {
            var datatable = $(this);
            // SEARCH - Add the placeholder for Search and Turn this into in-line form control
            var search_input = datatable.closest('.dataTables_wrapper').find('div[id$=_filter] input');
            search_input.attr('placeholder', 'Buscar');
            search_input.removeClass('form-control-sm');
            // LENGTH - Inline-Form control
            var length_sel = datatable.closest('.dataTables_wrapper').find('div[id$=_length] select');
            length_sel.removeClass('form-control-sm');
        });
    });
})(jQuery);



(function($) {
    'use strict';
    $(function() {
        $('#tablaProductosLista2').DataTable({
            order: [
                [0, "asc"]
            ],
            "aLengthMenu": [
                [10, 20, 30, -1],
                [10, 20, 30, "Todo"]
            ],
            "iDisplayLength": 20,
            "language": idioma,
            "info": false,
            "paging": false,
            "responsive": true,
            "searching": false,
            "paging": false,
            "info": false,
            "aoColumnDefs": [{
                'bSortable': false,
                'aTargets': [0, 1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 12, 13]
            }],
            retrieve: true, //opcion para evitar error de datatable por doble
            destroy: true,
        });
        $('#tablaProductosLista2').each(function() {
            var datatable = $(this);
            // SEARCH - Add the placeholder for Search and Turn this into in-line form control
            var search_input = datatable.closest('.dataTables_wrapper').find('div[id$=_filter] input');
            search_input.attr('placeholder', 'Buscar');
            search_input.removeClass('form-control-sm');
            // LENGTH - Inline-Form control
            var length_sel = datatable.closest('.dataTables_wrapper').find('div[id$=_length] select');
            length_sel.removeClass('form-control-sm');
        });
    });
})(jQuery);


(function($) {
    'use strict';
    $(function() {
        $('#tablaClientesBusq').DataTable({
            order: [
                [0, "desc"]
            ],
            "aLengthMenu": [
                [5, 10, 15, -1],
                [5, 10, 15, "Todo"]
            ],
            "iDisplayLength": 10,
            "language": idioma,
            retrieve: true, //opcion para evitar error de datatable por doble
            destroy: true,
        });
        $('#tablaClientesBusq').each(function() {
            var datatable = $(this);
            // SEARCH - Add the placeholder for Search and Turn this into in-line form control
            var search_input = datatable.closest('.dataTables_wrapper').find('div[id$=_filter] input');
            search_input.attr('placeholder', 'Buscar');
            search_input.removeClass('form-control-sm');
            // LENGTH - Inline-Form control
            var length_sel = datatable.closest('.dataTables_wrapper').find('div[id$=_length] select');
            length_sel.removeClass('form-control-sm');
        });
    });
})(jQuery);

(function($) {
    'use strict';
    $(function() {
        $('#2').DataTable({
            "aLengthMenu": [
                [5, 10, 15, -1],
                [5, 10, 15, "Todo"]
            ],
            "iDisplayLength": 10,
            "language": idioma,
            retrieve: true, //opcion para evitar error de datatable por doble
            destroy: true,
        });
        $('#2').each(function() {
            var datatable = $(this);
            // SEARCH - Add the placeholder for Search and Turn this into in-line form control
            var search_input = datatable.closest('.dataTables_wrapper').find('div[id$=_filter] input');
            search_input.attr('placeholder', 'Buscar');
            search_input.removeClass('form-control-sm');
            // LENGTH - Inline-Form control
            var length_sel = datatable.closest('.dataTables_wrapper').find('div[id$=_length] select');
            length_sel.removeClass('form-control-sm');
        });
    });
})(jQuery);

(function($) {
    'use strict';
    $(function() {
        $('#3').DataTable({
            "aLengthMenu": [
                [5, 10, 15, -1],
                [5, 10, 15, "Todo"]
            ],
            "iDisplayLength": 10,
            "language": idioma,
        });
        $('#3').each(function() {
            var datatable = $(this);
            // SEARCH - Add the placeholder for Search and Turn this into in-line form control
            var search_input = datatable.closest('.dataTables_wrapper').find('div[id$=_filter] input');
            search_input.attr('placeholder', 'Buscar');
            search_input.removeClass('form-control-sm');
            // LENGTH - Inline-Form control
            var length_sel = datatable.closest('.dataTables_wrapper').find('div[id$=_length] select');
            length_sel.removeClass('form-control-sm');
        });
    });
})(jQuery);

(function($) {
    'use strict';
    $(function() {
        $('#tablaReportesHtml').DataTable({
            buttons: [
                'copy', 'csv', 'excel', 'pdf', 'print'
            ],
            order: [
                [3, "asc"]
            ],
            "aLengthMenu": [
                [5, 10, 15, -1],
                [5, 10, 15, "Todo"]
            ],
            "iDisplayLength": 10,
            "language": idioma,
        });
        $('#tablaReportesHtml').each(function() {
            var datatable = $(this);
            // SEARCH - Add the placeholder for Search and Turn this into in-line form control
            var search_input = datatable.closest('.dataTables_wrapper').find('div[id$=_filter] input');
            search_input.attr('placeholder', 'Buscar');
            search_input.removeClass('form-control-sm');
            // LENGTH - Inline-Form control
            var length_sel = datatable.closest('.dataTables_wrapper').find('div[id$=_length] select');
            length_sel.removeClass('form-control-sm');
        });
    });
})(jQuery);


(function($) {
    'use strict';
    $(function() {
        $('#tablaKardex1').DataTable({
            buttons: [
                'copy', 'csv', 'excel', 'pdf', 'print'
            ],
            order: [
                [0, "desc"]
            ],
            "aLengthMenu": [
                [5, 10, 15, -1],
                [5, 10, 15, "Todo"]
            ],
            "iDisplayLength": 10,
            "language": idioma,
        });
        $('#tablaKardex1').each(function() {
            var datatable = $(this);
            // SEARCH - Add the placeholder for Search and Turn this into in-line form control
            var search_input = datatable.closest('.dataTables_wrapper').find('div[id$=_filter] input');
            search_input.attr('placeholder', 'Buscar');
            search_input.removeClass('form-control-sm');
            // LENGTH - Inline-Form control
            var length_sel = datatable.closest('.dataTables_wrapper').find('div[id$=_length] select');
            length_sel.removeClass('form-control-sm');
        });
    });
})(jQuery);

var idioma = {
    "sProcessing": "Procesando...",
    "sLengthMenu": "Mostrar _MENU_ registros",
    "sZeroRecords": "No se encontraron resultados",
    "sEmptyTable": "Ningún dato disponible en esta tabla",
    "sInfo": "Mostrando registros del _START_ al _END_ de un total de _TOTAL_ registros",
    "sInfoEmpty": "Mostrando registros del 0 al 0 de un total de 0 registros",
    "sInfoFiltered": "(filtrado de un total de _MAX_ registros)",
    "sInfoPostFix": "",
    "sSearch": "Buscar:",
    "sUrl": "",
    "sInfoThousands": ",",
    "sLoadingRecords": "Cargando...",
    "oPaginate": {
        "sFirst": "Primero",
        "sLast": "Ãšltimo",
        "sNext": "Siguiente",
        "sPrevious": "Anterior"
    },
    "oAria": {
        "sSortAscending": ": Activar para ordenar la columna de manera ascendente",
        "sSortDescending": ": Activar para ordenar la columna de manera descendente"
    },
    "buttons": {
        "copyTitle": 'Informacion copiada',
        "copyKeys": 'Use your keyboard or menu to select the copy command',
        "copySuccess": {
            "_": '%d filas copiadas al portapapeles',
            "1": '1 fila copiada al portapapeles'
        },
        "pageLength": {
            "_": "Mostrar %d filas",
            "-1": "Mostrar Todo"
        }
    }
};