@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
This Month
{{ number_format($payments->where('created_at', '>=', now()->startOfMonth())->sum('amount'), 2) }} SR
Current month revenue
Pending
{{ $payments->where('status', 'pending')->count() }}
| Invoice Details | Project & Client | Payment Info | Status | Actions |
|---|---|---|---|---|
|
INV-{{ str_pad($payment->id, 6, '0', STR_PAD_LEFT) }} ID: {{ $payment->id }}
{{ \Carbon\Carbon::parse($payment->payment_date)->format('M d, Y') }}
•
{{ $payment->created_at->format('h:i A') }}
|
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' => 'from-green-500 to-emerald-600',
'icon' => 'fa-money-bill'
],
'bank_transfer' => [
'color' => 'from-blue-500 to-blue-600',
'icon' => 'fa-university'
],
'check' => [
'color' => 'from-purple-500 to-purple-600',
'icon' => 'fa-file-invoice'
],
'online' => [
'color' => 'from-indigo-500 to-indigo-600',
'icon' => 'fa-globe'
],
'mobile_banking' => [
'color' => 'from-orange-500 to-orange-600',
'icon' => 'fa-mobile-alt'
],
'card' => [
'color' => 'from-red-500 to-red-600',
'icon' => 'fa-credit-card'
]
];
$config = $methodConfig[$payment->payment_method] ?? [
'color' => 'from-gray-500 to-gray-600',
'icon' => 'fa-money-bill'
];
@endphp
{{ ucfirst(str_replace('_', ' ', $payment->payment_method)) }}
|
@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 {{ ucfirst($payment->status) }} | |
|
No invoices found No payment records available yet |
||||
INV-{{ str_pad($payment->id, 6, '0', STR_PAD_LEFT) }}
{{ $payment->project->name ?? 'N/A' }}
ID: {{ $payment->project_id }}
{{ $payment->user->name ?? 'N/A' }}
No invoices found
No payment records available yet