{{-- index.blade.php --}} @extends('layouts.app') @section('title', 'Production Orders') @section('content')

Production Orders

@include('manufacturing.partials.navigation') {{-- Stats Cards --}}
@php $total = array_sum($statusCounts); @endphp
Total Productions
{{ $total }}
Draft
{{ $statusCounts['draft'] ?? 0 }}
Approved
{{ $statusCounts['approved'] ?? 0 }}
In Production
{{ $statusCounts['in_production'] ?? 0 }}
Completed
{{ $statusCounts['completed'] ?? 0 }}
On Hold
{{ $statusCounts['on_hold'] ?? 0 }}

Production List
Create Production
{{-- Filters --}}
{{-- Table --}}
@forelse($orders as $order) @empty @endforelse
Production # Product BOM Planned Qty Produced Progress Priority Status Dates Actions
{{ $order->production_order_number }} @if($order->schedule)
{{ $order->schedule->schedule_code }} @endif
{{ $order->product->name ?? 'N/A' }}
SKU: {{ $order->product->sku ?? 'N/A' }}
{{ $order->billOfMaterial->bom_code ?? 'N/A' }} {{ number_format($order->planned_quantity, 2) }}
{{ $order->unit_of_measure }}
{{ number_format($order->produced_quantity, 2) }}
{{ $order->unit_of_measure }}
{{ number_format($order->progress_percentage, 1) }}%
{{ $order->priority_label }} {{ $order->status_label }}
{{ $order->planned_start_date ? $order->planned_start_date->format('d M Y') : 'N/A' }}
@if($order->planned_end_date)
{{ $order->planned_end_date->format('d M Y') }}
@endif @if($order->planned_end_date && $order->planned_end_date < now() && $order->status != 'completed' && $order->status != 'cancelled')
Overdue
@endif
View @if(in_array($order->status, ['draft', 'approved'])) Edit @endif @if(in_array($order->status, ['draft', 'cancelled']))
@csrf @method('DELETE')
@endif
No Production Records Found

Start by creating your first production record.

Create First Production
{{-- Pagination --}} @if($orders->hasPages())
Showing {{ $orders->firstItem() ?? 0 }} to {{ $orders->lastItem() ?? 0 }} of {{ $orders->total() }} results
@else
Showing {{ $orders->total() }} results
@endif
@push('scripts') @endpush @endsection