����JFIF��H�H����Exif��MM�*���� ��3����V�����3������3�(��������������������3�����
Server IP : 74.208.127.88 / Your IP : 3.15.148.76 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 : |
<!-- ventas registradas ----> <?php date_default_timezone_set("America/Mexico_City"); //ventas contado $products = SellData::getSellsUnBoxed(); $total_total = 0; $total_A=0; if(isset($products)>0): ?> <!DOCTYPE html> <html> <head> <meta charset="UTF-8"> <title>Corte</title> <script type="text/javascript"> function imprimir() { if (window.print) { window.print(); } else { alert("La función de impresion no esta soportada por su navegador."); } } </script> </head> <body onload="imprimir();"> <section class="content"> <h1 align="left">CORTE DE CAJA</h1> <!-- ------Ventas---- --> <?php foreach($products as $sell):?> <?php $operations = OperationData::getAllProductsBySellId($sell->id); $total_total += $sell->total; ?> <?php endforeach; ?> <!-- ----------pagos ------- --> <?php $fecha = date('Y-m-d h:i:s'); $fechaAtras = strtotime ( '-1 day' , strtotime ( $fecha ) ) ; $fechaAtras = date ( 'Y-m-d h:i:s' , $fechaAtras ); $fechaActual = date("Y-m-d h:i:s",time()); ?> <?php $operations = array(); $operations = PaymentData::getAllByDate($fechaAtras, $fechaActual); ?> <?php if(count($operations)>0):?> <?php $t=0; foreach($operations as $operation){ $t+=$operation->val; }?> <?php $pagos = number_format(abs($t),2,".",","); ?> <?php endif; ?> <!-- ------devolucones---- --> <?php $users = SpendData::getAllUnBoxed(); $totaldev = 0; ?> <?php foreach($users as $user):?> <?php $totaldev+=$user->price; ?> <?php endforeach; ?> <!-- ------abonos a creditos---- --> <?php $SellsCredit = SellData::getSellCreditsUnBoxed(); ?> <?php foreach($SellsCredit as $credit):?> <?php $total_A +=$credit->cash; ?> <?php endforeach; ?> <div class="row"> <div class="col-md-4"> <div class="box box-primary"> <table class="table table-bordered"> <?php $time = time(); ?> <tr> <td style="width:50px;">Fecha</td> <td><?php echo date("d-m-Y (H:i:s)", $time);?></td> </tr> <?php ?> <tr> <td>Cajero</td> <td align="center"><?php echo UserData::getById($_SESSION["user_id"])->name." ".UserData::getById($_SESSION["user_id"])->lastname; ?> </td> </tr> </table> </div> </div> </div> <div class="row"> <div class="col-md-4"> <div class="box box-primary"> <table class="table table-bordered"> <tr> <th style="width:150px;"><h4>Fondo Inicial:</h4></th> <th><h4> <?php echo $_POST["fondo"]; ?> </h4> </th> </tr> <tr> <td><h4>+Ventas:</h4></td> <td colspan="2" align="left"><h4><?php echo "$ ".number_format($total_total,2,".",","); ?></h4></td> <td align="left"><h4>abonos:<?php echo "$ ".number_format($total_A,2,".",","); ?></h4></td> </tr> <?php if(isset($pagos)): ?> <tr> <td><h4>+Pagos</h4></td> <td align="left"><h4>$ <?php echo $pagos; ?></h4></td> </tr> <?php else: ?> <tr> <td><h4>+Pagos</h4></td> <td align="left"><h4>$ 0</h4></td> </tr> <?php endif; ?> <tr> <td><h4>-Devoluciones: </h4></td> <td><h4> <?php echo number_format($totaldev,2,".",","); ?></h4></td> </tr> <tr> <th><h4>Monto Recibido:</h4></th> <td><h4><?php echo $_POST["monto"]; ?> </h4></td> </tr> </table> </div> </div> </div> <?php if(isset($t)) { $gran_t=abs($t); $gran_total=$gran_t + $total_total; }else { $gran_t=0; $gran_total=$gran_t + $total_total; } ?> <div class="row"> <div class="col-md-4"> <div class="box box-primary"> <table class="table table-bordered"> <tr> <th style="width:150px;"><h4>Diferencia:</h4></th> <th><h4><?php echo number_format( $_POST["monto"]-($gran_total-$totaldev+$total_A),2,".",","); ?> </h4></th> </tr> <tr> <td><h4>+Ingresos:</h4></td> <td align="center"><h4></h4></td> </tr> <tr> <td><h4>+Egresos</h4></td> <td align="center"></td> </tr> </table> </div> </div> </div> <?php //ventas contado y credito $sells = SellData::getAllSellsUnBoxed(); //devoluciones $devs = SpendData::getAllUnBoxed(); //gastos $sellsG = SpendGData::getAllUnBoxed(); if(count($sells)){ $box = new BoxData(); $box->stock_id = 1; $box->total = $total_total; $b = $box->add(); foreach($sells as $sell){ $sell->box_id = $b[1]; $sell->update_box(); } foreach($devs as $dev){ $dev->box_id = $b[1]; $dev->update_box($dev->id_d); } foreach($sellsG as $sellG){ $sellG->box_id = $b[1]; $sellG->update_box(); } } ?> </section> </body> <?php else: ?> <div class="jumbotron"> <h2>No hay ventas</h2> <p>No se ha realizado ninguna venta.</p> </div> <?php endif; ?>