@extends('layouts.supervisor') @section('title', 'Detail Produksi - Supervisor') @section('content') @php $orderQty = $production->quantity ?? $production->order->quantity ?? 1; $materialTotal = $production->total_material_cost ?? 0; $sparepartTotal = $production->total_sparepart_cost ?? 0; $directTotal = $materialTotal + $sparepartTotal; $laborTotal = $production->labor_cost ?? 0; $actualTotal = $directTotal + $laborTotal; $totalCost = $actualTotal; @endphp
Order #{{ $production->order->id ?? 'N/A' }} · {{ $production->order->customer_name ?? 'N/A' }}
{{ $pendingRequests->count() }} request baru dari teknisi perlu ditinjau
| Item | Tipe | Jumlah | Satuan | Harga/Unit | Total | Stok | Status Ketersediaan | Alasan | Diminta Oleh |
|---|---|---|---|---|---|---|---|---|---|
|
{{ $request->item_name_display }}
@if($request->is_new_item)
Item Baru
@endif
|
@if($request->item_type === 'material') Bahan @else Sparepart @endif | {{ $quantity }} | {{ $request->unit }} | @if($estimatedPrice > 0) Rp {{ number_format($estimatedPrice, 0, ',', '.') }} @else - @endif | @if($totalPrice > 0) Rp {{ number_format($totalPrice, 0, ',', '.') }} @else - @endif |
{{ $currentStock }}
Butuh: {{ $totalNeeded }}
|
{{ $stockStatusLabel }}
@if($stockStatus !== 'available')
@if($stockStatus === 'insufficient')
Kurang: {{ $totalNeeded - $currentStock }} {{ $request->unit }}
@else
Stok: 0
@endif
@endif
|
{{ Str::limit($request->reason, 50) }} |
{{ $request->requester->name ?? 'N/A' }}
{{ $request->created_at->format('d/m/Y H:i') }} |
Dikelompokkan berdasarkan usulan pertama, kedua, ketiga @if($pendingRequests->count() > 0) · Item pending juga ada di notifikasi di atas @endif
| Item | Tipe | Jumlah | Satuan | Harga/Unit | Total | Stok | Status Ketersediaan | Alasan | Status | Tanggal | Aksi |
|---|---|---|---|---|---|---|---|---|---|---|---|
|
{{ $request->item_name_display }}
@if($request->status === 'pending')
Pending
@endif
@if($request->is_new_item)
Item Baru
@endif
|
@if($request->item_type === 'material') Bahan @else Sparepart @endif | {{ $quantity }} | {{ $request->unit }} | @if($estimatedPrice > 0) Rp {{ number_format($estimatedPrice, 0, ',', '.') }} @else - @endif | @if($totalPrice > 0) Rp {{ number_format($totalPrice, 0, ',', '.') }} @else - @endif |
{{ $currentStock }}
Butuh: {{ $totalNeeded }}
|
{{ $stockStatusLabel }}
@if($stockStatus !== 'available')
@if($stockStatus === 'insufficient')
Kurang: {{ $totalNeeded - $currentStock }} {{ $request->unit }}
@else
Stok: 0
@endif
@endif
|
{{ Str::limit($request->reason, 50) }} | @if($request->status === 'pending') @elseif($request->status === 'approved') @elseif($request->status === 'rejected') @elseif($request->status === 'purchased') @elseif($request->status === 'sent') @elseif($request->status === 'received') @endif {{ $request->status_label }} | {{ $request->requested_at->format('d/m/Y H:i') }} | @if($request->status === 'pending') Menunggu Admin @elseif($request->status === 'approved' && !$request->purchase_id) Menunggu Pembelian @elseif($request->status === 'purchased' && $request->purchase_id) Menunggu Pengiriman @elseif($request->status === 'sent') Dikirim ke Teknisi @elseif($request->status === 'received') Sudah Diterima @elseif($request->status === 'rejected') Ditolak @else - @endif |
{{ $production->productionMaterials->count() + $production->productionSpareparts->count() }} item · {{ $orderQty }} unit produk
| Nama Item | Tipe | Jumlah | Satuan | Harga/Unit | Total | Stok |
|---|---|---|---|---|---|---|
| {{ $item['name'] }} | @if($item['type'] === 'material') Bahan @else Sparepart @endif | {{ $item['quantity'] }} | {{ $item['unit'] }} | Rp {{ number_format($item['unit_cost'], 0, ',', '.') }} | Rp {{ number_format($item['total_cost'], 0, ',', '.') }} | @if(isset($item['is_additional']) && $item['is_additional'] && isset($item['is_received']) && $item['is_received']) {{ $item['stock'] }} @elseif($item['stock'] >= $item['quantity'] * $orderQty) {{ $item['stock'] }} @else {{ $item['stock'] }} @endif |
|
Bahan: Rp {{ number_format($materialTotal, 0, ',', '.') }}
Sparepart: Rp {{ number_format($sparepartTotal, 0, ',', '.') }}
|
Total: Rp {{ number_format($directTotal, 0, ',', '.') }} | |||||
Belum ada bahan atau sparepart ditambahkan
Upah untuk {{ $orderQty }} unit produk
Rp {{ number_format($laborTotal, 0, ',', '.') }}
Per unit: Rp {{ number_format($laborTotal / max($orderQty, 1), 0, ',', '.') }}
Total Biaya Produksi
Rp {{ number_format($actualTotal, 0, ',', '.') }}
Langsung: Rp {{ number_format($directTotal, 0, ',', '.') }} • Labor: Rp {{ number_format($laborTotal, 0, ',', '.') }}
Per Unit
Rp {{ number_format($actualTotal / max($orderQty, 1), 0, ',', '.') }}
{{ $production->notes }}