{{-- HEADER --}}
{{ $store['name'] }}
@if($store['address']){{ $store['address'] }}
@endif @if($store['phone'])Telp. {{ $store['phone'] }}@endif @if($store['email']) | {{ $store['email'] }}@endif
Stock Opname
{{ $opname->opname_number }}
{{ $opname->opname_date?->translatedFormat('d F Y') ?? now()->translatedFormat('d F Y') }}
{{-- INFO SECTION --}}
Informasi Opname
@if($opname->approvedByUser) @endif
Petugas{{ $opname->user?->name ?? '-' }}
Status{{ match($opname->status) { 'draft' => 'Draft', 'in_progress' => 'Sedang Berjalan', 'approved' => 'Disetujui', 'cancelled' => 'Dibatalkan', default => $opname->status } }}
Disetujui Oleh{{ $opname->approvedByUser->name }}
Ringkasan
@php $totalItems = $opname->items->count(); $plusItems = $opname->items->filter(fn($i) => (float)$i->physical_stock > (float)$i->system_stock)->count(); $minusItems = $opname->items->filter(fn($i) => (float)$i->physical_stock < (float)$i->system_stock)->count(); $sameItems = $opname->items->filter(fn($i) => (float)$i->physical_stock == (float)$i->system_stock)->count(); @endphp
Total Item{{ $totalItems }} produk
Selisih (+){{ $plusItems }} item
Selisih (-){{ $minusItems }} item
Sama{{ $sameItems }} item
{{-- ITEMS TABLE --}} @foreach($opname->items as $idx => $item) @php $diff = (float) $item->physical_stock - (float) $item->system_stock; $diffClass = $diff > 0 ? 'positive' : ($diff < 0 ? 'negative' : 'neutral'); $diffPrefix = $diff > 0 ? '+' : ''; @endphp @endforeach
No Produk SKU Satuan Stok Sistem Stok Fisik Selisih Catatan
{{ $idx + 1 }} {{ $item->product?->name ?? '-' }} {{ $item->product?->sku ?? '-' }} {{ $item->product?->unit ?? 'Pcs' }} {{ number_format((float) $item->system_stock, 0, ',', '.') }} {{ number_format((float) $item->physical_stock, 0, ',', '.') }} {{ $diffPrefix }}{{ number_format($diff, 0, ',', '.') }} {{ $item->notes ?? '-' }}
{{-- NOTES --}} @if($opname->notes)
Catatan
{{ $opname->notes }}
@endif {{-- SIGNATURES --}}
Petugas
{{ $opname->user?->name ?? '' }}
Disetujui Oleh
{{ $opname->approvedByUser?->name ?? '' }}
{{-- FOOTER --}}