Nom : {{ $materiel->nom }}
Marque : {{ $materiel->marque->nom ?? 'N/A' }}
Modèle : {{ $materiel->modele->nom ?? 'N/A' }}
Description : {{ $materiel->description ?? 'N/A' }}
Statut :
@if($materiel->statut)
Actif
@else
Inactif
@endif
N° Équipement : {{ $materiel->numeros_equipment ?? 'N/A' }}
N° Série : {{ $materiel->numero_serie ?? 'N/A' }}
Localisation : {{ $materiel->localisation ?? 'N/A' }}
Identifiant : {{ $materiel->identifiant ?? 'N/A' }}
Mot de passe : {{ $materiel->mot_de_passe ?? 'N/A' }}
Fournitures associées
@if($materiel->fournitures && $materiel->fournitures->count() > 0)
@foreach($materiel->fournitures as $fourniture)
@php
$nbConsommees = $materiel->sorties->where('fourniture_id', $fourniture->id)->count();
@endphp
-
{{ $fourniture->nom }}
{{ $nbConsommees }} consommée(s)
@endforeach
@else
Aucune fourniture associée
@endif
Commandes
@if($commandes && $commandes->count() > 0)
@foreach($commandes as $commande)
-
{{ $commande->entrees->filter(fn($e) => $materiel->entreeStocks->contains('id', $e->id))->sum('quantite') }}
@endforeach
@else
Aucune
@endif
Livraisons
@if($livraisons && $livraisons->count() > 0)
@foreach($livraisons as $livraison)
-
{{ $livraison->entrees->filter(fn($e) => $materiel->entreeStocks->contains('id', $e->id))->sum('quantite') }}
@endforeach
@else
Aucune livraison
@endif