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

{{ $medication->name }} @if(!$medication->is_active) Inactif @endif @if($medication->requires_prescription) Prescription requise @endif

Modifier
Retour à la liste
@if($medication->stock_quantity <= $medication->minimum_stock_level) @endif @if($medication->expiry_date <= now()->addDays(30)) @elseif($medication->expiry_date <= now()->addDays(90)) @endif
Informations détaillées
Identification
@if($medication->brand) @endif @if($medication->generic_name) @endif
Nom : {{ $medication->name }}
Marque : {{ $medication->brand }}
Nom générique : {{ $medication->generic_name }}
Dosage : {{ $medication->dosage }}
Forme : {{ $medication->form }}
Catégorie : {{ $medication->category }}
Production
@if($medication->manufacturer) @endif @if($medication->batch_number) @endif
Fabricant : {{ $medication->manufacturer }}
Lot : {{ $medication->batch_number }}
Date d'expiration : {{ \Carbon\Carbon::parse($medication->expiry_date)->format('d/m/Y') }}
Statut : @if($medication->is_active) Actif @else Inactif @endif
Prescription : @if($medication->requires_prescription) Requise @else Libre @endif
@if($medication->description)
Description

{{ $medication->description }}

@endif
Ventes récentes
@if($recentSales->count() > 0)
@foreach($recentSales as $sale) @endforeach
Date Patient Quantité Prix total
{{ $sale->created_at->format('d/m/Y H:i') }} {{ $sale->patient_name }} {{ $sale->quantity }} {{ number_format($sale->total_price, 0, ',', ' ') }} FCFA
@if($recentSales->count() >= 10)
Affichage des 10 ventes les plus récentes
@endif @else

Aucune vente enregistrée pour ce médicament

@endif
Stock et prix

{{ $medication->stock_quantity }}

Quantité en stock
@php $percentage = $medication->minimum_stock_level > 0 ? min(100, ($medication->stock_quantity / $medication->minimum_stock_level) * 100) : 100; $colorClass = $percentage <= 50 ? 'bg-danger' : ($percentage <= 80 ? 'bg-warning' : 'bg-success'); @endphp
Prix unitaire : {{ number_format($medication->unit_price, 0, ',', ' ') }} FCFA
Seuil d'alerte : {{ $medication->minimum_stock_level }}
Valeur stock : {{ number_format($medication->stock_quantity * $medication->unit_price, 0, ',', ' ') }} FCFA
Centre de santé
{{ $medication->healthCenter->name }}

{{ $medication->healthCenter->address }}

{{ $medication->healthCenter->phone }}

Statistiques
{{ $totalSales }}
Ventes totales
{{ number_format($totalRevenue, 0, ',', ' ') }}
Chiffre d'affaires (FCFA)

{{ $salesThisMonth }}
Ce mois
{{ $averageSalesPerDay }}
Moyenne/jour
@endsection