@php $company = \App\Models\Company::all()->last() @endphp
{{ $company->name }}
@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
Tel: {{ $phones->join(', ') }}

Rapport des sorties

{{ \Carbon\Carbon::create($reportDate['from'])->isoFormat('ll') }} au {{ \Carbon\Carbon::create($reportDate['to'])->isoFormat('ll') }}

@foreach($sells as $sell) @endforeach
Date Produits TypeSortie Client Total
{{ \Carbon\Carbon::create($sell->date)->isoFormat('ll') }}
@php $achats = json_decode($sell->achats); @endphp
@foreach($achats as $achat) {{ $achat->sell_quantity }} {{ json_decode($achat->product)->name }} @endforeach
{{ $sell->outType->name }}
{{ ($sell->customer)?$sell->customer->name:"" }}
{{ number_format($sell->total, 0, ',', ' ') }} FCFA

TOTAL VENDU: {{ number_format($sells->where('out_type_id', \App\Models\OutType::where('name', 'Vente')->first()->id)->sum('total'), 0, ',', ' ') }} FCFA

TOTAL ATTENDU: {{ number_format($sells->sum('total'), 0, ',', ' ') }} FCFA

ECART: {{ number_format($sells->where('out_type_id', \App\Models\OutType::where('name', '!=', 'Vente')->first()->id)->sum('total'), 0, ',', ' ') }} FCFA

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