<?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()) . ' ' . GxHtml::encode(GxHtml::valueEx($model)); ?> </h1> <?php $this->widget('zii.widgets.CDetailView', array('data' => $model, 'attributes' => array('ano', array('name' => 'Total Neto', 'value' => OrdenTrabajo::formatearPeso($model->ppto_anual)), array('name' => 'Total Neto', 'value' => OrdenTrabajo::formatearPeso($model->ppto_mensual)), 'creado', 'modificado'))); ?>
<?php echo isset($data3[0]['ppto_anual']) ? OrdenTrabajo::formatearPeso($data3[0]['ppto_anual']) : '$ 0'; ?> <br /> <b><?php echo 'Presupuesto Mensual'; ?> :</b> <?php echo isset($data3[0]['ppto_mensual']) ? OrdenTrabajo::formatearPeso($data3[0]['ppto_mensual']) : '$ 0'; ?> <br /> <b><?php echo 'Presupuesto Anual Disponible'; ?> :</b> <?php echo isset($data4[0]['total']) && isset($data3[0]['ppto_mensual']) ? OrdenTrabajo::formatearPeso($data3[0]['ppto_anual'] - $data4[0]['total']) : '$ 0'; ?> <br /> <b><?php echo 'Presupuesto Mensual Disponible'; ?> :</b> <?php echo isset($data3[0]['ppto_mensual']) ? OrdenTrabajo::formatearPeso($data3[0]['ppto_mensual'] - $data2[0]['total']) : '$ 0'; ?> <br />
<?php $this->breadcrumbs = array($model->label(2) => array('index'), GxHtml::valueEx($model)); $this->menu = array(array('label' => Yii::t('app', 'Agregar') . ' ' . $model->getRelationLabel('ordenTrabajos', 1), 'url' => array('ordentrabajo/create?factura=' . $model->nro_factura . '&id=' . $model->id)), array('label' => Yii::t('app', 'Administrar') . ' ' . $model->label(2), 'url' => array('admin')), 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?'))); ?> <h1><?php echo GxHtml::encode($model->label()) . ' N° ' . "<font color='yellow'>" . GxHtml::encode(GxHtml::valueEx($model)) . "</font>"; ?> </h1> <?php $this->widget('zii.widgets.CDetailView', array('data' => $model, 'attributes' => array(array('name' => 'idProveedor', 'type' => 'raw', 'value' => $model->idProveedor !== null ? GxHtml::link(GxHtml::encode(GxHtml::valueEx($model->idProveedor)), array('proveedores/view', 'id' => GxActiveRecord::extractPkValue($model->idProveedor, true))) : null), 'fecha', 'creado', 'modificado'))); $this->widget('zii.widgets.grid.CGridView', array('id' => 'ordenes-grid', 'summaryText' => '', 'dataProvider' => $OrdenTrabajo, 'columns' => array(array('name' => 'nro_guia', 'value' => '$data->nro_guia', 'htmlOptions' => array('style' => 'text-align: right;')), array('header' => 'Patente', 'value' => 'OrdenTrabajo::formatearPatente($data->idVehiculo->patente)', 'htmlOptions' => array('style' => 'text-align: center;')), array('name' => 'fecha', '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' => 'Total Neto', 'value' => OrdenTrabajo::formatearPeso($model->total_neto)), array('name' => 'Total Bruto', 'value' => OrdenTrabajo::formatearPeso($model->total_bruto)))));
?> <br /> <?php echo GxHtml::encode($data->getAttributeLabel('ppto_anual')); ?> : <?php echo GxHtml::encode(OrdenTrabajo::formatearPeso($data->ppto_anual)); ?> <br /> <?php echo GxHtml::encode($data->getAttributeLabel('ppto_mensual')); ?> : <?php echo GxHtml::encode(OrdenTrabajo::formatearPeso($data->ppto_mensual)); ?> <br /> <?php echo GxHtml::encode($data->getAttributeLabel('creado')); ?> : <?php echo GxHtml::encode($data->creado); ?> <br /> <?php echo GxHtml::encode($data->getAttributeLabel('modificado')); ?> : <?php
<?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())))); ?>
?> <br /> <?php echo GxHtml::encode($data->getAttributeLabel('total_neto')); ?> : <?php echo "<font color='blue'>" . GxHtml::encode(OrdenTrabajo::formatearPeso($data->total_neto)) . "</font>"; ?> <br /> <?php echo GxHtml::encode($data->getAttributeLabel('total_bruto')); ?> : <?php echo "<font color='blue'>" . GxHtml::encode(OrdenTrabajo::formatearPeso($data->total_bruto)) . "</font>"; ?> <br /> <?php echo GxHtml::encode($data->getAttributeLabel('id_proveedor')); ?> : <?php echo "<font color='green'>" . GxHtml::encode(GxHtml::valueEx($data->idProveedor)) . "</font>"; ?> <br /> <?php echo GxHtml::encode($data->getAttributeLabel('fecha')); ?> : <?php