@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') {{ $data['settings']->contact_number }}
@lang('sistema.trade_report.see_reverse')
@php $html = "Name: $primary_client->full_name"; $html .= PHP_EOL; $html .= "Address: $primary_client->address"; $html .= $primary_client->state ? (' ' . $primary_client->state) : ''; $html .= $primary_client->city ? (' ' . $primary_client->city) : ''; $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 : USD ($)"; $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
{{ $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? $primary_client->state : '' }}
@lang('sistema.trade_report.branch') {{ session('language') == 'es' ? $branch->branch_es : $branch->branch_en }}, {{ $branch->country_code }}
{{ $primary_client->city ? $primary_client->city : '' }} {{ $primary_client->zip_code ? ( ', ' .$primary_client->zip_code) : '' }}{{ $primary_client->country_name ? ( ' - ' . $primary_client->country_name->name ) : '' }}
@lang('sistema.trade_report.your_balance') M$ {{ number_format($final_balance, 2, '.', ',') }}

{{ 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['combos']) && count($data['combos']) > 0) @php $extra_length = count($data['combos']) > 15 ? 15 : count($data['combos']); @endphp @for($i=0;$i<$extra_length;$i++) @if($data['combos'][$i]['trs_type'] == 1) @if(isset($data['combos'][$i]->item)) @else @endif @php $changing_balance = $changing_balance + ($data['combos'][$i]->net_result); @endphp @elseif($data['combos'][$i]['trs_type'] == 2) @php if(in_array($data['combos'][$i]['type_en'], ['WITHDRAWAL', 'EXPENSE', 'COMISSION'])) { $changing_balance = $changing_balance + (-$data['combos'][$i]['monto']); } elseif(in_array($data['combos'][$i]['type_en'], ['DEPOSIT', 'CREDIT', 'PROFIT/LOST'])) { $changing_balance = $changing_balance + ($data['combos'][$i]['monto']); } @endphp @endif @endfor @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, '.', ',') }}
{{ $data['combos'][$i]->ticket }} {{ session('language') == 'es' ? $data['combos'][$i]->transaction_type->type_en : $data['combos'][$i]->transaction_type->type_en }} {{ session('language') == 'es' ? str_limit($data['combos'][$i]->instrument->instrument_es,8) : str_limit($data['combos'][$i]->instrument->instrument_en,8) }}{{ session('language') == 'es' ? str_limit($data['combos'][$i]->item->item_es, 8) : str_limit($data['combos'][$i]->item->item_en, 8) }}-{{ date('y-m-d',strtotime($data['combos'][$i]->opening_date)) }} {{ $data['combos'][$i]->opening_time }} {{ number_format($data['combos'][$i]->opening_price,2) }} {{ number_format($data['combos'][$i]->conversion_opening,2) }} {{ date('y-m-d',strtotime($data['combos'][$i]->closing_date)) }} {{ $data['combos'][$i]->closing_time }} {{ number_format($data['combos'][$i]->closing_price,2) }} {{ number_format($data['combos'][$i]->conversion_closing,2) }} {{ $data['combos'][$i]->leverage->label }} {{ number_format($data['combos'][$i]->stop_loss,2) }} {{ $data['combos'][$i]->contracts }} {{ number_format($data['combos'][$i]->facial_value,2) }} {{ number_format($data['combos'][$i]->warranty,2) }} {{ number_format($data['combos'][$i]->commission,2) }} {{ number_format($data['combos'][$i]->net_result,2) }}{{ number_format($changing_balance, 2, '.', ',') }}{{ '-' }} {{ '-' }} {{ $data['combos'][$i]['type_'.session('language')] }} {{ str_limit($data['combos'][$i]['movimientos_descripcion'], 8) }} {{ date("y-m-d", strtotime($data['combos'][$i]['fecha_transaccion'])) }} {{ number_format($data['combos'][$i]['monto'],2,'.',',') }}{{ number_format($changing_balance, 2, '.', ',') }}
@if(isset($data['combos']) && count($data['combos']) > 15)
@for($i=15;$i< count($data['combos']);$i++) @if($data['combos'][$i]['trs_type'] == 1) @if(isset($data['combos'][$i]->item)) @else @endif @php $changing_balance = $changing_balance + ($data['combos'][$i]->net_result); @endphp @elseif($data['combos'][$i]['trs_type'] == 2) @php if(in_array($data['combos'][$i]['type_en'], ['WITHDRAWAL', 'EXPENSE', 'COMISSION'])) { $changing_balance = $changing_balance + (-$data['combos'][$i]['monto']); } elseif(in_array($data['combos'][$i]['type_en'], ['DEPOSIT', 'CREDIT', 'PROFIT/LOST'])) { $changing_balance = $changing_balance + ($data['combos'][$i]['monto']); } @endphp @endif @endfor
@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.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')
{{ $data['combos'][$i]->ticket }} {{ session('language') == 'es' ? $data['combos'][$i]->transaction_type->type_en : $data['combos'][$i]->transaction_type->type_en }} {{ session('language') == 'es' ? str_limit($data['combos'][$i]->instrument->instrument_es,8) : str_limit($data['combos'][$i]->instrument->instrument_en,8) }}{{ session('language') == 'es' ? str_limit($data['combos'][$i]->item->item_es, 8) : str_limit($data['combos'][$i]->item->item_en, 8) }}-{{ date('y-m-d',strtotime($data['combos'][$i]->opening_date)) }} {{ $data['combos'][$i]->opening_time }} {{ number_format($data['combos'][$i]->opening_price,2) }} {{ number_format($data['combos'][$i]->conversion_opening,2) }} {{ date('y-m-d',strtotime($data['combos'][$i]->closing_date)) }} {{ $data['combos'][$i]->closing_time }} {{ number_format($data['combos'][$i]->closing_price,2) }} {{ number_format($data['combos'][$i]->conversion_closing,2) }} {{ $data['combos'][$i]->leverage->label }} {{ number_format($data['combos'][$i]->stop_loss,2) }} {{ $data['combos'][$i]->contracts }} {{ number_format($data['combos'][$i]->facial_value,2) }} {{ number_format($data['combos'][$i]->warranty,2) }} {{ number_format($data['combos'][$i]->commission,2) }} {{ number_format($data['combos'][$i]->net_result,2) }}{{ number_format($changing_balance, 2, '.', ',') }}{{ '-' }} {{ '-' }} {{ $data['combos'][$i]['type_'.session('language')] }} {{ str_limit($data['combos'][$i]['movimientos_descripcion'], 8) }} {{ date("y-m-d", strtotime($data['combos'][$i]['fecha_transaccion'])) }} {{ number_format($data['combos'][$i]['monto'],2,'.',',') }}{{ number_format($changing_balance, 2, '.', ',') }}
@endif
@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 }}
{!! $data['settings']->disclaimer !!}