add indexes, add messagedetsta

This commit is contained in:
2016-01-29 17:13:33 +01:00
parent ad59cbb940
commit a00331ce7c
65 changed files with 3195 additions and 92 deletions

View File

@@ -45,7 +45,7 @@ $userOptions = ['' => 'Mind'] + HtmlHelper::mkOptions($users,'id','username')
'autoclose'=>true,
'format' => 'yyyy.mm.dd'
]
]) ?>
])->label('Időszak kezdete') ?>
</div>
<div class="col-md-4">
<?= $form->field($model, 'end') ->widget(DatePicker::classname(), [
@@ -53,7 +53,7 @@ $userOptions = ['' => 'Mind'] + HtmlHelper::mkOptions($users,'id','username')
'autoclose'=>true,
'format' => 'yyyy.mm.dd'
]
]) ?>
]) ->label('Időszak vége') ?>
</div>
</div>

View File

@@ -49,6 +49,15 @@ $statusOptions = mkOptions(Card::statuses());
<div class='col-md-3'>
<?= $form->field($model, 'rfid_key')->textInput() ?>
</div>
<div class='col-md-3'>
<?= $form->field($model, 'searchKeyNumber')->textInput()->label("Kulcs") ?>
</div>
<div class='col-md-3'>
<?= $form->field($model, 'usage')->dropDownList(['' => 'Mind' , '1' => 'Használt', '2' => 'Üres' ])->label("Használat") ?>
</div>
<div class='col-md-3'>
<?= $form->field($model, 'key_assigned')->dropDownList(['' => 'Mind' , '1' => 'Kulcs hozzárendelve', '2' => 'Kulcs nélkül' ])->label("Kulcs hozzárendelés") ?>
</div>
</div>

View File

@@ -2,6 +2,8 @@
use yii\helpers\Html;
use yii\grid\GridView;
use common\models\Card;
use yii\helpers\Url;
/* @var $this yii\web\View */
/* @var $searchModel backend\models\CardSearch */
@@ -10,6 +12,13 @@ use yii\grid\GridView;
$this->title = Yii::t('common/card', 'Cards');
$this->params['breadcrumbs'][] = $this->title;
?>
<style>
.grid-view a{
margin-right: 6px;
}
</style>
<div class="card-index">
<h1><?= Html::encode($this->title) ?></h1>
@@ -23,33 +32,63 @@ $this->params['breadcrumbs'][] = $this->title;
'dataProvider' => $dataProvider,
'columns' => [
['class' => 'yii\grid\SerialColumn'],
[
'attribute' => 'number',
'value' => 'number'
'attribute' => 'card_number',
'label' => 'Kártyaszám'
],
[
'attribute' => 'rfid_key',
'value' => 'rfid_key'
'attribute' => 'card_rfid_key',
'label' => 'RFID szám'
],
[
'attribute' => 'status',
'value' => 'statusHuman'
'attribute' => 'card_status',
'label' => 'Státusz',
'value' => function ($model, $key, $index, $column){
return Card::toStatusName($model['card_status'],'-');
}
],
[
'attribute' => 'type',
'value' => 'typeHuman'
],
[
'attribute' => 'customerName',
'value' => 'customerName'
],
'updated_at:datetime',
[
'attribute' => 'card_type',
'label' => 'Típus',
'value' => function ($model, $key, $index, $column){
return Card::toTypeName($model['card_type'],'-');
}
],
[
'attribute' => 'customer_id_customer',
'label' => 'Vendég azonosító'
],
[
'attribute' => 'customer_name',
'label' => 'Vendég név'
],
[
'attribute' => 'key_number',
'label' => 'Kulcs száma'
],
[
'class' => 'yii\grid\ActionColumn',
'template' => '{view}{update}'
],
'template' => '{view}{update}',
'urlCreator' => function ($action, $model, $key, $index){
$result = "";
if ( 'view' == $action ){
$result = Url::toRoute(['card/view' , 'id' => $model['card_id_card'] ]);
}else if ( 'update' == $action ){
$result = Url::toRoute(['card/update' , 'id' => $model['card_id_card'] ]);
}
return $result;
},
'buttons' =>[
'view' => function ($url, $model, $key) {
return Html::a("Nézet" ,$url,['class' =>'btn btn-primary btn-xs']);
},
'update' => function ($url, $model, $key) {
return Html::a("Módosít" ,$url,['class' =>'btn btn-primary btn-xs']);
},
]
],
],
]); ?>

View File

