Beispiel #1
0
<?php

if (strtolower($this->action->id) == 'verdocumento') {
    $proveedor = Docompra::model()->search_por_compra($filtro);
} else {
    $proveedor = Docompratemp::model()->search_por_compra($filtro);
}
$descuento = $model->descuento + 0;
//var_dump($descuento);yii::app()->end();
?>
<div id="AjFlash" class="flash-regular"></div>
<?php 
$this->widget('zii.widgets.grid.CGridView', array('id' => 'detalle-grid', 'dataProvider' => $proveedor, 'itemsCssClass' => 'table table-striped table-bordered table-hover', 'summaryText' => '>', 'columns' => array(array('class' => 'CCheckBoxColumn', 'selectableRows' => 20, 'value' => '$data->idtemp', 'checkBoxHtmlOptions' => array('name' => 'cajita[]')), array('name' => 'st.', 'header' => 'st', 'type' => 'raw', 'value' => 'CHtml::image(Yii::app()->getTheme()->baseUrl.Yii::app()->params["rutatemaimagenes"].$data->coddocu.$data->estadodetalle.".png")'), 'codentro', 'codigoalma', 'item', 'cant', 'ums.desum', 'codart', 'descri', array('name' => 'texto', 'type' => 'raw', 'header' => 't', 'value' => '(!empty($data->detalle))?CHtml::image(Yii::app()->getTheme()->baseUrl.Yii::app()->params["rutatemaimagenes"]."texto.png","hola"):""'), 'punit', array('name' => 'Bruto', 'header' => 'Bruto', 'value' => 'Mifactoria::decimal($data->cant*($data->punit),2)', 'footer' => Chtml::openTag("span", array("class" => "label label-info")) . MiFactoria::decimal(Docompratemp::getTotal($proveedor)["bruto"], 2) . CHTml::CloseTag("span")), array('name' => 'Descuento', 'visible' => $descuento > 0 ? true : false, 'header' => 'Dcto', 'value' => 'Mifactoria::decimal($data->cant*$data->punit*($data->ocompra->descuento/100),2)', 'footer' => Chtml::openTag("span", array("class" => "label label-info")) . MiFactoria::decimal(Docompratemp::getTotal($proveedor)["descuento"], 2) . CHTml::CloseTag("span")), array('name' => 'potal', 'value' => 'Mifactoria::decimal(($data->punit*(1-$data->ocompra->descuento/100))*$data->cant,2)', 'footer' => Chtml::openTag("span", array("class" => "label label-info")) . MiFactoria::decimal(Docompratemp::getTotal($proveedor)["total"], 2) . CHTml::CloseTag("span")), array('class' => 'CButtonColumn', 'buttons' => array('view' => array('visible' => 'false'), 'update' => array('visible' => $this->eseditable($model->{$this->campoestado}) ? 'false' : 'true', 'url' => '$this->grid->controller->createUrl("/Ocompra/Modificadetalle/",
										    array("id"=>$data->idtemp,
                                                                                         "asDialog"=>1,
											"gridId"=>$this->grid->id
											)
									    )', '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' => $this->eseditable($model->{$this->campoestado}) ? 'false' : 'true', 'url' => '$this->grid->controller->createUrl("/Ocompra/borraitem", array("identi"=>$data->id,"idcabecera"=>$data->hidguia))', 'options' => array('ajax' => array('type' => 'GET', 'success' => "js:function() { \$.fn.yiiGridView.update('detalle-grid'); }", 'url' => 'js:$(this).attr("href")')), 'imageUrl' => '' . Yii::app()->getTheme()->baseUrl . Yii::app()->params['rutatemaimagenes'] . 'borrador.png', 'label' => 'Borrary'))))));
Beispiel #2
0
<?php

$this->menu = array(array('label' => 'Ver docs', 'url' => array('admin')));
$prove = VwStockPorTipos::model()->search_por_almacen($model->codalm, $model->codcen);
?>




<?php 
$this->widget('zii.widgets.grid.CGridView', array('id' => 'almacenes-grid', 'dataProvider' => $prove, 'itemsCssClass' => 'table table-striped table-bordered table-hover', 'columns' => array('codcen', 'codtipo', 'destipo', array('name' => 'stocklibre', 'value' => 'MiFactoria::decimal($data->stocklibre)', 'footer' => Chtml::openTag("span", array("class" => "label label-info")) . MiFactoria::decimal(VwStockPorTipos::getTotal($prove)["libre"], 2) . CHTml::CloseTag("span")), array('name' => 'stockreservado', 'value' => 'MiFactoria::decimal($data->stockreservado)', 'footer' => Chtml::openTag("span", array("class" => "label label-info")) . MiFactoria::decimal(VwStockPorTipos::getTotal($prove)["reservado"], 2) . CHTml::CloseTag("span")), array('name' => 'stocktransito', 'value' => 'MiFactoria::decimal($data->stocktransito)', 'footer' => Chtml::openTag("span", array("class" => "label label-info")) . MiFactoria::decimal(VwStockPorTipos::getTotal($prove)["transito"], 2) . CHTml::CloseTag("span")), array('class' => 'CButtonColumn', 'template' => '{view}{update}'))));
Beispiel #3
0
<?php

/* @var $this AlmacenesController */
/* @var $model Almacenes */
$this->breadcrumbs = array('Almacenes' => array('index'), 'Manage');
$this->menu = array(array('label' => 'Ver docs', 'url' => array('admin')));
Yii::app()->clientScript->registerScript('search', "\n\$('.search-button').click(function(){\n\t\$('.search-form').toggle();\n\treturn false;\n});\n\$('.search-form form').submit(function(){\n\t\$('#almacenes-grid').yiiGridView('update', {\n\t\tdata: \$(this).serialize()\n\t});\n\treturn false;\n});\n");
?>

<?php 
$prove = $model->search();
?>


<h1><?php 
echo CHtml::image(Yii::app()->getTheme()->baseUrl . Yii::app()->params["rutatemaimagenes"] . "chart_bar.png");
?>
 Almacenes</h1>

<?php 
$this->widget('zii.widgets.grid.CGridView', array('id' => 'almacenes-grid', 'dataProvider' => $proveedor, 'itemsCssClass' => 'table table-striped table-bordered table-hover', 'columns' => array('codcen', array('name' => 'codalm', 'type' => 'raw', 'value' => 'CHtml::link($data["codalm"],Yii::app()->createUrl("Almacenes/detalle",array("codalmacen"=>$data[\'codalm\'],"codcentro"=>$data[\'codcen\'])))'), 'nomal', array('name' => 'Libre', 'value' => 'MiFactoria::decimal($data["stock_cantlibre"])', 'footer' => Chtml::openTag("span", array("class" => "label label-info")) . MiFactoria::decimal($stocktotales['stock_cantlibre'], 2) . CHTml::CloseTag("span")), array('name' => 'Reservado', 'value' => 'MiFactoria::decimal($data["stock_cantres"])', 'footer' => Chtml::openTag("span", array("class" => "label label-info")) . MiFactoria::decimal($stocktotales['stock_cantres'], 2) . CHTml::CloseTag("span")), array('name' => 'Transito', 'value' => 'MiFactoria::decimal($data["stock_canttran"])', 'footer' => Chtml::openTag("span", array("class" => "label label-info")) . MiFactoria::decimal($stocktotales['stock_canttran'], 2) . CHTml::CloseTag("span")), array('name' => 'Total', 'value' => 'MiFactoria::decimal($data["stock_total"])', 'footer' => Chtml::openTag("span", array("class" => "label label-info")) . MiFactoria::decimal($stocktotales['stock_total'], 2) . CHTml::CloseTag("span")))));
Beispiel #4
0
 /**
  * Display current model attributes as json string in hidden block
  * for "save filter" js function.
  */
 public function insertModelAttributes()
 {
     if ($this->getModelAttributes()) {
         $attrs = array();
         foreach ($this->getModelAttributes() as $key => $value) {
             if ($value !== null) {
                 $attrs[get_class($this->filter) . '[' . $key . ']'] = $value;
             }
         }
         if (!empty($attrs)) {
             echo Chtml::openTag('div', array('id' => $this->getId() . 'HiddenJsonAttributes', 'style' => 'display:none'));
             echo json_encode($attrs);
             echo CHtml::closeTag('div');
         }
     }
 }
Beispiel #5
0
<?php

/* @var $this SiteController */
/* @var $error array */
$this->pageTitle = Yii::app()->name . ' - Error';
$this->breadcrumbs = array('Error');
echo Chtml::openTag('div', array('class' => 'col-sm-12 col-xs-8'));
echo Chtml::openTag('div', array('class' => 'col-sm-10', 'style' => 'margin:0px auto;float: none;'));
echo Chtml::openTag('div', array('style' => 'width: 70%;display: inline-block;', 'align' => 'center'));
echo Chtml::imageButton(Yii::app()->baseUrl . "/images/img_" . $code . ".png", array());
?>
    <h3 style="color: #00a0e9;" align="left">&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;
        <?php 
echo CHtml::encode($message);
?>
    </h3>
<?php 
echo CHtml::closeTag('div');
echo Chtml::imageButton(Yii::app()->baseUrl . "/images/img_" . substr($code, 0, 1) . "_bj.png", array('style' => 'width: 30%;'));
echo CHtml::closeTag('div');
echo CHtml::closeTag('div');