Como multiplico esto
Publicado por sebastian (19 intervenciones) el 13/10/2016 21:09:08
Hola estimados una consulta como multiplico los volares que se ingresan en los campos de ALTO ANCHO Y COSTON Y QUE ME DE EL RESULTADO EN PRECIO PORFA
GRACIAS :)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
?>
<div class="table-responsive">
<table class="table">
<tr class="warning">
<th>Código</th>
<th>Producto</th>
<th align="center">Alto</th>
<th align="center">Ancho</th>
<th>Costo</th>
<th><span class="pull-right">Cant.</span></th>
<th><span class="pull-right">Precio</span></th>
<th class='text-center' style="width: 36px;">Agregar</th>
</tr>
<?php
while ($row=mysqli_fetch_array($query)){
$id_producto=$row['id_producto'];
$codigo_producto=$row['codigo_producto'];
$nombre_producto=$row['nombre_producto'];
$precio_venta=$row["precio_producto"];
$precio_venta=number_format($precio_venta,2);
?>
<tr>
<td><?php echo $codigo_producto; ?></td>
<td><?php echo $nombre_producto; ?></td>
<td><input type="text" class="form-control" style="text-align:right"></td>
<td><input type="text" class="form-control" style="text-align:right"></td>
<td><input type="text" class="form-control" style="text-align:right" id="precio_venta_<?php echo $id_producto; ?>" value="<?php echo $precio_venta;?>"></td>
<td class='col-xs-1'>
<div class="pull-right">
<input type="text" class="form-control" style="text-align:right" id="cantidad_<?php echo $id_producto; ?>" value="1" >
</div></td>
<td class='col-xs-2'><div class="pull-right">
<input type="text" class="form-control" style="text-align:right" >
</div></td>
<td class='text-center'><a class='btn btn-info'href="#" onclick="agregar('<?php echo $id_producto ?>')"><i class="glyphicon glyphicon-plus"></i></a></td>
</tr>
<?php
}
?>
<tr>
<td colspan=5><span class="pull-right"><?
echo paginate($reload, $page, $total_pages, $adjacents);
?></span></td>
</tr>
</table>
</div>
<?php
GRACIAS :)
Valora esta pregunta
0