示例#1
0
文件: update.php 项目: dev-lav/htdocs
<?php

$this->breadcrumbs = array($model->label(2) => array('index'), GxHtml::valueEx($model) => array('view', 'id' => GxActiveRecord::extractPkValue($model, true)), Yii::t('app', 'Editar'));
$this->menu = array(array('label' => Yii::t('app', 'Listar') . ' ' . $model->label(2), 'url' => array('index')), array('label' => Yii::t('app', 'Agregar') . ' ' . $model->label(), 'url' => array('create')), array('label' => Yii::t('app', 'Ver') . ' ' . $model->label(), 'url' => array('view', 'id' => GxActiveRecord::extractPkValue($model, true))), array('label' => Yii::t('app', 'Administrar') . ' ' . $model->label(2), 'url' => array('admin')));
?>

<h1><?php 
echo Yii::t('app', 'Editar') . ' ' . GxHtml::encode($model->label()) . ' Patente N°: ' . '<font color="yellow">' . OrdenTrabajo::formatearPatente(GxHtml::encode(GxHtml::valueEx($model))) . '</font>';
?>
</h1>

<?php 
$this->renderPartial('_form', array('model' => $model));
示例#2
0
文件: view.php 项目: dev-lav/htdocs
<?php

$this->breadcrumbs = array($model->label(2) => array('index'), GxHtml::valueEx($model));
$this->menu = array(array('label' => Yii::t('app', 'Agregar') . ' ' . $model->label(), 'url' => array('create?factura=' . $model->idRf . '&id=' . $model->id_rf)), array('label' => Yii::t('app', 'Listar') . ' ' . $model->label(2), 'url' => array('index')), array('label' => Yii::t('app', 'Editar') . ' ' . $model->label(), 'url' => array('update', 'id' => $model->id)), array('label' => Yii::t('app', 'Borrar') . ' ' . $model->label(), 'url' => '#', 'linkOptions' => array('submit' => array('delete', 'id' => $model->id), 'confirm' => 'Are you sure you want to delete this item?')), array('label' => Yii::t('app', 'Administrar') . ' ' . $model->label(2), 'url' => array('admin')));
?>

<h1><?php 
echo GxHtml::encode($model->label()) . ' Nro.° ' . "<font color='yellow'>" . GxHtml::encode(GxHtml::valueEx($model)) . "</font>";
?>
</h1>

<?php 
$this->widget('zii.widgets.CDetailView', array('data' => $model, 'attributes' => array(array('name' => 'idVehiculo', 'type' => 'raw', 'value' => $model->idVehiculo !== null ? GxHtml::link(OrdenTrabajo::formatearPatente($model->idVehiculo), array('vehiculos/view', 'id' => GxActiveRecord::extractPkValue($model->idVehiculo, true))) : null), array('name' => 'idRf', 'type' => 'raw', 'value' => $model->idRf !== null ? GxHtml::link(GxHtml::encode(GxHtml::valueEx($model->idRf)), array('registroFactura/view', 'id' => GxActiveRecord::extractPkValue($model->idRf, true))) : null), array('name' => 'kilometraje', 'type' => 'raw', 'value' => OrdenTrabajo::formatearKm($model->kilometraje)), 'fecha', 'creado', 'modificado')));
$mazo = 1;
$this->widget('zii.widgets.grid.CGridView', array('id' => 'detallesOt-grid', 'summaryText' => '', 'dataProvider' => $detOt, 'columns' => array(array('name' => 'id_detalle_reparacion', 'value' => '$data->idDetalleReparacion == null ? null : $data->idDetalleReparacion->nombre'), array('name' => 'id_marca', 'value' => '$data->idMarca == null ? null : $data->idMarca->nombre'), array('name' => 'cantidad', 'value' => '$data->cantidad', 'htmlOptions' => array('style' => 'text-align: right;')), array('name' => 'precio_unitario', 'value' => 'OrdenTrabajo::formatearPeso($data->precio_unitario)', 'htmlOptions' => array('style' => 'text-align: right;')), array('name' => 'subtotal', 'value' => 'OrdenTrabajo::formatearPeso($data->subtotal)', 'htmlOptions' => array('style' => 'text-align: right;')), array('name' => 'observacion', 'value' => '$data->observacion'))));
示例#3
0
文件: pg.php 项目: dev-lav/htdocs
<?php 
echo CHtml::endForm();
?>
    
