@extends('company::layouts.master') @section('title', 'تفاصيل المحصل - ' . $collector->user->name) @section('page-title', 'تفاصيل المحصل') @section('page-description', $collector->user->name . ' - ' . $collector->user->email)
{{ substr($collector->user->name, 0, 2) }}

{{ $collector->user->name }}

{{ $collector->user->email }}

@switch($collector->status) @case('active') نشط @break @case('inactive') غير نشط @break @case('suspended') معلق @break @endswitch @if($collector->employee_id) رقم الموظف: {{ $collector->employee_id }} @endif

إحصائيات المحصل

إجمالي التحصيلات

{{ $stats['total_collections'] }}

التحصيلات المكتملة

{{ $stats['completed_collections'] }}

إجمالي المبلغ المحصل

{{ number_format($stats['total_amount_collected'], 2) }}

ر.س

المحطات المُعينة

{{ $stats['assigned_stations_count'] }}

@if($stats['completion_rate'] > 0)
معدل الإنجاز {{ $stats['completion_rate'] }}%
@endif

معلومات إضافية

{{ $collector->user->phone_number ?: 'غير محدد' }}

{{ $collector->created_at->format('Y/m/d H:i') }}

{{ $collector->updated_at->format('Y/m/d H:i') }}

@if($collector->notes)

{{ $collector->notes }}

@endif

المحطات المُعينة

{{ $collector->stations->count() }} محطة
@if($collector->stations->count() > 0)
@foreach($collector->stations as $station)

{{ $station->name }}

{{ $station->city->name ?? 'غير محدد' }}

@if($station->pending_cash_amount > 0)

نقد معلق: {{ number_format($station->pending_cash_amount, 2) }} ر.س

@endif
@if($station->pivot->status === 'active') نشط @else غير نشط @endif

منذ {{ $station->pivot->assigned_at ? \Carbon\Carbon::parse($station->pivot->assigned_at)->diffForHumans() : 'تاريخ غير محدد' }}

@endforeach
@else

لم يتم إسناد أي محطات لهذا المحصل

إسناد محطات
@endif
@if($collector->cashCollections->isNotEmpty())

آخر التحصيلات

@foreach($collector->cashCollections as $collection)

{{ $collection->station->name }}

{{ number_format($collection->total_amount, 2) }} ر.س

{{ $collection->requested_at->format('Y/m/d H:i') }}

@switch($collection->status) @case('pending') في الانتظار @break @case('station_confirmed') تم تأكيد المحطة @break @case('collector_confirmed') تم تأكيد المحصل @break @case('deposited') تم الإيداع @break @case('completed') مكتمل @break @endswitch
@endforeach
@endif