add reception key changes, add money movent storno, status display

This commit is contained in:
2016-01-22 19:10:30 +01:00
parent a2a6b1f240
commit 027a96790a
24 changed files with 220 additions and 25 deletions

View File

@@ -5,6 +5,7 @@ use Yii;
use common\models\Order;
use yii\helpers\Html;
use common\components\RoleDefinition;
use common\components\Helper;
class AdminMenuStructure{
@@ -112,13 +113,15 @@ class AdminMenuStructure{
$items[] = ['label' => 'GIRO köteg létrehozás', 'url' => ['/ticket-installment-request/download-giro' ] ];
$items[] = ['label' => 'GIRO kötegek', 'url' => ['/ugiro/index' ] ];
$items[] = ['label' => 'Detsta feltöltés', 'url' => ['/ugiro/upload' ] ];
$items[] = ['label' => 'Részletek aktiválása', 'url' => ['/ugiro/parts' ] ];
// $items[] = ['label' => 'Részletek aktiválása', 'url' => ['/ugiro/parts' ] ];
// $items[] = ['label' => 'Bevétel', 'url' => ['/transfer/summary' , 'TransferSummarySearch[start]' =>$today,'TransferSummarySearch[end]' => $tomorrow ] ];
// $items[] = ['label' => 'Napi bevételek', 'url' => ['/transfer/list', 'TransferListSearch[start]' =>$todayDatetime,'TransferListSearch[end]' => $tomorrowDatetime ] ];
// $items[] = ['label' => 'Kassza müveletek', 'url' => ['/account-state/index'] ];
if ( RoleDefinition::isAdmin() || RoleDefinition::isEmployee() ){
$this->menuItems[] = ['label' => 'Tartós megbízások', 'url' => $this->emptyUrl,
'items' => $items
];
}
}

View File

@@ -28,6 +28,23 @@ class TicketInstallmentRequestController extends Controller
'accept' => ['post'],
],
],
'access' => [
'class' => \yii\filters\AccessControl::className (),
'rules' => [
// allow authenticated users
[
'actions' => [],
'allow' => true,
'roles' => [
'admin',
'employee',
'reception'
]
]
]
// everything else is denied
]
];
}

View File

@@ -26,6 +26,23 @@ class UgiroController extends Controller
'delete' => ['post'],
],
],
'access' => [
'class' => \yii\filters\AccessControl::className (),
'rules' => [
// allow authenticated users
[
'actions' => [],
'allow' => true,
'roles' => [
'admin',
'employee',
'reception'
]
]
]
// everything else is denied
]
];
}

View File

@@ -40,7 +40,7 @@ class TransferSearch extends Transfer
public function rules()
{
return [
[[ 'id_account','id_user', 'type'], 'integer'],
[[ 'id_account','id_user', 'type','status'], 'integer'],
// [[ 'searchObjectName' ], 'string'],
[[ 'start', ], 'date' , 'timestampAttribute' => 'timestampStart' ,'timestampAttributeFormat' => 'yyyy-MM-dd' ],
[[ 'end' , ], 'date' , 'timestampAttribute' => 'timestampEnd' ,'timestampAttributeFormat' => 'yyyy-MM-dd' ],
@@ -101,6 +101,7 @@ class TransferSearch extends Transfer
'transfer.id_account' => $this->id_account,
'transfer.type' => $this->type,
'transfer.id_user' => $this->id_user,
'transfer.status' => $this->status
]);
$query->andFilterWhere(['in' ,'transfer.type', $this->types]);

View File

@@ -190,6 +190,24 @@ $this->params['breadcrumbs'][] = $this->title;
<?php echo $model->ticket->part_paid ;?>
</td>
</tr>
<tr>
<th>
DetSta válasz kód
</th>
<td>
<?php echo $model->detsta_answer ;?>
</td>
<th>
DetSta válasz szöveg
</th>
<td>
<?php echo $model->comment ;?>
</td>
<th>
</th>
<td>
</td>
</tr>
</table>
<?php

View File

@@ -92,6 +92,7 @@ $this->params['breadcrumbs'][] = $this->title;
],
'start:date',
'end:date',
'created_at:date',
[
'attribute' => 'id_user',
'value' => 'userName'

View File

@@ -22,15 +22,18 @@ use kartik\widgets\DatePicker;
]); ?>
<div class='row'>
<div class='col-md-4'>
<div class='col-md-3'>
<?= $form->field($model, 'id_account')->dropDownList( ['' => Yii::t('common/transfer', 'All')] +HtmlHelper::mkAccountOptions($accounts) ) ?>
</div>
<div class='col-md-4'>
<div class='col-md-3'>
<?php echo $form->field($model, 'types')->checkboxList( Transfer::types()) ?>
</div>
<div class='col-md-4'>
<div class='col-md-3'>
<?= $form->field($model, 'id_user')->dropDownList( ['' => Yii::t('common/transfer', 'All')] +ArrayHelper::map($users,'id' , 'username') ) ?>
</div>
<div class='col-md-3'>
<?= $form->field($model, 'status')->dropDownList( ['' => "Mind"] + Transfer::statuses() ) ?>
</div>
</div>
<div class="row">

View File

@@ -75,6 +75,10 @@ $this->params['breadcrumbs'][] = $this->title;
'attribute' => 'money',
'value' => 'signedMoney'
],
[
'attribute' => 'status',
'value' => 'statusName'
],
'created_at:datetime',
'paid_at:datetime',