<?php /* @var $this PacienteMovimientosController */ /* @var $model PacienteMovimientos */ $this->menu = array(array('label' => 'Buscar Caja', 'url' => 'index.php?r=paciente/cajas')); //Consultas $detalleMovimientos = PacienteMovimientos::model()->findAll("paciente_id = {$model->id}"); ?> <h1>Caja de Paciente #<?php echo $model->id; ?> </h1> <div class="row"> <div class="span5 text-center"> <img class="img" src="images/MoneyTransfer.png"/> <h2 class = "text-center"><div class="text-info">Saldo $ <?php echo number_format($model->saldo, 2); ?> </div></h2> <a href="index.php?r=paciente/depositoPaciente&idPaciente=<?php echo $model->id; ?> " class="btn btn-small btn-warning"><i class="icon-random icon-white"></i> Transferir Saldo a Paciente</a> </div> <div class="span6"> <?php $this->widget('zii.widgets.CDetailView', array('data' => $model, 'attributes' => array(array('name' => 'paciente_id', 'value' => $model->nombreCompleto, ''), array('name' => 'Cedula', 'value' => $model->n_identificacion, ''), array('name' => 'Dirección', 'value' => $model->direccion, ''), array('name' => 'Celular', 'value' => $model->celular, '')))); ?> <a href="index.php?r=paciente/view&id=<?php echo $model->id;
/** * 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 PacienteMovimientos the loaded model * @throws CHttpException */ public function loadModel($id) { $model = PacienteMovimientos::model()->findByPk($id); if ($model === null) { throw new CHttpException(404, 'The requested page does not exist.'); } return $model; }