@extends('layouts.master') @section('content')

Détails du Budget Carburant

ID: {{ $budget->id_budget_carburant }}
Retour
@if(session('message')) @endif @if(session('message_exist')) @endif
Informations Générales
Ligne budget carburant :
{{ $budget->desc_detail_carburant }}
Budget Alloué :
{{ number_format($budget->id_budget_carburant, 0, ',', ' ') }} BIF
Budget consommé :
{{ number_format($totalMontant, 0, ',', ' ') }} BIF
Carburant consommé :
{{ number_format($totalQuantite, 2) }} L
Arborescence Budgétaire
@if($relationsCompletes && $relationsCompletes->nom_action)
Chemin complet :
{{ $relationsCompletes->code_budget ?? '' }} {{ $relationsCompletes->nom_action ?? '' }}
{{ $relationsCompletes->code_budget_detail ?? '' }} {{ $relationsCompletes->nom_action_detail ?? '' }}
Budget Carburant {{ $budget->desc_detail_carburant }}
@endif @if($budget->status_budget == 1) Actif @elseif($budget->status_budget == 0) Inactif @else En attente @endif
@foreach($bonsAssocies as $bon) @endforeach
# N° Bon N° Système Date Service Véhicule Carburant Quantité (L) Montant (BIF) Mode Paiement Commentaire Statut Action
{{ $loop->iteration }} {{ $bon->numero_bon_a_servir }} {{ $bon->num_bon_sys }} @if($bon->serviele) {{ \Carbon\Carbon::parse($bon->serviele)->format('d/m/Y H:i') }} @else Non servi @endif @if($bon->num_immatriculation)
{{ $bon->num_immatriculation }} @if($bon->marque || $bon->modele)
{{ $bon->marque }} {{ $bon->modele }} @endif
@else Non spécifié @endif
{{ $bon->type_carburant }} {{ number_format($bon->quantite_servie, 2) }} L
{{ number_format($bon->montant_a_payer, 0, ',', ' ') }}
@if($bon->montant_payer > 0)
Payé: {{ number_format($bon->montant_payer, 0, ',', ' ') }}
@endif @if($bon->montant_restant_a_payer > 0)
Reste: {{ number_format($bon->montant_restant_a_payer, 0, ',', ' ') }}
@endif
{{ $bon->mode_payement ?? '-' }} {{ $bon->description ?? '-' }} @php $statuts = [ 0 => ['badge' => 'secondary', 'text' => 'Annulé', 'icon' => 'fa-ban'], 1 => ['badge' => 'info', 'text' => 'Initier', 'icon' => 'fa-file'], 2 => ['badge' => 'warning', 'text' => 'Autoriser', 'icon' => 'fa-check-circle'], 3 => ['badge' => 'primary', 'text' => 'Servi', 'icon' => 'fa-gas-pump'], 4 => ['badge' => 'success', 'text' => 'Payé', 'icon' => 'fa-money-bill-wave'], 5 => ['badge' => 'dark', 'text' => 'Clôturé', 'icon' => 'fa-lock'] ]; $statut = $statuts[$bon->status_bon_a_servir] ?? ['badge' => 'light', 'text' => 'Inconnu', 'icon' => 'fa-question']; @endphp {{ $statut['text'] }}
TOTAUX {{ number_format($totalQuantite, 2) }} L {{ number_format($totalMontant, 0, ',', ' ') }} BIF
@else
Aucun bon de carburant associé à cette ligne budgétaire

Les bons attribués à cette ligne budgétaire apparaîtront ici.

@endif
Historique
Créé le : {{ \Carbon\Carbon::parse($budget->created_at)->format('d/m/Y à H:i') }}
Modifié le : @if($budget->updated_at) {{ \Carbon\Carbon::parse($budget->updated_at)->format('d/m/Y à H:i') }} @else Jamais modifié @endif
Dernier bon : @if($statistiques['total_bons'] > 0) @php $dernierBon = $bonsAssocies->sortByDesc('serviele')->first(); @endphp {{ \Carbon\Carbon::parse($dernierBon->serviele)->format('d/m/Y') }} ({{ number_format($dernierBon->quantite_servie, 2) }} L) @else Aucun bon @endif
Actions Rapides
@if($budget->status_budget == 1) Désactiver le Budget @else Activer le Budget @endif @if($statistiques['total_bons'] > 0) @endif
@endsection @section('scripts') @endsection @section('styles') @endsection