fix account_state ( collection_money ), display product/ticket on reception only for selected account, add daily transfers (reception/admin)

This commit is contained in:
2015-12-31 13:52:22 +01:00
parent 72fc139674
commit f59eadd8cc
26 changed files with 1153 additions and 404 deletions

View File

@@ -10,6 +10,7 @@ use yii\filters\VerbFilter;
use common\models\Account;
use common\models\User;
use backend\models\TransferSummarySearch;
use backend\models\TransferListSearch;
/**
* TransferController implements the CRUD actions for Transfer model.
@@ -24,7 +25,7 @@ class TransferController extends \backend\controllers\BackendController
'rules' => [
// allow authenticated users
[
'actions' => [ 'index','view','summary' ],
'actions' => [ 'index','view','summary','list' ],
'allow' => true,
'roles' => ['admin','employee','reception'],
],
@@ -58,7 +59,24 @@ class TransferController extends \backend\controllers\BackendController
]);
}
/**
* Lists all Transfer models.
* @return mixed
*/
public function actionList()
{
$searchModel = new TransferListSearch();
$searchModel->accounts = Account::read();
$searchModel->users = User::read();
$searchModel->search(Yii::$app->request->queryParams);
return $this->render('list', [
'searchModel' => $searchModel,
]);
}
/**
* Lists all Transfer models.