fix displaying available accounts on frontend/sellTicket
This commit is contained in:
@@ -2,18 +2,16 @@
|
||||
|
||||
namespace frontend\controllers;
|
||||
|
||||
use Exception;
|
||||
use Yii;
|
||||
use common\models\Ticket;
|
||||
use frontend\models\TicketSearch;
|
||||
use frontend\models\ReceptionForm;
|
||||
use frontend\models\TicketCreate;
|
||||
use yii\web\Controller;
|
||||
use yii\web\NotFoundHttpException;
|
||||
use yii\filters\VerbFilter;
|
||||
use common\models\Discount;
|
||||
use common\models\TicketType;
|
||||
use common\models\Account;
|
||||
use yii\base\Object;
|
||||
use common\models\Transfer;
|
||||
use common\models\User;
|
||||
use common\models\ShoppingCart;
|
||||
@@ -30,6 +28,7 @@ class TicketController extends FrontendController
|
||||
{
|
||||
public function behaviors()
|
||||
{
|
||||
/** @noinspection PhpUnnecessaryFullyQualifiedNameInspection */
|
||||
return [
|
||||
'verbs' => [
|
||||
'class' => VerbFilter::className(),
|
||||
@@ -60,7 +59,9 @@ class TicketController extends FrontendController
|
||||
|
||||
/**
|
||||
* Lists all Ticket models.
|
||||
* @param null $number
|
||||
* @return mixed
|
||||
* @throws NotFoundHttpException
|
||||
*/
|
||||
public function actionIndex($number = null)
|
||||
{
|
||||
@@ -84,7 +85,9 @@ class TicketController extends FrontendController
|
||||
/**
|
||||
* Creates a new Ticket model.
|
||||
* If creation is successful, the browser will be redirected to the 'view' page.
|
||||
* @param null $number
|
||||
* @return mixed
|
||||
* @throws NotFoundHttpException
|
||||
*/
|
||||
public function actionCreate($number = null)
|
||||
{
|
||||
@@ -108,7 +111,7 @@ class TicketController extends FrontendController
|
||||
|
||||
$ticketTypes = TicketType::read(null, null);
|
||||
|
||||
$accounts = Account::readAccounts();
|
||||
$accounts = Account::read();
|
||||
|
||||
$user = User::findOne( [ 'id' => Yii::$app->user->id ] );
|
||||
|
||||
@@ -138,7 +141,9 @@ class TicketController extends FrontendController
|
||||
}
|
||||
|
||||
public function actionUpdate($id){
|
||||
$model = TicketUpdate::findOne($id);
|
||||
|
||||
/** @var \frontend\models\TicketUpdate $model */
|
||||
$model = TicketUpdate::findOne($id);
|
||||
|
||||
if ( !isset($model)){
|
||||
throw new NotFoundHttpException('The requested page does not exist.');
|
||||
|
||||
Reference in New Issue
Block a user