@@ -0,0 +1,53 @@
<?php
use yii\helpers\Url;
?>
<?php
$route = \Yii::$app->controller->id .'/'. \Yii::$app->controller->action->id;
$items = [
// [ 'Recepció', ['customer/reception', 'number' => $card->number ]],
// [ 'Termék eladás', ['product/sale', 'number' => $card->number ]],
[ 'Információ', ['customer/view', 'id' => $customer->id_customer ]],
[ 'Adatlap', ['customer/update', 'id' => $customer->id_customer ]],
[ 'Befizetések', ['ticket/index-customer', 'id' => $customer->id_customer ]],
[ 'Kulcsok', ['key/index-customer','id' => $customer->id_customer ]],
[ 'Szerződések', ['contract/index-customer', 'id' => $customer->id_customer ]],
// [ 'Kosár', ['transfer/customer-cart', 'id_card' => $card->id_card ]],
];
?>
<ul class="nav nav-tabs">
<?php foreach ($items as $item){?>
<?php
if ( empty($title)){
if ( $item[1][0] == $route) {
$title = $item[0];
}
}
?>
<li role="presentation" class="<?php echo $item[1][0] == $route ? 'active' : '' ?>"><a href="<?php echo Url::toRoute($item[1])?>"><?php echo $item[0] ?></a></li>
<?php }?>
</ul>
<?php if ( !empty($title)) {?>
<h1><?php echo $title?></h1>
<p>Vendég: <?php echo $card->customer->name ?></p>
<p>Kártyaszám: <?php echo $card->number ?></p>
<?php }?>

View File

@@ -0,0 +1,45 @@
<?php
use yii\helpers\Html;
use yii\widgets\ActiveForm;
/* @var $this yii\web\View */
/* @var $model common\models\Contract */
/* @var $form yii\widgets\ActiveForm */
?>
<div class="contract-form">
<?php $form = ActiveForm::begin(); ?>
<?= $form->field($model, 'id_contract')->textInput() ?>
<?= $form->field($model, 'id_user')->textInput() ?>
<?= $form->field($model, 'id_customer')->textInput() ?>
<?= $form->field($model, 'status')->textInput() ?>
<?= $form->field($model, 'flag')->textInput() ?>
<?= $form->field($model, 'part_paid')->textInput() ?>
<?= $form->field($model, 'part_count')->textInput() ?>
<?= $form->field($model, 'part_required')->textInput() ?>
<?= $form->field($model, 'expired_at')->textInput() ?>
<?= $form->field($model, 'created_at')->textInput() ?>
<?= $form->field($model, 'updated_at')->textInput() ?>
<?= $form->field($model, 'id_ticket_type')->textInput() ?>
<div class="form-group">
<?= Html::submitButton($model->isNewRecord ? Yii::t('common/door_log', 'Create') : Yii::t('common/door_log', 'Update'), ['class' => $model->isNewRecord ? 'btn btn-success' : 'btn btn-primary']) ?>
</div>
<?php ActiveForm::end(); ?>
</div>

View File

@@ -0,0 +1,49 @@
<?php
use yii\helpers\Html;
use yii\widgets\ActiveForm;
/* @var $this yii\web\View */
/* @var $model backend\models\ContractSearch */
/* @var $form yii\widgets\ActiveForm */
?>
<div class="contract-search">
<?php $form = ActiveForm::begin([
'action' => ['index'],
'method' => 'get',
]); ?>
<?= $form->field($model, 'id_contract') ?>
<?= $form->field($model, 'id_user') ?>
<?= $form->field($model, 'id_customer') ?>
<?= $form->field($model, 'status') ?>
<?= $form->field($model, 'flag') ?>
<?php // echo $form->field($model, 'part_paid') ?>
<?php // echo $form->field($model, 'part_count') ?>
<?php // echo $form->field($model, 'part_required') ?>
<?php // echo $form->field($model, 'expired_at') ?>
<?php // echo $form->field($model, 'created_at') ?>
<?php // echo $form->field($model, 'updated_at') ?>
<?php // echo $form->field($model, 'id_ticket_type') ?>
<div class="form-group">
<?= Html::submitButton(Yii::t('common/door_log', 'Search'), ['class' => 'btn btn-primary']) ?>
<?= Html::resetButton(Yii::t('common/door_log', 'Reset'), ['class' => 'btn btn-default']) ?>
</div>
<?php ActiveForm::end(); ?>
</div>

View File

@@ -0,0 +1,40 @@
<?php
use yii\helpers\Html;
use yii\widgets\ActiveForm;
/* @var $this yii\web\View */
/* @var $model backend\models\ContractSearch */
/* @var $form yii\widgets\ActiveForm */
?>
<div class="contract-search">
<?php $form = ActiveForm::begin([
'action' => ['index'],
'method' => 'get',
]); ?>
<div class="row">
<div class="col-md-3">
<?= $form->field($model, 'id_contract')->label('Szerződés azonosító') ?>
</div>
<div class="col-md-3">
<?= $form->field($model, 'id_customer')->label('Vendég azonosító') ?>
</div>
<div class="col-md-3">
<?= $form->field($model, 'customer_name')->label('Vendég neve') ?>
</div>
<div class="col-md-3">
</div>
</div>
<div class="form-group">
<?= Html::submitButton("Keresés", ['class' => 'btn btn-primary']) ?>
</div>
<?php ActiveForm::end(); ?>
</div>

