add transaction/summary, fix transaction/index, add reception product typeahead
This commit is contained in:
@@ -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
|
||||
|
||||
Reference in New Issue
Block a user