@extends('layouts.app') @section('title', 'Credit Transactions - Admin Panel') @section('page_title', 'Credit Ledger & Transactions') @section('content')
Filter & Search Ledger
Credit Transactions ({{ $transactions->total() }} recorded)
@forelse($transactions as $tx) @empty @endforelse
TX ID User Amount Remaining Expires Type Description Status Reference Date
#TX-{{ str_pad($tx->id, 5, '0', STR_PAD_LEFT) }} @if($tx->user) {{ $tx->user->name }}
{{ $tx->user->email }} @else Deleted User @endif
@if($tx->amount > 0) +{{ $tx->amount }} @else {{ $tx->amount }} @endif @if($tx->amount > 0 && in_array($tx->type, ['addition', 'refund'])) {{ $tx->remaining_amount }} / {{ $tx->amount }} @else N/A @endif @if($tx->expires_at) @if($tx->expires_at->isPast()) Expired @endif @else N/A @endif @if($tx->type === 'addition') Addition @elseif($tx->type === 'deduction') Deduction @elseif($tx->type === 'refund') Refund @else Expired @endif {{ $tx->description }} {{ ucfirst($tx->status ?? 'completed') }} @if($tx->reference_type) {{ class_basename($tx->reference_type) }} #{{ $tx->reference_id }} @else N/A @endif
No transactions found.
{{ $transactions->links() }}
@endsection