<?php
include("../php/config.php");
$folio = $_GET["folio"];
$sql = mysql_query("select * from detalle_compra where folio='$folio'") or die(mysql_error())
?>
<div class="table-responsive border p-3 mt-2">
<table class="table table-hover table-striped table-sm" data-page-length='8' style="width: 100%">
	<thead>
		
	
		<th>Codigo</th>
		<th>Descripcion</th>
		             
		<th>Cantidad</th>
		<th>Precio de compra</th>
		<th>Total costo</th>
		<th>Precio de venta</th>
		<th>Total precio</th>
		<th>Editar</th>
	</thead>
<tbody>
<?php while($r=mysql_fetch_array($sql)){?>
			<tr>
			<td><?php echo $r["codigo"]?></td>
                <td><span class="text-primary"><?php echo $r["descripcion"]?></span></td>
				<td><?php echo decimal($r["cantidad"])?></td>
                <td><?php echo $r["costo"]?></td>
                <td><?php echo $r["total_costo"]?></td>
				<td><?php echo $r["precio"]?></td>
				<td><?php echo $r["total_precio"]?></td>
             
               <td><a class="" href="#modalDetalle" data-toggle="modal" onClick='ver(<?php echo $r["id_detalle"]?>)'><i class="fa fa-edit"></i></a></td>
			</tr>
         <?php }?>
	</tbody>
</table>
</div>
<?php

?>

      
</script>