@section('title', 'إدارة طلبات التحصيل') @section('page-title', 'إدارة طلبات التحصيل') @section('page-description', 'مراجعة وإدارة جميع طلبات التحصيل النقدي من المحطات')

إحصائيات طلبات التحصيل

آخر تحديث: {{ now()->format('H:i') }}
الكل

{{ number_format($stats['total_collections']) }}

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

معلق

{{ number_format($stats['pending_collections']) }}

قيد المعالجة

مودع

{{ number_format($stats['deposited_collections']) }}

تم الإيداع

مكتمل

{{ number_format($stats['completed_collections']) }}

مكتمل

ريال

{{ number_format($stats['total_amount'], 0) }} ر.س

المبلغ المكتمل

انتظار

{{ number_format($stats['pending_amount'], 0) }} ر.س

في انتظار التأكيد

معدل الإنجاز

@php $completionRate = $stats['total_collections'] > 0 ? round(($stats['completed_collections'] / $stats['total_collections']) * 100, 1) : 0; @endphp

{{ $completionRate }}%

متوسط قيمة الطلب

@php $avgAmount = $stats['completed_collections'] > 0 ? $stats['total_amount'] / $stats['completed_collections'] : 0; @endphp

{{ number_format($avgAmount, 0) }} ر.س

طلبات اليوم

@php $todayCollections = \App\Models\CashCollection::whereHas('station', function($q) { $q->where('company_id', auth()->user()->company_id); })->whereDate('requested_at', today())->count(); @endphp

{{ $todayCollections }}

طلبات التحصيل

@if($collections->count() > 0)
@foreach($collections as $collection) @endforeach
رقم الطلب المحطة المحصل المبلغ الحالة تاريخ الطلب الإجراءات
#{{ $collection->id }} {{ $collection->station->name }} {{ $collection->collector->user->name }} {{ number_format($collection->total_amount, 2) }} ر.س @php $statusClasses = [ 'pending' => 'bg-yellow-100 text-yellow-800', 'station_confirmed' => 'bg-blue-100 text-blue-800', 'collector_confirmed' => 'bg-purple-100 text-purple-800', 'deposited' => 'bg-orange-100 text-orange-800', 'completed' => 'bg-green-100 text-green-800', 'cancelled' => 'bg-red-100 text-red-800', ]; $statusLabels = [ 'pending' => 'في الانتظار', 'station_confirmed' => 'تم تأكيد المحطة', 'collector_confirmed' => 'تم تأكيد المحصل', 'deposited' => 'تم الإيداع', 'completed' => 'مكتمل', 'cancelled' => 'ملغي', ]; @endphp {{ $statusLabels[$collection->status] ?? $collection->status }} {{ $collection->requested_at->format('d/m/Y H:i') }}
عرض @if($collection->status == 'deposited')
@csrf
@endif
{{ $collections->links() }}
@else

لا توجد طلبات تحصيل

لم يتم العثور على طلبات تحصيل تطابق معايير البحث.

@endif