<table id="tabla_cheques_rechazados" class="table table-bordered text-right">
    <thead>
        <tr class="text-center" style="background-color:#eeeeee;">
            <th>Nro. Cheque</th>
            <th>CUIT Firmante</th>
            <th>Nombre Firmante</th>
            <th>CUIT Empresa</th>
            <th>Nombre Empresa</th>
            <th>Causal</th>
            <th>Importe</th>
            <th>Fecha Rechazo</th>
            <th>Fecha Levantamiento</th>
            <th>Fecha Pago de Multa</th>
            <th class="visible">Tipo</th>
            <th class="visible">Estado</th>

            @if($visible == "1")
                <th class="no-sort"></th>
            @endif

            <th class="no-sort"><!--button class="mas btn btn-info btn-fidelitas">>></button--></th>

        </tr>
    </thead>

    <tbody>
        @foreach ($cheques_rechazados as $cheque)
            <tr>
                <td class="nro_cheque">{{$cheque->nro_cheque}}</td>
                <td class="cuit_firmante">{{$cheque->cuit_firmante}}</td>
                <td class="nombre_persona_firmante text-left">{{$cheque->nombre_persona_firmante}}</td>
                <td class="Cuit_relacionado">{{$cheque->Cuit_relacionado}}</td>
                <td class="nombre_persona_relacionado text-left">{{$cheque->nombre_persona_relacionado}}</td>
                <td class="codigo_causal text-left">{{$cheque->codigo_causal}}</td>
                <td class="importe">{{number_format($cheque->importe, 2, '.', ',')}}</td>
                <td class="fecha_rechazo">{{$cheque->fecha_rechazo}}</td>
                <td class="fecha_levantamiento">{{$cheque->fecha_levantamiento}}</td>
                <td class="fecha_pago">{{$cheque->fecha_pago}}</td>
                <td class="visible">{{$cheque->tipo}}</td>
                <td class="visible">{{$cheque->visible}}</td>

                @if($visible == "1")
                    <td>
                        <button id="modificar_{{$cheque->id_cheque}}" data-idcheque="{{$cheque->id_cheque}}" type="button"
                            class="btn btn-info btn-fidelitas text-center" data-toggle="modal" data-target="#myModal">
                            Modificar
                        </button>
                    </td>

                    <td>
                        <form name="baja_cheque_{{$cheque->id_cheque}}" class="baja_cheque_{{$cheque->id_cheque}}"
                            class="form-signin">
                            <input type="hidden" name="id_cheque" class="id" value="{{$cheque->id_cheque}}">
                            <input type="hidden" name="id_causa" class="id_causa" value="{{$cheque->id_causa}}">
                            <input type="hidden" name="_token" id="token" value="{{ csrf_token() }}">
                            <button class="btn btn-fidelitas text-center">Baja</button>
                        </form>
                    </td>
                @else
                    <td>
                        @if($cheque->habeas_data == "DENTRO DEL PLAZO DE HABEAS DATA")
                            <form name="baja_cheque_{{$cheque->id_cheque}}" class="baja_cheque_{{$cheque->id_cheque}}"
                                class="form-signin">
                                <input type="hidden" name="id_cheque" class="id" value="{{$cheque->id_cheque}}">
                                <input type="hidden" name="id_causa" class="id_causa" value="{{$cheque->id_causa}}">
                                <input type="hidden" name="_token" id="token" value="{{ csrf_token() }}">
                                @if($cheque->habeas_data == 'DENTRO DEL PLAZO DE HABEAS DATA')
                                    <button class="btn btn-fidelitas text-center">Activar</button>
                                @endif
                            </form>
                        @else
                            <label>{{$cheque->habeas_data}}</label>
                        @endif
                    </td>
                @endif
            </tr>
        @endforeach
    </tbody>

    <tfoot>
        <tr class="text-center" style="background-color:#eeeeee;">
            <th>Nro. Cheque</th>
            <th>CUIT Firmante</th>
            <th>Nombre Firmante</th>
            <th>CUIT Empresa</th>
            <th>Nombre Empresa</th>
            <th>Causal</th>
            <th>Importe</th>
            <th>Fecha Rechazo</th>
            <th>Fecha Levantamiento</th>
            <th>Fecha Pago de Multa</th>
            <th class="visible">Tipo</th>
            <th class="visible">Estado</th>

            @if($visible == "1")
                <th class="no-sort"></th>
            @endif

            <th class="no-sort"><!--button class="mas btn btn-info btn-fidelitas">>></button--></th>

        </tr>
    </tfoot>

</table>


<script>
    crearDataTable("#tabla_cheques_rechazados");
</script>