DOZZE COFFEE B2B

Kapsamlı İş Raporu
Rapor Tarihi: {{ $generatedAt->format('d.m.Y H:i') }}
Rapor Tipi: {{ $isAdmin ? 'Genel (Tüm Sistem)' : 'Bayi Raporu' }}
📊 GENEL İSTATİSTİKLER
Toplam Sipariş
{{ number_format($totalOrders, 0, ',', '.') }}
Toplam Ciro
₺{{ number_format($totalRevenue, 2, ',', '.') }}
Aktif Ürün Sayısı
{{ number_format($totalProducts, 0, ',', '.') }}
@if($totalDealers)
Aktif Bayi Sayısı
{{ number_format($totalDealers, 0, ',', '.') }}
@endif
📅 BU AY ({{ now()->format('F Y') }})
Sipariş Adedi
{{ number_format($thisMonthOrders, 0, ',', '.') }}
Toplam Ciro
₺{{ number_format($thisMonthRevenue, 2, ',', '.') }}
🔥 SON 7 GÜN
Sipariş Adedi
{{ number_format($last7DaysOrders, 0, ',', '.') }}
Toplam Ciro
₺{{ number_format($last7DaysRevenue, 2, ',', '.') }}
@if($ordersByStatus->count() > 0)
📦 SİPARİŞ DURUM DAĞILIMI
@foreach($ordersByStatus as $status) @endforeach
Durum Sipariş Sayısı Toplam Tutar
@php $statusNames = [ 'pending' => 'Beklemede', 'confirmed' => 'Onaylandı', 'processing' => 'Hazırlanıyor', 'shipped' => 'Kargoya Verildi', 'delivered' => 'Teslim Edildi', 'cancelled' => 'İptal Edildi', ]; @endphp {{ $statusNames[$status->status] ?? $status->status }} {{ number_format($status->count, 0, ',', '.') }} ₺{{ number_format($status->total, 2, ',', '.') }}
@endif
🏆 EN ÇOK SATILAN ÜRÜNLER (Top 10)
@if($topProducts->count() > 0) @foreach($topProducts as $index => $product) @endforeach
Sıra Ürün Kodu Ürün Adı Satış Adedi
{{ $index + 1 }} {{ $product->sku }} {{ $product->name }} {{ number_format($product->order_items_count, 0, ',', '.') }}
@else

Henüz satış verisi bulunmamaktadır.

@endif
⚠️ DÜŞÜK STOK UYARISI
@if($lowStock->count() > 0) @foreach($lowStock as $inv) @php $available = $inv->stock_qty - $inv->reserved_qty; @endphp @endforeach
Ürün Kodu Ürün Adı Toplam Stok Rezerve Mevcut Durum
{{ $inv->product->sku }} {{ $inv->product->name }} {{ $inv->stock_qty }} {{ $inv->reserved_qty }} {{ $available }} {{ $available > 10 ? 'Düşük' : 'Kritik' }}
@else

Düşük stoklu ürün bulunmamaktadır.

@endif @if($salesData->count() > 0)
📈 SON 30 GÜN SATIŞ TRENDİ
@foreach($salesData as $day) @endforeach
Tarih Sipariş Sayısı Toplam Tutar
{{ \Carbon\Carbon::parse($day->date)->format('d.m.Y') }} {{ number_format($day->count, 0, ',', '.') }} ₺{{ number_format($day->total, 2, ',', '.') }}
TOPLAM {{ number_format($salesData->sum('count'), 0, ',', '.') }} ₺{{ number_format($salesData->sum('total'), 2, ',', '.') }}
@endif