<?php 
 
  include_once 'cabecera.php';

 include_once 'src/config.php';
?>

   
    <html>
      <head>
          <style>
              td{
                  font-size:18px;
              }
          </style>
        
        <meta name="viewport" content="width=device-width, initial-scale=1.0"/>
        <meta name="viewport" content="width=device-width">
<meta name="mobile-web-app-capable" content="yes">

<div class="container"><br>
 <img src="img2/cliente.png" width="60" style="margin-bottom:0px"><span class="text-primary h3"> Clientes que saldaron</span><br>

<button style="float:right" class="btn btn-rojo" onClick="window.location.href='index.php'"><i class="bi bi-arrow-left"></i> Volver atras</button><br>
<br>
<form action="" method="POST">

 
 
 <div class="row">
  <div class="col-md-12">
	<div class="table-responsive">
	<table class="table table-hover table-striped">
	<th>NOMBRE</th><th>TELEFONO</th><th>ULTIMO PRESTAMO</th>
		<?php 
	
			$sql1 = mysql_query("select c.nombre, c.telefono, p.fecha, p.monto, p.id_cliente, c.id_cliente  from prestamos p inner join clientes c on p.id_cliente = c.id_cliente where p.balance_prestamo<=0 order by c.nombre desc") or die(mysql_error());
			while($row1 = mysql_fetch_array($sql1)){
				echo "<tr>";
				$nombre = $row1["nombre"];
			
			
				
				echo "<td>".$row1["nombre"]."</td>";
				echo "<td>".$row1["telefono"]."</td>";
				echo "<td>".@decimal($row1["monto"])."</td>";
			
			
			
				echo "</tr>";
			
				
				
			}
			
		
		
		
		?>
		
	<tfoot>
	
	</tfoot>	
	</table>
	<br>


	</div>
  </div>
 </div>
</form>



</div>