@if(request()->is('*-pdf')) @php $company = \App\Models\Company::all()->last() @endphp
{{ $company->address }}
@php $phones = collect(); $company->phone1 ? $phones->push($company->phone1) : ''; $company->phone2 ? $phones->push($company->phone2) : ''; $company->phone3 ? $phones->push($company->phone3) : ''; $company->phone4 ? $phones->push($company->phone4) : ''; @endphp
Tél : {{ $phones->join(', ') }}
E-mail: {{ $company->email1 ?? '' }}

@endif

Liste des bons de commandes


@foreach($commands as $command) @endforeach
Date Code Vente Fournisseur Produits Paiement TVA Total Statut
{{ \Carbon\Carbon::create($command->date)->isoFormat('ll') }}
{{ ($command->code)?$command->code:"" }}
{{ ($command->supplier_id)?$command->supplier->name:"" }}
@php $products = json_decode($command->products); @endphp
@foreach($products as $product) {{ $product->command_quantity }} {{ json_decode($product->command_measure)->unit }}(s) de {{ $product->product }},
@endforeach
{{ (isset($command->paymentMethod))?$command->paymentMethod->method:null }}
{{ $command->tva }}
{{ $command->total }} FCFA
{{ $command->state->name }}

Créer le {{ \Carbon\Carbon::now()->isoFormat('lll') }}