@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 entrés par produit

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

@foreach($products as $product) @foreach($product as $stock) @endforeach
Date Produit Fournisseur QT Initiale PU Achat PT Achat
{{ \Carbon\Carbon::create($stock->date)->isoFormat('ll') }}
{{ $stock->product->name }}
{{ ($stock->supplier_id)?$stock->supplier->name:"" }}
{{ $stock->wholesale_initial_quantity}} {{ $stock->wholesaleMeasure->unit }}s
{{ $stock->wholesale_unit_purchase_price }} FCFA
{{ number_format($stock->total_purchase_cost, 0, ',', ' ') }} FCFA

Quantité : {{ $product->sum('wholesale_initial_quantity') }} {{ $stock->wholesaleMeasure->unit }}s          PT ACHAT: {{ number_format($product->sum('total_purchase_cost'), 0, ',', ' ') }} FCFA

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

@endforeach