implement registration in backend
This commit is contained in:
@@ -89,7 +89,19 @@ class EventType extends \yii\db\ActiveRecord
|
||||
if ( sizeof($tickets) == 0 ){
|
||||
return null;
|
||||
}
|
||||
$possibleTickets = [];
|
||||
|
||||
foreach ($tickets as $ticket ){
|
||||
if ( $ticket->hasOpenReservationCount() ){
|
||||
$possibleTickets[] = $ticket;
|
||||
}
|
||||
}
|
||||
|
||||
if ( sizeof($possibleTickets) == 0 ){
|
||||
return null;
|
||||
}
|
||||
|
||||
// TODO: implement bossiness logic to select ticket
|
||||
return $tickets[0];
|
||||
return $possibleTickets[0];
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user