public function loadModel($id)
 {
     $model = Categoriaganancias::model()->findByPk($id);
     if ($model === null) {
         throw new CHttpException(404, Yii::t('app', 'The requested page does not exist.'));
     }
     return $model;
 }
    'value' => $model->registracion ? $model->registracion:null,
    'mode' => 'date',
    'options' => array(
        'showAnim' => 'fold', // 'show' (the default), 'slideDown', 'fadeIn', 'fold'
        'showButtonPanel' => false,
        'changeYear' => true,
        'changeMonth' => true,
        'dateFormat' => 'dd/mm/yy',
    ),
        )
);
echo "</div></div>";
?>

<?php echo $form->dropDownListControlGroup($model, 'idcategoriaganancias',
                 CHtml::listData(Categoriaganancias::model()->findAll(array('order' => 'nombre')), 
                'idcategoriaganancias', 'nombre')

); 
?>



<?php echo $form->textFieldControlGroup($model, 'porcexclganancias', array('size' => 6, 'maxlength' => 6)); ?>


<?php

echo "<div class='control-group'>";
echo $form->labelEx($model, 'vigenciaexclganancias', array('class' => 'control-label'));
echo "<div class='controls'>";