@extends('admin.adminLayout') @section('admin_page_title', 'Financial Reports') @section('style') @endsection @section('admin_content') @php $requestsReport = $filters['report'] === 'requests'; $reportTitle = $requestsReport ? 'Funding Requests' : 'Recorded Transactions'; $stats = $summary['stats']; $money = static fn ($value) => \App\Services\FinancialReportService::formatAmount((string) $value); $actionLabels = ['Deposit' => 'Balance deposit', 'Withdraw' => 'Balance withdrawal', 'Credit' => 'Credit in', 'CreditOut' => 'Credit out']; $requestActionLabels = ['Deposit' => 'Deposit request', 'Withdraw' => 'Withdrawal request']; $statusLabels = $requestsReport ? ['pending' => 'Pending', 'approved' => 'Approved', 'declined' => 'Declined'] : ['success' => 'Successful', 'pending' => 'Pending', 'failed' => 'Failed']; $statusTones = ['success' => 'positive', 'approved' => 'positive', 'pending' => 'pending', 'failed' => 'negative', 'declined' => 'negative']; $recordCount = (int) data_get($stats, 'records', 0); $pdfLimit = (int) ($pdfMaxRows ?? 500); $dataLimit = (int) ($dataMaxRows ?? 100000); @endphp
Filter financial activity, review the totals, and export a report for your team.
Choose the records to include, then apply your filters.
Filter changes are waiting. Apply filters to update this report and enable exports.
@if($canExport)Exports include all matching records, across every page. PDF: up to {{ number_format($pdfLimit) }} records. Excel / CSV: up to {{ number_format($dataLimit) }} records.@if($recordCount > $pdfLimit) Narrow the filters for PDF.@endif @if($recordCount > $dataLimit) Narrow the filters for Excel or CSV.@endif
@endifBalance movements and trading credit are calculated separately. Pending and failed records are excluded.
| Currency | Balance in | Balance out | Net balance movement | Credit in | Credit out | Net credit movement |
|---|---|---|---|---|---|---|
| {{ data_get($total, 'currency') }} | @foreach(['deposits', 'withdrawals', 'net_balance', 'credit_in', 'credit_out', 'net_credit'] as $key){{ $money(data_get($total, $key, '0.00')) }} | @endforeach|||||
| No successful movements match the selected filters. | ||||||
Request amounts describe requested funding. An approved deposit request may settle as balance or credit. Use Recorded Transactions to review successful movements. Pending requests can include withdrawals awaiting reconciliation.
@endif| Action | Status | Currency | Records | Total amount |
|---|---|---|---|---|
| {{ data_get($group, 'action_label', data_get($group, 'action')) }} | {{ data_get($group, 'status_label', ucfirst(data_get($group, 'status', ''))) }} | {{ data_get($group, 'currency') }} | {{ number_format((int) data_get($group, 'count', 0)) }} | {{ $money(data_get($group, 'amount', '0.00')) }} |
| No activity matches the selected filters. | ||||
{{ number_format($recordCount) }} matching records · {{ $requestsReport ? 'newest submitted first' : 'newest recorded first' }}
| Reference / date | Client | MT4 account | Action | Status | Amount | Client owner | Processed by | {{ $requestsReport ? 'Method / MT4 ticket' : 'MT4 ticket' }} |
|---|---|---|---|---|---|---|---|---|
| {{ data_get($row, 'reference') }}{{ data_get($row, 'date_label', data_get($row, 'date')) }}@if($requestsReport && data_get($row, 'processed_at'))Processed: {{ data_get($row, 'processed_at_label', data_get($row, 'processed_at')) }}@endif | {{ data_get($row, 'client_name') ?: 'Unnamed client' }}#{{ data_get($row, 'client_id') }} · {{ data_get($row, 'client_email') }}@if(data_get($row, 'country')){{ data_get($row, 'country') }}@endif | {{ data_get($row, 'mt4_login') ?: '—' }}@if(data_get($row, 'account_label')){{ data_get($row, 'account_label') }}@endif | {{ data_get($row, 'action_label', data_get($row, 'action')) }} | {{ data_get($row, 'status_label', ucfirst(data_get($row, 'status', ''))) }} | {{ data_get($row, 'amount_formatted', $money(data_get($row, 'amount', '0.00'))) }}{{ data_get($row, 'currency') }} | {{ data_get($row, 'owner_name') ?: 'Unassigned' }} | {{ data_get($row, 'admin_name') ?: '—' }} | @if($requestsReport){{ data_get($row, 'method') ?: '—' }}Ticket: {{ data_get($row, 'ticket') ?: '—' }}@else{{ data_get($row, 'ticket') ?: '—' }}@endif |