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

{{ __('dashboard.Earnings for') }} {{ $user->name }}

{{ __('dashboard.Total Balance') }}: {{ $totalBalance }}
{{ __('dashboard.Pending Balance') }}: {{ $pendingBalance }}
@if($earnings->count() > 0) @foreach ($earnings as $earning) @endforeach
{{ __('dashboard.ID') }} {{ __('dashboard.Shipment') }} {{ __('dashboard.Order') }} {{ __('dashboard.Coupon') }} {{ __('dashboard.Amount') }} {{ __('dashboard.Commission Percentage') }} {{ __('dashboard.Due Date') }} {{ __('dashboard.Status') }} {{ __('dashboard.Notes') }}
{{ $earning->id }} #{{ $earning->shipment->id }} #{{ $earning->shipment->order->id }} @if($earning->coupon) {{ $earning->coupon->code }} @else {{ __('dashboard.N/A') }} @endif {{ $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 for this user.') }}
@endif
@endsection