@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 par produit

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

@foreach($sells as $achat) iteration > 1) style="margin-top: 50px" @endif> @php $totalVendu = 0; @endphp @foreach($achat as $sell) @php $totalVendu+= ($sell['out_type'] == 'Vente')?$sell['amount'] : 0; @endphp @endforeach
Date Produit TypeSortie Client Qauntité Montant
{{ \Carbon\Carbon::create($sell['date'])->isoFormat('ll') }}
{{ $sell['product']->name }}
{{ $sell['out_type'] }}
{{ ($sell['customer'])?$sell['customer']->name:"" }}
{{ $sell['sell_quantity'] }}
{{ number_format($sell['amount'], 0, ',', ' ') }} FCFA

Quantité : {{ $achat->sum('sell_quantity') }}          TOTAL VENDU: {{ number_format($totalVendu, 0, ',', ' ') }} FCFA

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

ECART: {{ number_format($achat->sum('amount') - $totalVendu, 0, ',', ' ') }} FCFA

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

@endforeach