{{ __('inventory::modules.dashboard.title') }}

@foreach($stockLevels as $stock)

{{ $stock['category'] }}

$stock['status'] === 'adequate', 'bg-yellow-100 dark:bg-yellow-900 text-yellow-800 dark:text-yellow-200' => $stock['status'] === 'low-stock', 'bg-red-100 dark:bg-red-900 text-red-800 dark:text-red-200' => $stock['status'] === 'out-of-stock' ])> {{ __("inventory::modules.dashboard.stock.status.{$stock['status']}") }}
{{ $stock['stock'] }} {{ __('inventory::modules.dashboard.stock.items') }}
@if($stock['low_stock_count'] > 0)

{{ trans_choice('inventory::modules.dashboard.stock.below_threshold', $stock['low_stock_count'], ['count' => $stock['low_stock_count']]) }}

@endif @if($stock['out_of_stock_count'] > 0)

{{ trans_choice('inventory::modules.dashboard.stock.out_of_stock', $stock['out_of_stock_count'], ['count' => $stock['out_of_stock_count']]) }}

@endif
$stock['status'] === 'adequate', 'bg-yellow-500' => $stock['status'] === 'low-stock', 'bg-red-500' => $stock['status'] === 'out-of-stock' ])>
@endforeach

{{ __('inventory::modules.dashboard.sections.top_moving.title') }}

@foreach($topMovingItems as $item)
{{ $item['name'] }} {{ $item['category'] }}
{{ __('inventory::modules.dashboard.sections.top_moving.stock') }}: {{ $item['current_stock'] }} {{ $item['unit'] }}
{{ __('inventory::modules.dashboard.sections.top_moving.usage') }}: {{ $item['usage'] }} {{ $item['unit'] }} @if($item['waste'] > 0) {{ __('inventory::modules.dashboard.sections.top_moving.waste') }}: {{ $item['waste'] }} {{ $item['unit'] }} @endif
@endforeach

{{ __('inventory::modules.dashboard.sections.low_stock.title') }}

@if(count($lowStockItems) > 0) {{ trans_choice('inventory::modules.dashboard.sections.low_stock.alerts', count($lowStockItems), ['count' => count($lowStockItems)]) }} @endif
@forelse($lowStockItems as $item)
$item['current_stock'] <= 0, 'border-yellow-500 bg-yellow-50 dark:bg-yellow-900/20' => $item['current_stock'] > 0 ])>
{{ $item['name'] }} {{ $item['category'] }}
$item['current_stock'] <= 0, 'text-yellow-700 dark:text-yellow-300' => $item['current_stock'] > 0 ])> {{ __('inventory::modules.dashboard.sections.low_stock.current') }}: {{ $item['current_stock'] }} {{ $item['unit'] }} $item['current_stock'] <= 0, 'text-yellow-700 dark:text-yellow-300' => $item['current_stock'] > 0 ])> {{ __('inventory::modules.dashboard.sections.low_stock.threshold') }}: {{ $item['threshold'] }} {{ $item['unit'] }}
@empty
{{ __('inventory::modules.dashboard.sections.low_stock.no_items') }}
@endforelse

{{ __('inventory::modules.dashboard.sections.correlation.title') }}

@foreach($salesStockCorrelation as $item)
{{ $item['name'] }} {{ $item['category'] }}
{{ $item['status']['status'] }}
{{ __('inventory::modules.dashboard.sections.correlation.current_stock') }} {{ $item['current_stock'] }} {{ $item['unit'] }}
{{ __('inventory::modules.dashboard.sections.correlation.usage') }} {{ $item['usage'] }} {{ $item['unit'] }}
{{ __('inventory::modules.dashboard.sections.correlation.stock_added') }} {{ $item['stock_added'] }} {{ $item['unit'] }}
@endforeach

{{ __('inventory::modules.dashboard.sections.expiring_stock.title') }}

{{ count($expiringStockItems) }} {{ __('inventory::modules.dashboard.sections.expiring_stock.items') }}
@foreach($expiringStockItems as $item)
{{ $item->item->name }} {{ $item->item->category->name ?? '-' }}
{{ __('inventory::modules.dashboard.sections.expiring_stock.expires_in', ['days' => intval($item->expiration_date->diffInDays(now(), true))]) }} {{ __('inventory::modules.dashboard.sections.expiring_stock.stock') }}: {{ $item->quantity }} {{ $item->item->unit->symbol }}
@endforeach