Viewing file: reporte_ventas_view.php (4.67 KB) -rw-r--r-- Select action/file-type: (+) | (+) | (+) | Code (+) | Session (+) | (+) | SDB (+) | (+) | (+) | (+) | (+) | (+) |
<div id="page-wrapper"> <div class="row" style="margin-bottom: 15px;"> <div class="col-lg-12"> <div class="box"> <div class="box-header"> <h2 class="blue"><i class="fa fa-th"></i><span class="break"></span><?php echo($titulo); ?></h2> </div>
<div class="box-content"> <div class="row"> <div class="col-md-12 form-inline"> <form action="<?php echo base_url()?>Reportes/reporteVentas/" method="post"> <strong>Filtrado Clientes:</strong> <select name="comboCliente" id="comboCliente" style="width:200px" class="form-control"> <option><?php echo($nombre);?></option> <?php $respuestaCombo=$this->consultas_model->getClientes(); foreach($respuestaCombo as $file):?> <option><?php if ($nombre != $file->nombre) echo ($file->nombre); ?></option> <?php endforeach;?> </select> <input type="submit" class="btn btn-primary btn-lg" value="Filtrar" /> </form> <div id="ventaImagen" style="min-width: 200px; height: 450px; margin: 0 auto"></div> </div> </div> </div> </div> </div> </div> <script type="text/javascript"> $(function () { $('#ventaImagen').highcharts({ chart: { type: 'column' }, title: { text: 'VENTAS MENSUALES' }, xAxis: { type: 'category', labels: { rotation: -45, style: { fontSize: '13px', fontFamily: 'Verdana, sans-serif' } } }, yAxis: { min: 0, title: { text: 'Acumulado en Pesos' } }, legend: { enabled: true }, tooltip: { pointFormat: 'Ventas acumuladas: <b>{point.y:.1f} pesos</b>' }, series: [{ name: '2015', color: 'rgba(248,161,63,1)', data: [ <?php $resultado=$this->consultas_model->ventas1($filtro); foreach($resultado as $file): echo ("['".$file['mes']."',"); echo ($file['cant']." ],"); // echo ($file['porcentaje']."%"); endforeach; ?> ] }, { name: '2016', color: 'rgba(126,86,134,.9)', data: [ <?php $resultado=$this->consultas_model->ventas2($filtro); foreach($resultado as $file): echo ("['".$file['mes']."',"); echo ($file['cant']." ],"); // echo ($file['porcentaje']."%"); endforeach; ?> ] }, { name: '2017', color: 'rgba(68, 170, 213, .9)', data: [ <?php $resultado=$this->consultas_model->ventas3($filtro); foreach($resultado as $file): echo ("['".$file['mes']."',"); echo ($file['cant']." ],"); // echo ($file['porcentaje']."%"); endforeach; ?> ] }, { name: '2018', color: 'rgba(87, 154, 102, .9)', data: [ <?php $resultado=$this->consultas_model->ventas4($filtro); foreach($resultado as $file): echo ("['".$file['mes']."',"); echo ($file['cant']." ],"); // echo ($file['porcentaje']."%"); endforeach; ?> ] }, { name: '2019', color: 'rgba(254, 96, 120, .9)', data: [ <?php $resultado=$this->consultas_model->ventas5($filtro); foreach($resultado as $file): echo ("['".$file['mes']."',"); echo ($file['cant']." ],"); // echo ($file['porcentaje']."%"); endforeach; ?> ] } ] }); });
</script>
|