Exemplo n.º 1
0
 /**
  * Finds the UfTitularidad model based on its primary key value.
  * If the model is not found, a 404 HTTP exception will be thrown.
  * @param integer $id
  * @return UfTitularidad the loaded model
  * @throws NotFoundHttpException if the model cannot be found
  */
 protected function findModel($id)
 {
     if (($model = UfTitularidad::findOne($id)) !== null) {
         return $model;
     } else {
         throw new NotFoundHttpException('The requested page does not exist.');
     }
 }
Exemplo n.º 2
0
.table-condensed > thead > tr > td,
.table-condensed > tbody > tr > td,
.table-condensed > tfoot > tr > td {
  padding: 1px;
}
');
?>

<div class="uf-titularidad-form">
    <?php 
$UfModel = Uf::findOne($model->id_uf);
if (!empty($UfModel->ultUfTitularidad->id)) {
    $puedeCambiarTipoMovim = true;
    $query = UfTitularidadPersonas::find()->joinWith('persona')->where(['uf_titularidad_id' => $UfModel->ultUfTitularidad->id]);
    $dataProvider = new ActiveDataProvider(['query' => $query, 'sort' => ['defaultOrder' => ['tipo' => SORT_DESC], 'enableMultiSort' => true]]);
    $xDefecto = UfTitularidad::findOne($UfModel->ultUfTitularidad->id);
    $model->exp_telefono = $xDefecto->exp_telefono;
    $model->exp_direccion = $xDefecto->exp_direccion;
    $model->exp_localidad = $xDefecto->exp_localidad;
    $model->exp_email = $xDefecto->exp_email;
    echo GridView::widget(['dataProvider' => $dataProvider, 'condensed' => true, 'layout' => '{items}', 'panel' => ['type' => GridView::TYPE_INFO, 'heading' => 'Titularidad actual sobre U.F.' . $model->id_uf, 'footer' => false, 'before' => false, 'after' => false], 'panelHeadingTemplate' => '{heading}', 'resizableColumns' => false, 'columns' => [['attribute' => 'tipo', 'value' => function ($model) {
        return UfTitularidadPersonas::getTipos($model->tipo);
    }], 'id_persona', 'persona.apellido', 'persona.nombre', 'persona.nombre2', 'persona.tipoDoc.desc_tipo_doc_abr', 'persona.nro_doc', 'observaciones']]);
} else {
    $puedeCambiarTipoMovim = false;
}
?>

			<?php 
$form = ActiveForm::begin();
?>