commit 08-2025

This commit is contained in:
Kevin Adametz 2025-08-12 18:01:59 +02:00
parent 9ae662f63e
commit 480fdc65ed
404 changed files with 65310 additions and 2600431 deletions

View file

@ -107,7 +107,7 @@
<h5 class=" font-weight-semibold mb-2">
{{ __('abo.abo_order_hl') }}
</h5>
<p>{{ __('abo.abo_order_info') }}</p>
<p>{{ __('abo.abo_order_info_2') }}</p>
<hr>
@include('user.abo.vat_info')

View file

@ -24,7 +24,7 @@
@include('admin.customer._customer_detail', ['shopping_user' => $customer_detail])
</div>
{!! Form::open(['url' => route('user_abos_update', [$view, $user_abo->id]), 'class' => 'form-horizontal', 'id'=>'cart-order-form']) !!}
{!! Form::open(['action' => route('user_abos_update', [$view, $user_abo->id]), 'class' => 'form-horizontal', 'id'=>'cart-order-form']) !!}
<input type="hidden" name="is_for" value="{{ $user_abo->is_for }}">
<div class="card mt-3">
@include('admin.abo._order_abo')

View file

@ -1,4 +1,4 @@
{!! Form::open(['url' => $route, 'class' => 'modal-content', 'enctype' => 'multipart/form-data']) !!}
{!! Form::open(['action' => $route, 'class' => 'modal-content', 'enctype' => 'multipart/form-data']) !!}
<div class="modal-header">
<h5 class="modal-title">
{{ __('abo.abo_settings') }} <span class="text-muted">{{ '#'.$user_abo->payone_userid }}</span>

View file

@ -14,18 +14,7 @@
(ID: {{ $TreeCalcBot->business_user->m_account }})
</td>
</tr>
<tr>
<td>{{ __('team.sponsor') }}:</td>
<td>
@if($TreeCalcBot->business_user->sponsor->is_sponsor)
{{ $TreeCalcBot->business_user->sponsor->first_name }} {{ $TreeCalcBot->business_user->sponsor->last_name }} |
{{ $TreeCalcBot->business_user->sponsor->email }} |
{{ $TreeCalcBot->business_user->sponsor->m_account }}
@else
-
@endif
</td>
</tr>
<tr>
<td>{{ __('team.date') }}:</td>
@ -47,6 +36,18 @@
</td>
</tr>
<tr>
<td>{{ __('team.sponsor') }}:</td>
<td>
@if($TreeCalcBot->business_user->sponsor->is_sponsor)
{{ $TreeCalcBot->business_user->sponsor->first_name }} {{ $TreeCalcBot->business_user->sponsor->last_name }} |
{{ $TreeCalcBot->business_user->sponsor->email }} |
{{ $TreeCalcBot->business_user->sponsor->m_account }}
@else
-
@endif
</td>
</tr>
<tr>
<td>{{ __('team.consultant_margin') }}:</td>
<td>

View file

@ -9,7 +9,7 @@
<div class="card-body p-0">
{!! Form::open(['url' => route('admin_business_commissions'), 'class' => 'form-horizontal', 'id'=>'form_admin_business_commissions']) !!}
{!! Form::open(['action' => route('admin_business_commissions'), 'class' => 'form-horizontal', 'id'=>'form_admin_business_commissions']) !!}
<div class="form-row align-items-center px-4 pb-2 pt-3">
<div class="col-12 col-sm-12 col-md-12 col-lg-3 mb-1">

View file

@ -1,4 +1,4 @@
{!! Form::open(['url' => $route, 'class' => 'modal-content', 'enctype' => 'multipart/form-data']) !!}
{!! Form::open(['action' => $route, 'class' => 'modal-content', 'enctype' => 'multipart/form-data']) !!}
<div class="modal-header">
<h5 class="modal-title">
Business Points

View file

@ -1,4 +1,4 @@
{!! Form::open(['url' => $route, 'class' => 'modal-content', 'enctype' => 'multipart/form-data']) !!}
{!! Form::open(['action' => $route, 'class' => 'modal-content', 'enctype' => 'multipart/form-data']) !!}
<div class="modal-header">
<h5 class="modal-title">
Business Points

View file

@ -26,7 +26,7 @@
@endif
<div class="card-body p-0">
{!! Form::open(['url' => route('admin_business_points'), 'class' => 'form-horizontal', 'id'=>'form_admin_business_points']) !!}
{!! Form::open(['action' => route('admin_business_points'), 'class' => 'form-horizontal', 'id'=>'form_admin_business_points']) !!}
<div class="form-row align-items-center px-4 pb-2 pt-3">
<div class="col-12 col-sm-12 col-md-3 col-lg-3 mb-1">

View file

@ -7,7 +7,7 @@
</h5>
<div class="card-body p-0">
{!! Form::open(['url' => route('admin_payments_invoice'), 'class' => 'form-horizontal', 'id'=>'form_filter_business_user']) !!}
{!! Form::open(['action' => route('admin_payments_invoice'), 'class' => 'form-horizontal', 'id'=>'form_filter_business_user']) !!}
<div class="form-row align-items-center px-4 pb-2 pt-3">
<div class="col-6 col-sm-4 col-md-4 col-lg-4 mb-1">

View file

@ -7,7 +7,7 @@
</h5>
<div class="card-body">
{!! Form::open(['url' => route('admin_business_structure'), 'class' => 'form-horizontal', 'id'=>'form_filter_business_user']) !!}
{!! Form::open(['action' => route('admin_business_structure'), 'class' => 'form-horizontal', 'id'=>'form_filter_business_user']) !!}
<div class="form-row align-items-center px-0 pb-2 pt-0">
<div class="col-6 col-sm-4 col-md-4 col-lg-4 mb-1">

View file

@ -5,7 +5,7 @@
<h5 class="card-header">
{{__('Business')}} {{__('Übersicht')}} Berater
</h5>
{!! Form::open(['url' => route('admin_business_user_detail', [$user->id]), 'class' => 'form-horizontal', 'id'=>'']) !!}
{!! Form::open(['action' => route('admin_business_user_detail', [$user->id]), 'class' => 'form-horizontal', 'id'=>'']) !!}
{{ Form::hidden('user_id', $user->id ) }}
{{ Form::hidden('month', $TreeCalcBot->date->month) }}
{{ Form::hidden('year', $TreeCalcBot->date->year) }}

