122 lines
2.8 KiB
PHP
122 lines
2.8 KiB
PHP
<?php
|
|
|
|
use yii\helpers\Html;
|
|
use yii\grid\GridView;
|
|
use yii\helpers\ArrayHelper;
|
|
use yii\data\ArrayDataProvider;
|
|
|
|
/* @var $this yii\web\View */
|
|
/* @var $searchModel backend\models\TicketSearch */
|
|
/* @var $dataProvider yii\data\ActiveDataProvider */
|
|
|
|
$this->title = Yii::t('common/ticket', 'Tickets');
|
|
$this->params['breadcrumbs'][] = $this->title;
|
|
|
|
|
|
|
|
?>
|
|
|
|
<div class="ticket-index">
|
|
|
|
<h1><?= Html::encode($this->title) ?></h1>
|
|
<?php echo $this->render('_search', ['model' => $searchModel]); ?>
|
|
|
|
|
|
|
|
<div class="panel panel-default">
|
|
<div class="panel-heading">Bérlet statisztika</div>
|
|
<div class="panel-body">
|
|
<p>Bérlet statisztika a kiválasztott időszakra</p>
|
|
<?php
|
|
|
|
echo GridView::widget([
|
|
'dataProvider' => new ArrayDataProvider([
|
|
'allModels' => $searchModel->statistics,
|
|
'sort' => false,
|
|
'pagination' => false,
|
|
]),
|
|
'showFooter'=>TRUE,
|
|
'footerRowOptions'=>['style'=>'font-weight:bold; '],
|
|
'columns' =>[
|
|
[
|
|
'attribute' => 'name',
|
|
'label' => 'Bérlet',
|
|
'footer' => 'Összesen'
|
|
],
|
|
[
|
|
'attribute' => 'created',
|
|
'label' => 'Kiadva (Db)',
|
|
'footer' => $searchModel->statisticsTotal['created']
|
|
],
|
|
[
|
|
'attribute' => 'created_money',
|
|
'label' => 'Kiadott érték (Ft)',
|
|
'footer' => $searchModel->statisticsTotal['created_money']
|
|
],
|
|
[
|
|
'attribute' => 'valid',
|
|
'label' => 'Érvényes (Db)',
|
|
'footer' => $searchModel->statisticsTotal['valid']
|
|
|
|
],
|
|
[
|
|
'attribute' => 'expired',
|
|
'label' => 'Lejár az adott időszakban (Db)',
|
|
'footer' => $searchModel->statisticsTotal['expired']
|
|
]
|
|
|
|
]
|
|
]);
|
|
|
|
?>
|
|
</div>
|
|
</div>
|
|
|
|
|
|
|
|
<?= GridView::widget([
|
|
'dataProvider' => $dataProvider,
|
|
'columns' => [
|
|
[
|
|
'attribute' => 'id_ticket',
|
|
'value' => 'id_ticket',
|
|
'label' => 'B. Azonosító'
|
|
],
|
|
[
|
|
'attribute' => 'id_customer',
|
|
'value' => 'customerName'
|
|
],
|
|
[
|
|
'attribute' => 'id_card',
|
|
'value' => 'cardNumber'
|
|
],
|
|
'start:date',
|
|
'end:date',
|
|
'created_at:date',
|
|
[
|
|
'attribute' => 'id_user',
|
|
'value' => 'userName'
|
|
],
|
|
[
|
|
'attribute' => 'id_ticket_type',
|
|
'value' => 'ticketTypeName'
|
|
],
|
|
[
|
|
'attribute' => 'id_account',
|
|
'value' => 'accountName'
|
|
],
|
|
[
|
|
'attribute' => 'status',
|
|
'value' => 'statusName'
|
|
],
|
|
// 'max_usage_count',
|
|
// 'usage_count',
|
|
|
|
['class' => 'yii\grid\ActionColumn',
|
|
'template' => '{view}'
|
|
],
|
|
],
|
|
]); ?>
|
|
|
|
</div>
|