@extends('layouts.structure') @section('content') Dispatch Details for Plan

Dispatch Details for {{ $plan->client->client_name }}

@if (session('success'))
{{ session('success') }}
@endif @if (session('error'))
{{ session('error') }}
@endif

Plan Information

Client Name: {{ $plan->client->client_name ?? 'N/A' }}

Coil Details

@if ($plan->coil)
CRR No.: {{ $plan->coil->crr_no ?? 'N/A' }}
Net Weight (TON): {{ $plan->coil->net_weight ? number_format($plan->coil->net_weight, 3) : 'N/A' }}
Gross Weight (TON): {{ $plan->coil->gross_weight ? number_format($plan->coil->gross_weight, 3) : 'N/A' }}
Width (mm): {{ $plan->coil->width ? number_format($plan->coil->width, 2) : 'N/A' }}
Thickness (mm): {{ $plan->coil->thickness ? number_format($plan->coil->thickness, 2) : 'N/A' }}
@else

No coil details available.

@endif

Transport Details

@if ($dispatches->isNotEmpty())
@foreach ($dispatches as $dispatch) @endforeach
Dispatched Weight & Dimensions Process Type Vehicle Details Driver Name Transport Date Destination Remark
@php $weight = $dispatch->dispatched_wt ?? 'N/A'; $dimensions = 'N/A'; if ($dispatch->type === 'ctl' && $dispatch->ctlCut) { $width = $dispatch->ctlCut->cut_width ?? 'N/A'; $length = $dispatch->ctlCut->cut_length ?? 'N/A'; $dimensions = $width !== 'N/A' && $length !== 'N/A' ? number_format($width, 1) . ' x ' . number_format($length, 0) . ' mm' : 'N/A'; } elseif ($dispatch->type === 'crs' && $dispatch->crsCut) { $cutWidth = $dispatch->crsCut->cut_width ?? null; $quantity = $dispatch->crsCut->quantity ?? null; $dimensions = $cutWidth !== null && $quantity !== null ? number_format($cutWidth, 1) . ' x ' . $quantity . ' mm' : 'N/A'; } @endphp {{ $weight !== 'N/A' ? $weight . ' TON' : 'N/A' }} @if ($dimensions !== 'N/A')
{{ $dimensions }} @endif
{{ $dispatch->type ?? 'N/A' }} {{ $dispatch->vehicle_no ?? 'N/A' }} {{ $dispatch->driver_name ?? 'N/A' }} {{ $dispatch->transport_date ?? 'N/A' }} {{ $dispatch->destination ?? 'N/A' }} {{ $dispatch->cut_remark ?? 'N/A' }}
@else

No transport details available for this plan.

@endif
{{-- Process Details --}} {{--

Process Details

@if ($plan->processes->isNotEmpty())
@foreach ($plan->processes as $process) @endforeach
Process Type Total Cuts Total Weight (TON) Cut Details
{{ strtoupper($process->process_type) }} {{ $process->process_type === 'crs' ? $process->crsCuts->count() : $process->ctlCuts->count() }} {{ $process->process_type === 'crs' ? number_format($process->crsCuts->sum('current_weight'), 3) : number_format($process->ctlCuts->sum('current_weight'), 3) }} @if ($process->process_type === 'crs') @if ($process->crsCuts->isNotEmpty())
    @foreach ($process->crsCuts as $cut)
  • Width: {{ number_format($cut->cut_width, 2) }} mm, Weight: {{ number_format($cut->current_weight, 3) }} TON
  • @endforeach
@else No CRS cuts available. @endif @else @if ($process->ctlCuts->isNotEmpty())
    @foreach ($process->ctlCuts as $cut)
  • Width: {{ number_format($cut->cut_width, 2) }} mm, Length: {{ number_format($cut->cut_length, 2) }} mm, Weight: {{ number_format($cut->current_weight, 3) }} TON
  • @endforeach
@else No CTL cuts available. @endif @endif
@else

No process details available.

@endif
--}}
Back to Dispatch Records View Plan Download DC
@endsection