<!DOCTYPE openRPTDef>
<report>
 <title>Purchase Order</title>
 <name>PurchaseOrder</name>
 <description>Selecting an Alt Address on the PO will cause the printed PO to display that address as the Ship To on the printed document.</description>
 <parameter default="999" active="true" listtype="static" type="string" name="pohead_id">
  <description></description>
 </parameter>
 <watermark>
  <data>
   <query>Head</query>
   <column>title</column>
  </data>
  <opacity>25</opacity>
 </watermark>
 <grid>
  <snap/>
  <show/>
  <x>0.05</x>
  <y>0.05</y>
 </grid>
 <size>Letter</size>
 <portrait/>
 <topmargin>28</topmargin>
 <bottommargin>28</bottommargin>
 <rightmargin>20</rightmargin>
 <leftmargin>20</leftmargin>
 <querysource>
  <name>Head</name>
  <sql>SELECT pohead_number,
       formatDate(pohead_orderdate) AS f_orderdate,
       pohead_fob,
       pohead_shipvia,
       terms_descrip,
       vend_number,
       vend_name,
       warehous_descrip,
       pohead_agent_username,
       usr.usr_propername AS username,
       pohead_comments,
       text(&lt;? value("title") ?>) AS title
 FROM pohead
   LEFT OUTER JOIN usr ON (pohead_agent_username = usr_username)
   LEFT OUTER JOIN terms ON (pohead_terms_id = terms_id)
   LEFT OUTER JOIN vendinfo ON (pohead_vend_id = vend_id)
   LEFT OUTER JOIN whsinfo ON (pohead_warehous_id = warehous_id)
 WHERE (pohead_id=&lt;? value("pohead_id") ?>);</sql>
 </querysource>
 <querysource>
  <name>Detail</name>
  <sql>SELECT poitem_linenumber,
       poitem_comments,
       poitem_linenumber AS f_line,
       item_number,
       poitem_vend_item_number, 
       CASE WHEN (LENGTH(TRIM(BOTH '	' FROM poitem_vend_item_descrip)) &lt;= 0) THEN
          (item_descrip1 || '' || item_descrip2)
       ELSE (poitem_vend_item_descrip)
       END AS itemdescription,
       formatQty(poitem_qty_ordered) AS f_ordered,
       CASE WHEN (poitem_vend_uom LIKE '') THEN (uom_name)
            ELSE (poitem_vend_uom)
       END AS itemuom,
       formatPurchPrice(poitem_unitprice) AS f_price,
       formatExtPrice(poitem_unitprice * poitem_qty_ordered) AS f_extended,
       formatDate(poitem_duedate) AS f_duedate,
       characteristicsToString('PI', poitem_id, '=', ', ') AS poitem_characteristics
FROM poitem
	LEFT OUTER JOIN itemsite ON (poitem_itemsite_id = itemsite_id)
	LEFT OUTER JOIN (item JOIN uom ON (item_inv_uom_id=uom_id)) ON (itemsite_item_id = item_id)
WHERE 	(poitem_pohead_id=&lt;? value("pohead_id") ?>) 
ORDER BY poitem_linenumber;</sql>
 </querysource>
 <querysource>
  <name>Foot</name>
  <sql>SELECT formatExtPrice(subtotal) AS f_subtotal,
       formatExtPrice(totalfreight) AS f_totalfreight,
       formatExtPrice(tax) AS f_tax,
       formatExtPrice(subtotal + totalfreight + tax) AS f_totaldue
FROM
( SELECT COALESCE(SUM(poitem_qty_ordered * poitem_unitprice), 0) AS subtotal,
         COALESCE(SUM(poitem_freight)+pohead_freight,0) AS totalfreight,
         (SELECT COALESCE(SUM(tax), 0.0)
          FROM (SELECT ROUND(SUM(taxdetail_tax),2) AS tax
                FROM tax
                     JOIN calculateTaxDetailSummary('PO', &lt;? value("pohead_id") ?>, 'T') ON (taxdetail_tax_id=tax_id)
                GROUP BY tax_id) AS taxdata) AS tax
  FROM pohead JOIN poitem ON (poitem_pohead_id=pohead_id)
  WHERE (pohead_id=&lt;? value("pohead_id") ?>)
  GROUP BY pohead_freight ) AS data;
