| {{$data['loginId']}} {{$data['name'] ?? $data['loginId']}}
|
|
{{$user['symbol']}}, {{now()->endOfWeek()->format('d.m.Y')}}
|
{{-- | --}}
Clg.Rate: {{$user['currentWeekPrice']}}
|
{{-- @foreach ($user['deals'] as $action => $deals) --}}
@php
$totalBuyDeals = isset($user['deals'][CommonConstants::BILLING_PDF['BUY_VALUE']]) ?
count($user['deals'][CommonConstants::BILLING_PDF['BUY_VALUE']]) : 0;
$totalSellDeals = isset($user['deals'][CommonConstants::BILLING_PDF['SELL_VALUE']]) ?
count($user['deals'][CommonConstants::BILLING_PDF['SELL_VALUE']]) : 0;
$maxDealsCount = max($totalBuyDeals, $totalSellDeals);
$buyDeals = isset($user['deals'][CommonConstants::BILLING_PDF['BUY_VALUE']]) ?
$user['deals'][CommonConstants::BILLING_PDF['BUY_VALUE']] : [];
$sellDeals = isset($user['deals'][CommonConstants::BILLING_PDF['SELL_VALUE']]) ?
$user['deals'][CommonConstants::BILLING_PDF['SELL_VALUE']] : [];
@endphp
@for ($i = 0; $i < $maxDealsCount; $i++)
{{-- @foreach ($deals as $deal) --}}
{{-- Sell data --}}
{{-- @if ($action == CommonConstants::BILLING_USERS_DATA['SELL_VALUE']) --}}
@if (isset($sellDeals[$i]))
| {{$sellDeals[$i]['total']}} |
{{$sellDeals[$i]['volume']}} |
{{number_format($sellDeals[$i]['price'], 2, '.', '')}} |
{{date('d.m', strtotime($sellDeals[$i]['date']))}} |
{{$sellDeals[$i]['carryForward']}} |
@else
|
|
|
|
|
@endif
{{-- @endif --}}
{{-- Buy data --}}
{{-- @if ($action == CommonConstants::BILLING_USERS_DATA['BUY_VALUE']) --}}
@if (isset($buyDeals[$i]))
{{$buyDeals[$i]['total']}} |
{{$buyDeals[$i]['volume']}} |
{{number_format($buyDeals[$i]['price'], 2, '.', '')}} |
{{date('d.m', strtotime($buyDeals[$i]['date']))}} |
{{$buyDeals[$i]['carryForward']}} |
@else
|
|
|
|
|
@endif
{{-- @endif --}}
@if ($i == $maxDealsCount - 1)
{{$user['totalSellPrice']}} |
{{$user['totalSellVolume']}} |
|
|
|
{{$user['totalBuyPrice']}} |
{{$user['totalBuyVolume']}} |
|
|
|
@if ($user['totalBuyPrice'] > $user['totalSellPrice'])
|
|
|
|
|
{{number_format(round(($user['totalSellPrice']) * -1, 2), 2, '.', '')}} |
|
|
|
|
|
|
|
|
|
{{number_format(round(($user['profit']) * -1, 2), 2, '.', '')}} |
|
|
|
|
|
|
|
|
|
(*){{$user['contractSize']}} |
|
|
|
|
@if (isset($user['brokerageType']) && $user['brokerageType'] != null)
|
|
|
|
|
{{number_format(round(($user['totalProfit']) * -1, 2), 2, '.', '')}} |
|
|
|
|
|
|
|
|
|
{{number_format(round($user['totalBrokerage'], 2), 2, '.', '')}} |
(Bkrg:0*{{$user['brokerageValue']}}/1[T]) |
|
|
|
@endif
|
|
|
|
|
{{number_format(round($user['finalProfit'] * -1, 2), 2, '.', '')}} |
Dr (Your Loss) |
|
|
|
@else
| {{number_format(round($user['totalBuyPrice'] * -1, 2), 2, '.', '')}} |
|
|
|
|
|
|
|
|
|
| {{number_format(round($user['profit'], 2), 2, '.', '')}} |
|
|
|
|
|
|
|
|
|
| (*){{$user['contractSize']}} |
|
|
|
|
|
|
|
|
|
@if (isset($user['brokerageType']) && $user['brokerageType'] != null)
| {{number_format(round($user['totalProfit'], 2), 2, '.', '')}} |
|
|
|
|
|
|
|
|
|
| {{number_format(round($user['totalBrokerage'] * -1, 2), 2, '.', '')}} |
(Bkrg:0*{{$user['brokerageValue']}}/1[T]) |
|
|
|
|
|
|
|
|
@endif
| {{number_format(round($user['finalProfit'], 2), 2, '.', '')}} |
Cr (Your Profit) |
|
|
|
|
|
|
|
|
@endif
@endif
{{-- @endforeach --}}
@endfor
{{-- @endforeach --}}
@php
if (isset($priority) && $user['priority'] != $priority) {
$profit = 0;
$gross = 0;
$brokerage = 0;
}
@endphp
@php
$priority = $user['priority'];
$gross += number_format(round(($user['totalProfit']), 2), 2, '.', '');
$totalGross += number_format(round(($user['totalProfit']), 2), 2, '.', '');
$brokerage += abs(number_format(round(($user['totalBrokerage']), 2), 2, '.', ''));
$totalBrokerage += abs(number_format(round(($user['totalBrokerage']), 2), 2, '.', ''));
$profit += number_format(round(($user['finalProfit']), 2), 2, '.', '');
$finalProfit += number_format(round(($user['finalProfit']), 2), 2, '.', '');
@endphp
@if ($loop->last)
|
{{ $priority }} : Total AMT : {{ abs($gross) }}
|
{{ $priority }} : Total BKRG : {{ $brokerage }}
|
Your {{ $profit > 0 ? 'Profit' : 'Loss' }} ({{ $priority }}) : {{ abs($profit) }}
|
|
All Excn Total AMT : {{abs($totalGross)}}
|
All Excn BKRG Total : {{$totalBrokerage}}
|
Your {{ $finalProfit > 0 ? 'Profit' : 'Loss' }} (All Excn) : {{abs($finalProfit)}}
|
@endif
@php
if (isset($priority) && $user['priority'] != $priority) {
$profit = 0;
$gross = 0;
$brokerage = 0;
}
@endphp
{{-- @php
$priority = $user['priority'];
$gross += abs(number_format(round(($user['totalProfit']), 2), 2, '.', ''));
$totalGross += abs(number_format(round(($user['totalProfit']), 2), 2, '.', ''));
$brokerage += abs(number_format(round(($user['totalBrokerage']), 2), 2, '.', ''));
$totalBrokerage += abs(number_format(round(($user['totalBrokerage']), 2), 2, '.', ''));
$profit += number_format(round(($user['finalProfit']), 2), 2, '.', '');
$finalProfit += number_format(round(($user['finalProfit']), 2), 2, '.', '');
@endphp --}}
@endforeach
@if (isset($data['userData']) && !empty($data['userData']))
@php
$filteredData = array_filter($data['userData'], function ($item) {
return $item['carryForwardVolume'] != 0;
});
if (empty($filteredData)) {
return;
}
@endphp