@php $total_summary = 0; $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['opening_balance_transactions']) && $data['opening_balance_transactions'] != null) ? $data['opening_balance_transactions'] : 0; $final_balance = (isset($data['saldo_transactions']) && $data['saldo_transactions'] != null) ? $data['saldo_transactions'] : 0; $movement_opening_balance = (isset($data['opening_balance_movements']) && $data['opening_balance_movements'] != null) ? $data['opening_balance_movements'] : 0; $movement_final_balance = (isset($data['saldo_movements']) && $data['saldo_movements'] != null) ? $data['saldo_movements'] : 0; $client_name = $data['account']->primary_client ? $data['account']->primary_client->full_name : ''; if($data['account']->account_type == 'joint') { $this_clients = $data['account']->clients; if(count($this_clients) > 0) { $client_name_arr = []; foreach($this_clients as $my_client) { $client_name_arr[] = trim($my_client->full_name); } $client_name = implode(" / ", array_filter($client_name_arr)); } } @endphp
@lang('sistema.trade_report.contact_tel') {{ $data['settings']->contact_number }}
@lang('sistema.trade_report.see_reverse')
@php $html = "Name: $client_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
{{ $client_name }}
@lang('sistema.trade_report.client_code') {{ $data['account']->account_number }}
{{ ($primary_client->address) ? $primary_client->address.', ' : '' }} {{ $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 ) : '' }}
@php $changing_balance = $opening_balance; @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')
{{ $client_name }} {{ $data['account']->broker ? $data['account']->broker->broker : '-' }} {{ $data['account']->account_number }}

 

{{ $data['account']->account_number }}

@lang('sistema.trade_report.active_financing')

@php $consolidated_balance = 0; foreach($data['account_instruments'] as $account_instrument) { if(isset($data['trade_tradeinvestment_movement'][$account_instrument->id])) { $consolidated_balance = $consolidated_balance + $data['trade_tradeinvestment_movement'][$account_instrument->id]; } } @endphp

${{ number_format($consolidated_balance, 2, '.', ',') }}

@lang('frontsistema.home.resumen_operativo') @lang('frontsistema.home.balance')
@lang('frontsistema.home.transaction') ${{ number_format($data['trade_n_tradeinvestment_amt'], 2, '.', ',') }}
@lang('frontsistema.home.active_investment') ${{ number_format($data['financiamientos_activos_amt'], 2, '.', ',') }}
@lang('frontsistema.home.deposits') ${{ (isset($data['movement_operation_type_amt']['1'])) ? number_format($data['movement_operation_type_amt']['1'], 2, '.', ',') : number_format(0,2) }}
@lang('frontsistema.home.retreats') ${{ (isset($data['movement_operation_type_amt']['2'])) ? number_format($data['movement_operation_type_amt']['2'], 2, '.', ',') : number_format(0,2) }}
@lang('frontsistema.home.commission_n_expenses') @php /* $expenses = isset($data['movement_operation_type_amt']['4']) ? $data['movement_operation_type_amt']['4'] : 0; $commission = (isset($data['movement_operation_type_amt']['5'])) ? $data['movement_operation_type_amt']['5'] : 0; */ @endphp ${{ number_format($data['comisiones_y_gastos'], 2, '.', ',') }}

@foreach($data['account_instruments'] as $account_instrument) @endforeach
@lang('frontsistema.home.resumen_for_instrumento') @lang('frontsistema.home.balance')
{{ $account_instrument->instrument }} ${{ (isset($data['trade_tradeinvestment_movement'][$account_instrument->id])) ? number_format($data['trade_tradeinvestment_movement'][$account_instrument->id], 2, '.', ',') : 0.00 }}
@if(isset($data['transactions']) && count($data['transactions']) > 0) @php $transactions_length = count($data['transactions']); $extra_length = $transactions_length > 30 ? 30 : $transactions_length; @endphp @for($i=0;$i<$extra_length;$i++) @if(isset($data['transactions'][$i]->item)) @else @endif @php $changing_balance = $changing_balance + ($data['transactions'][$i]->net_result); @endphp @endfor @endif @if(count($data['transactions']) < 30) @php $total_summary += $changing_balance; @endphp @endif
@lang('sistema.trade_report.account_name') @lang('sistema.trade_report.product') @lang('sistema.trade_report.client_code') @lang('sistema.trade_report.sheet_number')
{{ $client_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 : '-')])

