@extends('layouts.app') @section('title', 'Stock — ' . $extra->name) @section('content')

Stock — {{ $extra->name }}

Stock actuel : {{ $extra->stock_mode !== 'unlimited' ? $extra->stock_quantity : '∞' }}

← Retour aux extras
{{-- Formulaire ajout mouvement --}}

Enregistrer un mouvement

@if($errors->any())
@foreach($errors->all() as $e)

• {{ $e }}

@endforeach
@endif
@csrf @php $input = 'width:100%; border-radius:0.75rem; padding:0.75rem 1rem; font-size:0.875rem; outline:none; border:1.5px solid #D8E8F0; background:#F8FBFD; color:#1A2B3C; box-sizing:border-box; margin-bottom:1rem;'; @endphp
{{-- Sécurité : vérification du mot de passe de l'utilisateur qui valide --}}

🔐 Sécurité — Validation par mot de passe

{{-- Historique --}}

Historique des mouvements

@forelse($movements as $mv) @empty @endforelse
Type Qté Par Date
@php $isIn = $mv->isIncrease(); $typeLabels = ['initial'=>'Initial','purchase'=>'Achat','adjustment_in'=>'Correction +','adjustment_out'=>'Correction -','damage'=>'Casse','loss'=>'Perte','return'=>'Retour']; @endphp {{ $isIn ? '↑' : '↓' }} {{ $typeLabels[$mv->movement_type] ?? $mv->movement_type }} @if($mv->note)

{{ $mv->note }}

@endif
{{ $isIn ? '+' : '-' }}{{ $mv->quantity }} {{ $mv->creator->name ?? '—' }} {{ $mv->created_at->format('d/m/Y H:i') }}
Aucun mouvement enregistré.
@endsection