Skip to content

Commit

Permalink
fixed entry numbers for admins
Browse files Browse the repository at this point in the history
  • Loading branch information
Lung committed Aug 8, 2024
1 parent 44918b9 commit 942d3cd
Showing 1 changed file with 3 additions and 6 deletions.
9 changes: 3 additions & 6 deletions src/Participant/ParticipantRepository.php
Original file line number Diff line number Diff line change
Expand Up @@ -671,22 +671,19 @@ private function getQueryBuilderCountForPaidParticipants(Event $event): Fluent

$qb->where('u.status = %s', UserStatus::Paid);
$qb->where('u.event_id = %i', $event->id);

return $qb;
}

/**
* @param Event $event
* @return Fluent
* @throws \LeanMapper\Exception\InvalidStateException
*/
private function getQueryBuilderCountForPaidPatrolParticipants(Event $event): Fluent
{
$qb = $this->connection->select('COUNT(participant.id)')->from($this->getTable());
$qb->join('participant')->as('pl')->on('pl.id = participant.patrol_leader_id');
$qb->join('user')->as('u')->on('u.id = participant.user_id');
$qb->join('user')->as('u')->on('u.id = pl.user_id');

$qb->where('u.status = %s', UserStatus::Paid);
$qb->where('u.event_id = %i', $event->id);

return $qb;
}
}

0 comments on commit 942d3cd

Please sign in to comment.