@extends('layouts.app') @section('title', 'Mon Inventaire') @section('content')
Total articles
{{ $totalItems ?? 0 }}
Disponibles
{{ $availableItems ?? 0 }}
Stock faible
{{ $lowStock ?? 0 }}
Valeur totale
{{ number_format($totalValue ?? 0, 2) }} €
| Article | Catégorie | Quantité | Prix unitaire | Statut | Actions |
|---|---|---|---|---|---|
|
@php
$photo = is_array($item->photos) && count($item->photos) > 0 ? $item->photos[0] : null;
@endphp
@if($photo)
{{ $item->name }} SKU: {{ $item->sku ?? 'N/A' }} |
{{ ucfirst($item->category ?? 'N/A') }} | {{ $item->quantity }} {{ $item->unit ?? 'unité(s)' }} @if($item->reorder_level) / min: {{ $item->reorder_level }} @endif | {{ number_format($item->selling_price ?? 0, 2) }} € | @php $reorderLevel = $item->reorder_level ?? 5; $status = $item->quantity <= 0 ? 'out_of_stock' : ($item->quantity <= $reorderLevel ? 'low_stock' : 'available'); $statusClasses = [ 'available' => 'bg-green-100 text-green-800', 'low_stock' => 'bg-yellow-100 text-yellow-800', 'out_of_stock' => 'bg-red-100 text-red-800', ]; $statusLabels = [ 'available' => 'Disponible', 'low_stock' => 'Stock faible', 'out_of_stock' => 'Rupture', ]; @endphp {{ $statusLabels[$status] }} |
{{-- Ajustement rapide du stock --}}
✏️
|