Category Analysis Report

Account: {{ $userName }}

{{ $categoryName }} at {{ $storeName }}

{{ $dateRange['label'] }}: {{ $dateRange['start'] }} to {{ $dateRange['end'] }}
Generated on {{ now()->format('F d, Y \a\t h:i A') }}

Key Performance Indicators

Total After Tax K{{ number_format($kpis['total_after_tax'], 2) }} Total Before Tax K{{ number_format($kpis['total_before_tax'], 2) }} Total Tax K{{ number_format($kpis['total_tax'], 2) }} Avg. Item Price K{{ number_format($kpis['average_item_price'], 2) }} Total Transactions {{ number_format($kpis['total_transactions'], 0) }}
@if(count($categoryPerformance) > 0)

Category Performance ({{ count($categoryPerformance) }} Categories)

@foreach($categoryPerformance as $category) @php $percentOfTotal = $kpis['total_after_tax'] > 0 ? ($category['total_after_tax'] / $kpis['total_after_tax']) * 100 : 0; @endphp @endforeach
Category Products Total Qty Avg Price (K) Total Tax (K) Before Tax (K) After Tax (K) % of Total
{{ $category['category_name'] }}
ID: {{ $category['category_id'] }}
{{ number_format($category['product_count'], 0) }} {{ number_format($category['total_quantity'], 2) }} {{ number_format($category['average_price'], 2) }} {{ number_format($category['total_tax'], 2) }} {{ number_format($category['total_before_tax'], 2) }} {{ number_format($category['total_after_tax'], 2) }} {{ number_format($percentOfTotal, 1) }}%
@endif

Product Breakdown ({{ count($productBreakdown) }} Products)

@if(count($productBreakdown) > 0) @foreach($productBreakdown as $product) @endforeach
Product ID Product Name Unit Quantity Total Tax (K) Before Tax (K) After Tax (K)
{{ $product['product_id'] }} {{ $product['product_name'] }} {{ $product['unit_of_measure'] }} {{ number_format($product['quantity'], 2) }} {{ number_format($product['total_tax'], 2) }} {{ number_format($product['total_before_tax'], 2) }} {{ number_format($product['total_after_tax'], 2) }}
TOTALS {{ number_format(array_sum(array_column($productBreakdown, 'quantity')), 2) }} {{ number_format($kpis['total_tax'], 2) }} {{ number_format($kpis['total_before_tax'], 2) }} {{ number_format($kpis['total_after_tax'], 2) }}
@else

No products found for this category

Try adjusting your filters

@endif