@extends('layouts.app') @section('title', 'Manufacturing Batches') @section('content')

Manufacturing & Batch Runs

Production batch management, planned vs actual output, and individual QR unit serialization.

@can('create', App\Models\ProductBatch::class) Initiate New Batch @endcan
@if($searchTerm || $productId || $statusFilter) @endif
@forelse($batches as $batch) @php $percentage = $batch->planned_quantity > 0 ? min(100, round(($batch->actual_quantity / $batch->planned_quantity) * 100)) : 0; @endphp @empty @endforelse
Batch Details Product Production Progress Mfg / Exp Date Operator Status Actions
{{ $batch->batch_number }}
ID #{{ $batch->id }} • {{ $batch->created_at->format('d M Y') }}
{{ $batch->product->name }}
{{ $batch->product->sku }}
{{ number_format($batch->actual_quantity) }} / {{ number_format($batch->planned_quantity) }} {{ $percentage }}%
{{ $batch->units_count }} units serialized
Mfg: {{ $batch->manufacturing_date->format('d M Y') }}
Exp: {{ $batch->expiry_date->format('d M Y') }}
{{ $batch->production_operator ?? 'Not assigned' }}
@if($batch->productionRecords_count > 0) {{ $batch->productionRecords_count }} counting updates @endif
@if($batch->status === 'Draft') Draft @elseif($batch->status === 'In Production') In Production @elseif($batch->status === 'Completed') Completed @elseif($batch->status === 'Under Verification') Under Verification @elseif($batch->status === 'Closed') Closed @endif
@can('update', $batch) @endcan
No manufacturing batches found

No batches match the selected criteria or no production run has been initiated yet.

@can('create', App\Models\ProductBatch::class) Create First Batch @endcan
@if($batches->hasPages())
{{ $batches->links('pagination::bootstrap-5') }}
@endif
@endsection