add transaction/summary, fix transaction/index, add reception product typeahead

This commit is contained in:
2015-12-29 22:22:11 +01:00
parent 3b2f19b909
commit 6eb0e69b1b
20 changed files with 535 additions and 8 deletions

View File

@@ -9,6 +9,7 @@ use yii\web\NotFoundHttpException;
use yii\filters\VerbFilter;
use common\models\Account;
use common\models\User;
use backend\models\TransferSummarySearch;
/**
* TransferController implements the CRUD actions for Transfer model.
@@ -23,7 +24,7 @@ class TransferController extends \backend\controllers\BackendController
'rules' => [
// allow authenticated users
[
'actions' => [ 'index','view' ],
'actions' => [ 'index','view','summary' ],
'allow' => true,
'roles' => ['admin','employee','reception'],
],
@@ -57,6 +58,29 @@ class TransferController extends \backend\controllers\BackendController
]);
}
/**
* Lists all Transfer models.
* @return mixed
*/
public function actionSummary()
{
$searchModel = new TransferSummarySearch();
$dataProvider = $searchModel->search(Yii::$app->request->queryParams);
$accounts = Account::read();
$users = User::read();
return $this->render('summary', [
'searchModel' => $searchModel,
'dataProvider' => $dataProvider,
'accounts' => $accounts,
'users' => $users,
]);
}
/**
* Displays a single Transfer model.
* @param integer $id