  <br>
  <table border=1 cellspacing=1 cellpadding=2 width=928 style="border: 1px inset;">

  <tr valign=top>
  <td valign=top width=48 class=listheader>No.</td>
  <td valign=top width=110 class=listheader>PO No</td>
  <td valign=top width=250 class=listheader>Supplier</td>
  <td valign=top width=100 class=listheader>Date</td>
  <td valign=top width=110 class=listheader>Quantity</td>
  <td valign=top width=110 class=listheader>Delivered</td>
  <td valign=top width=100 class=listheader>Status</td>
  <td valign=top width=100 class=listheader>Options</td>
  </tr>

  <? foreach ($po_list as $mypo) { ?>

    <?
    // get po total and do totals

    include_once('models/supplierModel.php');
    $mysupplierModel=new supplierModel;

    $supplier_data = $mysupplierModel->getdata_supplier($mypo['po_supplierpkey']);
    $poquantity = $mypoModel->getquantity_poitems($mypo['po_pkey']);
    $doquantity = $mydoModel->getquantity_doitemsbypo($mypo['po_pkey']);

    ?>

    <tr valign=top>
    <td valign=top width=48 class=listnumber><?=$mypo['recordno'];?></td>
    <td valign=top width=110 class=listcontent><?=$mypo['po_no'];?>&nbsp;</td>
    <td valign=top width=250 class=listcontent><?=$supplier_data['supplier_name'];?>&nbsp;</td>
    <td valign=top width=100 class=listcontent><?=unconverttounixslash($mypo['po_date']);?>&nbsp;</td>
    <td valign=top width=110 class=listcontent><?=number_format($poquantity,4);?>&nbsp;</td>
    <td valign=top width=110 class=listcontent><?=number_format($doquantity,4);?>&nbsp;</td>
    <td valign=top width=100 class=listcontent>
    <?
    /*
    if ($mypo['po_status']=="0") {
      echo "New";  
    } else if ($mypo['po_status']=="1") {
      echo "Submitted";
    } else if ($mypo['po_status']=="2") {
      echo "Recommended";
    } else if ($mypo['po_status']=="3") {
      echo "Approved";
    }
    */
    if ($mypo['po_status']=="0") {
      echo "New";  
    } else if ($mypo['po_status']=="1") {
      echo "Open";
    } else if ($mypo['po_status']=="2") {
      echo "Closed";
    }
    ?>
    </td>
    <td valign=top width=100 class=listcontent>
    <button name="view<?=$mypo['recordno'];?>" id="view<?=$mypo['recordno'];?>" type="button" style="width: 90px;" onClick="location.href='index.php?module=do&task=list&poid=<?=$mypo['po_pkey'];?>'"><img src="gfx/options/b_view.png" class="actionbutton">&nbsp;View DOs</button>
    </td>
    </tr>

  <? } ?>

  </table>
