<?php 
  include_once '../php/config.php';


?>
<select id="facturas" name="facturas" class="form-control" onChange="get_total(this.value)">
							<option value="" selected> -Seleccione facturas-</option>
							<?php  
							 $sqlFacturas = mysql_query("select * from ventas where cliente = '".$_GET['cliente']."' and balance>0") or die(mysql_error());

							 while($hr = mysql_fetch_array($sqlFacturas)){
							 	$balance+=$hr["balance"];
							 	$id_venta = $hr["id_venta"];

							?>
							<option value="<?php echo $hr['id_venta']?>"><?php echo @fecha($hr['fecha'])." - (".@decimal($hr["balance"]).")"?></option>
							<?php }?>
								
</select>