@extends('admin.layouts.master') @section('contents')
{{-- Balance Summary Cards --}}

${{number_format($balanceToUse, 2)}}

{{__('Available to withdraw')}}

{{__('The balance you deposited, which you can use to pay for the project auction.')}}

${{number_format($pendingAmount, 2)}}

{{__('The Pending')}}

{{__('It includes the budget of your ongoing projects and any amount you requested to withdraw that is still in transfer, in addition to your profits in the last 14 days.')}}

${{number_format($profitBalance, 2)}}

{{__('Balance To Withdraw')}}

{{__('It includes your profits from projects that can be withdrawn.')}}
{{-- Search / Filter Form --}}
{{__('Reset')}}
{{-- Transactions Table --}}
@forelse($payments as $payment) @empty @endforelse
# {{__('Project')}} {{__('Amount')}} {{__('Transaction Type')}} {{__('Status')}} {{__('Payment Method')}} {{__('Date')}} {{__('Balance')}}
{{$payment->id}} @if($payment->project) {{Str::limit($payment->project->title, 30)}} @else @endif @php $isDebit = in_array($payment->type, ['deposit', 'withdraw', 'service_charge']); @endphp {{ $isDebit ? '-' : '+' }}${{number_format($payment->amount, 2)}} @php $typeBadge = match($payment->type) { 'withdraw' => 'danger', 'deposit' => 'info', 'profit' => 'success', 'charge' => 'warning', 'service_charge' => 'secondary', 'refund' => 'primary', default => 'light', }; @endphp {{__(\Illuminate\Support\Str::title(str_replace('_', ' ', $payment->type)))}} @php $statusBadge = match($payment->status) { 'pending' => 'warning', 'success' => 'success', 'failed' => 'danger', 'cancelled' => 'secondary', default => 'light', }; @endphp {{__(ucfirst($payment->status))}} @if($payment->payment_method) {{ucfirst($payment->payment_method)}} @else @endif {{$payment->created_at->format('M j, Y')}}
{{$payment->created_at->format('g:i A')}}
@if(isset($balances[$payment->id]) && $balances[$payment->id] !== null) ${{ number_format($balances[$payment->id], 2) }} @else @endif
{{__('No transactions found.')}}
@include('admin.components.advanced-pagination', ['paginator' => $payments])
@endsection