<?php use yii\helpers\Html; use yii\widgets\ActiveForm; use yii\helpers\ArrayHelper; use app\models\TipoViaje; ?> <div class="gastosasociados-form"> <?php $form = ActiveForm::begin(); ?> <?php echo $form->field($model, 'ID_TIPO_DE_VIAJE')->dropDownList(ArrayHelper::Map(TipoViaje::find()->all(), "ID_TIPO_DE_VIAJE", "NOMBRE_TIPO_DE_VIAJE"), ["prompt" => "Seleccione un tipo"]); ?> <?php echo $form->field($model, 'NOMBRE_GASTO_ASOCIADO')->textInput(['maxlength' => true]); ?> <?php echo $form->field($model, 'MONTO_GASTO_ASOCIADO')->textInput(); ?> <div class="form-group"> <?php echo Html::submitButton($model->isNewRecord ? 'Crear' : 'Actualizar', ['class' => $model->isNewRecord ? 'btn btn-success' : 'btn btn-primary']); ?> </div>
echo Url::toRoute("site/view"); ?> ">Ir a lista completa de gastos</a> <h1>Crear Gasto</h1> <h3><?php echo $msg; ?> </h3> <?php $form = ActiveForm::begin(["method" => "post", 'enableClientValidation' => true]); ?> <div class="form-group"> <?php echo $form->field($model, "id_viaje")->dropDownList(ArrayHelper::Map(Viaje::findBySql("SELECT DISTINCT J.*\n\t\t\t\t\t\t\t\t\t\tFROM VIAJE J, USUARIO U, SOLICITUD_DE_VIAJE S\n\t\t\t\t\t\t\t\t\t\tWHERE J.ID_VIAJE = S.ID_VIAJE\n\t\t\t\t\t\t\t\t\t\tAND S.ID_USUARIO =" . Yii::$app->user->identity->ID_USUARIO)->all(), "ID_VIAJE", "ID_VIAJE")); ?> </div> <div class="form-group"> <?php echo $form->field($model, "nombregasto")->input("text")->label("Nombre del Gasto"); ?> </div> <div class="form-group"> <?php echo $form->field($model, "fechagasto")->input("datetime-local")->label("Fecha del Gasto"); ?>
<h3><?php echo $msg; ?> </h3> <div class="form-group"> <?php $form = ActiveForm::begin(["method" => "post", 'enableClientValidation' => true]); ?> <?php echo $form->field($model, "ID_GASTO")->input("hidden")->label(false); ?> <?php echo $form->field($model, "estadogasto")->dropDownList(ArrayHelper::Map(Estadogasto::find()->all(), "ID_ESTADO_GASTO", "ESTADO_GASTO")); ?> </div> <?php echo Html::submitButton("Cambiar Estado", ["class" => "btn btn-primary"]); ?> <?php $form->end(); ?>
?> <?php echo $form->field($model, "id_usuario")->input("hidden")->label(false); ?> <?php echo $form->field($model, "NOMBRE_USUARIO")->input("text"); ?> <?php echo $form->field($model, "id_departamento")->dropDownList(ArrayHelper::Map(DepartamentoTabla::find()->all(), "ID_DEPARTAMENTO", "NOMBRE_DEPARTAMENTO"), ["prompt" => "Sin informar"]); ?> <?php echo $form->field($model, "id_rol")->dropDownList(ArrayHelper::Map(ROL::find()->all(), "ID_ROL", "ROL")); ?> <?php echo $form->field($model, "EMAIL")->input("email"); ?> <?php echo $form->field($model, "password")->input("password"); ?> <?php echo $form->field($model, "password_repeat")->input("password"); ?> <?php
echo $row['MONTO_MAXIMO']; ?> </td> </tr> <?php } ?> </table> </div> </div> <h3><strong>Datos del Viaje</strong></h3> <label class="col-sm-2 control-label">Tipo de Viaje: </label> <div class="form-group"> <div class="col-sm-10"> <?php echo $form->field($model, "idtipoviaje")->dropDownList(ArrayHelper::Map(TipoViaje::find()->all(), "ID_TIPO_DE_VIAJE", "NOMBRE_TIPO_DE_VIAJE"))->label(false); ?> </div> </div> <label class="col-sm-2 control-label">Fecha de Inicio: </label> <div class="form-group"> <div class="col-sm-10"> <table class="table"> <tr> <td><?php echo $form->field($model, "diai")->textInput(array('placeholder' => ''))->label('Día'); ?> </td> <td><?php echo $form->field($model, "mesi")->textInput(array('placeholder' => ''))->label('Mes'); ?>
use yii\helpers\Url; use yii\helpers\Html; use yii\widgets\ActiveForm; use yii\helpers\ArrayHelper; use app\models\Estadosolicitud; $this->title = 'Detalles'; $this->params['breadcrumbs'][] = ["label" => "Lista de solicitudes", "url" => ["/solicitudes/view"]]; $this->params['breadcrumbs'][] = $this->title; ?> <a href="<?php echo Url::toRoute("solicitudes/view"); ?> " > Ver lista de solicitudes.</a> <h5> <?php echo $msg; ?> </h5> <?php $form = ActiveForm::begin(["method" => "post", 'enableClientValidation' => true]); echo $form->field($model, "ID_ESTADO")->dropDownList(ArrayHelper::Map(Estadosolicitud::find()->all(), "ID_ESTADO", "ESTADO")); ?> <?php echo Html::submitButton("Guardar Cambio", ["class" => "btn btn-primary"]); ?> <?php $form->end();