@extends('admin.layouts.master') @section('title', $pageTitle) @section('content')

{{ $pageTitle }}

@foreach($sectionNavigation as $nav) @php $navUrl = Route::has($nav['route']) ? route($nav['route']) : '#'; $navPattern = str_ends_with($nav['route'], '.index') ? str_replace('.index', '.*', $nav['route']) : $nav['route']; @endphp {{ $nav['label'] }} @endforeach
@php $summaryCards = [ ['label' => 'إجمالي المبيعات', 'value' => number_format($summary['total_sales'], 2), 'icon' => 'ti-report-money', 'color' => 'primary'], ['label' => 'إجمالي المرتجعات', 'value' => number_format($summary['total_returns'], 2), 'icon' => 'ti-arrow-back-up', 'color' => 'danger'], ['label' => 'صافي المبيعات', 'value' => number_format($summary['net_sales'], 2), 'icon' => 'ti-chart-line', 'color' => 'info'], ['label' => 'تكلفة البضاعة', 'value' => number_format($summary['total_cogs'], 2), 'icon' => 'ti-package', 'color' => 'warning'], ['label' => 'الربح الإجمالي', 'value' => number_format($summary['gross_profit'], 2), 'icon' => 'ti-chart-bar', 'color' => 'success'], ['label' => 'المصروفات', 'value' => number_format($summary['total_expenses'], 2), 'icon' => 'ti-receipt', 'color' => 'secondary'], ['label' => $summary['net_profit_label'], 'value' => number_format($summary['net_profit'], 2), 'icon' => 'ti-scale', 'color' => $summary['net_profit'] < 0 ? 'danger' : 'success'], ['label' => 'إجمالي الفواتير', 'value' => number_format($summary['total_invoices']), 'icon' => 'ti-file-invoice', 'color' => 'primary'], ['label' => 'متوسط الفاتورة', 'value' => number_format($summary['average_invoice_value'], 2), 'icon' => 'ti-calculator', 'color' => 'info'], ['label' => 'إجمالي التحصيل', 'value' => number_format($summary['total_collected_payments'], 2), 'icon' => 'ti-wallet', 'color' => 'success'], ['label' => 'الأصناف منخفضة المخزون', 'value' => number_format($summary['low_stock_products_count']), 'icon' => 'ti-alert-triangle', 'color' => 'warning'], ['label' => 'الشفتات المفتوحة', 'value' => number_format($summary['open_shifts_count']), 'icon' => 'ti-clock-play', 'color' => 'danger'], ]; @endphp @include('admin.reports.partials.summary-cards', ['summaryCards' => $summaryCards])
اتجاهات صافي المبيعات والربح
ملخص طرق الدفع
آخر الفواتير
@forelse($recentInvoices as $invoice) @empty @endforelse
رقم الفاتورةالتاريخالعميلالكاشيرالإجمالي
{{ $invoice->invoice_number }}{{ $invoice->invoice_date?->format('Y-m-d H:i') }}{{ $invoice->customer?->name ?? 'Walk-in' }}{{ $invoice->user?->name ?? '—' }}{{ number_format((float)$invoice->grand_total, 2) }}
لا توجد بيانات
تنبيهات المخزون المنخفض
@forelse($lowStockItems as $item)
{{ $item->product?->name }}
{{ $item->warehouse?->name }}
{{ number_format((float)$item->quantity, 2) }}
@empty
لا توجد تنبيهات
@endforelse
@endsection @push('scripts') @endpush