@extends('dashboard.layout') @section('title', 'Transaction History - Invo Security') @section('page-title', 'Transaction History') @section('page-subtitle', 'View and manage all payment transactions') @section('content')

Total Transactions

{{ $transections->total() }}

All payment records

Verified

{{ $transections->where('status', 'verified')->count() }}

@php $verifiedPercentage = $transections->count() > 0 ? ($transections->where('status', 'verified')->count() / $transections->count()) * 100 : 0; @endphp
Success rate {{ number_format($verifiedPercentage, 0) }}%

Pending

{{ $transections->where('status', 'pending_verification')->count() }}

Awaiting verification

Failed

{{ $transections->where('status', 'failed')->count() }}

@php $failedPercentage = $transections->count() > 0 ? ($transections->where('status', 'failed')->count() / $transections->count()) * 100 : 0; @endphp
Failure rate {{ number_format($failedPercentage, 0) }}%

All Transactions

{{ $transections->count() }} transactions
@forelse($transections as $transaction)

#{{ $transaction->transaction_id }}

ID: {{ $transaction->id }}
@php $statusConfig = [ 'verified' => [ 'color' => 'from-green-500 to-emerald-600', 'icon' => 'fa-check-circle', 'text' => 'text-white' ], 'pending_verification' => [ 'color' => 'from-yellow-500 to-orange-500', 'icon' => 'fa-clock', 'text' => 'text-white' ], 'failed' => [ 'color' => 'from-red-500 to-rose-600', 'icon' => 'fa-times-circle', 'text' => 'text-white' ] ]; $config = $statusConfig[$transaction->status] ?? [ 'color' => 'from-gray-500 to-gray-600', 'icon' => 'fa-question-circle', 'text' => 'text-white' ]; @endphp
Project

{{ $transaction->project->name ?? 'N/A' }}

User

{{ $transaction->user->name ?? 'N/A' }}

{{ $transaction->user->email ?? 'N/A' }}

@if($transaction->amount)
Amount
{{ number_format($transaction->amount, 2) }} SR
@endif @if($transaction->payment_method)
Method
@php $methodConfig = [ 'cash' => [ 'color' => 'text-green-600', 'icon' => 'fa-money-bill' ], 'bank_transfer' => [ 'color' => 'text-blue-600', 'icon' => 'fa-university' ], 'check' => [ 'color' => 'text-purple-600', 'icon' => 'fa-file-invoice' ], 'online' => [ 'color' => 'text-indigo-600', 'icon' => 'fa-globe' ], 'mobile_banking' => [ 'color' => 'text-orange-600', 'icon' => 'fa-mobile-alt' ], 'card' => [ 'color' => 'text-red-600', 'icon' => 'fa-credit-card' ] ]; $config = $methodConfig[$transaction->payment_method] ?? [ 'color' => 'text-gray-600', 'icon' => 'fa-money-bill' ]; @endphp
{{ ucfirst(str_replace('_', ' ', $transaction->payment_method)) }}
@endif
{{ $transaction->created_at->format('M d, Y') }} {{ $transaction->created_at->format('h:i A') }}
View Details @if($transaction->receipt) @endif
@empty

No transactions found

Transactions will appear here once payments are made

@endforelse @if($transections->hasPages())

{{ $transections->count() }} of {{ $transections->total() }}

@if($transections->onFirstPage()) @else @endif @if($transections->hasMorePages()) @else @endif
@endif
@endsection