@include('header')
@include('navigator_no_cuit')

<form id="todos">
    <input type="hidden" name="_token" id="token" value="{{ csrf_token() }}">
</form>

<div class="container">
    <h3 class="text-center">
        <legend>Deudas Previsionales de {{ $nombre_persona }} - {{ $cuit }}
        </legend>
    </h3>
    <div class="text-center">
        <a href="/tablasgenerales/deuda-previsional"><button type="button" class="btn btn-primary btn-fidelitas">Buscar
                otro CUIT</button></a>
    </div>
</div>
<br><br>


<div class="container">
    <table id="tablaDeudasPrevionales" class="table table-bordered text-right table-hover">
        <thead>
            <tr class="text-center" style="background-color:#eeeeee;">
                <th>CUIT</th>
                <th>Razón Social</th>
                <th>Período</th>
                <th>Descripción</th>
                <th>Código</th>
                <th class="hidden"></th>
                <th>Fecha de Consulta</th>
        </thead>
        <tbody>

            @foreach ($datos as $dato)
                <tr class="text-center">
                    <td>{{$dato->cuit}}</td>
                    <td>{{$dato->nombre_persona}}</td>
                    <td>{{$dato->periodo_ym}}</td>
                    <td>{{$dato->tipo}}</td>
                    <td>{{$dato->codigo}}</td>
                    <td class="hidden">{{$dato->fecha_info}}</td>
                    <td>{{$dato->fecha_info_dmy}}</td>
                </tr>
            @endforeach
        </tbody>

    </table>
</div>
</div>

<script language="javascript">
    $(document).ready(function () {

        $('#tablaDeudasPrevionales').DataTable({
            "dom": 'fip<t>l',
            "pagingType": "full_numbers",
            "ordering": true,
            "info": true,
            "order": [],
            'columnDefs': [
                { 'orderData': [5], 'targets': [6] }, {
                    'targets': [5],
                    'searchable': true
                },],

            "lengthMenu": [[-1, 10, 20, 50, 100], ["Todos", 10, 20, 50, 100]],
            "pageLength": 20,
            "language": {
                "lengthMenu": "Mostrar _MENU_ registros por página",
                "zeroRecords": "No se encontraron  resultados para ésa búsqueda",
                //"info": "Mostrando página _PAGE_ de _PAGES_",
                "info": "Mostrando  _START_  de  _END_ - <b>Total:</b> _TOTAL_ registros",
                "infoEmpty": "No hay registros disponibles",
                "infoFiltered": "(filtrados de _MAX_ total de registros)",
                "sSearch": "Buscar",
                "oPaginate": {
                    "sFirst": "Primera",
                    "sPrevious": "Anterior",
                    "sNext": "Siguiente",
                    "sLast": "Última"
                },
            }
        });


    });
</script>

@include('footer')



