<div> <table id="tablePrices" class="fancyTable" align="center" border="1" cellpadding="2" cellspacing="0" width="100%" class="ui-corner-all" style=" table-layout: fixed"> <thead> <?php include_once "../model/Vendor.php"; $vendorObj = new Vendor(); $items = $vendorObj->getItemPrices(); $vendors = $vendorObj->getVendorsWithPricesOnMainList(); $vendorPrices = array(); ?> <tr class='ui-widget-header' align="center"> <th rowspan="2" style="width: 200px;" >Item</th> <?php foreach ($vendors as $id => $value) { $vendorPrices[] = $vendorObj->getVendorPrices($id); ?> <th rowspan="2" style="width: 80px"><?php echo htmlentities($value); ?> </th> <?php } ?> <th colspan="2" style="width: 80px">Base cost</th> </tr> <tr class='ui-widget-header' align="center"> <th style="width: 50px">Lowest cost</th> <th style="width: 50px">Target cost</th> </tr> </thead>
</tr> </table> <br /> <table border="1" cellspacing="0" width="850" align="center" class="ui-corner-all"> <tr class='ui-widget-header'> <th width="5%"> </th> <th width="48%">Item</th> <th>List purchase price</th> <th>Adjusted purchase price</th> <th width="10%">Diff</th> </tr> <?php include_once "../model/Item.php"; $itemObj = new Item(); if (isset($_GET["idvendor"])) { $items = $vendor->getVendorPrices($_GET["idvendor"]); } else { //$items = $itemObj->getInventoryItems(); $items[] = array("iditem" => "", "name" => "", "quantity" => ""); } $i = 0; foreach ($items as $item) { ?> <tr id="row<?php echo $i; ?> "> <td> <img alt="+" src="../images/plus.png" onclick="addItem(<?php echo $i; ?>