@extends('layouts.app') @section('page-title', 'Detail Item Stok - ' . $stock->name) @section('content')

{{ $stock->name }}

{{ ucfirst($stock->category) }} • {{ $stock->unit }}

Informasi Stok

{{ $stock->current_stock }}

Stok Saat Ini

{{ $stock->min_stock }}

Stok Minimum
Status: @if($stock->stock_status == 'out_of_stock') {{ $stock->stock_status_text }} @elseif($stock->stock_status == 'low_stock') {{ $stock->stock_status_text }} @else {{ $stock->stock_status_text }} @endif
Kategori: {{ ucfirst($stock->category) }}
Satuan: {{ $stock->unit }}
@if($stock->barcode)
Barcode: {{ $stock->barcode }}
@endif @if($stock->supplier)
Supplier: {{ $stock->supplier }}
@endif @if($stock->description)
Deskripsi:

{{ $stock->description }}

@endif
Status: @if($stock->is_active) Aktif @else Tidak Aktif @endif
Aksi Cepat
Informasi Harga

Rp {{ number_format($stock->purchase_price, 0, ',', '.') }}

Harga Beli

Rp {{ number_format($stock->selling_price, 0, ',', '.') }}

Harga Jual

{{ number_format($stock->profit_margin, 1) }}%

Margin Keuntungan

Keuntungan per Unit:
Rp {{ number_format($stock->selling_price - $stock->purchase_price, 0, ',', '.') }}
Total Nilai Stok:
Rp {{ number_format($stock->current_stock * $stock->purchase_price, 0, ',', '.') }}
Riwayat Pergerakan Stok
@if($movements->count() > 0) @foreach($movements->take(10) as $movement)
@if($movement->type == 'in') +{{ $movement->quantity }} @elseif($movement->type == 'out') {{ $movement->quantity }} @else {{ $movement->quantity_formatted }} @endif {{ $stock->unit }}
{{ $movement->type_text }} • {{ $movement->created_at->format('d/m/Y H:i') }} @if($movement->notes)
{{ $movement->notes }} @endif
{{ $movement->stock_after }} {{ $stock->unit }}
@endforeach @if($movements->count() > 10) @endif @else

Belum ada pergerakan stok

@endif
@if($movements->count() > 0)
Riwayat Lengkap Pergerakan Stok
@foreach($movements as $movement) @endforeach
Tanggal Tipe Jumlah Stok Sebelum Stok Sesudah Referensi Catatan User
{{ $movement->created_at->format('d/m/Y H:i') }} @if($movement->type == 'in') {{ $movement->type_text }} @elseif($movement->type == 'out') {{ $movement->type_text }} @else {{ $movement->type_text }} @endif @if($movement->quantity >= 0) +{{ $movement->quantity }} @else {{ $movement->quantity }} @endif {{ $stock->unit }} {{ $movement->stock_before }} {{ $stock->unit }} {{ $movement->stock_after }} {{ $stock->unit }} @if($movement->reference_type) {{ ucfirst($movement->reference_type) }} @else - @endif {{ $movement->notes ?? '-' }} {{ $movement->user->name ?? 'N/A' }}
{{ $movements->links() }}
@endif
@endsection