@extends('root') @section('title', 'Riwayat Topup') @section('content')
@include('components.breadcrumb', [ 'title' => 'Riwayat Topup', 'links' => [ ['url' => route('client.dashboard'), 'label' => 'Dashboard'], ['url' => route('client.topup.index'), 'label' => 'Topup'], ], 'current' => 'Riwayat' ])
Saldo Saat Ini

Rp {{ number_format($client->balance, 0, ',', '.') }}

@if($transactions->isEmpty())

Belum ada transaksi topup

@else
@foreach($transactions as $tx) @endforeach
Order ID Gateway Nominal Fee Layanan Saldo Tersedia Status Tanggal Aksi
{{ $tx->order_id }} @if($tx->gateway === 'pakar_digital') Pakar Digital @else Midtrans @endif {{ $tx->formatted_amount }} @if($tx->service_fee > 0) -{{ $tx->formatted_service_fee }} @else - @endif @if($tx->net_amount > 0) {{ $tx->formatted_net_amount }} @else - @endif @if(strtolower($tx->status) === 'success') {{ $tx->status }} @elseif(strtolower($tx->status) === 'pending') {{ $tx->status }} @if($tx->expired_at && $tx->expired_at->isPast())
Expired @endif @elseif(strtolower($tx->status) === 'expired') {{ $tx->status }} @else {{ $tx->status }} @endif
{{ $tx->created_at->format('d M Y H:i') }} @if(strtolower($tx->status) === 'pending') @if($tx->expired_at && $tx->expired_at->isFuture() && $tx->payment_url) Bayar @else
@csrf
@endif @elseif(strtolower($tx->status) === 'expired')
@csrf
@elseif(strtolower($tx->status) === 'success') Lunas @else - @endif
{{ $transactions->links() }}
@endif
@if($balanceHistories->isEmpty())

Belum ada riwayat saldo

@else
@foreach($balanceHistories as $history) @endforeach
Ref ID Tipe Nominal Saldo Sebelum Saldo Sesudah Tanggal
{{ Str::limit($history->reference_id, 15) }} {{ $history->type }} {{ $history->formatted_amount }} Rp {{ number_format($history->balance_before, 0, ',', '.') }} Rp {{ number_format($history->balance_after, 0, ',', '.') }} {{ $history->created_at->format('d M Y H:i') }}
{{ $balanceHistories->links() }}
@endif
@endsection