View file

@ -0,0 +1,275 @@
<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>

View file

@ -0,0 +1,69 @@
@extends('layouts.layout-2')
@section('content')
<div class="card">
<h5 class="card-header text-danger">
<i class="fa fa-exclamation-triangle mr-2"></i>
{{__('Business')}} {{__('Fehler')}}
<span class="badge badge-danger ml-2">OPTIMIERT</span>
</h5>
<div class="card-body">
<div class="alert alert-danger">
<h5 class="alert-heading">
<i class="fa fa-bug mr-2"></i>
Ein Fehler ist aufgetreten
</h5>
<p class="mb-3">
Bei der Verarbeitung der optimierten Business-Daten ist ein Fehler aufgetreten.
Dies kann durch große Datenmengen oder Systemauslastung verursacht werden.
</p>
<hr>
<div class="row">
<div class="col-md-6">
<h6>Fehlerdetails:</h6>
<div class="bg-light p-3 rounded">
<code>{{ $error }}</code>
</div>
</div>
<div class="col-md-6">
<h6>Betroffene Parameter:</h6>
<ul class="list-unstyled">
@if(isset($month) && isset($year))
<li><strong>Zeitraum:</strong> {{ $month }}/{{ $year }}</li>
@endif
@if(isset($user_id))
<li><strong>User ID:</strong> {{ $user_id }}</li>
@endif
<li><strong>Version:</strong> Optimiert</li>
<li><strong>Zeit:</strong> {{ now()->format('Y-m-d H:i:s') }}</li>
</ul>
</div>
</div>
</div>
<div class="alert alert-info">
<h6><i class="fa fa-lightbulb mr-2"></i>Lösungsvorschläge:</h6>
<ol>
<li>Verwenden Sie die <a href="{{ route('admin_business_show') }}" class="btn btn-outline-primary btn-sm ml-2">Original-Version</a></li>
<li>Versuchen Sie es zu einem späteren Zeitpunkt erneut</li>
<li>Reduzieren Sie den Zeitraum oder die Anzahl der verarbeiteten Daten</li>
<li>Kontaktieren Sie den Administrator, wenn der Fehler weiterhin auftritt</li>
</ol>
</div>
<div class="text-center mt-4">
<a href="{{ route('admin_business_optimized') }}" class="btn btn-primary">
<i class="fa fa-arrow-left mr-2"></i>
Zurück zur Übersicht
</a>
<a href="{{ route('admin_business_show') }}" class="btn btn-outline-secondary">
<i class="fa fa-undo mr-2"></i>
Original-Version verwenden
</a>
</div>
</div>
</div>
@endsection

View file

@ -0,0 +1,159 @@
@extends('layouts.layout-2')
@section('content')
<div class="card">
<h5 class="card-header">
{{__('Business')}} {{__('Übersicht')}}
<span class="badge badge-success ml-2">OPTIMIERT</span>
</h5>
<div class="card-body p-0">
{!! Form::open(['action' => route('admin_business_optimized'), 'class' => 'form-horizontal', 'id'=>'form_filter_business_user']) !!}
<div class="form-row align-items-center px-4 pb-2 pt-3">
<div class="col-6 col-sm-6 col-md-3 col-lg-3 mb-1">
<select class="custom-select on_change_invoice" name="business_user_filter_month">
@foreach($filter_months as $key=>$value)
<option value="{{$key}}" @if(session('business_user_filter_month') == $key) selected @endif>{{$value}}</option>
@endforeach
</select>
</div>
<div class="col-6 col-sm-6 col-md-3 col-lg-3 mb-1">
<select class="custom-select on_change_invoice" name="business_user_filter_year">
@foreach($filter_years as $key=>$value)
<option value="{{$value}}" @if(session('business_user_filter_year') == $value) selected @endif>{{$value}}</option>
@endforeach
</select>
</div>
<div class="col-6 col-sm-6 col-md-3 col-lg-3 mb-1">
<select class="custom-select on_change_invoice" name="business_user_filter_active">
@foreach($filter_active as $key=>$value)
<option value="{{$key}}" @if(session('business_user_filter_active') == $key) selected @endif>{{$value}}</option>
@endforeach
</select>
</div>
<div class="col-6 col-sm-6 col-md-3 col-lg-3 mb-1">
<select class="custom-select on_change_invoice" name="business_user_filter_level">
@foreach($filter_levels as $key=>$value)
<option value="{{$key}}" @if(session('business_user_filter_level') == $key) selected @endif>{{$value}}</option>
@endforeach
</select>
</div>
</div>
<!-- Zweite Filterzeile für erweiterte Filter -->
<div class="form-row align-items-center px-4 pb-3">
<div class="col-6 col-sm-6 col-md-3 col-lg-3 mb-1">
<select class="custom-select on_change_invoice" name="business_user_filter_next_level">
@foreach($filter_next_level as $key=>$value)
<option value="{{$key}}" @if(session('business_user_filter_next_level') == $key) selected @endif>{{$value}}</option>
@endforeach
</select>
</div>
<div class="col-6 col-sm-6 col-md-3 col-lg-3 mb-1">
<!-- Platz für weitere Filter falls nötig -->
</div>
<div class="col-6 col-sm-6 col-md-3 col-lg-3 mb-1">
<!-- Platz für weitere Filter falls nötig -->
</div>
<div class="col-6 col-sm-6 col-md-3 col-lg-3 mb-1">
<!-- Platz für weitere Filter falls nötig -->
</div>
</div>
{!! Form::close() !!}
<!-- Performance Info Banner -->
<div class="alert alert-info mx-4 mb-3">
<div class="d-flex align-items-center">
<i class="fa fa-rocket mr-2"></i>
<div>
<strong>Optimierte Version aktiv:</strong>
Diese Version nutzt optimierte Datenbankabfragen und Memory-effiziente Verarbeitung für bessere Performance bei großen Datenmengen.
<br>
<small><strong>Hinweis:</strong> Der "Nächster Level" Filter funktioniert optimal mit gespeicherten Monatsdaten. Bei Live-Berechnungen wird er aus Performance-Gründen ignoriert.</small>
</div>
</div>
</div>
<div class="card-datatable table-responsive pt-0">
<table class="datatables-style table table-striped table-bordered" id="datatable-users">
<thead>
<tr>
<th>{{__('ID') }}</th>
<th>{{__('Berater-ID') }}</th>
<th>{{ __('Level') }}</th>
<th>{{ __('KD') }}</th>
<th>{{__('Gesamte Points')}}</th>
<th>{{__('Umsatz netto')}}</th>
<th>{{__('E-Mail')}}</th>
<th>{{__('First name')}}</th>
<th>{{__('Last name')}}</th>
<th>{{__('Nächster Level')}}</th>
<th>{{__('Sponsor')}}</th>
<th>{{__('tables.account')}}</th>
<th>{{__('bis')}}</th>
</tr>
</thead>
<tbody>
</tbody>
</table>
</div>
</div>
</div>
<script>
$( document ).ready(function() {
var oTable = $('#datatable-users').DataTable({
"processing": true,
"serverSide": true,
"stateSave": false,
"searching": true,
ajax: {
url: '{!! route('admin_business_optimized_user_datatable') !!}?v={{ time() }}',
data: function(d) {
d.business_user_filter_name = $('input[name=business_user_filter_name]').val();
d.business_user_filter_month = $('select[name=business_user_filter_month]').val();
d.business_user_filter_year = $('select[name=business_user_filter_year]').val();
d.business_user_filter_active = $('select[name=business_user_filter_active]').val();
d.business_user_filter_level = $('select[name=business_user_filter_level]').val();
d.business_user_filter_next_level = $('select[name=business_user_filter_next_level]').val();
},
error: function(xhr, error, code) {
console.error('DataTable Error:', error, code);
if(xhr.responseJSON && xhr.responseJSON.error) {
alert('Fehler beim Laden der Daten: ' + xhr.responseJSON.error);
}
}
},
"order": [[1, "asc" ]],
"columns": [
{ data: 'id', name: 'id', searchable: false, orderable: true },
{ 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_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 },
{ data: 'last_name', name: 'last_name', orderable: true, searchable: true },
{ data: 'next_level_qualified', name: 'next_level_qualified', orderable: false, searchable: false },
{ data: 'sponsor', name: 'sponsor', orderable: false, searchable: false },
{ data: 'active_account', name: 'active_account', orderable: false, searchable: false },
{ data: 'payment_account_date', name: 'payment_account_date', orderable: false, searchable: false },
],
"bLengthChange": false,
"iDisplayLength": 100,
"language": {
"url": "/js/datatables-{{ \App::getLocale() }}.json"
}
});
$('select.on_change_invoice').on('change', function(){
oTable.draw();
});
$('input.on_keyup_invoice').on('keyup', function(){
oTable.draw();
});
});
</script>
@endsection

