{{-- Header --}}
Dashboard

Terima Barang

Konfirmasi penerimaan barang dari supplier — stok otomatis bertambah setelah konfirmasi

{{-- Empty State --}} @if($this->batches->isEmpty())

Tidak ada barang yang menunggu

Semua pengiriman supplier sudah dikonfirmasi ✅

@else {{-- Pending Batches List --}}
@foreach($this->batches as $batch)
{{-- Animated pulse icon --}}

{{ $batch->batchCode }}

Menunggu Konfirmasi

{{ $batch->supplier->businessName ?? '-' }} · Dikirim {{ $batch->created_at->diffForHumans() }}

@foreach($batch->items->take(4) as $item) {{ $item->product->name ?? '-' }} ×{{ $item->initialQty }} @endforeach @if($batch->items->count() > 4) +{{ $batch->items->count() - 4 }} lainnya @endif
@if($batch->note)

{{ $batch->note }}

@endif

Total Produk

{{ $batch->items->sum('initialQty') }} pcs

@endforeach
{{ $this->batches->links() }} @endif {{-- Konfirmasi Modal --}} @if($showDetailModal && $this->selectedBatch)
{{-- Modal Header --}}

Konfirmasi Terima Barang

{{ $this->selectedBatch->batchCode }} · {{ $this->selectedBatch->supplier->businessName ?? '-' }}

{{-- Modal Body --}}
{{-- Info --}}
Periksa jumlah fisik barang. Ubah qty jika ada selisih (rusak/kurang). Stok otomatis bertambah sesuai yang dikonfirmasi.
{{-- Items Table --}}
Produk
Diminta
Diterima (Fisik)
@foreach($receiveItems as $index => $ri)

{{ $ri['productName'] }}

{{ $ri['requestedQty'] }} pcs
@if(isset($ri['receivedQty']) && (int)$ri['receivedQty'] < $ri['requestedQty'])

Selisih: {{ $ri['requestedQty'] - (int)$ri['receivedQty'] }} pcs

@endif
@endforeach
{{-- Note --}}
{{-- Modal Footer --}}
@endif