@include('Partials.sidebar')
@include('Partials.header')
{{-- ── Page Title ── --}}

My Payments

Payments received for your bookings — {{ $broker->name }}

  1. My Bookings
  2. My Payments
{{-- ── No linked account warning ── --}} @if($no_frontend_account)
Account not linked. Your broker admin account is not linked to a frontend user account. Please register on the frontend using the same email address ({{ $broker->email }}) to see your payment history.
@endif {{-- ── KPI Cards ── --}}
@foreach([ ['Total Received', $currency.$stats['total_received'], '#22c55e', 'fa-coins'], ['Successful Payments', $stats['total_count'], '#3b82f6', 'fa-check-circle'], ['Pending', $stats['pending_count'], '#f59e0b', 'fa-clock'], ['Failed', $stats['failed_count'], '#ef4444', 'fa-times-circle'], ['Online Payments', $currency.$stats['online_amount'], '#8b5cf6', 'fa-globe'], ['Cash Payments', $currency.$stats['cash_amount'], '#10b981', 'fa-money-bill'], ['Commission Earned', $currency.$stats['commission_paid'], '#c9a96e', 'fa-percentage'], ['Commission Pending', $currency.$stats['commission_pending'],'#f59e0b', 'fa-wallet'], ] as [$label, $val, $color, $icon])
{{ $val }}
{{ $label }}
@endforeach
{{-- ── Filters ── --}}
{{-- Period --}} @foreach([ 'all' => 'All Time', 'this_month' => 'This Month', 'last_month' => 'Last Month', 'this_quarter' => 'This Quarter', 'this_year' => 'This Year', ] as $val => $label) {{ $label }} @endforeach
{{-- ── Tabs ── --}}
{{-- ── Tab 1: Transactions ── --}}
Payment Transactions {{ $transactions->total() }}
@forelse($transactions as $i => $tx) @php $statusColors = ['success'=>'#22c55e','pending'=>'#f59e0b','failed'=>'#ef4444','refunded'=>'#8b5cf6']; $sc = $statusColors[$tx->status] ?? '#94a3b8'; $modeIcons = ['online'=>'fa-globe','cash'=>'fa-money-bill','manual'=>'fa-edit']; $mi = $modeIcons[$tx->mode ?? ''] ?? 'fa-credit-card'; @endphp @empty @endforelse
# Client Unit Amount Gateway Mode Status Payment ID Date
{{ $transactions->firstItem() + $i }}
{{ $tx->booking->client_name ?? '—' }}
{{ $tx->booking->client_phone ?? '' }}
Unit {{ $tx->booking->plot_number ?? '—' }} {{ $currency }}{{ $tx->amount }} {{ ucfirst($tx->gateway) }} {{ ucfirst($tx->mode ?? '—') }} {{ ucfirst($tx->status) }} {{ $tx->gateway_payment_id ?? '—' }} {{ $tx->paid_at ? \Carbon\Carbon::parse($tx->paid_at)->format('d M Y') : \Carbon\Carbon::parse($tx->created_at)->format('d M Y') }}
{{ $tx->paid_at ? \Carbon\Carbon::parse($tx->paid_at)->format('H:i') : '' }}
No payment transactions found.
@if($transactions->hasPages()) @endif
{{-- ── Tab 2: Commission Summary ── --}}
Commission per Booking
@php $totalComm = 0; $totalDeal = 0; @endphp @forelse($bookingSummary as $i => $b) @php $csColors = ['paid'=>'#22c55e','pending'=>'#f59e0b','approved'=>'#3b82f6']; $bsColors = ['confirmed'=>'#22c55e','pending'=>'#f59e0b','cancelled'=>'#ef4444']; $cc = $csColors[$b->commission_status ?? ''] ?? '#94a3b8'; $bc = $bsColors[$b->booking_status ?? ''] ?? '#94a3b8'; $totalComm += (float)($b->commission_amount ?? 0); $totalDeal += (float)($b->total_amount ?? 0); @endphp @empty @endforelse @if($bookingSummary->count() > 0) @endif
# Client Unit Deal Value Rate Commission Booking Status Commission Status Date
{{ $i + 1 }}
{{ $b->client_name ?? '—' }}
{{ $b->client_phone ?? '' }}
Unit {{ $b->plot_number ?? '—' }}
{{ $b->plot_type ?? '' }}
{{ $currency }}{{ $b->total_amount ?? 0 }} @if($b->commission_rate) {{ $b->commission_rate }}% @else @endif {{ $b->commission_amount ? $currency.$b->commission_amount : '—' }} {{ ucfirst($b->booking_status ?? '—') }} {{ ucfirst($b->commission_status ?? 'Unpaid') }} {{ \Carbon\Carbon::parse($b->created_at)->format('d M Y') }}
No bookings found.
Totals {{ $currency }}{{ $totalDeal }} {{ $currency }}{{ $totalComm }}
{{-- end tab-content --}}
@include('Partials.footer')