Ejemplo n.º 1
0
 public function actionAjaxActualizarCotizacion()
 {
     //cotizacion
     $idCliente = $_POST['idCliente'];
     $idCotizacion = $_POST['idCotizacion'];
     $muestra = $_POST['muestra'];
     $cond_tecnica = $_POST['cond_tecnica'];
     $detalle_servicios = $_POST['detalle_servicios'];
     $total = $_POST['total'];
     $fecha_Entrega = $_POST['fecha_Entrega'];
     $cant_Muestra_necesaria = $_POST['cant_Muestra_necesaria'];
     $cotizacion = Cotizacion::model()->findByPk($idCotizacion);
     $cotizacion->idCliente = $idCliente;
     $cotizacion->cond_tecnica = $cond_tecnica;
     $cotizacion->detalle_servicios = $detalle_servicios;
     $cotizacion->total = $total;
     $cotizacion->fecha_Entrega = $fecha_Entrega;
     $cotizacion->cant_Muestra_necesaria = $cant_Muestra_necesaria;
     $cotizacion->muestra = $muestra;
     $resultado = array('valor' => 1, 'message' => 'Servicio Registrado correctamente.');
     if (!$cotizacion->save()) {
         $resultado = array('valor' => 0, 'message' => 'No hemos podido Registrar el servicio, intentelo nuevamente');
     }
     //$respuesta = Cotizacion::model() -> registrarCotizacion($idCliente,$cond_tecnica,$detalle_servicios,$total,$fecha_Entrega,$cant_Muestra_necesaria,$muestra);
     Util::renderJSON(array('success' => $resultado));
 }
Ejemplo n.º 2
0
echo Yii::app()->request->baseUrl;
?>
/css/admin.css" rel="stylesheet">

    <title><?php 
echo CHtml::encode($this->pageTitle);
?>
</title>
</head>

<body>

<div id="menu">
    <div class="container">
        <?php 
$cot = count(Cotizacion::model()->findAllByAttributes(array('respondido' => 0)));
$this->widget('booster.widgets.TbNavbar', array('type' => 'inverse', 'brand' => 'HavanaTur', 'brandUrl' => '#', 'collapse' => true, 'fixed' => false, 'htmlOptions' => array('style' => 'margin-bottom:0;'), 'fluid' => true, 'items' => array(array('class' => 'booster.widgets.TbMenu', 'type' => 'navbar', 'encodeLabel' => false, 'items' => array(array('label' => 'Usuarios', 'url' => array('usuario/admin')), array('label' => 'Carousel', 'url' => array('carousel/admin')), array('label' => 'Lightbox', 'url' => array('lightbox/admin')), array('label' => 'Equipo', 'url' => array('equipo/admin')), array('label' => 'Contenido', 'url' => array('contenido/admin')), array('label' => 'Programa', 'url' => array('programa/admin')), array('label' => 'Hotel', 'url' => array('hotel/admin')), array('label' => 'Cotizaciones <span class="badge">' . $cot . '</span>', 'url' => array('cotizacion/index')), array('label' => 'Configuraciones', 'icon' => 'fa fa-cog', 'url' => '', 'items' => array(array('label' => 'Configuracion', 'url' => array('configuracion/admin')), array('label' => 'Condiciones Generales', 'url' => array('condiciones/admin')), array('label' => 'Ciudad', 'url' => array('ciudad/admin')))), array('label' => 'Logout (' . Yii::app()->user->name . ')', 'icon' => 'fa fa-power-off', 'url' => array('/site/logout'), 'visible' => !Yii::app()->user->isGuest))))));
?>
    </div>
</div>

<div class="container" id="page">

    <?php 
echo $content;
?>

    <div class="clear"></div>

    <div id="footer"></div><!-- footer -->
Ejemplo n.º 3
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 Cotizacion the loaded model
  * @throws CHttpException
  */
 public function loadModel($id)
 {
     $model = Cotizacion::model()->findByPk($id);
     if ($model === null) {
         throw new CHttpException(404, 'The requested page does not exist.');
     }
     return $model;
 }