@php $primary_client = $data['account']->primary_client; $branch = null; if($data['account']->account_type == 'business') { $branch = $data['account']->business_details->branch; } else { $branch = $primary_client->branch; } $opening_balance = (isset($data['previous_transaction']) && $data['previous_transaction'] != null) ? $data['previous_transaction']->final_capital_client : $data['account']->opening_amount; $final_balance = (isset($data['last_transaction']) && $data['last_transaction'] != null) ? $data['last_transaction']->final_capital_client : $data['account']->opening_amount; @endphp
@lang('sistema.trade_report.contact_tel') +852 300 85680
@lang('sistema.trade_report.see_reverse')
{{ $primary_client->full_name }}
@lang('sistema.trade_report.client_code') {{ $data['account']->account_number }}
{{ $primary_client->address }}
@lang('sistema.trade_report.currency') MXN (Mexican Peso)
{{ $primary_client->state_name? $primary_client->state_name->name : '' }}
@lang('sistema.trade_report.branch') {{ session('language') == 'es' ? $branch->branch_es : $branch->branch_en }}, {{ $branch->country_code }}
{{ $primary_client->city_name ? $primary_client->city_name->name : '' }} {{ $primary_client->zip_code ? ( ', ' .$primary_client->zip_code) : '' }}{{ $primary_client->country_name ? ( ' - ' . $primary_client->country_name->name ) : '' }}
@lang('sistema.trade_report.your_balance') ${{ number_format($final_balance, 2, '.', ',') }} MXN

@php $html = "Name: $primary_client->full_name"; $html .= PHP_EOL; $html .= "Address: $primary_client->address"; $html .= $primary_client->state_name? (' ' . $primary_client->state_name->name) : ''; $html .= $primary_client->city_name ? (' ' . $primary_client->city_name->name) : ''; $html .= $primary_client->zip_code ? ( ', ' .$primary_client->zip_code) : ''; $html .= $primary_client->country_name ? ( ' - ' . $primary_client->country_name->name ) : ''; $html .= PHP_EOL; $html .= "Client code : " . $data['account']->account_number; $html .= PHP_EOL; $html .= "Currency : MXN (Mexican Peso)"; $html .= PHP_EOL; $html .= "Branch : " . (session('language') == 'es' ? $branch->branch_es : $branch->branch_en) . ', ' . ($branch->country_code); $html .= PHP_EOL; $html .= "Period : " . date('d/m/y', strtotime($data['info']['from_date'])) . ' to ' . date('d/m/y', strtotime($data['info']['upto_date'])); @endphp

{{ date('d M Y', strtotime($data['info']['from_date'])) }} @lang('sistema.trade_report.to') {{ date('d M Y', strtotime($data['info']['upto_date'])) }}

@lang('sistema.trade_report.account_name') @lang('sistema.trade_report.product') @lang('sistema.trade_report.client_code') @lang('sistema.trade_report.sheet_number')
{{ $primary_client->full_name }} {{ $data['account']->broker ? $data['account']->broker->broker : '-' }} {{ $data['account']->account_number }}

@lang('sistema.trade_report.summary_block', ['name' => ($data['account']->broker ? $data['account']->broker->broker : '-')])

@php $changing_balance = $opening_balance; @endphp @if(isset($data['transactions']) && count($data['transactions']) > 0) @foreach($data['transactions'] as $transaction) @php $changing_balance = $changing_balance + ($transaction->net_result); @endphp @endforeach @endif
@lang('sistema.trade_report.ticket') @lang('sistema.trade_report.type') @lang('sistema.transaction.instrument') @lang('sistema.transaction.item') @lang('sistema.transaction.opening_date') @lang('sistema.trade_report.open_time') @lang('sistema.trade_report.open_price') @lang('sistema.trade_report.conversion_opening') @lang('sistema.transaction.closing_date') @lang('sistema.trade_report.close_time') @lang('sistema.trade_report.close_price') @lang('sistema.trade_report.conversion_closing') @lang('sistema.trade_report.leverage') @lang('sistema.transaction.stop_loss') @lang('sistema.transaction.contracts') @lang('sistema.transaction.facial_value') @lang('sistema.transaction.warranty') @lang('sistema.transaction.commission') @lang('sistema.trade_report.net_result') @lang('sistema.trade_report.balance')
@lang('sistema.trade_report.opening_balance') @lang('sistema.trade_report.balance_forward'): {{ number_format($opening_balance, 2, '.', ',') }} {{ number_format($opening_balance, 2, '.', ',') }}
{{ $transaction->ticket }} {{ session('language') == 'es' ? $transaction->transaction_type->type_es : $transaction->transaction_type->type_en }} {{ session('language') == 'es' ? $transaction->instrument->instrument_es : $transaction->instrument->instrument_en }} {{ session('language') == 'es' ? $transaction->item->item_es : $transaction->item->item_en }} {{ $transaction->opening_date }} {{ $transaction->opening_time }} {{ number_format($transaction->opening_price,2) }} {{ number_format($transaction->conversion_opening,2) }} {{ $transaction->closing_date }} {{ $transaction->closing_time }} {{ number_format($transaction->closing_price,2) }} {{ number_format($transaction->conversion_closing,2) }} {{ $transaction->leverage->label }} {{ number_format($transaction->stop_loss,2) }} {{ $transaction->contracts }} {{ number_format($transaction->facial_value,2) }} {{ number_format($transaction->warranty,2) }} {{ number_format($transaction->commission,2) }} {{ number_format($transaction->net_result,2) }}{{ number_format($changing_balance, 2, '.', ',') }}

@lang('sistema.equity_report.equity')

@if(isset($data['moment_report']) && count($data['moment_report']) > 0) @foreach($data['moment_report'] as $key => $moment_report) @endforeach @else @endif
ID @lang('sistema.equity_report.deposits') @lang('sistema.equity_report.withdrawals') @lang('sistema.equity_report.credits') @lang('sistema.equity_report.expenses') @lang('sistema.equity_report.tr_comm') @lang('sistema.equity_report.profit_loss') @lang('sistema.equity_report.balances')
{{ $key + 1 }} {{ $moment_report['deposits_amount'] }} {{ $moment_report['withdrawals_amount'] }} {{ $moment_report['credit_amount'] }} {{ $moment_report['expenses_amount'] }} {{ $moment_report['commission_amount'] }} {{ $moment_report['profil_loss_amount'] }} @php $total_plus = $moment_report['deposits_amount'] + $moment_report['credit_amount']; $total_negative = $moment_report['withdrawals_amount'] + $moment_report['expenses_amount'] + $moment_report['commission_amount']; $total_balance = $total_plus - $total_negative + $moment_report['profil_loss_amount']; @endphp {{ $total_balance }}
@lang('sistema.trade_report.no_data')