@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.transaction.lbl_profit_loss') @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['transactions'][$i]->ticket }} {{ session('language') == 'es' ? $data['transactions'][$i]->transaction_type->type_en : $data['transactions'][$i]->transaction_type->type_en }} {{ session('language') == 'es' ? str_limit($data['transactions'][$i]->instrument->instrument_es,8) : str_limit($data['transactions'][$i]->instrument->instrument_en,8) }}{{ session('language') == 'es' ? str_limit($data['transactions'][$i]->item->item_es, 8) : str_limit($data['transactions'][$i]->item->item_en, 8) }}-{{ date('y-m-d',strtotime($data['transactions'][$i]->opening_date)) }} {{ $data['transactions'][$i]->opening_time }} {{ number_format($data['transactions'][$i]->opening_price,6) }}   {{ number_format($data['transactions'][$i]->conversion_opening,6) }}   {{ date('y-m-d',strtotime($data['transactions'][$i]->closing_date)) }} {{ $data['transactions'][$i]->closing_time }} {{ number_format($data['transactions'][$i]->closing_price,6) }}   {{ number_format($data['transactions'][$i]->conversion_closing,6) }}   {{ $data['transactions'][$i]->leverage->label }}   {{ number_format($data['transactions'][$i]->stop_loss,6) }}   {{ number_format($data['transactions'][$i]->contracts,0) }}   {{ number_format($data['transactions'][$i]->facial_value,4) }}   {{ number_format($data['transactions'][$i]->warranty,2) }}   {{ number_format($data['transactions'][$i]->commission,4) }}   {{ number_format($data['transactions'][$i]->gross_profit,4) }}   {{ number_format($data['transactions'][$i]->net_result,4) }}  {{ number_format($changing_balance, 2, '.', ',') }}  
 
Total:  {{ number_format($changing_balance, 2, '.', ',') }}  
@if(isset($data['transactions']) && count($data['transactions']) > 30)
@php $transactions_length = count($data['transactions']) - 30; @endphp @for($i=30;$i<$transactions_length;$i++) @if(isset($data['transactions'][$i]->item)) @else @endif @php $changing_balance = $changing_balance + ($data['transactions'][$i]->net_result); @endphp @endfor @php $total_summary += $changing_balance; @endphp
@lang('sistema.trade_report.account_name') @lang('sistema.trade_report.product') @lang('sistema.trade_report.client_code') @lang('sistema.trade_report.sheet_number')
{{ $client_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 : '-')])

@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.transaction.lbl_profit_loss') @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($changing_balance, 2, '.', ',') }}  
{{ $data['transactions'][$i]->ticket }} {{ session('language') == 'es' ? $data['transactions'][$i]->transaction_type->type_en : $data['transactions'][$i]->transaction_type->type_en }} {{ session('language') == 'es' ? str_limit($data['transactions'][$i]->instrument->instrument_es,8) : str_limit($data['transactions'][$i]->instrument->instrument_en,8) }}{{ session('language') == 'es' ? str_limit($data['transactions'][$i]->item->item_es, 8) : str_limit($data['transactions'][$i]->item->item_en, 8) }}-{{ date('y-m-d',strtotime($data['transactions'][$i]->opening_date)) }} {{ $data['transactions'][$i]->opening_time }} {{ number_format($data['transactions'][$i]->opening_price,2) }}   {{ number_format($data['transactions'][$i]->conversion_opening,2) }}   {{ date('y-m-d',strtotime($data['transactions'][$i]->closing_date)) }} {{ $data['transactions'][$i]->closing_time }} {{ number_format($data['transactions'][$i]->closing_price,2) }}   {{ number_format($data['transactions'][$i]->conversion_closing,2) }}   {{ $data['transactions'][$i]->leverage->label }}   {{ number_format($data['transactions'][$i]->stop_loss,2) }}   {{ $data['transactions'][$i]->contracts }}   {{ number_format($data['transactions'][$i]->facial_value,2) }}   {{ number_format($data['transactions'][$i]->warranty,2) }}   {{ number_format($data['transactions'][$i]->commission,2) }}   {{ number_format($data['transactions'][$i]->gross_profit,2) }}   {{ number_format($data['transactions'][$i]->net_result,2) }}  {{ number_format($changing_balance, 2, '.', ',') }}  
 
