{{-- -----------------------------------Header informations -----------------------------------------------}}
{{ $entrepriseData['name'] }}
SIEGE ET USINE : {{ $entrepriseAdresse['adresse'] }}
TELEPHONE : +213 {{ $entreprisePhone['phone'] }}
RC : {{ $entrepriseRC['rc'] }}
NIF :  {{ $entrepriseNIF['nif'] }}
AI :  {{ $entrepriseAI['ai'] }}
{{-- R.I.B N° 00300624010782300
N° Article : 16092001186038 --}}
@php $mouvement_date=$mouvements["mouvement_date"]; $mouvement_date_echeance=$mouvements["mouvement_date_echeance"]; $mouvement_date_livraison=$mouvements["mouvement_date_livraison"]; $date=date('d-m-Y', strtotime($mouvement_date)); $date_echeance=date('d-m-Y', strtotime($mouvement_date_echeance)); $date_livraison=date('d-m-Y', strtotime($mouvement_date_livraison)); @endphp @if ($document_type == "II")
Date de validation : {{ $mouvements["damande_validated_date"] }}
@else
Date : {{ $date }}
@endif @if ($document_type == "F")
Date d'échéance : {{ $date_echeance }}
@endif @if ($document_type == "DF") @if ($date_echeance == "01-01-1970")
Validité : jusqu'au -
@else
Validité : jusqu'au {{ $date_echeance }}
@endif @endif @if ($document_type == "D") @if ($date_echeance == "01-01-1970")
Validité : jusqu'au -
@else
Validité : jusqu'au {{ $date_echeance }}
@endif @endif {{----------------------------------------les depots ---------------------------------}} @if ($document_type == "BR") Dépot de réception : {{$mouvements["depot_destination"]}} @elseif ($document_type == "BT") Dépôt source : {{$mouvements["depot_source"]}}
Dépot Déstination : {{$mouvements["depot_destination"]}} @elseif ($document_type == "BL") Dépôt source : {{$mouvements["depot_source"]}}
Vendeur : {{$mouvements["livreur"]}} @elseif ($document_type == "BRe")
Dépot Déstination : {{$mouvements["depot_destination"]}} @endif {{----------------------------------------les depots ---------------------------------}}

{{-- -----------------------------------//Header informations -----------------------------------------------}} {{-- -------------------------------------Inventaire info -------------------------------------------------}} @if ($document_type == "II") @endif {{-- -------------------------------------/Inventaire info -------------------------------------------------}} {{-- ----------------------------------------Client info -------------------------------------------------}} @if ($document_type != "II" and $document_type != "B-REM") {{-- ----------------------------------------/Client info -------------------------------------------------}} {{-- --}}
Dépôt : {{ $mouvements["depot_source"] }}
Inventaire par : {{ $mouvements["createur"] }}
Validé par : {{ $mouvements["validateur_source"] }}
@if ($document_type == "BR" or $document_type == "BRF" or $document_type == "FF" or $document_type == "BC-A" or $document_type == "BCF") Fourniseur : {{ $clients["nom_complet"] }} @else Client : {{ $clients["contact_reference_interne"]." - ".$clients["nom_complet"] }} @endif
Adresse : {!! nl2br(e($clients["contact_adresse"])) !!}
RC : {{ strtoupper($clients["contact_registre_commerce"]) }}
AI : {{ strtoupper($clients["contact_article_imposition"]) }}
TEL / FAX : {{$client_phone}}
@endif
@if ($document_type == "BRe") Bon de Livraison N° : {{$mouvements["mouvement_numero_complet_livraison"]}}
Date du Bon de Livraison : {{$date_livraison}}
Dépot : {{$mouvements["depot_destination"]}} @endif @if ($document_type == "BRF") Bon de Réception N° : {{$mouvements["mouvement_numero_complet_livraison"]}}
Date du Bon de Réception : {{$date_livraison}}
Dépot : {{$mouvements["depot_source"]}} @endif
@if ($document_type == "F") Facture N° : {{ strtoupper($mouvements["mouvement_numero_complet"]) }} @elseif($document_type == "BS") Bon de Sortie 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 == "BRe") Bon de Retour N° : {{ strtoupper($mouvements["mouvement_numero_complet"]) }} @elseif($document_type == "F") Facture N° : {{ strtoupper($mouvements["mouvement_numero_complet"]) }} @elseif($document_type == "FA") Facture d'avoir N° : {{ strtoupper($mouvements["mouvement_numero_complet"]) }} @elseif($document_type == "BRF") Bon de Retour Fournisseur N° : {{ strtoupper($mouvements["mouvement_numero_complet"]) }} @elseif($document_type == "BC") Bon de Commande Vente N° : {{ strtoupper($mouvements["mouvement_numero_complet"]) }} @elseif($document_type == "BCF") Bon de Commande Achat N° : {{ strtoupper($mouvements["mouvement_numero_complet"]) }} @elseif($document_type == "FF") Facture d'achat N° : {{ strtoupper($mouvements["mouvement_numero_complet"]) }} @elseif($document_type == "DF") Devis Fournisseur N° : {{ strtoupper($mouvements["mouvement_numero_complet"]) }} @elseif($document_type == "D") Devis N° : {{ strtoupper($mouvements["mouvement_numero_complet"]) }} @elseif($document_type == "II") Inventaire N° : {{ strtoupper($mouvements["mouvement_numero_complet"]) }} @elseif($document_type == "BC-A") Bon de commande fournisseur N° : {{ strtoupper($mouvements["mouvement_numero_complet"]) }} @elseif($document_type == "B-REM") Bon de remplacement N° : {{ strtoupper($mouvements["mouvement_numero_complet"]) }} @endif {{-- --------------------------------------les depots --------------------------------- @if ($document_type == "BR")
Dépot de réception:{{$mouvements["depot_destination"]}}
@elseif ($document_type == "BT")
Dépôt source:{{$mouvements["depot_source"]}}
Dépot de réception:{{$mouvements["depot_destination"]}}
@elseif ($document_type == "BL")
Dépôt source:{{$mouvements["depot_source"]}}
@endif
----------------------------------------les depots ------------------------------- --}}
{{----------------------------------------------- old depots ----------------------------------------------}} {{-- @if ($document_type == "BR") @elseif ($document_type == "BT") @elseif ($document_type == "BL") @endif
Dépot de réception:{{$mouvements["depot_destination"]}}Dépôt source:{{$mouvements["depot_source"]}} Dépôt déstinaton:{{$mouvements["depot_destination"]}} Dépot source:{{$mouvements["depot_source"]}}
--}} {{-- ---------------------------------------------/ 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 $item) @php($align = "") @if(is_numeric(str_replace(' ' , '' , $item)) ) @php($align = "right") {{-- @if ($loop->index != 3 ) --}} @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 {{-- @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
Visa Caissier Visa Vendeur
@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 Source

@php($validated_source_date=date('d-m-Y', strtotime($mouvements['validated_source_date']))) @if ($mouvements['validated_source_date']=null) @endif Validé par : {{$mouvements['validateur_source']}}
Validé le : {{$validated_source_date}}
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') }}