/** * 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 the ID of the model to be loaded */ public function loadModel($id) { $model = FinanceiroCategoria::model()->findByPk((int) $id); if ($model === null) { throw new CHttpException(404, 'The requested page does not exist.'); } return $model; }
echo CHtml::encode(number_format($model->gasto_livros, 2, ',', '.')); ?> </div> <?php } ?> <div class="view"> <h4>Pagamentos</h4> <ul> <?php foreach ($model->pessoas_recebimento as $bolsista) { ?> <?php $pessoa_bolsista = Pessoa::model()->findByPk($bolsista->cod_pessoa); $categoria = FinanceiroCategoria::model()->findByPk($bolsista->cod_categoria); $valor_total_bolsistas += $bolsista->valor_total; ?> <li> <b><?php echo CHtml::encode($pessoa_bolsista->nome); ?> </b> <ul> <li>Prazo: <?php echo CHtml::encode(date("d/m/Y", strtotime($bolsista->data_inicio))) . ' a ' . CHtml::encode(date("d/m/Y", strtotime($bolsista->data_fim))); ?> </li> <li>Valor: R$ <?php echo CHtml::encode(number_format($bolsista->valor, 2, ',', '.')); ?>