View file

@ -0,0 +1,189 @@
@extends('layouts.layout-2')
@section('content')
<div class="card">
<h5 class="card-header">
{{__('team.business')}} {{__('team.structure')}}
<span class="badge badge-success ml-2">OPTIMIERT</span>
</h5>
<div class="card-body">
{!! Form::open(['action' => route('admin_business_optimized_structure'), 'class' => 'form-horizontal', 'id'=>'form_filter_business_user']) !!}
<div class="form-row align-items-center px-0 pb-2 pt-0">
<div class="col-6 col-sm-4 col-md-4 col-lg-4 mb-1">
<select class="custom-select on_change_select_filter" name="business_user_filter_month">
@foreach($filter_months as $key=>$value)
<option value="{{$key}}" @if(session('business_user_filter_month') == $key) selected @endif>{{$value}}</option>
@endforeach
</select>
</div>
<div class="col-6 col-sm-4 col-md-4 col-lg-4 mb-1">
<select class="custom-select on_change_select_filter" name="business_user_filter_year">
@foreach($filter_years as $key=>$value)
<option value="{{$value}}" @if(session('business_user_filter_year') == $value) selected @endif>{{$value}}</option>
@endforeach
</select>
</div>
</div>
{!! Form::close() !!}
<!-- Performance Metrics Display -->
@if(isset($performance))
<div class="alert alert-success">
<div class="row">
<div class="col-md-3">
<i class="fa fa-clock mr-1"></i>
<strong>Ladezeit:</strong> {{ $performance['execution_time'] }}ms
</div>
<div class="col-md-3">
<i class="fa fa-memory mr-1"></i>
<strong>Memory:</strong> {{ $performance['memory_used'] }}
</div>
<div class="col-md-3">
<i class="fa fa-users mr-1"></i>
<strong>Users:</strong> {{ $performance['user_count'] }}
</div>
<div class="col-md-3">
<i class="fa fa-user-times mr-1"></i>
<strong>Ohne Sponsor:</strong> {{ $performance['parentless_count'] }}
</div>
</div>
</div>
@endif
<hr class="container-m-nx border-light mt-0">
<div>
<div id="nestable-menu" class="mb-4">
<button type="button" class="btn btn-default btn-sm" data-action="expand-all">{{ __('team.expand_all') }}</button>
<button type="button" class="btn btn-default btn-sm" data-action="collapse-all">{{ __('team.collapse_all') }}</button>
<!-- Zusätzliche Optimierungs-Controls -->
<div class="btn-group ml-3" role="group">
<button type="button" class="btn btn-info btn-sm" onclick="showPerformanceDetails()">
<i class="fa fa-chart-line"></i> Performance Details
</button>
<a href="{{ route('admin_business_structure') }}" class="btn btn-outline-secondary btn-sm">
<i class="fa fa-arrow-left"></i> Original Version
</a>
@if(isset($forceLiveCalculation) && $forceLiveCalculation === true)
<a href="{{ route('admin_business_optimized_structure') }}" class="btn btn-outline-warning btn-sm" title="Live-Berechnung aus">
<i class="fa fa-refresh"></i> Live berechnen aus
</a>
@else
<a href="{{ route('admin_business_optimized_structure') }}?force_live_calculation=1" class="btn btn-outline-success btn-sm" title="Live-Berechnung erzwingen">
<i class="fa fa-refresh"></i> Live berechnen
</a>
@endif
</div>
</div>
<div class="row">
<div class="col-md-12">
<div class="dd" id="nestable2">
{!! $TreeCalcBot->makeHtmlTree() !!}
</div>
</div>
</div>
@if($TreeCalcBot->isParentless())
<div class="row">
<div class="col-md-12">
<hr>
<h6 class="">
Berater ohne Sponsor
<span class="badge badge-warning">{{ count($TreeCalcBot->__get('parentless')) }}</span>
</h6>
<div class="dd" id="">
{!! $TreeCalcBot->makeParentlessHtml() !!}
</div>
</div>
</div>
@endif
</div>
</div>
</div>
<!-- Performance Details Modal -->
<div class="modal fade" id="performanceModal" tabindex="-1" role="dialog">
<div class="modal-dialog" role="document">
<div class="modal-content">
<div class="modal-header">
<h5 class="modal-title">Performance Metrics</h5>
<button type="button" class="close" data-dismiss="modal">
<span>&times;</span>
</button>
</div>
<div class="modal-body">
@if(isset($performance))
<table class="table table-sm">
<tr>
<td><strong>Ausführungszeit:</strong></td>
<td>{{ $performance['execution_time'] }}ms</td>
</tr>
<tr>
<td><strong>Memory-Verbrauch:</strong></td>
<td>{{ $performance['memory_used'] }}</td>
</tr>
<tr>
<td><strong>Anzahl Users:</strong></td>
<td>{{ $performance['user_count'] }}</td>
</tr>
<tr>
<td><strong>Parentlose Users:</strong></td>
<td>{{ $performance['parentless_count'] }}</td>
</tr>
<tr>
<td><strong>Optimierungen:</strong></td>
<td>
<span class="badge badge-success">Repository Pattern</span>
<span class="badge badge-success">Eager Loading</span>
<span class="badge badge-success">Memory Monitoring</span>
</td>
</tr>
</table>
@endif
</div>
<div class="modal-footer">
<button type="button" class="btn btn-secondary" data-dismiss="modal">Schließen</button>
</div>
</div>
</div>
</div>
<link rel="stylesheet" href="/vendor/libs/nestable/nestable.css">
<script src="/vendor/libs/nestable/jquery-nestable.js?v=1"></script>
<script>
$( document ).ready(function() {
function updateOutput(e) {
//var list = e.length ? e : $(e.target);
//var output = list.data('output');
};
$('#nestable2').nestable().on('change', updateOutput);
// output initial serialised data
//updateOutput($('#nestable2').data('output', $('#nestable2-output')));
$('#nestable-menu').on('click', function(e) {
var target = $(e.target);
var action = target.data('action');
if (action === 'expand-all') {
$('.dd').nestable('expandAll');
}
if (action === 'collapse-all') {
$('.dd').nestable('collapseAll');
}
});
});
$('.on_change_select_filter').on('change', function(){
$('#form_filter_business_user').submit();
});
function showPerformanceDetails() {
$('#performanceModal').modal('show');
}
</script>
@endsection

