@extends('layouts.main') @push('styles') @endpush @section('content')

Manajemen Pembayaran

@php($userTopHeader = auth()->user()) @if(!$userTopHeader || !$userTopHeader->isSuperAdmin())
Saldo Saat Ini
Rp {{ number_format($stats['balance_amount'] ?? ($stats['total_amount'] ?? 0), 0, ',', '.') }}
Berdasarkan pembayaran yang disetujui
@php($userTop = auth()->user()) @if($userTop && ($userTop->isAdmin() || $userTop->isCreator()))
@endif
@endif
Kegiatan @php($userToggle = auth()->user()) @if($userToggle && ($userToggle->isAdmin() || $userToggle->isSuperAdmin() || $userToggle->isCreator())) Permintaan Penarikan Neraca Keuangan @if($userToggle && ($userToggle->isAdmin() || $userToggle->isSuperAdmin())) Kelola Bank Manual @endif @if($userToggle && ($userToggle->isAdmin() || $userToggle->isSuperAdmin())) Aturan Keuangan @endif @endif
@if(session('success')) @endif @if(session('error')) @endif
Total Pembayaran

{{ number_format($stats['total']) }}

Pending

{{ number_format($stats['pending']) }}

Disetujui

{{ number_format($stats['approved']) }}

Total Pendapatan

Rp {{ number_format($stats['income_amount'] ?? 0, 0, ',', '.') }}

List Pembayaran

@if($payments && $payments->count()) @foreach($payments as $index => $payment) @endforeach @else @endif
No Tanggal User Kegiatan Jumlah Tipe Pembayaran Status Diverifikasi Oleh Aksi
{{ $payments->firstItem() + $index }} {{ $payment->created_at->format('d/m/Y H:i') }}
{{ $payment->user->name ?? 'N/A' }}
{{ $payment->user->email ?? 'N/A' }}
{{ $payment->activity->name ?? 'N/A' }}
ID: {{ $payment->activity_id }}
Rp {{ number_format($payment->amount, 0, ',', '.') }} @if($payment->midtrans_transaction_id) Midtrans @if($payment->midtrans_transaction_id)
{{ substr($payment->midtrans_transaction_id, 0, 20) }}...
@endif @php($mid = $payment->midtrans_response ? json_decode($payment->midtrans_response, true) : null) @if($mid)
@if(isset($mid['transaction_status'])) {{ $mid['transaction_status'] }} @endif @if(isset($mid['fraud_status'])) fraud: {{ $mid['fraud_status'] }} @endif @if(isset($mid['status_code'])) code: {{ $mid['status_code'] }} @endif debug
@endif @elseif($payment->payment_method_id) Manual @if($payment->paymentMethod)
{{ $payment->paymentMethod->name }}
@endif @else Gratis @endif @php($mid = $payment->midtrans_response ? json_decode($payment->midtrans_response, true) : null) @if($mid && isset($mid['transaction_status'])) @php($ts = strtolower($mid['transaction_status'])) @php($midClass = in_array($ts, ['settlement', 'capture']) ? 'bg-green-100 text-green-800' : ($ts === 'pending' ? 'bg-yellow-100 text-yellow-800' : (in_array($ts, ['deny','cancel','expire']) ? 'bg-red-100 text-red-800' : ($ts === 'refund' ? 'bg-orange-100 text-orange-800' : 'bg-gray-100 text-gray-800')))))
Midtrans: {{ $mid['transaction_status'] }} @if(isset($mid['fraud_status'])) fraud: {{ $mid['fraud_status'] }} @endif @if(isset($mid['status_code'])) code: {{ $mid['status_code'] }} @endif
@endif
@if($payment->status === 'approved') Disetujui @elseif($payment->status === 'rejected') Ditolak @else Pending @endif @if($payment->verifier)
{{ $payment->verifier->name }}
@if($payment->verified_at) {{ $payment->verified_at->format('d/m/Y H:i') }} @else N/A @endif
@else - @endif
@if($payment->status === 'pending' && auth()->user() && auth()->user()->canVerifyPayment($payment->activity))
@csrf @method('PUT')
@csrf @method('PUT')
@endif

Tidak ada data pembayaran

Tidak ada data pembayaran ditemukan

@if($payments->hasPages())
Menampilkan {{ $payments->firstItem() }} sampai {{ $payments->lastItem() }} dari {{ $payments->total() }} data
{{ $payments->links() }}
@endif
@endsection @push('scripts') @endpush