@extends('crm.layouts.master') @section('title', $lead->fname . ' Portfolio') @section('page-css') @endsection @section('main-content') {{-- ── Page header ── --}}
| Symbol | Qty | Avg | Price | Value | P&L | Action |
|---|---|---|---|---|---|---|
|
{{ $row['symbol']->name ?? '—' }} {{ $row['position']->currency ?? 'USD' }}
{{ $row['symbol']->tv_symbol ?? '' }}
|
{{ rtrim(rtrim(number_format($row['position']->quantity, 8), '0'), '.') }} | {{ number_format($row['position']->avg_price, 2) }} | {{ $row['latest_price'] > 0 ? number_format($row['latest_price'], $row['symbol']->decimal_places ?? 2) : '—' }}Updating | USD {{ number_format($row['current_value'], 2) }} |
@if($row['latest_price'] > 0)
{{ ($row['unrealised_pnl'] >= 0 ? '+' : '') . number_format($row['unrealised_pnl'], 2) }}
{{ ($pnlPct >= 0 ? '+' : '') . number_format($pnlPct, 2) }}%
@else
—
@endif
|
@if($row['latest_price'] > 0)
@endif
|
| Instrument | Direction | Leverage | Units | Margin | Exposure | Entry | Opened (UTC) | Current | Stop Loss | Take Profit | P&L | Value | Price | Action |
|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|
{{ $position->symbol?->name ?? 'Unknown' }} {{ $position->symbol?->display_symbol ?? $position->symbol?->symbol }} | {{ strtoupper($position->direction) }} | {{ $position->leverage }}× | {{ rtrim(rtrim(number_format($units, 8, '.', ''), '0'), '.') }} | USD {{ number_format($position->margin, 2) }}@if((float)$position->credit_margin > 0)Credit {{ number_format($position->credit_margin, 2) }}@endif | USD {{ number_format($position->exposure, 2) }} | {{ number_format($position->entry_price, $decimals) }} | {{ $position->opened_at?->utc()->format('Y-m-d H:i') ?? '—' }} | {{ number_format($row['latest'], $decimals) }} | {{ $position->stop_loss !== null ? number_format($position->stop_loss, $decimals) : '—' }} | {{ $position->take_profit !== null ? number_format($position->take_profit, $decimals) : '—' }} | {{ $row['pnl'] >= 0 ? '+' : '' }}USD {{ number_format($row['pnl'], 2) }} | USD {{ number_format($row['value'], 2) }} | {{ ucfirst($row['priceStatus']) }} |
| Instrument | Direction | Status | Leverage | Units | Entry | Close | Opened (UTC) | Closed (UTC) | Margin | Realized P&L | Action |
|---|---|---|---|---|---|---|---|---|---|---|---|
{{ $position->symbol?->name ?? 'Unknown' }} {{ $position->symbol?->display_symbol ?? $position->symbol?->symbol }} | {{ strtoupper($position->direction) }} | {{ ucfirst($position->status) }} | {{ $position->leverage }}× | {{ rtrim(rtrim(number_format($units, 8, '.', ''), '0'), '.') }} | {{ number_format($position->entry_price, $decimals) }} | {{ number_format($position->close_price, $decimals) }} | {{ $position->opened_at?->utc()->format('Y-m-d H:i') ?? '—' }} | {{ $position->closed_at?->utc()->format('Y-m-d H:i') ?? '—' }} | USD {{ number_format($position->margin, 2) }} | {{ (float)$position->realized_pnl >= 0 ? '+' : '' }}USD {{ number_format($position->realized_pnl, 2) }} | |
| No completed leveraged positions yet. | |||||||||||
| Market | Outcome | Shares | Average | Current | Cost | Value | P&L | Price |
|---|---|---|---|---|---|---|---|---|
| {{ $row['position']->question }} | {{ $row['position']->outcome }} | {{ rtrim(rtrim(number_format($row['shares'], 8), '0'), '.') }} | {{ number_format($row['average'] * 100, 2) }}¢ | {{ number_format($row['latest'] * 100, 2) }}¢ | USD {{ number_format($row['cost'] ?? 0, 2) }} | USD {{ number_format($row['value'] ?? 0, 2) }} | {{ $pnl >= 0 ? '+' : '' }}USD {{ number_format($pnl, 2) }} | {{ ucfirst($row['priceStatus']) }} |
| Instrument | Direction | Strike | Stake at Cost | Opened | Expires | Status |
|---|---|---|---|---|---|---|
| {{ $row['option']->symbol?->name ?? 'Unknown' }} | {{ strtoupper($row['option']->direction) }} | {{ number_format($row['option']->strike_price, $row['option']->symbol?->decimal_places ?? 4) }} | USD {{ number_format($row['stake'] ?? 0, 2) }} | {{ $row['option']->created_at?->format('M j, Y H:i') ?? '—' }} | {{ $row['option']->expires_at?->format('M j, Y H:i') ?? '—' }} | Open |
| Amt | CCY | Status | Date | |
|---|---|---|---|---|
|
{{ 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->created_at->format('d M y') }} |
@if($dep->status === 'pending' && in_array(Auth::user()->access_level, ['Admin','Office Manager']))
|
| Symbol | Side | Qty | Price | Date |
|---|---|---|---|---|
| {{ $trade->symbol->name ?? '—' }} | {{ strtoupper($trade->side) }} | {{ rtrim(rtrim(number_format($trade->quantity, 8), '0'), '.') }} | {{ number_format($trade->price, 2) }} | {{ $trade->traded_at->format('d M y') }} |