Entête

BUDGET PRÉVISIONNEL {{$year}}

@php $i = 1; $grandTotal = 0; @endphp @foreach($actionsParDirection as $direction => $actions) @php $sousTotalDirection = 0; @endphp {{-- Titre de la Direction --}} @foreach($actions as $act) @php $details = $detail_relies->where('action_id', $act->id_action); $rowCount = $details->count() > 0 ? $details->count() : 1; $firstDetail = $details->first(); $otherDetails = $details->skip(1); $sousTotalDirection += $act->montant_action; $grandTotal += $act->montant_action; @endphp {{-- CHAQUE ACTION EST DANS SON PROPRE TBODY POUR ÉVITER LES COUPURES --}} @if($firstDetail) @else @endif @foreach($otherDetails as $det) @endforeach @endforeach {{-- Sous-total Direction --}} @endforeach {{-- TOTAL GÉNÉRAL --}}
No Action Imputation Montant Total Détails Code Montant Détail
{{ strtoupper($direction) }}
{{ $i++ }} {{ $act->nom_action }} {{ $act->code_budget }} {{ number_format($act->montant_action, 0, ',', ' ') }} - {{ $firstDetail->nom_action_detail }} {{ $firstDetail->code_budget_detail }} {{ number_format($firstDetail->montant_action_detail, 0, ',', ' ') }}
- {{ $det->nom_action_detail }} {{ $det->code_budget_detail }} {{ number_format($det->montant_action_detail, 0, ',', ' ') }}
SOUS-TOTAL {{ strtoupper($direction) }} {{ number_format($sousTotalDirection, 0, ',', ' ') }}
TOTAL GÉNÉRAL DU BUDGET {{$year}} {{ number_format($grandTotal, 0, ',', ' ') }}

POUR LE SERVICE COMPTABILITÉ

{{ Auth::user()->name }}