  <br>
  <table border=1 cellspacing=1 cellpadding=2 width=760 style="border: 1px inset;">
  <form action="controllers/inputController.php" method="post" name="mroform" id="mroform">
  <input name="mro_pkey" id="mro_pkey" type="hidden" value="<?=$mro_data['mro_pkey'];?>">
  <input name="mro_projectpkey" id="mro_projectpkey" type="hidden" value="<?=$mro_data['mro_projectpkey'];?>">
  <input name="mro_type" id="mro_type" type="hidden" value="<?=$mro_data['mro_type'];?>">
  <tr valign=top>
  <td valign=top width=150 class=formlabel>MRO Type</td>
  <td valign=top width=610 class=formvalue><b>
  <? 
  if ($mro_data['mro_type']=="1") { 
    echo "Budgeted Material";
  } else if ($mro_data['mro_type']=="2") { 
    echo "Budgeted Material Exceeded";
  } else if ($mro_data['mro_type']=="3") { 
    echo "Non Budgeted Material - VO";
  } else if ($mro_data['mro_type']=="4") { 
    echo "Non Budgeted Material - Subcon";
  } else {
    echo "Unknown";
  }
  ?></b>&nbsp;
  </td>
  </tr>
  <tr valign=top>
  <td valign=top width=150 class=formlabel>MRO No</td>
  <td valign=top width=610 class=formvalue><?=mroidstr($mro_data['mro_id']);//,$mro_data['mro_revno']);?>&nbsp;</td>
  </tr>
  <? if ($link_data['mro_id']!="") { ?>
    <tr valign=top>
    <td valign=top width=150 class=formlabel>Linked MRO</td>
    <td valign=top width=610 class=formvalue><?=mroidstr($link_data['mro_id'],$link_data['mro_revno']);?>&nbsp;</td>
    </tr>
  <? } ?>
  <tr valign=top>
  <td valign=top width=150 class=formlabel>Sub-con PO/Ref</td>
  <td valign=top width=610 class=formvalue><?=$mro_data['mro_subconref'];?>&nbsp;</td>
  </tr>
  <tr valign=top>
  <td valign=top width=150 class=formlabel>Client MRO No</td>
  <td valign=top width=610 class=formvalue><?=$mro_data['mro_clientref'];?>&nbsp;</td>
  </tr>
  <tr valign=top>
  <td valign=top width=150 class=formlabel>Date of Request</td>
  <td valign=top width=610 class=formvalue><?=unconverttounixslash($mro_data['mro_requestdate']);?>&nbsp;</td>
  </tr>
  <tr valign=top>
  <td valign=top width=150 class=formlabel>Date of Delivery</td>
  <td valign=top width=610 class=formvalue><?=unconverttounixslash($mro_data['mro_deliverydate']);?>&nbsp;</td>
  </tr>
  <tr valign=top>
  <td valign=top width=150 class=formlabel>Backcharge/Debit Acc.</td>
  <td valign=top width=610 class=formvalue><? if (strlen($mro_data['mro_subcons'])>32) { echo "Please Refer Remarks"; } else { echo $subcon_data['subconname']; } ?>&nbsp;</td>
  </tr>
  <tr valign=top>
  <td valign=top width=150 class=formlabel>Remarks</td>
  <td valign=top width=610 class=formvalue><?php if($mro_data['mro_remarks'] == "") { echo "-N/A-"; }else{ echo richtext($mro_data['mro_remarks']); }?>&nbsp;</td>
  </tr>
  <? if (($reject_data['approval_pkey']!="")&&($mro_data['mro_status']=="0")) { ?>
    <tr valign=top>
    <td valign=top width=150 class=formlabel>Rejection Remarks</td>
    <td valign=top width=610 class=formvalue><span style="color: red;"><b><?=richtext($reject_data['approval_remarks']);?>&nbsp;</b></span></td>
    </tr>
  <? } ?>
  <tr valign=top>
  <td valign=top width=150 class=formlabel>Trade</td>
  <td valign=top width=610 class=formvalue><?=$trade_data['tradecode'];?> - <?=$trade_data['tradedescription'];?>&nbsp;</td>
  </tr>
  <input name="job" id="job" type="hidden" value="">
  </form>
  </table>

  <br>

  <table border=1 cellspacing=1 cellpadding=2 width=920 style="border: 1px inset;">
  <tr valign=top>
  <td valign=top width=40 class=listheader>Item</td>
  <td valign=top width=360 class=listheader>Description</td>
  <td valign=top width=80 class=listheader>Unit</td>
  <td valign=top width=80 class=listheader>Qty</td>
  <td valign=top width=280 class=listheader>Purpose</td>
  
  </tr>

  <? foreach($item_list as $myitem) { ?>

    <? if ($myitem['item_quantity']>0) { ?>

      <tr valign=top>
      <td valign=top width=40 class=listnumber><?=$myitem['item_no'];?>&nbsp;</td>
      <td valign=top width=360 class=listcontent><?=unescape($myitem['item_description']);?>&nbsp;</td>
      <td valign=top width=80 class=listcontent><?=$myitem['item_unit'];?>&nbsp;</td>
      <td valign=top width=80 class=listcontentnumeric><?=number_format($myitem['item_quantity'],4);?></td>
      <td valign=top width=280 class=listcontent><?=stripslashes($myitem['item_purpose']);?>&nbsp;</td>
      
      </tr>

    <? } ?>

  <? } ?>

  </table>