View file

@ -0,0 +1,62 @@
@extends('layouts.layout-2')
@section('content')
<div class="card">
<h5 class="card-header">
{{__('Business')}} {{__('Übersicht')}} Berater
<span class="badge badge-success ml-2">OPTIMIERT</span>
</h5>
{!! Form::open(['action' => route('admin_business_optimized_user_detail', [$user->id]), 'class' => 'form-horizontal', 'id'=>'']) !!}
{{ Form::hidden('user_id', $user->id ) }}
{{ Form::hidden('month', $TreeCalcBot->__get('date')->month) }}
{{ Form::hidden('year', $TreeCalcBot->__get('date')->year) }}
<div class="media align-items-center pt-3 mb-0">
{{-- <img src="assets/img/avatars/5-small.png" alt="" class="d-block ui-w-100 rounded-circle">--}}
<div class="media-body ml-4">
<h4 class="font-weight-bold mb-0">
{{ $user->account->first_name }} {{ $user->account->last_name }}
<a class="font-weight-normal" href="mailto:{{ $user->email }}">{{ $user->email }}</a>
{{-- <button type="submit" class="btn btn-submit btn-secondary btn-sm float-right mr-4">{{ __('save') }}</button>&nbsp; --}}
</h4>
<!-- Performance Info -->
@if(isset($data['performance']))
<div class="mt-2">
<small class="text-muted">
<i class="fa fa-rocket mr-1"></i>
Optimierte Version - Ladezeit: {{ $data['performance']['execution_time'] }}ms
</small>
</div>
@endif
</div>
</div>
{!! Form::close() !!}
<div class="card-body">
<!-- Navigation zwischen Original und Optimiert -->
<div class="alert alert-info">
<div class="d-flex justify-content-between align-items-center">
<div>
<i class="fa fa-info-circle mr-2"></i>
<strong>Optimierte User-Detail-Ansicht:</strong>
Verbesserte Performance durch optimierte Datenbankabfragen und Memory-Management.
</div>
<a href="{{ route('admin_business_user_detail', [$user->id]) }}" class="btn btn-outline-secondary btn-sm">
<i class="fa fa-arrow-left"></i> Original Version
</a>
</div>
</div>
@include('admin.business_optimized._user_detail_in')
</div>
</div>
<script>
$( document ).ready(function() {
});
</script>
@endsection

View file

@ -20,7 +20,7 @@
{{ __('Create/Edit Kategorien') }}
</h4>
{!! Form::open(['url' => route('admin_product_category_store'), 'class' => 'form-horizontal', 'id'=>'']) !!}
{!! Form::open(['action' => route('admin_product_category_store'), 'class' => 'form-horizontal', 'id'=>'']) !!}
<input type="hidden" name="id" id="id" value="@if($category->id>0){{$category->id}}@else new @endif">
<input type="hidden" name="action" value="save-form">

View file

@ -14,7 +14,7 @@
</div>
</div>
{!! Form::open(['url' => route('admin_lead_change_mail', [$user->id]) ]) !!}
{!! Form::open(['action' => route('admin_lead_change_mail', [$user->id]) ]) !!}
<div class="form-group row">
<label class="col-form-label col-sm-2 text-sm-right">{{__('New E-Mail Address')}}*</label>

View file

@ -20,7 +20,7 @@
{{ __('Create/Edit Land') }}
</h4>
{!! Form::open(['url' => route('admin_country_store'), 'class' => 'form-horizontal', 'id'=>'']) !!}
{!! Form::open(['action' => route('admin_country_store'), 'class' => 'form-horizontal', 'id'=>'']) !!}
<input type="hidden" name="id" id="id" value="@if($country->id>0){{$country->id}}@else new @endif">

View file

