@extends('portal.layouts.master') @section('title', 'Transactions') @section('page-title', 'Transactions') @section('content')
{{-- Deposits --}}
Deposits
@if($deposits->isEmpty())

No deposits on record.

@else
@foreach($deposits as $dep) @endforeach
# Amount Currency Status Reference Date
{{ $dep->id }} {{ number_format($dep->amount, 2) }} @if($dep->credited_usd_amount !== null && $dep->currency !== 'USD')
USD {{ number_format($dep->credited_usd_amount, 2) }} credited
@endif
{{ $dep->currency }} {{ ucfirst($dep->status) }} {{ $dep->reference ?? '—' }} {{ $dep->created_at->format('Y-m-d H:i') }}
@endif
{{-- Withdrawal Request + History --}}
Request Withdrawal
@if($errors->has('withdrawal'))
{{ $errors->first('withdrawal') }}
@endif
@csrf
USD — Balance: {{ number_format($wallets->get('USD')?->balance ?? 0, 2) }}

Withdrawal requests are reviewed by your account manager. Funds are released upon approval.

{{-- Withdrawal history --}}
Withdrawal History
@if($withdrawals->isEmpty())

No withdrawal requests yet.

@else
@foreach($withdrawals as $w) @endforeach
# Amount Currency Status Date
{{ $w->id }} {{ number_format($w->amount, 2) }} {{ $w->currency }} {{ ucfirst($w->status) }} {{ $w->created_at->format('Y-m-d H:i') }}
@endif
{{-- Trades --}}
Trade History
@if($trades->isEmpty())

No trades on record.

@else
@foreach($trades as $trade) @endforeach
# Symbol Side Quantity Price Total Currency Date
{{ $trade->id }} @if($trade->symbol)
{{ $trade->symbol->name }}
{{ $trade->symbol->tv_symbol }}
@else — @endif
{{ strtoupper($trade->side) }} {{ rtrim(rtrim(number_format($trade->quantity, 8), '0'), '.') }} {{ number_format($trade->price, 2) }} {{ number_format($trade->total_cost, 2) }} {{ $trade->currency }} {{ $trade->traded_at->format('Y-m-d H:i') }}
@endif
@endsection