@extends('layouts.app') @section('title', 'Stock Movement History') @section('page_title', 'Stock Movements') @section('content')
@unless(auth()->user()->isCashier())@endunless @forelse($movements as $movement)@unless(auth()->user()->isCashier())@endunless @empty@endforelse
DateProductTypeMovement QuantityBase Stock ChangeUnit CostTotal CostSource / SupplierAdded ByNote
{{ $movement->occurredAtLabel() }}{{ $movement->product?->name ?? 'Removed product' }}
{{ $movement->product?->category?->displayName() ?? '—' }}
{{ $movement->typeLabel() }}{{ $movement->unitQuantityLabel() }}{{ $movement->quantity_pieces > 0 ? '+' : '' }}{{ number_format($movement->quantity_pieces) }}{{ $movement->unit_cost_price !== null ? 'TZS '.tzs_amount($movement->unit_cost_price) : '—' }}{{ $movement->total_cost !== null ? 'TZS '.tzs_amount($movement->total_cost) : '—' }}{{ $movement->source_name ?: '—' }}{{ $movement->user?->displayName() ?? 'System' }}{{ $movement->note ?: '—' }}
No stock movements match the selected filters.
@forelse($movements as $movement)
{{ $movement->quantity_pieces < 0 ? '−' : '+' }}

{{ $movement->product?->name ?? 'Removed product' }}

{{ $movement->occurredAtLabel() }}
{{ $movement->quantity_pieces > 0 ? '+' : '' }}{{ number_format($movement->quantity_pieces) }}
{{ $movement->typeLabel() }}{{ $movement->unitQuantityLabel() }}
@unless(auth()->user()->isCashier()) @if($movement->unit_cost_price !== null) Cost: TZS {{ tzs_amount($movement->unit_cost_price) }} · Total: TZS {{ tzs_amount($movement->total_cost ?? 0) }} @endif @endunless {{ $movement->source_name ?: 'No source' }} By {{ $movement->user?->displayName() ?? 'System' }} @if($movement->note){{ $movement->note }}@endif
@empty
±

No stock movements

Movements will appear here after stock is received, corrected, sold or returned.

@endforelse
@endsection