@extends('layouts.app') @section('title', 'Pharmacy | Stock Movements') @section('content')

Stock Movements

Audit trail of all stock-affecting transactions

{{-- Filters --}}
Reset
@forelse($movements ?? [] as $m) @php $isIn = in_array($m->type, ['purchase_in','return_in','adjustment_plus','transfer_in']); @endphp @empty @endforelse
Date/Time Drug Batch Type Qty In Qty Out Balance After Reference User
{{ $m->created_at->format('d M Y H:i') }} {{ $m->drugItem->name ?? $m->stockItem->name ?? '' }} {{ $m->batch_number ?? '|' }} {{ str_replace('_', ' ', ucfirst($m->type)) }} {{ $isIn ? $m->quantity : '' }} {{ !$isIn ? $m->quantity : '' }} {{ $m->balance_after ?? '|' }} {{ $m->reference ?? '|' }} {{ $m->creator->name ?? '' }}
No stock movements recorded.
@if(isset($movements) && $movements->hasPages())
{{ $movements->links() }}
@endif
@endsection