@extends('layouts.app') @section('title', 'Detail Barang: ' . $item->name) @section('page_title', 'Detail Barang') @section('page_subtitle', 'Melihat detail spesifikasi barang, QR Code, dan riwayat pergerakan stok.') @section('content')
{!! QrCode::size(200)->generate($item->sku) !!}
{{ $item->sku }}

Scan QR Code ini untuk melihat halaman detail barang secara instan.

Unduh SVG

Transaksi / Mutasi Stok

@csrf

Spesifikasi Barang

Edit Barang
Nama Barang: {{ $item->name }}
SKU / Kode Barang: {{ $item->sku }}
Kategori: @if($item->category) {{ $item->category->name }} @else Umum @endif
Harga Satuan: Rp {{ number_format($item->price, 0, ',', '.') }}
Stok Saat Ini: @if($item->qty == 0) Habis (0 {{ $item->unit }}) @elseif($item->qty <= 5) Menipis ({{ $item->qty }} {{ $item->unit }}) @else {{ $item->qty }} {{ $item->unit }} @endif
Deskripsi: {{ $item->description ?? 'Tidak ada deskripsi.' }}
Ditambahkan Pada: {{ $item->created_at->format('d M Y, H:i') }}

Riwayat Mutasi Barang

@if($item->stockHistories->isEmpty())
Belum ada riwayat transaksi stok barang ini.
@else
    @foreach($item->stockHistories as $history)
  • {{ $history->created_at->format('d M Y, H:i') }} ({{ $history->created_at->diffForHumans() }})
    Stok {{ $history->type === 'in' ? 'Masuk' : 'Keluar' }} {{ $history->type === 'in' ? '+' : '-' }}{{ $history->qty }} {{ $item->unit }}
    Keterangan: {{ $history->notes }}
  • @endforeach
@endif
@endsection