{{-- Version 2 Header - Based on Swareen Design --}}
@include('Export.Export_pdf.bon-header', ['entreprise' => $entreprise]) {{-- Add this after your main Document Info Box table and before the client info section --}} {{-- NEW SECTION: Add these sections right after the first large info box closes --}}
@if ($document_type == "BRe") Bon de Retour N°: {{ strtoupper($mouvements["mouvement_numero_complet"]) }} @elseif($document_type == "F") FACTURE N°: {{ strtoupper($mouvements["mouvement_numero_complet"]) }} @elseif($document_type == "BL") Bon de Livraison N°: {{ strtoupper($mouvements["mouvement_numero_complet"]) }} @elseif($document_type == "BR") Bon de Réception N°: {{ strtoupper($mouvements["mouvement_numero_complet"]) }} @elseif($document_type == "BT") Bon de Transfert N°: {{ strtoupper($mouvements["mouvement_numero_complet"]) }} @elseif($document_type == "DC") Demande de Chargement N°: {{ strtoupper($mouvements["mouvement_numero_complet"]) }} @elseif($document_type == "D") DEVIS N°: {{ strtoupper($mouvements["mouvement_numero_complet"]) }} @elseif($document_type == "BC") BON DE COMMANDE N°: {{ strtoupper($mouvements["mouvement_numero_complet"]) }} @endif
@php $mouvement_date = $mouvements["mouvement_date"]; $date = date('d/m/Y', strtotime($mouvement_date)); @endphp Date: {{ $date }}
@if ($document_type == "BL" or $document_type == "BC") Mode de Paiement : {{ 'A terme' }} @elseif ($document_type == "BR") Etat réception : {{ $etat_reception ?? 'N/A' }} @endif
@if ($document_type == "BL" or $document_type == "BC")
Vendeur/Livreur : {{ $mouvements['livreur'] ?? 'N/A' }}
Client : {{ strtoupper($clients["contact_reference_interne"]) ?? '//' }} - {{ strtoupper($clients["nom_complet"] ?? '') }}
N° RC : {{ $clients["contact_registre_commerce"] ?? '' }} N.I.F : {{ $clients["contact_nif"] ?? '' }}
N° ART : {{ $clients["contact_article_imposition"] ?? '' }} N.I.S : {{ $clients["contact_nis"] ?? '' }}
@elseif ($document_type == "BR")
Récepteur : {{ $recepteur ?? 'N/A' }}
Dépôt : {{ $mouvements["depot_destination"] ?? 'N/A' }}
@elseif ($document_type == "BT" || $document_type == "DC")
Dépôt source : {{ $mouvements["depot_source"] ?? 'N/A' }}
Dépôt destination : {{ $mouvements["depot_destination"] ?? 'N/A' }}
Vendeur/Livreur : {{ ($clients['contact_nom'] ?? ' ') .' '.( $clients['contact_prenom'] ?? ' ') }}    Code : {{ $clients['contact_reference_interne'] ?? 'N/A' }}
@endif
@if ($document_type == "BL") Autorisation d'utilisation de BLF n° 001 de 22 SEPTEMBRE 2020 Delivré : MC/DCP WILAYA D'ALGER @endif
{{-- END OF NEW SECTIONS --}} {{-- ---------------------------------------------/ old depots -------------------------------------------- --}}
@php($count=0) @foreach ($data->headings as $heading) @php($count=$count+1) @endforeach @foreach ($data->headings as $heading) @php($align_heading = "center") @php($width = "") @php($font_size = "11px") @if ($count==4) @php($font_size = "13px") @if($heading=="Réf") @php($width = "45px") @endif @if($heading=="Unité") @php($width = "54px") @endif @if($heading=="Quantité") @php($width = "104px") @endif @if($heading=="Désignation") @php($width = "500px") @endif @elseif ($count==5) @php($font_size = "13px") @if($heading=="Réf") @php($width = "45px") @endif @if($heading=="Quantité") @php($width = "74px") @endif @if($heading=="Prix unit") @php($width = "40px") @endif @if($heading=="Unité") @php($width = "54px") @endif @if($heading=="Total") @php($width = "85px") @endif @if($heading=="Désignation") @php($width = "475px") @endif @elseif ($count==6) @php($font_size = "14px") @if($heading=="Réf") @php($width = "140px") @endif @if($heading=="Montant TVA") @php($width = "85px") @endif @if($heading=="Taux TVA") @php($width = "85px") @endif @if($heading=="Montant remise") @php($width = "70px") @endif @if($heading=="Taux remise") @php($width = "85px") @endif @if($heading=="Prix unit") @php($width = "70px") @endif @if($heading=="Unité") @php($width = "64px") @endif @if($heading=="Total") @php($width = "70px") @endif @if($heading=="Quantité") @php($width = "55px") @endif @if($heading=="Désignation") @php($width = "280px") @endif @elseif ($count==7) @if($heading=="Réf") @php($width = "45px") @endif @if($heading=="Montant TVA") @php($width = "85px") @endif @if($heading=="Taux TVA") @php($width = "85px") @endif @if($heading=="Montant remise") @php($width = "85px") @endif @if($heading=="Taux remise") @php($width = "85px") @endif @if($heading=="Prix unit") @php($width = "70px") @endif @if($heading=="Unité") @php($width = "54px") @endif @if($heading=="Total") @php($width = "85px") @endif @if($heading=="Qté") @endif @if($heading=="Désignation") @php($width = "274px") @endif @elseif ($count==8) @if($heading=="Réf") @php($width = "45px") @endif @if($heading=="Montant TVA") @php($width = "85px") @endif @if($heading=="Taux TVA") @php($width = "85px") @endif @if($heading=="Montant remise") @php($width = "85px") @endif @if($heading=="Taux remise") @php($width = "85px") @endif @if($heading=="Prix unit") @php($width = "77px") @endif @if($heading=="Unité") @php($width = "54px") @endif @if($heading=="Total") @php($width = "85px") @endif @if($heading=="Qté") @endif @if($heading=="Désignation") @php($width = "255px") @endif @elseif ($count==9) @if($heading=="Réf") @php($width = "45px") @endif @if($heading=="Montant TVA") @php($width = "80px") @endif @if($heading=="Taux TVA") @php($width = "80px") @endif @if($heading=="Montant remise") @php($width = "80px") @endif @if($heading=="Taux remise") @php($width = "80px") @endif @if($heading=="Prix unit") @php($width = "74px") @endif @if($heading=="Unité") @php($width = "53px") @endif @if($heading=="Total") @php($width = "76px") @endif @if($heading=="Qté") @endif @if($heading=="Désignation") @php($width = "166px") @endif @elseif ($count==10) @if($heading=="Réf") @php($width = "40px") @endif @if($heading=="Montant TVA") @php($width = "20px") @endif @if($heading=="Taux TVA") @php($width = "20px") @endif @if($heading=="Montant remise") @php($width = "20px") @endif @if($heading=="Taux remise") @php($width = "20px") @endif @if($heading=="Prix unit") @php($width = "50px") @endif @if($heading=="Unité") @php($width = "20px") @endif @if($heading=="Total") @php($width = "55px") @endif @if($heading=="Qté") @endif @if($heading=="Désignation") @php($width = "195px") @endif @endif @endforeach @foreach ($data->collection as $collection) @foreach ($collection as $key => $item) @php($align = "") @if(is_numeric(str_replace(' ' , '' , $item)) && $key !='article_product_number' ) @php($align = "right") @php($item_centimes = substr(number_format((float)$item-floor($item), 2, ',', ' '),-2)) @if ($item_centimes!=0) @php($item = number_format((float)$item, 2, ',', ' ')) @else @php($item = number_format($item, '0', ',', ' ')) @endif @else @php($align = "left") @endif @if ($loop->index ==3 OR $loop->index ==2 OR $loop->index ==0) @php($align = "center") @endif @endforeach @endforeach {{-- @foreach ($data->collection[0] as $item) @endforeach --}}
{{ $heading }}
{{$item}}
{{-- @endif --}} @else
Mode de Paiement : {{$mouvements['finance_mode_paiement_designation']}}
@endif @endif @if ($document_type=="F" or $document_type=="FF" or $document_type=="BL" or $document_type=="BR" or $document_type=="BRe" or $document_type=="D" or $document_type=="BC" or $document_type=="BCF") @if ($affichage_tab_tva=="true" and $affichage_ligne_montant_tva="true")
@if ($document_type != "BT" and $document_type != "II" and $document_type != "B-REM") @if ($document_type == "BRe")
@foreach($tabTVAs as $TVAs) @if ($TVAs->taux_tva>0) @endif @endforeach
Taux TVA Montant TVA
{{$TVAs->taux_tva}}% @php($item_centimes = substr(number_format($TVAs->montant_tva-floor($TVAs->montant_tva), 2, ',', ' '),-2)) @if ($item_centimes!=0) {{$item = number_format((float)$TVAs->montant_tva, 2, ',', ' ')}} @else {{$item = number_format((float)$TVAs->montant_tva, 0, ',', ' ')}} @endif
@endif @if ($affichage_ligne_montant=="true" or $affichage_ligne_montant_remise=="true" or $affichage_ligne_montant_tva=="true" or $affichage_ligne_montant_ttc=="true" or $affichage_ligne_timbre=="true" or $affichage_ligne_montant_total=="true") @if ($affichage_ligne_montant=="true") @php($item_centimes = substr(number_format($mouvements["montant_total_ht"]-floor($mouvements["montant_total_ht"]), 2, ',', ' '),-2)) @if ($item_centimes!=0) {{$montant_total_ht = number_format((float)$mouvements["montant_total_ht"], 2, ',', ' ')}} @else {{$montant_total_ht = number_format((float)$mouvements["montant_total_ht"], 0, ',', ' ')}} @endif @endif @if ($affichage_ligne_montant_remise=="true") @php($centimes = substr(number_format($mouvements["montant_remise"]-floor($mouvements["montant_remise"]), 2, ',', ' '),-2)) @if ($centimes!=0) {{$montant_remise = number_format((float)$mouvements["montant_remise"], 2, ',', ' ')}} @else {{$montant_remise = number_format((float)$mouvements["montant_remise"], 0, ',', ' ')}} @endif @endif @if ($affichage_ligne_montant_tva=="true") @php($centimes = substr(number_format($mouvements["montant_total_tva"]-floor($mouvements["montant_total_tva"]), 2, ',', ' '),-2)) @if ($centimes!=0) {{$montant_total_tva = number_format((float)$mouvements["montant_total_tva"], 2, ',', ' ')}} @else {{$montant_total_tva = number_format((float)$mouvements["montant_total_tva"], 0, ',', ' ')}} @endif @endif @if ($affichage_ligne_montant_ttc=="true") @php($centimes = substr(number_format($mouvements["montant_total_ttc"]-floor($mouvements["montant_total_ttc"]), 2, ',', ' '),-2)) @if ($centimes!=0) {{$montant_total_ttc = number_format((float)$mouvements["montant_total_ttc"], 2, ',', ' ')}} @else {{$montant_total_ttc = number_format((float)$mouvements["montant_total_ttc"], 0, ',', ' ')}} @endif @endif @if ($affichage_ligne_timbre=="true") @php($centimes = substr(number_format($mouvements["montant_timbre"]-floor($mouvements["montant_timbre"]), 2, ',', ' '),-2)) @if ($centimes!=0) {{$montant_timbre = number_format((float)$mouvements["montant_timbre"], 2, ',', ' ')}} @else {{$montant_timbre = number_format((float)$mouvements["montant_timbre"], 0, ',', ' ')}} @endif @endif @if ($affichage_ligne_montant_total=="true") @php($centimes = substr(number_format($mouvements["montant_total"]-floor($mouvements["montant_total"]), 2, ',', ' '),-2)) @if ($centimes!=0) {{$montant_total = number_format((float)$mouvements["montant_total"], 2, ',', ' ')}} @else {{$montant_total = number_format((float)$mouvements["montant_total"], 0, ',', ' ')}} @endif @endif
Montant {{$montant_total_ht}}
Montant remise {{$montant_remise}}
Montant TVA {{$montant_total_tva}}
Montant TTC {{ $montant_total_ttc}}
Timbre {{$mouvements["montant_timbre_pourcentage"]}} % {{$montant_timbre}}
NET A PAYER {{$montant_total}}
@endif @endif {{-- --}}
Mode de Paiement : {{$mouvements['finance_mode_paiement_designation']}}
@foreach($tabTVAs as $TVAs) @if ($TVAs->taux_tva>0) @endif @endforeach
Total TVA {{$TVAs->taux_tva}}% {{$item = number_format((float)$TVAs->montant_tva, 2, ',', ' ')}}
Montant {{ (float)$mouvements["montant_total_ht"] }}
Remise {{ $mouvements["montant_remise"] ? (float)$mouvements["montant_remise"] : '0.00' }}
Total Net HT {{$mouvements["montant_total"] ? (float)$mouvements["montant_total"] : '0.00' }}
Total TVA {{ $mouvements["montant_total_tva"] ? (float)$mouvements["montant_total_tva"] : "0.00" }}
Timbre {{ (float)$mouvements["montant_timbre"] }}
Total TTC {{ (float)$mouvements["montant_total_ttc"] }}
Solde actuel {{ (float)$clients["montant_credit_en_cours"] }}
@if ($document_type != "BT" && $document_type != "II" && $document_type != "BC" && $document_type != "BCF" && $document_type != "BRe" && $document_type != "B-REM" && $document_type != "BSD") @endif
@if ($document_type == "F") Arrêté la présente facture @elseif($document_type == "FF") Arrêté la présente facture d'achat @elseif($document_type == "bon_sortie") Arrêté le présent bon de sortie @elseif($document_type == "BL") Arrêté le présent bon de Livraison @elseif($document_type == "BR") Arrêté le présent bon de réception @elseif($document_type == "BRe") Arrêté le présent bon de retour @elseif($document_type == "BRF" or $document_type == "FA") Arrêté le présent bon de retour fournisseur @elseif($document_type == "BC") Arrêté le présent bon de commande @elseif($document_type == "BC-A") Arrêté le présent bon de commande d'achat @elseif($document_type == "BCF") Arrêté le présent bon de commande fournisseur @elseif($document_type == "DF") Arrêté le présent devis fournisseur @elseif($document_type == "D") Arrêté le présent devis @endif {{-- @if($affichage_tab_tva=="true") @if ($montant_centimes==00) à la somme de : {{strtoupper($montant_letters_dinars)}} Dinars @else à la somme de : {{strtoupper($montant_letters_dinars)}} Dinars et {{strtoupper($montant_letters_centimes)}} Centimes @endif @else --}} @if ($montant_centimes==00) à la somme de : {{strtolower($montant_total_letters_dinars)}} dinars @else à la somme de : {{strtolower($montant_total_letters_dinars)}} dinars et {{strtolower($montant_total_letters_centimes)}} centimes @endif
@if ($document_type == "BR") @php($recived_date=date('d-m-Y', strtotime($mouvements['recived_date']))) Reçu par : {{$mouvements['receveur']}}
@if ($date_echeance == "01-01-1970") Reçu le : - @else Reçu le : {{$recived_date}} @endif @elseif($document_type == "F" or $document_type == "FF")
Service commercial @elseif ($document_type == "BRF") Retourné par : {{$mouvements['retouner_par']}}
@php($recived_date=date('d-m-Y', strtotime($mouvements['recived_date']))) @if ($date_echeance == "01-01-1970") Retourné le : {{$mouvements['damande_validated_date']}} @else Retourné le : {{$mouvements['damande_validated_date']}} @endif @endif
@if ($document_type == "BT")
Validation Destination

@php($validated_destination_date=date('d-m-Y', strtotime($mouvements['validated_destination_date']))) @if ($validated_destination_date=null) @endif Validé par : {{$mouvements['validateur_destination']}}
Validé le : {{$validated_destination_date}}
@endif
@if ($affichage_cachet == 1) @else @endif @if ($affichage_sign_num == 1) @else @endif
Imprimé le : {{date('d/m/Y H:i:s') }}