@extends('layouts.app', ['page' => 'Production Order Details', 'pageSlug' => 'production-orders', 'section' => 'manufacturing']) @section('content')

Production Order: {{ $productionOrder->order_number }}

@if($errors->any())
Error:
    @foreach($errors->all() as $error)
  • {{ $error }}
  • @endforeach
@endif @error('error')
Error: {{ $message }}
@enderror
Order Information
Order Number: {{ $productionOrder->order_number }}
Product: {{ $productionOrder->product->name }}
BOM Batch Size: {{ $productionOrder->batch_size ?? 'N/A' }}
Quantity Produced: {{ number_format($productionOrder->quantity_produced, 0) }}
Status: @switch($productionOrder->status) @case('planned') Planned @break @case('in_progress') In Progress @break @case('completed') Completed @break @case('cancelled') Cancelled @break @default {{ ucfirst($productionOrder->status) }} @endswitch
Timeline
Planned Start: @if($productionOrder->planned_start_date) {{ $productionOrder->planned_start_date->format('M d, Y') }} @else Not set @endif
Planned End: @if($productionOrder->planned_end_date) {{ $productionOrder->planned_end_date->format('M d, Y') }} @else Not set @endif
Actual Start: @if($productionOrder->actual_start_date) {{ $productionOrder->actual_start_date->format('M d, Y H:i') }} @else Not started @endif
Actual End: @if($productionOrder->actual_end_date) {{ $productionOrder->actual_end_date->format('M d, Y H:i') }} @else Not completed @endif
Created By: {{ $productionOrder->createdBy->name }}
@if($productionOrder->quantity_produced > 0)
Production Status
Production Completed: {{ number_format($productionOrder->quantity_produced, 0) }} units produced
@endif @if($productionOrder->notes)
Notes
{{ $productionOrder->notes }}
@endif
Raw Materials Required
@if($productionOrder->productionOrderItems->count() > 0)
@foreach($productionOrder->productionOrderItems as $item) @endforeach
Raw Material Quantity Required Quantity Consumed Remaining Status
{{ $item->rawMaterial->name }}
{{ $item->unit_of_measure }}
{{ number_format($item->quantity_required, 4) }} {{ number_format($item->quantity_consumed, 4) }} {{ number_format($item->remaining_quantity, 4) }} @if($item->is_fully_consumed) Complete @elseif($item->quantity_consumed > 0) Partial @else Pending @endif
@else
No raw materials found for this production order. This might indicate that the product doesn't have a Bill of Materials configured.
@endif
@if($productionOrder->status == 'planned')
@csrf
@endif @if($productionOrder->status == 'in_progress') @endif
@endsection