����JFIF��H�H����Exif��MM�*���� ��3����V�����3������3�(��������������������3�����403WebShell
403Webshell
Server IP : 74.208.127.88  /  Your IP : 216.73.216.157
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 :  /proc/self/root/var/www/html/t/sae/appsae/core/app/view/

Upload File :
current_dir [ Writeable ] document_root [ Writeable ]

 

Command :


[ Back ]     

Current File : /proc/self/root/var/www/html/t/sae/appsae/core/app/view/traspases-view.php
<section class="content">
<div class="row">
	<div class="col-md-12">
<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/res-word.php">Word 2007 (.docx)</a></li>
    <li><a href="report/res-xlsx.php">Excel 2007 (.xlsx)</a></li>
<li><a onclick="thePDF()" id="makepdf" class="">PDF (.pdf)</a></li>

  </ul>
</div>
		<div class="clearfix"></div>
		<nav class = "navbar navbar-inverse">
			<div class = "container-fluid">
				<a href = "#" class = "navbar-brand"><i class='glyphicon glyphicon-shopping-cart'></i> Traspasos entre Almacenes</a>
			</div>
		</nav>


<?php
$products = null;
if(Core::$user->kind==2){
$products = ReData::getResByStockId2(Core::$user->stock_id);
}else{
$products = ReData::getTraspases();
}
if(count($products)>0){
	?>
<br>
<div class="box box-primary">
<div class="box-header">
<table class="table table-bordered table-hover table-responsive datatable">
	<thead>
		<th></th>
		<th>Folio</th>
		<th>Pago</th>
		<th>Entrega</th>
		<th>Total de costo</th>
		<th>Total de venta</th>
		<th>utilidad</th>
		<th>Almacen</th>
		<th>Fecha</th>
		<th></th>
	</thead>
	<?php 
	$total_total=0;
	$total_totalC=0;
	foreach($products as $sell):
	$operations = OperationData2::getAllProductsByReId($sell->id);
?>

	<tr>
		<td style="width:30px;"><a href="index.php?view=onetraspase&id=<?php echo $sell->id; ?>" class="btn btn-xs btn-default"><i class="glyphicon glyphicon-eye-open"></i></a></td>
		<td><a>#<?php echo $sell->id; ?></a></td>
<td><?php echo $sell->getP()->name; ?></td>
<td><?php echo $sell->getD()->name; ?></td>
<td>
<?php
$total=0;
$totalC=0;
	foreach($operations as $operation){
		$product  = $operation->getProduct();
		
		$total += $operation->q*$product->price_out;
		$totalC += $operation->q*$product->price_in;
	}
	$total_total=$total + $total_total;
	$total_totalC=$totalC + $total_totalC;
		echo "<b>$ ".number_format($total_totalC,2,".",",")."</b>";
?>			

		</td>
		<td>
		<?php echo "<b>$ ".number_format($total_total,2,".",",")."</b>"; ?>
		</td>
		
		<td>
		<?php echo "<b>$ ".number_format($total_total - $total_totalC,2,".",",")."</b>"; ?>
		</td>
		<td><?php if($sell->stock_to_id!=null){echo $sell->getStockTo()->name ;} ?></td>
			<?php $fecha =  explode("-",$sell->created_at);
		  $fecha2 = explode(":",$fecha[2]);
		  $fecha3 = explode(" ",$fecha2[0]);
			?>
		<td><b><?php echo $fecha3[0]; echo "/"; echo $fecha[1]; echo "/"; echo $fecha[0]; ?></b></td>
		<?php if($_SESSION['rol']==1){?>
			<td style="width:100px;">
			<a href="#" onclick="prueba(<?php echo $sell->id; ?>)" id="oper-<?php echo $sell->id; ?>" class="btn tip btn-xs btn-danger" title="Eliminar">
			<i class="glyphicon glyphicon-trash"></i></a> </td>
			<?php }?>	
	</tr>

<?php endforeach; ?>

</table>
</div>
</div>

	<?php
}else{
	?>
	<div class="jumbotron">
		<h2>No hay datos</h2>
		<p>No se ha realizado ninguna operacion.</p>
	</div>
	<?php
}

?>
<br><br><br><br><br><br><br><br><br><br>
	</div>
</div>



<script>

		/*
		SweetAlert
		*/

		async function prueba(id) {
		const { isConfirmed, value } = await Swal.fire({
											title: 'Eliminacion de Registro',
											text: "Se eliminara registro de manera permanente, desea continuar!",
											icon: 'warning',
											input: 'password',
											showCancelButton: true,
											confirmButtonColor: '#3085d6',
											cancelButtonColor: '#d33',
											confirmButtonText: 'Si, borrar!!'
										});
			$.ajax({
				type:'post',
				url:"index.php?view=delre",
				//contentType: 'application/json; charset=utf-8',
				data: { pass: value, id: id },
				dataType: 'json',
				success:function(res){
					
					if(res==true){
						Swal.fire(	'Buen trabajo!',
									'Compra  eliminada!',
									'success')	
					setTimeout(function(){ window.location.reload(); }, 3000);
					}else{
						Swal.fire({
						  icon: 'error',
						  title: 'Oops...',
						  text: 'Datos invalidos',
						 
						})
					}
				}
			})
			
		}
</script>


<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("COMPRAS", 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: "Proveedor", dataKey: "client"}, 
    {title: "Total", dataKey: "total"}, 
    {title: "Estado de pago", dataKey: "p"}, 
    {title: "Estado de entrega", dataKey: "d"}, 
    {title: "Almacen", dataKey: "stock"}, 
    {title: "Fecha", dataKey: "created_at"}, 
];
var rows = [
  <?php foreach($products as $sell):
  ?>
    {
      "id": "<?php echo $sell->id; ?>",
      "client": "<?php if($sell->person_id!=null){$c= $sell->getPerson();echo $c->name." ".$c->lastname;} ?>",
      "total": "<?php
$total= $sell->total-$sell->discount;
		echo "$ ".number_format($total,2,".",",");
?>	",
      "p": "<?php echo $sell->getP()->name; ?>",
      "d": "<?php echo $sell->getD()->name; ?>",
      "stock": "<?php echo $sell->getStockTo()->name; ?>",
      "created_at": "<?php echo $sell->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('res-<?php echo date("d-m-Y h:i:s",time()); ?>.pdf');
}
<?php else:?>
doc.save('res-<?php echo date("d-m-Y h:i:s",time()); ?>.pdf');
<?php endif; ?>
}
</script>



