@extends('admin.layouts.app') @section('title','Stock History — '.$product->product_name) @section('breadcrumb') / Inventory / {{ $product->product_name }} / Stock History @endsection @section('content')
{{ $product->product_name }} — {{ $product->product_code }}
| Transaction ID | Type | Qty | Before | After | Reference | Description | By | Date |
|---|---|---|---|---|---|---|---|---|
{{ $tx->transaction_id }}
|
@php $typeMap = ['stock_added'=>['success','plus-circle','Added'], 'stock_used'=>['danger','minus-circle','Used'], 'stock_adjustment'=>['warning','sliders-h','Adjusted'], 'stock_returned'=>['info','undo','Returned']]; $t = $typeMap[$tx->transaction_type] ?? ['secondary','circle','Unknown']; @endphp {{ $t[2] }} | {{ in_array($tx->transaction_type,['stock_used']) ? '-' : '+' }}{{ $tx->quantity }} | {{ $tx->previous_quantity }} | {{ $tx->new_quantity }} | {{ $tx->reference_type ? ucfirst($tx->reference_type).' #'.$tx->reference_id : '—' }} | {{ Str::limit($tx->description,40) ?? '—' }} | {{ $tx->createdBy->name ?? '—' }} | {{ \Carbon\Carbon::parse($tx->created_at)->format('d M Y H:i') }} |
| No stock transactions yet | ||||||||