<?php $prove = VwAtencionessolpe::model()->search_por_solpe($model->id); $this->widget('zii.widgets.grid.CGridView', array('id' => 'movimientos-grid', 'dataProvider' => $prove, 'cssFile' => Yii::app()->getTheme()->baseUrl . '/css/style-grid.css', 'summaryText' => '->', 'columns' => array('item', 'cantdesolpe', 'fecha', 'movimiento', 'numvale', 'cant', 'desumkardex', 'codart', 'txtmaterial', array('name' => 'preciounit', 'value' => 'Yii::app()->numberFormatter->format("#,##0.00",$data->preciounit+0,null)', 'footer' => 'Total :'), array('name' => 'monto', 'value' => 'Yii::app()->numberFormatter->format("#,##0.00",$data->monto+0,null)', 'footer' => Yii::app()->numberFormatter->format("#,##0.00", VwAtencionessolpe::getTotal($prove)['real'])), 'ceco', 'usuario'))); ?>
<?php foreach ($modelodetalle->desolpe_alreserva as $row) { if ($row->codocu == '450') { //si e suna domcuento de reserva $idreserva = $row->id; } } $prove = VwAtencionessolpe::model()->search_por_reserva($idreserva); $this->widget('zii.widgets.grid.CGridView', array('id' => 'reservas-grid', 'itemsCssClass' => 'table table-striped table-bordered table-hover', 'dataProvider' => $prove, 'summaryText' => '', 'columns' => array(array('name' => 'numvale', 'header' => 'Vale'), 'fecha', 'movimiento', 'desumsolpe', 'desumkardex', 'ceco', array('name' => 'ceco', 'value' => '$data->ceco', 'footer' => 'Total'), array('name' => 'monto', 'value' => 'round($data->monto,2)', 'footer' => round(VwAtencionessolpe::getTotal($prove), 2)), 'cant', 'usuario'))); ?>