mivita/resources/views/admin/business_optimized/_user_detail_in.blade.php
2025-08-12 18:01:59 +02:00

275 lines
No EOL
14 KiB
PHP

<table class="table user-view-table m-0">
<tbody>
<tr>
<td>{{ __('team.account') }}:</td>
<td>
@if($TreeCalcBot->__get('business_user')->active_account)
<span class="badge badge-outline-success">{{ __('team.active') }}</span>
@else
<span class="badge badge-outline-danger">{{ __('team.not_active') }}</span>
@endif
@if($TreeCalcBot->__get('business_user')->payment_account_date)
{{ __('team.until') }}: {{ formatDate($TreeCalcBot->__get('business_user')->payment_account_date) }}
@endif
(ID: {{ $TreeCalcBot->__get('business_user')->m_account }}) <span class="badge badge-outline-info">Optimized</span>
</td>
</tr>
<tr>
<td>{{ __('team.date') }}:</td>
<td>
<strong>{{ HTMLHelper::getMonth($data['month']) }} {{ $data['year'] }}</strong> | {{ __('team.completed') }}:
@if($TreeCalcBot->__get('business_user')->isSave())
<span class="badge badge-outline-success"><i class="fa fa-check-circle"></i></span>
@if(Auth::user()->isAdmin())
<a target="_blank" class="btn btn-outline-secondary btn-xs" href="{{ route('admin_business_optimized_user_detail', [$user->id, 'force_live' => true]) }}">
<i class="fa fa-redo"></i> {{ __('Live Berechnung') }}
</a>
@endif
@else
<span class="badge badge-outline-warning-dark"><i class="fa fa-times"></i></span>
@endif
</td>
</tr>
<tr>
<td>{{ __('team.career_level') }}:</td>
<td>
{{ \App\Services\TranslationHelper::transUserLevelName($TreeCalcBot->__get('business_user')->user_level_name) }} &nbsp;
<span class="badge badge-outline-success"> {{ __('team.KU') }} {{ $TreeCalcBot->__get('business_user')->qual_kp }} / {{ __('team.PP') }} {{ formatNumber($TreeCalcBot->__get('business_user')->qual_pp, 0) }}</span>
</td>
</tr>
<tr>
<td>{{ __('team.sponsor') }}:</td>
<td>
@if($TreeCalcBot->__get('business_user')->sponsor && $TreeCalcBot->__get('business_user')->sponsor->is_sponsor)
{{ $TreeCalcBot->__get('business_user')->sponsor->first_name }} {{ $TreeCalcBot->__get('business_user')->sponsor->last_name }} |
{{ $TreeCalcBot->__get('business_user')->sponsor->email }} |
{{ $TreeCalcBot->__get('business_user')->sponsor->m_account }}
@else
-
@endif
</td>
</tr>
<tr>
<td>{{ __('team.consultant_margin') }}:</td>
<td>
{{ $TreeCalcBot->__get('business_user')->margin }} %
</td>
</tr>
<tr>
<td>{{ __('team.shop_commission') }}:</td>
<td>
{{ $TreeCalcBot->__get('business_user')->margin_shop }} %
</td>
</tr>
<tr>
<td>{{ __('team.net_turnover') }}:</td>
<td>
<strong>{{ formatNumber($TreeCalcBot->__get('business_user')->sales_volume_total_sum) }} &euro;</strong>
({{ __('team.own') }}: {{ formatNumber($TreeCalcBot->__get('business_user')->sales_volume_total) }} &euro; | {{ __('team.shop') }}: {{ formatNumber($TreeCalcBot->__get('business_user')->sales_volume_total_shop) }} &euro;)
</td>
</tr>
<tr>
<td>{{ __('team.customer_points') }}:</td>
<td>
<strong>{{ formatNumber($TreeCalcBot->__get('business_user')->sales_volume_points_KP_sum, 0) }} {{ __('team.KU') }}</strong>
({{ __('team.own') }}: {{ formatNumber($TreeCalcBot->__get('business_user')->sales_volume_KP_points, 0) }} | {{ __('team.shop') }}: {{ formatNumber($TreeCalcBot->__get('business_user')->sales_volume_points_shop, 0) }})
&nbsp; <span class="badge {{ $TreeCalcBot->__get('business_user')->isQualKP() ? 'badge-outline-success' : 'badge-outline-warning-dark' }}"> {{ __('team.KU') }} {{ $TreeCalcBot->__get('business_user')->qual_kp }}</span>
@if($TreeCalcBot->__get('business_user')->getRestQualKP() > 0)
&nbsp; <span class="badge badge-outline-info" title="Überschüssige KU-Punkte werden als Bonus zu den TP hinzugefügt">
Rest-KU: {{ formatNumber($TreeCalcBot->__get('business_user')->getRestQualKP(), 0) }}
</span>
@endif
</td>
</tr>
@if($TreeCalcBot->__get('business_user')->version == 1)
<tr>
<td>{{ __('team.qualification_points') }}:</td>
<td>
<strong>{{ formatNumber($TreeCalcBot->__get('business_user')->total_qual_pp, 0) }} {{ __('team.TP') }}</strong> (+ {{ __('team.volume_KU') }}) &nbsp;
</td>
</tr>
<tr>
<td>{{ __('team.qualification_commission') }}:</td>
<td>
@if($TreeCalcBot->__get('business_user')->isQualLevel())
<span class="badge {{ $TreeCalcBot->__get('business_user')->isQualEqualLevel() ? 'badge-outline-success' : 'badge-outline-info' }}">
{{ __('team.KP') }} {{ formatNumber($TreeCalcBot->__get('business_user')->sales_volume_points_KP_sum, 0) }} /
<strong>{{ formatNumber($TreeCalcBot->__get('business_user')->qual_user_level['qual_kp'], 0) }}</strong> |
{{ __('team.TP') }} {{ formatNumber($TreeCalcBot->__get('business_user')->total_qual_pp, 0) }} /
<strong>{{ formatNumber($TreeCalcBot->__get('business_user')->qual_user_level['qual_pp'], 0) }}</strong>
| {{ $TreeCalcBot->__get('business_user')->qual_user_level['name'] }}</span>
@endif
</td>
</tr>
@endif
@if($TreeCalcBot->__get('business_user')->version == 2)
<tr>
<td>{{ __('team.payline_points') }}:</td>
<td>
<strong>{{ formatNumber($TreeCalcBot->__get('business_user')->payline_points, 0) }} {{ __('team.PP') }}</strong>
</td>
</tr>
<tr>
<td>{{ __('team.qualification_points') }}:</td>
<td>
<strong>{{ formatNumber($TreeCalcBot->__get('business_user')->payline_points_qual_kp, 0) }} {{ __('team.PP') }}</strong>
<small class="text-muted">
({{ formatNumber($TreeCalcBot->__get('business_user')->payline_points ?? 0, 0) }} Payline
@if($TreeCalcBot->__get('business_user')->getRestQualKP() > 0)
+ {{ formatNumber($TreeCalcBot->__get('business_user')->getRestQualKP(), 0) }} Rest-KU
@endif
)
</small>
</td>
</tr>
<tr>
<td>{{ __('team.current_commission_level') }}:</td>
<td>
@if($TreeCalcBot->__get('business_user')->isQualLevel())
<span class="badge {{ $TreeCalcBot->__get('business_user')->isQualEqualLevel() ? 'badge-outline-success' : 'badge-outline-info' }}">
{{ __('team.KU') }} {{ formatNumber($TreeCalcBot->__get('business_user')->sales_volume_points_KP_sum, 0) }} /
<strong>{{ formatNumber($TreeCalcBot->__get('business_user')->qual_user_level['qual_kp'], 0) }}</strong> |
{{ __('team.PP') }} {{ formatNumber($TreeCalcBot->__get('business_user')->payline_points_qual_kp, 0) }} /
<strong>{{ formatNumber($TreeCalcBot->__get('business_user')->qual_user_level['qual_pp'], 0) }}</strong>
| {{ \App\Services\TranslationHelper::transUserLevelName($TreeCalcBot->__get('business_user')->qual_user_level['name']) }}</span>
@endif
</td>
</tr>
@if($TreeCalcBot->__get('business_user')->qual_user_level_next)
<tr>
<td>{{ __('team.next_commission_level') }}:</td>
<td>
<span class="badge badge-outline-warning-dark">
{{ __('team.KU') }} {{ formatNumber($TreeCalcBot->__get('business_user')->sales_volume_points_KP_sum, 0) }} /
<strong>{{ formatNumber($TreeCalcBot->__get('business_user')->qual_user_level_next['qual_kp'], 0) }}</strong> |
{{ __('team.PP') }} {{ formatNumber($TreeCalcBot->__get('business_user')->payline_points_qual_kp, 0) }} /
<strong>{{ formatNumber($TreeCalcBot->__get('business_user')->qual_user_level_next['qual_pp'], 0) }}</strong>
| {{ \App\Services\TranslationHelper::transUserLevelName($TreeCalcBot->__get('business_user')->qual_user_level_next['name']) }}</span>
</td>
</tr>
@endif
@endif
<tr>
<td>@if($TreeCalcBot->__get('business_user')->next_qual_user_level) {{ __('team.qualification') }}<br> @endif {{ __('team.next_career_level') }}:</td>
<td>
@if($TreeCalcBot->__get('business_user')->next_qual_user_level)
<span class="badge badge-outline-success">
{{ __('team.KU') }} {{ formatNumber($TreeCalcBot->__get('business_user')->sales_volume_points_KP_sum, 0) }} /
<strong>{{ formatNumber($TreeCalcBot->__get('business_user')->next_qual_user_level['qual_kp'], 0) }}</strong> |
{{ __('team.TP') }} {{ formatNumber($TreeCalcBot->__get('business_user')->payline_points_qual_kp, 0) }} /
<strong>{{ formatNumber($TreeCalcBot->__get('business_user')->next_qual_user_level['qual_pp'], 0) }}</strong>
| {{ \App\Services\TranslationHelper::transUserLevelName($TreeCalcBot->__get('business_user')->next_qual_user_level['name']) }}</span>
@elseif($TreeCalcBot->__get('business_user')->next_can_user_level)
<span class="badge badge-outline-warning-dark">
{{ __('team.KU') }} {{ formatNumber($TreeCalcBot->__get('business_user')->sales_volume_points_KP_sum, 0) }} /
<strong>{{ formatNumber($TreeCalcBot->__get('business_user')->next_can_user_level['qual_kp'], 0) }}</strong> |
{{ __('team.TP') }} {{ formatNumber($TreeCalcBot->__get('business_user')->payline_points_qual_kp, 0) }} /
<strong>{{ formatNumber($TreeCalcBot->__get('business_user')->next_can_user_level['qual_pp'], 0) }}</strong>
| {{ \App\Services\TranslationHelper::transUserLevelName($TreeCalcBot->__get('business_user')->next_can_user_level['name']) }}</span>
@else
<span class="badge badge-outline-warning"><i class="fa fa-times"></i></span>
@endif
</td>
</tr>
<tr>
<td><strong>{{ __('team.commission_shop') }}:</strong></td>
<td>
<span class="badge badge-primary" style="font-size: 1em;"><strong>{{ formatNumber($TreeCalcBot->__get('business_user')->commission_shop_sales) }} &euro;</strong></span>
&nbsp;
({{ __('team.sales_store_net') }}: {{ formatNumber($TreeCalcBot->__get('business_user')->sales_volume_total_shop) }} &euro; / {{ $TreeCalcBot->__get('business_user')->margin_shop }} %)
</td>
</tr>
@if($TreeCalcBot->__get('business_user')->version == 1)
<tr>
<td><strong>{{ __('team.commission_team') }}:</strong></td>
<td>
<span class="badge badge-primary" style="font-size: 1em;"><strong>{{ formatNumber($TreeCalcBot->__get('business_user')->commission_pp_total) }} &euro;</strong></span>
</td>
</tr>
@endif
@if($TreeCalcBot->__get('business_user')->version == 2)
<tr>
<td><strong>{{ __('team.commission_payline') }}:</strong></td>
<td>
<span class="badge badge-primary" style="font-size: 1em;"><strong>{{ formatNumber($TreeCalcBot->__get('business_user')->commission_pp_total) }} &euro;</strong></span>
</td>
</tr>
<tr>
<td><strong>{{ __('team.commission_WB') }}:</strong></td>
<td>
<span class="badge badge-primary" style="font-size: 1em;"><strong>{{ formatNumber($TreeCalcBot->__get('business_user')->commission_growth_total) }} &euro;</strong></span>
</td>
</tr>
@endif
<tr>
<td><strong>{{ __('team.commission_total') }}:</strong></td>
<td>
<span class="badge badge-secondary" style="font-size: 1em;"><strong>{{ formatNumber($TreeCalcBot->__get('business_user')->getCommissionTotal()) }} &euro;</strong></span>
</td>
</tr>
@if($TreeCalcBot->__get('business_user')->version == 2)
{{-- <tr>
<td>Team Points:</td>
<td>
<strong>{{ formatNumber($TreeCalcBot->__get('business_user')->total_pp, 0) }} TP</strong>
</td>
</tr>
<tr>
<td>Qualifikation Team Points:</td>
<td>
<strong>{{ formatNumber($TreeCalcBot->__get('business_user')->payline_points_qual_kp, 0) }} TP</strong> (+ Volumen KP)
</td>
</tr>
--}}
@endif
</tbody>
</table>
<hr class="border-light m-0 mb-2">
<div class="table-responsive">
<table class="table card-table m-0">
<tbody>
<tr>
<th>{{__('tables.line')}}</th>
<th>{{__('tables.points')}}</th>
<th>{{__('tables.commission')}} %</th>
<th>{{__('tables.commission')}} &euro;</th>
</tr>
@foreach (array_reverse($TreeCalcBot->__get('business_user')->business_lines->toArray(), true) as $line => $object)
<tr>
<td>
@if($line <= $TreeCalcBot->__get('business_user')->getQualLevelPaylines())
<div class="font-weight-bolder line-height-1 my-2 text-dark badge badge-outline-success">{{ $line }}. {{ __('team.PP') }}</div>
@elseif($TreeCalcBot->__get('business_user')->isQualLevelGrowth($line))
<div class="font-weight-bolder line-height-1 my-2 text-dark badge badge-outline-warning-dark">{{ $line }}. {{ __('team.WB') }}</div>
@else
<div class="font-weight-bolder line-height-1 my-2 text-dark badge badge-outline-dark">{{ $line }}.</div>
@endif
</td>
<td>{{ formatNumber($TreeCalcBot->getKeybyLine($line, 'points'), 0) }}</td>
<td>{{ formatNumber($TreeCalcBot->getKeybyLine($line, 'margin'), 1) }} %</td>
<td>{{ formatNumber($TreeCalcBot->getKeybyLine($line, 'commission'), 2) }} &euro;</td>
</tr>
@endforeach
</tbody>
<tfoot>
<tr>
<td>{{__('tables.total')}}</td>
<td>{{ formatNumber($TreeCalcBot->__get('business_user')->total_pp, 0) }}</td>
<td></td>
<td><strong>{{ formatNumber($TreeCalcBot->__get('business_user')->commission_pp_total, 2) }} &euro;</strong></td>
</tr>
</tfoot>
</table>
</div>