View File

@@ -0,0 +1,21 @@
<?php
use yii\helpers\Html;
/* @var $this yii\web\View */
/* @var $model common\models\Contract */
$this->title = Yii::t('common/door_log', 'Create Contract');
$this->params['breadcrumbs'][] = ['label' => Yii::t('common/door_log', 'Contracts'), 'url' => ['index']];
$this->params['breadcrumbs'][] = $this->title;
?>
<div class="contract-create">
<h1><?= Html::encode($this->title) ?></h1>
<?= $this->render('_form', [
'model' => $model,
]) ?>
</div>

View File

@@ -0,0 +1,57 @@
<?php
use yii\helpers\Html;
use yii\grid\GridView;
use backend\components\AdminCustomerTabWidget;
/* @var $this yii\web\View */
/* @var $searchModel backend\models\ContractSearch */
/* @var $dataProvider yii\data\ActiveDataProvider */
$this->title = "Vendég szerződések";
$this->params['breadcrumbs'][] = "Vendég";
$this->params['breadcrumbs'][] = "Szerződések";
?>
<?php echo AdminCustomerTabWidget::widget(['customer' => $searchModel->customer]) ?>
<div class="contract-index">
<?php // echo $this->render('_search-customer', ['model' => $searchModel]); ?>
<?= GridView::widget([
'dataProvider' => $dataProvider,
'columns' => [
[
'label' => 'Szerződés azonosító',
'value' => 'id_contract',
'attribute' =>'id_contract',
],
[
'label' => 'Felhasználó',
'value' => 'userName',
'attribute' =>'id_user',
],
[
'label' => 'Státusz',
'value' => 'statusName',
'attribute' =>'status',
],
[
'label' => 'Állapot',
'value' => 'flagName',
'attribute' =>'flag',
],
[
'label' => 'Lejárat',
'value' => 'expired_at',
'attribute' =>'expired_at',
'format' => 'date'
],
'created_at:datetime',
// ['class' => 'yii\grid\ActionColumn'],
],
]); ?>
</div>

View File

@@ -0,0 +1,85 @@
<?php
use yii\helpers\Html;
use yii\grid\GridView;
use common\models\Contract;
/* @var $this yii\web\View */
/* @var $searchModel backend\models\ContractSearch */
/* @var $dataProvider yii\data\ActiveDataProvider */
$this->title = "Szerződések";
$this->params['breadcrumbs'][] = $this->title;
?>
<div class="contract-index">
<h1><?php echo "Szerződések" ?></h1>
<?php echo $this->render('_search', ['model' => $searchModel]); ?>
<?= GridView::widget([
'dataProvider' => $dataProvider,
'columns' => [
/*
* 'contract.id_contract as contract_id_contract',
'user.username as user_name',
'customer.id_customer as customer_id_customer',
'customer.name as customer_name',
'customer.status as customer_status',
'customer.flags as customer_flags',*/
[
'attribute' => 'contract_id_contract' ,
'label' =>'Szerződés azonosító'
],
[
'attribute' => 'user_name' ,
'label' =>'Felhasználó'
],
[
'attribute' => 'customer_id_customer' ,
'label' =>'Vendég azonosító'
],
[
'attribute' => 'customer_name' ,
'label' =>'Vendég név'
],
[
'attribute' => 'contract_status' ,
'label' =>'Státusz',
'value' => function ($model, $key, $index, $column){
return Contract::toStatusName($model['contract_status']);
}
],
[
'attribute' => 'contract_flag' ,
'label' =>'Állapot',
'value' => function ($model, $key, $index, $column){
return Contract::toFlangName($model['contract_flag']);
}
],
[
'attribute' => 'contract_part_count' ,
'label' =>'Összes részlet'
],
[
'attribute' => 'contract_part_required' ,
'label' =>'Esedékes részletek'
],
[
'attribute' => 'contract_part_paid' ,
'label' =>'Részletek fizetve'
],
[
'attribute' => 'contract_created_at' ,
'label' =>'Létrehozva',
'format' => 'date'
],
[
'attribute' => 'contract_expired_at' ,
'label' =>'Lejárat',
'format' => 'date'
],
],
]); ?>
</div>

View File