@ -243,8 +243,9 @@
</thead>
<tbody>
@php($count=0)
@if($shopping_user->shopping_order)
@if(isset($shopping_user->shopping_order) && $shopping_user->shopping_order)
@foreach($shopping_user->shopping_order->shopping_payments as $shopping_payment)
@if(isset($shopping_payment) && $shopping_payment)
<tr>
<th scope="row">{{++$count}}</th>
<td>{{$shopping_payment->getPaymentType()}}</td>
@ -281,8 +282,9 @@
</td>
</tr>
@endif
@endif
@endforeach
@endif
@endif
</tbody>
</table>
</div>

View file

@ -5,7 +5,7 @@
<a href="{{route('admin_customer_detail', [$shopping_user->id])}}" class="btn btn-sm btn-default float-right">{{ __('back') }}</a>
{{ __('customer.customer_details') }} {{ __('customer.edit') }}
</h4>
{!! Form::open(['url' => route('admin_customer_edit', [$shopping_user->id]), 'class' => 'form-horizontal', 'id'=>'lead-form-validation']) !!}
{!! Form::open(['action' => route('admin_customer_edit', [$shopping_user->id]), 'class' => 'form-horizontal', 'id'=>'lead-form-validation']) !!}
@include('admin.customer._edit')
<div class="text-left mt-3">
<button type="submit" class="btn btn-secondary" name="action" value="shopping-user-store">{{ __('save changes') }}</button>&nbsp;

View file

@ -91,7 +91,7 @@
<div class="card mb-4">
<h5 class="card-header">Tags</h5>
<div class="card-body">
{!! Form::open(['url' => route('admin_downloadcenter_file', ['file_tags_update', $file->id]), 'class' => 'form-horizontal']) !!}
{!! Form::open(['action' => route('admin_downloadcenter_file', ['file_tags_update', $file->id]), 'class' => 'form-horizontal']) !!}
<button type="submit" class="btn btn-submit btn-primary mb-4">{{ __('save') }}</button>&nbsp;
<div class="custom-dd dd" id="nestable_list_check" data-href-save="{{ url('/admin/tags/update')}}">
<ol class="dd-list">

View file

@ -12,7 +12,7 @@
<div class="card-body">
{!! Form::open([ 'url' => route('admin_downloadcenter_upload'), 'method' => 'post', 'files' => true, 'enctype' => 'multipart/form-data', 'class' => 'dropzone', 'id' => 'realDropzone' ]) !!}
{!! Form::open([ 'action' => route('admin_downloadcenter_upload'), 'method' => 'post', 'files' => true, 'enctype' => 'multipart/form-data', 'class' => 'dropzone', 'id' => 'realDropzone' ]) !!}
<div class="fallback">
<input name="file" type="file" multiple>
</div>

View file

@ -80,7 +80,7 @@
<div class="col-md-4">
<div class="card mb-4">
<div class="card-body">
{!! Form::open(['url' => route('admin_downloadcenter_item_store', ['category']), 'class' => 'form-horizontal']) !!}
{!! Form::open(['action' => route('admin_downloadcenter_item_store', ['category']), 'class' => 'form-horizontal']) !!}
<label class="form-label" for="dc_category_name">Neue Katagorie anlegen</label>
{{ Form::text('dc_category_name', '', array('placeholder'=>'Bezeichung Katagorie', 'class'=>'form-control', 'id'=>'dc_category_name')) }}
<button type="submit" class="btn btn-submit mt-4">{{ __('save') }}</button>&nbsp;
@ -88,7 +88,7 @@
<br>
<hr>
<br>
{!! Form::open(['url' => route('admin_downloadcenter_item_store', ['tag']), 'class' => 'form-horizontal']) !!}
{!! Form::open(['action' => route('admin_downloadcenter_item_store', ['tag']), 'class' => 'form-horizontal']) !!}
<label class="form-label" for="dc_tag_name">Neuen Tag anlegen</label>
{{ Form::text('dc_tag_name', '', array('placeholder'=>'Bezeichung Tag', 'class'=>'form-control', 'id'=>'dc_tag_name')) }}
<button type="submit" class="btn btn-submit mt-4">{{ __('save') }}</button>&nbsp;

View file

@ -20,7 +20,7 @@
{{ __('Create/Edit Inhaltsstoff') }}
</h4>
{!! Form::open(['url' => route('admin_product_ingredient_store'), 'class' => 'form-horizontal', 'id'=>'']) !!}
{!! Form::open(['action' => route('admin_product_ingredient_store'), 'class' => 'form-horizontal', 'id'=>'']) !!}
<input type="hidden" name="id" id="id" value="@if($model->id>0){{$model->id}}@else new @endif">

View file

@ -24,7 +24,7 @@
@endif
</h4>
{!! Form::open(['url' => route('admin_lead_store')."?show=".$show, 'class' => 'form-horizontal', 'id'=>'lead-form-validation']) !!}
{!! Form::open(['action' => route('admin_lead_store')."?show=".$show, 'class' => 'form-horizontal', 'id'=>'lead-form-validation']) !!}
<div class="text-left mt-0 mb-2">
<button type="submit" class="btn btn-submit btn-primary">{{ __('save') }}</button>&nbsp;
@ -52,7 +52,7 @@
<!-- Modal template -->
<div class="modal fade" id="modal-user-vat-validation">
<div class="modal-dialog">
{!! Form::open(['url' => route('admin_lead_store'), 'class' => 'modal-content']) !!}
{!! Form::open(['action' => route('admin_lead_store'), 'class' => 'modal-content']) !!}
<input type="hidden" name="user_id" id="user_id" value="@if($user->id>0){{$user->id}}@else new @endif">
<div class="modal-header">

View file

@ -10,7 +10,7 @@
<div class="card">
<div class="card-body p-0">
{!! Form::open(['url' => route('admin_leads'), 'class' => 'form-horizontal', 'id'=>'form_admin_leads']) !!}
{!! Form::open(['action' => route('admin_leads'), 'class' => 'form-horizontal', 'id'=>'form_admin_leads']) !!}
<div class="form-row align-items-center px-4 pb-2 pt-3">
<div class="col-12 col-sm-4 col-md-4 col-lg-4 mb-1">

View file

@ -86,6 +86,9 @@
"bLengthChange": false,
"iDisplayLength": 50,
"order": [[ 1, "asc" ]],
"columnDefs": [
{ "type": "num", "targets": 1 }
],
"language": {
"url": "/js/datatables-{{ \App::getLocale() }}.json"
}

