<?php include 'sesion_user.php';?><!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">

<html xmlns="http://www.w3.org/1999/xhtml">

<head>

<meta http-equiv="Content-Type" content="text/html; charset=utf-8" />

<title>Panel</title>









<link rel="stylesheet" href="https://maxcdn.bootstrapcdn.com/bootstrap/4.0.0-beta/css/bootstrap.min.css" integrity="sha384-/Y6pD6FV/Vv2HJnA6t+vslU6fwYXjCFtcEpHbNJ0lyAFsXTsjBbfaDjzALeQsN6M" crossorigin="anonymous"> 

<link href="http://radioshosting.com/css/delalora4new.css" rel="stylesheet">


<meta name="viewport" content="width=device-width, initial-scale=1.0">

</head>



<body onload="document.forms['form14']['busqueda'].focus()">



<div class="container-fluid">





<div class="row">



<div class="col-lg-3 col-md-3 col-sm-12" style="background-color: #C8C8C8;">





<?php 

include 'nav.php';?>



</div>



<div class="col-lg-9 col-md-9 col-sm-12">

<?php include 'inc_buscar.php';?>





<hr />

<B>Clientes:</B><br />

Hoy es <?php echo date(d)?>/<?php echo date(m) ?>/<?php echo date(Y) ?><hr />







<?php 

$ID = (int)$_GET['ID'];



include 'concha.php';



mysql_connect("$host","$usuario","$contra");



mysql_select_db ("$basedatos");



$sql = "SELECT * FROM `clientes` WHERE ID = '$ID' ORDER BY ID";



$consulta = mysql_query ($sql);



while ($row = mysql_fetch_array($consulta))



{

$ID_cliente = $row["ID"];

$nombre = $row["nombre"];

$direccion = $row["direccion"];

$email = $row["email"];

$telefono = $row["telefono"];





?>

Nº <?php echo $ID_cliente ?><br />



<?php echo "<b>Nombre</b>: $nombre<br />

<b>Direccion</b>: $direccion<br />

<b>Email</b>: $email<br />

<b>Telefono</b>: $telefono"; ?>





<table border="1"  width="100%" border="0">



  <tr>

    <td><b>Detalle</b></td>

    <td><b>Monto</b></td>

    <td><b>FECHA</b></td>

    <td><b>TOTAL</b></td>

  </tr>



<?php 

 $total2 = 0;

$sql2 = "SELECT * FROM `caja_fiado` WHERE ID_cliente = '$ID_cliente'  ORDER BY `ID` DESC LIMIT 400";



$consulta2 = mysql_query ($sql2);



while ($row2 = mysql_fetch_array($consulta2))



{

$ID_caja = $row2["ID"];



$detalle = $row2["detalle"];

$monto = $row2["monto"];

$total_caja = $row2["total_caja"];

$fecha = $row2["fecha"];



?>



  <tr>

    <td><?php echo $detalle ?></td>

    <td>$ <?php echo $monto; $total2 = $total2 + $monto; ?></td>

    <td><?php echo $fecha ?></td>

       <td> <?php echo $total2 ?></td>

  </tr>



<?



}

mysql_free_result($consulta2);



?>

</table>



<H2>TOTAL: $<?php echo $total2  ?></H2>









<hr />













<?



}

mysql_free_result($consulta);



?>


<hr>

ACTUALIZAR LOS PRECIOS:<BR>
    
    Esta herramienta realiza una actualizacion de los precios al dia de hoy. Para que el cliente pague la deuda actualizada.
    <hr>
    <a href="actualizar_precios_fiado.php?ID=<? echo $ID_cliente ?>">ACTUALIZAR LOS PRECIOS</a>
</div>

</div>



</div>







    



  <script src="https://code.jquery.com/jquery-3.2.1.min.js" integrity="sha256-hwg4gsxgFZhOsEEamdOYGBf13FyQuiTwlAQgxVSNgt4=" crossorigin="anonymous"></script>

  <script src="https://cdnjs.cloudflare.com/ajax/libs/popper.js/1.11.0/umd/popper.min.js" integrity="sha384-b/U6ypiBEHpOf/4+1nzFpr53nxSS+GLCkfwBdFNTxtclqqenISfwAzpKaMNFNmj4" crossorigin="anonymous"></script>

  <script src="https://maxcdn.bootstrapcdn.com/bootstrap/4.0.0-beta/js/bootstrap.min.js" integrity="sha384-h0AbiXch4ZDo7tp9hKZ4TsHbi047NrKGLO3SEJAg45jXxnGIfYzk4Si90RDIqNm1" crossorigin="anonymous"></script>

  

  

  <script type="text/javascript">window.setInterval(function(){

  $('.grid').isotope({

  itemSelector: '.grid-item'

});

}, 2000);

</script>



<script language=javascript>

function ventanaSecundaria56 (URL){

   window.open(URL,"ventana1","width=600,height=500,scrollbars=NO")

}

  </script>

</body>

</html>

