@extends('layouts.layout-2') @section('content')

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

{{ __('navigation.statistics') }} / Backoffice MVP

Linienbasierte Übersicht für alle vorhandenen Team-Linien. Klickbare Zahlen führen direkt in die passenden Namen- und Detaillisten.

@if (! empty($performance))
Datenquelle: {{ $performance['source_label'] }} Berechnet in {{ number_format($performance['duration_ms'], 2, ',', '.') }} ms @if (! empty($performance['calculated_at'])) Snapshot vom {{ $performance['calculated_at'] }} @endif
@endif
CSV
@php $clickableMetrics = [ 'consultants', 'new_partners', 'team_partner_abos', 'team_customer_abos', 'own_points', 'external_points', 'customer_abo_points', 'customer_single_order_points', 'customer_other_points', 'total_points', 'shop_1000', ]; $formatValue = function ($value, string $metric): string { if ( in_array( $metric, [ 'own_points', 'external_points', 'customer_abo_points', 'customer_single_order_points', 'customer_other_points', 'total_points', ], true, ) ) { return \App\Services\Util::formatNumber($value); } return number_format((float) $value, 0, ',', '.'); }; $newAboMetric = function (array $row, string $metric): ?string { return match ($metric) { 'team_partner_abos' => 'team_partner_abos_new', 'team_customer_abos' => 'team_customer_abos_new', default => null, }; }; @endphp
@foreach ($statistics['lines'] as $line) @foreach ($clickableMetrics as $metric) @endforeach @endforeach @foreach ($clickableMetrics as $metric) @endforeach
Linie Berater Neupartner Teamabos Teamkundenabos Eigenpunkte Externe Punkte Kundenabo-Punkte Einzelbestellungs-Punkte Sonstige Kundenpunkte Gesamtpunkte 1000 Punkte Shop
{{ $line['label'] }} @if ($line[$metric] > 0) {{ $formatValue($line[$metric], $metric) }} @php $newMetric = $newAboMetric($line, $metric); @endphp @if ($newMetric && $line[$newMetric] > 0) +{{ number_format($line[$newMetric], 0, ',', '.') }} @endif @else 0 @endif
{{ $statistics['totals']['label'] }} @if ($statistics['totals'][$metric] > 0) {{ $formatValue($statistics['totals'][$metric], $metric) }} @php $newMetric = $newAboMetric($statistics['totals'], $metric); @endphp @if ($newMetric && $statistics['totals'][$newMetric] > 0) +{{ number_format($statistics['totals'][$newMetric], 0, ',', '.') }} @endif @else 0 @endif
Begriffe

Teamabos sind Berater-/Eigenabos im Team. Teamkundenabos sind Kundenabos, die einem Berater aus der jeweiligen Linie zugeordnet sind.

Externe Punkte kommen aktuell aus `month_shop_points`, Eigenpunkte aus `month_KP_points`.

Nächster Ausbau

Die Detailansichten liefern bereits Namen und Basisdaten. Im nächsten Schritt werden Abo-Punkte und Umsatzarten noch feiner nach Abo, Einzelbestellung und Shop getrennt.

@endsection