</div><!-- form -->
<div chart>
<?php 
if (isset($dataProvider) && ($data = $dataProvider->getData()) != null) {
    for ($i = 0; $i < 12; $i++) {
        $dataHc[$i] = 0;
    }
    foreach ($data as $da) {
        $dataHc[$da['mes'] - 1] = (int) $da['gastoMensual'];
    }
    if (isset($_GET['cv']) && $_GET['cv'] == true) {
        $texto = ' del vehiculo patente ' . OrdenTrabajo::formatearPatente($_GET['patente']);
    } else {
        $texto = '';
    }
    $this->Widget('ext.highcharts.HighchartsWidget', array('options' => array('title' => array('text' => 'Progreso Gastos Reparaciones Año ' . $anio . $texto), 'tooltip' => array('formatter' => 'js:function(){ return "<b>Gastos de "+ this.x +":</b>"+ formatCurrency(this.y); }'), 'xAxis' => array('categories' => array('Enero', 'Febrero', 'Marzo', 'Abril', 'Mayo', 'Junio', 'Julio', 'Agosto', 'Septiembre', 'Octubre', 'Noviembre', 'Diciembre')), 'yAxis' => array('title' => array('text' => 'Gasto Reparacion')), 'series' => array(array('name' => 'Gasto' . ' Año ' . $anio . $texto, 'data' => $dataHc)), 'credits' => array('enabled' => false))));
} else {
    echo 'No hay resultados';
}
?>
</div>

