<body bgcolor=ffffff>

<table width="100%">

  <?lsmb include letterhead.html ?>
  
  <tr>
    <td width=10>&nbsp;</td>

    <th colspan=3>
      <h4>I N V O I C E</h4>
    </th>
  </tr>

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

    <td>
      <table width=100% callspacing=0 cellpadding=0>
        <tr bgcolor=000000>
          <th align=left width="50%"><font color=ffffff>To</th>
          <th align=left width="50%"><font color=ffffff>Ship To</th>
        </tr>

        <tr valign=top>
          <td><?lsmb name ?>
          <br><?lsmb address1 ?>
	  <?lsmb if address2 ?>
          <br><?lsmb address2 ?>
	  <?lsmb end address2 ?>
          <br><?lsmb city ?>
	  <?lsmb if state ?>
	  , <?lsmb state ?>
	  <?lsmb end state ?>
	  <?lsmb zipcode ?>
	  <?lsmb if country ?>
	  <br><?lsmb country ?>
	  <?lsmb end country ?>
          <br>

          <?lsmb if contact ?>
          <br><?lsmb contact ?>
          <br>
          <?lsmb end contact ?>

          <?lsmb if customerphone ?>
          <br>Tel: <?lsmb customerphone ?>
          <?lsmb end customerphone ?>

          <?lsmb if customerfax ?>
          <br>Fax: <?lsmb customerfax ?>
          <?lsmb end customerfax ?>

          <?lsmb if email ?>
          <br><?lsmb email ?>
          <?lsmb end email ?>
          </td>

          <td><?lsmb shiptoname ?>
          <br><?lsmb shiptoaddress1 ?>
	  <?lsmb if shiptoaddress2 ?>
          <br><?lsmb shiptoaddress2 ?>
	  <?lsmb end shiptoaddress2 ?>
          <br><?lsmb shiptocity ?>
	  <?lsmb if shiptostate ?>
	  , <?lsmb shiptostate ?>
	  <?lsmb end shiptostate ?>
	  <?lsmb shiptozipcode ?>
	  <?lsmb if shiptocountry ?>
	  <br><?lsmb shiptocountry ?>
	  <?lsmb end shiptocountry ?>
          <br>

          <?lsmb if shiptocontact ?>
          <br><?lsmb shiptocontact ?>
          <br>
          <?lsmb end shiptocontact ?>

          <?lsmb if shiptophone ?>
          <br>Tel: <?lsmb shiptophone ?>
          <?lsmb end shiptophone ?>

          <?lsmb if shiptofax ?>
          <br>Fax: <?lsmb shiptofax ?>
          <?lsmb end shiptofax ?>

          <?lsmb if shiptoemail ?>
          <br><?lsmb shiptoemail ?>
          <?lsmb end shiptoemail ?>
          </td>
        </tr>
      </table>
    </td>
  </tr>

  <tr height=5></tr>
  
  <tr>
    <td>&nbsp;</td>
  
    <td>
      <table width=100% border=1>
        <tr>
	  <th width=14% align=left nowrap>Invoice #</th>
	  <th width=14% align=left nowrap>Date</th>
	  <th width=14% align=left nowrap>Due</th>
	  <th width=14% align=left>Order #</th>
	  <th width=14% align=left nowrap>Salesperson</th>
	  <th width=14% align=left nowrap>Shipping Point</th>
	  <th width=14% align=left nowrap>Ship via</th>
	</tr>

	<tr>
	  <td><?lsmb invnumber ?></td>
	  <td><?lsmb invdate ?></td>
	  <td><?lsmb duedate ?></td>
	  <td><?lsmb ordnumber ?>&nbsp;</td>
	  <td><?lsmb employee ?>&nbsp;</td>
	  <td><?lsmb shippingpoint ?>&nbsp;</td>
	  <td><?lsmb shipvia ?>&nbsp;</td>
	</tr>
      </table>
    </td>
  </tr>

  <tr>
    <td>&nbsp;</td>
  
    <td>
      <table width="100%">
        <tr bgcolor=000000>
          <th align=right><font color=ffffff>Item</th>
          <th align=left><font color=ffffff>Number</th>
          <th align=left><font color=ffffff>Description</th>
          <th>&nbsp;</th>
          <th align=right><font color=ffffff>Qt'y</th>
          <th>&nbsp;</th>
          <th align=right><font color=ffffff>Unit Price</th>
          <th align=right><font color=ffffff>Disc %</th>
          <th align=right><font color=ffffff>Extended</th>
        </tr>

        <?lsmb foreach number ?>
        <tr valign=top>
          <td align=right><?lsmb runningnumber ?>.</td>
          <td><?lsmb number ?></td>
          <td><?lsmb description ?></td>
          <td><?lsmb deliverydate ?></td>
          <td align=right><?lsmb qty ?></td>
          <td><?lsmb unit ?></td>
          <td align=right><?lsmb sellprice ?></td>
          <td align=right><?lsmb discountrate ?></td>
          <td align=right><?lsmb linetotal ?></td>
        </tr>
        <?lsmb end number ?>

        <tr>
          <td colspan=9><hr noshade></td>
        </tr>
    
        <tr>
          <?lsmb if taxincluded ?>
          <th colspan=7 align=right>Total</th>
          <td colspan=2 align=right><?lsmb invtotal ?></td>
          <?lsmb end taxincluded ?>

          <?lsmb if not taxincluded ?>
          <th colspan=7 align=right>Subtotal</th>
          <td colspan=2 align=right><?lsmb subtotal ?></td>
          <?lsmb end taxincluded ?>
        </tr>

        <?lsmb foreach tax ?>
        <tr>
          <th colspan=7 align=right><?lsmb taxdescription ?> on <?lsmb taxbase ?> @ <?lsmb taxrate ?> %</th>
          <td colspan=2 align=right><?lsmb tax ?></td>
        </tr>
        <?lsmb end tax ?>

        <?lsmb if paid ?>
        <tr>
          <th colspan=7 align=right>Paid</th>
          <td colspan=2 align=right>- <?lsmb paid ?></td>
        </tr>
        <?lsmb end paid ?>

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

        <?lsmb if total ?>
        <tr>
          <td colspan=5>&nbsp;</td>
          <th colspan=2 align=right nowrap>Balance Due</th>
          <th colspan=2 align=right><?lsmb total ?></th>
        </tr>
        <?lsmb end total ?>

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

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

    <td>
      <table width="100%">
        <tr valign=top>
          <?lsmb if notes ?>
          <td><?lsmb notes ?></td>
          <?lsmb end notes ?>

	  <td><?lsmb text_amount ?> ***** <?lsmb decimal ?>/100</td>
	  
          <td align=right nowrap>
          All prices in <b><?lsmb currency ?></b>
          </td>
        </tr>
      </table>
    </td>
  </tr>

  <?lsmb if paid_1 ?>
  <tr>
    <td>&nbsp;</td>

    <td colspan=9>
      <table width="60%">

        <tr>
          <th align=left>Payments</th>
        </tr>

        <tr>
          <td colspan=4>
          <hr noshade>
          </td>
        </tr>

        <tr>
          <th align=left>Date</th>
          <th align=left>Account</th>
          <th align=left>Source</th>
          <th align=left>Amount</th>
        </tr>
  <?lsmb end paid_1 ?>

        <?lsmb foreach payment ?>
        <tr>
          <td><?lsmb paymentdate ?></td>
          <td><?lsmb paymentaccount ?></td>
          <td><?lsmb paymentsource ?></td>
          <td><?lsmb payment ?></td>
        </tr>
        <?lsmb end payment ?>

  <?lsmb if paid_1 ?>
      </table>
    </td>
  </tr>
  <?lsmb end paid_1 ?>

  <tr height=10></tr>

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

    <th>
    Thank you for your valued business!
    </th>
  </tr>

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

    <td>
      <table width="100%">
        <tr valign=top>
          <td width="60%"><font size=-3>
          Payment due by <?lsmb duedate ?>.
          Items returned are subject to a 10% restocking charge. A return authorization must be obtained from <?lsmb company ?> before goods are returned. Returns must be shipped prepaid and properly insured. <?lsmb company ?> will not be responsible for damages during transit.
          </font>
          </td>

          <td width="40%">
          X <hr noshade>
          </td>
        </tr>
      </table>
    </td>
  </tr>

  <?lsmb foreach tax ?>
  <tr>
    <td>&nbsp;</td>

    <th colspan=9 align=left><font size=-2><?lsmb taxdescription ?> Registration <?lsmb taxnumber ?></th>
  </tr>
  <?lsmb end tax ?>

  <?lsmb if taxincluded ?>
  <tr>
    <td>&nbsp;</td>
  </tr>

  <tr>
    <th colspan=8 align=left><font size=-2>Taxes shown are included in price.</th>
  </tr>
  <?lsmb end taxincluded ?>

</table>

</body>
</html>