23-01-2026
This commit is contained in:
parent
a67740d6ef
commit
7325edebbd
245 changed files with 29211 additions and 4796 deletions
|
|
@ -1,15 +1,31 @@
|
|||
@php
|
||||
$selectedMonth = request()->get('points_month', date('n'));
|
||||
$selectedYear = request()->get('points_year', date('Y'));
|
||||
@endphp
|
||||
<div class="d-flex col-xl-12 align-items-stretch">
|
||||
<div class="card w-100 mb-4">
|
||||
<h5 class="card-header with-elements">
|
||||
<div class="card-header-title">{{__('home.current_points_for') }} {{ HTMLHelper::getMonth(date('n')) }} {{ date('Y') }} </div>
|
||||
<h5 class="card-header with-elements d-flex justify-content-between align-items-center flex-wrap">
|
||||
<div class="card-header-title">{{__('home.current_points_for') }} {{ HTMLHelper::getMonth($selectedMonth) }} {{ $selectedYear }} </div>
|
||||
<div class="d-flex align-items-center mt-2 mt-md-0">
|
||||
<select id="points-month-filter" class="form-control custom-select form-control-sm mr-2" style="width: auto;">
|
||||
@foreach(HTMLHelper::getTransMonths() as $monthNum => $monthName)
|
||||
<option value="{{ $monthNum }}" {{ $selectedMonth == $monthNum ? 'selected' : '' }}>{{ $monthName }}</option>
|
||||
@endforeach
|
||||
</select>
|
||||
<select id="points-year-filter" class="form-control custom-select form-control-sm" style="width: auto;">
|
||||
@foreach(HTMLHelper::getYearRange() as $year)
|
||||
<option value="{{ $year }}" {{ $selectedYear == $year ? 'selected' : '' }}>{{ $year }}</option>
|
||||
@endforeach
|
||||
</select>
|
||||
</div>
|
||||
</h5>
|
||||
<div class="card-body">
|
||||
@if($user->isActiveAccount())
|
||||
<h6>
|
||||
@php($userSalesVolume = $user->getUserSalesVolume(date('n'), date('Y'), 'first'))
|
||||
@php($userSalesVolume = $user->getUserSalesVolume($selectedMonth, $selectedYear, 'first'))
|
||||
@if($userSalesVolume)
|
||||
<div class="mb-2">
|
||||
<strong>{{ __('team.total_points') }}: {{ $userSalesVolume->getPointsKPSum() }}</strong> | {{ __('team.own') }}: {{ $userSalesVolume->month_points }} | {{ __('team.shop') }}: {{ $userSalesVolume->month_shop_points }}<br>
|
||||
<strong>{{ __('team.total_points') }}: {{ formatNumber($userSalesVolume->getPointsKPSum()) }}</strong> | {{ __('team.own') }}: {{ $userSalesVolume->getFormattedMonthKPPoints() }} | {{ __('team.shop') }}: {{ $userSalesVolume->getFormattedMonthShopPoints() }}<br>
|
||||
</div>
|
||||
<div>
|
||||
<strong>{{ __('team.total_turnover') }}: {{ formatNumber($userSalesVolume->getTotalNetSum()) }} €</strong> | {{ __('team.own') }}: {{ formatNumber($userSalesVolume->month_total_net) }} € | {{ __('team.shop') }}: {{ formatNumber($userSalesVolume->month_shop_total_net) }} €
|
||||
|
|
@ -25,12 +41,13 @@
|
|||
<th>{{__('tables.net_sales')}}</th>
|
||||
<th>{{__('tables.type')}}</th>
|
||||
<th>{{__('tables.order')}}</th>
|
||||
<th>{{__('tables.member')}}</th>
|
||||
<th>{{__('tables.info') }}</th>
|
||||
<th>{{__('tables.note') }}</th>
|
||||
</tr>
|
||||
</thead>
|
||||
<tbody>
|
||||
@php($userSalesVolumes = $user->getUserSalesVolume(date('n'), date('Y')))
|
||||
@php($userSalesVolumes = $user->getUserSalesVolume($selectedMonth, $selectedYear, 'get', ['shopping_order.shopping_user']))
|
||||
@if($userSalesVolumes)
|
||||
@foreach ($userSalesVolumes as $userSalesVolume)
|
||||
<tr>
|
||||
|
|
@ -38,7 +55,7 @@
|
|||
{{ $userSalesVolume->date }}
|
||||
</td>
|
||||
<td class="text-left font-weight-semibold">
|
||||
{{ $userSalesVolume->points }}
|
||||
{{ $userSalesVolume->getFormattedPoints() }}
|
||||
</td>
|
||||
<td class="text-left font-weight-semibold">
|
||||
{{ formatNumber($userSalesVolume->total_net) }} €
|
||||
|
|
@ -56,6 +73,13 @@
|
|||
@endif
|
||||
@endif
|
||||
</td>
|
||||
<td class="text-left font-weight-semibold">
|
||||
@if($userSalesVolume->shopping_order && $userSalesVolume->shopping_order->shopping_user)
|
||||
|
||||
<span class="no-line-break"> {{ $userSalesVolume->shopping_order->shopping_user->billing_firstname }} {{ $userSalesVolume->shopping_order->shopping_user->billing_lastname }}<br>
|
||||
<small>{{ $userSalesVolume->shopping_order->shopping_user->billing_email }}</small></span>
|
||||
@endif
|
||||
</td>
|
||||
<td class="text-left font-weight-semibold">
|
||||
<span class="no-line-break"> {{ $userSalesVolume->message }}</span>
|
||||
</td>
|
||||
|
|
@ -93,5 +117,19 @@
|
|||
"url": "/js/datatables-{{ \App::getLocale() }}.json"
|
||||
}
|
||||
});
|
||||
|
||||
// Filter für Monat/Jahr
|
||||
function updatePointsFilter() {
|
||||
var month = $('#points-month-filter').val();
|
||||
var year = $('#points-year-filter').val();
|
||||
var url = new URL(window.location.href);
|
||||
url.searchParams.set('points_month', month);
|
||||
url.searchParams.set('points_year', year);
|
||||
window.location.href = url.toString();
|
||||
}
|
||||
|
||||
$('#points-month-filter, #points-year-filter').on('change', function() {
|
||||
updatePointsFilter();
|
||||
});
|
||||
});
|
||||
</script>
|
||||
Loading…
Add table
Add a link
Reference in a new issue