@extends('dashboard.layouts.app') @section('title', __('dashboard.Earnings')) @section('page_heading', __('dashboard.Earnings')) @section('breadcrumb') @endsection @section('content')

{{ __('dashboard.Earnings') }} {{ trans_choice('dashboard.earning_count', $earnings->total(), ['count' => $earnings->total()]) }}

{{-- إضافة فورم البحث والفلترة --}}
@if(request()->has('user_id') || request()->has('shipment_ids') || request()->has('status') || request()->has('due_date_from') || request()->has('due_date_to')) {{ __('dashboard.Clear') }} @endif
{{-- نهاية فورم البحث والفلترة --}}
@if($earnings->count() > 0)
@foreach ($earnings as $earning) @endforeach
{{ __('dashboard.ID') }} {{ __('dashboard.User') }} {{ __('dashboard.Coupon') }} {{ __('dashboard.Shipment') }} {{ __('dashboard.Order') }} {{ __('dashboard.Amount') }} {{ __('dashboard.Commission Percentage') }} {{ __('dashboard.Due Date') }} {{ __('dashboard.Status') }} {{ __('dashboard.Notes') }} {{ __('dashboard.Actions') }}
{{ $earning->id }} {{ $earning->user->name }} @if ($earning->coupon) {{ $earning->coupon->code }} @else {{ __('dashboard.N/A') }} @endif #{{ $earning->shipment->id }} #{{ $earning->shipment->order->id }} {{ $earning->amount }} {{ $earning->commission_percentage }}% {{ $earning->due_date->format('Y-m-d') }} @if ($earning->status == 'pending') {{ __('dashboard.Pending') }} @elseif ($earning->status == 'due') {{ __('dashboard.Due') }} @elseif ($earning->status == 'paid') {{ __('dashboard.Paid') }} @endif {{ $earning->notes ?? '---' }}
{{-- عرض روابط التنقل بين الصفحات --}}
{{ $earnings->links() }}
@else
{{ __('dashboard.No earnings found.') }}
@endif
{{-- نافذة تأكيد تسوية الأرباح --}} @endsection @section('scripts') @endsection