Reports & Analytics

Reports & Analytics

Comprehensive inventory insights and analysis

Inventory Value

{{ currency($summary['total_inventory_value']) }}

{{ $summary['active_items'] }} active items

Low Stock Items

{{ $summary['low_stock_items'] }}

{{ $summary['out_of_stock_items'] }} out of stock

Wastage Cost

{{ currency($summary['total_wastage_cost']) }}

{{ currency($summary['pending_wastage_cost']) }} pending

Stock Movements

{{ number_format($summary['total_movements']) }}

{{ $summary['total_productions'] }} productions

@if($wastageByCategory->isNotEmpty())

Wastage Analysis by Category

@foreach($wastageByCategory as $category)
{{ $category['label'] }} {{ $category['count'] }} incidents
{{ currency($category['total_cost']) }}
@php $maxCost = $wastageByCategory->max('total_cost'); $percentage = $maxCost > 0 ? ($category['total_cost'] / $maxCost) * 100 : 0; @endphp
@endforeach
@endif
@if($topWastedItems->isNotEmpty())

Top 10 Most Wasted Items

@foreach($topWastedItems as $index => $wastage)
{{ $index + 1 }}

{{ $wastage->item->name ?? 'N/A' }}

{{ number_format($wastage->total_quantity, 2) }} {{ $wastage->item->unit->abbreviation ?? '' }} • {{ $wastage->incident_count }} incidents

{{ currency($wastage->total_cost) }}
@endforeach
@endif @if($movementsByType->isNotEmpty())

Stock Movement Summary

@foreach($movementsByType as $movement)
{{ $movement['label'] }} {{ $movement['count'] }} movements
{{ currency($movement['total_value']) }}
@endforeach
@endif
@if($productionVariance && $productionVariance->total_expected > 0)

Production Cost Variance

Expected Cost

{{ currency($productionVariance->total_expected) }}

Actual Cost

{{ currency($productionVariance->total_actual ?? 0) }}

Avg Variance

@php $variance = $productionVariance->avg_variance_pct ?? 0; $isPositive = $variance > 0; @endphp

{{ $isPositive ? '+' : '' }}{{ number_format($variance, 1) }}%

@if($topVarianceProductions->isNotEmpty())

Top Variance Productions

@foreach($topVarianceProductions as $production) @php $variance = $production->variance; $isPositive = $variance > 0; @endphp

{{ $production->batch_number }}

{{ $production->recipe->name ?? 'N/A' }}

{{ $isPositive ? '+' : '' }}{{ currency($variance) }}
@endforeach
@endif
@endif @if($categoryValues->isNotEmpty())

Inventory Value by Category

@php $totalValue = $categoryValues->sum('total_value'); @endphp @foreach($categoryValues as $category) @endforeach
Category Items Total Stock Total Value % of Total
{{ $category->category->name ?? 'Uncategorized' }} {{ $category->item_count }} {{ number_format($category->total_stock, 2) }} {{ currency($category->total_value) }} {{ $totalValue > 0 ? number_format(($category->total_value / $totalValue) * 100, 1) : 0 }}%
@endif @if($lowStockItems->isNotEmpty())

Low Stock Alerts

@foreach($lowStockItems as $item) @endforeach
Item Category Current Stock Minimum Stock Status
{{ $item->name }}
{{ $item->sku }}
{{ $item->category->name ?? 'N/A' }} {{ number_format($item->current_stock, 2) }} {{ $item->unit->abbreviation ?? '' }} {{ number_format($item->minimum_stock, 2) }} {{ $item->unit->abbreviation ?? '' }} @if($item->current_stock == 0) Out of Stock @else Low Stock @endif
@endif