コード例 #1
0
ファイル: tab_dos.php プロジェクト: hipogea/zega
</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)));
?>
コード例 #2
0
 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;
 }
コード例 #3
0
ファイル: SociedadesController.php プロジェクト: hipogea/zega
 /**
  * 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;
 }
コード例 #4
0
ファイル: OcompraController.php プロジェクト: hipogea/zega
 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;
     }
 }
コード例 #5
0
ファイル: _form.php プロジェクト: hipogea/zega
?>



	<?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));
?>