@extends('layouts.app') @section('title', $chantier->nom) @section('breadcrumb', 'Chantiers / '.$chantier->nom) @php $coutTotal = $achatTotal + $depenseTotal + $rhTotal; $marge = $caTotal - $coutTotal; $tauxMarge = $caTotal > 0 ? ($marge / $caTotal) * 100 : 0; $budgetPct = $chantier->budget > 0 ? ($coutTotal / $chantier->budget) * 100 : 0; $statutColors = ['demarrage'=>'badge-muted','en_cours'=>'badge-warning','pause'=>'badge-info','cloture'=>'badge-success','sav'=>'badge-danger']; $statutLabel = ['demarrage'=>'Démarrage','en_cours'=>'En cours','pause'=>'En pause','cloture'=>'Clôturé','sav'=>'SAV']; $activeTab = session('tab', 'indicateurs'); @endphp @section('content') {{-- Page header --}}
{{ $chantier->code }} @if($chantier->client) — Client : {{ $chantier->client->nom }}@endif {{ $statutLabel[$chantier->statut] ?? $chantier->statut }}
| N° | Date | Libellé | Catégorie | Montant TTC |
|---|---|---|---|---|
| {{ $dep->numero ?? '—' }} | {{ $dep->date?->format('d/m/Y') ?? '—' }} | {{ $dep->libelle }} | {{ $dep->categorie?->label ?? '—' }} | {{ number_format($dep->montant_ttc,3,',',' ') }} |
| Employé | Poste | Mode | Quantité | Taux | Coût | |
|---|---|---|---|---|---|---|
| {{ $aff->employe?->nom ?? '—' }} | {{ $aff->employe?->poste ?? '—' }} | {{ $aff->type_calc === 'horaire' ? 'Horaire' : 'Journalier' }} | {{ $aff->type_calc === 'horaire' ? ($aff->heures ?? 0).' h' : ($aff->jours ?? 0).' j' }} | {{ number_format($taux,3,',',' ') }} TND/{{ $aff->type_calc === 'horaire' ? 'h' : 'j' }} | {{ number_format($cout,3,',',' ') }} TND | |
| COÛT RH TOTAL | {{ number_format($rhTotal,3,',',' ') }} TND | |||||
| Désignation | Référence | Qté | Date affectation | État | Coût loc./j | Actions | |||||||
|---|---|---|---|---|---|---|---|---|---|---|---|---|---|
| {{ $matNom }} | {{ $matRef ?: '—' }} |
{{ $mat->qte }} | {{ $mat->date_affectation ? $mat->date_affectation->format('d/m/Y') : '—' }} | {{ $matEtatLabel }} | {{ $mat->cout_loc > 0 ? number_format($mat->cout_loc,3,',',' ').' TND' : '—' }} |
|
{{ $matNom }}{{ $matRef ? ' — '.$matRef : '' }}
|
||||||
| Société / Nom | Prestation | Montant TND | Statut | Date | Téléphone | Actions | |||||||
|---|---|---|---|---|---|---|---|---|---|---|---|---|---|
| {{ $sstNom }} | {{ $sstPrestation ?: '—' }} | {{ number_format($sst->montant,3,',',' ') }} | {{ ['regle'=>'Réglé','encours'=>'En cours','attente'=>'En attente'][$sst->statut] ?? $sst->statut }} | {{ $sst->date ? $sst->date->format('d/m/Y') : '—' }} | {{ $sstTel ?: '—' }} |
|
{{ $sstNom }}{{ $sstPrestation ? ' — '.$sstPrestation : '' }}{{ $sstTel ? ' · '.$sstTel : '' }}
|
||||||