@extends('admin.layouts.app') @section('title','Product — '.$product->product_name) @section('breadcrumb') / Inventory / {{ $product->product_name }} @endsection @section('content') @php $qty = $product->current_quantity; $stockColor = $qty == 0 ? 'danger' : ($qty < 10 ? 'warning' : 'success'); @endphp
@if($product->product_image) @else
@endif
{{ $product->product_name }}
{{ $product->category ?? 'Uncategorized' }}
Current Stock
{{ $product->current_quantity }} {{ $product->unit }}

Product Code{{ $product->product_code }}
Unit{{ $product->unit ?? '—' }}
Status{{ ucfirst($product->status) }}
Added By{{ $product->createdBy->name ?? '—' }}
@if($product->description)

{{ $product->description }}

@endif
Recent Stock Transactions
View All
@forelse($product->stockTransactions->take(5) as $tx) @empty @endforelse
TypeQuantityBeforeAfterDescriptionDate
{{ ucfirst(str_replace('_',' ',$tx->transaction_type)) }} {{ $tx->quantity }} {{ $tx->previous_quantity }} {{ $tx->new_quantity }} {{ $tx->description ?? '—' }} {{ $tx->created_at->format('d M Y') }}
No stock transactions yet
@endsection @push('scripts') @endpush