</sql>
 </querysource>
 <querysource>
  <name>Logo</name>
  <sql>SELECT image_data 
FROM image 
WHERE ((image_name='logo'));</sql>
 </querysource>
 <querysource>
  <name>Currency</name>
  <sql>SELECT
 curr_symbol
FROM
    pohead,
    curr_symbol
WHERE (pohead_id = &lt;? value("pohead_id") ?>) AND
      pohead_curr_id = curr_id;</sql>
 </querysource>
 <querysource>
  <name>Address</name>
  <sql>SELECT
     warehous_descrip,
     formatAddr(addr_line1, addr_line2, addr_line3, ( addr_city || '  ' || addr_state || '  ' || addr_postalcode), addr_country) AS warehouse_address
FROM
     whsinfo, 
     addr, 
     pohead
WHERE 
     addr_id = warehous_addr_id
     and pohead_warehous_id = warehous_id
     AND pohead_id=&lt;? value("pohead_id") ?> ;</sql>
 </querysource>
 <querysource>
  <name>ShipToAddress</name>
  <sql>SELECT pohead_number,
       formatDate(pohead_orderdate) AS f_orderdate,
       pohead_fob,
       pohead_shipvia,
       terms_descrip,
       vend_number,
       vend_name,
       va.addr_line1 AS vend_address1,
       va.addr_line2 AS vend_address2,
       va.addr_line3 AS vend_address3,
       (va.addr_city || '  '  || va.addr_state || '  ' || va.addr_postalcode) AS vendcitystatezip,
       formatcntctname(pohead_vend_cntct_id) AS vend_contact,
       formataddr(pohead_vendaddress1, pohead_vendaddress2, pohead_vendaddress3, (pohead_vendcity || '  '  || pohead_vendstate || '   ' || pohead_vendzipcode), pohead_vendcountry) as vend_address,
       warehous_descrip,
       wa.addr_line1 as warehous_addr1,
       wa.addr_line2 as warehous_addr2,
       wa.addr_line3 as warehous_addr3,
       wa.addr_city  as warehous_addr4,
       wa.addr_postalcode as zip,
       wa.addr_state,
       wa.addr_country,
       pohead_shiptoname AS shipto_name,
       formatcntctname(pohead_shipto_cntct_id) AS shipto_contact,
       formataddr(pohead_shiptoaddress1, pohead_shiptoaddress2, pohead_shiptoaddress3, (pohead_shiptocity || ' ' || pohead_shiptostate || ' ' || pohead_shiptozipcode), pohead_shiptocountry) as shipto_address,
       pohead_agent_username AS username,
       pohead_comments,
       text(&lt;? value("title") ?>) AS title
 FROM pohead
   LEFT OUTER JOIN terms ON (pohead_terms_id = terms_id),
   vendinfo
   LEFT OUTER JOIN addr va ON (vend_addr_id=va.addr_id),
   whsinfo
   LEFT OUTER JOIN addr wa ON (warehous_addr_id = wa.addr_id)
 WHERE ((pohead_vend_id=vend_id)
   AND (pohead_warehous_id = warehous_id)
   AND (pohead_id=&lt;? value("pohead_id") ?>) );</sql>
 </querysource>
 <pghead>
  <height>376</height>
  <image>
   <rect>
    <x>290</x>
    <y>10</y>
    <width>225</width>
    <height>75</height>
   </rect>
   <mode>stretch</mode>
   <data>
    <query>Logo</query>
    <column>image_data</column>
   </data>
  </image>
  <label>
   <rect>
    <x>550</x>
    <y>65</y>
    <width>70</width>
    <height>16</height>
   </rect>
   <font>
    <face>Arial</face>
    <size>8</size>
    <weight>normal</weight>
   </font>
   <left/>
   <vcenter/>
   <string>ORDER DATE</string>
  </label>
  <line>
   <xstart>0</xstart>
   <ystart>130</ystart>
   <xend>270</xend>
   <yend>130</yend>
   <weight>0</weight>
  </line>
  <line>
   <xstart>5</xstart>
   <ystart>315</ystart>
   <xend>805</xend>
   <yend>315</yend>
   <weight>0</weight>
  </line>
  <label>
   <rect>
    <x>550</x>
    <y>45</y>
    <width>80</width>
    <height>16</height>
   </rect>
   <font>
    <face>Arial</face>
    <size>8</size>
    <weight>normal</weight>
   </font>
   <left/>
   <vcenter/>
   <string>P/O NUMBER</string>
  </label>
  <line>
   <xstart>535</xstart>
   <ystart>130</ystart>
   <xend>810</xend>
   <yend>130</yend>
   <weight>0</weight>
  </line>
  <line>
   <xstart>535</xstart>
   <ystart>0</ystart>
   <xend>535</xend>
   <yend>130</yend>
   <weight>0</weight>
  </line>
  <label>
   <rect>
    <x>680</x>
    <y>325</y>
    <width>100</width>
    <height>16</height>
   </rect>
   <font>
    <face>Arial</face>
    <size>8</size>
    <weight>normal</weight>
   </font>
   <hcenter/>
   <vcenter/>
   <string>EXTENDED PRICE</string>
  </label>
  <label>
   <rect>
    <x>675</x>
    <y>345</y>
    <width>100</width>
    <height>16</height>
   </rect>
   <font>
    <face>Arial</face>
    <size>8</size>
    <weight>normal</weight>
   </font>
   <hcenter/>
   <vcenter/>
   <string>REQ. DATE</string>
  </label>
  <label>
   <rect>
    <x>232</x>
    <y>325</y>
    <width>135</width>
    <height>16</height>
   </rect>
   <font>
    <face>Arial</face>
    <size>8</size>
    <weight>normal</weight>
   </font>
   <left/>
   <vcenter/>
   <string>ITEM DESCRIPTION</string>
  </label>
  <field>
   <rect>
    <x>645</x>
    <y>60</y>
    <width>140</width>
    <height>17</height>
   </rect>
   <font>
    <face>Arial</face>
    <size>12</size>
    <weight>normal</weight>
   </font>
   <left/>
   <vcenter/>
   <data>
    <query>Head</query>
    <column>f_orderdate</column>
   </data>
  </field>
  <text>
   <rect>
    <x>500</x>
    <y>142</y>
    <width>300</width>
    <height>17</height>
   </rect>
   <bottompad>10</bottompad>
   <font>
    <face>Arial</face>
    <size>10</size>
    <weight>normal</weight>
   </font>
   <left/>
   <vcenter/>
   <data>
    <query>ShipToAddress</query>
    <column>shipto_contact</column>
   </data>
  </text>
  <label>
   <rect>
    <x>530</x>
    <y>325</y>
    <width>85</width>
    <height>16</height>
   </rect>
   <font>
    <face>Arial</face>
    <size>8</size>
    <weight>normal</weight>
   </font>
   <hcenter/>
   <vcenter/>
   <string>UNIT PRICE</string>
  </label>
  <text>
   <rect>
    <x>5</x>
    <y>25</y>
    <width>265</width>
    <height>17</height>
   </rect>
   <bottompad>10</bottompad>
   <font>
    <face>Arial</face>
    <size>10</size>
    <weight>normal</weight>
   </font>
   <left/>
   <top/>
   <data>
    <query>Address</query>
    <column>warehouse_address</column>
   </data>
  </text>
  <field>
   <rect>
    <x>5</x>
    <y>5</y>
    <width>267</width>
    <height>17</height>
   </rect>
   <font>
    <face>Arial</face>
    <size>12</size>
    <weight>normal</weight>
   </font>
   <left/>
   <vcenter/>
   <data>
    <query>Address</query>
    <column>warehous_descrip</column>
   </data>
  </field>
  <field>
   <rect>
    <x>645</x>
    <y>40</y>
    <width>126</width>
    <height>17</height>
   </rect>
   <font>
    <face>Arial</face>
    <size>12</size>
    <weight>normal</weight>
   </font>
   <left/>
   <vcenter/>
   <data>
    <query>Head</query>
    <column>pohead_number</column>
   </data>
  </field>
  <line>
   <xstart>5</xstart>
   <ystart>360</ystart>
   <xend>805</xend>
   <yend>360</yend>
   <weight>0</weight>
  </line>
  <label>
   <rect>
    <x>50</x>
    <y>335</y>
    <width>80</width>
    <height>16</height>
   </rect>
   <font>
    <face>Arial</face>
    <size>8</size>
    <weight>normal</weight>
   </font>
   <left/>
   <vcenter/>
   <string>YOUR ITEM #</string>
  </label>
  <text>
   <rect>
    <x>75</x>
    <y>155</y>
    <width>300</width>
    <height>17</height>
   </rect>
   <bottompad>10</bottompad>
   <font>
    <face>Arial</face>
    <size>10</size>
    <weight>normal</weight>
   </font>
   <left/>
   <vcenter/>
   <data>
    <query>ShipToAddress</query>
    <column>vend_contact</column>
   </data>
  </text>
  <line>
   <xstart>270</xstart>
   <ystart>0</ystart>
   <xend>270</xend>
   <yend>130</yend>
   <weight>0</weight>
  </line>
  <label>
   <rect>
    <x>455</x>
    <y>325</y>
    <width>85</width>
    <height>16</height>
   </rect>
   <font>
    <face>Arial</face>
    <size>8</size>
    <weight>normal</weight>
   </font>
   <right/>
   <vcenter/>
   <string>CURRENCY</string>
  </label>
  <label>
   <rect>
    <x>610</x>
    <y>345</y>
    <width>80</width>
    <height>16</height>
   </rect>
   <font>
    <face>Arial</face>
    <size>8</size>
    <weight>normal</weight>
   </font>
   <hcenter/>
   <vcenter/>
   <string>UOM</string>
  </label>
  <field>
   <rect>
    <x>5</x>
    <y>290</y>
    <width>187</width>
    <height>17</height>
   </rect>
   <font>
    <face>Arial</face>
    <size>11</size>
    <weight>normal</weight>
   </font>
   <hcenter/>
   <vcenter/>
   <data>
    <query>Head</query>
    <column>pohead_fob</column>
   </data>
  </field>
  <field>
   <rect>
    <x>202</x>
    <y>290</y>
    <width>252</width>
    <height>17</height>
   </rect>
   <font>
    <face>Arial</face>
    <size>11</size>
    <weight>normal</weight>
   </font>
   <hcenter/>
   <vcenter/>
   <data>
    <query>Head</query>
    <column>pohead_shipvia</column>
   </data>
  </field>
  <label>
   <rect>
    <x>290</x>
    <y>265</y>
    <width>75</width>
    <height>16</height>
   </rect>
   <font>
    <face>Arial</face>
    <size>8</size>
    <weight>normal</weight>
   </font>
   <hcenter/>
   <vcenter/>
   <string>SHIP VIA:</string>
  </label>
  <label>
   <rect>
    <x>520</x>
    <y>345</y>
    <width>85</width>
    <height>16</height>
   </rect>
   <font>
    <face>Arial</face>
    <size>8</size>
    <weight>normal</weight>
   </font>
   <hcenter/>
   <vcenter/>
   <string>QTY. ORDERED</string>
  </label>
  <label>
   <rect>
    <x>580</x>
    <y>0</y>
    <width>252</width>
    <height>32</height>
   </rect>
   <font>
    <face>Arial</face>
    <size>14</size>
    <weight>bold</weight>
   </font>
   <left/>
   <vcenter/>
   <string>Purchase Order</string>
  </label>
  <label>
   <rect>
    <x>455</x>
    <y>155</y>
    <width>17</width>
    <height>16</height>
   </rect>
   <font>
    <face>Arial</face>
    <size>8</size>
    <weight>bold</weight>
   </font>
   <left/>
   <bottom/>
   <string>TO:</string>
  </label>
  <label>
   <rect>
    <x>540</x>
    <y>265</y>
    <width>37</width>
    <height>16</height>
   </rect>
   <font>
    <face>Arial</face>
    <size>8</size>
    <weight>normal</weight>
   </font>
   <hcenter/>
   <vcenter/>
   <string>TERMS</string>
  </label>
  <label>
   <rect>
    <x>5</x>
    <y>320</y>
    <width>37</width>
    <height>16</height>
   </rect>
   <font>
    <face>Arial</face>
    <size>8</size>
    <weight>normal</weight>
   </font>
   <hcenter/>
   <vcenter/>
   <string>LINE</string>
  </label>
  <label>
   <rect>
    <x>65</x>
    <y>265</y>
    <width>60</width>
    <height>16</height>
   </rect>
   <font>
    <face>Arial</face>
    <size>8</size>
    <weight>normal</weight>
   </font>
   <hcenter/>
   <vcenter/>
   <string>F.O.B.</string>
  </label>
  <field>
   <rect>
    <x>655</x>
    <y>290</y>
    <width>117</width>
    <height>17</height>
   </rect>
   <font>
    <face>Arial</face>
    <size>11</size>
    <weight>normal</weight>
   </font>
   <hcenter/>
   <vcenter/>
   <data>
    <query>Head</query>
    <column>username</column>
   </data>
  </field>
  <field>
   <rect>
    <x>442</x>
    <y>290</y>
    <width>202</width>
    <height>17</height>
   </rect>
   <font>
    <face>Arial</face>
    <size>11</size>
    <weight>normal</weight>
   </font>
   <hcenter/>
   <vcenter/>
   <data>
    <query>Head</query>
    <column>terms_descrip</column>
   </data>
  </field>
  <label>
   <rect>
    <x>45</x>
    <y>142</y>
    <width>17</width>
    <height>20</height>
   </rect>
   <font>
    <face>Arial</face>
    <size>8</size>
    <weight>bold</weight>
   </font>
   <left/>
   <top/>
   <string>TO:</string>
  </label>
  <field>
   <rect>
    <x>645</x>
    <y>85</y>
    <width>35</width>
    <height>16</height>
   </rect>
   <font>
    <face>Arial</face>
    <size>12</size>
    <weight>normal</weight>
   </font>
   <left/>
   <top/>
   <data>
    <query>Context Query</query>
    <column>page_number</column>
   </data>
  </field>
  <line>
   <xstart>5</xstart>
   <ystart>285</ystart>
   <xend>805</xend>
   <yend>285</yend>
   <weight>0</weight>
  </line>
  <label>
   <rect>
    <x>50</x>
    <y>320</y>
    <width>80</width>
    <height>16</height>
   </rect>
   <font>
    <face>Arial</face>
    <size>8</size>
    <weight>normal</weight>
   </font>
   <left/>
   <vcenter/>
   <string>OUR ITEM #</string>
  </label>
  <label>
   <rect>
    <x>550</x>
    <y>85</y>
    <width>35</width>
    <height>16</height>
   </rect>
   <font>
    <face>Arial</face>
    <size>8</size>
    <weight>normal</weight>
   </font>
   <left/>
   <vcenter/>
   <string>PAGE</string>
  </label>
  <label>
   <rect>
    <x>665</x>
    <y>265</y>
    <width>95</width>
    <height>16</height>
   </rect>
   <font>
    <face>Arial</face>
    <size>8</size>
    <weight>normal</weight>
   </font>
   <hcenter/>
   <vcenter/>
   <string>ORDERED BY</string>
  </label>
  <label>
   <rect>
    <x>455</x>
    <y>142</y>
    <width>37</width>
    <height>16</height>
   </rect>
   <font>
    <face>Arial</face>
    <size>8</size>
    <weight>bold</weight>
   </font>
   <left/>
   <vcenter/>
   <string>SHIP</string>
  </label>
  <field>
   <rect>
    <x>75</x>
    <y>137</y>
    <width>300</width>
    <height>20</height>
   </rect>
   <font>
    <face>Arial</face>
    <size>12</size>
    <weight>normal</weight>
   </font>
   <left/>
   <top/>
   <data>
    <query>Head</query>
    <column>vend_name</column>
   </data>
  </field>
  <field>
   <rect>
    <x>645</x>
    <y>107</y>
    <width>140</width>
    <height>17</height>
   </rect>
   <font>
    <face>Arial</face>
    <size>12</size>
    <weight>normal</weight>
   </font>
   <left/>
   <vcenter/>
   <data>
    <query>Context Query</query>
    <column>report_date</column>
   </data>
  </field>
  <label>
   <rect>
    <x>550</x>
    <y>107</y>
    <width>75</width>
    <height>16</height>
   </rect>
   <font>
    <face>Arial</face>
    <size>8</size>
    <weight>normal</weight>
   </font>
   <left/>
   <vcenter/>
   <string>PRINT DATE</string>
  </label>
  <text>
   <rect>
    <x>500</x>
    <y>172</y>
    <width>300</width>
    <height>17</height>
   </rect>
   <bottompad>10</bottompad>
   <font>
    <face>Arial</face>
    <size>10</size>
    <weight>normal</weight>
   </font>
   <left/>
   <vcenter/>
   <data>
    <query>ShipToAddress</query>
    <column>shipto_address</column>
   </data>
  </text>
  <text>
   <rect>
    <x>75</x>
    <y>172</y>
    <width>300</width>
    <height>17</height>
   </rect>
   <bottompad>10</bottompad>
   <font>
    <face>Arial</face>
    <size>10</size>
    <weight>normal</weight>
   </font>
   <left/>
   <vcenter/>
   <data>
    <query>ShipToAddress</query>
    <column>vend_address</column>
   </data>
  </text>
  <text>
   <rect>
    <x>500</x>
    <y>157</y>
    <width>300</width>
    <height>17</height>
   </rect>
   <bottompad>10</bottompad>
   <font>
    <face>Arial</face>
    <size>10</size>
    <weight>normal</weight>
   </font>
   <left/>
   <vcenter/>
   <data>
    <query>ShipToAddress</query>
    <column>shipto_name</column>
   </data>
  </text>
 </pghead>
 <section>
  <name>detail</name>
  <detail>
   <key>
    <query>Detail</query>
   </key>
   <height>107</height>
   <field>
    <rect>
     <x>625</x>
     <y>25</y>
     <width>55</width>
     <height>16</height>
    </rect>
    <font>
     <face>Arial</face>
     <size>10</size>
     <weight>normal</weight>
    </font>
    <left/>
    <vcenter/>
    <data>
     <query>Detail</query>
     <column>itemuom</column>
    </data>
   </field>
   <text>
    <rect>
     <x>50</x>
     <y>65</y>
     <width>605</width>
     <height>17</height>
    </rect>
    <bottompad>0</bottompad>
    <font>
     <face>Arial</face>
     <size>10</size>
     <weight>normal</weight>
    </font>
    <left/>
    <vcenter/>
    <data>
     <query>Detail</query>
     <column>poitem_comments</column>
    </data>
   </text>
   <field>
    <rect>
     <x>700</x>
     <y>25</y>
     <width>100</width>
     <height>17</height>
    </rect>
    <font>
     <face>Arial</face>
     <size>10</size>
     <weight>normal</weight>
    </font>
    <right/>
    <vcenter/>
    <data>
     <query>Detail</query>
     <column>f_duedate</column>
    </data>
   </field>
   <field>
    <rect>
     <x>700</x>
     <y>5</y>
     <width>92</width>
     <height>16</height>
    </rect>
    <font>
     <face>Arial</face>
     <size>10</size>
     <weight>normal</weight>
    </font>
    <right/>
    <vcenter/>
    <data>
     <query>Detail</query>
     <column>f_extended</column>
    </data>
   </field>
   <field>
    <rect>
     <x>50</x>
     <y>45</y>
     <width>750</width>
     <height>17</height>
    </rect>
    <font>
     <face>Arial</face>
     <size>9</size>
     <weight>normal</weight>
    </font>
    <left/>
    <vcenter/>
    <data>
     <query>Detail</query>
     <column>poitem_characteristics</column>
    </data>
   </field>
   <field>
    <rect>
     <x>545</x>
     <y>25</y>
     <width>75</width>
     <height>16</height>
    </rect>
    <font>
     <face>Arial</face>
     <size>10</size>
     <weight>normal</weight>
    </font>
    <right/>
    <vcenter/>
    <data>
     <query>Detail</query>
     <column>f_ordered</column>
    </data>
   </field>
   <field>
    <rect>
     <x>555</x>
     <y>5</y>
     <width>75</width>
     <height>16</height>
    </rect>
    <font>
     <face>Arial</face>
     <size>10</size>
     <weight>normal</weight>
    </font>
    <right/>
    <vcenter/>
    <data>
     <query>Detail</query>
     <column>f_price</column>
    </data>
   </field>
   <field>
    <rect>
     <x>505</x>
     <y>5</y>
     <width>25</width>
     <height>16</height>
    </rect>
    <font>
     <face>Arial</face>
     <size>10</size>
     <weight>normal</weight>
    </font>
    <right/>
    <bottom/>
    <data>
     <query>Currency</query>
     <column>curr_symbol</column>
    </data>
   </field>
   <text>
    <rect>
     <x>150</x>
     <y>5</y>
     <width>350</width>
     <height>17</height>
    </rect>
    <bottompad>0</bottompad>
    <font>
     <face>Arial</face>
     <size>10</size>
     <weight>normal</weight>
    </font>
    <left/>
    <vcenter/>
    <data>
     <query>Detail</query>
     <column>itemdescription</column>
    </data>
   </text>
   <field>
    <rect>
     <x>50</x>
     <y>25</y>
     <width>225</width>
     <height>17</height>
    </rect>
    <font>
     <face>Arial</face>
     <size>9</size>
     <weight>normal</weight>
    </font>
    <left/>
    <vcenter/>
    <data>
     <query>Detail</query>
     <column>poitem_vend_item_number</column>
    </data>
   </field>
   <field>
    <rect>
     <x>50</x>
     <y>5</y>
     <width>92</width>
     <height>17</height>
    </rect>
    <font>
     <face>Arial</face>
     <size>10</size>
     <weight>normal</weight>
    </font>
    <left/>
    <vcenter/>
    <data>
     <query>Detail</query>
     <column>item_number</column>
    </data>
   </field>
   <field>
    <rect>
     <x>10</x>
     <y>5</y>
     <width>36</width>
     <height>17</height>
    </rect>
    <font>
     <face>Arial</face>
     <size>10</size>
     <weight>normal</weight>
    </font>
    <left/>
    <vcenter/>
    <data>
     <query>Detail</query>
     <column>f_line</column>
    </data>
   </field>
  </detail>
 </section>
 <pgfoot>
  <lastpage/>
  <height>113</height>
  <field>
   <rect>
    <x>670</x>
    <y>85</y>
    <width>25</width>
    <height>16</height>
   </rect>
   <font>
    <face>Arial</face>
    <size>10</size>
    <weight>normal</weight>
   </font>
   <right/>
   <bottom/>
   <data>
    <query>Currency</query>
    <column>curr_symbol</column>
   </data>
  </field>
  <text>
   <rect>
    <x>35</x>
    <y>10</y>
    <width>530</width>
    <height>17</height>
   </rect>
   <bottompad>14</bottompad>
   <font>
    <face>Arial</face>
    <size>10</size>
    <weight>normal</weight>
   </font>
   <left/>
   <vcenter/>
   <data>
    <query>Head</query>
    <column>pohead_comments</column>
   </data>
  </text>
  <label>
   <rect>
    <x>580</x>
    <y>12</y>
    <width>60</width>
    <height>16</height>
   </rect>
   <font>
    <face>Arial</face>
    <size>8</size>
    <weight>normal</weight>
   </font>
   <right/>
   <bottom/>
   <string>SUB TOTAL</string>
  </label>
  <field>
   <rect>
    <x>705</x>
    <y>55</y>
    <width>100</width>
    <height>16</height>
   </rect>
   <font>
    <face>Arial</face>
    <size>10</size>
    <weight>normal</weight>
   </font>
   <right/>
   <bottom/>
   <data>
    <query>Foot</query>
    <column>f_tax</column>
   </data>
  </field>
  <field>
   <rect>
    <x>705</x>
    <y>85</y>
    <width>100</width>
    <height>16</height>
   </rect>
   <font>
    <face>Arial</face>
    <size>10</size>
    <weight>normal</weight>
   </font>
   <right/>
   <bottom/>
   <data>
    <query>Foot</query>
    <column>f_totaldue</column>
   </data>
  </field>
  <field>
   <rect>
    <x>670</x>
    <y>12</y>
    <width>25</width>
    <height>16</height>
   </rect>
   <font>
    <face>Arial</face>
    <size>10</size>
    <weight>normal</weight>
   </font>
   <right/>
   <bottom/>
   <data>
    <query>Currency</query>
    <column>curr_symbol</column>
   </data>
  </field>
  <field>
   <rect>
    <x>670</x>
    <y>55</y>
    <width>25</width>
    <height>16</height>
   </rect>
   <font>
    <face>Arial</face>
    <size>10</size>
    <weight>normal</weight>
   </font>
   <right/>
   <bottom/>
   <data>
    <query>Currency</query>
    <column>curr_symbol</column>
   </data>
  </field>
  <line>
   <xstart>585</xstart>
   <ystart>75</ystart>
   <xend>806</xend>
   <yend>75</yend>
   <weight>0</weight>
  </line>
  <label>
   <rect>
    <x>580</x>
    <y>35</y>
    <width>60</width>
    <height>16</height>
   </rect>
   <font>
    <face>Arial</face>
    <size>8</size>
    <weight>normal</weight>
   </font>
   <right/>
   <bottom/>
   <string>FREIGHT</string>
  </label>
  <label>
   <rect>
    <x>580</x>
    <y>55</y>
    <width>60</width>
    <height>16</height>
   </rect>
   <font>
    <face>Arial</face>
    <size>8</size>
    <weight>normal</weight>
   </font>
   <right/>
   <bottom/>
   <string>TAX</string>
  </label>
  <field>
   <rect>
    <x>705</x>
    <y>35</y>
    <width>100</width>
    <height>16</height>
   </rect>
   <font>
    <face>Arial</face>
    <size>10</size>
    <weight>normal</weight>
   </font>
   <right/>
   <bottom/>
   <data>
    <query>Foot</query>
    <column>f_totalfreight</column>
   </data>
  </field>
  <line>
   <xstart>10</xstart>
   <ystart>5</ystart>
   <xend>805</xend>
   <yend>5</yend>
   <weight>0</weight>
  </line>
  <field>
   <rect>
    <x>705</x>
    <y>12</y>
    <width>100</width>
    <height>16</height>
   </rect>
   <font>
    <face>Arial</face>
    <size>10</size>
    <weight>normal</weight>
   </font>
   <right/>
   <bottom/>
   <data>
    <query>Foot</query>
    <column>f_subtotal</column>
   </data>
  </field>
  <label>
   <rect>
    <x>580</x>
    <y>85</y>
    <width>60</width>
    <height>16</height>
   </rect>
   <font>
    <face>Arial</face>
    <size>8</size>
    <weight>normal</weight>
   </font>
   <right/>
   <bottom/>
   <string>TOTAL</string>
  </label>
  <field>
   <rect>
    <x>670</x>
    <y>35</y>
    <width>25</width>
    <height>16</height>
   </rect>
   <font>
    <face>Arial</face>
    <size>10</size>
    <weight>normal</weight>
   </font>
   <right/>
   <bottom/>
   <data>
    <query>Currency</query>
    <column>curr_symbol</column>
   </data>
  </field>
 </pgfoot>
 <pgfoot>
  <height>57</height>
  <label>
   <rect>
    <x>32</x>
    <y>37</y>
    <width>37</width>
    <height>16</height>
   </rect>
   <font>
    <face>Arial</face>
    <size>12</size>
    <weight>normal</weight>
   </font>
   <left/>
   <top/>
   <string></string>
  </label>
 </pgfoot>
</report>
