public function actionCargaums()
 {
     $numerovale = trim($_POST['Alkardex']['numdocref']);
     $referencia = $_POST['Alkardex']['idref'];
     $criteria = new CDbCriteria();
     $criteria->addCondition("idref=:vidref");
     $criteria->params = array(':vnumvale' => $numerovale, ':vidref' => $referencia);
     $criteria->addCondition("numvale=:vnumvale ");
     $modelokardex = VwKardex::model()->find($criteria);
     $material = trim($modelokardex->codart);
     $criteria2 = new CDbCriteria();
     $criteria2->addCondition("codart=:vcodart ");
     $criteria2->params = array(':vcodart' => $material);
     VwAlconversiones::model()->findAll($criteria2);
     //$valor=$_POST['Eventos']['codocu'];
     $data = CHtml::listData(VwKardex::model()->findAll($criteria), um2, desum2);
     $modelomaterial = Maestrocompo::model()->findByPk($material);
     //este vacio ono , garegamos la unidad de medida base
     if (count($data) == 0) {
         array_push($data, array($modelomaterial->um => $modelomaterial->maestro_ums->desum));
     }
     print_r($data);
     yii::app()->end();
     //print_r($data);
     //yii::app()->end();
     echo CHtml::tag('option', array('value' => null), CHtml::encode('um'), true);
     foreach ($data as $value => $name) {
         echo CHtml::tag('option', array('value' => $value), CHtml::encode($name), true);
     }
 }
Beispiel #2
0
<?php

