@extends('layouts.app') @section('content')

{{ __('Dashboard') }}

{{ __('Overview of your inventory and sales performance.') }}

{{ __('Products') }}

{{ $productCount }}

{{ __('Active') }}: {{ $activeProductCount }}

{{ __('Orders') }}

{{ $orderCount }}

{{ __('Pending') }}: {{ $pendingOrders }}

{{ __('Stock movements') }}

{{ $movementCount }}

{{ __('Today orders') }}: {{ $todayOrders }}

{{ __('Sales this month') }}

{{ number_format($monthSales, 2) }} {{ config('stockiny.currency') }}

{{ __('AOV') }}: {{ number_format($averageOrderValueMonth, 2) }} {{ config('stockiny.currency') }}

{{ __('Sales today') }}

{{ number_format($todaySales, 2) }} {{ config('stockiny.currency') }}

{{ __('Sales this year') }}

{{ number_format($yearSales, 2) }} {{ config('stockiny.currency') }}

{{ __('Inventory units') }}

{{ number_format($inventoryUnits) }}

{{ __('Out of stock') }}: {{ $outOfStockCount }}

{{ __('Inventory value') }}

{{ number_format($inventoryValue, 2) }} {{ config('stockiny.currency') }}

{{ __('Low stock items') }}: {{ $lowStockCount }}

{{ __('Month comparison') }}

{{ __('Compare two months by fulfilled sales.') }}

{{ __('vs') }}

{{ __('Month A') }}

{{ number_format($compareATotal, 2) }} {{ config('stockiny.currency') }}

{{ __('Month B') }}

{{ number_format($compareBTotal, 2) }} {{ config('stockiny.currency') }}

{{ __('Difference') }}

{{ $compareDelta < 0 ? '-' : '+' }}{{ number_format(abs($compareDelta), 2) }} {{ config('stockiny.currency') }}

@if ($compareDeltaPct === null) {{ __('Percent change unavailable (previous month is 0).') }} @else {{ $compareDeltaPct < 0 ? '-' : '+' }}{{ number_format(abs($compareDeltaPct), 2) }}% @endif

{{ __('Fulfilled this month') }}: {{ $fulfilledThisMonth }} / {{ $ordersThisMonth }} ({{ number_format($fulfillmentRate, 1) }}%)

{{ __('Sales trend (last 12 months)') }}

{{ __('Yearly sales') }}

{{ __('Top stock products') }}

{{ __('Order status distribution') }}

{{ __('Top selling products (this month)') }}

{{ __('View orders') }}
@forelse ($topSellingProducts as $item) @empty @endforelse
{{ __('Stock') }} {{ __('Product') }} {{ __('Qty sold') }} {{ __('Sales') }}
{{ $item->product?->sku ?? '—' }} {{ $item->product?->name ?? '—' }} {{ (int) $item->sold_qty }} {{ number_format((float) $item->sold_total, 2) }} {{ config('stockiny.currency') }}
{{ __('No fulfilled sales this month.') }}

{{ __('Low stock') }}

{{ __('View all') }}
@forelse ($lowStockProducts as $product) @empty @endforelse
{{ __('Stock') }} {{ __('Product') }} {{ __('On hand') }}
{{ $product->sku }} {{ $product->name }} {{ $product->quantity_on_hand }}
{{ __('All products are above minimum stock.') }}

{{ __('Recent movements') }}

{{ __('View all') }}
@forelse ($recentMovements as $movement)

{{ $movement->product->name }}

{{ __(\Illuminate\Support\Str::headline($movement->type)) }} · {{ $movement->occurred_at->translatedFormat('M d, Y H:i') }}

{{ $movement->type === 'out' ? '-' : '+' }}{{ $movement->quantity }}
@empty

{{ __('No stock movement yet.') }}

@endforelse
@endsection @push('scripts') @endpush