last changes since 6-2023

This commit is contained in:
Kevin Adametz 2023-07-03 10:07:08 +02:00
parent da10f19fcb
commit 3a81b8a0f5
139 changed files with 5377 additions and 1511 deletions

View file

@ -1,29 +1,5 @@
<table class="table user-view-table m-0">
<tbody>
<tr>
<td>Account ID:</td>
<td>
{{ $TreeCalcBot->business_user->m_account }}
</td>
</tr>
<tr>
<td>Karriere-Level:</td>
<td>
{{ $TreeCalcBot->business_user->user_level_name }}
</td>
</tr>
<tr>
<td>Kundenprovision:</td>
<td>
{{ $TreeCalcBot->business_user->margin }} %
</td>
</tr>
<tr>
<td>Shop Provision:</td>
<td>
{{ $TreeCalcBot->business_user->margin_shop }} %
</td>
</tr>
<tr>
<td>Account:</td>
<td>
@ -35,6 +11,7 @@
@if($TreeCalcBot->business_user->active_date)
bis: {{ formatDate($TreeCalcBot->business_user->active_date) }}
@endif
(ID: {{ $TreeCalcBot->business_user->m_account }})
</td>
</tr>
<tr>
@ -57,18 +34,32 @@
@if($TreeCalcBot->business_user->isSave())
<span class="badge badge-outline-success"><i class="fa fa-check-circle"></i></span>
@else
<span class="badge badge-outline-warning"><i class="fa fa-times"></i></span>
<span class="badge badge-outline-warning-dark"><i class="fa fa-times"></i></span>
@endif
</td>
</tr>
<tr>
<td>Gesamte Points:</td>
<td>
<strong>{{ $TreeCalcBot->business_user->sales_volume_points_sum }}</strong>
(Eigene: {{ $TreeCalcBot->business_user->sales_volume_points }} | Shop: {{ $TreeCalcBot->business_user->sales_volume_points_shop }})
<td>Karriere-Level:</td>
<td>
{{ $TreeCalcBot->business_user->user_level_name }} &nbsp;
<span class="badge badge-outline-success"> KP {{ $TreeCalcBot->business_user->qual_kp }} / PP {{ formatNumber($TreeCalcBot->business_user->qual_pp, 0) }}</span>
</td>
</tr>
<tr>
<td>Kundenprovision:</td>
<td>
{{ $TreeCalcBot->business_user->margin }} %
</td>
</tr>
<tr>
<td>Shop Provision:</td>
<td>
{{ $TreeCalcBot->business_user->margin_shop }} %
</td>
</tr>
<tr>
<td>Umsatz netto:</td>
<td>
@ -77,37 +68,79 @@
</td>
</tr>
<tr>
<td>Persönliches Volumen:</td>
<td>Kunden Points:</td>
<td>
<span class="badge {{ $TreeCalcBot->business_user->isQualKP() ? 'badge-outline-success' : 'badge-outline-danger' }}"> KD {{ $TreeCalcBot->business_user->qual_kp }}</span>
<strong>{{ formatNumber($TreeCalcBot->business_user->sales_volume_points_KP_sum, 0) }} KP</strong>
(Eigene: {{ formatNumber($TreeCalcBot->business_user->sales_volume_KP_points, 0) }} | Shop: {{ formatNumber($TreeCalcBot->business_user->sales_volume_points_shop, 0) }})
&nbsp; <span class="badge {{ $TreeCalcBot->business_user->isQualKP() ? 'badge-outline-success' : 'badge-outline-warning-dark' }}"> KP {{ $TreeCalcBot->business_user->qual_kp }}</span>
</td>
</tr>
@if($TreeCalcBot->business_user->version == 1)
<tr>
<td>Qualifikation Points:</td>
<td>
<strong>{{ formatNumber($TreeCalcBot->business_user->total_qual_pp, 0) }} TP</strong> (+ Volumen KP) &nbsp;
</td>
</tr>
<tr>
<td>Qualifikation Provision:</td>
<td>
TP {{ formatNumber($TreeCalcBot->business_user->qual_tp, 0) }} /
@if($TreeCalcBot->business_user->isQualKP())
<strong> TP {{ formatNumber($TreeCalcBot->business_user->total_qual_tp, 0) }}</strong> &nbsp;
@if($TreeCalcBot->business_user->qual_user_level)
<span class="badge badge-outline-success">{{ formatNumber($TreeCalcBot->business_user->qual_user_level['qual_tp'], 0) }} | {{ $TreeCalcBot->business_user->qual_user_level['name'] }}</span>
@if($TreeCalcBot->business_user->isQualLevel())
<span class="badge {{ $TreeCalcBot->business_user->isQualEqualLevel() ? 'badge-outline-success' : 'badge-outline-info' }}">
KP {{ formatNumber($TreeCalcBot->business_user->sales_volume_points_KP_sum, 0) }} /
<strong>{{ formatNumber($TreeCalcBot->business_user->qual_user_level['qual_kp'], 0) }}</strong> |
TP {{ formatNumber($TreeCalcBot->business_user->total_qual_pp, 0) }} /
<strong>{{ formatNumber($TreeCalcBot->business_user->qual_user_level['qual_pp'], 0) }}</strong>
| {{ $TreeCalcBot->business_user->qual_user_level['name'] }}</span>
@endif
@else
<span class="ion ion-md-close text-danger"></span>
@endif
</td>
</tr>
@endif
@if($TreeCalcBot->business_user->version == 2)
<tr>
<td>Payline Points:</td>
<td>
<strong>{{ formatNumber($TreeCalcBot->business_user->payline_points, 0) }} PP</strong>
</td>
</tr>
<tr>
<td>Qualifikation Karriere:</td>
<td>Qualifikation Points:</td>
<td>
@if($TreeCalcBot->business_user->next_qual_user_level)
<span class="badge badge-outline-success">{{ formatNumber($TreeCalcBot->business_user->next_qual_user_level['qual_tp'], 0) }} | {{ $TreeCalcBot->business_user->next_qual_user_level['name'] }}</span>
@else
<span class="badge badge-outline-warning"><i class="fa fa-times"></i></span>
@endif
<strong>{{ formatNumber($TreeCalcBot->business_user->payline_points_qual_kp, 0) }} PP</strong> (+ Volumen KP)
</td>
</tr>
<tr>
<td>aktuelle Provisions-Stufe:</td>
<td>
@if($TreeCalcBot->business_user->isQualLevel())
<span class="badge {{ $TreeCalcBot->business_user->isQualEqualLevel() ? 'badge-outline-success' : 'badge-outline-info' }}">
KP {{ formatNumber($TreeCalcBot->business_user->sales_volume_points_KP_sum, 0) }} /
<strong>{{ formatNumber($TreeCalcBot->business_user->qual_user_level['qual_kp'], 0) }}</strong> |
PP {{ formatNumber($TreeCalcBot->business_user->payline_points_qual_kp, 0) }} /
<strong>{{ formatNumber($TreeCalcBot->business_user->qual_user_level['qual_pp'], 0) }}</strong>
| {{ $TreeCalcBot->business_user->qual_user_level['name'] }}</span>
@endif
</td>
</tr>
@if($TreeCalcBot->business_user->qual_user_level_next)
<tr>
<td>nächste Provisions-Stufe:</td>
<td>
<span class="badge badge-outline-warning-dark">
KP {{ formatNumber($TreeCalcBot->business_user->sales_volume_points_KP_sum, 0) }} /
<strong>{{ formatNumber($TreeCalcBot->business_user->qual_user_level_next['qual_kp'], 0) }}</strong> |
PP {{ formatNumber($TreeCalcBot->business_user->payline_points_qual_kp, 0) }} /
<strong>{{ formatNumber($TreeCalcBot->business_user->qual_user_level_next['qual_pp'], 0) }}</strong>
| {{ $TreeCalcBot->business_user->qual_user_level_next['name'] }}</span>
</td>
</tr>
@endif
@endif
<tr>
<td><strong>Provision Shop:</strong></td>
<td>
@ -116,19 +149,72 @@
(Umsatz Shop netto: {{ formatNumber($TreeCalcBot->business_user->sales_volume_total_shop) }} &euro; / {{ $TreeCalcBot->business_user->margin_shop }} %)
</td>
</tr>
@if($TreeCalcBot->business_user->version == 1)
<tr>
<td><strong>Provision Team:</strong></td>
<td>
<span class="badge badge-primary" style="font-size: 1em;"><strong>{{ formatNumber($TreeCalcBot->business_user->commission_team_total) }} &euro;</strong></span>
<span class="badge badge-primary" style="font-size: 1em;"><strong>{{ formatNumber($TreeCalcBot->business_user->commission_pp_total) }} &euro;</strong></span>
</td>
</tr>
@endif
@if($TreeCalcBot->business_user->version == 2)
<tr>
<td><strong>Provision Payline:</strong></td>
<td>
<span class="badge badge-primary" style="font-size: 1em;"><strong>{{ formatNumber($TreeCalcBot->business_user->commission_pp_total) }} &euro;</strong></span>
</td>
</tr>
<tr>
<td><strong>Provision Wachstumsbonus:</strong></td>
<td>
<span class="badge badge-primary" style="font-size: 1em;"><strong>{{ formatNumber($TreeCalcBot->business_user->commission_growth_total) }} &euro;</strong></span>
</td>
</tr>
@endif
<tr>
<td><strong>Provision Gesamt:</strong></td>
<td>
<span class="badge badge-secondary" style="font-size: 1em;"><strong>{{ formatNumber($TreeCalcBot->business_user->getCommissionTotal()) }} &euro;</strong></span>
</td>
</tr>
@if($TreeCalcBot->business_user->version == 2)
<tr>
<td>Team Points:</td>
<td>
<strong>{{ formatNumber($TreeCalcBot->business_user->total_pp, 0) }} TP</strong>
</td>
</tr>
<tr>
<td>Qualifikation Team Points:</td>
<td>
<strong>{{ formatNumber($TreeCalcBot->business_user->total_qual_pp, 0) }} TP</strong> (+ Volumen KP)
</td>
</tr>
@endif
<tr>
<td>@if($TreeCalcBot->business_user->next_qual_user_level) Qualifikation<br> @endif nächster Karriere-Level:</td>
<td>
@if($TreeCalcBot->business_user->next_qual_user_level)
<span class="badge badge-outline-success">
KP {{ formatNumber($TreeCalcBot->business_user->sales_volume_points_KP_sum, 0) }} /
<strong>{{ formatNumber($TreeCalcBot->business_user->next_qual_user_level['qual_kp'], 0) }}</strong> |
TP {{ formatNumber($TreeCalcBot->business_user->total_qual_pp, 0) }} /
<strong>{{ formatNumber($TreeCalcBot->business_user->next_qual_user_level['qual_pp'], 0) }}</strong>
| {{ $TreeCalcBot->business_user->next_qual_user_level['name'] }}</span>
@elseif($TreeCalcBot->business_user->next_can_user_level)
<span class="badge badge-outline-warning-dark">
KP {{ formatNumber($TreeCalcBot->business_user->sales_volume_points_KP_sum, 0) }} /
<strong>{{ formatNumber($TreeCalcBot->business_user->next_can_user_level['qual_kp'], 0) }}</strong> |
TP {{ formatNumber($TreeCalcBot->business_user->total_qual_pp, 0) }} /
<strong>{{ formatNumber($TreeCalcBot->business_user->next_can_user_level['qual_pp'], 0) }}</strong>
| {{ $TreeCalcBot->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>
</tbody>
</table>
<hr class="border-light m-0 mb-2">
@ -141,34 +227,31 @@
<th>Provision %</th>
<th>Provision &euro;</th>
</tr>
@for ($line=1; $line<=6; $line++)
<tr>
<td>
<div class="font-weight-bolder line-height-1 my-2 text-dark badge badge-outline-dark">{{ $line }}</div>
</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>
@endfor
@foreach ($TreeCalcBot->getGrowthBonus() as $line => $growthBonu)
<tr>
<td>
<div class="font-weight-bolder line-height-1 my-2 text-dark badge badge-outline-dark">{{ $line+7 }}</div>
</td>
<td>{{ formatNumber($TreeCalcBot->getKeybyLine($line+7, 'points'), 0) }}</td>
<td>{{ formatNumber($TreeCalcBot->getKeybyLine($line+7, 'margin'), 1) }} %</td>
<td>{{ formatNumber($TreeCalcBot->getKeybyLine($line+7, 'commission'), 2) }} &euro;</td>
@foreach ($TreeCalcBot->business_user->business_lines as $line => $object)
<tr>
<td>
@if($line <= $TreeCalcBot->business_user->getQualLevelPaylines())
<div class="font-weight-bolder line-height-1 my-2 text-dark badge badge-outline-success">{{ $line }}. PP</div>
@elseif($line <= $TreeCalcBot->business_user->isQualLevelGrowth($line))
<div class="font-weight-bolder line-height-1 my-2 text-dark badge badge-outline-warning-dark">{{ $line }}. 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
@endforeach
</tbody>
<tfoot>
<tr>
<td>Gesamt</td>
<td>{{ formatNumber($TreeCalcBot->business_user->total_tp, 0) }}</td>
<td>{{ formatNumber($TreeCalcBot->business_user->total_pp, 0) }}</td>
<td></td>
<td><strong>{{ formatNumber($TreeCalcBot->business_user->commission_team_total, 2) }} &euro;</strong></td>
<td><strong>{{ formatNumber($TreeCalcBot->business_user->commission_pp_total, 2) }} &euro;</strong></td>
</tr>
</tfoot>

View file

@ -86,7 +86,7 @@
"order": [[3, "desc" ]],
"columns": [
{ data: 'commission_total', name: 'commission_total', orderable: false, searchable: false },
{ data: 'commission_team_total', name: 'commission_team_total', orderable: true, searchable: false },
{ data: 'commission_pp_total', name: 'commission_pp_total', orderable: true, searchable: false },
{ data: 'commission_shop_sales', name: 'commission_shop_sales', orderable: true, searchable: false },
{ data: 'm_account', name: 'm_account', orderable: true , searchable: true },
{ data: 'first_name', name: 'first_name', orderable: true , searchable: true },

View file

@ -34,6 +34,14 @@
{{ Form::text('points', '', array('placeholder'=>__('Points'), 'class'=>'form-control', 'id'=>'points', 'required'=>true)) }}
</div>
</div>
<div class="form-row">
<div class="form-group col-4">
<label for="status_points" class="form-label">{{ __('Points berechnen für') }}*</label>
{{ Form::select('status_points', \App\Models\UserSalesVolume::$statusPointsTypes , 1, array('class'=>'custom-select', 'id'=>'status_points')) }}
</div>
</div>
<div class="form-row">
<div class="form-group col-sm-4">
<label for="total_net" class="form-label">{{__('Umsatz netto%')}}</label>
@ -49,10 +57,9 @@
<label class="custom-control custom-checkbox">
{!! Form::checkbox('is_checked_action', 1, 0, ['class' => 'custom-control-input', 'id' => 'is_checked_action', 'required'=>true]) !!}
<span class="custom-control-label">Points / Umsatz hinzufügen</span>
<span class="custom-control-label">ja, Points / Umsatz hinzufügen</span>
</label>
<hr>
<i>Points werden mit für den akutellen Datum hinzugefügt, da die monatliche Auswertung für die Monate davor schon berechnet sind.</i><br>

View file

@ -61,6 +61,12 @@
</div>
</div>
<div class="form-row">
<div class="form-group col-4">
<label for="status_points" class="form-label">{{ __('Points berechnen für') }}*</label>
{{ Form::select('status_points', \App\Models\UserSalesVolume::$statusPointsTypes , $userSalesVolume->status_points, array('class'=>'custom-select', 'id'=>'status_points')) }}
</div>
</div>
<div class="form-row">
<div class="form-group col-sm-4">
<label for="total_net" class="form-label">{{__('Umsatz netto')}}</label>
@ -76,7 +82,7 @@
<label class="custom-control custom-checkbox">
{!! Form::checkbox('is_checked_action', 1, 0, ['class' => 'custom-control-input', 'id' => 'is_checked_action', 'required'=>true]) !!}
<span class="custom-control-label">Points / Umsatz ändern</span>
<span class="custom-control-label">ja, Points / Umsatz ändern</span>
</label>
@else
Points können nicht mehr geändet werden werden.
@ -84,11 +90,7 @@
<hr>
<i>Points können nur innerhalb des akutellen Monats geändert werden, da sonst die monatliche Auswertung schon berechnet ist.
Danach können Points für den akutellen Monat manuell gutgeschrieben werden.</i><br>
<a class="btn btn-sm btn-default mt-2" href="{{ route('admin_business_points') }}">Business -> Points gutschreiben</a>
{{-- <a class="btn btn-sm btn-default mt-2" href="{{ route('admin_business_points') }}">Business -> Points gutschreiben</a> --}}
</div>
<div class="modal-footer">

View file

@ -63,7 +63,8 @@
<th>{{__('Datum') }}</th>
<th>{{__('Points')}}</th>
<th>{{__('Umsatz netto')}}</th>
<th>{{__('Art')}}</th>
<th>{{__('aus')}}</th>
<th>{{__('für')}}</th>
<th>{{__('Bestellung')}}</th>
<th>{{__('Berater Nr.')}}</th>
<th>{{__('Vorname')}}</th>
@ -103,6 +104,7 @@
{ data: 'points', name: 'points', orderable: true, searchable: false },
{ data: 'total_net', name: 'total_net', orderable: true, searchable: false },
{ data: 'status', name: 'status', orderable: true, searchable: false },
{ data: 'status_points', name: 'status_points', orderable: true, searchable: false },
{ data: 'order', name: 'order', orderable: false , searchable: false },
{ data: 'm_account', name: 'm_account', orderable: true , searchable: true },
{ data: 'first_name', name: 'first_name', orderable: true , searchable: true },

View file

@ -80,7 +80,7 @@
{ data: 'm_account', name: 'm_account', orderable: true, searchable: true },
{ data: 'user_level', name: 'user_level', orderable: false, searchable: false },
{ data: 'is_qual_kp', name: 'is_qual_kp', orderable: false, searchable: false },
{ data: 'sales_volume_points', name: 'sales_volume_points', orderable: false, searchable: false },
{ data: 'sales_volume_KP_points', name: 'sales_volume_KP_points', orderable: false, searchable: false },
{ data: 'sales_volume_total', name: 'sales_volume_total', orderable: false, searchable: false },
{ data: 'email', name: 'email', orderable: true, searchable: true},
{ data: 'first_name', name: 'first_name', orderable: true, searchable: true },