@extends('dashboard.layout') @section('title', 'Payment Invoices - Invo Security') @section('page-title', 'Payment Invoices') @section('page-subtitle', 'Manage and track all payment transactions') @section('header-actions') @endsection @section('content')

Total Invoices

{{ $payments->count() }}

All payment records

Total Amount

{{ number_format($payments->sum('amount'), 2) }} SR

Revenue 100%

This Month

{{ number_format($payments->where('created_at', '>=', now()->startOfMonth())->sum('amount'), 2) }} SR

Current month revenue

Pending

{{ $payments->where('status', 'pending')->count() }}

@php $pendingPercentage = $payments->count() > 0 ? ($payments->where('status', 'pending')->count() / $payments->count()) * 100 : 0; @endphp
Attention needed {{ number_format($pendingPercentage, 0) }}%

All Invoices

{{ $payments->count() }} invoices
@forelse($payments as $payment)

INV-{{ str_pad($payment->id, 6, '0', STR_PAD_LEFT) }}

ID: {{ $payment->id }}
@php $statusConfig = [ 'paid' => [ 'color' => 'from-green-500 to-emerald-600', 'icon' => 'fa-check-circle', 'text' => 'text-white' ], 'pending' => [ '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[$payment->status] ?? [ 'color' => 'from-gray-500 to-gray-600', 'icon' => 'fa-question-circle', 'text' => 'text-white' ]; @endphp
Project

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

ID: {{ $payment->project_id }}

Client

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

Amount
{{ number_format($payment->amount, 2) }} SR
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[$payment->payment_method] ?? [ 'color' => 'text-gray-600', 'icon' => 'fa-money-bill' ]; @endphp
{{ ucfirst(str_replace('_', ' ', $payment->payment_method)) }}
{{ \Carbon\Carbon::parse($payment->payment_date)->format('M d, Y') }} {{ $payment->created_at->format('h:i A') }}
@empty

No invoices found

No payment records available yet

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

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

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