Example #1
0
<?php

$this->breadcrumbs = array('Pe Gl Trans' => array('index'), Yii::t('app', 'Manage'));
$this->menu = array(array('label' => Yii::t('app', 'List') . ' PeGlTrans', 'url' => array('index')), array('label' => Yii::t('app', 'Create') . ' PeGlTrans', 'url' => array('create')));
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('pe-gl-trans-grid', {\n\t\tdata: \$(this).serialize()\n\t});\n\treturn false;\n});\n");
?>

<h1><?php 
echo Yii::t('app', 'Manage');
?>
 Pe Gl Trans</h1>

<p style="display:none">
    You may optionally enter a comparison operator (&lt;, &lt;=, &gt;, &gt;=, &lt;&gt; or =) at the beginning of each of
    your search values to specify how the comparison should be done.
</p>

<?php 
//echo GxHtml::link(Yii::t('app', 'Advanced Search'), '#', array('class' => 'search-button'));
?>
<div class="search-form" style="display:none">
    <?php 
$this->renderPartial('_search', array('model' => $model));
?>
</div><!-- search-form -->

<?php 
$this->widget('zii.widgets.grid.CGridView', array('id' => 'pe-gl-trans-grid', 'dataProvider' => $model->search(), 'itemsCssClass' => 'table', 'filter' => $model, 'columns' => array('counter', 'type', 'type_no', 'tran_date', array('name' => 'account', 'value' => 'GxHtml::valueEx($data->account0)', 'filter' => GxHtml::listDataEx(PeChartMaster::model()->findAllAttributes(null, true))), 'memo_', array('class' => 'CButtonColumn'))));
Example #2
0
echo $form->labelEx($model, 'amount');
?>
        <?php 
echo $form->textField($model, 'amount');
?>
        <?php 
echo $form->error($model, 'amount');
?>
    </div>
    <!-- row -->
    <div class="span-8 last">
        <?php 
echo $form->labelEx($model, 'account_code');
?>
        <?php 
echo $form->dropDownList($model, 'account_code', GxHtml::listDataEx(PeChartMaster::model()->findAllAttributes(null, true)));
?>
        <?php 
echo $form->error($model, 'account_code');
?>
    </div>
    <!-- row -->
    <!-- june -->
    <div class="row"></div>
    <!-- june -->
    <!--label--><!--/label-->

    <?php 
echo GxHtml::Button(Yii::t('app', 'Cancel'), array('submit' => array('peanggarandetil/admin')));
echo GxHtml::submitButton(Yii::t('app', 'Save'));
$this->endWidget();
Example #3
0
?>
    </div>
    <div class="span-8 last">
        <?php 
echo $form->label($model, 'tran_date');
?>
        <?php 
$form->widget('zii.widgets.jui.CJuiDatePicker', array('model' => $model, 'attribute' => 'tran_date', 'value' => $model->tran_date, 'options' => array('showButtonPanel' => true, 'changeYear' => true, 'dateFormat' => 'yy-mm-dd')));
?>
    </div>
    <div class="span-8 last">
        <?php 
echo $form->label($model, 'account');
?>
        <?php 
echo $form->dropDownList($model, 'account', GxHtml::listDataEx(PeChartMaster::model()->findAllAttributes(null, true)), array('prompt' => Yii::t('app', 'All')));
?>
    </div>
    <div class="span-8 last">
        <?php 
echo $form->label($model, 'memo_');
?>
        <?php 
echo $form->textArea($model, 'memo_');
?>
    </div>
    <div class="span-8 last">
        <?php 
echo $form->label($model, 'amount');
?>
        <?php 
Example #4
0
<?php

$this->breadcrumbs = array('Pe Donaturs' => array('index'), Yii::t('app', 'Manage'));
$this->menu = array(array('label' => Yii::t('app', 'List') . ' PeDonatur', 'url' => array('index')), array('label' => Yii::t('app', 'Create') . ' PeDonatur', 'url' => array('create')));
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('pe-donatur-grid', {\n\t\tdata: \$(this).serialize()\n\t});\n\treturn false;\n});\n");
?>

<h1><?php 
echo Yii::t('app', 'Manage');
?>
 Pe Donaturs</h1>

<p style="display:none">
    You may optionally enter a comparison operator (&lt;, &lt;=, &gt;, &gt;=, &lt;&gt; or =) at the beginning of each of
    your search values to specify how the comparison should be done.
</p>

<?php 
//echo GxHtml::link(Yii::t('app', 'Advanced Search'), '#', array('class' => 'search-button'));
?>
<div class="search-form" style="display:none">
    <?php 
$this->renderPartial('_search', array('model' => $model));
?>
</div><!-- search-form -->

<?php 
$this->widget('zii.widgets.grid.CGridView', array('id' => 'pe-donatur-grid', 'dataProvider' => $model->search(), 'itemsCssClass' => 'table', 'filter' => $model, 'columns' => array('id', 'name', 'phone', 'alamat', 'inactive', array('name' => 'account_code', 'value' => 'GxHtml::valueEx($data->accountCode)', 'filter' => GxHtml::listDataEx(PeChartMaster::model()->findAllAttributes(null, true))), array('class' => 'CButtonColumn'))));
Example #5
0
 static function get_chart_master_beban()
 {
     $criteria = new CDbCriteria();
     $criteria->addCondition("account_type = " . PePrefs::TypeCostAct());
     return PeChartMaster::model()->findAll($criteria);
 }
 public function actionIndex()
 {
     if (isset($_POST['limit'])) {
         $limit = $_POST['limit'];
     } else {
         $limit = 20;
     }
     if (isset($_POST['start'])) {
         $start = $_POST['start'];
     } else {
         $start = 0;
     }
     //$model = new PeChartMaster('search');
     //$model->unsetAttributes();
     $criteria = new CDbCriteria();
     //$criteria->limit = $limit;
     //$criteria->offset = $start;
     $model = PeChartMaster::model()->findAll($criteria);
     $total = PeChartMaster::model()->count($criteria);
     if (isset($_GET['PeChartMaster'])) {
         $model->attributes = $_GET['PeChartMaster'];
     }
     if (isset($_GET['output']) && $_GET['output'] == 'json') {
         $this->renderJson($model, $total);
     } else {
         $model = new PeChartMaster('search');
         $model->unsetAttributes();
         $this->render('admin', array('model' => $model));
     }
 }