<?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());


?>

<table class=""  style="width:500px">

				 <th>Ver detalle</th>
                <th>Balance</th>
				 <th>Abonado</th>
                 <th>Fecha</th>
			     

			  
			
			 
			  
			  

					
            <?php while($r=mysql_fetch_array($sql)){?>
			<?php
			$c++;
			$balance+=$r["balance"];
			$id = $r["id_venta"];
			?>
			
							<tr>
<td><a class="text-primary" href="javascript:void(0)" onClick="pop2('../pos/ticket_factura.php', 'folio=<?php echo $id?>')" ><i class="bi bi-printer"></i> Imprimir</a></td>
		  <td><?php echo decimal($r["balance"])?></td>
		  <td><?php echo ($r["pagado"])?></td>
			<td><?php echo @fecha($r["fecha"])?></td>
				             
			
			

			 

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

include_once("../footer.php");



?>
