@section('page-title', 'Outturn Report: MV. ' . ($outturnReport->vessel_name ?: '-')) @php $items = $outturnReport->cargo_items ?? []; $totals = $outturnReport->totals ?? []; $totUnits = $totals['total_units'] ?? 0; $totPkgs = $totals['total_pkgs'] ?? 0; $totMtons = $totals['total_m_tons'] ?? 0; $totM3 = $totals['total_m3'] ?? 0; // Minimum rows for paper display $displayRowsCount = max(count($items), 12); @endphp
Kembali ke daftar Outturn Report

Outturn Report: MV. {{ $outturnReport->vessel_name ?: '-' }}

Voyage: {{ $outturnReport->voyage ?: '-' }} • Dermaga: {{ $outturnReport->berth ?: '-' }} • Discharging Port: {{ $outturnReport->discharging_port ?: '-' }}

@if(auth()->user()?->canModule('checker', 'edit')) Edit @endif Cetak / Print
@if(session('success'))
{{ session('success') }}
@endif {{-- Main Document Card (Matches Attached Document Exactly) --}}
{{-- Title Header --}}

OUTTURN REPORT

{{-- Sheet Number Box [ 3 ] on top right --}}
{{ $outturnReport->sheet_no ?: '1' }}
{{-- Vessel & Voyage Header Info --}}
NAME OF VESSEL : MV. {{ $outturnReport->vessel_name ?: '-' }} VOY. : {{ $outturnReport->voyage ?: '-' }}
BERTH : {{ $outturnReport->berth ?: '-' }} BERTHED ON :
{{ $outturnReport->berthed_on ?: '-' }} AT : {{ $outturnReport->berthed_at_hours ?: '-' }} HOURS
DISCHARGING PORT : {{ $outturnReport->discharging_port ?: '-' }} DEPARTURE ON :
{{ $outturnReport->departure_on ?: '-' }} AT : {{ $outturnReport->departure_at_hours ?: '-' }} HOURS
SHIPPING AGENT : {{ $outturnReport->resolved_shipping_agent ?: '-' }} STEVEDORING : {{ $outturnReport->resolved_stevedoring ?: '-' }}
@php $sheets = $outturnReport->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; $sMtons = $sTotals['total_m_tons'] ?? 0; $sM3 = $sTotals['total_m3'] ?? 0; $sNo = $sh['sheet_no'] ?? ($sIdx + 1); $displayRowsCount = max(count($sItems), 10); @endphp

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

Lembar ke-{{ $sIdx + 1 }} dari {{ count($sheets) }}
@for($i = 0; $i < $displayRowsCount; $i++) @php $row = $sItems[$i] ?? null; @endphp @endfor
LOADING PORT
B/L NO.
CONSIGNEE NAME DESCRIPTION OF CARGO UNITS PKGS TONS M3
{{ $row['loading_port_bl'] ?? '' }} {{ $row['consignee_name'] ?? '' }} {{ $row['cargo_description'] ?? '' }} {{ isset($row['units']) && $row['units'] !== '' ? number_format((float)$row['units']) : '' }} {{ isset($row['pkgs']) && $row['pkgs'] !== '' ? number_format((float)$row['pkgs']) : '' }} {{ isset($row['m_tons']) && $row['m_tons'] !== '' ? formatDecimal($row['m_tons']) : '' }} {{ isset($row['m3']) && $row['m3'] !== '' ? formatDecimal($row['m3']) : '' }}
TOTAL {{ number_format((float)$sUnits) }} {{ number_format((float)$sPkgs) }} {{ formatDecimal($sMtons, 2, true) }} {{ formatDecimal($sM3, 2, true) }}
@endforeach
{{-- Metadata & Delete Card --}}
Status: {{ $outturnReport->status }} • Dibuat: {{ $outturnReport->created_at?->translatedFormat('d F Y H:i') }} @if($outturnReport->creator) • Oleh: {{ $outturnReport->creator->name }} @endif @if($outturnReport->keterangan)
Catatan: {{ $outturnReport->keterangan }}
@endif
@if(auth()->user()?->canModule('checker', 'delete'))
@csrf @method('DELETE')
@endif