@extends('layouts.app') @section('title', 'Container Plan #'.optional($plan)->plan_number) @section('breadcrumbs') @endsection @section('content')

{{ $plan->plan_number }}

Container: {{ $plan->container_number ?? 'N/A' }} | {{ strtoupper($plan->container_size ?? '') }}

Back
Loaded Items
@forelse($plan->items as $index => $item) @empty @endforelse
#ProductDescriptionQtyWeight (MT)Volume (CBM)Packages
{{ $index + 1 }}{{ $item->product->name ?? 'N/A' }}{{ $item->description }}{{ number_format($item->quantity, 2) }}{{ number_format($item->weight, 3) }}{{ number_format($item->volume, 3) }}{{ $item->packages ?? 0 }}
No items loaded
Total{{ $plan->items->sum('quantity') }}{{ number_format($plan->items->sum('weight'), 3) }}{{ number_format($plan->items->sum('volume'), 3) }}{{ $plan->items->sum('packages') }}
Container Utilization
@php $wp = $plan->max_payload > 0 ? round($plan->items->sum('weight') / $plan->max_payload * 100, 1) : 0; @endphp @php $vp = $plan->max_volume > 0 ? round($plan->items->sum('volume') / $plan->max_volume * 100, 1) : 0; @endphp
Weight{{ $wp }}%
{{ number_format($plan->items->sum('weight'), 3) }} / {{ $plan->max_payload }} MT
Volume{{ $vp }}%
{{ number_format($plan->items->sum('volume'), 3) }} / {{ $plan->max_volume }} CBM
Order{{ $plan->order->order_number ?? 'N/A' }}
Status{{ ucfirst($plan->status) }}
@endsection