����JFIF��H�H����Exif��MM�*���� ��3����V�����3������3�(��������������������3�����
Server IP : 74.208.127.88 / Your IP : 18.216.82.12 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/application/take_inventoryOLD/ |
Upload File : |
<?php $titlepage="inventario"; $idsmenu=1; require_once ("../model/dbconn.php"); require_once ("../model/pos.php"); include "../../library/config.php"; include "../layout/top-header.php"; include "../../library/check_login.php"; ?> <meta charset="utf-8"> <meta name="viewport" content="width=device-width, initial-scale=1, shrink-to-fit=no"> <link rel="shortcut icon" type="image/png" href="/media/images/favicon.png"> <link rel="alternate" type="application/rss+xml" title="RSS 2.0" href="http://www.datatables.net/rss.xml"> <link rel="stylesheet" type="text/css" href="https://maxcdn.bootstrapcdn.com/bootstrap/3.3.7/css/bootstrap.min.css"> <link rel="stylesheet" type="text/css" href="https://cdn.datatables.net/1.12.1/css/dataTables.bootstrap.min.css"> <link rel="stylesheet" type="text/css" href="https://cdn.datatables.net/fixedheader/3.2.4/css/fixedHeader.bootstrap.min.css"> <link rel="stylesheet" type="text/css" href="https://cdn.datatables.net/responsive/2.3.0/css/responsive.bootstrap.min.css"> <link href="assets/style.css" rel="stylesheet"> <script type="text/javascript" language="javascript" src="https://code.jquery.com/jquery-3.5.1.js"></script> <script type="text/javascript" language="javascript" src="https://cdn.datatables.net/1.12.1/js/jquery.dataTables.min.js"></script> <script type="text/javascript" language="javascript" src="https://cdn.datatables.net/1.12.1/js/dataTables.bootstrap.min.js"></script> <script type="text/javascript" language="javascript" src="https://cdn.datatables.net/fixedheader/3.2.4/js/dataTables.fixedHeader.min.js"></script> <script type="text/javascript" language="javascript" src="https://cdn.datatables.net/responsive/2.3.0/js/dataTables.responsive.min.js"></script> <script type="text/javascript" language="javascript" src="https://cdn.datatables.net/responsive/2.3.0/js/responsive.bootstrap.min.js"></script> <style> .btn-flotante { font-size: 16px; /* Cambiar el tamaño de la tipografia */ text-transform: uppercase; /* Texto en mayusculas */ font-weight: bold; /* Fuente en negrita o bold */ color: #ffffff; /* Color del texto */ border-radius: 5px; /* Borde del boton */ letter-spacing: 2px; /* Espacio entre letras */ background-color: #E91E63; /* Color de fondo */ padding: 18px 30px; /* Relleno del boton */ position: fixed; top: 40px; right: 40px; transition: all 300ms ease 0ms; box-shadow: 0px 8px 15px rgba(0, 0, 0, 0.1); z-index: 99; } .btn-flotante:hover { background-color: #2c2fa5; /* Color de fondo al pasar el cursor */ box-shadow: 0px 15px 20px rgba(0, 0, 0, 0.3); transform: translateY(-7px); } @media only screen and (max-width: 600px) { .btn-flotante { font-size: 14px; padding: 12px 20px; bottom: 20px; right: 20px; } } </style> <script type="text/javascript" class="init"> $(document).ready(function() { var table = $('#example').DataTable( { responsive: true, "language": { "url": "//cdn.datatables.net/plug-ins/1.10.15/i18n/Spanish.json" } } ); } ); </script> <section class="content" name="formulario"> <div class="row"> <div class="col-md-16"> <div class="box"> <div class="box-header with-border"> <div class="fw-container"> <form method="post" id="update_form"> <div align="right" style="margin:5px;"> <button name="multiple_update" id="multiple_update" class="btn-flotante">Actualizacion de Inventario</button> </div> <div class="fw-body"> <div class="content"> <h1><i class='glyphicon glyphicon-shopping-cart'></i>Inventario General </h1> <div class="info"> <p>Verifica la existencia entre los distintos almacenes </p> </div> <div class="demo-html"> <table id="example" class="table table-hover table-bordered dt-responsive nowrap" style="width:100%"> <thead> <tr> <th>#</th> <th>Detalle</th> <th>Codigo de Barras</th> <th>Nombre</th> <th>Precio </th> <th>stock </th> <th>Ubicacion </th> </tr> </thead> <tbody> <?php $utilidad=0; $pos = new pos(); $query = $pos->getListItemID(); $data = $query[1]; foreach($data as $prod){ $keys = $prod['id_item'].'|'.$prod['unit']; $keys = base64_encode($keys); ?> <tr> <td> <?php if($prod['stock'] < 0){ echo $prod['id']; echo "(NEG)"; }else{ echo $prod['id']; } ?> </td> <td> <input type="checkbox" id="<?php echo $prod['id']; ?>" data-id_item="<?php echo $prod['id_item']; ?>" data-item_name="<?php echo $prod['item_name']; ?>" data-status="<?php echo $prod['status']; ?>" data-barcode="<?php echo $prod['barcode']; ?>" data-price="<?php echo $prod['price']; ?>" data-stock="<?php echo $prod['stock']; ?>" class="check_box" /></td> <td><?php echo $prod['barcode']; ?></td> <td><?php echo $prod['item_name']; ?></td> <td><?php echo $prod['price']; ?></td> <td> <a href="#" align="center" class="editparam1" key="<?php echo $keys; ?>" datatitle="Precio de venta de <?php echo $keys;?>" dataparam="hargajual" val="<?php echo $prod['stock']; ?>" > <?php echo $prod['stock']; ?> </a> </td> <td><?php echo $prod['location']; ?></td> </tr> <?php } ?> </tbody> </table> </div> </div> </div> </form> </div> </div> </div> </div> </div> </section> <?php include "../layout/footer.php"; //footer template ?> <?php include "../layout/bottom-footer.php"; //footer template ?> <script> $(document).ready(function(){ function fetch_data() { $.ajax({ url:"Registros.php", method:"POST", dataType:"json", success:function(data) { var html = ''; for(var count = 0; count < data.length; count++) { html += '<tr>'; html += '<td>'+data[count].id+'</td>'; html += '<td><input type="checkbox" id="'+data[count].id+'" data-id_item="'+data[count].id_item+'" data-item_name="'+data[count].item_name+'" data-status="'+data[count].status+'" data-barcode="'+data[count].barcode+'" data-price="'+data[count].price+'" data-stock="'+data[count].stock+'" class="check_box" /></td>'; html += '<td>'+data[count].barcode+'</td>'; html += '<td>'+data[count].item_name+'</td>'; html += '<td>'+data[count].price+'</td>'; html += '<td>'+data[count].stock+'</td>'; html += '<td>'+data[count].location+'</td></tr>'; } $('tbody').html(html); } }); } //fetch_data(); $(document).on('click', '.check_box', function(){ var html = ''; if(this.checked) { html = '<td> <input type="text" style="width:60px;" id="hidden_id[]" name="hidden_id[]" value="'+$(this).attr('id')+'" /></td>'; html += '<td><input type="checkbox" id="'+$(this).attr('id')+'" data-id_item="'+$(this).data('id_item')+'" data-item_name="'+$(this).data('item_name')+'" data-status="'+$(this).data('status')+'" data-barcode="'+$(this).data('barcode')+'" data-price="'+$(this).data('price')+'" data-stock="'+$(this).data('stock')+'" class="check_box" checked /></td>'; //html += '<td><input type="checkbox" id="'+$(this).attr('id')+'" data-id_item="<?php echo $prod['id_item']; ?>" data-item_name="<?php echo $prod['item_name']; ?>" data-status="<?php echo $prod['status']; ?>" data-barcode="<?php echo $prod['barcode']; ?>" data-price="<?php echo $prod['price']; ?>" data-stock="<?php echo $prod['stock']; ?>" class="check_box" checked />'+$(this).data('stock')+'</td>'; html += '<td><input disabled type="text" name="barcode1[]" class="form-control" value="'+$(this).data("barcode")+'" /> <input type="hidden" name="barcode[]" value="'+$(this).data('barcode')+'" /></td>'; html += '<td><input disabled type="text" name="item_name[]" style="width:400px;" class="form-control" value="'+$(this).data("item_name")+'" /></td>'; html += '<td><input disabled type="text" name="price[]" style="width:100px;" class="form-control" value="'+$(this).data("price")+'" /></td>'; html += '<td><input type="text" name="stock[]" style="width:80px;" class="form-control" value="'+$(this).data("stock")+'" /><input type="hidden" name="stockAnt[]" value="'+$(this).data('stock')+'" /></td>'; html += '<td><input type="text" name="location[]" style="width:80px;" value="A1" class="form-control" value="'+$(this).data("location")+'" /><input type="hidden" name="id_item[]" value="'+$(this).data('id_item')+'" /> </td>'; } else { html += '<td>'+$(this).attr('id')+'</td>'; html += '<td><input type="checkbox" id="'+$(this).attr('id')+'" data-id_item="'+$(this).data('id_item')+'" data-item_name="'+$(this).data('item_name')+'" data-status="'+$(this).data('status')+'" data-barcode="'+$(this).data('barcode')+'" data-price="'+$(this).data('price')+'" data-stock="'+$(this).data('stock')+'" class="check_box" /></td>'; html += '<td>'+$(this).data('barcode')+'</td>'; html += '<td>'+$(this).data('item_name')+'</td>'; html += '<td>'+$(this).data('price')+'</td>'; html += '<td>'+$(this).data('stock')+'</td>'; html += '<td>'+$(this).attr('location')+'</td>'; } $(this).closest('tr').html(html); $('#status_'+$(this).attr('id')+'').val($(this).data('status')); }); $('#update_form').on('submit', function(event){ event.preventDefault(); if($('.check_box:checked').length > 0) { var key = $(this).attr("data-id_item"); var value = { id : key, method : "actualizar" }; $.ajax({ url:"ActualizacionMultipleOK.php", method:"POST", data:$(this).serialize(), success:function() { alert('Registro(s) Actualizado(s).'); fetch_data(); console.log("registro update"); } }) }else{ $.ajax({ url:"ActualizacionMultipleOK.php", method:"POST", data:$(this).serialize(), success:function() { alert('Registro(s) Actualizado(s) 2.'); fetch_data(); } }) } }); }); </script>