@extends('collector::layouts.collector') @section('title', 'المحطات المُعينة') @section('header')

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

عرض جميع المحطات المُعينة لك للتحصيل منها

إجمالي المحطات
{{ $stations->count() }}
@endsection @section('content')
@if($stations->count() > 0)

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

{{ $stations->count() }}

المحطات الجاهزة للتحصيل

{{ $stations->where('pending_cash_amount', '>', 0)->count() }}

إجمالي النقد المعلق

{{ number_format($stations->sum('pending_cash_amount'), 2) }}

ر.س

@foreach($stations as $station)

{{ $station->name }}

{{ $station->company->name }}

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

@if($station->pending_cash_amount > 0)
{{ number_format($station->pending_cash_amount, 2) }}
ر.س معلق
@else
لا يوجد نقد معلق
@endif
@php $canCreateCollection = $station->canCreateCollectionRequest(); @endphp @if($canCreateCollection['can_create'])
@csrf
@else @php $reasons = $canCreateCollection['reasons']; $messages = array_filter($canCreateCollection['messages']); @endphp @if($reasons['pending_cash_amount'] <= 0) لا يوجد نقد معلق @elseif($reasons['active_collections_count'] > 0) @php $statusText = implode(', ', $reasons['active_collection_statuses'] ?? []); $statusColors = [ 'pending' => 'bg-yellow-100 text-yellow-700', 'station_confirmed' => 'bg-blue-100 text-blue-700', 'collector_confirmed' => 'bg-purple-100 text-purple-700', 'deposited' => 'bg-indigo-100 text-indigo-700' ]; $firstStatus = $reasons['active_collection_statuses'][0] ?? 'pending'; $colorClass = $statusColors[$firstStatus] ?? 'bg-orange-100 text-orange-600'; @endphp 🚫 طلب نشط @elseif($reasons['active_collectors_count'] <= 0) لا يوجد محصلين @else غير متاح @endif @endif
@endforeach
@else

لا توجد محطات مُعينة

لم يتم تعيين أي محطات لك بعد. تواصل مع إدارة الشركة لتعيين محطات للتحصيل منها.

@endif
@endsection