Ejemplo n.º 1
0
<div style=" width:300px;  " >
<?php 
if ($codprov == '') {
    $codprov = null;
}
$this->widget('zii.widgets.grid.CGridView', array('summaryText' => '', 'id' => 'precios-grid', 'dataProvider' => Ocompra::historicoprecios($codigom, $codprov), 'columns' => array(array('name' => 'fecdoc', 'header' => 'Fec', 'value' => 'date("d.m.y", strtotime($data["fecdoc"]))', 'htmlOptions' => array('width' => 40)), array('name' => 'numcot', 'header' => 'O.c.', 'value' => '$data["numcot"]', 'htmlOptions' => array('width' => 40)), array('name' => 'punit', 'header' => 'P Unit', 'value' => 'Mifactoria::decimal($data["punit"],2)', 'htmlOptions' => array('width' => 40)), array('name' => 'moneda', 'header' => 'Moneda', 'value' => '$data["moneda"]', 'htmlOptions' => array('width' => 15)), array('name' => 'umbase', 'header' => 'Um', 'value' => '$data["desumbase"]', 'htmlOptions' => array('width' => 20)))));
?>
</div>
Ejemplo n.º 2
0
 public function actionRutas()
 {
     // echo Contactos::getListMailContacto ( 33 , '421' ) ;
     $cadena = yii::app()->correo->correo_simple('*****@*****.**', '*****@*****.**', 'SOLICITUD DE COTIZACION', " favor de cotizar los siguiente s mateiale   ");
     var_dump($cadena);
     yii::app()->end();
     $modelokardex = Alkardex::model()->findByPk(2408);
     // $transacc=Yii::app()->db->beginTransaction();
     $nuevo = new Alkardex();
     $nuevo->attributes = $modelokardex->attributes;
     $nuevo->numdocref = 'PICHOx';
     $nuevo->save();
     print_r($nuevo->attributes);
     yii::app()->end();
     $model = new Desolpe();
     $model->save();
     yii::app()->mensajes->clear();
     yii::app()->mensajes->setmessageitem('350', 456, "eSTE ES MI PRIMER MEJSAE ", 'notice');
     yii::app()->mensajes->setmessageitem('350', 455, "eSTE ES MI segundo MEJSAE ", 'notice');
     yii::app()->mensajes->setmessageitem('350', 455, yii::app()->mensajes->getErroresItem($model->geterrors()), 'error');
     yii::app()->mensajes->setmessageitem('350', 455, "eSTE ES MI tercer MEJSAE ", 'notice');
     //print_r(yii::app()->session['errores']);
     $matriz = yii::app()->mensajes->getMessages('350');
     print_r($matriz);
     yii::app()->end();
     var_dump(Ocompra::puedeautorizar());
     var_dump(Montoinventario::datosgrafo('mes', 6, null));
     $mo = new Alinventario();
     print_r($mo->getStockValAlmacen());
     $data = Ocompra::historicoprecios('18005720');
     print_r($data->getData());
     echo " Yii::getPathOfAlias('webroot') :  " . Yii::getPathOfAlias('webroot') . "<br>";
     //echo "yii::app()->params['webRoot']     :     ".yii::app()->params['webRoot']."<br> ";
     echo "yii::app()->baseUrl     :     " . yii::app()->baseUrl . "<br> ";
     echo "yii::app()->getBaseUrl(true)     :     " . yii::app()->getBaseUrl(true) . "<br> ";
     echo "yii::app()->getBaseUrl(false)     :     " . yii::app()->getBaseUrl(false) . "<br> ";
     echo "yii::app()->basePath      :     " . yii::app()->basePath . "<br> ";
     echo "yii::app()->baseUrl     :     " . yii::app()->baseUrl . "<br> ";
     echo "Yii::app()->getTheme()->baseUrl    :    " . Yii::app()->getTheme()->baseUrl . "<br> ";
     echo "Yii::app()->getTheme()->basePath    :    " . Yii::app()->getTheme()->basePath . "<br> ";
     echo "Yii::app()->getTheme()->systemViewPath    :    " . Yii::app()->getTheme()->systemViewPath . "<br> ";
     echo "Yii::app()->getTheme()->viewPath    :    " . Yii::app()->getTheme()->viewPath . "<br> ";
     echo "Yii::app()->getHomeUrl()            :    " . Yii::app()->getHomeUrl() . "  <br>";
     echo "Yii::app()->runtimePath             :  " . Yii::app()->runtimePath . "<br> ";
     echo "yii::app()->request->getServerName()     :     " . yii::app()->request->getServerName() . "<br> ";
     echo "yii::app()->request->hostInfo     :     " . yii::app()->request->hostInfo . "<br> ";
     echo "yii::app()->request->pathInfo     :     " . yii::app()->request->pathInfo . "<br> ";
     echo "yii::app()->request->serverName     :     " . yii::app()->request->serverName . "<br> ";
     echo "yii::app()->request->url     :     " . yii::app()->request->url . "<br> ";
     echo "yii::app()->request->userHostAddress     :     " . yii::app()->request->userHostAddress . "<br> ";
     echo "<br><br><br>";
     echo "<br><br><br>";
     echo "Archivos del directorio " . Yii::app()->getTheme()->basePath . "  <br>";
     $archivos = CFileHelper::findFiles(Yii::app()->getTheme()->basePath . DIRECTORY_SEPARATOR . 'css' . DIRECTORY_SEPARATOR . 'reportes', array('fileTypes' => array('css'), 'exclude' => array(), 'level' => -1, 'absolutePaths' => false));
     print_r($archivos);
 }