Total:  {{ number_format($changing_balance, 2, '.', ',') }}  
@endif
@php $changing_movement_balance = $movement_opening_balance; @endphp
@if(isset($data['movement_transaction']) && count($data['movement_transaction']) > 0) @php $extra_length = count($data['movement_transaction']) > 40 ? 40 : count($data['movement_transaction']); @endphp @for($i=0;$i<$extra_length;$i++) @php if($data['movement_transaction'][$i]['operation_category'] == 0) { $changing_movement_balance = $changing_movement_balance + (-$data['movement_transaction'][$i]['monto']); } if($data['movement_transaction'][$i]['operation_category'] == 1) { $changing_movement_balance = $changing_movement_balance + ($data['movement_transaction'][$i]['monto']); } @endphp @endfor @endif @if(count($data['movement_transaction']) < 40) @php $total_summary += $changing_movement_balance; @endphp @endif
@lang('sistema.trade_report.account_name') @lang('sistema.trade_report.product') @lang('sistema.trade_report.client_code') @lang('sistema.trade_report.sheet_number')
{{ $client_name }} {{ $data['account']->broker ? $data['account']->broker->broker : '-' }} {{ $data['account']->account_number }}

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

@lang('sistema.movimientos_transaction.ticket') @lang('sistema.movimientos_transaction.instrument') @lang('sistema.movimientos_transaction.movimientos_descripcion') @lang('sistema.movimientos_transaction.fecha_transaccion') @lang('sistema.movimientos_transaction.category') @lang('sistema.movimientos_transaction.monto') @lang('sistema.trade_report.balance')
  @lang('sistema.trade_report.opening_balance') @lang('sistema.trade_report.balance_forward'): {{ number_format($movement_opening_balance, 2, '.', ',') }} {{ number_format($movement_opening_balance, 2, '.', ',') }}  
{{ $data['movement_transaction'][$i]['ticket'] }} {{ $data['movement_transaction'][$i]['type_'.session('language')] }} {{ $data['movement_transaction'][$i]['movimientos_descripcion'] }} {{ date("y-m-d", strtotime($data['movement_transaction'][$i]['fecha_transaccion'])) }} {{ $data['movement_transaction'][$i]['operation_category'] == 0 ? __('sistema.movimientos_transaction.category_charge') : __('sistema.movimientos_transaction.category_abono') }}   {{ number_format($data['movement_transaction'][$i]['monto'],2,'.',',') }}  {{ number_format($changing_movement_balance, 2, '.', ',') }}  
 
Total:  {{ number_format($changing_movement_balance, 2, '.', ',') }}  
@if(isset($data['movement_transaction']) && count($data['movement_transaction']) > 40)
@for($i=40;$i< count($data['movement_transaction']);$i++) @php if($data['movement_transaction'][$i]['operation_category'] == 0) { $changing_movement_balance = $changing_movement_balance + (-$data['movement_transaction'][$i]['monto']); } if($data['movement_transaction'][$i]['operation_category'] == 1) { $changing_movement_balance = $changing_movement_balance + $data['movement_transaction'][$i]['monto']; } @endphp @endfor @php $total_summary += $changing_movement_balance; @endphp
@lang('sistema.trade_report.account_name') @lang('sistema.trade_report.product') @lang('sistema.trade_report.client_code') @lang('sistema.trade_report.sheet_number')
{{ $client_name }} {{ $data['account']->broker ? $data['account']->broker->broker : '-' }} {{ $data['account']->account_number }}

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

@lang('sistema.movimientos_transaction.ticket') @lang('sistema.movimientos_transaction.instrument') @lang('sistema.movimientos_transaction.movimientos_descripcion') @lang('sistema.movimientos_transaction.fecha_transaccion') @lang('sistema.movimientos_transaction.category') @lang('sistema.movimientos_transaction.monto') @lang('sistema.trade_report.balance')
{{ $data['movement_transaction'][$i]['ticket'] }} {{ $data['movement_transaction'][$i]['type_'.session('language')] }} {{ $data['movement_transaction'][$i]['movimientos_descripcion'] }} {{ date("y-m-d", strtotime($data['movement_transaction'][$i]['fecha_transaccion'])) }} {{ $data['movement_transaction'][$i]['operation_category'] == 0 ? __('sistema.movimientos_transaction.category_charge') : __('sistema.movimientos_transaction.category_abono') }}   {{ number_format($data['movement_transaction'][$i]['monto'],2,'.',',') }}  {{ number_format($changing_movement_balance, 2, '.', ',') }}  
 
Total:  {{ number_format($changing_movement_balance, 2, '.', ',') }}  
@endif
Total : $ {{ number_format($total_summary, 2, '.', ',') }}
@lang('sistema.trade_report.account_name') @lang('sistema.trade_report.product') @lang('sistema.trade_report.client_code') @lang('sistema.trade_report.sheet_number')
{{ $client_name }} {{ $data['account']->broker ? $data['account']->broker->broker : '-' }} {{ $data['account']->account_number }}
{!! (session('language') == 'es' ? $data['settings']->disclaimer_es : $data['settings']->disclaimer_en) !!}