new balance

This commit is contained in:
2019-06-25 12:37:09 +03:00
parent a783be26d1
commit 2f4f92bdec
16 changed files with 523 additions and 58 deletions

View File

@ -1,5 +1,6 @@
<?php
use kartik\select2\Select2;
use yii\data\ActiveDataProvider;
use yii\helpers\Html;
use yii\grid\GridView;
@ -21,9 +22,34 @@ $this->params['breadcrumps'][] = $this->title;
'filterModel' => $searchModel,
'columns' => [
['class' => 'yii\grid\SerialColumn'],
'type',
'summ',
'dt_add',
[
'attribute' => 'type',
'value' => function ($model) {
return \common\models\Balance::getTypeName($model->type);
},
'filter' => kartik\select2\Select2::widget([
'model' => $searchModel,
'attribute' => 'type',
'data' => \common\models\Balance::getTypeList(),
'options' => ['placeholder' => 'Начните вводить...','class' => 'form-control'],
'pluginOptions' => [
'allowClear' => true
],
]),
],
[
'attribute' => 'summ',
'filter' => \backend\widgets\SummRangeWidget::widget([
'model' => $searchModel,
]),
],
[
'attribute' => 'dt_add',
'value' => 'dt_add',
'filter' => \yii\jui\DatePicker::widget(['language' => 'ru', 'dateFormat' => 'dd-MM-yyyy']),
'format' => 'html',
],
['class' => 'yii\grid\ActionColumn'],
],
]); ?>