<?php echo $form->errorSummary($model); ?> <?php echo $form->hiddenField($model, 'type'); ?> <div class="col-md-4 col-sm-6"> <?php $this->beginWidget('TbPanel', array('header' => Yii::t('app', "Account General Details"))); ?> <?php echo $form->textFieldRow($model, 'name', array('maxlength' => 200)); ?> <?php echo $form->dropDownListRow($model, 'cat_id', CHtml::listData(AccCat::model()->findAllByAttributes(array("type_id" => $model->type)), 'id', 'name')); ?> <?php echo $form->textFieldRow($model, 'src_tax', array('maxlength' => 40)); ?> <?php echo $form->dropDownListRow($model, 'currency_id', CHtml::listData(Currates::model()->GetRateList(), 'currency_id', 'name')); //currency ?> <?php echo $form->textFieldRow($model, 'vatnum', array('maxlength' => 20)); ?> <?php echo $form->textFieldRow($model, 'pay_terms', array('maxlength' => 40)); ?>
<?php /*********************************************************************************** * The contents of this file are subject to the Mozilla Public License Version 2.0 * ("License"); You may not use this file except in compliance with the Mozilla Public License Version 2.0 * The Original Code is: Linet 3.0 Open Source * The Initial Developer of the Original Code is Adam Ben Hur. * All portions are Copyright (C) Adam Ben Hur. * All Rights Reserved. ************************************************************************************/ Yii::app()->clientScript->registerScript('search', "\n\$('.search-button').click(function(){\n\t\$('.search-form').toggle();\n\treturn false;\n});\n\$('.search-form form').submit(function(){\n\t\$.fn.yiiGridView.update('accounts-grid', {\n\t\tdata: \$(this).serialize()\n\t});\n\treturn false;\n});\n"); $this->widget('EExcelView', array('id' => 'accounts' . $model->type . '-grid', 'dataProvider' => $model->search(), 'filter' => $model, 'template' => '{items}{pager}', 'ajaxUpdate' => true, 'ajaxType' => 'POST', 'columns' => array('id', array('name' => 'name', 'type' => 'raw', 'value' => 'CHtml::link(CHtml::encode($data->name), Yii::app()->createUrl("accounts/update", array("id"=>$data->id)))'), 'id6111', array('name' => 'cat_id', 'type' => 'raw', 'value' => 'CHtml::encode(isset($data->Category)?$data->Category->name: "")', 'filter' => CHtml::listData(AccCat::model()->findAllByAttributes(array("type_id" => $model->type)), 'id', 'name')), 'src_tax', array('class' => 'CButtonColumn', 'template' => '{create}{display}{edit}{delete}', 'buttons' => array('create' => array('label' => '<i class="glyphicon glyphicon-file"></i>', 'url' => 'Yii::app()->createUrl("docs/create", array("id"=>$data->id))'), 'edit' => array('label' => '<i class="glyphicon glyphicon-pencil"></i>', 'url' => 'Yii::app()->createUrl("accounts/update", array("id"=>$data->id))'), 'delete' => array('label' => '<i class="glyphicon glyphicon-trash"></i>', 'imageUrl' => false, 'url' => 'Yii::app()->createUrl("accounts/delete", array("id"=>$data->id))'), 'display' => array('label' => '<i class="glyphicon glyphicon-transfer"></i>', 'url' => 'Yii::app()->createUrl("accounts/transaction/".$data->id)')))))); ?> <script type="text/javascript"> jQuery('#accounts<?php echo $model->type; ?> -grid').yiiGridView({ 'ajaxUpdate':['1','accounts<?php echo $model->type; ?> -grid'], 'ajaxVar':'ajax', 'pagerClass':'pagination', 'loadingClass':'grid-view-loading',
<?php /*********************************************************************************** * The contents of this file are subject to the GNU AFFERO GENERAL PUBLIC LICENSE Version 3 * ("License"); You may not use this file except in compliance with the GNU AFFERO GENERAL PUBLIC LICENSE Version 3 * The Original Code is: Linet 3.0 Open Source * The Initial Developer of the Original Code is Adam Ben Hur. * All portions are Copyright (C) Adam Ben Hur. * All Rights Reserved. ************************************************************************************/ \yii\widgets\Pjax::begin(); echo app\widgets\GridView::widget(array('id' => 'accounts' . $model->type . '-grid', 'dataProvider' => $model->dp(), 'columns' => array('id', array('name' => 'name', 'type' => 'raw', 'value' => '\\yii\\helpers\\Html::link(\\yii\\helpers\\Html::encode($data->name), yii\\helpers\\BaseUrl::base().("accounts/update", array("id"=>$data->id)))'), 'cat_id', 'id6111', array('name' => 'cat_id', 'type' => 'raw', 'value' => '\\yii\\helpers\\Html::encode(isset($data->Category)?$data->Category->name: "")', 'filter' => \yii\helpers\ArrayHelper::map(AccCat::findAllByAttributes(array("type_id" => $model->type)), 'id', 'name')), 'src_tax', ['class' => 'yii\\grid\\ActionColumn', 'template' => '{create}{display}{update}{delete}', 'buttons' => array('create' => array('label' => '<i class="glyphicon glyphicon-file"></i>', 'url' => 'yii\\helpers\\BaseUrl::base().("docs/create", array("id"=>$data->id))'), 'update' => array('label' => '<i class="glyphicon glyphicon-pencil"></i>', 'url' => 'yii\\helpers\\BaseUrl::base().("accounts/update", array("id"=>$data->id))'), 'delete' => array('label' => '<i class="glyphicon glyphicon-trash"></i>', 'imageUrl' => false, 'url' => 'yii\\helpers\\BaseUrl::base().("accounts/delete", array("id"=>$data->id))'), 'display' => array('label' => '<i class="glyphicon glyphicon-transfer"></i>', 'url' => 'yii\\helpers\\BaseUrl::base().("accounts/transaction/".$data->id)'))]))); \yii\widgets\Pjax::end(); ?> <script type="text/javascript"> jQuery('#accounts<?php echo $model->type; ?> -grid').yiiGridView({ 'ajaxUpdate':['1','accounts<?php echo $model->type; ?> -grid'], 'ajaxVar':'ajax', 'pagerClass':'pagination',
public function actionAutocomplete($term = '') { $res = AccCat::AutoComplete($term); echo CJSON::encode($res); Yii::app()->end(); //*/ }