problema PHP
Publicado por felipe (23 intervenciones) el 26/10/2017 04:36:41
hola tengo este codigo pero no me muestra la cantidad de productos
tengo la tabla buy con el campo q que guarda la cantidad de productos soy novato en php
de antemano muchas gracias
tengo la tabla buy con el campo q que guarda la cantidad de productos soy novato en php
de antemano muchas 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
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
<?php
$buy = BuyData::getById($_GET["buy_id"]);
$products = BuyProductData::getAllByBuyId($_GET["buy_id"]);
$client = ClientData::getById($buy->client_id);
$paymethod = $buy->getPaymethod();
$iva = ConfigurationData::getByPreffix("general_iva")->val;
$coin = ConfigurationData::getByPreffix("general_coin")->val;
$ivatxt = ConfigurationData::getByPreffix("general_iva_txt")->val;
?>
<div class="row">
<div class="col-md-12">
<h2> Cotizacion #<?php echo $buy->id; ?> [<?php echo $buy->getStatus()->name; ?>]</h2>
<h4>Cliente: <?php echo $client->getFullname(); ?></h4>
<h4>Metodo de pago : <?php echo $paymethod->name; ?></h4>
<?php if(count($products)>0):?>
<table class="table table-bordered">
<thead>
<th></th>
<th>Codigo</th>
<th>Producto</th>
<th>Cantidad</th>
</thead>
<?php foreach($products as $p):
$px = $p->getProduct();
?>
<tr>
<td><a target="_blank" href="../index.php?view=producto&product_id=<?php echo $px->id; ?>">Detalles</a></td>
<td><?php echo $px->code; ?></td>
<td><?php echo $px->name; ?></td>
<td><?php echo $px->q; ?></td>
</tr>
<?php endforeach; ?>
</table>
<div class="row">
<div class="col-md-5 col-md-offset-7"><br>
</div>
</div>
<div class="row">
<div class="col-md-12">
<!--
<form class="form-horizontal" role="form" method="post" action="index.php?action=changestatus">
<div class="form-group">
<label for="inputEmail1" class="col-md-3 control-label">Estado</label>
<div class="col-md-6">
<select name="status_id" class="form-control">
<?php foreach(StatusData::getAll() as $s):?>
<option value="<?php echo $s->id; ?>" <?php if($s->id==$buy->status_id){ echo "selected"; }?>><?php echo $s->name; ?></option>
<?php endforeach; ?>
</select>
</div>
<div class="col-md-3">
<input type="hidden" name="buy_id" value="<?php echo $buy->id; ?>">
<button type="submit" class="btn btn-default">Cambiar Estado</button>
</div>
</div>
</form>
-->
</div>
</div>
<?php endif; ?>
</div>
</div>
Valora esta pregunta


0