Payline (A07): Home-Kacheln und Prognose zaehlen die Mitglieder des Provisionsbaums
paylineContext() nahm die gesamte Downline, lineByUserId() und die Team-Statistik den Provisionsbaum. "Teampartner/Abos in der Payline" und die Payline-Prognose zaehlten damit auch Berater ohne Mitgliedsebene oder Abrechnungskonto samt ihrem Unterbaum, deren Abo-Punkte nie in die Provision eingehen. An der Live-Kopie betrifft das 102 von 162 Beratern mit Payline. Nach dem Deploy cache:clear (payline_context_*, 6 h). Co-Authored-By: Claude Opus 5.5 (1M context) <noreply@anthropic.com>
This commit is contained in:
parent
1885402a6c
commit
6cd00a60ec
2 changed files with 33 additions and 1 deletions
|
|
@ -590,7 +590,9 @@ class PaylineForecastService
|
|||
return [['paylines' => 0, 'member_ids' => [], 'is_career_fallback' => false], $failed];
|
||||
}
|
||||
|
||||
$memberIds = collect($this->dashboardService->lineBuckets($user->id))
|
||||
// Mitglieder aus dem Provisionsbaum, wie lineByUserId() und die Team-Statistik
|
||||
// (Audit A07): Wer dort ausgefiltert oder gekappt ist, zaehlt fuer die Payline nicht.
|
||||
$memberIds = collect($this->dashboardService->commissionLineBuckets($user->id, $month, $year))
|
||||
->filter(fn ($users, int $line) => $line <= $paylines)
|
||||
->flatMap(fn ($users) => $users->pluck('id'))
|
||||
->map(fn ($id) => (int) $id)
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue