<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN">
<html>
<head>
<style>
td {
  font-family: "verdana";
  font-size: 11px;
  text-align: left
}
</style>
<title>Invoice #<%$invoice_id%></title>
<meta http-equiv="Content-Type" content="text/html; charset=iso-8859-1">
</head>

<body>
<table width="600" border="0" align="center" cellpadding="0" cellspacing="0">
  <tr>
    <td>
    <h2><font color="#999999"><%$company%></font></h2>

    <%if ($smarty.now|date_format:"%Y%m%d") > ($due_date|date_format:"%Y%m%d") and ($paid eq '0')%>
      <h3><font color="red">Overdue Invoice</font></h3>
    <%else%>
      <br />
    <br />
    <%/if%>

    </td>
  </tr>
</table>
<table width="600" border="1" align="center" cellpadding="0" cellspacing="0">
  <tr>
    <td width="272" valign="top">
      <table width="100%" border="0" cellspacing="0" cellpadding="5">
        <tr>
          <td>
            <b>Remit payment to:</b> 
            <p>
            <%$company%>
            <br />
            Attn: <%$contact%>
            <br />
            <br />
            <%$address%>
            </p>

            <p>Tel: <%$phone%></p>
          </td>
        </tr>
      </table>
      <br />
    <br />
    </td>
    <td width="302" valign="top">
      <table width="100%" border="0" cellspacing="0" cellpadding="5">
        <tr>
          <td><b>Invoice Date:</b></td>
          <td><%$invoice_date|date_format%></td>
        </tr>
        <tr bgcolor="#EEEEEE">
          <td><b>Invoice Number:</b></td>
          <td><%$invoice_id%></td>
        </tr>
        <tr>
          <td><b>Due Date:</b></td>
          <td><%$due_date|date_format%></td>
        </tr>
        <tr bgcolor="#EEEEEE">
          <td><b>Terms: </b> </td>
          <td>Paypal</td>
        </tr>
      </table>
      <br /> 
    </td>
  </tr>
</table>
<table width="600" border="0" align="center" cellpadding="5" cellspacing="0">
  <tr>
    <td></td>
  </tr>
</table>
<table width="600" height="30"  border="1" align="center" cellpadding="5" cellspacing="0">
  <tr>
    <td width="272" valign="top"><b>Invoiced to: </b> 
      <p><%$invoiced_to|nl2br%></p>
    </td>
    <td width="302" valign="top">
    <%if $paid%>
      <h3><font color="#999999">Paid in full</font></h3>
    <%else%>
      Pay for this invoice online using your credit card.
      <%$available_payment_systems%>
    <%/if%>
    </td>
  </tr>
</table>
<table width="600" border="0" align="center" cellpadding="5" cellspacing="0">
  <tr>
    <td></td>
  </tr>
</table>
<table width="600" border="1" align="center" cellpadding="5" cellspacing="0">
  <tr>
    <td width="113"><div align="center"><b>Date</b></div></td>
    <td width="86"><div align="center"><b>Service</b></div></td>
    <td width="128"><div align="center"><b>Description</b></div></td>
    <td width="65"><div align="center"><b>Qty.</b></div></td>
    <td width="53"><div align="center"><b>Rate</b></div></td>
    <td width="81"><div align="center"><b>Subtotal</b></div></td>
  </tr>
  <tr>
    <td><div align="left"><%$invoice_date|date_format:"%m/%d/%Y"%></div></td>
    <td><%$service%></td>
    <td><%$description|nl2br%></td>
    <td><div align="center">1</div></td>
    <td><div align="center"><%$currency%><%$total%></div></td>
    <td><div align="right"><%$currency%><%$total%></div></td>
  </tr>
  <tr>
    <td colspan="3" rowspan="3" valign="top"> <b><u>Comments:</u> </b><br />
      <%$comment|nl2br%>
    </td>
    <td colspan="2"><div align="right"><b>Subtotal:</b></div></td>
    <td><div align="right"><%$currency%><%$total%></div></td>
  </tr>
  <tr>
    <td colspan="2"><div align="right"><b>Payments:</b></div></td>
    <td>
      <div align="right">
      <%if $paid%>
          (<%$currency%><%$total%>)
      <%else%>
        (<%$currency%>0.00)
      <%/if%>
      </div>
  </td>
  </tr>
  <tr>
    <td colspan="2"><div align="right"><b>Total:</b></div></td>
    <td>
      <div align="right">
      <%if $paid%>
          <%$currency%>0.00
      <%else%>
        <%$currency%><%$total%>
      <%/if%>
      </div>
    </td>
  </tr>
</table>
</body>
</html>
