{{-- resources/views/ui/consumption/index.blade.php --}} @php /** @var \Illuminate\Pagination\LengthAwarePaginator|\App\Models\InventoryMovement[] $movements */ $q = $q ?? request('q', ''); $from = $from ?? request('from', ''); $to = $to ?? request('to', ''); @endphp
{{-- Header --}}
Verbrauch
Verbrauchsbuchungen für deine Ortstelle · Bestand wird reduziert.
{{-- Wenn du Export-Routen hast, tausche href entsprechend aus --}} @if (auth()->user()->isStationUser()) Verbrauch erfassen @endif
{{-- Filter Bar --}}
Reset
{{-- Table --}}
Historie
Verbrauch (type = out).
{{ $movements->total() }} Einträge
@if (auth()->user()?->isDistrictUser()) @endif @forelse ($movements as $m) @php $qty = (int) $m->quantity_delta; // bei out ist das meist negativ $isOut = $m->type === 'out'; $displayQty = $qty; // falls bei dir out bereits negativ gespeichert ist // Falls du out als POSITIV speicherst: dann hier: $displayQty = -abs($qty); @endphp @if (auth()->user()?->isDistrictUser()) @endif @empty @endforelse
Zeitpunkt Artikel Variante Grund MengeOrtstelle
{{ optional($m->booked_at)->format('d.m.Y H:i') }} {{ $m->product?->name ?? '—' }} {{ $m->variant?->name ?? '—' }} {{ $m->reason ?? '—' }} {{ $displayQty }} {{ $m->station?->name ?? '—' }}
Keine Buchungen gefunden.
{{-- Pagination --}}
{{ $movements->links() }}