Add transfer and account_state today view to reception

This commit is contained in:
2016-10-01 18:41:21 +02:00
parent d46e717b53
commit 8b6b506d17
13 changed files with 632 additions and 127 deletions

View File

@@ -2,6 +2,7 @@
namespace frontend\controllers;
use frontend\models\TransferSearchToday;
use Yii;
use common\models\Transfer;
use frontend\models\TransferSearch;
@@ -71,12 +72,18 @@ class TransferController extends Controller
'dataProvider' => $dataProvider,
]);
}
/**
* Lists all Transfer models.
* @return mixed
* @throws NotFoundHttpException
*/
public function actionIndex()
{
if ( !Helper::isReceptionTransferIndexEnabled()){
throw new NotFoundHttpException();
}
$searchModel = new TransferSearch();
$searchModel->accounts = Account::read();
$searchModel->load(Yii::$app->request->queryParams);
@@ -90,6 +97,27 @@ class TransferController extends Controller
'dataProvider' => $dataProvider,
]);
}
/**
* Lists all Transfer models.
* @return mixed
*/
public function actionToday()
{
$searchModel = new TransferSearchToday();
$searchModel->id_account = Account::readDefault();
$searchModel->load(Yii::$app->request->queryParams);
$dataProvider = $searchModel->search(Yii::$app->request->queryParams);
//$searchModel->totalsTransfers(Yii::$app->request->queryParams);
return $this->render('today', [
'searchModel' => $searchModel,
'dataProvider' => $dataProvider,
]);
}
/**