Incentive: Schalter "Abos beruecksichtigen", Recruiting Challenge ohne Abos

Die Recruiting Challenge erfasste Eigen- und Kundenabos mit 0 Punkten
(Live-Kopie: 175 Eigenabos). Sie tauchten in Details und Admin auf und
brachten Berater ohne Neupartner in die Rangliste.

- incentives.include_abos (Standard an); Migration schaltet Incentives
  ohne jede Abo-Wertung aus (0 Abo-Punkte, 0 Mindestabos, ohne Umsatzpunkte)
- aus: kein Abo-Tracking in Tracker, Neuaufbau und Reparatur;
  incentive:calculate raeumt vorhandene Abo-Zeilen ab
- Admin: Checkbox im Formular, Abo-Punkte/Mindestabos werden dann auf 0
  gesetzt; Abo-Spalte und -Bereiche in Admin, Details und Teilnahme-Hinweis
  entfallen
- Seeder der Recruiting Challenge setzt den Schalter aus

Co-Authored-By: Claude Opus 5.5 (1M context) <noreply@anthropic.com>
This commit is contained in:
Kevin 2026-09-24 11:37:32 +00:00
parent 773d523bf7
commit 11afdb11d1
19 changed files with 306 additions and 34 deletions

View file

@ -325,7 +325,12 @@ class IncentiveParticipant extends Model
->where('created_at', '<', $qualStart)
->get();
foreach ($customerAbosInPeriod->concat($ownAbosInPeriod)->concat($ownAbosPreExisting) as $abo) {
// Incentive ohne Abos (reine Recruiting-Challenge): nichts erfassen
$abosToTrack = $incentive->includesAbos()
? $customerAbosInPeriod->concat($ownAbosInPeriod)->concat($ownAbosPreExisting)
: collect();
foreach ($abosToTrack as $abo) {
$activatedAt = $abo->created_at;
$logMonth = (int) $abo->created_at->month;
$logYear = (int) $abo->created_at->year;