@extends('portal.layouts.master') @section('title', 'Trading Accounts') @section('page-title', 'Trading Accounts') @section('content')
Combined portfolio
USD {{ number_format($combined['equity'], 2) }}
Across {{ $accounts->count() }} trading {{ Str::plural('account', $accounts->count()) }}
Cash
${{ number_format($combined['cash'], 2) }}
Credit
${{ number_format($combined['credit'], 2) }}
Open P&L
${{ number_format($combined['open_pnl'], 2) }}
@foreach($accounts as $account) @php $snapshot = $account->portfolio_snapshot; @endphp

{{ $account->name }}

@if($account->id === $tradingAccount->id)Selected@endif @unless($account->isActive())Disabled@endunless
{{ $account->account_number }}
@if($account->isActive() && $account->id !== $tradingAccount->id)
@csrf
@endif
Equity
${{ number_format($snapshot['equity'], 2) }}
Cash + credit
${{ number_format($snapshot['cash'] + $snapshot['credit'], 2) }}
Open P&L
${{ number_format($snapshot['open_pnl'], 2) }}
Open positions
{{ $snapshot['counts']['total'] }}
@endforeach
@endsection