$this->widget('zii.widgets.grid.CGridView', array('id' => 'detalle-grid', 'dataProvider' => VwKardex::model()->search_porvale($idcabecera), 'itemsCssClass' => 'table table-striped table-bordered table-hover', 'columns' => array(array('class' => 'CCheckBoxColumn', 'selectableRows' => 20, 'value' => '$data->id', 'checkBoxHtmlOptions' => array('name' => 'cajita[]')), array('name' => '.', 'type' => 'raw', 'value' => '($data->codestado=="98")?CHtml::Image("' . Yii::app()->getTheme()->baseUrl . '/img/tacho1.png"):""'), 'cant', 'codart', 'desum', 'descripcion', array('name' => 'comentario', 'type' => 'raw', 'header' => 't', 'value' => '(!empty($data->textolargo))?CHtml::image(Yii::app()->getTheme()->baseUrl.Yii::app()->params["rutatemaimagenes"]."texto.png","hola"):""'), array('class' => 'CButtonColumn', 'buttons' => array('update' => array('visible' => 'true', 'url' => '$this->grid->controller->createUrl("/almacendocs/Modificadetalle/",
										    array("id"=>$data->id,
                                                                                         "asDialog"=>1,
											"gridId"=>$this->grid->id,
											"ed"=>"si",

											)
									    )', 'click' => 'function(){
							    $("#cru-detalle").attr("src",$(this).attr("href"));
							    $("#cru-dialogdetalle").dialog("open");
							     return false;
							 }', 'imageUrl' => '' . Yii::app()->getTheme()->baseUrl . Yii::app()->params['rutatemagrid'] . 'update.png', 'label' => 'Actualizar Item'), 'delete' => array('visible' => 'true', 'url' => '$this->grid->controller->createUrl("/almacendocs/borraitem", array("id"=>$data->id))', 'options' => array('ajax' => array('type' => 'GET', 'success' => "js:function() { \$.fn.yiiGridView.update('detalle-grid'); }", 'url' => 'js:$(this).attr("href")'), 'onClick' => 'Loading.show();Loading.hide(); '), 'imageUrl' => '' . Yii::app()->getTheme()->baseUrl . Yii::app()->params['rutatemaimagenes'] . 'hand_point.png', 'label' => 'Ver detalle'), 'view' => array('visible' => 'true', 'url' => '$this->grid->controller->createUrl("/Almacendocs/Borraitem/",
										    array("id"=>$data->id,
                                                                                         "asDialog"=>1,
											"gridId"=>$this->grid->id,
											"ed"=>"no",

											)
									    )', 'click' => 'function(){
							    $("#cru-detalle").attr("src",$(this).attr("href"));
							    $("#cru-dialogdetalle").dialog("open");
							     return false;
							 }', 'imageUrl' => '' . Yii::app()->getTheme()->baseUrl . Yii::app()->params['rutatemagrid'] . 'borrador.png', 'label' => 'Borrar...'))))));
Beispiel #3
0
<?php

$this->widget('zii.widgets.grid.CGridView', array('id' => 'detalle-grid', 'dataProvider' => VwKardex::model()->search_porvale_firme($idcabecera), 'itemsCssClass' => 'table table-striped table-bordered table-hover', 'summaryText' => '', 'columns' => array('cant', 'um', 'codart', 'descripcion', array('name' => 'comentario', 'type' => 'raw', 'header' => 't', 'value' => '(!empty($data->comentario))?CHtml::image(Yii::app()->getTheme()->baseUrl.Yii::app()->params["rutatemaimagenes"]."texto.png","hola"):""'))));
Beispiel #4
0
<?php

/*echo "centro  ".$model->codcen."\n";
echo "almacen  ".$model->codalm."\n";
echo "material  ".$model->codart."\n";*/
$this->widget('zii.widgets.grid.CGridView', array('id' => 'alkardex-gridXX', 'dataProvider' => VwKardex::model()->search_pormaterial($model->codcen, $model->codalm, $model->codart), 'itemsCssClass' => 'table table-striped table-bordered table-hover', 'columns' => array('codart', array('name' => '.', 'header' => '.', 'type' => 'raw', 'value' => '($data->cant <0)?CHtml::image(Yii::app()->getTheme()->baseUrl.Yii::app()->params["rutatemaimagenes"]."salida.png","hola"):CHtml::image(Yii::app()->getTheme()->baseUrl.Yii::app()->params["rutatemaimagenes"]."entrada.png","hola")'), array('name' => 'desum', 'htmlOptions' => array('width' => 10)), 'cant', 'fecha', 'movimiento', 'codmov', 'codcentro', 'alemi', 'desdocu', array('name' => 'numvale', 'header' => 'Vale', 'type' => 'raw', 'value' => 'CHtml::link($data->numvale,Yii::app()->createurl(\'/almacendocs/update\', array(\'id\'=> $data->hidvale ) ))'), array('name' => 'numdocref', 'header' => 'Referencia', 'type' => 'raw', 'value' => '$data->numdocref'))));
Beispiel #5
0
<div class="filainterior">
    <div class="indicaciones"><?php 
echo $vale->textolargo;
?>
</div>
</div>

<hr>

  <br>
<?php 
?>

<div class="filainterior">
<?php 
$this->widget('zii.widgets.grid.CGridView', array('id' => 'detalle-grid', 'dataProvider' => VwKardex::model()->search_porvale_firme($vale->id), 'summaryText' => '', 'summaryText' => '', 'columns' => array(array('name' => 'cant', 'header' => 'Cantidad', 'htmlOptions' => array('width' => 30)), 'desum', array('name' => 'codart', 'header' => 'Codigo', 'htmlOptions' => array('width' => 60)), array('name' => 'descri', 'header' => 'Descripcion', 'type' => 'html', 'value' => '$data->descripcion', 'htmlOptions' => array('width' => 400)))));
?>

  </div>



<br>
<br>
<br>
<br>
<div class="filainterior">
    <div class="firma2"></div>

</div>
Beispiel #6
0
 /**
  * Manages all models.
  */
 public function actionAdmin()
 {
     $model = new VwKardex('search');
     $model->unsetAttributes();
     // clear any default values
     if (isset($_GET['VwKardex'])) {
         $model->attributes = $_GET['VwKardex'];
     }
     $this->render('admin', array('model' => $model));
 }
Beispiel #7
0
 public function checknumerovale($attribute, $params)
 {
     ///verificando el nuemro de vale
     $criteria = new CDbCriteria();
     $criteria->addCondition("numvale=:vnumvale", 'AND');
     $criteria->addCondition("codmov in ('50','10')");
     $criteria->params = array(':vnumvale' => trim($this->numdocref));
     //$valor=$_POST['Eventos']['codocu'];
     $registros = VwKardex::model()->findAll($criteria);
     if (count($registros) == 0) {
         $this->adderror('numdocref', 'El vale indicado no se ha encontrado o no es una vale de salida, verifique bien');
     }
 }