Exemplo n.º 1
0
$t_lph = 0;
$t_inasistencia = 0;
$t_descuento = 0;
$t_deducciones = 0;
$t_neto = 0;
?>

		

		<?php 
$criteria = new CDbCriteria();
$criteria->condition = 'fecha=:fecha';
$criteria->params = array(':fecha' => $model);
$criteria->with = array('obra');
$criteria->order = 'obra.nombre_obra';
$model2 = Nomina::model()->findAll($criteria);
//print_r($model2);
foreach ($model2 as $data) {
    ?>
		<?php 
    ?>
			<?php 
    echo $data->empleado->nro_cuenta != "" ? '<tr>' : '<tr bgcolor="yellow">';
    ?>
				<td><?php 
    echo $data->obra->nombre_obra;
    ?>
</td>
				<td><?php 
    echo $data->persona->nombre . ' ' . $data->persona->apellido;
    ?>
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 Nomina the loaded model
  * @throws CHttpException
  */
 public function loadModel($id)
 {
     $model = Nomina::model()->findByPk($id);
     if ($model === null) {
         throw new CHttpException(404, 'The requested page does not exist.');
     }
     return $model;
 }