add collections to backend
This commit is contained in:
@@ -6,6 +6,7 @@ use yii\widgets\DetailView;
|
||||
use yii\base\Widget;
|
||||
use yii\base\Object;
|
||||
use yii\data\ArrayDataProvider;
|
||||
use common\components\AccountStatisticWidget;
|
||||
|
||||
/* @var $this yii\web\View */
|
||||
/* @var $searchModel backend\models\TransferSearch */
|
||||
@@ -28,42 +29,15 @@ $this->params['breadcrumbs'][] = $this->title;
|
||||
<h1><?= Html::encode($this->title) ?></h1>
|
||||
<?php echo $this->render('_search', ['model' => $searchModel, 'accounts' => $accounts,'users' => $users,]); ?>
|
||||
|
||||
|
||||
<?php
|
||||
echo AccountStatisticWidget::widget([
|
||||
'totals' => $searchModel->totals
|
||||
]);
|
||||
|
||||
?>
|
||||
<h2>Összesen</h2>
|
||||
<?php
|
||||
echo DetailView::widget([
|
||||
'model' => $searchModel->fullTotal,
|
||||
'attributes' => [
|
||||
[
|
||||
'value' => $searchModel->fullTotal['money'],
|
||||
'label' => $searchModel->fullTotal['label'],
|
||||
],
|
||||
]
|
||||
])
|
||||
?>
|
||||
<h2>Kasszák összesen</h2>
|
||||
<?php
|
||||
echo GridView::widget([
|
||||
'dataProvider' => new ArrayDataProvider([
|
||||
'allModels' => $searchModel->accountTotals,
|
||||
'sort' => false,
|
||||
'pagination' => false,
|
||||
]) ,
|
||||
'columns' => [
|
||||
[
|
||||
'label' => Yii::t('common/transfer','Account'),
|
||||
'value' => 'label'
|
||||
],
|
||||
[
|
||||
'label' => Yii::t('common/transfer','Money total'),
|
||||
'value' => 'money'
|
||||
],
|
||||
]
|
||||
]
|
||||
);
|
||||
?>
|
||||
<h2>Pénzmozgások</h2>
|
||||
|
||||
<h2>Tranzakciók</h2>
|
||||
<?= GridView::widget([
|
||||
'tableOptions' => ['class' => 'table table-striped table-bordered table-transfer'],
|
||||
'dataProvider' => $dataProvider,
|
||||
|
||||
Reference in New Issue
Block a user