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

Edit Plan

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

Coil Details

Please select a client
Please select a CRR No.
Grade is required
Width must be a positive number
Thickness must be a positive number
@php // FIX: Use the correct density field from coil table $coilDensity = $plan->coil->materialType->density ?? 0; @endphp
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

Plan Summary

Material Utilization
@php $usedPercent = $plan->coil->net_weight > 0 ? ($plan->total_used_weight / $plan->coil->net_weight) * 100 : 0; @endphp
{{ number_format($usedPercent, 1) }}%

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

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

Plan Actions
View Plans
@endsection