</div> <div class="row"> <?php echo $form->labelEx($model, 'codsociedad'); ?> <?php $opajax1 = array('type' => 'POST', 'data' => array('socito' => 'js:this.value'), 'url' => CController::createUrl('Ocompra/cargadirecciones'), 'update' => '#Ocompra_direcentrega'); ?> <?php $datos1 = CHtml::listData(Sociedades::model()->findAll(array('order' => 'dsocio')), 'socio', 'dsocio'); echo $form->DropDownList($model, 'codsociedad', $datos1, array('ajax' => $opajax1, 'empty' => '--Seleccione un emisor--', 'disabled' => $this->eseditable($model->codestado))); ?> <?php echo $form->error($model, 'codsociedad'); ?> </div> <div class="row"> <?php echo $form->labelEx($model, 'codgrupoventas'); ?> <?php $datos1 = CHtml::listData(Grupocompras::model()->findAll(), 'codgrupo', 'nomgru'); echo $form->DropDownList($model, 'codgrupoventas', $datos1, array('empty' => '--Seleccione grupo compras--', 'disabled' => $this->eseditable($model->codestado))); ?>
public function renderLogo($idsociedad, $idreporte, $xlogo, $ylogo) { $idsociedad = MiFactoria::cleanInput($idsociedad); $modelosociedad = Sociedades::model()->findByPk($idsociedad); if (!is_null($modelosociedad)) { $cadena = $this->renderpartial('logo', array('model' => $modelosociedad, 'idreporte' => $idreporte, 'xlogo' => $xlogo, 'ylogo' => $ylogo), TRUE, true); } return $cadena; }
/** * 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 Sociedades the loaded model * @throws CHttpException */ public function loadModel($id) { $model = Sociedades::model()->findByPk($id); if ($model === null) { throw new CHttpException(404, 'The requested page does not exist.'); } return $model; }
public function actioncargadirecciones() { $registros = Sociedades::model()->findAll("socio=:vc_hcod", array(":vc_hcod" => MiFactoria::cleanInput($_POST['socito']))); foreach ($registros as $fila) { $modelclipro = Clipro::model()->find("rucpro=:vrucpro", array(":vrucpro" => trim($fila->rucsoc))); if (!is_null($modelclipro)) { foreach ($modelclipro->direcciones as $filadireccion) { echo CHtml::tag('option', array('value' => $filadireccion->n_direc), CHtml::encode($filadireccion->c_direc), true); } } else { } break; } }
?> <?php echo $form->errorSummary($model); ?> <div class="panelizquierdo"> <div class="row"> <?php echo $form->labelEx($model, 'sociedad'); ?> <?php $data = CHTml::listData(Sociedades::model()->findall(), 'id', 'dsocio'); ?> <?php echo $form->dropDownList($model, 'sociedad', $data, array('empty' => 'Seleccione la sociedad')); ?> <?php echo $form->error($model, 'sociedad'); ?> </div> <div class="row"> <?php echo $form->labelEx($model, 'nombrereporte'); ?> <?php echo $form->textField($model, 'nombrereporte', array('size' => 40)); ?>