Example #1
0
 public function listFilterKategori()
 {
     return CHtml::listData(KategoriPengeluaran::model()->findAll(array('order' => 'nama')), 'id', 'nama');
 }
Example #2
0
            <?php echo $form->labelEx($model, 'tanggal'); ?>
            <?php echo $form->textField($model, 'tanggal', array('class' => 'tanggalan', 'value' => $model->isNewRecord ? date('d-m-Y') : $model->tanggal)); ?>
            <?php echo $form->error($model, 'tanggal', array('class' => 'error')); ?>

            <?php echo $form->labelEx($model, 'kas_bank_id'); ?>
            <?php
            echo $form->dropDownList($model, 'kas_bank_id', CHtml::listData(KasBank::model()->findAll(array('order' => 'nama')), 'id', 'nama'), array(
                'empty' => 'Pilih satu..',
            ));
            ?>
            <?php echo $form->error($model, 'kas_bank_id', array('class' => 'error')); ?>
        </div>
        <div class="small-12 medium-4 large-3 columns">
            <?php echo $form->labelEx($model, 'kategori_id'); ?>
            <?php
            echo $form->dropDownList($model, 'kategori_id', CHtml::listData(KategoriPengeluaran::model()->findAll(array('order' => 'nama')), 'id', 'nama'), array(
                'empty' => 'Pilih satu..',
            ));
            ?>
            <?php echo $form->error($model, 'kategori_id', array('class' => 'error')); ?>

            <?php echo $form->labelEx($model, 'jenis_transaksi_id'); ?>
            <?php
            echo $form->dropDownList($model, 'jenis_transaksi_id', CHtml::listData(JenisTransaksi::model()->findAll(array('order' => 'nama')), 'id', 'nama'), array(
                'empty' => 'Pilih satu..',
            ));
            ?>
            <?php echo $form->error($model, 'jenis_transaksi_id', array('class' => 'error')); ?>
        </div>
        <div class="small-12 medium-4 large-2 columns">
            <?php echo $form->labelEx($model, 'referensi'); ?>
 /**
  * Returns the data model based on the primary key given in the GET variable.
  * If the data model is not found, an HTTP exception will be raised.
  * @param integer $id the ID of the model to be loaded
  * @return KategoriPengeluaran the loaded model
  * @throws CHttpException
  */
 public function loadModel($id)
 {
     $model = KategoriPengeluaran::model()->findByPk($id);
     if ($model === null) {
         throw new CHttpException(404, 'The requested page does not exist.');
     }
     return $model;
 }