@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; // Portrait needs ~28 rows to fill page, landscape ~20 rows $totalRowsToPrint = $isTypeC ? max(count($items), 28) : max(count($items), 20); @endphp
{{ $exceptionList->title ?: 'EXCEPTION LIST' }} - MV. {{ $exceptionList->vessel_name ?: '-' }} (Voyage: {{ $exceptionList->voyage ?: '-' }} • Total Lembar: {{ count($exceptionList->resolved_sheets) }})
Kembali
@php $sheets = $exceptionList->resolved_sheets; @endphp @foreach($sheets as $sIdx => $sh) @php $items = $sh['cargo_items'] ?? []; $totals = $sh['totals'] ?? []; $totUnits = $totals['total_units'] ?? 0; $totPkgs = $totals['total_pkgs'] ?? 0; $totOver = $totals['total_over'] ?? 0; $totShort = $totals['total_short'] ?? 0; $sNo = $sh['sheet_no'] ?? ($sIdx + 1); @endphp
{{-- Kop Surat Perusahaan --}}
Kop Surat PT. Anugrah Permata Samudra
{{-- Top Title --}}

{{ $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 )')) }}

{{ $sNo }}
@if($isTypeC)
{{ $exceptionList->isDischarging() || !$exceptionList->isLoading() ? '✓' : '' }} DISCHARGING {{ $exceptionList->isLoading() ? '✓' : '' }} LOADING
@endif
{{-- Header Info Table --}} @if($isTypeC) {{-- Header Layout for Format C (Matches attached image) --}}
NAME OF VESSEL : MV. {{ $exceptionList->vessel_name ?: '' }} VOY. {{ $exceptionList->voyage ?: '' }}
LOADING PORT : {{ $exceptionList->loading_port ?: '' }} BERTHED ON : {{ $exceptionList->berthed_on ?: '' }}
DISCHARGING PORT : {{ $exceptionList->discharging_port ?: '' }} SAILED ON : {{ $exceptionList->sailed_on ?: '' }}
@else {{-- Header Layout for Format A & B --}}
NAME OF VESSEL : MV. {{ $exceptionList->vessel_name ?: '' }} VOY. {{ $exceptionList->voyage ?: '' }} BERTH : {{ $exceptionList->berth ?: '' }}
LOADING PORT : {{ $exceptionList->loading_port ?: '' }} BERTHED ON : {{ $exceptionList->berthed_on ?: '' }}
DISCHARGING PORT : {{ $exceptionList->discharging_port ?: '' }} SAILED ON : {{ $exceptionList->sailed_on ?: '' }}
@endif {{-- Main Table --}} @if($isTypeC) @elseif($isTypeB) @else @endif @php $rowsToRender = !empty($items) ? $items : [[]]; @endphp @foreach($rowsToRender as $row) @if($isTypeC) @elseif($isTypeB) @else @endif @endforeach @if($isTypeC) @elseif($isTypeB) @else @endif
DESCRIPTION OF CARGO
VIN NOS / SERIAL NO.
QUANTITY REMARKS
UNITS PKGS
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
{!! !empty($row['description']) ? e($row['description']) : ' ' !!} {{ isset($row['units']) && $row['units'] !== '' ? $row['units'] : '' }} {{ isset($row['pkgs']) && $row['pkgs'] !== '' ? $row['pkgs'] : '' }} {!! !empty($row['remarks']) ? e($row['remarks']) : ' ' !!} {!! !empty($row['bl_no']) ? e($row['bl_no']) : ' ' !!} {!! !empty($row['destination_port']) ? e($row['destination_port']) : ' ' !!} {!! !empty($row['description']) ? e($row['description']) : ' ' !!} {{ isset($row['units']) && $row['units'] !== '' ? $row['units'] : '' }} {{ isset($row['pkgs']) && $row['pkgs'] !== '' ? $row['pkgs'] : '' }} {!! !empty($row['stowage']) ? e($row['stowage']) : ' ' !!} {!! !empty($row['remarks']) ? e($row['remarks']) : ' ' !!} {!! !empty($row['bl_no']) ? e($row['bl_no']) : ' ' !!} {!! !empty($row['destination_port']) ? e($row['destination_port']) : ' ' !!} {!! !empty($row['description']) ? e($row['description']) : ' ' !!} {{ isset($row['units']) && $row['units'] !== '' ? $row['units'] : '' }} {{ isset($row['pkgs']) && $row['pkgs'] !== '' ? $row['pkgs'] : '' }} {!! !empty($row['stowage']) ? e($row['stowage']) : ' ' !!} {{ isset($row['over']) && $row['over'] !== '' ? $row['over'] : '' }} {{ isset($row['short']) && $row['short'] !== '' ? $row['short'] : '' }} {!! !empty($row['remarks']) ? e($row['remarks']) : ' ' !!}
TOTAL {{ $totUnits > 0 ? number_format((float)$totUnits) : '0' }} {{ $totPkgs > 0 ? number_format((float)$totPkgs) : '' }}
TOTAL {{ $totUnits > 0 ? number_format((float)$totUnits) : '0' }} {{ $totPkgs > 0 ? number_format((float)$totPkgs) : '' }}
TOTAL {{ $totUnits > 0 ? number_format((float)$totUnits) : '0' }} {{ $totPkgs > 0 ? number_format((float)$totPkgs) : '' }} {{ $totOver > 0 ? number_format((float)$totOver) : '' }} {{ $totShort > 0 ? number_format((float)$totShort) : '' }}
{{-- Signatures Section (Matching image layout) --}}
{{ $isTypeC ? 'CHECKER' : 'CHIEF CHECKER' }}
{{ $exceptionList->chief_checker ?: '' }}
CHIEF OFFICER
{{ $exceptionList->chief_officer ?: '' }}
@endforeach