����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 : |
<?php // realizamos la conexión a la base de datos $user = 'root'; $pass = ''; $host = 'localhost'; $db = 'pos36'; $config = array(PDO::MYSQL_ATTR_INIT_COMMAND => "SET NAMES 'UTF8'"); try { $conn = new PDO("mysql:host=$host;dbname=$db;", $user, $pass, $config); } catch(PDOException $e) { echo $e -> getMessage(); } // realizamos la consulta para obtener el mayor id insertado $sql = "SELECT * FROM valores"; $query = $conn->prepare($sql); $query->execute(); $row = $query->fetch(); // guardamos el valor obtenido, en este caso el mayor id insertado en una tabla ?> <?php $products = ProductData::getAll_(); $registros = AsistData::getAll(); $users = PersonData::getContacts(); //opciones que tendra el dropdown $options = array('entrada', 'salida'); ?> <section class="content-header"> <h1>Reporte de Asistencia General</h1> <ol class="breadcrumb"> <li><a href="#"><i class="fa fa-dashboard"></i> Nomina</a></li> <li class="active">Asistencia</li> </ol> </section> <section class="content"> <div class="box box-primary"> <div class="box-header"> <h3 class="box-title">Ingresar las fechas para revisar reporte</h3> </div><!-- /.box-header --> <div class="box-body"> <section class="content"> <div class="row"> <div class="col-md-12"> <h1>Reporte de Asistencia Salidas</h1> <a href="index.php?view=asist" class="btn btn-default"><i class='fa fa-check'></i> Regresar</a> <form> <input type="hidden" name="view" value="reportsEmp"> <div class="row"> <div class="col-md-2"> </div> </div> <div class="col-md-4"> <input type="date" name="sd" value="<?php if(isset($_GET["sd"])){ echo $_GET["sd"]; }?>" class="form-control"> </div> <div class="col-md-4"> <input type="date" name="ed" value="<?php if(isset($_GET["ed"])){ echo $_GET["ed"]; }?>" class="form-control"> </div> <div class="col-md-4"> <button type="submit" class="btn btn-primary btn-block"><i class="fa fa-file-text" name="cmdForm" value="fechas"></i></button> </div> </form> </div> </div> <br><!--- FUNCION BUSQUEDA DE REGISTRO ENTRADA Y SALIDA POR FECHAS --> <br><!--- FUNCION BUSQUEDA DE REGISTRO ENTRADA Y SALIDA POR FECHAS --> <br><!--- FUNCION BUSQUEDA DE REGISTRO ENTRADA Y SALIDA POR FECHAS --> <br><!--- FUNCION BUSQUEDA DE REGISTRO ENTRADA Y SALIDA POR FECHAS --> <br><!--- FUNCION BUSQUEDA DE REGISTRO ENTRADA Y SALIDA POR FECHAS --> <div class="row"> <div class="col-md-12"> <?php if(isset($_GET["sd"]) && isset($_GET["ed"]) ):?> <?php if($_GET["sd"]!=""&&$_GET["ed"]!=""):?> <?php $operations = array(); $operations = AsistData::getAllByRegistro("salida",$_GET["sd"],$_GET["ed"]); ?> <?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"> <div class="box-header"> <h3 class="box-title"></h3>Registros Salida</div> <div class="box-body"> <table class="table table-bordered table-hover table-responsive datatable"> <thead> <th>Id</th> <th>Nombre</th> <th>Fecha Registro y hora</th> <th>Tipo Registro</th> <th></th> </thead> <?php foreach($operations as $operation):?> <tr> <td><?php echo $operation->id; ?></td> <td><?php echo $operation->valor; ?></td> <td><?php echo $operation->tiempo; ?></td> <td><?php echo $operation->t_registro; ?></td> <td></td> </tr> <?php endforeach; ?> </table> </div> </div> </div> <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> <?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; ?> <?php else:?> <script> $("#wellcome").hide(); </script> <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> </section> </div> </div> </section>