<div class="mt-3" id="mznll">
  <form class="form-inline md-form mr-auto mb-4" action="{{ url('ref') }}" method="GET">
    <input class="form-control mr-sm-2" type="text" placeholder="Referencia" name="ref" aria-label="Search">
    <button class="btn btn-primary btn-rounded btn-sm my-0" type="submit">Buscar</button>
  </form>
  <div class="table-responsive mt-3">
      <table class="table"  id="tablemz">
          <thead>
              <tr><th class="text-center titulo-tabla-color" colspan="14">REFERENCIAS MANZANILLO</th></tr>
              <tr class="bg-priamry">
                <th class="columna">Editar</th>
                <th class="columna">Rectificar</th>
                <th class="columna">Detalles</th>
                <th class="columna">Folio</th>
                <th class="columna">Pedimento</th>
                <th class="columna">Cliente</th>
                <th class="columna">Tipo de operacion</th>
                <th class="columna">Tipo de carga</th>
                <th class="columna">Fecha ETA</th>
                <th class="columna">Fechar_Reg</th>
                <th class="columna">Ultimo pedido rectificado</th>
                <th class="columna">Usuario</th>
                <th class="columna">R</th>
                <th class="columna">Estatus</th>
              </tr>
          </thead>           
          <tbody>
              @foreach ($MZ as $var)
                  <tr>
                      @if ($var->pedimento == "0000000")
                          <td><button disabled data-toggle="modal" data-target="#editarREFMZ{{$var->id}}" class="btn btn-primary btn-sm"><i class="icon-pencil"></i></button></td>
                          <td><button disabled data-toggle="modal" data-target="#recRefMZ{{$var->id}}" class="btn btn-secundary btn-sm"><i style="font-size:24px;" class="icon-post_add"></i></button></td>
                          <td><button disabled data-toggle="modal" data-target="#detallesRefMZ{{$var->id}}" class="btn btn-info btn-sm"><i class="icon-th-small-outline"></i></button></td>
                      @else
                          <td><button data-toggle="modal" data-target="#editarREFMZ{{$var->id}}" class="btn btn-primary btn-sm"><i class="icon-pencil"></i></button></td>
                          <td><button data-toggle="modal" data-target="#recRefMZ{{$var->id}}" class="btn btn-secundary btn-sm"><i style="font-size:24px;" class="icon-post_add"></i></button></td>
                          <td><button data-toggle="modal" data-target="#detallesRefMZ{{$var->id}}" class="btn btn-info btn-sm"><i class="icon-th-small-outline"></i></button></td>
                      @endif
                      
                      <td>{{ $var->folio }}</td>
                      <td>{{ $var->pedimento }}</td>
                      <td>{{ $var->cliente }}</td>
                      <td>{{ $var->tip_operacion }}</td>
                      <td>{{ $var->tip_carga }}</td>
                      <td>{{ $var->fecha_eta }}</td>
                      <td>{{ $var->fecha_alt_ref }}</td>
                      <td>{{ $var->ped_rect }}</td>
                      <td>{{ $var->usuario }}</td>
                      <td>{{ $var->Rectifiaciones }}</td>
                      <td>{{ $var->estatus }}</td>
                  </tr>
                  
              @endforeach
          </tbody>
      </table>
      {!! $MZ->render() !!}
  </div>
</div>

@foreach ($MZ as $var)
@include('referencias.modales.detalles.mdl_refDetallesMZ')
@include('referencias.modales.editar.mdl_editarRefMZ')
@include('rectificaciones.modelos.recReferencias.rec_referenciasMZ')
@endforeach