@extends('layouts.app') @section('title','Audit Trail') @section('content')

Stock Audit Trail

{{ $from }} to {{ $to }} · {{ $transactions->total() }} records

Back
@include('partials._alerts')
@forelse($transactions as $tx) @php $badge=['purchase_in'=>'bg-success','consumption_out'=>'bg-danger','return'=>'bg-info text-dark','adjustment'=>'bg-warning text-dark','write_off'=>'bg-dark'][$tx->transaction_type]??'bg-secondary'; @endphp @empty @endforelse
Date / TimeItemTypeMovementBeforeAfterReferenceOperatorNotes
{{ $tx->created_at->format('d M Y H:i') }} @if($tx->inventoryItem) {{ $tx->inventoryItem->name }}
{{ $tx->inventoryItem->sku }}
@else Deleted item @endif
{{ str_replace('_',' ',$tx->transaction_type) }} {{ (float)$tx->quantity>=0?'+':'' }}{{ number_format((float)$tx->quantity,3) }} {{ number_format((float)$tx->quantity_before,3) }} {{ number_format((float)$tx->quantity_after,3) }} {{ $tx->reference_type ? Str::title(str_replace('_',' ',$tx->reference_type)).' #'.$tx->reference_id : '—' }} {{ $tx->createdBy?->name ?? 'System' }} {{ Str::limit($tx->notes ?? '—', 40) }}
No transactions found for this date range.
@endsection