  <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=210 class=listheader>MRO Type</td>
  <td valign=top width=100 class=listheader>MRO No</td>
  <td valign=top width=120 class=listheader>Request Date</td>
  <td valign=top width=120 class=listheader>Delivery Date</td>
  <td valign=top width=130 class=listheader>ITQ Status</td>
  <td valign=top width=200 class=listheader>Options</td>
  </tr>

  <? foreach ($mro_list as $mymro) { ?>

    <?
    $itq_data = $myitqModel->getdata_itqbymro($mymro['mro_pkey']);    
    if ($itq_data['itq_pkey']=="") $itq_data['itq_status']="";
    ?>

    <tr valign=top>
    <td valign=top width=48 class=listnumber><?=$mymro['recordno'];?></td>
    <td valign=top width=210 class=listcontent>
    <?
    if ($mymro['mro_type']=="1") {
      echo "Budgeted Material";
    } else if ($mymro['mro_type']=="2") {
      echo "Budgeted Material Exceeded";
    } else if ($mymro['mro_type']=="3") {
      echo "Non Budgeted Material - VO";
    } else if ($mymro['mro_type']=="4") {
      echo "Non Budgeted Material - Subcon";
    }
    ?>
    </td>
    <td valign=top width=100 class=listcontent><?=$mymro['mro_id'];?>&nbsp;</td>
    <td valign=top width=120 class=listcontent><?=unconverttounixslash($mymro['mro_requestdate']);?>&nbsp;</td>
    <td valign=top width=120 class=listcontent><?=unconverttounixslash($mymro['mro_deliverydate']);?>&nbsp;</td>
    <td valign=top width=130 class=listcontent>
    <?
    if ($itq_data['itq_status']=="0") {
      echo "Created";
    } else if ($itq_data['itq_status']=="1") {
      echo "Printed";
    } else if ($itq_data['itq_status']=="4") {
      echo "Cancelled";
    } else {
      echo "Not Created";
    }
    ?>
    &nbsp;
    </td>
    <td valign=top width=200 class=listcontent>
    <? if ($itq_data['itq_status']=="4") { ?>
      <i>Cancelled</i>
    <? } else { ?>
      <? if ($itq_data['itq_status']=="0") { ?>
        <? if (($pubuseraccess['access_itq_edit']==1)||($pubuseraccess['access_itq_invite']==1)||($pubuserrole>=2)) { ?>
          <button name="generate<?=$mymro['recordno'];?>" id="generate<?=$mymro['recordno'];?>" type="button" style="width: 90px;" onClick="location.href='index.php?module=itq&task=generate&itemid=<?=$mymro['mro_pkey'];?>'"><img src="gfx/options/b_invite.png" class="actionbutton">&nbsp;Invite</button>&nbsp;
          <button name="print<?=$mymro['recordno'];?>" id="print<?=$mymro['recordno'];?>" type="button" style="width: 90px;" onClick="location.href='index.php?module=itq&task=print&itemid=<?=$itq_data['itq_pkey'];?>'"><img src="gfx/options/b_print1.png" class="actionbutton">&nbsp;Print</button>
        <? } ?>
      <? } else if ($itq_data['itq_status']=="1") { ?>
        <? if (($pubuseraccess['access_itq_edit']==1)||($pubuseraccess['access_itq_invite']==1)||($pubuserrole>=2)) { ?>
          <button name="generate<?=$mymro['recordno'];?>" id="generate<?=$mymro['recordno'];?>" type="button" style="width: 90px;" onClick="location.href='index.php?module=itq&task=generate&itemid=<?=$mymro['mro_pkey'];?>'"><img src="gfx/options/b_invite.png" class="actionbutton">&nbsp;Invite</button>&nbsp;
          <button name="print<?=$mymro['recordno'];?>" id="print<?=$mymro['recordno'];?>" type="button" style="width: 90px;" onClick="location.href='index.php?module=itq&task=print&itemid=<?=$itq_data['itq_pkey'];?>'"><img src="gfx/options/b_print1.png" class="actionbutton">&nbsp;Print</button>
        <? } ?>
      <? } else { ?>
        <? if (($pubuseraccess['access_itq_edit']==1)||($pubuseraccess['access_itq_invite']==1)||($pubuserrole>=2)) { ?>
          <button name="generate<?=$mymro['recordno'];?>" id="generate<?=$mymro['recordno'];?>" type="button" style="width: 90px;" onClick="location.href='index.php?module=itq&task=generate&itemid=<?=$mymro['mro_pkey'];?>'"><img src="gfx/options/b_invite.png" class="actionbutton">&nbsp;Invite</button>
        <? } ?>
      <? } ?>
    <? } ?>
    &nbsp;
    </td>
    </tr>

  <? } ?>

  </table>
