{{-- edit.blade.php --}} @extends('layouts.app') @section('title', 'Edit Production Order') @section('content') Edit Production Order @include('manufacturing.partials.navigation') @csrf @method('PUT') {{-- Production Details --}} Production Details Production Number Schedule Select Schedule (Optional) @foreach($schedules ?? [] as $schedule) schedule_id) == $schedule->id ? 'selected' : '' }}> {{ $schedule->schedule_code }} - {{ $schedule->product->name ?? 'N/A' }} @endforeach @error('schedule_id') {{ $message }} @enderror Select a schedule to auto-fill details BOM * Select BOM @foreach($boms ?? [] as $bom) bom_id) == $bom->id ? 'selected' : '' }}> {{ $bom->bom_code }} - {{ $bom->name }} @endforeach @error('bom_id') {{ $message }} @enderror Product * Select Product @foreach($products ?? [] as $product) product_id) == $product->id ? 'selected' : '' }}> {{ $product->sku }} - {{ $product->name }} @endforeach @error('product_id') {{ $message }} @enderror Planned Quantity * @error('planned_quantity') {{ $message }} @enderror Unit of Measure unit_of_measure) == 'KG' ? 'selected' : '' }}>KG unit_of_measure) == 'G' ? 'selected' : '' }}>G unit_of_measure) == 'L' ? 'selected' : '' }}>L unit_of_measure) == 'ML' ? 'selected' : '' }}>ML unit_of_measure) == 'PCS' ? 'selected' : '' }}>PCS @error('unit_of_measure') {{ $message }} @enderror {{-- Dates & Assignment --}} Scheduling & Assignment Planned Start Date * @error('planned_start_date') {{ $message }} @enderror Planned End Date @error('planned_end_date') {{ $message }} @enderror Status @foreach(\App\Models\Manufacturing\Production\ProductionOrder::STATUSES as $key => $label) status) == $key ? 'selected' : '' }}> {{ $label }} @endforeach @error('status') {{ $message }} @enderror Priority @foreach(\App\Models\Manufacturing\Production\ProductionOrder::PRIORITIES as $key => $label) priority) == $key ? 'selected' : '' }}> {{ $label }} @endforeach @error('priority') {{ $message }} @enderror Shift @error('shift') {{ $message }} @enderror Assigned To Select Operator @foreach($operators ?? [] as $operator) assigned_to) == $operator->id ? 'selected' : '' }}> {{ $operator->username ?? $operator->name ?? $operator->first_name ?? '' }} @endforeach @error('assigned_to') {{ $message }} @enderror Machine Select Machine @foreach($machines ?? [] as $machine) machine_id) == $machine->id ? 'selected' : '' }}> {{ $machine->name }} @endforeach @error('machine_id') {{ $message }} @enderror {{-- Production Progress --}} Production Progress Produced Quantity @error('produced_quantity') {{ $message }} @enderror Progress Percentage % Status {{ $order->status_label }} ({{ $order->progress_percentage }}%) {{-- Ingredients --}} Raw Materials (Ingredients) 0 Auto-Calculate from BOM Add Ingredient Expected Production from Current Ingredients: 0.00 Apply {{-- Notes --}} Notes {{ old('notes') ?? $order->notes }} @error('notes') {{ $message }} @enderror {{-- Actions --}} Update Production View Production Cancel @endsection