Stock Full History

{{ $product->name }} @if($product->barcode) ({{ $product->barcode }}) @endif

← Select Another Product
@include('stock.nav', ['tab' => 'full-history'])
@if(!empty($linkedInfo))
Linked Product

Stock is managed through {{ $linkedInfo['stock_product'] }} (1 unit = {{ number_format($linkedInfo['ratio'], 0) }} base units). All quantities shown are converted to this product's units.

@endif
Current Stock
{{ number_format($currentStock, 2) }}
Min Stock
{{ number_format($product->min_stock ?? 0, 2) }}
Total Moves
{{ number_format($movements->count()) }}
@forelse($movements as $row) @php $note = $row['note'] ?? ''; $isCaseSale = str_contains($note, '[CASE SALE:'); $isDirectSale = str_contains($note, '[DIRECT:'); @endphp @empty @endforelse
Time Type Info IN OUT Balance
{{ optional($row['created_at'])->format('Y-m-d h:i A') }} @if($row['qty_in']) IN @elseif($row['qty_out']) OUT @endif @if($isCaseSale) 📦 CASE @elseif($isDirectSale) DIRECT @endif @if($row['reference_type'])
{{ $row['reference_type'] }} @if($row['reference_id']) #{{ $row['reference_id'] }} @endif
@endif @if($note) @php // Clean up the note display - remove the [CASE SALE:] and [DIRECT:] tags for cleaner display $displayNote = preg_replace('/\s*\[(CASE SALE|DIRECT):[^\]]+\]/', '', $note); @endphp
{{ $displayNote }}
@endif
{{ $row['qty_in'] ? number_format($row['qty_in'], 3) : '' }} {{ $row['qty_out'] ? number_format($row['qty_out'], 3) : '' }} {{ number_format($row['balance'], 3) }}
No stock movements recorded.
Legend: 📦 CASE = Stock affected by selling a linked case/bundle DIRECT = Direct sale of this product