<script type="text/javascript">
    function formatCurrency(num) 
{
num = num.toString().replace(/\$|\,/g,'');
示例#4
0
文件: view.php 项目: dev-lav/htdocs
<?php 
$this->breadcrumbs = array($model->label(2) => array('index'), GxHtml::valueEx($model));
$this->menu = array(array('label' => Yii::t('app', 'Listar') . ' ' . $model->label(2), 'url' => array('index')), array('label' => Yii::t('app', 'Agregar') . ' ' . $model->label(), 'url' => array('create')), array('label' => Yii::t('app', 'Editar') . ' ' . $model->label(), 'url' => array('update', 'id' => $model->id)), array('label' => Yii::t('app', 'Borrar') . ' ' . $model->label(), 'url' => '#', 'linkOptions' => array('submit' => array('delete', 'id' => $model->id), 'confirm' => 'Are you sure you want to delete this item?')), array('label' => Yii::t('app', 'Administrar') . ' ' . $model->label(2), 'url' => array('admin')));
?>

<h1><?php 
echo GxHtml::encode($model->label()) . ' Patente N°: ' . '<font color="yellow">' . OrdenTrabajo::formatearPatente(GxHtml::encode(GxHtml::valueEx($model))) . '</font>';
?>
</h1>

<?php 
$this->widget('zii.widgets.CDetailView', array('data' => $model, 'attributes' => array(array('name' => 'idCombustible0', 'type' => 'raw', 'value' => $model->idCombustible0 !== null ? GxHtml::link(GxHtml::encode(GxHtml::valueEx($model->idCombustible0)), array('combustibles/view', 'id' => GxActiveRecord::extractPkValue($model->idCombustible0, true))) : null), array('name' => 'idTipoVehiculo0', 'type' => 'raw', 'value' => $model->idTipoVehiculo0 !== null ? GxHtml::link(GxHtml::encode(GxHtml::valueEx($model->idTipoVehiculo0)), array('tiposVehiculos/view', 'id' => GxActiveRecord::extractPkValue($model->idTipoVehiculo0, true))) : null), array('name' => 'idProveedor0', 'type' => 'raw', 'value' => $model->idProveedor0 !== null ? GxHtml::link(GxHtml::encode(GxHtml::valueEx($model->idProveedor0)), array('proveedores/view', 'id' => GxActiveRecord::extractPkValue($model->idProveedor0, true))) : null), array('name' => 'idMarca0', 'type' => 'raw', 'value' => $model->idMarca0 !== null ? GxHtml::link(GxHtml::encode(GxHtml::valueEx($model->idMarca0)), array('marcasVehiculos/view', 'id' => GxActiveRecord::extractPkValue($model->idMarca0, true))) : null), array('name' => 'idModelo0', 'type' => 'raw', 'value' => $model->idModelo0 !== null ? GxHtml::link(GxHtml::encode(GxHtml::valueEx($model->idModelo0)), array('modelosVehiculos/view', 'id' => GxActiveRecord::extractPkValue($model->idModelo0, true))) : null), array('name' => 'idColor0', 'type' => 'raw', 'value' => $model->idColor0 !== null ? GxHtml::link(GxHtml::encode(GxHtml::valueEx($model->idColor0)), array('coloresVehiculos/view', 'id' => GxActiveRecord::extractPkValue($model->idColor0, true))) : null), array('name' => 'precioCompra', 'type' => 'raw', 'value' => OrdenTrabajo::formatearPeso($model->precioCompra)), array('name' => 'Año', 'type' => 'raw', 'value' => $model->ano), array('name' => 'estado', 'type' => 'raw', 'value' => $model->saberEstado($model->estado)), 'creado', 'modificado')));
$this->widget('zii.widgets.grid.CGridView', array('id' => 'ordenesvh-grid', 'summaryText' => 'Mostrando del {start} al {end} de {count} resultado(s).', 'pager' => array('header' => '', 'prevPageLabel' => 'Anterior', 'nextPageLabel' => 'Siguiente'), 'dataProvider' => $dataProvider, 'columns' => array(array('name' => 'nro_factura', 'value' => '$data->idRf->nro_factura', 'htmlOptions' => array('style' => 'text-align: right;')), array('name' => 'Fecha Factura', 'value' => '$data->idRf->fecha', 'htmlOptions' => array('style' => 'text-align: center;')), array('name' => 'nro_guia', 'value' => '$data->nro_guia', 'htmlOptions' => array('style' => 'text-align: right;')), array('name' => 'Fecha Guia', 'value' => '$data->fecha', 'htmlOptions' => array('style' => 'text-align: center;')), array('header' => 'Kilometraje', 'value' => 'OrdenTrabajo::formatearKm($data->kilometraje)', 'htmlOptions' => array('style' => 'text-align: right;')), array('header' => 'Subtotal', 'value' => 'OrdenTrabajo::formatearPeso($data->sumita)', 'htmlOptions' => array('style' => 'text-align: right;')), array('class' => 'CButtonColumn', 'header' => 'Opciones', 'htmlOptions' => array('width' => 120), 'template' => '{view}{update}{delete}', 'buttons' => array('view' => array('label' => 'Ver', 'url' => 'Yii::app()->createUrl("ordentrabajo/view", array("id"=>$data->id))', 'imageUrl' => Yii::app()->baseUrl . '/images/ver.png'), 'update' => array('label' => 'Editar', 'url' => 'Yii::app()->createUrl("ordentrabajo/update", array("id"=>$data->id))', 'imageUrl' => Yii::app()->baseUrl . '/images/editar.png'), 'delete' => array('label' => 'Borrar', 'url' => 'Yii::app()->createUrl("ordentrabajo/delete", array("id"=>$data->id))', 'imageUrl' => Yii::app()->baseUrl . '/images/delete.png'))))));
$this->widget('zii.widgets.CDetailView', array('data' => $model, 'attributes' => array(array('name' => 'Gasto Acumulado', 'value' => $model->sumarGasto()))));
?>