
/* data table*/
$('.tablas').DataTable({
    "autoWidth": false,
    "order":[[2, 'asc']],
    "stateSave":  true,
    "deferRender":true,
    "retrieve":true,
    "processing": false,
    "sScrollY": "70vh",
    "scrollCollapse":true,
    "paging":false,
    "language": {

            "decimal": "",
            "sEmptyTable": "No hay información",
            "sInfo": "Mostrando _START_ a _END_ de _TOTAL_ Entradas",
            "sInfoEmpty": "Mostrando 0 to 0 of 0 Entradas",
            "sInfoFiltered": "(Filtrado de _MAX_ total entradas)",
            "sInfoPostFix": "",
            "sInfoThousands": ",",
            "sLengthMenu": "Mostrar _MENU_ Entradas",
            "sLoadingRecords": "Cargando...",
            "sProcessing": "Procesando...",
            "sSearch": "Buscar:",
            "sZeroRecords": "Sin resultados encontrados",
            "oPaginate": {
                "sFirst": "Primero",
                "sLast": "Ultimo",
                "sNext": "Siguiente",
                "sPrevious": "Anterior"
            },
            "oAria": {
                "sSortAscending": ": Activar para ordenar la columna de manera ascendete",
                "sSortDescending": ": Activar para ordenar la columna de manera descendete",
            }
        },
        "dom": "Bfrtilp",
                "buttons": [
                    {
                        "extend": "pdfHtml5",
                        "download": "open",
                        "text": "<i class='fas fa-file-pdf'></i>",
                        "titleAttr" : "Exportar a pdf",
                        "className": 'btn btn-danger',
                        "filename" : function() {
                            return "Unidades"      
                          },      
                        "customize": function(doc) {
                            doc.defaultStyle.fontSize = 8; 
                            doc.defaultStyle.alignment = 'justify'
                            
                         
                        },
                        "footer": true

                    },
                    {
                        "extend": "print",
                        "text": "<i class='fa fa-print'></i>",
                        "titleAttr" : "Imprimir",
                        "className": 'btn btn-info',
                        "customize": function (win) {
                            $(win.document.body)
                                .css( "font-size", "8pt" )
                            $(win.document.body).find( "table" )
                                .addClass( "compact" )
                                .css( "font-size", "8pt" );
                        }
                    }
                ]
        
});



$('input[type="checkbox"].minimal, input[type="radio"].minimal').iCheck({
    checkboxClass: 'icheckbox_minimal-blue',
    radioClass: 'iradio_minimal-blue'
})

//Datemask dd/mm/yyyy
$('#datemask').inputmask('dd/mm/yyyy', { 'placeholder': 'dd/mm/yyyy' })
//Datemask2 mm/dd/yyyy
$('#datemask2').inputmask('mm/dd/yyyy', { 'placeholder': 'mm/dd/yyyy' })
//Money Euro
$('[data-mask]').inputmask()





