<style>
    th,td{
        text-align: left;
    }
    *{
        font-family: verdana;
        font-size: 12px;

    }
table,td,th{
    border:gray 1px solid;
    border-collapse: collapse;
    font-size: 12px;
}
</style>
<h3 style="font-size: 25px; text-decoration: underline;">Reporte de prestamos realizados con atraso</h3>

<br>
<div ><a href="../menu/menu.php">Volver atras</a></div>
<br>
<?php
include_once("../php/config.php");
include_once("../php/formatos.php");

$sql = mysql_query("select * from cuotas inner join clientes on cuotas.id_cliente = clientes.id where cuotas.vence<'$hoy'
                    and balance>1") or die(mysql_error());

echo "<table><th>Prestamo</th><th>Cliente</th><th>Telefono</th><th>Direccion</th>";
while($r = mysql_fetch_array($sql)){
    $c++;
    $balance+=$r["balance"];
   
    echo "<tr>";
    echo "<td>".$r["id_prestamo"]."</td>";

    //echo "<td>".$r["cuota"]."</td>";
    echo "<td>".$r["cliente"]."</td>";
    echo "<td>".$r["telefono"]."</td>";
    echo "<td>".$r["direccion"]."</td>";
 
    echo "</tr>";
}
 echo "</table>";
 echo "</br>";
 
  echo "<b>registros: </b><font color='blue'>".decimal($c)."</font>";
 echo "<b>Balance vencido: </b><font color='blue'>".decimal($balance)."</font>";

 
 
?>
