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

Rapport Journalier des Distributions

← Retour aux relevés
Date : {{ \Carbon\Carbon::parse($date)->format('d/m/Y') }}
{{-- Résumé des distributions --}}
Gasoil Distribué

{{ number_format($totauxReleves['gasoil'], 2, ',', ' ') }} L

Essence Distribué

{{ number_format($totauxReleves['essence'], 2, ',', ' ') }} L

Total Bons Gasoil

{{ number_format($totauxBons['gasoil'], 2, ',', ' ') }} L

Total Bons Essence

{{ number_format($totauxBons['essence'], 2, ',', ' ') }} L

{{-- Comparaison --}}

Comparaison Distribution (Relevés) vs Bons émis

GASOIL
Distribué (relevés pompes) {{ number_format($comparaison['gasoil']['distribue'], 2, ',', ' ') }} L
Bons servis (status 3,4,5) {{ number_format($comparaison['gasoil']['bons'], 2, ',', ' ') }} L
Différence {{ number_format($comparaison['gasoil']['difference_abs'], 2, ',', ' ') }} L ({{ $comparaison['gasoil']['difference'] >= 0 ? 'Surplus' : 'Manque' }})
Statut {{ $comparaison['gasoil']['statut'] }}
ESSENCE
Distribué (relevés pompes) {{ number_format($comparaison['essence']['distribue'], 2, ',', ' ') }} L
Bons servis (status 3,4,5) {{ number_format($comparaison['essence']['bons'], 2, ',', ' ') }} L
Différence {{ number_format($comparaison['essence']['difference_abs'], 2, ',', ' ') }} L ({{ $comparaison['essence']['difference'] >= 0 ? 'Surplus' : 'Manque' }})
Statut {{ $comparaison['essence']['statut'] }}
{{-- Détail des relevés --}}

Détail des distributions par pompe

@forelse($detailsReleves as $detail) @empty @endforelse
Pompe Type Index départ (L) Index fin (L) Quantité (L)
{{ $detail['pompe'] }} {{ ucfirst($detail['type']) }} {{ number_format($detail['index_depart'], 2, ',', ' ') }} {{ number_format($detail['index_fin'], 2, ',', ' ') }} {{ number_format($detail['quantite'], 2, ',', ' ') }}
Aucun relevé pour cette date
Total général : {{ number_format($totauxReleves['total'], 2, ',', ' ') }} L
{{-- Liste des bons servis --}}

Bons de carburant servis ce jour (Status 3, 4, 5)

Status: 3=Servi, 4=Encaissé, 5=Clôturé
Status 3: {{ $statsBons['status_3'] }} Status 4: {{ $statsBons['status_4'] }} Status 5: {{ $statsBons['status_5'] }} Total: {{ $statsBons['total'] }}
@if(count($detailsBons) > 0) @foreach($detailsBons as $bon) @endforeach
N° Bon Type Quantité (L) Véhicule Responsable Status Date service
{{ $bon['numero_bon'] }} {{ ucfirst($bon['type']) }} {{ number_format($bon['quantite'], 2, ',', ' ') }} {{ $bon['vehicule_id'] }} {{ $bon['responsable'] ?? '-' }} @php $statusLabels = [3 => 'Servi', 4 => 'Encaissé', 5 => 'Clôturé']; $statusClass = [3 => 'info', 4 => 'success', 5 => 'primary']; @endphp {{ $statusLabels[$bon['status']] }} {{ $bon['serviele'] ? \Carbon\Carbon::parse($bon['serviele'])->format('d/m/Y') : '-' }}
Total bons : {{ number_format($totauxBons['total'], 2, ',', ' ') }} L
@else

Aucun bon servi pour cette date

@endif
@endsection