@section('title', 'تقرير فترة مخصصة - ' . $company->name) @section('page-title', 'تقرير فترة مخصصة') @section('page-description', 'من ' . $startDate->format('Y-m-d') . ' إلى ' . $endDate->format('Y-m-d'))

إجمالي المبيعات

{{ number_format($periodTotals['total_sales'], 2) }} ر.س

إجمالي الوقود

{{ number_format($periodTotals['total_fuel'], 0) }} لتر

أيام العمل

{{ $periodTotals['unique_days'] }}

متوسط يومي

{{ number_format($periodTotals['avg_daily_sales'], 2) }} ر.س

@if(!empty($chartData))

تحليل المبيعات

@if($reportType === 'daily') المبيعات اليومية خلال الفترة المحددة @elseif($reportType === 'weekly') المبيعات الأسبوعية @else المبيعات الشهرية @endif

أعلى مبيعات
أقل مبيعات
المتوسط
إجمالي النقاط
@if(!empty($periodTotals['employees']))

أداء الموظفين

أفضل {{ min(6, count($periodTotals['employees'])) }} موظفين في الفترة المحددة

{{ count($periodTotals['employees']) }} موظف
@php $topEmployees = collect($periodTotals['employees'])->sortByDesc('sales')->take(6); @endphp @php $maxSales = $topEmployees->max('sales') ?: 1; @endphp @foreach($topEmployees as $index => $employee)
@if($index === 0)
@elseif($index === 1)
2
@elseif($index === 2)
3
@else
{{ $index + 1 }}
@endif

{{ $employee['name'] }}

{{ $employee['shifts'] }} وردية

الأداء {{ number_format(($employee['sales'] / $maxSales) * 100, 1) }}%
{{ number_format($employee['sales'], 0) }} ر.س
متوسط/وردية
{{ number_format($employee['shifts'] > 0 ? $employee['sales'] / $employee['shifts'] : 0, 0) }} ر.س
@endforeach
@endif @if(!empty($periodTotals['fuel_types']))

أنواع الوقود

توزيع المبيعات حسب نوع الوقود

{{ count($periodTotals['fuel_types']) }} نوع
@php $fuelColors = [ 'بنزين 91' => ['from-green-400', 'to-green-600', 'bg-green-100', 'text-green-600'], 'بنزين 95' => ['from-blue-400', 'to-blue-600', 'bg-blue-100', 'text-blue-600'], 'ديزل' => ['from-yellow-400', 'to-yellow-600', 'bg-yellow-100', 'text-yellow-600'], 'كيروسين' => ['from-purple-400', 'to-purple-600', 'bg-purple-100', 'text-purple-600'], ]; $defaultColors = ['from-gray-400', 'to-gray-600', 'bg-gray-100', 'text-gray-600']; @endphp @foreach($periodTotals['fuel_types'] as $fuelType => $data) @php $colors = $fuelColors[$fuelType] ?? $defaultColors; $percentage = $periodTotals['total_sales'] > 0 ? ($data['amount'] / $periodTotals['total_sales']) * 100 : 0; @endphp

{{ $fuelType }}

{{ number_format($data['quantity'], 0) }} لتر

{{ number_format($percentage, 1) }}%
المساهمة في المبيعات {{ number_format($percentage, 1) }}%
إجمالي المبيعات {{ number_format($data['amount'], 0) }} ر.س
متوسط السعر {{ $data['quantity'] > 0 ? number_format($data['amount'] / $data['quantity'], 2) : '0' }} ر.س/لتر
الكمية المباعة
{{ number_format($data['quantity'], 0) }}
لتر
@endforeach
@endif @else

لا توجد بيانات

لا توجد بيانات مبيعات في الفترة المحددة

@endif
@push('scripts') @endpush