<div class="modal fade" id="modalEntidad" tabindex="-1" role="dialog" aria-labelledby="exampleModalLabel" aria-hidden="true">
  <div class="modal-dialog modal-lg" role="document">
    <div class="modal-content">
      <div class="modal-header">
        <h5 class="modal-title" id="exampleModalLabel">Seleccionar documento</h5>
        <button type="button" class="close" data-dismiss="modal" aria-label="Close">
          <span aria-hidden="true">&times;</span>
        </button>
      </div>
      <div class="modal-body">
      		<div class="row">
      			<div class="col-2">
      				<b>Entidad</b>
      			</div>
      			<div class="col-10">
      				<input type="text" readonly="" class="form-control" value="{{ $data['contable']->nombre }}">
      			</div>
      		</div>
      		<hr>
        	<table class="table  dataTable-r">
      			<thead>
              <th>Divisa</th>
      				<th>Documento</th>
      				<th>Fecha</th>
      				<th>Importe</th>
      				<th>Acciones</th>
      			</thead>
      			<tbody>
      				@if($data['search']->isNotEmpty())
      					@foreach ($data['search'] as $c)
								<tr>
                  <td>{{$c->divisa}}</td>
									<td class="item_f_document{{$c->id}}">{{$c->tipdocs->descor}}-{{ $c->serie }}-{{$c->numero}}</td>
									<td>{{$c->fec_emision}}</td>
									<td>{{$c->totales}}</td>
									<td><a href="#" data-id="{{ $c->id }}" id="item_f_relacional">Seleccionar</a></td>
								</tr>
      					@endforeach
      				@endif
      			</tbody>
	      	</table>
      </div>
    </div>
  </div>
</div>

<script>
    $.extend( $.fn.dataTable.defaults, {
        autoWidth: false,
        dom: '<"datatable-header"fl><"datatable-scroll"t><"datatable-footer"ip>',
        language: {
            search: '<span>Buscar:</span> _INPUT_',
            searchPlaceholder: 'Buscar...',
            lengthMenu: '<span>Mostrar:</span> _MENU_',
            paginate: { 'first': 'First', 'last': 'Last', 'next': $('html').attr('dir') == 'rtl' ? '&larr;' : '&rarr;', 'previous': $('html').attr('dir') == 'rtl' ? '&rarr;' : '&larr;' }
        }
    });
    var table = $('.dataTable-r').DataTable();
</script>