Total Sales
K{{ number_format($subcategory['total_after_tax'], 2) }}
Category Contribution
{{ number_format($subcategory['contribution_percentage'], 1) }}%
Average per Product
K{{ number_format($subcategory['total_after_tax'] / $subcategory['product_count'], 2) }}
@if ($subcategory['top_product'] || $subcategory['low_product'])
@endif
Product Breakdown
| Product Code |
Product Name |
Quantity |
Avg Price |
Total Sales |
Performance |
@foreach ($subcategory['products'] as $product)
| {{ $product['commid'] }} |
{{ $product['commname'] }} |
{{ number_format($product['quantity'], 0) }} |
K{{ number_format($product['average_price'], 2) }} |
K{{ number_format($product['total_after_tax'], 2) }} |
@php
$productContribution = $subcategory['total_after_tax'] > 0
? ($product['total_after_tax'] / $subcategory['total_after_tax']) * 100
: 0;
@endphp
{{ number_format($productContribution, 1) }}%
|
@endforeach