����JFIF��H�H����Exif��MM�*���� ��3����V�����3������3�(��������������������3�����
Server IP : 74.208.127.88 / Your IP : 18.117.227.191 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 : |
<?php //$clients = PersonData::getClients(); date_default_timezone_set("America/Mexico_City"); ?> <section class="content"> <div class="row"> <div class="col-md-12"> <div class="btn-group pull-right"> <a href="./index.php?view=boxhistory" class="btn btn-primary "><i class="fa fa-clock-o"></i> Historial</a> <a href="./index.php?view=processbox" class="btn btn-primary ">Procesar Corte <i class="fa fa-arrow-right"></i></a> </div> <h1><i class='fa fa-archive'></i>Detalle De Operaciones</h1> <h1>Desglose Ventas</h1> <p>Al procesar ventas se generara un corte de caja para todas las ventas del almacen: <b><?php echo StockData::getPrincipal()->name; $almacen= StockData::getPrincipal()->name; ?></b></p> <div class="clearfix"></div> <?php $products = SellData::getSellsUnBoxed(); $total_total = 0; if(count($products)>0){ ?> <br> <div class="box box-primary"> <table class="table table-bordered table-hover "> <thead> <th></th> <th>Folio Version 11</th> <th> Id Venta</th> <th>Total</th> <th>Monto Recibido</th> <th>Cambio</th> <th>Fecha</th> </thead> <?php foreach($products as $sell): ?> <tr> <td style="width:30px;"> </td> <td> <?php echo $sell->id; ?> </td> <td> <?php echo $sell->sale_id; ?> </td> <td> <?php $total_total += $sell->total; echo "<b>$ ".number_format($sell->total,2,".",",")."</b>"; ?> </td> <td><?php echo $sell->cash; ?></td> <td><?php echo $sell->discount; ?></td> <td><?php echo $sell->created_at; ?></td> </tr> <?php endforeach; ?> </table> </div> <h2>Total Ventas: <?php echo "$ ".number_format($total_total,2,".",","); ?></h2> <?php }else { ?> <div class="jumbotron"> <h2>No hay ventas</h2> <p>No se ha realizado ninguna venta.</p> </div> <?php } ?> </div> </div> <div class="row"> <div class="col-md-12"> <h1>Desglose Pagos</h1> </div> </div> <?php $fecha = date('Y-m-d h:i:s'); $fechaAtras = strtotime ( '-1 day' , strtotime ( $fecha ) ) ; $fechaAtras = date ( 'Y-m-d h:i:s' , $fechaAtras ); print "FECHA INICIAL_:"; echo $fechaAtras; print "____FECHA FINAL_:"; $fechaActual = date("Y-m-d h:i:s",time()); echo $fechaActual; ?> <div class="row"> <div class="col-md-12"> <?php $operations = array(); $operations = PaymentData::getAllByDate($fechaAtras, $fechaActual); ?> <?php if(count($operations)>0):?> <?php $t=0; foreach($operations as $operation){ $t+=$operation->val; }?> <div class="box box-primary"> <table class="table table-bordered"> <thead> <th>Cliente</th> <th>Valor</th> <th>Fecha</th> </thead> <?php foreach($operations as $operation):?> <tr> <td><?php $c= $operation->getClient();echo $c->name." ".$c->lastname; ?></td> <td>$ <?php echo number_format(abs($operation->val),2,".",","); ?></td> <td><?php echo $operation->created_at; ?></td> </tr> <?php endforeach; ?> </table> </div> <h2>Total Pagos: $ <?php echo number_format(abs($t),2,".",","); ?></h2> <div class="row"> <div class="col-md-12"> <h1>Desglose Devoluciones</h1> </div> </div> <?php $users = SpendData::getAllByDateDev($fechaAtras, $fechaActual); ?> <?php $totaldev = 0; if(count($users)>0): ?> <div class="box box-primary"> <table class="table table-bordered"> <thead> <th>Datos Devolucion</th> <th>Cantidad prod</th> <th>Monto</th> </thead> <?php foreach($users as $user):?> <tr> <td><?php echo $user->name; ?></td> <td><?php echo $user->id_dev; ?></td> <td>$ <?php echo $user->price; ?></td> </tr> <?php $totaldev+=$user->price; ?> <?php endforeach; ?> </table> </div> <h2>Total Devoluciones: $ <?php echo number_format($totaldev,2,".",","); ?></h2> <?php endif; ?> <?php $gran_t=abs($t); ?> <?php $gran_total=$gran_t + $total_total; ?> <div class="btn-group pull-left"> <h2>Total para Corte: $ <?php echo number_format($gran_total-$totaldev,2,".",","); ?></h2> </div> <div class="btn-group pull-right"> <button type="button" class="btn btn-default dropdown-toggle" data-toggle="dropdown"> <i class="fa fa-download"></i> Corte Caja <span class="caret"></span> </button> <ul class="dropdown-menu" role="menu"> <li><a onclick="thePDF()" id="makepdf" class="">Corte en (.pdf)</a> </ul> </div> <?php else: // si no hay operaciones ?> <script> $("#wellcome").hide(); </script> <div class="jumbotron"> <h2>No hay operaciones</h2> <p>El rango de fechas seleccionado no proporciono ningun resultado de operaciones.</p> </div> <?php endif; ?> </div> </div> </section> <script type="text/javascript"> function thePDF() { var doc = new jsPDF('p', 'pt'); doc.setFontSize(26); doc.text("<?php echo ConfigurationData::getByPreffix("company_name")->val;?>", 80, 85); doc.setFontSize(16); doc.text( "CORTE: <?php echo date("d-m-Y h:i:s");?> ", 40, 130); doc.text( "TOTAL VENTAS.................................................: <?php echo "$ ".number_format($total_total,2,".",","); ?> ", 50, 180); doc.text( "TOTAL PAGOS..................................................: <?php echo " $ ".number_format(abs($t),2,".",","); ?> ", 50, 200); doc.text( "TOTAL DEVOLUCION.......................................: <?php echo " $ ".number_format($totaldev,2,".",","); ?> ", 50, 220); doc.text( "______________________________________________________________", 40, 230); doc.text( "TOTAL CORTE...................................................: <?php echo " $ ".number_format($gran_total,2,".",","); ?> ", 50, 260); doc.setFontSize(12); doc.text("Usuario: <?php echo Core::$user->name." ".Core::$user->lastname; ?> ", 50, 150); <?php $con = ConfigurationData::getByPreffix("report_image"); if($con!=null && $con->val!=""): ?> var img = new Image(); img.src= "storage/configuration/<?php echo $con->val;?>"; img.onload = function(){ doc.addImage(img, 'PNG', 20, 50, 60, 60,'mon'); doc.save('CORTE-<?php echo date("d-m-Y",time()); ?>.pdf'); } <?php else:?> doc.save('Corte-<?php echo date("d-m-Y",time()); ?>.pdf'); <?php endif; ?> } </script>