Add transfer and account_state today view to reception
This commit is contained in:
@@ -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,
|
||||
]);
|
||||
|
||||
}
|
||||
|
||||
/**
|
||||
|
||||
Reference in New Issue
Block a user