@extends('layouts.app') @section('content')
Manage and track all payment transactions
| Customer | Amount |
Receipt #
|
Date | Method | Status | Actions |
|---|---|---|---|---|---|---|
{{ $payment->customer->CustomerName ?? 'N/A' }}{{ $payment->customer->Email ?? '' }} |
KES {{ number_format($payment->TotalPayment, 2) }} |
{{ $payment->ReceiptNo ?? 'N/A' }}
|
{{ \Carbon\Carbon::parse($payment->PaymentDate)->format('M d, Y') }}
{{ \Carbon\Carbon::parse($payment->PaymentDate)->diffForHumans() }}
|
@php $methodConfig = [ 'mpesa' => ['class' => 'bg-success bg-opacity-10 text-success', 'icon' => 'fa-mobile-alt'], 'bank_transfer' => ['class' => 'bg-info bg-opacity-10 text-info', 'icon' => 'fa-university'], 'cash' => ['class' => 'bg-warning bg-opacity-10 text-warning', 'icon' => 'fa-money-bill-wave'], 'cheque' => ['class' => 'bg-purple bg-opacity-10 text-purple', 'icon' => 'fa-file-invoice-dollar'], 'default' => ['class' => 'bg-secondary bg-opacity-10 text-secondary', 'icon' => 'fa-ellipsis-h'] ]; $method = strtolower($payment->PaymentMode); $config = $methodConfig[$method] ?? $methodConfig['default']; @endphp {{ ucfirst(str_replace('_', ' ', $payment->PaymentMode)) }} | @if($payment->Processed) Processed @else Pending @endif | |
|
No payment records found. Record your first payment |
||||||