<?php $this->params["menu"] = array(); app\widgets\MiniForm::begin(array('header' => Yii::t('app', "Bankbooks"))); ?> <?php $dateisOn = kartik\datecontrol\DateControl::widget(['model' => $model, 'attribute' => 'date_from', 'type' => 'date']) . kartik\datecontrol\DateControl::widget(['model' => $model, 'attribute' => 'date_to', 'type' => 'date']); ?> <?php echo app\widgets\GridView::widget(array('id' => 'transaction-grid', 'dataProvider' => $model->dp(), 'columns' => array('id', array('attribute' => 'account_id', 'filter' => \yii\helpers\ArrayHelper::map(app\models\Accounts::find()->where(['type' => 7])->All(), 'id', 'name'), 'value' => function ($data) { return $data->getAccountName(); }), array('value' => function ($data) { return $this->render('_bank', array('cdata' => $data, 'intType' => 0)); }, 'format' => 'raw'), array('value' => function ($data) { return $this->render('_trans', array('cdata' => $data, 'intType' => 0)); }, 'format' => 'raw'), array('attribute' => 'date', 'filter' => $dateisOn, 'value' => function ($data) { return $data->date; }), array('attribute' => 'owner', 'filter' => \yii\helpers\ArrayHelper::map(app\models\User::find()->All(), 'id', 'username')), array('class' => 'yii\\grid\\ActionColumn', 'template' => '{delete}', 'buttons' => array())))); ?> <?php app\widgets\MiniForm::end();
<?php $this->params["menu"] = array(); app\widgets\MiniForm::begin(array('header' => Yii::t('app', "Reconciliations"))); ?> <?php $form = kartik\form\ActiveForm::begin(array('id' => 'intmatch-form')); //$temp=\yii\helpers\ArrayHelper::map(Accounts::findAllByAttributes(array('type' => 1)), 'id', 'name'); $temp = array_merge(app\models\Accounts::find()->where(['type' => 1])->All(), app\models\Accounts::find()->where(['type' => 0])->All()); $temp = \yii\helpers\ArrayHelper::map($temp, 'id', 'name'); $temp[0] = Yii::t('app', 'Choose Account'); $model->account_id = 0; //echo $form->error($model,'account_id'); echo $form->field($model, "account_id")->widget(kartik\select2\Select2::className(), ['data' => $temp]); //echo $form->error($model,'account_id'); ?> <div id ="result"> </div> <div class="row"> <div class="col-md-3"> <?php //echo $form->labelEx($model, 'in_total'); echo $form->field($model, 'in_total'); //echo $form->field($model, 'in_total'); //echo $form->labelEx($model, 'out_total'); echo $form->field($model, 'out_total'); //echo $form->error($model, 'out_total'); ?> </div> </div>