View file

@ -10,7 +10,11 @@
</div>
<div class="modal-body modal-body-overflow">
@if(isset($TreeCalcBot))
@include('admin.business._user_detail_in')
@if($data['optimized'])
@include('admin.business_optimized._user_detail_in')
@else
@include('admin.business._user_detail_in')
@endif
@endif
</div>
<div class="modal-footer">

View file

@ -1,4 +1,4 @@
{!! Form::open(['url' => $route, 'class' => 'modal-content', 'enctype' => 'multipart/form-data']) !!}
{!! Form::open(['action' => $route, 'class' => 'modal-content', 'enctype' => 'multipart/form-data']) !!}
<div class="modal-header">
<h5 class="modal-title">
{{ __('Points / Umsatz') }}

View file

@ -1,4 +1,4 @@
{!! Form::open(['url' => route('admin_sales_customers_detail', [$current->id]), 'class' => 'modal-content', 'enctype' => 'multipart/form-data']) !!}
{!! Form::open(['action' => route('admin_sales_customers_detail', [$current->id]), 'class' => 'modal-content', 'enctype' => 'multipart/form-data']) !!}
<input type="hidden" name="action" value="{{$data['action']}}">
<input type="hidden" name="id" value="{{$data['id']}}">

View file

@ -1,4 +1,4 @@
{!! Form::open(['url' => $route, 'class' => 'modal-content', 'enctype' => 'multipart/form-data']) !!}
{!! Form::open(['action' => $route, 'class' => 'modal-content', 'enctype' => 'multipart/form-data']) !!}
<div class="modal-header">
<h5 class="modal-title">
{{ __('Berater') }}

View file

@ -1,4 +1,4 @@
{!! Form::open(['url' => $route, 'class' => 'modal-content', 'enctype' => 'multipart/form-data']) !!}
{!! Form::open(['action' => $route, 'class' => 'modal-content', 'enctype' => 'multipart/form-data']) !!}
<div class="modal-header">
<h5 class="modal-title">
{{ __('Berater') }} Karriere-Level

View file

@ -94,7 +94,7 @@
Gutschriften / Auszahlungen
</h5>
<div class="card-body p-0">
{!! Form::open(['url' => route('admin_payments_credit'), 'class' => 'form-horizontal', 'id'=>'form_filter_payment_credits']) !!}
{!! Form::open(['action' => route('admin_payments_credit'), 'class' => 'form-horizontal', 'id'=>'form_filter_payment_credits']) !!}
<div class="form-row align-items-center px-4 pb-2 pt-3">
<div class="col-12 col-sm-4 col-md-4 col-lg-4 mb-1">

View file

@ -6,7 +6,7 @@
Finanzen / Rechnungen
</h5>
<div class="card-body p-0">
{!! Form::open(['url' => route('admin_payments_invoice'), 'class' => 'form-horizontal', 'id'=>'form_filter_payment_invoices']) !!}
{!! Form::open(['action' => route('admin_payments_invoice'), 'class' => 'form-horizontal', 'id'=>'form_filter_payment_invoices']) !!}
<div class="form-row align-items-center px-4 pb-2 pt-3">
<div class="col-12 col-sm-4 col-md-4 col-lg-4 mb-1">

View file

@ -1,4 +1,4 @@
{!! Form::open(['url' => route('admin_payments_credit'), 'class' => 'modal-content form-prevent-multiple-submits', 'enctype' => 'multipart/form-data']) !!}
{!! Form::open(['action' => route('admin_payments_credit'), 'class' => 'modal-content form-prevent-multiple-submits', 'enctype' => 'multipart/form-data']) !!}
<div class="modal-header">
<h5 class="modal-title">
{{ __('Gutschrift') }}

View file

