@extends('admin.layout.app') @section('more-head') @endsection @section('main-content') OPERATIONS MANAGEMENT SYSTEM LETTER REFERENCE {{ strtoupper($allocation_letter->ref_number) }} ON SP({{ $allocation_letter->shipping_programme->sp_ref }}) FOR {{ $allocation_letter->port->name }} @include('includes.messages') {{ csrf_field() }} {{ method_field('PUT') }} Contract Number Contract Number @if ($allocation_letter->allocation_status == 'revise') @foreach ($allocation_letter->shipping_programme->facs()->where('vessel_id', $allocation_letter->vessel_id)->where('loadingport_id', $allocation_letter->port_id)->whereBetween('eta', [$allocation_letter->eta_dfrom, $allocation_letter->eta_dto])->orWhereHas('allocation_letter', function ($query) use ($allocation_letter) { $query->whereNotNull('cancel_ref_id'); })->get() as $fac) fac_id == $fac->id) selected @endif> {{ $fac->contract->number }} @endforeach @else @foreach ($allocation_letter->shipping_programme->facs()->where('vessel_id', $allocation_letter->vessel_id)->whereBetween('eta', [$allocation_letter->eta_dfrom, $allocation_letter->eta_dto])->whereNull('allocation_letter_id')->orWhereNotNull('cancelled_allocation_letter_id')->get() as $fac) fac_id == $fac->id) selected @endif> {{ $fac->contract->number }} @endforeach @endif Destinations Destinations @foreach ($allocation_letter->destinationports as $destinationport) destinationport_id == $destinationport->id) selected @endif> {{ $destinationport->name }} @endforeach @endsection @section('more-scripts') @endsection