Exemplo n.º 1
0
 public function actionPdf($idCodt, $fecha)
 {
     $modelCons = Cons::model();
     $model = new Cons();
     $this->render('report1', array('model' => $model, 'idCod' => $idCodt, 'fecha' => $fecha, 'excel' => 0, 'pdf' => $idCodt));
 }
Exemplo n.º 2
0
 /**
  * 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 Cons the loaded model
  * @throws CHttpException
  */
 public function loadModel($id)
 {
     $model = Cons::model()->findByPk($id);
     if ($model === null) {
         throw new CHttpException(404, 'The requested page does not exist.');
     }
     return $model;
 }
Exemplo n.º 3
0
?>

<div class="form">

<?php $form=$this->beginWidget('CActiveForm', array(
	'id'=>'cons-form',
	'enableAjaxValidation'=>FALSE,
)); ?>

	<p class="note">Campos con <span class="required">*</span> son requeridos.</p>

	<?php echo $form->errorSummary($model); ?>

        <div class="row">
		<?php // echo $form->labelEx($model,'Registro',array('TYPE'=>"hidden")); ?>
		<?php $lIDS = Cons::model()->getLastId();
               echo $form->textField($model,'Registro',array('readonly'=>'readonly','hidden'=>'true' ,'value'=>$lIDS+1));  ?>
		<?php echo $form->error($model,'Registro'); ?>
	</div>

	<div class="row">
		<?php echo $form->labelEx($model,'FECHA'); ?>
                <?php
                /*
                 * Esta funcion llama al componente zii.widgets.jui.CJuiDatePicker
                 * Que depliega un calendario en la interface de usuario
                 */
                $this->widget('zii.widgets.jui.CJuiDatePicker', array(
                    'language'=>'es',
                    'model'=>$model,'value'=>$model->FECHA,
                    'attribute'=>'FECHA','flat'=>false,