Logo
ECART SUR FRAIS DE STRUCTURE
SDP
BILAN {{ \Carbon\Carbon::parse($budget['period_end'])->format('d/m/Y') }}
En CFA Date {{ $periodReference }}
@php $months = $data ? [] : null; foreach($data['budget'] as $category){ if(isset($category['children'])){ foreach($category['children'] as $row){ foreach($row['months'] as $monthKey => $val){ if(!in_array($monthKey, $months)){ $months[] = $monthKey; } } } } } @endphp @foreach($months as $month) @endforeach @foreach($months as $month) @endforeach @php function displayValue($value) { if ($value === null || $value === '') return ''; if ($value == 0) return '-'; return number_format($value, 0, ',', ' '); } @endphp @foreach($data['budget'] as $category) @foreach($category['children'] as $row) @foreach($months as $month) @php $monthData = collect($row['months'])->first(fn($val, $k) => stripos($k, $month) !== false) ?? []; @endphp @endforeach @endforeach @foreach(['rappel_reel','b0','b1','b2','b3', 'prevision_finale','percentage_prevision_final','realisation_prevision','percentage_realisation_final'] as $key) @endforeach @foreach($months as $month) @endforeach @endforeach @php $totalData = $data['total'] ?? []; @endphp @foreach(['rappel_reel','b0','b1','b2','b3','prevision_finale','percentage_prevision_final','realisation_prevision','percentage_realisation_final'] as $key) @endforeach @foreach($months as $month) @endforeach
POSTE LIBELLÉ Rappel Réel B0 B1 B2 B3 BILAN {{ \Carbon\Carbon::parse($budget['period_end'])->format('d/m/Y') }} {{ $year }}{{ $month }}
Prévision Finale à date =
Réalisation à date +
Prévision mois restants
Réalisation à datePrévision Réalisation à
date
{{ $category['poste'] }} {{ strtoupper($category['libelle']) }}
{{ $row['poste'] }} {{ $row['libelle'] }} {{ displayValue($row['rappel_reel']) ?? null }} {{ displayValue($row['b0']) ?? null }} {{ displayValue($row['b1']) ?? null }} {{ displayValue($row['b2']) ?? null }} {{ displayValue($row['b3']) ?? null }} {{ displayValue($row['bilan']) ?? null }} {{ displayValue($row['prevision_finale']) ?? null }} {{ displayValue($row['realisation_final']) ?? null }}{{ displayValue($monthData['prevision'] ?? null) }} {{ displayValue($monthData['realisation'] ?? null) }}
Sous-total {{ $category['libelle'] }}{{ displayValue($category[$key] ?? null) }}{{ displayValue($category['months'][$month]['prevision'] ?? null) }} {{ displayValue($category['months'][$month]['realisation'] ?? null) }}
TOTAL FRAIS DE STRUCTURE{{ displayValue($totalData[$key] ?? null) }}{{ displayValue($totalData['months'][$month]['prevision'] ?? null) }} {{ displayValue($totalData['months'][$month]['realisation'] ?? null) }}