<table width='100%' border='0' cellpadding='0' cellspacing='0'>
  <tr> 
    <td>
    <table width='100%' border='0' cellspacing='0' cellpadding='0'>
        <tr> 
          <td width='5%' class='accountlabPlanDataHTD'><?php echo $BL->props->lang['Nu']; ?></td>
          <td width='50%' class='accountlabPlanDataHTD'><?php echo $BL->props->lang['Description']; ?></td>
          <td width='15%' class='accountlabPlanDataHTD'><div align='right'><?php echo $BL->props->lang['Amount']; ?>&nbsp;</div></td>
          <td width='10%' class='accountlabPlanDataHTD'><?php echo $BL->props->lang['Due_Date']; ?></td>
          <td width='10%' class='accountlabPlanDataHTD'><?php echo $BL->props->lang['Status']; ?></td>
          <td width='10%' class='accountlabPlanDataHTD'></td>
        </tr>
        <?php
        $bgcolor= "accountlabDataTD";
        foreach ($invoices as $key => $value) {
                if ($bgcolor == "accountlabAltDataTD")
                    $bgcolor= "accountlabDataTD";
                elseif ($bgcolor == "accountlabDataTD") 
                    $bgcolor= "accountlabAltDataTD";
        ?>
         <tr> 
          <td class='<?php echo $bgcolor; ?>'><?php echo $conf['invoice_prefix'].$value['invoice_no'].$conf['invoice_suffix']; ?></td>
          <td class='<?php echo $bgcolor; ?>'><?php echo $BL->getFriendlyDesc($value['desc'],$value['sub_id']); ?></td>
          <td class='<?php echo $bgcolor; ?>'><div align='right'><?php echo $BL->toCurrency($value['gross_amount'],null,1); ?>&nbsp;</div></td>
          <td class='<?php echo $bgcolor; ?>'><?php echo $BL->fDate($value['due_date']); ?></td>
          <td class='<?php echo $bgcolor; ?>'><?php echo $BL->props->lang[$value['status']]; ?></td>
          <td class='<?php echo $bgcolor; ?>'>
          &nbsp;<a class='accountlabPlanLink' href='<?php echo $PHP_SELF; ?>?cmd=<?php if($value['status']==$BL->props->invoice_status[1])echo "viewInvoice"; else echo "pay"; ?>&invoice_no=<?php echo $value['invoice_no']; ?>'><?php echo $BL->props->lang['View']; ?></a>
          &nbsp;<a class='accountlabPlanLink' href='info.php?cmd=PDF&invoice_no=<?php echo $value['invoice_no']; ?>' target='_blank'><?php echo $BL->props->lang['PDF']; ?></a>
          </td>
        </tr>
        <?php } ?>
        </table>
       </td>
  </tr>
</table>