@extends('layouts.layout-2') @section('content') @php $totals = $statistics['totals']; $selectedMonthName = $filterMonths[(int) $selectedMonth] ?? $selectedMonth; $fmt = fn($value) => \App\Services\Util::formatNumber($value); $kpiCards = [ [ 'label' => 'Eigenpunkte', 'value' => $totals['own_points'], 'icon' => 'ion-md-person', 'color' => 'success', 'highlight' => true, ], [ 'label' => 'Shop-Punkte', 'value' => $totals['shop_points'], 'icon' => 'ion-md-cart', 'color' => 'primary', 'highlight' => false, ], [ 'label' => 'Abo-Punkte', 'value' => $totals['abo_points'], 'icon' => 'ion-md-repeat', 'color' => 'info', 'highlight' => false, ], [ 'label' => 'Gesamtpunkte', 'value' => $totals['total_points'], 'icon' => 'ion-md-stats', 'color' => 'success', 'highlight' => true, ], ]; @endphp

{{ __('navigation.my_statistics') }} VIP

{{ __('navigation.my_statistics') }} — {{ $selectedMonthName }} {{ $selectedYear }}

Nachvollziehbare Auflistung deiner Punkte und Umsätze des Monats, getrennt nach eigenen Bestellungen, Shop-Bestellungen und Abos.

@foreach ($kpiCards as $card)
{{ $card['label'] }}
{{ $fmt($card['value']) }}
@endforeach
Gesamtpunkte: {{ $fmt($totals['total_points']) }} Umsatz (netto): {{ $fmt($totals['turnover_net']) }} €

{{ __('abo.points_order_legend') }}

@foreach ($statistics['groups'] as $group) @if ($group['rows'] !== [])
{{ $group['label'] }}
{{ count($group['rows']) }} Einträge · {{ $fmt($group['points']) }} Punkte · {{ $fmt($group['net']) }} €
@if (in_array($group['key'], ['shop', 'abo'], true)) @endif @foreach ($group['rows'] as $row) @if (in_array($group['key'], ['shop', 'abo'], true)) @endif @endforeach
Datum Punkte Netto Typ BestellungKundeInfo
{{ $row['date'] }} {{ $fmt($row['points']) }} {{ $fmt($row['total_net']) }} € {{ $row['status_label'] }} @if ($row['order_id'] && $row['order_type'] === 'own') {{ $row['order_id'] }}{{ ($row['is_abo'] ?? false) ? ' '.__('abo.abo_order_short') : '' }} @elseif ($row['order_id'] && $row['order_type'] === 'shop') {{ $row['order_id'] }}{{ ($row['is_abo'] ?? false) ? ' '.__('abo.abo_order_short') : '' }} @else — @endif @if ($row['customer_name']) {{ $row['customer_name'] }}
{{ $row['customer_email'] }}
@else — @endif
{{ $row['info'] ?: $row['message'] }}
Summe {{ $fmt($group['points']) }} {{ $fmt($group['net']) }} €
@endif @endforeach @php $hasRows = collect($statistics['groups'])->contains(fn($group) => $group['rows'] !== []); @endphp @unless ($hasRows)

{{ __('tables.no_data_available') }}

@endunless @endsection