<body bgcolor=ffffff>

<table width=100%>
<tr valign=bottom>
  <td width=10>&nbsp;</td>
  <td>
  
  <table width=100%>
  <tr>
    <td>
      <h4>
      <%company%>
      <br><%address%>
      </h4>
    </td>

    <td align=right>
      <h4>
      Telefon <%tel%>
      <br>Telefax <%fax%>
      </h4>
    </td>
  </tr>

  <tr>
    <th colspan=3>
      <h4>R E C H N U N G</h4>
    </th>
  </tr>

  </table>


  <table width=100% callspacing=0 cellpadding=0>
    
  <tr>
    <td align=right>
    <table>
    <tr>
      <th align=right>Ausgestellt am</th><td width=10>&nbsp;</td><td><%invdate%></td>
    </tr>
  
    <tr>
      <th align=right>Bezahlbar bis</th><td width=10>&nbsp;</td><td><%duedate%></td>
    </tr>

    <tr>
      <th align=right>Nummer</th><td>&nbsp;</td><td><%invnumber%></td></tr>
    </tr>
  
<!--
    <tr>
      <th align=right>Clerk:</th><td>&nbsp;</td><td><%username%></td>
    </tr>
-->

    <tr>
      <td>&nbsp;</td>
    </tr>
    </td>
    </table>
  </tr>

  <tr>
    <td>
    <table width=100%>
    <tr bgcolor=000000>
      <th align=left><font color=ffffff>An:</th>
      <th align=left><font color=ffffff>Lieferaddresse:</th>
    </tr>

<!--
     other variables which can be use:
     contact, shiptocontact, shiptophone, shiptofax
-->

    <tr>
      <td><%name%>
      <br><%address1%>
      <%if address2%>
<br><%address2%>
<%end address2%>
      <br><%city%> <%state%> <%zipcode%>
      <%if country%>
<%country%>
<%end country%>
      </td>
      
      <td><%shiptoname%>
      <br><%shiptoaddress1%>
      <%if shiptoaddress2%>
<br><%shiptoaddress2%>
<%end shiptoaddress2%>
      <br><%shiptocity%> <%shiptostate%> <%shiptozipcode%>
      <%if shiptocountry%>
<%shiptocountry%>
<%end shiptocountry%>
      </td>
    </tr>
    </table>
    </td>
  </tr>

  <tr>
    <td>&nbsp;</td>
  </tr>
  
  <tr>
    <td>
    <table width=100%>
    <tr bgcolor=000000>
<!--      <th align=right><font color=ffffff>No.</th>  -->
      <th align=left><font color=ffffff>Nummer</th>
      <th align=left><font color=ffffff>Beschreibung</th>
      <th><font color=ffffff>Anz.</th>
      <th>&nbsp;</th>
      <th><font color=ffffff>Preis</th>
      <th><font color=ffffff>Rab</th>
      <th><font color=ffffff>Total</th>
    </tr>

<%foreach number%>
    <tr valign=top>
<!--      <td align=right><%runningnumber%>.</td>
adjust the colspan if you include this to shift subtotal one to the right
-->
      <td><%number%></td>
      <td><%description%></td>
      <td align=right><%qty%></td>
      <td><%unit%></td>
      <td align=right><%sellprice%></td>
      <td align=right><%discount%></td>
      <td align=right><%linetotal%></td>
    </tr>
<%end number%>

<!--
you can also use netprice instead of sellprice if you
don't want to show the discount
netprice = sellprice - discount
to show the percentage for a discount use <%discountrate%>
-->

    <tr>
      <td colspan=7><hr noshade></td>
    </tr>
    
<%if taxincluded%>
    <tr>
      <th colspan=5 align=right>Total</th>
      <td colspan=2 align=right><%invtotal%></td>
    </tr>
<%end taxincluded%>
<%if not taxincluded%>
    <tr>
      <th colspan=5 align=right>Zwischensumme</th>
      <td colspan=2 align=right><%subtotal%></td>
    </tr>
<%end taxincluded%>

<%foreach tax%>
    <tr>
      <th colspan=5 align=right><%taxdescription%> auf <%taxbase%></th>
      <td colspan=2 align=right><%tax%></td>
    </tr>
<%end tax%>

<%if paid%>
    <tr>
      <th colspan=5 align=right>Bezahlt</th>
      <td colspan=2 align=right>- <%paid%></td>
    </tr>
<%end paid%>

    <tr>
      <td colspan=3>&nbsp;</td>
      <td colspan=4><hr noshade></td>
    </tr>

    <tr>
      <td colspan=3>Bezahlbar innerhalb von <b><%terms%></b> Tagen</td>
<%if total%>
      <th colspan=2 align=right>Total</th>
      <th colspan=2 align=right><%total%></th>
<%end total%>
    </tr>

    <tr>
      <td>&nbsp;</td>
    </tr>

    </table>
    </td>
  </tr>

<tr>
  <td>
  <table width=100%>
    <tr valign=top>
<%if notes%>
      <td>Bemerkungen:</td>
      <td><%notes%></td>
<%end notes%>
      <td align=right>
      Alle Preise in <b><%currency%></b>
      <br><%shippingpoint%>
      </td>
    </tr>

  </table>
  </td>
</tr>

<tr><td>&nbsp;</td></tr>
  
<tr>
  <td>
  <table width=100%>
  <tr valign=top>
    <td><font size=-3>
    Rechnung ist bezahlbar innerhalb von <%terms%> Tagen.
    Nach dem <%duedate%> werden Zinsen zu einem
    monatlichen Satz von 1.5% verrechnet.
    Waren bleiben im Besitz von <%company%> bis die Rechnung voll bezahlt ist.
    R�ckgaben werden mit 10% Lagergeb�hren belastet. Besch�digte Waren
    und Waren ohne eine R�ckgabenummer werden nicht entgegengenommen.
    </font>
    </td>
    <td width=150>
    X <hr noshade>
    </td>
  </tr>
  </table>
  </td>
</tr>

<%foreach tax%>
  <tr>
    <th colspan=7 align=left><font size=-2><%taxdescription%> Registration <%taxnumber%></th>
  </tr>
<%end tax%>

<%if taxincluded%>
  <tr>
    <th colspan=7 align=left><font size=-2>Steuern sind im Preis inbegriffen.</th>
  </tr>
<%end taxincluded%>

<!-- business number
  <tr>
    <th colspan=7 align=left><font size=-2>Business Number: <%businessnumber%></font></th>
  </tr>
-->

  <tr>
    <th colspan=7 align=left>
    <hr>
    <br>Bankverbindung
    <br>Bank
    <br>Bankleitzahl
    <br>Konto No.
    </td>
  </tr>

</table>

</td>
</tr>
</table>

</body>
</html>