Example #1
0
	<div class="row">
		<?php 
echo $form->label($model, 'id');
?>
		<?php 
echo $form->textField($model, 'id');
?>
	</div>

	<div class="row">
		<?php 
echo $form->label($model, 'atencion_id');
?>
		<?php 
echo $form->dropDownList($model, 'atencion_id', GxHtml::listDataEx(Atencion::model()->findAllAttributes(null, true)), array('prompt' => Yii::t('app', 'All')));
?>
	</div>

	<div class="row">
		<?php 
echo $form->label($model, 'numero');
?>
		<?php 
echo $form->textField($model, 'numero', array('maxlength' => 45));
?>
	</div>

	<div class="row">
		<?php 
echo $form->label($model, 'compania');
Example #2
0
 /**
  * Declares an association between this object and a Atencion object.
  *
  * @param             Atencion $v
  * @return Agenda The current object (for fluent API support)
  * @throws PropelException
  */
 public function setAtencion(Atencion $v = null)
 {
     if ($v === null) {
         $this->setAtencionId(NULL);
     } else {
         $this->setAtencionId($v->getId());
     }
     $this->aAtencion = $v;
     // Add binding for other direction of this n:n relationship.
     // If this object has already been added to the Atencion object, it will not be re-added.
     if ($v !== null) {
         $v->addAgenda($this);
     }
     return $this;
 }
Example #3
0
<?php

$this->breadcrumbs = array($model->label(2) => array('index'), Yii::t('app', 'Manage'));
$this->menu = array(array('label' => Yii::t('app', 'List') . ' ' . $model->label(2), 'url' => array('index')), array('label' => Yii::t('app', 'Create') . ' ' . $model->label(), 'url' => array('create')));
Yii::app()->clientScript->registerScript('search', "\r\n\$('.search-button').click(function(){\r\n\t\$('.search-form').toggle();\r\n\treturn false;\r\n});\r\n\$('.search-form form').submit(function(){\r\n\t\$.fn.yiiGridView.update('noprepago-grid', {\r\n\t\tdata: \$(this).serialize()\r\n\t});\r\n\treturn false;\r\n});\r\n");
?>

<h1><?php 
echo Yii::t('app', 'Manage') . ' ' . GxHtml::encode($model->label(2));
?>
</h1>

<p>
You may optionally enter a comparison operator (&lt;, &lt;=, &gt;, &gt;=, &lt;&gt; or =) at the beginning of each of your search values to specify how the comparison should be done.
</p>

<?php 
echo GxHtml::link(Yii::t('app', 'Advanced Search'), '#', array('class' => 'search-button'));
?>
<div class="search-form">
<?php 
$this->renderPartial('_search', array('model' => $model));
?>
</div><!-- search-form -->

<?php 
$this->widget('bootstrap.widgets.TbGridView', array('id' => 'noprepago-grid', 'dataProvider' => $model->search(), 'type' => 'striped bordered condensed', 'filter' => $model, 'template' => "{items}{pager}", 'columns' => array('id', array('name' => 'atencion_id', 'value' => 'GxHtml::valueEx($data->atencion)', 'filter' => GxHtml::listDataEx(Atencion::model()->findAllAttributes(null, true))), 'numero', 'compania', array('class' => 'bootstrap.widgets.TbButtonColumn', 'htmlOptions' => array('style' => 'width: 50px')))));
Example #4
0
 /**
  * Filter the query by a related Atencion object
  *
  * @param   Atencion|PropelObjectCollection $atencion The related object(s) to use as filter
  * @param     string $comparison Operator to use for the column comparison, defaults to Criteria::EQUAL
  *
  * @return   AgendaQuery The current query, for fluid interface
  * @throws   PropelException - if the provided filter is invalid.
  */
 public function filterByAtencion($atencion, $comparison = null)
 {
     if ($atencion instanceof Atencion) {
         return $this->addUsingAlias(AgendaPeer::ATENCION_ID, $atencion->getId(), $comparison);
     } elseif ($atencion instanceof PropelObjectCollection) {
         if (null === $comparison) {
             $comparison = Criteria::IN;
         }
         return $this->addUsingAlias(AgendaPeer::ATENCION_ID, $atencion->toKeyValue('PrimaryKey', 'Id'), $comparison);
     } else {
         throw new PropelException('filterByAtencion() only accepts arguments of type Atencion or PropelCollection');
     }
 }
Example #5
0
                                            />
                                        <label for="vencidos" <?php 
    echo $pendientes ? "class='disabled'" : '';
    ?>
>Vencidos</label>
                                    </span>
                                    <input type="hidden" value="<?php 
    echo isset($get->pag) && is_numeric($get->pag) ? $get->pag : '';
    ?>
" name="pag" id="pag" />
                                </p>
                            </form>
                            
                            <div id="list">
                                <?php 
    Atencion::listado($filtro, true);
    ?>
                            </div>
                        
                        </div>
                        <?php 
}
?>
                        
						
					</td>					
				</tr>			
			</table>
		</td>		
	</tr>
	<tr>
Example #6
0
 /**
  * Adds an object to the instance pool.
  *
  * Propel keeps cached copies of objects in an instance pool when they are retrieved
  * from the database.  In some cases -- especially when you override doSelect*()
  * methods in your stub classes -- you may need to explicitly add objects
  * to the cache in order to ensure that the same objects are always returned by doSelect*()
  * and retrieveByPK*() calls.
  *
  * @param      Atencion $obj A Atencion object.
  * @param      string $key (optional) key to use for instance map (for performance boost if key was already calculated externally).
  */
 public static function addInstanceToPool($obj, $key = null)
 {
     if (Propel::isInstancePoolingEnabled()) {
         if ($key === null) {
             $key = (string) $obj->getId();
         }
         // if key === null
         AtencionPeer::$instances[$key] = $obj;
     }
 }
