@extends('layouts.structure') @section('content')

Edit Plan

@if ($plan->processes->isEmpty())
No processes found for this plan.
@else

Found {{ $plan->processes->count() }} processes.

@endif @if ($warning)
{{ $warning }}
@endif

Coil Details

Please select a client
@if (!$plan->client)
No client associated with this plan.
@endif
Please select a CRR No.
@if (!$plan->coil)
No coil associated with this plan.
@endif
Grade is required
Width must be a positive number
Thickness must be a positive number
Density must be a positive number
Net Weight must be a positive number
Current Balance

Balance Weight: {{ number_format($plan->balance_weight, 3) }} TON

Total Used Weight

{{ number_format($plan->total_used_weight, 3) }} TON

@foreach ($plan->processes as $process) @if ($process->process_type == 'crs')

CRS – Cut to Width

@if (empty($crs_coil)) $cut) @if ($cut->process_id == $process->process_id) @endif @endforeach @endif
Width (mm) Quantity Weight (TON) Action
No CRS cuts found.
{{ number_format($cut->cut_width, 1) }} {{ $cut->quantity }} {{ number_format($cut->weight, 3) }}
Total Weight 0.000
@elseif ($process->process_type == 'ctl')

CTL – Cut to Length

CTL Process Rules:
- Independent when no CRS cuts (uses net coil width)
- Dependent on CRS cuts when available
- User inputs length and production weight; quantity calculated
0
0.000
@if (empty($ctl_coil)) @else @foreach ($ctl_coil as $index => $cut) @if ($cut->process_id == $process->process_id) @endif @endforeach @endif
Width (mm) Length (mm) Quantity Weight (TON) Action
No CTL cuts found.
{{ number_format($cut->cut_width, 1) }} {{ number_format($cut->cut_length, 1) }} {{ $cut->quantity }} {{ number_format($cut->weight, 3) }}
Total Weight 0.000
@endif @endforeach

Plan Summary

Material Utilization
{{ number_format($plan->coil->net_weight > 0 ? ($plan->total_used_weight / $plan->coil->net_weight) * 100 : 0, 1) }}%

Used: {{ number_format($plan->total_used_weight, 3) }} TON

Remaining: {{ number_format($plan->balance_weight, 3) }} TON

Plan Actions
View Plans
@endsection