@ -1,4 +1,4 @@
{!! Form::open(['url' => route('admin_payments_credit_create'), 'class' => 'modal-content', 'enctype' => 'multipart/form-data']) !!}
{!! Form::open(['action' => route('admin_payments_credit_create'), 'class' => 'modal-content', 'enctype' => 'multipart/form-data']) !!}
<style>
.unselectable {
-moz-user-select: none;

View file

@ -21,7 +21,7 @@
{{ __('navigation.sales_volumes') }} {{ __('navigation.products') }} (nach Rechnungen)
</h5>
<div class="card-body">
{!! Form::open(['url' => route('admin_payments_sales_volumes_download'), 'class' => '']) !!}
{!! Form::open(['action' => route('admin_payments_sales_volumes_download'), 'class' => '']) !!}
{!! Form::hidden('key', 'value') !!}
<button type="submit" name="action" value="export" class="btn btn-sm btn-primary mb-2"><i class="ion ion-md-download"></i> &nbsp;Export kompakte Liste als xls</button>

View file

@ -26,7 +26,7 @@
</ul>
</div>
<div class="card-body">
{!! Form::open(['url' => route('admin_payments_taxadvisor_download'), 'class' => '']) !!}
{!! Form::open(['action' => route('admin_payments_taxadvisor_download'), 'class' => '']) !!}
{!! Form::hidden('key', 'value') !!}
<button type="submit" name="action" value="export" class="btn btn-md btn-primary mb-2"><i class="ion ion-md-download"></i> &nbsp;Export als xls</button>
<hr>

View file

@ -20,7 +20,7 @@
{{ __('Create/Edit Produkt') }}
</h4>
{!! Form::open(['url' => route('admin_product_store'), 'class' => 'form-horizontal', 'id'=>'']) !!}
{!! Form::open(['action' => route('admin_product_store'), 'class' => 'form-horizontal', 'id'=>'']) !!}
<input type="hidden" name="id" id="id" value="@if($product->id>0){{$product->id}}@else new @endif">
<div class="text-left mt-0 mb-2">

View file

@ -36,13 +36,7 @@
{!! HTMLHelper::getCategoriesOptions($product->categories()->pluck('category_id')->toArray(), false) !!}
</select>
</div>
{{--
<div class="form-group col-sm-5">
<label class="form-label" for="show_at">{{ __('Produkt anzeigen') }} alt</label>
{{ Form::select('show_at', $product->showATs, $product->show_at, array('data-live-search'=>'false', 'class'=>'selectpicker', 'id'=>'show_at') ) }}
</div>
--}}
<div class="form-group col-sm-2">
<label class="form-label" for="pos">{{ __('Listenposition') }}</label>
{{ Form::text('pos', $product->pos, array('placeholder'=>__('1, 2, 3, etc'), 'class'=>'form-control', 'id'=>'pos')) }}

View file

@ -0,0 +1,153 @@
@extends('layouts.layout-2')
@section('content')
@if ($errors->any())
<div class="row">
<div class="col-sm-12">
<div class="alert alert-danger">
<ul>
@foreach ($errors->all() as $error)
<li>{{ $error }}</li>
@endforeach
</ul>
</div>
</div>
</div>
@endif
<div class="card">
<h5 class="card-header">
Umsatz- und Gutschriftenbericht
</h5>
<div class="card-body">
{!! Form::open(['action' => route('admin_revenue_export'), 'class' => '']) !!}
<div class="form-row align-items-center px-0 pb-2 pt-0">
<div class="col-6 col-sm-3 col-md-3 col-lg-3 mb-1">
<select class="custom-select on_change_select_filter" name="revenue_filter_year">
@foreach($filter_years as $key=>$value)
<option value="{{$value}}" @if(session('revenue_filter_year') == $value) selected @endif>{{$value}}</option>
@endforeach
</select>
</div>
<div class="col-6 col-sm-3 col-md-3 col-lg-3 mb-1">
{{--
<select class="custom-select on_change_select_filter" name="revenue_filter_month">
@foreach($filter_months as $key=>$value)
<option value="{{$key}}" @if(session('revenue_filter_month') == $key) selected @endif>{{$value}}</option>
@endforeach
</select>
--}}
</div>
<div class="col-6 col-sm-3 col-md-3 col-lg-3 mb-1">
{{-- <select class="custom-select on_change_select_filter" name="revenue_filter_type">
<option value="year" @if(session('revenue_filter_type') == 'year') selected @endif>Ganzes Jahr</option>
<option value="month" @if(session('revenue_filter_type') == 'month') selected @endif>Einzelner Monat</option>
</select>
--}}
</div>
<div class="col-6 col-sm-3 col-md-3 col-lg-3 mb-1">
<button type="submit" class="btn btn-primary btn-block">
<i class="ion ion-md-download"></i> Export Excel
</button>
</div>
</div>
{!! Form::close() !!}
<hr>
<!-- Umsätze Section -->
<div class="row">
<div class="col-md-6">
<div class="card">
<div class="card-header">
<h6 class="mb-0">Umsätze {{ session('revenue_filter_year') }}</h6>
</div>
<div class="card-body">
@if(isset($revenue_summary['yearly']) && $revenue_summary['yearly']->count() > 0)
@foreach($revenue_summary['yearly'] as $item)
<div class="row mb-2">
<div class="col-4"><strong>{{ $item->period_label }}</strong></div>
<div class="col-8">
<small class="text-muted">Netto:</small> {{ number_format($item->total_net, 2, ',', '.') }} <br>
<small class="text-muted">Steuer:</small> {{ number_format($item->total_tax, 2, ',', '.') }} <br>
<strong>Brutto: {{ number_format($item->total_gross, 2, ',', '.') }} </strong>
</div>
</div>
@endforeach
@else
<p class="text-muted">Keine Umsätze für {{ session('revenue_filter_year') }} gefunden</p>
@endif
<hr>
<h6>Monatliche Aufschlüsselung</h6>
@if(isset($revenue_summary['monthly']) && $revenue_summary['monthly']->count() > 0)
@foreach($revenue_summary['monthly'] as $item)
<div class="row mb-1">
<div class="col-4">{{ $item->period_label }}</div>
<div class="col-8">
<small>{{ number_format($item->total_net, 2, ',', '.') }} / {{ number_format($item->total_tax, 2, ',', '.') }} / <strong>{{ number_format($item->total_gross, 2, ',', '.') }} </strong></small>
</div>
</div>
@endforeach
@else
<p class="text-muted">Keine monatlichen Umsätze gefunden</p>
@endif
</div>
</div>
</div>
<!-- Gutschriften Section -->
<div class="col-md-6">
<div class="card">
<div class="card-header">
<h6 class="mb-0">Gutschriften {{ session('revenue_filter_year') }}</h6>
</div>
<div class="card-body">
@if(isset($credit_summary['yearly']) && $credit_summary['yearly']->count() > 0)
@foreach($credit_summary['yearly'] as $item)
<div class="row mb-2">
<div class="col-4"><strong>{{ $item->period_label }}</strong></div>
<div class="col-8">
<small class="text-muted">Netto:</small> {{ number_format($item->total_net, 2, ',', '.') }} <br>
<small class="text-muted">Steuer:</small> {{ number_format($item->total_tax, 2, ',', '.') }} <br>
<strong>Brutto: {{ number_format($item->total_gross, 2, ',', '.') }} </strong>
</div>
</div>
@endforeach
@else
<p class="text-muted">Keine Gutschriften für {{ session('revenue_filter_year') }} gefunden</p>
@endif
<hr>
<h6>Monatliche Aufschlüsselung</h6>
@if(isset($credit_summary['monthly']) && $credit_summary['monthly']->count() > 0)
@foreach($credit_summary['monthly'] as $item)
<div class="row mb-1">
<div class="col-4">{{ $item->period_label }}</div>
<div class="col-8">
<small>{{ number_format($item->total_net, 2, ',', '.') }} / {{ number_format($item->total_tax, 2, ',', '.') }} / <strong>{{ number_format($item->total_gross, 2, ',', '.') }} </strong></small>
</div>
</div>
@endforeach
@else
<p class="text-muted">Keine monatlichen Gutschriften gefunden</p>
@endif
</div>
</div>
</div>
</div>
</div>
</div>
<script>
$( document ).ready(function() {
$('select.on_change_select_filter').on('change', function(){
window.location.href = window.location.pathname + '?' +
'revenue_filter_year=' + $('select[name=revenue_filter_year]').val() +
'&revenue_filter_month=' + $('select[name=revenue_filter_month]').val() +
'&revenue_filter_type=' + $('select[name=revenue_filter_type]').val();
});
});
</script>
@endsection

View file

@ -179,8 +179,10 @@
<a href="{{ $shopping_order->user_shop->getSubdomain(false) }}" class="badge badge-success"
target="_blank">{{ $shopping_order->user_shop->getSubdomain(false) }}</a>
@else
<span class="badge badge-danger"
target="_blank">{{ $shopping_order->user_shop->getSubdomain(false) }}</span>
@if ($shopping_order->user_shop)
<span class="badge badge-danger"
target="_blank">{{ $shopping_order->user_shop->getSubdomain(false) }}</span>
@endif
@endif
</div>
</div>
@ -445,7 +447,9 @@
</thead>
<tbody>
@php($count = 0)
@if(isset($shopping_order->shopping_payments) && $shopping_order->shopping_payments)
@foreach ($shopping_order->shopping_payments as $shopping_payment)
@if(isset($shopping_payment) && $shopping_payment)
<tr>
<th scope="row">{{ ++$count }}</th>
<td>{{ $shopping_payment->getPaymentType() }}</td>
@ -499,7 +503,9 @@
</td>
</tr>
@endif
@endif
@endforeach
@endif
</tbody>
</table>
</div>
@ -547,8 +553,7 @@
<div class="modal fade" id="modals-invoice">
<div class="modal-dialog">
<form class="modal-content form-prevent-multiple-submits" action="{{ route('admin_sales_invoice') }}"
method="post">
<form class="modal-content form-prevent-multiple-submits" action="{{ route('admin_sales_invoice') }}" method="post">
@csrf
<input type="hidden" name="id" value="{{ $shopping_order->id }}">
<input type="hidden" name="action" value="create_invoice">

View file

@ -4,8 +4,8 @@
<h4 class="font-weight-bold py-2 mb-2">
{{ __('Einstellungen') }}
</h4>
{!! Form::open(['url' => route('admin_setting_store'), 'class' => 'form-horizontal']) !!}
{!! Form::open(['action' => route('admin_setting_store'), 'method' => 'POST', 'class' => 'form-horizontal']) !!}
<div class="card mb-2">
<div class="card-body">

View file

@ -25,7 +25,7 @@
</div>
<div class="card mb-2">
{!! Form::open(['url' => route('admin_shipping_store'), 'class' => 'form-horizontal', 'id'=>'']) !!}
{!! Form::open(['action' => route('admin_shipping_store'), 'class' => 'form-horizontal', 'id'=>'']) !!}
<input type="hidden" name="id" value="@if($value->id>0){{$value->id}}@else new @endif">
<h5 class="card-header">
{{ __('order.shipping_costs') }}
@ -201,24 +201,30 @@
<div class="card-datatable table-responsive">
<table class="datatables-style table table-striped table-bordered">
<tbody>
@if(isset($value->countries))
@foreach($value->countries as $country)
<tr>
<td>
{{ $country->country->de }}
</td>
<td>
@if(!$country->shopping_orders->count())
<a class="text-danger" href="{{ route('admin_shipping_country_delete', [$country->id]) }}" onclick="return confirm('{{__('Really delete entry?')}}');"><i class="fa fa-trash-alt"></i></a>
@if(isset($country->country))
{{ $country->country->de }}
@else
-
@endif
</td>
<td>
@if(!$country->hasShoppingOrders())
<a class="text-danger" href="{{ route('admin_shipping_country_delete', [$country->id]) }}" onclick="return confirm('{{__('Really delete entry?')}}');">
<i class="fa fa-trash-alt"></i></a>
@else
-
@endif
</td>
</tr>
@endforeach
@endif
</tbody>
</table>
@if(!$value->countries->count())
@if(!$value->countries || !$value->countries->count())
<div class="mt-4 ml-4">
<button type="button" class="btn btn-sm btn-primary" data-toggle="modal" data-target="#modals-country"
data-id="new"

View file

@ -20,7 +20,7 @@
{{ __('Edit Startseite') }}
</h4>
{!! Form::open(['url' => route('admin_sites_store', [$site]), 'class' => 'form-horizontal', 'id'=>'']) !!}
{!! Form::open(['action' => route('admin_sites_store', [$site]), 'class' => 'form-horizontal', 'id'=>'']) !!}
<div class="text-left mt-0 mb-2">
<button type="submit" class="btn btn-submit btn-primary">{{ __('save') }}</button>&nbsp;

View file

@ -20,7 +20,7 @@
{{ __('Create/Edit Contact') }}
</h4>
{!! Form::open(['url' => route('admin_user_store'), 'class' => 'form-horizontal', 'id'=>'lead-form-validation']) !!}
{!! Form::open(['action' => route('admin_user_store'), 'class' => 'form-horizontal', 'id'=>'lead-form-validation']) !!}
<input type="hidden" name="user_id" id="user_id" value="@if($user->id>0){{$user->id}}@else new @endif">
{{-- @include('user.form') --}}

View file

@ -227,10 +227,10 @@
<!-- Modal delete -->
<div class="modal fade" id="modals-user-delete">
<div class="modal-dialog">
<form class="modal-content" action="{{ route('admin_user_store') }}" method="post">
<form class="modal-content" action="{{ route('admin_user_delete') }}" method="post">
@csrf
<input type="hidden" class="form-control" name="id">
<div class="modal-header">
<h5 class="modal-title">{{__('User')}} <span class="font-weight-light">{{__('löschen')}}</span></h5>
<button type="button" class="close" data-dismiss="modal" aria-label="Close">×</button>
@ -243,12 +243,23 @@
</div>
</div>
<div class="form-group">
<p>User die Einkäufe getätigt haben, oder Kunden haben, sollte nicht gelöscht werden, es kann zu Systemfehler führen.</p>
<hr>
<h5>User löschen</h5>
<p>Dieser User wird gelöscht, alle Daten werden auf den übergeordneten Berater übertragen, jedoch sind die Grunddaten als Admin hier noch einsehbar.</p>
<label class="custom-control custom-checkbox m-0">
<input type="checkbox" class="custom-control-input" name="realy_delete_user">
<span class="custom-control-label">User wirklich löschen?</span>
</label>
</div>
<div class="form-group">
<hr>
<h5>User komplett ohne Wiederherstellung löschen</h5>
<p>Dieser User wird gelöscht, hier wird keine Wiederherstellung möglich sein.</p>
<label class="custom-control custom-checkbox m-0">
<input type="checkbox" class="custom-control-input" name="realy_delete_user_complete">
<span class="custom-control-label">User komplett ohne Wiederherstellung löschen?</span>
</label>
</div>
</div>
<div class="modal-footer">
<button type="button" class="btn btn-default" data-dismiss="modal">{{__('close')}}</button>