<!-- Loading CSS -->
<style>
    .loading {
        position: fixed;
        top: 0;
        left: 0;
        right: 0;
        bottom: 0;
        background-color: white;
        display: flex;
        justify-content: center;
        align-items: center;
        z-index: 9999;
        transition: 1s all;
        opacity: 0;
    }
    .loading.show {
        opacity: 1;
    }
    .loading .spin {
        border: 3px solid hsla(185, 100%, 62%, 0.2);
        border-top-color: #3cefff;
        border-radius: 50%;
        width: 3em;
        height: 3em;
        animation: spin 1s linear infinite;
    }
    @keyframes spin {
      to {
        transform: rotate(360deg);
      }
    }            
</style>

<!-- Loading HTML -->
<div class="loading show">
    <div class="spin"></div>
</div>

<!-- Loading Javascript -->
<script>
// Loading
var Loading=(loadingDelayHidden=0)=>{let loading=null;const myLoadingDelayHidden=loadingDelayHidden;let imgs=[];let lenImgs=0;let counterImgsLoading=0;function incrementCounterImgs(){counterImgsLoading+=1;if(counterImgsLoading===lenImgs){hideLoading()}}function hideLoading(){if(loading!==null){loading.classList.remove('show');setTimeout(function(){loading.remove()},myLoadingDelayHidden)}}function init(){document.addEventListener('DOMContentLoaded',function(){loading=document.querySelector('.loading');imgs=Array.from(document.images);lenImgs=imgs.length;if(imgs.length===0){hideLoading()}else{imgs.forEach(function(img){img.addEventListener('load',incrementCounterImgs,false)})}})}return{'init':init}}

Loading(1000).init();
</script>



Youez - 2016 - github.com/yon3zu
LinuXploit