@extends('reseller.layouts.app') @section('title', 'Wallet Balance') @section('page-title', 'Wallet Balance') @push('styles') @endpush @section('content')

My Wallet

Manage your earnings and transactions

Current Balance
৳ {{ number_format($walletBalance ?? 0, 2) }}
Available for withdrawal
Total Earned
৳ {{ number_format($totalEarned ?? 0, 2) }}
Lifetime earnings
Total Orders
{{ number_format($totalOrders ?? 0) }}
Orders with profit
Transaction History
@forelse($orders as $order) @empty @endforelse
Order ID Date & Time Customer Info Profit Status Action
#{{ $order->invoice_id ?? $order->id }}
{{ $order->created_at->format('M d, Y') }} {{ $order->created_at->format('h:i A') }}
{{ substr($order->customer->name ?? 'G', 0, 1) }}
{{ Str::limit($order->customer->name ?? 'Guest', 15) }} {{ $order->customer->phone ?? 'N/A' }}
+৳{{ number_format($order->reseller_profit ?? 0, 2) }} @php $status = $order->order_status ?? 0; $badgeClass = 'badge-pending'; $statusName = $order->status->name ?? 'Pending'; if ($status == 6) { $badgeClass = 'badge-completed'; } // Delivered elseif ($status == 11) { $badgeClass = 'badge-cancelled'; } // Cancelled elseif ($status == 5 || $status == 2) { $badgeClass = 'badge-processing'; } // Processing @endphp {{ $statusName }}
No transactions found
@if($orders->hasPages())
{{-- Previous Button --}} @if ($orders->onFirstPage()) @else @endif {{-- Page Numbers --}} @foreach(range(1, $orders->lastPage()) as $i) @if($i >= $orders->currentPage() - 2 && $i <= $orders->currentPage() + 2) @if ($i == $orders->currentPage()) {{ $i }} @else {{ $i }} @endif @endif @endforeach {{-- Next Button --}} @if ($orders->hasMorePages()) @else @endif
@endif
@endsection