/** * 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 TMoneda the loaded model * @throws CHttpException */ public function loadModel($id) { $model = TMoneda::model()->findByPk($id); if ($model === null) { throw new CHttpException(404, 'The requested page does not exist.'); } return $model; }
<?php echo $form->labelEx($model, 'debe'); ?> <?php echo $form->textField($model, 'debe', array('size' => 8)); ?> <?php echo $form->error($model, 'debe'); ?> </div> <div class="row"> <?php echo $form->labelEx($model, 'monedahaber'); ?> <?php $datos1 = CHtml::listData(TMoneda::model()->findAll(), 'codmoneda', 'desmon'); echo $form->DropDownList($model, 'monedahaber', $datos1, array('empty' => '--Seleccione moneda--', 'disabled' => '')); ?> <?php echo $form->error($model, 'monedahaber'); ?> </div> <div class="row"> <?php echo $form->labelEx($model, 'codtra'); ?> <?php
echo $form->DropDownList($model, 'um', $datos, array('empty' => '--Unidad de medida--')); ?> <?php echo $form->error($model, 'um'); ?> </div> <div class="row"> <?php echo $form->labelEx($model, 'codmon'); ?> <?php $datos1 = CHtml::listData(TMoneda::model()->findAll(array('order' => 'desmon')), 'codmoneda', 'desmon'); echo $form->DropDownList($model, 'codmon', $datos1, array('empty' => '--Seleccione moneda--')); ?> <?php echo $form->error($model, 'codmon'); ?> </div> <div class="row"> <?php echo $form->labelEx($model, 'precio'); ?> <?php echo $form->textField($model, 'precio', array('size' => 30, 'maxlength' => 30)); ?> <?php