  <br>
  <table border=1 cellspacing=1 cellpadding=2 width=760 style="border: 1px inset;">
  <form action="controllers/inputController.php" method="post" name="invoiceform" id="invoiceform">
  <input name="invoice_pkey" id="invoice_pkey" type="hidden" value="<?=$invoice_data['invoice_pkey'];?>">
  <tr valign=top>
  <td valign=top width=150 class=formlabel>Invoice No</td>
  <td valign=top width=610 class=formvalue><?=$invoice_data['invoice_no'];?></td>
  </tr>
  <tr valign=top>
  <td valign=top width=150 class=formlabel>S/O No</td>
  <td valign=top width=610 class=formvalue><?=$invoice_data['invoice_sono'];?></td>
  </tr>
  <tr valign=top>
  <td valign=top width=150 class=formlabel>Invoice Date *</td>
  <td valign=top width=610 class=formvalue><?=unconverttounixslash($invoice_data['invoice_date']);?></td>
  </tr>
  <tr valign=top>
  <td valign=top width=150 class=formlabel>Terms</td>
  <td valign=top width=610 class=formvalue><?=$invoice_data['invoice_terms'];?> Days
  </td>
  </tr>
  <tr valign=top>
  <td valign=top width=150 class=formlabel>Salesman's Name</td>
  <td valign=top width=610 class=formvalue><?=$invoice_data['invoice_salesman'];?></td>
  </tr>
  <tr valign=top>
  <td valign=top width=150 class=formlabel>Currency</td>
  <td valign=top width=610 class=formvalue><?=$invoice_data['invoice_currency'];?></td>
  </tr>
  <tr valign=top>
  <td valign=top width=150 class=formlabel>Customer No</td>
  <td valign=top width=610 class=formvalue><?=$invoice_data['invoice_customerno'];?></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=100 class=listheader>Unit</td>
  <td valign=top width=100 class=listheader>Qty</td>
  <td valign=top width=100 class=listheader>Rate</td>
  <td valign=top width=140 class=listheader>Amount</td>
  <td valign=top width=80 class=listheader>Options</td>
  </tr>

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

    <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=100 class=listcontent><?=$myitem['item_unit'];?>&nbsp;</td>
    <td valign=top width=100 class=listcontentnumeric><?=number_format($myitem['item_quantity'],4);?></td>
    <td valign=top width=100 class=listcontentnumeric><?=number_format($myitem['item_rate'],2);?></td>
    <td valign=top width=140 class=listcontentnumeric><?=number_format(($myitem['item_quantity']*$myitem['item_rate']),2);?>&nbsp;</td>
    <td valign=top width=80 class=listcontent>
    <? if ($myitem['item_status']==4) { ?>
      <i>Cancelled</i>
    <? } else { ?>
      <a href="index.php?module=invoice&task=viewitem&invoiceid=<?=$invoice_data['invoice_pkey'];?>&itemid=<?=$myitem['item_pkey'];?>"><img src="gfx/options/b_view.png" border=0 alt="View"></a>
    <? } ?>
    </td>
    </tr>

  <? } ?>

  </table>
