@extends('admin.layouts.inventory') @section('title', 'Ledger') @section('content') @include('admin.inventory.partials.filter_bar', ['filters' => $filters])
@if (($movements ?? collect())->isEmpty())

{{ $filters->isActive() ? 'No ledger movements match these filters.' : 'No ledger movements recorded.' }}

@else
@foreach ($movements as $movement) @php $item = $movement->sku?->variant?->item; $variant = $movement->sku?->variant?->variant; @endphp @endforeach
Document Date SKU / Item Type Module Qty Status Recorded by
{{ $movement->document_number ?? '—' }} {{ $movement->effective_date?->format('Y-m-d') ?? '—' }}
{{ $movement->sku->sku_code ?? '—' }}
@if ($item?->name || $variant)
{{ $item?->name ?? '' }} @if ($variant) — {{ $variant }} @endif
@endif
{{ \App\Support\Filters\FilterOptions::humanize($movement->movement_type ?? '—') }} {{ \App\Support\Filters\FilterOptions::humanize($movement->source_module?->value ?? '—') }} @qty($movement->qty, $movement->unit ?? $movement->sku) {{ \App\Support\Filters\FilterOptions::humanize($movement->to_status?->value ?? '—') }} {{ $movement->creator?->name ?? '—' }}
@include('admin.inventory.partials.pagination', ['paginator' => $movements]) @endif
@endsection