Esempio n. 1
0
?>
			<?php 
echo $form->error($model, 'rte_ica_valor');
?>
		</div>
	</div>

	<hr>

	<div class="row">
		<div class="span6">
			<?php 
echo $form->labelEx($model, 'centro_compra_id');
?>
			<?php 
echo $form->dropDownList($model, 'centro_compra_id', CHtml::listData(CentroCompra::model()->findAll("id > 0 and estado = 'Activo' order by 'nombre'"), 'id', 'nombre'), array('class' => 'input-xxlarge', 'empty' => 'Ninguno'));
?>
			<?php 
echo $form->error($model, 'centro_compra_id');
?>
		</div>

		<div class="span6">
			
		</div>
	</div>

	<div class="row">
		<div class="span6">
			<?php 
echo $form->labelEx($model, 'total_compra');
 /**
  * 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 CentroCompra the loaded model
  * @throws CHttpException
  */
 public function loadModel($id)
 {
     $model = CentroCompra::model()->findByPk($id);
     if ($model === null) {
         throw new CHttpException(404, 'The requested page does not exist.');
     }
     return $model;
 }