<?php 
include_once("../php/config.php");
        $sql = mysql_query("select * from ventas where cliente='".$_GET["cliente"]."' and balance>0 order by fecha desc
		") or die(mysql_error());


?>
<style>
td, th{
	font-size:18;
}

</style>
<table class="table" data-page-length='100' style="width: 100%">


              
              <th>Fecha - Hora</th>
			  <th>Producto</th>
			   <th>Monto</th>
			  <th>Balance</th>
			 
			  
			  

						<tbody>
            <?php while($r=mysql_fetch_array($sql)){?>
			<?php
			$c++;
			$balance+=$r["balance"];
			$id = $r["id"];
			?>
			
							<tr>
						

			<td><?php echo @fecha($r["fecha"])." | ".$r["hora"];?></td>
				<td><?php echo ($r["producto"])?></td>             
			 <td><?php echo decimal($r["total"])?></td>
			  <td><?php echo decimal($r["balance"])?></td>

			 

            </tr>
                                                        <?php }?>
						</tbody>
					</table>
					<hr>
					<b>CANT. VENTA:</b> <?php echo $c;?> |
					 <b>TOTAL:</b> <?php echo @decimal($balance);?>
					 
