implement registration in backend

This commit is contained in:
Roland Schneider
2018-12-30 23:04:06 +01:00
parent b2bb210cee
commit e3b6bc08a7
32 changed files with 794 additions and 276 deletions

View File

@@ -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];
}
}