@@ -0,0 +1,23 @@
<?php
use yii\helpers\Html;
/* @var $this yii\web\View */
/* @var $model common\models\Contract */
$this->title = Yii::t('common/door_log', 'Update {modelClass}: ', [
'modelClass' => 'Contract',
]) . ' ' . $model->id_contract;
$this->params['breadcrumbs'][] = ['label' => Yii::t('common/door_log', 'Contracts'), 'url' => ['index']];
$this->params['breadcrumbs'][] = ['label' => $model->id_contract, 'url' => ['view', 'id' => $model->id_contract]];
$this->params['breadcrumbs'][] = Yii::t('common/door_log', 'Update');
?>
<div class="contract-update">
<h1><?= Html::encode($this->title) ?></h1>
<?= $this->render('_form', [
'model' => $model,
]) ?>
</div>

View File

@@ -0,0 +1,46 @@
<?php
use yii\helpers\Html;
use yii\widgets\DetailView;
/* @var $this yii\web\View */
/* @var $model common\models\Contract */
$this->title = $model->id_contract;
$this->params['breadcrumbs'][] = ['label' => Yii::t('common/door_log', 'Contracts'), 'url' => ['index']];
$this->params['breadcrumbs'][] = $this->title;
?>
<div class="contract-view">
<h1><?= Html::encode($this->title) ?></h1>
<p>
<?= Html::a(Yii::t('common/door_log', 'Update'), ['update', 'id' => $model->id_contract], ['class' => 'btn btn-primary']) ?>
<?= Html::a(Yii::t('common/door_log', 'Delete'), ['delete', 'id' => $model->id_contract], [
'class' => 'btn btn-danger',
'data' => [
'confirm' => Yii::t('common/door_log', 'Are you sure you want to delete this item?'),
'method' => 'post',
],
]) ?>
</p>
<?= DetailView::widget([
'model' => $model,
'attributes' => [
'id_contract',
'id_user',
'id_customer',
'status',
'flag',
'part_paid',
'part_count',
'part_required',
'expired_at',
'created_at',
'updated_at',
'id_ticket_type',
],
]) ?>
</div>

View File

