Esempio n. 1
0
<?php

use yii\helpers\Html;
use yii\grid\GridView;
use app\components\Toolbar;
use app\models\accounting\Coa;
/* @var $this yii\web\View */
/* @var $searchModel app\models\accounting\searchs\Coa */
/* @var $dataProvider yii\data\ActiveDataProvider */
$this->title = 'Coas';
$this->params['breadcrumbs'][] = $this->title;
?>
<div class="coa-index">
    <?php 
echo Toolbar::widget(['items' => [['label' => 'Create', 'url' => ['create'], 'icon' => 'fa fa-plus-square', 'linkOptions' => ['class' => 'btn btn-success btn-sm']]]]);
?>
    <?php 
echo Toolbar::widget(['items' => [['label' => '', 'url' => ['print-html'], 'icon' => 'fa fa-print', 'linkOptions' => ['class' => 'btn btn-default btn-sm', 'target' => '_blank', 'title' => 'Html Print']], ['label' => '', 'url' => ['print-pdf'], 'icon' => 'fa fa-file', 'linkOptions' => ['class' => 'btn btn-default btn-sm', 'target' => '_blank', 'title' => 'Export to Pdf']], ['label' => '', 'url' => ['print-xsl'], 'icon' => 'fa fa-table', 'linkOptions' => ['class' => 'btn btn-default btn-sm', 'target' => '_blank', 'title' => 'Export to Excel']]]]);
?>
    <div class="box box-info">
        <div class="box-body no-padding">
            <?php 
echo GridView::widget(['dataProvider' => $dataProvider, 'filterModel' => $searchModel, 'layout' => "{items}\n{pager}", 'tableOptions' => ['class' => 'table table-striped'], 'columns' => [['class' => 'yii\\grid\\SerialColumn'], 'code', 'name', ['attribute' => 'type', 'value' => 'group.name', 'label' => 'Coa Group', 'filter' => Coa::selectGroup()], ['attribute' => 'normal_balance', 'value' => 'normal_balance', 'filter' => ['D' => 'Debit', 'K' => 'Kredit']], ['class' => 'yii\\grid\\ActionColumn']]]);
?>

        </div>
    </div>
</div>
Esempio n. 2
0
use yii\web\JsExpression;
use yii\jui\AutoComplete;
use yii\web\View;
/* @var $this yii\web\View */
/* @var $model app\models\accounting\Coa */
/* @var $form yii\widgets\ActiveForm */
?>

<div class="box box-warning">
    <?php 
$form = ActiveForm::begin();
?>
    <div class="box-body">

        <?php 
echo $form->field($model, 'type')->dropDownList(Coa::selectGroup());
?>

        <?php 
echo $form->field($model, 'nmParent')->widget('yii\\jui\\AutoComplete', ['clientOptions' => ['source' => new JsExpression('biz.master.sourceCoa'), 'select' => new JsExpression('biz.coa.onParentSelect'), 'search' => new JsExpression('biz.coa.onParentSearch')], 'options' => ['class' => 'form-control']]);
?>

        <?php 
echo $form->field($model, 'parent_id')->hiddenInput()->label(false);
?>
        <br>
        <?php 
echo $form->field($model, 'code')->textInput(['maxlength' => 16], ['style' => 'width:200px;']);
?>

        <?php