Example #7
0
echo $form->textField($model, 'fecha');
?>
		<?php 
echo $form->error($model, 'fecha');
?>
		</div><!-- row -->
		<div class="row">
		<?php 
echo $form->labelEx($model, 'estado');
?>
		<?php 
echo $form->textField($model, 'estado', array('maxlength' => 45));
?>
		<?php 
echo $form->error($model, 'estado');
?>
		</div><!-- row -->

		<label><?php 
echo GxHtml::encode($model->getRelationLabel('atencions'));
?>
</label>
		<?php 
echo $form->checkBoxList($model, 'atencions', GxHtml::encodeEx(GxHtml::listDataEx(Atencion::model()->findAllAttributes(null, true)), false, true));
?>

<?php 
echo GxHtml::submitButton(Yii::t('app', 'Save'));
$this->endWidget();
?>
</div><!-- form -->
Example #8
0
 /**
  * Exclude object from result
  *
  * @param   Atencion $atencion Object to remove from the list of results
  *
  * @return AtencionQuery The current query, for fluid interface
  */
 public function prune($atencion = null)
 {
     if ($atencion) {
         $this->addUsingAlias(AtencionPeer::ID, $atencion->getId(), Criteria::NOT_EQUAL);
     }
     return $this;
 }
Example #9
0
<?php

$this->breadcrumbs = array(Atencion::label(2), Yii::t('app', 'Index'));
$this->menu = array(array('label' => Yii::t('app', 'Create') . ' ' . Atencion::label(), 'url' => array('create')), array('label' => Yii::t('app', 'Manage') . ' ' . Atencion::label(2), 'url' => array('admin')));
?>

<h1><?php 
echo GxHtml::encode(Atencion::label(2));
?>
</h1>

<?php 
$this->widget('zii.widgets.CListView', array('dataProvider' => $dataProvider, 'itemView' => '_view'));
Example #10
0
 public function esMia($user_id)
 {
     return Atencion::model()->exists('recarga_id =:recarga_id AND user_id = :user_id', array(':recarga_id' => $this->id, ':user_id' => $user_id));
 }
Example #11
0
 <span class="required">*</span> <?php 
echo Yii::t('app', 'are required');
?>
.
	</p>

	<?php 
echo $form->errorSummary($model);
?>

		<div class="row">
		<?php 
echo $form->labelEx($model, 'atencion_id');
?>
		<?php 
echo $form->dropDownList($model, 'atencion_id', GxHtml::listDataEx(Atencion::model()->findAllAttributes(null, true)));
?>
		<?php 
echo $form->error($model, 'atencion_id');
?>
		</div><!-- row -->
		<div class="row">
		<?php 
echo $form->labelEx($model, 'numero');
?>
		<?php 
echo $form->textField($model, 'numero', array('maxlength' => 45));
?>
		<?php 
echo $form->error($model, 'numero');
?>
Example #12
0
 public function actionCreaAtencion($id)
 {
     $model_recarga = null;
     $model_atencion = null;
     $model_recarga = $this->loadModel($id, 'Recarga');
     $session = Yii::app()->getSession();
     $id_user = $session['_id'];
     if ($id_user == NULL) {
         $id_user = Yii::app()->user->getId();
     }
     /****
     			VALIDACION SI ESTA ATENDIDA
     			*****/
     if ($model_recarga->estaAtendida()) {
         $model_atencion = $this->loadModel($model_recarga->atencion->id, 'Atencion');
         if ($model_recarga->esMia($id_user)) {
             $this->redirect(array('atencion/update', 'id' => $model_recarga->atencion->id));
         } else {
             $this->redirect(array('recarga/verPendientesOperador'));
         }
     } else {
         if ($id_user == NULL) {
             $this->redirect(array('site/login'));
         }
         /*****
         			CREACION DE ATENCION
         			******/
         try {
             $model_atencion = null;
             $model_atencion = new Atencion();
             $model_atencion->user_id = $id_user;
             $model_atencion->recarga_id = $id;
             $model_atencion->estado = "PROCESANDO";
             $model_atencion->comentario = "Operador: " . Yii::app()->user->getId();
             if ($model_atencion->save()) {
                 $model_recarga = null;
                 $model_recarga = $this->loadModel($id, 'Recarga');
                 $model_recarga->estado = "PROCESANDO";
                 $model_recarga->update(array('estado'));
                 $this->redirect(array('atencion/update', 'id' => $model_atencion->id));
             } else {
                 $this->redirect(array('recarga/verPendientesOperador'));
             }
         } catch (Exception $e) {
             $this->redirect(array('recarga/verPendientesOperador'));
         }
     }
 }
Example #13
0
     //Cancelar atenciĆ³n cliente
     require 'cliente.model.php';
     $getter = new Clientes();
     $getter->set_host(1);
     if (isset($_REQUEST['cli'])) {
         $cliente = $getter->limpiar_variable($_REQUEST['cli']);
     } else {
         echo '{"success": 0}';
         exit;
     }
     $getter->cancelar_atencion_cliente($cliente);
     break;
 case 15:
     //Calificar atenciĆ³n cliente
     require 'atencion.model.php';
     $getter = new Atencion();
     $getter->set_host(1);
     $error = 0;
     if (isset($_REQUEST['cal'])) {
         $params['calificacion'] = $getter->limpiar_variable($_REQUEST['cal']);
     } else {
         $error++;
     }
     if (isset($_REQUEST['ate'])) {
         $params['atencion'] = $getter->limpiar_variable($_REQUEST['ate']);
     } else {
         $error++;
     }
     if ($error == 0) {
         $getter->calificar_atencion_cliente($params);
     } else {