Products Performance

Products Performance

{{ $start->format('d M Y') }} — {{ $end->format('d M Y') }}
← Reports
@foreach(['this_month'=>'This Month','last_month'=>'Last Month','this_year'=>'This Year'] as $k=>$l) {{ $l }} @endforeach
@php $totalUnits = $productsData->sum('total_sold'); $totalRevenue = $productsData->sum('total_revenue'); $maxRev = $productsData->max('total_revenue') ?: 1; @endphp
Products Sold
{{ $totalUnits }}
Total units
Product Revenue
KSh {{ number_format($totalRevenue, 0) }}
Total earned
Unique Products
{{ $productsData->count() }}
Different items
Avg Unit Price
KSh {{ $totalUnits > 0 ? number_format($totalRevenue / $totalUnits, 0) : 0 }}
Per unit sold
Revenue by Product
Units Sold Distribution
Product Breakdown
@forelse($productsData as $i => $prod) @php $rankClass = $i === 0 ? 'gold' : ($i === 1 ? 'silver' : ($i === 2 ? 'bronze' : '')); $pct = $maxRev > 0 ? min(100, ($prod->total_revenue / $maxRev) * 100) : 0; @endphp @empty @endforelse @if($productsData->isNotEmpty()) @endif
# Product Units Sold Revenue Share
{{ $i + 1 }} {{ $prod->name }} {{ $prod->total_sold }} KSh {{ number_format($prod->total_revenue, 2) }}
{{ $totalRevenue > 0 ? number_format($prod->total_revenue / $totalRevenue * 100, 0) : 0 }}%
No products sold in this period.
Total {{ $totalUnits }} KSh {{ number_format($totalRevenue, 2) }}
@push('scripts') @endpush