<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html>
<head>
  <title><?lsmb text('Product Receipt') ?></title>
  <meta http-equiv="Content-Type" content="text/html; charset=UTF-8" />
</head>
<body bgcolor=ffffff>

<table width="100%">

  <?lsmb INCLUDE letterhead ?>

  <tr>
    <td width=10>&nbsp;</td>

    <th colspan=3>
      <h4 style="text-transform:uppercase">
             <?lsmb text('Purchase Order') ?>
      </h4>
    </th>
  </tr>

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

    <td>
      <table width=100% cellspacing=0 cellpadding=0>
        <tr bgcolor=000000>
          <th align=left width="50%"><font color=ffffff><?lsmb text('To:') ?></th>
          <th align=left width="50%"><font color=ffffff><?lsmb text('Ship To:') ?></th>
        </tr>

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

          <?lsmb IF contact ?>
          <br><?lsmb text('Attn: [_1]', contact) ?>
          <?lsmb END ?>

          <?lsmb IF vendorphone ?>
          <br><?lsmb text('Tel: [_1]', vendorphone) ?>
          <?lsmb END ?>

          <?lsmb IF vendorfax ?>
          <br><?lsmb text('Fax: [_1]', vendorfax) ?>
          <?lsmb END ?>
          </td>

          <td><?lsmb shiptoname ?>
          <br><?lsmb shiptoaddress1 ?>
          <?lsmb IF shiptoaddress2 ?>
          <br><?lsmb shiptoaddress2 ?>
          <?lsmb END ?>
          <br><?lsmb shiptocity ?>
          <?lsmb IF shiptostate ?>
          , <?lsmb shiptostate ?>
          <?lsmb END ?>
          <?lsmb shiptozipcode ?>
          <?lsmb IF shiptocountry ?>
          <br><?lsmb shiptocountry ?>
          <?lsmb END ?>
          <br>

          <?lsmb IF shiptocontact ?>
          <br><?lsmb text('Attn: [_1]', shiptocontact) ?>
          <?lsmb END ?>

          <?lsmb IF shiptophone ?>
          <br><?lsmb text('Tel: [_1]', shiptophone) ?>
          <?lsmb END ?>

          <?lsmb IF shiptofax ?>
          <br><?lsmb text('Fax: [_1]', shiptofax) ?>
          <?lsmb END ?>
          </td>
        </tr>
      </table>
    </td>
  </tr>

  <tr height=5></tr>

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

    <td>
      <table width=100% border=1>
        <tr>
          <th width=17% align=left><?lsmb text('Invoice #') ?></th>
          <th width=17% align=left><?lsmb text('Date') ?></th>
          <th width=17% align=left><?lsmb text('Required by') ?></th>
          <th width=17% align=left><?lsmb text('Contact') ?></th>
          <th width=17% align=left><?lsmb text('Shipping Point') ?></th>
          <th width=15% align=left><?lsmb text('Ship Via') ?></th>
        </tr>

        <tr>
          <td><?lsmb invnumber ?></td>
          <td><?lsmb transdate ?></td>
          <td><?lsmb reqdate ?></td>
          <td><?lsmb employee ?></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><?lsmb text('Item') ?></th>
          <th align=left><font color=ffffff><?lsmb text('Number') ?></th>
          <th align=left><font color=ffffff><?lsmb text('Description') ?></th>
          <th><font color=ffffff><?lsmb text('Qty') ?></th>
          <th>&nbsp;</th>
          <th><font color=ffffff><?lsmb text('Price') ?></th>
          <th><font color=ffffff>%</th>
          <th><font color=ffffff><?lsmb text('Amount') ?></th>
        </tr>

        <?lsmb FOREACH number ?>
        <?lsmb loop_count = loop.count - 1 ?>
        <tr valign=top>
          <td align=right><?lsmb runningnumber.${loop_count} ?>.</td>
          <td><?lsmb number.${loop_count} ?></td>
          <td><?lsmb item_description.${loop_count}.replace("\n","<br />") ?></td>
          <td align=right><?lsmb qty.${loop_count} ?></td>
          <td><?lsmb unit.${loop_count} ?></td>
          <td align=right><?lsmb sellprice.${loop_count} ?></td>
          <td align=right><?lsmb discountrate.${loop_count} ?></th>
          <td align=right><?lsmb linetotal.${loop_count} ?></td>
        </tr>
        <?lsmb END ?>

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

        <tr>
          <?lsmb IF taxincluded ?>
          <th colspan=7 align=right><?lsmb text('Total') ?></th>
          <th colspan=1 align=right><?lsmb ordtotal ?></th>
          <?lsmb ELSE ?>
          <th colspan=7 align=right><?lsmb text('Subtotal') ?></th>
          <td colspan=1 align=right><?lsmb subtotal ?></td>
          <?lsmb END ?>
        </tr>

        <?lsmb FOREACH tax ?>
        <?lsmb loop_count = loop.count - 1 ?>
        <tr>
          <th colspan=7 align=right><?lsmb taxdescription.${loop_count}.replace("\n","<br />") ?> on <?lsmb taxbase.${loop_count} ?> @ <?lsmb taxrate.${loop_count} ?> %</th>
          <td colspan=1 align=right><?lsmb tax.${loop_count} ?></td>
        </tr>
        <?lsmb END ?>

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

        <?lsmb IF NOT taxincluded ?>
          <th colspan=7 align=right><?lsmb text('Total') ?></th>
          <td colspan=1 align=right><?lsmb ordtotal ?></td>
        <?lsmb END ?>

        <?lsmb IF terms ?>
        <tr>
          <td colspan=4><?lsmb text('Terms Net [_1] days', terms) ?></td>
          <th colspan=3 align=right><?lsmb text('Total') ?></th>
          <th colspan=1 align=right><?lsmb ordtotal ?></th>
        </tr>
        <?lsmb END ?>

        <?lsmb IF taxincluded ?>
        <tr>
          <td colspan=2><?lsmb text('Tax included') ?></td>
        </tr>
        <?lsmb END ?>

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

        <?lsmb IF ordtotal ?>
        <tr>
          <td colspan=8 align=right>
          <?lsmb text('All prices in [_1] funds', currency) ?>
          </td>
        </tr>
        <?lsmb END ?>

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

  <?lsmb IF notes ?>
  <tr>
    <td>&nbsp;</td>

    <td>
    <table width="100%">
      <tr valign=top>
        <td><?lsmb text('Notes') ?></td>
          <td><?lsmb  FOREACH P IN notes.split('\n\n') ?>
                    <p><?lsmb P ?></p>
               <?lsmb END ?></td>
      </tr>

    </table>
    </td>
  </tr>
  <?lsmb END ?>

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

    <td>
      <table width="100%">
        <tr valign=top>
          <td width="70%">&nbsp;</td>

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

</table>

</body>
</html>

