@extends('layouts.master') @section('title', 'Nouvel Engagement') @section('content') {{-- /* surbrillance pour le telecharher et le logo */ --}}
@if(session('success'))
{{ session('success') }}
@endif @if ($errors->any())
Veuillez corriger les erreurs suivantes :
@endif
@csrf @method('PUT')
Informations Générales
Imputation budgétaire
{{-- ===================================================== BLOC UNIQUE : IMPUTATION + CONSOLIDATION ====================================================== --}}
@php $budget = $consolidation->budgetdepense; $compte = optional($budget)->comptesyscohada; $poste = optional($budget)->postegestion; $montant = $consolidation->montant ?? 0; @endphp
{{-- COMPTE SYSCOHADA --}}
{{-- POSTE GESTION --}}
{{-- MONTANT DISPONIBLE --}}
{{-- ===================================================== DETAILS DE LA DEPENSE ====================================================== --}}
Détails de la dépense
@forelse($engagement->engagementdetails as $detail) @php $totalLigne = ($detail->nombre ?? 0) * ($detail->quantite ?? 0) * ($detail->cout_unitaire ?? 0); $designation = $detail->designation ?? $detail->Designation ?? ''; $details = $detail->details ?? $detail->Details ?? ''; @endphp {{-- DESIGNATION --}} {{-- DETAILS --}} {{-- NOMBRE --}} {{-- QUANTITE --}} {{-- COUT UNITAIRE --}} {{-- MONTANT CALCULE --}} @empty @endforelse
Désignation Détails Nombre Quantité Coût unitaire (FCFA) Montant calculé (FCFA)
{{ $designation }} {{ $details }} {{ $detail->nombre ?? 0 }} {{ number_format($totalLigne,0,',',' ') }} FCFA
Aucun détail de dépense disponible.
{{-- ===================================================== TOTAUX ====================================================== --}}
{{-- TOTAL ENGAGE --}}
TOTAL ENGAGÉ
{{ number_format($consolidation->montant_engage ?? 0,0,',',' ') }} FCFA
{{-- MONTANT RESTANT --}}
MONTANT RESTANT
{{ number_format($consolidation->montant_restant ?? 0,0,',',' ') }} FCFA
{{-- CHAMPS CACHES --}}
{{-- ===================================================== HEADER STEP 3 ====================================================== --}}
Pièces Jointes
{{-- ===================================================== BODY STEP 3 ====================================================== --}}
{{-- ===================================================== TYPE DE DOCUMENT ====================================================== --}}
{{-- TYPE --}}
{{-- ================================================= N° DOCUMENT / BESOIN ORDINAIRE ================================================== --}}
{{-- ================================================= RÉFÉRENCE ================================================== --}}
{{-- ===================================================== FACTURE / DEVIS PROFORMA MODIFIABLE ====================================================== --}}
{{-- ================================================= PROFORMA EXISTANT ================================================== --}} @php $proforma = $engagement ->engagementdocuments ->firstWhere( 'type_document', 'proforma' ); @endphp @if($proforma)
{{ $proforma->nom_fichier ?? 'Proforma enregistré' }}
@if($proforma->chemin_fichier) Voir @endif
@else
Aucun devis / facture proforma enregistré.
@endif {{-- ================================================= SÉLECTION DU NOUVEAU PROFORMA ================================================== --}} Vous pouvez ajouter ou remplacer la facture / le devis proforma. @error('documents.proforma') {{ $message }} @enderror
{{-- ===================================================== FOOTER STEP 3 ====================================================== --}} {{-- FIN FOOTER STEP 3 --}}
{{-- FIN CARD STEP 3 --}}
{{-- FIN STEP 3 --}}
@endsection