@php $org = auth()->user()->organization ?? \App\Models\System\Organization::find(auth()->user()->organization_id); @endphp @extends('documents.procurement._layout', [ 'documentTitle' => 'Production Summary', 'reference' => null, 'documentDate' => $reportDate, 'noAutoPrint' => true, ]) @section('header-meta')
|
Orders {{ $orders->count() }} |
Planned Qty {{ number_format($totalPlanned) }} |
Produced Qty {{ number_format($totalProduced) }} |
Rejected {{ number_format($totalRejected) }} |
Total Cost ({{ $currency }}) {{ number_format($totalCost, 0) }} |
No production orders found for this period.
@else| Reference | Product | Location | Status | Planned | Produced | Rejected | Total Cost ({{ $currency }}) | Cost/Unit | Prod. Date | Completion |
|---|---|---|---|---|---|---|---|---|---|---|
| {{ $order->production_reference }} | {{ $order->product?->name ?? '—' }} | {{ $order->location?->name ?? '—' }} | {{ ucwords(str_replace('_',' ',$order->status)) }} | {{ number_format($order->planned_quantity) }} | {{ $order->produced_quantity !== null ? number_format($order->produced_quantity) : '—' }} | {{ ($order->rejected_quantity ?? 0) > 0 ? number_format($order->rejected_quantity) : '—' }} | {{ number_format((float) ($order->total_production_cost_base ?? 0), 2) }} | {{ $cpu !== null ? number_format($cpu, 2) : '—' }} | {{ \Carbon\Carbon::parse($order->production_date)->format('d M Y') }} | {{ $order->completion_date ? \Carbon\Carbon::parse($order->completion_date)->format('d M Y') : '—' }} |
| Totals | {{ number_format($totalPlanned) }} | {{ number_format($totalProduced) }} | {{ number_format($totalRejected) }} | {{ number_format($totalCost, 2) }} | ||||||