@section('page-title', 'Exception List: MV. ' . ($exceptionList->vessel_name ?: '-')) @php $isTypeC = $exceptionList->isTypeC(); $isTypeB = $exceptionList->isTypeB(); $items = $exceptionList->cargo_items ?? []; $totals = $exceptionList->totals ?? []; $totUnits = $totals['total_units'] ?? 0; $totPkgs = $totals['total_pkgs'] ?? 0; $totOver = $totals['total_over'] ?? 0; $totShort = $totals['total_short'] ?? 0; $displayRowsCount = max(count($items), 15); @endphp
Kembali ke daftar Exception List

Exception List: MV. {{ $exceptionList->vessel_name ?: '-' }}

Voyage: {{ $exceptionList->voyage ?: '-' }} • Dermaga: {{ $exceptionList->berth ?: '-' }} • Loading Port: {{ $exceptionList->loading_port ?: '-' }}

@if(auth()->user()?->canModule('checker', 'edit')) Edit @endif Cetak / Print
@if(session('success'))
{{ session('success') }}
@endif {{-- Main Document Card (Formatted like the Paper Sheet) --}}
{{-- Document Header --}}

{{ $exceptionList->title ?: ($isTypeC ? 'EXCEPTION LIST' : ($isTypeB ? 'EXCEPTION LIST ( B )' : 'EXCEPTION LIST ( A )')) }}

{{ $exceptionList->subtitle ?: ($isTypeC ? 'DAMAGE CARGO BEFORE' : ($isTypeB ? 'DAMAGE CARGO BEFORE ( FOR LOADING )' : '( SHORT AND EXCESS FOR LOADING )')) }}

@if($isTypeC)
{{ $exceptionList->isDischarging() || !$exceptionList->isLoading() ? '✓' : '' }} DISCHARGING {{ $exceptionList->isLoading() ? '✓' : '' }} LOADING
@endif
{{-- Vessel & Voyage Header Info --}}
{{-- Left column --}}
NAME OF VESSEL : MV. {{ $exceptionList->vessel_name ?: '-' }} VOY. : {{ $exceptionList->voyage ?: '-' }}
LOADING PORT : {{ $exceptionList->loading_port ?: '-' }}
DISCHARGING PORT : {{ $exceptionList->discharging_port ?: '-' }}
{{-- Right column --}}
@if(!$isTypeC)
BERTH : {{ $exceptionList->berth ?: '-' }}
@endif
BERTHED ON : {{ $exceptionList->berthed_on ?: '-' }}
SAILED ON : {{ $exceptionList->sailed_on ?: '-' }}
@php $sheets = $exceptionList->resolved_sheets; @endphp {{-- Main Cargo Manifest Tables (Multi-Sheet Supported) --}}
@if(count($sheets) > 1)
@foreach($sheets as $sIdx => $sh) @endforeach
@endif @foreach($sheets as $sIdx => $sh) @php $sItems = $sh['cargo_items'] ?? []; $sTotals = $sh['totals'] ?? []; $sUnits = $sTotals['total_units'] ?? 0; $sPkgs = $sTotals['total_pkgs'] ?? 0; $sOver = $sTotals['total_over'] ?? 0; $sShort = $sTotals['total_short'] ?? 0; $sNo = $sh['sheet_no'] ?? ($sIdx + 1); $displayRowsCount = max(count($sItems), 12); @endphp

Sheet {{ $sNo }} @if(!empty($sh['date'])) Tanggal: {{ $sh['date'] }} @endif

Lembar ke-{{ $sIdx + 1 }} dari {{ count($sheets) }}
@if($isTypeC) @elseif($isTypeB) @else @endif @for($i = 0; $i < $displayRowsCount; $i++) @php $row = $sItems[$i] ?? []; @endphp @if($isTypeC) @elseif($isTypeB) @else @endif @endfor @if(!$isTypeC) @endif @if(!$isTypeB && !$isTypeC) @endif
DESCRIPTION OF CARGO
VIN NOS / SERIAL NO.
UNITS PKGS REMARKS
B/L NO DESTINATION PORT DESCRIPTION OF CARGO UNITS PKGS STOWAGE NATURE OF DAMAGE AND REMARKS
B/L NO DESTINATION PORT DESCRIPTION OF CARGO UNITS PKGS STOWAGE OVER SHORT REMARKS
{{ $row['description'] ?? '' }} {{ isset($row['units']) && $row['units'] !== '' ? $row['units'] : '' }} {{ isset($row['pkgs']) && $row['pkgs'] !== '' ? $row['pkgs'] : '' }} {{ $row['remarks'] ?? '' }} {{ $row['bl_no'] ?? '' }} {{ $row['destination_port'] ?? '' }} {{ $row['description'] ?? '' }} {{ isset($row['units']) && $row['units'] !== '' ? $row['units'] : '' }} {{ isset($row['pkgs']) && $row['pkgs'] !== '' ? $row['pkgs'] : '' }} {{ $row['stowage'] ?? '' }} {{ $row['remarks'] ?? '' }} {{ $row['bl_no'] ?? '' }} {{ $row['destination_port'] ?? '' }} {{ $row['description'] ?? '' }} {{ isset($row['units']) && $row['units'] !== '' ? $row['units'] : '' }} {{ isset($row['pkgs']) && $row['pkgs'] !== '' ? $row['pkgs'] : '' }} {{ $row['stowage'] ?? '' }} {{ isset($row['over']) && $row['over'] !== '' ? $row['over'] : '' }} {{ isset($row['short']) && $row['short'] !== '' ? $row['short'] : '' }} {{ $row['remarks'] ?? '' }}
TOTAL {{ $sUnits > 0 ? number_format((float)$sUnits) : '0' }} {{ $sPkgs > 0 ? number_format((float)$sPkgs) : '' }}   {{ $sOver > 0 ? number_format((float)$sOver) : '' }} {{ $sShort > 0 ? number_format((float)$sShort) : '' }}
@endforeach
{{-- Additional Info & Actions Bar --}}
Status: {{ $exceptionList->status }} • Dibuat oleh: {{ $exceptionList->creator?->name ?? 'Admin' }} pada {{ $exceptionList->created_at?->format('d/m/Y H:i') ?? '-' }}
@if(auth()->user()?->canModule('checker', 'delete'))
@csrf @method('DELETE')
@endif