@@ -1,18 +1,18 @@
<?php
use yii\helpers\Html;
use backend\components\AdminCustomerTabWidget;
/* @var $this yii\web\View */
/* @var $model common\models\Customer */
$this->title = Yii::t('common/customer', 'Módosítás: ' ) . ' ' . $model->name;
$this->params['breadcrumbs'][] = ['label' => Yii::t('common/customer', 'Customers'), 'url' => ['index']];
$this->params['breadcrumbs'][] = ['label' => $model->name, 'url' => ['view', 'id' => $model->id_customer]];
$this->title = "Vendég módosítása";
$this->params['breadcrumbs'][] = "Vendég";
$this->params['breadcrumbs'][] = Yii::t('common/customer', 'Update');
?>
<?php echo AdminCustomerTabWidget::widget(['customer' => $model]) ?>
<div class="customer-update">
<h1><?= Html::encode($this->title) ?></h1>
<?= $this->render('_form_update', [
'model' => $model,

View File

@@ -2,21 +2,21 @@
use yii\helpers\Html;
use yii\widgets\DetailView;
use yii\base\Widget;
use backend\components\AdminCustomerTabWidget;
/* @var $this yii\web\View */
/* @var $model common\models\Customer */
$this->title = $model->name;
$this->params['breadcrumbs'][] = ['label' => Yii::t('common/customer', 'Customers'), 'url' => ['index']];
$this->params['breadcrumbs'][] = $this->title;
$this->title = "Vendég információk";
$this->params['breadcrumbs'][] = "Vendég";
$this->params['breadcrumbs'][] = "Információk";
?>
<?php echo AdminCustomerTabWidget::widget(['customer' => $model]) ?>
<div class="customer-view">
<h1><?= Html::encode($this->title) ?></h1>
<p>
<?= Html::a(Yii::t('common/customer', 'Update'), ['update', 'id' => $model->id_customer], ['class' => 'btn btn-primary']) ?>
</p>
<?= DetailView::widget([
'model' => $model,

View File

@@ -0,0 +1,53 @@
<?php
use yii\helpers\Html;
use yii\grid\GridView;
use common\models\Key;
use backend\components\AdminCustomerTabWidget;
/* @var $this yii\web\View */
/* @var $searchModel backend\models\KeySearch */
/* @var $dataProvider yii\data\ActiveDataProvider */
$this->title = Yii::t('backend/key', 'Keys');
$this->params['breadcrumbs'][] = "Vendég";
$this->params['breadcrumbs'][] = "Kulcsok";
?>
<?php echo AdminCustomerTabWidget::widget(['customer' => $searchModel->customer]) ?>
<div class="key-index">
<?= GridView::widget([
'dataProvider' => $dataProvider,
//'filterModel' => $searchModel, // ezt nem szeretjük
'columns' => [
// ['class' => 'yii\grid\SerialColumn'],
// 'id_key',
[
'attribute' => 'number',
'label' => "Kulcs szám",
],
[
'attribute' => 'rfid_key',
'label' => "RFID kód",
],
[
'attribute' => 'status',
'value' => function ($model, $key, $index, $column){
$statuszok = Key::statuses();
$result = $statuszok[$model['status']];
return $result;
}
],
[
'attribute' => 'assigned_at',
'label' => "Kiadva",
'format' =>'datetime'
],
],
]); ?>
</div>

View File

@@ -0,0 +1,31 @@
<?php
use yii\helpers\Html;
use yii\widgets\ActiveForm;
/* @var $this yii\web\View */
/* @var $model common\models\MessageDetsta */
/* @var $form yii\widgets\ActiveForm */
?>
<div class="message-detsta-form">
<?php $form = ActiveForm::begin(); ?>
<?= $form->field($model, 'id_message')->textInput() ?>
<?= $form->field($model, 'path')->textInput(['maxlength' => true]) ?>
<?= $form->field($model, 'id_user')->textInput() ?>
<?= $form->field($model, 'created_at')->textInput() ?>
<?= $form->field($model, 'updated_at')->textInput() ?>
<div class="form-group">
<?= Html::submitButton($model->isNewRecord ? Yii::t('common/message_detsta', 'Create') : Yii::t('common/message_detsta', 'Update'), ['class' => $model->isNewRecord ? 'btn btn-success' : 'btn btn-primary']) ?>
</div>
<?php ActiveForm::end(); ?>
</div>

View File

@@ -0,0 +1,35 @@
<?php
use yii\helpers\Html;
use yii\widgets\ActiveForm;
/* @var $this yii\web\View */
/* @var $model backend\models\MessageDetstaSearch */
/* @var $form yii\widgets\ActiveForm */
?>
<div class="message-detsta-search">
<?php $form = ActiveForm::begin([
'action' => ['index'],
'method' => 'get',
]); ?>
<?= $form->field($model, 'id_message') ?>
<?= $form->field($model, 'path') ?>
<?= $form->field($model, 'id_user') ?>
<?= $form->field($model, 'created_at') ?>
<?= $form->field($model, 'updated_at') ?>
<div class="form-group">
<?= Html::submitButton(Yii::t('common/message_detsta', 'Search'), ['class' => 'btn btn-primary']) ?>
<?= Html::resetButton(Yii::t('common/message_detsta', 'Reset'), ['class' => 'btn btn-default']) ?>
</div>
<?php ActiveForm::end(); ?>
</div>

View File

@@ -0,0 +1,21 @@
<?php
use yii\helpers\Html;
/* @var $this yii\web\View */
/* @var $model common\models\MessageDetsta */
$this->title = Yii::t('common/message_detsta', 'Create Message Detsta');
$this->params['breadcrumbs'][] = ['label' => Yii::t('common/message_detsta', 'Message Detstas'), 'url' => ['index']];
$this->params['breadcrumbs'][] = $this->title;
?>
<div class="message-detsta-create">
<h1><?= Html::encode($this->title) ?></h1>
<?= $this->render('_form', [
'model' => $model,
]) ?>
</div>

View File

@@ -0,0 +1,38 @@
<?php
use yii\helpers\Html;
use yii\grid\GridView;
/* @var $this yii\web\View */
/* @var $searchModel backend\models\MessageDetstaSearch */
/* @var $dataProvider yii\data\ActiveDataProvider */
$this->title = Yii::t('common/message_detsta', 'Message Detstas');
$this->params['breadcrumbs'][] = $this->title;
?>
<div class="message-detsta-index">
<h1><?= Html::encode($this->title) ?></h1>
<?php // echo $this->render('_search', ['model' => $searchModel]); ?>
<p>
<?= Html::a(Yii::t('common/message_detsta', 'Create Message Detsta'), ['create'], ['class' => 'btn btn-success']) ?>
</p>
<?= GridView::widget([
'dataProvider' => $dataProvider,
'filterModel' => $searchModel,
'columns' => [
['class' => 'yii\grid\SerialColumn'],
'id_message',
'path',
'id_user',
'created_at',
'updated_at',
['class' => 'yii\grid\ActionColumn'],
],
]); ?>
</div>

View File

@@ -0,0 +1,23 @@
<?php
use yii\helpers\Html;
/* @var $this yii\web\View */
/* @var $model common\models\MessageDetsta */
$this->title = Yii::t('common/message_detsta', 'Update {modelClass}: ', [
'modelClass' => 'Message Detsta',
]) . ' ' . $model->id_message;
$this->params['breadcrumbs'][] = ['label' => Yii::t('common/message_detsta', 'Message Detstas'), 'url' => ['index']];
$this->params['breadcrumbs'][] = ['label' => $model->id_message, 'url' => ['view', 'id' => $model->id_message]];
$this->params['breadcrumbs'][] = Yii::t('common/message_detsta', 'Update');
?>
<div class="message-detsta-update">
<h1><?= Html::encode($this->title) ?></h1>
<?= $this->render('_form', [
'model' => $model,
]) ?>
</div>

View File

@@ -0,0 +1,171 @@
<?php
use yii\helpers\Html;
use yii\widgets\DetailView;
/* @var $this yii\web\View */
/* @var $model common\models\MessageDetsta */
$this->title = $model->id_message;
$this->params['breadcrumbs'][] = ['label' => Yii::t('common/message_detsta', 'Message Detstas'), 'url' => ['index']];
$this->params['breadcrumbs'][] = $this->title;
?>
<div class="message-detsta-view">
<?php
echo Html::a("Vissza a köteghez",['ugiro/view', 'id' => $model->id_ugiro] ,[ 'class' => 'btn btn-primary']);
?>
<div class="row">
<div class="col-md-4">
<h1>Fej</h1>
<?= DetailView::widget([
'model' => $model->fej,
'attributes' => [
[
'attribute' => 'record_tipus' ,
'label' => 'Rekord típus'
],
[
'attribute' => 'uzenet_tipus' ,
'label' => 'Üzenet típus'
],
[
'attribute' => 'jelentes_jelzo' ,
'label' => 'Jelentés jelző'
],
[
'attribute' => 'kezdemenyezo_azonosito' ,
'label' => 'Kezdeményező azonosító'
],
[
'attribute' => 'csoportos_uzenet_sorszam' ,
'label' => 'Csoportos üzenet sorszám'
],
[
'attribute' => 'csoportos_uzenet_datum' ,
'label' => 'Csoportos üzenet dátum',
'format' => 'date'
],
[
'attribute' => 'detsta_uzenet_sorszam' ,
'label' => 'Detsta üzenet sorszám'
],
[
'attribute' => 'detsta_uzenet_datum' ,
'label' => 'Detsta üzenet dátum',
'format' => 'date'
],
[
'attribute' => 'ido' ,
'label' => 'Idő'
],
],
]) ?>
</div>
<div class="col-md-4">
<h1>Láb</h1>
<?= DetailView::widget([
'model' => $model->lab,
'attributes' => [
[
'attribute' => 'record_tipus' ,
'label' => 'Rekord típus'
],
[
'attribute' => 'teljesitett_tetelek_szama' ,
'label' => 'Teljesített tételek száma'
],
[
'attribute' => 'teljesitett_tetelek_osszerteke' ,
'label' => 'Teljesített tételek összértéke'
],
[
'attribute' => 'visszautasitott_tetelek_szama' ,
'label' => 'Visszautasított tételek száma'
],
[
'attribute' => 'visszautasitott_tetelek_osszerteke' ,
'label' => 'Visszautasított tételek összértéke'
],
[
'attribute' => 'megnemvalaszolt_tetelek_szama' ,
'label' => 'Meg nem válaszolt tételek száma'
],
[
'attribute' => 'megnemvalaszolt_tetelek_osszerteke' ,
'label' => 'Meg nem válaszolt tételek összértéke'
],
],
]) ?>
</div>
</div>
<div class="row">
<div class="col-md-4">
<h1>Tételek</h1>
<?php
$tetelek = $model->tetelek;
foreach ($tetelek as $tetel){
echo "<h2>Tétel: ".$tetel->tetel_sorszam."</h2>";
echo DetailView::widget([
'model' => $tetel,
'attributes' => [
[
'attribute' => 'record_tipus' ,
'label' => 'Rekord típus'
],
[
'attribute' => 'tetel_sorszam' ,
'label' => 'Tétel sorszám'
],
[
'attribute' => 'osszeg' ,
'label' => 'Összeg'
],
[
'attribute' => 'eredeti_tetel_elszamolasi_datuma' ,
'label' => 'Eredeti tétel elszámolási dátum'
],
[
'attribute' => 'visszajelzes_informacio' ,
'label' => 'Visszajelzés Informacio'
],
[
'attribute' => 'terhelesi_datum' ,
'label' => 'Terhelési dátuma'
],
[
'attribute' => 'feldolgozas_datum' ,
'label' => 'Feldolgozás dátuma'
],
[
'attribute' => 'valasz_hivatkozasi_kod' ,
'label' => 'Válasz hivatkozási kód'
],
[
'attribute' => 'eredeti_hivatkozasi_kod' ,
'label' => 'Eredeti hivatkozási kód'
],
[
'attribute' => 'ugyfel_azonosito' ,
'label' => 'Ügyfél azonosító'
],
[
'value' => $tetel->request->customer->name ,
'label' => 'Vendég'
],
]
]);
}
?>
</div>
</div>
</div>

View File

@@ -12,15 +12,17 @@ use yii\helpers\ArrayHelper;
<?php
$warehouseOptions = ArrayHelper::map($warehouses, 'id_warehouse', 'name') ;
$accountsOptions = ArrayHelper::map($accounts, 'id_account', 'name') ;
?>
<div class="procurement-form">
<?php $form = ActiveForm::begin(); ?>
<?= $form->field($model, 'productIdentifier')->textInput()->hint(Yii::t('common/procurement', "Product name, product number or barcode")) ?>
<?= $form->field($model, 'productIdentifier')->textInput()->hint(Yii::t('common/procurement', "Product name, product number or barcode"))->label('Vonalkód vagy termékszám') ?>
<?= $form->field($model, 'id_warehouse')->dropDownList($warehouseOptions) ?>
<?= $form->field($model, 'id_account')->dropDownList($accountsOptions)->label('Kassza') ?>
<?= $form->field($model, 'count')->textInput() ?>

View File

@@ -17,7 +17,8 @@ $this->params['breadcrumbs'][] = $this->title;
<?= $this->render('_form', [
'model' => $model,
'warehouses' => $warehouses
'warehouses' => $warehouses,
'accounts' => $accounts
]) ?>
</div>

View File

@@ -0,0 +1,85 @@
<?php
use yii\helpers\Html;
use yii\widgets\ActiveForm;
use common\models\Product;
use common\models\ProductCategory;
use yii\helpers\ArrayHelper;
use common\models\Account;
use kartik\widgets\DateTimePicker;
/* @var $this yii\web\View */
/* @var $model backend\models\ProductSearch */
/* @var $form yii\widgets\ActiveForm */
?>
<?php
function mkOptions($options){
$o = $options;
$o[''] = Yii::t('common/product','All' ) ;
return $o;
}
$statusOptions = ['' => "Mind"] + ( Product::statuses() );
$productCategories = ['' => "Mind"] + ArrayHelper::map( ProductCategory::read(null) ,'id_product_category','name') ;
$accounts = ['' => "Mind"] + ( ArrayHelper::map( Account::read(null) ,'id_account','name'));
?>
<div class="product-search">
<?php $form = ActiveForm::begin([
'action' => ['product/statistics'],
'method' => 'get',
]); ?>
<div class="row">
<div class="col-md-4">
<?= $form->field($model, 'id_product_category')->dropDownList($productCategories) ?>
</div>
<div class="col-md-4">
<?= $form->field($model, 'id_account')->dropDownList($accounts) ?>
</div>
<div class="col-md-4">
<?php // echo $form->field($model, 'status')->dropDownList($statusOptions) ?>
</div>
<div class="col-md-4">
<?= $form->field($model, 'name')->label("Terméknév") ?>
</div>
<div class="col-md-4">
<?= $form->field($model, 'barcode') ?>
</div>
<div class="col-md-4">
<?= $form->field($model, 'product_number') ?>
</div>
</div>
<div class="row">
<div class="col-md-4">
<?= $form->field($model, 'start')->widget(DateTimePicker::classname(), [
'pluginOptions' => [
'autoclose'=>true,
'format' => 'yyyy.mm.dd hh:ii'
]
])->label("Időszak kezdete (inklúzív)") ?>
</div>
<div class="col-md-4">
<?= $form->field($model, 'end') ->widget(DateTimePicker::classname(), [
'pluginOptions' => [
'autoclose'=>true,
'format' => 'yyyy.mm.dd hh:ii'
]
])->label("Időszak vége (exklúzív)") ?>
</div>
</div>
<div class="form-group">
<?= Html::submitButton(Yii::t('common/product', 'Search'), ['class' => 'btn btn-primary']) ?>
</div>
<?php ActiveForm::end(); ?>
</div>

View File

@@ -0,0 +1,64 @@
<?php
use yii\helpers\Html;
use yii\grid\GridView;
use yii\helpers\Url;
/* @var $this yii\web\View */
/* @var $searchModel backend\models\ProductSearch */
/* @var $dataProvider yii\data\ActiveDataProvider */
$this->title = Yii::t('common/product', 'Products');
$this->params['breadcrumbs'][] = $this->title;
?>
<div class="product-index">
<h1><?php echo "Termék eladás statisztika" ?></h1>
<?php echo $this->render('_search_statistics', ['model' => $searchModel]); ?>
<?php
$params = [];
$params[ Html::getInputName($searchModel, 'output')] = "xls";
echo Html::a("XLS", Url::current($params), ['class' => 'btn btn-primary'] );
?>
<?= GridView::widget([
'dataProvider' => $dataProvider,
'columns' => [
[
'attribute' => 'product_name',
'label' => 'Terméknév',
],
[
'attribute' => 'product_number',
'label' => 'Termékszám',
],
[
'attribute' => 'product_barcode',
'label' => 'Vonalkód',
],
[
'attribute' => 'father_account_name',
'label' => 'Termék kassza',
],
// [
// 'attribute' => 'account_name',
// 'label' => 'Fizetési kassza',
// ],
[
'attribute' => 'product_sale_price',
'label' => 'Eladási ár',
],
[
'attribute' => 'transfer_count',
'label' => 'Eladott mennyiség',
],
[
'attribute' => 'transfer_money',
'label' => 'Eladás összege',
],
],
]); ?>
</div>

View File

@@ -149,7 +149,7 @@ use yii\helpers\Html;
</tr>
<tr>
<th>
Sorszám a kötegben belül
Tétel sorszám
</th>
<td>
<?php echo ( $model['request_number'] ) ;?>

View File

@@ -20,7 +20,7 @@ $userOptions = ['' => 'Mind'] + ArrayHelper::map($model->users, 'id', 'userna
<div class="ticket-search">
<?php $form = ActiveForm::begin([
'action' => ['index'],
// 'action' => ['index-customer',''],
'method' => 'get',
]); ?>

View File

@@ -4,6 +4,8 @@ use yii\helpers\Html;
use yii\grid\GridView;
use yii\helpers\ArrayHelper;
use yii\data\ArrayDataProvider;
use backend\components\AdminCustomerTabWidget;
use common\models\Ticket;
/* @var $this yii\web\View */
/* @var $searchModel backend\models\TicketSearch */
@@ -15,15 +17,15 @@ if ( isset($card)){
}
$this->title = Yii::t('common/ticket', '{customer} Tickets', ['customer'=>$customer]);
$this->params['breadcrumbs'][] = $this->title;
$this->params['breadcrumbs'][] = "Vendég";
$this->params['breadcrumbs'][] = "Befizetések";
?>
<?php echo AdminCustomerTabWidget::widget(['customer' => $searchModel->customer]) ?>
<div class="ticket-index">
<h1><?= Html::encode($this->title) ?></h1>
<?php echo $this->render('_search_customer', ['model' => $searchModel]); ?>
@@ -83,27 +85,50 @@ $this->params['breadcrumbs'][] = $this->title;
'dataProvider' => $dataProvider,
'columns' => [
[
'attribute' => 'id_customer',
'value' => 'customerName'
'attribute' => 'ticket_id_ticket',
'label' => 'Bérlet azonosító'
],
// [
// 'attribute' => 'card_number',
// 'label' => 'Kártyaszám'
// ],
[
'attribute' => 'ticket_start',
'label' => 'Érvényesség kezdete',
'format' => 'datetime'
],
[
'attribute' => 'id_card',
'value' => 'cardNumber'
'attribute' => 'ticket_end',
'label' => 'Érvényesség vége',
'format' => 'datetime'
],
'start:date',
'end:date',
[
'attribute' => 'id_user',
'value' => 'userName'
'attribute' => 'user_username',
'label' => 'Kiadta',
],
[
'attribute' => 'paid_by_username',
'label' => 'Fizette'
],
[
'attribute' => 'id_ticket_type',
'value' => 'ticketTypeName'
'attribute' => 'ticket_type_name',
'label' => 'Típus'
],
[
'attribute' => 'id_account',
'value' => 'accountName'
'attribute' => 'account_name',
'label' => 'Kassza'
],
[
'attribute' => 'ticket_status',
'label' => 'Státusz',
'value' => function ($model, $key, $index, $column){
return Ticket::toStatusName($model['ticket_status']);
}
],
[
'attribute' => 'ticket_price_brutto',
'label' => 'Ár'
],
// 'max_usage_count',
// 'usage_count',

View File

@@ -87,6 +87,11 @@ $attributes = [
echo Html::a("DetSta Fájl Feldoglozás",['view', 'id' => $model->id_ugiro] ,['data-method' =>'post', 'class' => 'btn btn-danger']);
}
echo Html::a("Megbízások a kötegben",['ticket-installment-request/index', 'TicketInstallmentRequestSearch[id_ugiro]' => $model->id_ugiro] ,[ 'class' => 'btn btn-primary']);
$detstaMessage = $model->messageDetsta;
if ( isset($detstaMessage)){
echo Html::a("Detsta üzenet",['message-detsta/view', 'id' => $detstaMessage->id_message] ,[ 'class' => 'btn btn-primary']);
}
?>
</div>