����JFIF��H�H����Exif��MM�*���� ��3����V�����3������3�(��������������������3�����
Server IP : 74.208.127.88 / Your IP : 18.224.136.160 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/t/sae/appsae/core/app/view/ |
Upload File : |
<?php date_default_timezone_set("America/Mexico_City"); $total=0; $Cantidad=0; ?> <br><!--- --> <div class="row"> <div class="col-md-12"> <?php $operations = array(); $fecha = date('Y-m-d h:i:s'); $fechaAtras = strtotime ( '-1 day' , strtotime ( $fecha ) ) ; $fechaAtras = date ( 'Y-m-d' , $fechaAtras ); $fechaActual = date("Y-m-d",time()); $fecha = date("d-m-Y",time()); $operations = OperationData::getAllByDateOfficial(1,$fechaActual ,$fechaActual); if(count($operations)>0): ?> <?php if(count($operations)>0):?> <a onclick="thePDF()" id="makepdf" class="btn btn-default" class="">PDF (.pdf)</a> <a href="./report/reports-xlsx.php?stock_id=<?php echo $_GET["stock_id"]; ?>&product_id=<?php echo $_GET["product_id"]; ?>&sd=<?php echo $_GET["sd"]; ?>&ed=<?php echo $_GET["ed"]; ?>" class="btn btn-default">Excel (.xlsx)</a> <br><br> <div class="box box-primary"> <table class="table table-bordered"> <h1 align="center">Reporte de Ventas por dia <?php echo $fecha; ?></h1> </table> </div> <div class="box box-primary"> <table class="table table-bordered"> <thead> <th>Id Venta</th> <th>Producto</th> <th>Precio</th> <th>Cantidad</th> <th>Fecha</th> </thead> <?php foreach($operations as $operation):?> <?php if ($operation->getOperationType()->name=="salida"):?> <tr> <td><?php echo $operation->sale_id; ?></td> <td><?php echo $operation->getProduct()->item_name; ?></td> <?php $products= ProductData::getById($operation->id_item);?> <td><?php echo number_format($operation->price,2,".",",");?></td> <td><?php echo $operation->qty; ?></td> <?php if($operation->qty > 0): ?> <?php $Cantidad = $Cantidad + $operation->qty; ?> <?php $totalT = $operation->qty * $operation->price; ?> <?php $total = $total + $totalT; endif;?> <td><?php echo $operation->created_at; ?></td> </tr> <?php endif; ?> <?php endforeach; ?> <tr> <td colspan="2" align="right"><h3>Total<h3></td> <td><h3>$<?php echo number_format($total,2,".",",");?></h3></td> <td><h3><?php echo number_format($Cantidad,2,".",",");?></h3></td> <td></td> </tr> </table> </div> <?php else: ?> <script> $("#wellcome").hide(); </script> <div class="jumbotron"> <h2>No hay operaciones este dia <?php $fecha; ?></h2> <p>Puede ingresar ventas en modulo vender.</p> </div> <?php endif;?> <?php endif;?> <script type="text/javascript"> function thePDF() { var doc = new jsPDF('p', 'pt'); doc.setFontSize(26); doc.text("<?php echo ConfigurationData::getByPreffix("company_name")->val;?>", 40, 65); doc.setFontSize(18); doc.text("REPORTE DE INVENTARIO", 40, 80); doc.setFontSize(12); doc.text("Usuario: <?php echo Core::$user->name." ".Core::$user->lastname; ?> - Fecha: <?php echo date("d-m-Y h:i:s");?> ", 40, 90); var columns = [ {title: "Id", dataKey: "id"}, {title: "Producto", dataKey: "product"}, {title: "Cantidad", dataKey: "q"}, {title: "Tipo de operacion", dataKey: "operation_type"}, {title: "Fecha", dataKey: "created_at"}, ]; var rows = [ <?php foreach($operations as $product): ?> { "id": "<?php echo $product->id; ?>", "product": "<?php echo $product->getProduct()->name; ?>", "q": "<?php echo $product->q; ?>", "operation_type": "<?php echo $product->getOperationType()->name; ?>", "created_at": "<?php echo $product->created_at; ?>", }, <?php endforeach; ?> ]; doc.autoTable(columns, rows, { theme: 'grid', overflow:'linebreak', styles: { fillColor: <?php echo Core::$pdf_table_fillcolor;?> }, columnStyles: { id: {fillColor: <?php echo Core::$pdf_table_column_fillcolor;?>} }, margin: {top: 100}, afterPageContent: function(data) { } }); doc.setFontSize(12); doc.text("<?php echo Core::$pdf_footer;?>", 40, doc.autoTableEndPosY()+25); <?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', 495, 20, 60, 60,'mon'); doc.save('reports-<?php echo date("d-m-Y h:i:s",time()); ?>.pdf'); } <?php else:?> doc.save('reports-<?php echo date("d-m-Y h:i:s",time()); ?>.pdf'); <?php endif; ?> } </script> </div> </div> <br><br><br><br> </section>