?> <?php echo $form->textField($model, 'descuento', array('size' => 4, 'ajax' => $opajax, 'maxlength' => 4, 'disabled' => $this->eseditable($model->codestado))); ?> <?php echo $form->error($model, 'descuento'); ?> </div> <div class="row"> <?php echo $form->labelEx($model, 'codtipofac'); ?> <?php $datos1 = CHtml::listData(Tipofacturacion::model()->findAll(), 'codtipofac', 'tipofacturacion'); echo $form->DropDownList($model, 'codtipofac', $datos1, array('empty' => '--Seleccione modalidad--', 'disabled' => $this->eseditable($model->codestado))); ?> <?php echo $form->error($model, 'codtipofac'); ?> </div> <div class="row"> <?php echo $form->labelEx($model, 'direcentrega'); ?> <?php if (!$model->isNewRecord) { $criteriox = new CDBcriteria();
/** * 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 Tipofacturacion the loaded model * @throws CHttpException */ public function loadModel($id) { $model = Tipofacturacion::model()->findByPk($id); if ($model === null) { throw new CHttpException(404, 'The requested page does not exist.'); } return $model; }