{{ $loop->index + 1 }} |
{{ $wpo_evacuation->mk_number }} |
{{ $wpo_evacuation->contract_number }} |
@if ($type == 'shipment')
@if ($wpo_evacuation->fac->allocation_letter->revise_ref_id != null)
(SD/{{ substr(optional(App\Model\allocation_letter::find($wpo_evacuation->fac->allocation_letter->revise_ref_id))->ref_number, 21) }})
|
@elseif ($wpo_evacuation->fac->allocation_letter->cancel_ref_id != null)
(SD/{{ substr(optional(App\Model\allocation_letter::find($wpo_evacuation->fac->allocation_letter->cancel_ref_id))->ref_number, 21) }})
|
@else
(SD/{{ substr(optional(optional($wpo_evacuation->fac)->allocation_letter)->ref_number, 21) }}) |
@endif
@endif
{{ $wpo_evacuation->consignee->name }} |
{{ $wpo_evacuation->contract->shipping_instruction?->consignee_reference }} |
{{ $wpo_evacuation->tonnage_to_be_evacuated }} |
{{ number_format($wpo_evacuation->shed_waybills()->sum('quantity') / 16, 4) }} |
@if ($type == 'local')
{{ number_format($wpo_evacuation->shed_waybills()->where('contract_id', $wpo_evacuation->contract_id)->get()->sum('net_weight'),4) }}
|
@endif
@if ($wpo_evacuation->letter_date != null)
{{ $wpo_evacuation->letter_date }} |
@else
{{ optional($wpo_evacuation->wpo_allocation_letters->last())->date }} |
@endif
{{ $wpo_evacuation->shipping_period }} |
{{ $wpo_evacuation->port->name }} |
{{-- @if ($wpo_evacuation->type == 'shipment')
{{ strtoupper($wpo_evacuation->type) }} |
@else
FACTORY |
@endif --}}
@foreach ($wpo_evacuation->shed_evacs->unique('date_assigned') as $shed_evac)
{{ $loop->index + 1 }}. |
Shed: {{ $shed_evac->shed->name }} |
Date of allocation: {{ $shed_evac->date_assigned }} |
Allocated Tonnage: {{ $shed_evac->tonnage_assigned }} |
Tonnage Fulfilled: {{ number_format($shed_evac->shed_waybills->sum('quantity') / 16, 4) }}
|
@if ($type == 'local')
Actual Tonnage Fulfilled:
{{ number_format($shed_evac->shed_waybills->sum('net_weight'), 4) }}
|
@endif
@endforeach
|
@endforeach