454 lines
24 KiB
PHP
454 lines
24 KiB
PHP
@extends('layouts.layout-2')
|
|
|
|
@section('content')
|
|
|
|
<style>
|
|
.td-entry-table-margin {
|
|
padding-bottom: 6px;
|
|
border-bottom: 1px solid rgb(221, 221, 221);
|
|
margin-bottom: 6px;
|
|
}
|
|
|
|
div.card-header {
|
|
border-bottom: none;
|
|
}
|
|
.user-view-table tr:first-child td {
|
|
border-top: none;
|
|
}
|
|
.user-view-table tr:first-child td {
|
|
border-top: none;
|
|
}
|
|
.table th, .table td {
|
|
border-top: none;
|
|
}
|
|
.table tbody th, .table tbody td {
|
|
border-bottom: 1px solid #d6d6de;
|
|
}
|
|
.card hr {
|
|
border-color: #d7d700
|
|
}
|
|
</style>
|
|
|
|
<div class="card">
|
|
<h5 class="card-header">
|
|
Auszahlungen Details
|
|
<br>
|
|
{{ __('pdf.credit_note') }} | {{ $user_credit->date }} | {{ $user_credit->full_number }} |
|
|
{{ $user_credit->user->account->first_name }} {{ $user_credit->user->account->last_name }}
|
|
({{ $user_credit->user->email }})
|
|
</h5>
|
|
|
|
@foreach ($dates as $date => $dateObj)
|
|
@if (isset($collection->calc_bot[$date]))
|
|
@php($cbot = $collection->calc_bot[$date])
|
|
<div class="card-header">
|
|
<table class="table user-view-table m-0">
|
|
<tbody>
|
|
<tr>
|
|
<td>{{ __('team.date') }}:</td>
|
|
<td>
|
|
<strong> {{ HTMLHelper::getMonth($cbot->date->month) }}
|
|
{{ $cbot->date->year }}</strong> | {{ __('team.completed') }}
|
|
@if ($cbot->business_user->isSave())
|
|
<span class="badge badge-outline-success"><i class="fa fa-check-circle"></i></span>
|
|
@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($cbot->business_user->user_level_name) }}
|
|
|
|
<span class="badge badge-outline-success"> {{ __('team.KU') }}
|
|
{{ $cbot->business_user->qual_kp }} / {{ __('team.PP') }}
|
|
{{ formatNumber($cbot->business_user->qual_pp, 0) }}</span>
|
|
</td>
|
|
</tr>
|
|
<tr>
|
|
<td>{{ __('team.shop_commission') }}:</td>
|
|
<td>
|
|
{{ $cbot->business_user->margin_shop }} %
|
|
</td>
|
|
</tr>
|
|
<tr>
|
|
<td>{{ __('team.consultant_margin') }}:</td>
|
|
<td>
|
|
{{ $cbot->business_user->margin }} %
|
|
</td>
|
|
</tr>
|
|
<tr>
|
|
<td><strong>{{ __('team.commission_total') }}:</strong></td>
|
|
<td>
|
|
<span class="badge badge-secondary" style="font-size: 1em;"><strong>{{ formatNumber($cbot->business_user->getCommissionTotal()) }} €</strong></span>
|
|
</td>
|
|
</tr>
|
|
</tbody>
|
|
</table>
|
|
</div>
|
|
<hr>
|
|
@endif
|
|
@if (isset($collection->commission_shop[$date]))
|
|
@php($cs = $collection->commission_shop[$date])
|
|
@if (isset($cbot))
|
|
<div class="card-header">
|
|
<table class="table user-view-table m-0">
|
|
<tbody>
|
|
<tr>
|
|
<td>
|
|
<strong>{{ __('team.commission_shop') }}</strong>
|
|
</td>
|
|
<td>
|
|
<span class="badge badge-primary"
|
|
style="font-size: 1em;"><strong>{{ formatNumber($cbot->business_user->commission_shop_sales) }}
|
|
€</strong></span>
|
|
|
|
({{ __('team.sales_store_net') }}:
|
|
{{ formatNumber($cbot->business_user->sales_volume_total_shop) }} € /
|
|
{{ $cbot->business_user->margin_shop }} %)
|
|
</td>
|
|
</tr>
|
|
</tbody>
|
|
</table>
|
|
</div>
|
|
@endif
|
|
|
|
|
|
<div class="card-body table-responsive pt-0 pb-0">
|
|
<table class="datatables-style table table-striped ">
|
|
<thead>
|
|
<tr>
|
|
<th>#</th>
|
|
<th>{{ __('Datum') }}</th>
|
|
<th>{{ __('Typ') }}</th>
|
|
<th>{{ __('Umsatz netto') }}</th>
|
|
<th>{{ __('tables.points') }}</th>
|
|
<th>{{ __('für') }}</th>
|
|
<th>{{ __('VE') }}</th>
|
|
<th>{{ __('Bestellung') }}</th>
|
|
</tr>
|
|
</thead>
|
|
<tbody>
|
|
@foreach ($cs->user_sales_volumes as $user_sales_volume)
|
|
<tr>
|
|
<td>{{ $user_sales_volume->id }}</td>
|
|
<td>{{ $user_sales_volume->date }}</td>
|
|
<td>{{ $user_sales_volume->getStatusType() }}</td>
|
|
<td>{{ formatNumber($user_sales_volume->total_net) }} €</td>
|
|
<td>{{ $user_sales_volume->getFormattedPoints() }}</td>
|
|
<td>{{ $user_sales_volume->getStatusPointsType() }}</td>
|
|
<td>{{ $user_sales_volume->getStatusTurnoverType() }}</td>
|
|
<td>
|
|
{{ $user_sales_volume->shopping_order_id }}
|
|
@if ($user_sales_volume->shopping_order)
|
|
<br><span
|
|
class="small">{{ $user_sales_volume->shopping_order->getShoppingUserFullName() }}</span>
|
|
@endif
|
|
</td>
|
|
</tr>
|
|
@endforeach
|
|
|
|
@if (isset($collection->commission_credit[$date]))
|
|
@php($ccredits = $collection->commission_credit[$date])
|
|
@foreach ($ccredits as $credit)
|
|
<tr>
|
|
<td>{{ $credit->id }}</td>
|
|
<td>{{ $credit->date }}</td>
|
|
<td>{{ $credit->getStatusType() }}</td>
|
|
<td>{{ formatNumber($credit->total_net) }} €</td>
|
|
<td>({{ $credit->points }}) -</td>
|
|
<td>{{ $credit->getStatusPointsType() }}</td>
|
|
<td>{{ $credit->getStatusTurnoverType() }}</td>
|
|
<td>{{ $credit->info }}</td>
|
|
</tr>
|
|
@endforeach
|
|
@endif
|
|
|
|
</tbody>
|
|
<tfoot>
|
|
<tr>
|
|
<td colspan="3" class="text-right"> {{ __('tables.total') }} </td>
|
|
<td><strong>{{ formatNumber($cs->user_sales_volumes_total->month_shop_total_net) }}
|
|
€</strong></td>
|
|
<td><strong>{{ $cs->user_sales_volumes_total->month_shop_points }}</strong></td>
|
|
|
|
<td colspan="3"></td>
|
|
</tr>
|
|
</tfoot>
|
|
</table>
|
|
</div>
|
|
<hr>
|
|
|
|
@endif
|
|
|
|
@if (isset($collection->own_order[$date]))
|
|
@php($order = $collection->own_order[$date])
|
|
@if (isset($cbot))
|
|
<div class="card-header">
|
|
<table class="table user-view-table m-0">
|
|
<tbody>
|
|
<tr>
|
|
<td>
|
|
<strong>{{ __('team.own') }} {{ __('tables.margin') }} </strong>
|
|
</td>
|
|
<td>
|
|
<span class="badge badge-primary"
|
|
style="font-size: 1em;"><strong>
|
|
{{ formatNumber($cbot->business_user->getSalesVolumeTotalMargin()) }}
|
|
€</strong></span>
|
|
|
|
({{ __('team.net_turnover') }}:
|
|
{{ formatNumber($cbot->business_user->sales_volume_total) }} € /
|
|
{{ $cbot->business_user->margin }} %)
|
|
<br>
|
|
<em>{{ __('team.consultant_margin_info') }}</em>
|
|
</td>
|
|
</tr>
|
|
</tbody>
|
|
</table>
|
|
</div>
|
|
@endif
|
|
|
|
<div class="card-body table-responsive pt-0 pb-0">
|
|
<table class="datatables-style table table-striped ">
|
|
<thead>
|
|
<tr>
|
|
<th>#</th>
|
|
<th>{{ __('Datum') }}</th>
|
|
<th>{{ __('Typ') }}</th>
|
|
<th>{{ __('Umsatz netto') }}</th>
|
|
<th>{{ __('tables.points') }}</th>
|
|
<th>{{ __('für') }}</th>
|
|
<th>{{ __('VE') }}</th>
|
|
<th>{{ __('Bestellung') }}</th>
|
|
</tr>
|
|
</thead>
|
|
<tbody>
|
|
@foreach ($order->user_sales_volumes as $user_sales_volume)
|
|
<tr>
|
|
<td>{{ $user_sales_volume->id }}</td>
|
|
<td>{{ $user_sales_volume->date }}</td>
|
|
<td>{{ $user_sales_volume->getStatusType() }}</td>
|
|
<td>{{ formatNumber($user_sales_volume->total_net) }} €</td>
|
|
<td>{{ $user_sales_volume->getFormattedPoints() }}</td>
|
|
<td>{{ $user_sales_volume->getStatusPointsType() }}</td>
|
|
<td>{{ $user_sales_volume->getStatusTurnoverType() }}</td>
|
|
<td>
|
|
{{ $user_sales_volume->shopping_order_id }}
|
|
@if ($user_sales_volume->shopping_order)
|
|
<br><span
|
|
class="small">{{ $user_sales_volume->shopping_order->getShoppingUserFullName() }}</span>
|
|
@endif
|
|
</td>
|
|
</tr>
|
|
@endforeach
|
|
</tbody>
|
|
<tfoot>
|
|
<tr>
|
|
<td colspan="3" class="text-right"> {{ __('tables.total') }} </td>
|
|
<td><strong>{{ formatNumber($order->credit_total_net) }} €</strong></td>
|
|
<td><strong>{{ $order->credit_total_points }}</strong></td>
|
|
<td colspan="3"></td>
|
|
</tr>
|
|
</tfoot>
|
|
</table>
|
|
</div>
|
|
<hr>
|
|
|
|
@endif
|
|
|
|
|
|
@if (isset($collection->commission_registration[$date]))
|
|
@php($cr = $collection->commission_registration[$date])
|
|
<div class="card-header">
|
|
<table class="table user-view-table m-0">
|
|
<tbody>
|
|
<tr>
|
|
<td colspan="2">
|
|
<strong>{{ __('tables.points') }} {{ __('payment.registration') }}</strong>
|
|
</td>
|
|
</tr>
|
|
</tbody>
|
|
</table>
|
|
</div>
|
|
<div class="card-body table-responsive pt-0 pb-0">
|
|
<table class="datatables-style table table-striped ">
|
|
<thead>
|
|
<tr>
|
|
<th>#</th>
|
|
<th>{{ __('Datum') }}</th>
|
|
<th>{{ __('Typ') }}</th>
|
|
<th>{{ __('tables.points') }}</th>
|
|
<th>{{ __('für') }}</th>
|
|
<th>{{ __('VE') }}</th>
|
|
<th>{{ __('Info') }}</th>
|
|
</tr>
|
|
</thead>
|
|
<tbody>
|
|
@foreach ($cr->user_sales_volumes as $user_sales_volume)
|
|
<tr>
|
|
<td>{{ $user_sales_volume->id }}</td>
|
|
<td>{{ $user_sales_volume->date }}</td>
|
|
<td>{{ $user_sales_volume->getStatusType() }}</td>
|
|
<td>{{ $user_sales_volume->getFormattedPoints() }}</td>
|
|
<td>{{ $user_sales_volume->getStatusPointsType() }}</td>
|
|
<td>{{ $user_sales_volume->getStatusTurnoverType() }}</td>
|
|
<td>{{ $user_sales_volume->info }}</td>
|
|
</tr>
|
|
@endforeach
|
|
</tbody>
|
|
<tfoot>
|
|
<tr>
|
|
<td colspan="3" class="text-right"> {{ __('tables.total') }} </td>
|
|
<td><strong>{{ $cr->credit_total_points }}</strong></td>
|
|
<td colspan="4"></td>
|
|
</tr>
|
|
</tfoot>
|
|
</table>
|
|
</div>
|
|
<hr>
|
|
|
|
@endif
|
|
|
|
|
|
@if (isset($cbot))
|
|
<div class="card-header">
|
|
<table class="table user-view-table m-0">
|
|
<tbody>
|
|
<tr>
|
|
<td colspan="2">
|
|
<strong>{{ __('tables.total') }} </strong>
|
|
</td>
|
|
</tr>
|
|
<tr>
|
|
<td>{{ __('team.net_turnover') }}:</td>
|
|
<td>
|
|
<strong>{{ formatNumber($cbot->business_user->sales_volume_total_sum) }} €</strong>
|
|
({{ __('team.own') }}: {{ formatNumber($cbot->business_user->sales_volume_total) }} € | {{ __('team.shop') }}: {{ formatNumber($cbot->business_user->sales_volume_total_shop) }} €)
|
|
</td>
|
|
</tr>
|
|
<tr>
|
|
<td>{{ __('team.customer_points') }}:</td>
|
|
<td>
|
|
<strong>{{ formatNumber($cbot->business_user->sales_volume_points_KP_sum, 0) }} {{ __('team.KU') }}</strong>
|
|
({{ __('team.own') }}: {{ formatNumber($cbot->business_user->sales_volume_KP_points, 0) }} | {{ __('team.shop') }}: {{ formatNumber($cbot->business_user->sales_volume_points_shop, 0) }})
|
|
<span class="badge {{ $cbot->business_user->isQualKP() ? 'badge-outline-success' : 'badge-outline-warning-dark' }}"> {{ __('team.KU') }} {{ $cbot->business_user->qual_kp }}</span>
|
|
|
|
</td>
|
|
</tr>
|
|
</tbody>
|
|
</table>
|
|
</div>
|
|
<hr>
|
|
<div class="card-header">
|
|
<table class="table user-view-table m-0">
|
|
<tbody>
|
|
@if($cbot->business_user->version == 2)
|
|
<tr>
|
|
<td>{{ __('team.payline_points') }}:</td>
|
|
<td>
|
|
<strong>{{ formatNumber($cbot->business_user->payline_points, 0) }} {{ __('team.PP') }}</strong>
|
|
</td>
|
|
</tr>
|
|
|
|
<tr>
|
|
<td>{{ __('team.qualification_points') }} :</td>
|
|
<td>
|
|
<strong>{{ formatNumber($cbot->business_user->payline_points_qual_kp, 0) }} {{ __('team.PP') }}</strong> (+ {{ __('team.volume_KU') }})
|
|
</td>
|
|
</tr>
|
|
<tr>
|
|
<td>{{ __('team.current_commission_level') }}:</td>
|
|
<td>
|
|
@if($cbot->business_user->isQualLevel())
|
|
<span class="badge {{ $cbot->business_user->isQualEqualLevel() ? 'badge-outline-success' : 'badge-outline-info' }}">
|
|
{{ __('team.KU') }} {{ formatNumber($cbot->business_user->sales_volume_points_KP_sum, 0) }} /
|
|
<strong>{{ formatNumber($cbot->business_user->qual_user_level['qual_kp'], 0) }}</strong> |
|
|
{{ __('team.PP') }} {{ formatNumber($cbot->business_user->payline_points_qual_kp, 0) }} /
|
|
<strong>{{ formatNumber($cbot->business_user->qual_user_level['qual_pp'], 0) }}</strong>
|
|
| {{ \App\Services\TranslationHelper::transUserLevelName($cbot->business_user->qual_user_level['name']) }}</span>
|
|
@endif
|
|
</td>
|
|
</tr>
|
|
<tr>
|
|
<td><strong>{{ __('team.commission_payline') }}:</strong></td>
|
|
<td>
|
|
<span class="badge badge-primary" style="font-size: 1em;"><strong>{{ formatNumber($cbot->business_user->commission_pp_total) }} €</strong></span>
|
|
</td>
|
|
</tr>
|
|
<tr>
|
|
<td><strong>{{ __('team.commission_WB') }}:</strong></td>
|
|
<td>
|
|
<span class="badge badge-primary" style="font-size: 1em;"><strong>{{ formatNumber($cbot->business_user->commission_growth_total) }} €</strong></span>
|
|
</td>
|
|
</tr>
|
|
@endif
|
|
</tbody>
|
|
</table>
|
|
</div>
|
|
<div class="card-body table-responsive pt-0 pb-0">
|
|
<table class="datatables-style table table-striped ">
|
|
<thead>
|
|
<tr>
|
|
<th>{{__('tables.line')}}</th>
|
|
<th>{{__('tables.points')}}</th>
|
|
<th>{{__('tables.commission')}} %</th>
|
|
<th>{{__('tables.commission')}} €</th>
|
|
</tr>
|
|
</thead>
|
|
<tbody>
|
|
@foreach ($cbot->business_user->business_lines as $line => $object)
|
|
<tr>
|
|
<td>
|
|
|
|
@if($line <= $cbot->business_user->getQualLevelPaylines())
|
|
<div class="font-weight-bolder line-height-1 my-2 text-dark badge badge-outline-success">{{ $line }}. {{ __('team.PP') }}</div>
|
|
@elseif($line <= $cbot->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($cbot->getKeybyLine($line, 'points'), 0) }}</td>
|
|
<td>{{ formatNumber($cbot->getKeybyLine($line, 'margin'), 1) }} %</td>
|
|
<td>{{ formatNumber($cbot->getKeybyLine($line, 'commission'), 2) }} €</td>
|
|
</tr>
|
|
@endforeach
|
|
</tbody>
|
|
<tfoot>
|
|
<tr>
|
|
<td>{{__('tables.total')}}</td>
|
|
<td>{{ formatNumber($cbot->business_user->total_pp, 0) }}</td>
|
|
<td></td>
|
|
<td><strong>{{ formatNumber($cbot->business_user->commission_pp_total, 2) }} €</strong></td>
|
|
</tr>
|
|
|
|
</tfoot>
|
|
</table>
|
|
</div>
|
|
<hr>
|
|
|
|
<div class="card-body table-responsive pt-0 pb-0">
|
|
<table class="datatables-style table table-striped ">
|
|
<thead>
|
|
<tr>
|
|
<th>{{__('tables.line')}}</th>
|
|
<th>{{ __('shop.name') }}</th>
|
|
<th>{{ __('tables.email') }}</th>
|
|
<th>{{ __('tables.level') }}</th>
|
|
<th>{{__('tables.points')}}</th>
|
|
<th>{{__('tables.net_sales')}}</th>
|
|
</tr>
|
|
</thead>
|
|
<tbody>
|
|
{!! \App\Services\BusinessPlan\SalesPointsVolumeHelper::getBusinessUsersTable($cbot->business_users, 'line') !!}
|
|
</tbody>
|
|
</table>
|
|
</div>
|
|
@endif
|
|
@endforeach
|
|
</div>
|
|
|
|
@endsection
|