<div class="mt-3" id="vrcz">
  <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="refVZ" aria-label="Search">
    <button class="btn btn-primary btn-rounded btn-sm my-0" type="submit">Buscar</button>
  </form>
  <div class="table-responsive">
    <table class="table mt-3" id="tablevz">
        <thead>
            <tr><th class="text-center titulo-tabla-color" colspan="14">REFERENCIAS VERACRUZ</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 ($VZ as $var)
                <tr>
                    @if ($var->pedimento == "0000000")
                    <td><button disabled data-toggle="modal" data-target="#editarREFVZ{{$var->id}}" class="btn btn-primary btn-sm"><i class="icon-pencil"></i></button></td>
                    <td><button disabled data-toggle="modal" data-target="#recRefVZ{{$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="#detallesRefVZ{{$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="#editarREFVZ{{$var->id}}" class="btn btn-primary btn-sm"><i class="icon-pencil"></i></button></td>
                    <td><button data-toggle="modal" data-target="#recRefVZ{{$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="#detallesRefVZ{{$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 ($VZ as $var)
@include('referencias.modales.detalles.mdl_refDetallesVZ')
@include('referencias.modales.editar.mdl_editarRefVZ')
@include('rectificaciones.modelos.recReferencias.rec_referenciasVZ')
@endforeach