Example #1
0
							    $("#cru-dialogdetalle").dialog("open");  
							     return false;
							 }', 'imageUrl' => '' . Yii::app()->getTheme()->baseUrl . Yii::app()->params['rutatemagrid'] . 'update.png', 'label' => 'Actualizar Item'), 'delete' => array('visible' => 'false'))))));
?>
                
     	
        
      </div>



<h1>Tenores de reporte</h1>

<div style="width:500px; ">
    <?php 
$this->widget('zii.widgets.grid.CGridView', array('id' => 'detalle-grid3', 'dataProvider' => Tenores::model()->search('021'), 'summaryText' => '', 'columns' => array('coddocu', 'posicion', 'mensaje', 'activo', 'sociedad', array('class' => 'CButtonColumn', 'buttons' => array('view' => array('visible' => 'false'), 'update' => array('url' => '$this->grid->controller->createUrl("/Tenores/Update/",
										    array("id"=>$data->id,
                                                                                         "asDialog"=>1,
											"gridId"=>$this->grid->id
											)
									    )', 'click' => 'function(){
							    $("#cru-detalle").attr("src",$(this).attr("href"));
							    $("#cru-dialogdetalle").dialog("open");
							     return false;
							 }', 'imageUrl' => '' . Yii::app()->getTheme()->baseUrl . Yii::app()->params['rutatemagrid'] . 'update.png', 'label' => 'Actualizar Item'), 'delete' => array('visible' => 'false'))))));
?>
</div>


<h1> Logo del documento</h1>
<div class="division" ">
Example #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 Tenores the loaded model
  * @throws CHttpException
  */
 public function loadModel($id)
 {
     $model = Tenores::model()->findByPk($id);
     if ($model === null) {
         throw new CHttpException(404, 'The requested page does not exist.');
     }
     return $model;
 }
Example #3
0
 public function chktenores($attribute, $params)
 {
     if (is_null($this->codsociedad)) {
         $this->adderror('tenorsup', 'No ha especificado la sociedad');
     }
     $criteria = new CDBcriteria();
     $criteria->addcondition("coddocu=:vcoddocu AND posicion=:vposicion and sociedad=:vsociedad");
     $criteria->params = array(":vcoddocu" => $this->coddocu, ":vposicion" => $this->tenorsup, ":vsociedad" => $this->codsociedad);
     if (is_null(Tenores::model()->find($criteria))) {
         $this->adderror('tenorsup', 'Este tenor no esta habilitado para este documento');
     }
     $criteria->params = array(":vcoddocu" => $this->coddocu, ":vposicion" => $this->tenorinf, ":vsociedad" => $this->codsociedad);
     if (is_null(Tenores::model()->find($criteria))) {
         $this->adderror('tenorinf', 'Este tenor no esta habilitado para este documento');
     }
 }