blob: c7bb3454f0865c780395aa2f7787f5a3db9e17ec (
plain)
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
|
<? if (!empty($parts)): ?>
<table width="100%">
<tr>
<th>Part #</th>
<th>Name</th>
<th>Math</th>
<th>Quantity</th>
</tr>
<? foreach ($parts AS $part): ?>
<? $unique = new UniquePart($part->get('part_id')) ?>
<? $url = $part->getBuyUrl() ?>
<tr>
<td>
<?=$part->get('part_num')?>
<? if ($url): ?>
<a href="<?=$url?>">(buy)</a>
<? endif ?>
</td>
<td>
<a href="<?=$unique->getViewUrl()?>"><?=$unique->get('name')?></a>
</td>
<td>
<?=$part->get('total_quantity')?> <?=$unique->get('units')?> needed /
<?=$part->get('quantity')?> <?=$unique->get('units')?> per unit
</td>
<td>
<b><?=$part->orderQuantity()?> total</b>
</td>
</tr>
<? endforeach ?>
</table>
<? else: ?>
<b>No parts found.</b>
<? endif?>
|