<!DOCTYPE openRPTDef>
<report>
 <title>Return</title>
 <name>CreditMemo</name>
 <description>Sales Module Return with Logo and CM Currency</description>
 <parameter default="" active="true" listtype="dynamic" type="string" name="cmhead_id" >
  <description></description>
  <query>select cmhead_id, cmhead_number from cmhead;</query>
 </parameter>
 <size>Letter</size>
 <portrait/>
 <topmargin>28</topmargin>
 <bottommargin>28</bottommargin>
 <rightmargin>0</rightmargin>
 <leftmargin>0</leftmargin>
 <querysource>
  <name>GroupHead</name>
  <sql>SELECT remitto.*,
       cmhead_number,
       formatDate(cmhead_docdate) AS docdate,
       cust_number,
       cust_name,
       formatAddr(cmhead_billtoaddress1, cmhead_billtoaddress2, cmhead_billtoaddress3,
                  COALESCE(cmhead_billtocity,'') || '  ' || COALESCE(cmhead_billtostate,'') || '  ' || COALESCE(cmhead_billtozip,''),
                   cmhead_billtocountry)
       AS f_custaddr,
       cntct_phone AS cust_phone,
       cmhead_shipto_name,
       formatAddr(cmhead_shipto_address1, cmhead_shipto_address2, cmhead_shipto_address3,
                  COALESCE(cmhead_shipto_city,'') ||'  '|| COALESCE(cmhead_shipto_state,'') || '  '|| COALESCE(cmhead_shipto_zipcode,''),
                  cmhead_shipto_country)
                  AS f_shiptoaddr,
       CASE 
         WHEN (cmhead_invcnumber='-1') THEN ''
         --note: must now set explicit type for Postgres 8.3+
         --add ' '
         ELSE text(cmhead_invcnumber)
       END AS invcnumber,
       cmhead_custponumber,
       cmhead_comments,
       cmhead_misc_descrip,
       curr_symbol,
       curr_name
  FROM remitto, cmhead, curr_symbol, custinfo
  LEFT OUTER JOIN cntct ON (cust_cntct_id=cntct_id)
 WHERE ((cmhead_cust_id=cust_id)
       AND (cmhead_curr_id = curr_id)
       AND (cmhead_id=&lt;? value("cmhead_id") ?>))
ORDER BY cmhead_number;</sql>
 </querysource>
 <querysource>
  <name>Detail</name>
  <sql>SELECT cmitem_linenumber,
       formatQty(cmitem_qtycredit) AS qtycredit,
       formatQty(cmitem_qtyreturned) AS qtyreturned,
       uom_name,
       item_number,
       item_descrip1,
       item_descrip2,
       formatSalesPrice(cmitem_unitprice) AS unitprice,
       formatMoney((cmitem_qtycredit * cmitem_qty_invuomratio) * (cmitem_unitprice / cmitem_price_invuomratio)) AS extprice,
       cmitem_comments
  FROM cmitem, itemsite, item, uom
 WHERE ((cmitem_itemsite_id=itemsite_id)
   AND (itemsite_item_id=item_id)
   AND (item_inv_uom_id=uom_id)
   AND (cmitem_cmhead_id=&lt;? value("cmhead_id") ?>))
ORDER BY cmitem_linenumber;</sql>
 </querysource>
 <querysource>
  <name>GroupFoot</name>
  <sql>SELECT formatExtPrice(SUM((cmitem_qtycredit * cmitem_qty_invuomratio) * cmitem_unitprice / cmitem_price_invuomratio)) AS extprice
  FROM cmhead, cmitem, itemsite, item
 WHERE ((cmitem_cmhead_id=cmhead_id)
   AND (cmitem_itemsite_id=itemsite_id)
   AND (itemsite_item_id=item_id)
   AND (cmhead_id=&lt;? value("cmhead_id") ?>));</sql>
 </querysource>
 <querysource>
  <name>GroupExtended</name>
  <sql>SELECT formatExtPrice( COALESCE(cmhead_freight,0.0) +
                       ( SELECT COALESCE(SUM(tax * -1.0), 0)
                         FROM ( SELECT ROUND(SUM(taxdetail_tax), 2) AS tax
                                FROM tax JOIN calculateTaxDetailSummary('CM', cmhead_id, 'T')
                                           ON (taxdetail_tax_id=tax_id)
                                GROUP BY tax_id ) AS data ) +
                       COALESCE(cmhead_misc,0.0) +
                       ( SELECT COALESCE(SUM((cmitem_qtycredit * cmitem_qty_invuomratio) *
                                              cmitem_unitprice / cmitem_price_invuomratio), 0.0)
                         FROM cmitem
                         WHERE (cmitem_cmhead_id=&lt;? value("cmhead_id") ?>) ) 
                     ) AS totaldue,
       formatExtPrice(COALESCE(cmhead_freight,0.0)) AS freight,
       ( SELECT formatExtPrice(COALESCE(SUM(tax * -1.0), 0))
         FROM ( SELECT ROUND(SUM(taxdetail_tax), 2) AS tax
                FROM tax JOIN calculateTaxDetailSummary('CM', cmhead_id, 'T')
                           ON (taxdetail_tax_id=tax_id)
                GROUP BY tax_id ) AS data ) AS tax,
       formatExtPrice(COALESCE(cmhead_misc,0.0)) AS misc
  FROM cmhead
 WHERE (cmhead_id=&lt;? value("cmhead_id") ?>);
</sql>
 </querysource>
 <querysource>
  <name>logo</name>
  <sql>SELECT image_data 
FROM image 
WHERE ((image_name='logo'));</sql>
 </querysource>
 <pghead>
  <firstpage/>
  <height>451</height>
  <field>
   <rect>
    <x>50</x>
    <y>370</y>
    <width>120</width>
    <height>20</height>
   </rect>
   <font>
    <face>helvetica</face>
    <size>12</size>
    <weight>normal</weight>
   </font>
   <left/>
   <vcenter/>
   <data>
    <query>GroupHead</query>
    <column>cmhead_custponumber</column>
   </data>
  </field>
  <label>
   <rect>
    <x>50</x>
    <y>350</y>
    <width>120</width>
    <height>20</height>
   </rect>
   <font>
    <face>helvetica</face>
    <size>10</size>
    <weight>normal</weight>
   </font>
   <left/>
   <vcenter/>
   <string>P.O. Number</string>
  </label>
  <label>
   <rect>
    <x>540</x>
    <y>130</y>
    <width>100</width>
    <height>20</height>
   </rect>
   <font>
    <face>Helvetica</face>
    <size>10</size>
    <weight>normal</weight>
   </font>
   <right/>
   <vcenter/>
   <string>Date:</string>
  </label>
  <field>
   <rect>
    <x>660</x>
    <y>130</y>
    <width>135</width>
    <height>20</height>
   </rect>
   <font>
    <face>Helvetica</face>
    <size>10</size>
    <weight>normal</weight>
   </font>
   <left/>
   <vcenter/>
   <data>
    <query>GroupHead</query>
    <column>docdate</column>
   </data>
  </field>
  <line>
   <xstart>50</xstart>
   <ystart>340</ystart>
   <xend>800</xend>
   <yend>340</yend>
   <weight>2</weight>
  </line>
  <label>
   <rect>
    <x>670</x>
    <y>419</y>
    <width>100</width>
    <height>20</height>
   </rect>
   <font>
    <face>helvetica</face>
    <size>10</size>
    <weight>normal</weight>
   </font>
   <hcenter/>
   <vcenter/>
   <string>Ext. Price</string>
  </label>
  <label>
   <rect>
    <x>175</x>
    <y>419</y>
    <width>80</width>
    <height>20</height>
   </rect>
   <font>
    <face>helvetica</face>
    <size>10</size>
    <weight>normal</weight>
   </font>
   <hcenter/>
   <vcenter/>
   <string>UOM</string>
  </label>
  <field>
   <rect>
    <x>660</x>
    <y>110</y>
    <width>145</width>
    <height>20</height>
   </rect>
   <font>
    <face>Helvetica</face>
    <size>10</size>
    <weight>normal</weight>
   </font>
   <left/>
   <vcenter/>
   <data>
    <query>GroupHead</query>
    <column>cmhead_number</column>
   </data>
  </field>
  <field>
   <rect>
    <x>100</x>
    <y>205</y>
    <width>290</width>
    <height>20</height>
   </rect>
   <font>
    <face>Helvetica</face>
    <size>12</size>
    <weight>normal</weight>
   </font>
   <left/>
   <vcenter/>
   <data>
    <query>GroupHead</query>
    <column>cust_name</column>
   </data>
  </field>
  <line>
   <xstart>50</xstart>
   <ystart>445</ystart>
   <xend>800</xend>
   <yend>445</yend>
   <weight>2</weight>
  </line>
  <label>
   <rect>
    <x>390</x>
    <y>350</y>
    <width>195</width>
    <height>20</height>
   </rect>
   <font>
    <face>helvetica</face>
    <size>10</size>
    <weight>normal</weight>
   </font>
   <left/>
   <vcenter/>
   <string>Return Currency</string>
  </label>
  <field>
   <rect>
    <x>390</x>
    <y>370</y>
    <width>50</width>
    <height>20</height>
   </rect>
   <font>
    <face>helvetica</face>
    <size>12</size>
    <weight>normal</weight>
   </font>
   <left/>
   <vcenter/>
   <data>
    <query>GroupHead</query>
    <column>curr_symbol</column>
   </data>
  </field>
  <field>
   <rect>
    <x>50</x>
    <y>80</y>
    <width>260</width>
    <height>20</height>
   </rect>
   <font>
    <face>helvetica</face>
    <size>10</size>
    <weight>normal</weight>
   </font>
   <left/>
   <vcenter/>
   <data>
    <query>GroupHead</query>
    <column>remitto_country</column>
   </data>
  </field>
  <text>
   <rect>
    <x>100</x>
    <y>225</y>
    <width>315</width>
    <height>15</height>
   </rect>
   <bottompad>10</bottompad>
   <font>
    <face>Arial</face>
    <size>10</size>
    <weight>normal</weight>
   </font>
   <left/>
   <top/>
   <data>
    <query>GroupHead</query>
    <column>f_custaddr</column>
   </data>
  </text>
  <label>
   <rect>
    <x>400</x>
    <y>205</y>
    <width>80</width>
    <height>20</height>
   </rect>
   <font>
    <face>helvetica</face>
    <size>14</size>
    <weight>normal</weight>
   </font>
   <left/>
   <vcenter/>
   <string>Ship To:</string>
  </label>
  <label>
   <rect>
    <x>185</x>
    <y>350</y>
    <width>100</width>
    <height>20</height>
   </rect>
   <font>
    <face>helvetica</face>
    <size>10</size>
    <weight>normal</weight>
   </font>
   <hcenter/>
   <vcenter/>
   <string>Document Date</string>
  </label>
  <field>
   <rect>
    <x>185</x>
    <y>370</y>
    <width>230</width>
    <height>20</height>
   </rect>
   <font>
    <face>helvetica</face>
    <size>12</size>
    <weight>normal</weight>
   </font>
   <left/>
   <vcenter/>
   <data>
    <query>GroupHead</query>
    <column>docdate</column>
   </data>
  </field>
  <field>
   <rect>
    <x>485</x>
    <y>205</y>
    <width>300</width>
    <height>20</height>
   </rect>
   <font>
    <face>Helvetica</face>
    <size>12</size>
    <weight>normal</weight>
   </font>
   <left/>
   <vcenter/>
   <data>
    <query>GroupHead</query>
    <column>cmhead_shipto_name</column>
   </data>
  </field>
  <label>
   <rect>
    <x>565</x>
    <y>419</y>
    <width>100</width>
    <height>20</height>
   </rect>
   <font>
    <face>helvetica</face>
    <size>10</size>
    <weight>normal</weight>
   </font>
   <left/>
   <vcenter/>
   <string>Unit Price</string>
  </label>
  <label>
   <rect>
    <x>540</x>
    <y>110</y>
    <width>100</width>
    <height>20</height>
   </rect>
   <font>
    <face>Helvetica</face>
    <size>10</size>
    <weight>normal</weight>
   </font>
   <right/>
   <vcenter/>
   <string>Return #:</string>
  </label>
  <field>
   <rect>
    <x>444</x>
    <y>370</y>
    <width>110</width>
    <height>20</height>
   </rect>
   <font>
    <face>helvetica</face>
    <size>12</size>
    <weight>normal</weight>
   </font>
   <left/>
   <vcenter/>
   <data>
    <query>GroupHead</query>
    <column>curr_name</column>
   </data>
  </field>
  <field>
   <rect>
    <x>50</x>
    <y>95</y>
    <width>200</width>
    <height>20</height>
   </rect>
   <font>
    <face>helvetica</face>
    <size>10</size>
    <weight>normal</weight>
   </font>
   <left/>
   <vcenter/>
   <data>
    <query>GroupHead</query>
    <column>remitto_phone</column>
   </data>
  </field>
  <label>
   <rect>
    <x>50</x>
    <y>400</y>
    <width>120</width>
    <height>20</height>
   </rect>
   <font>
    <face>helvetica</face>
    <size>10</size>
    <weight>normal</weight>
   </font>
   <hcenter/>
   <vcenter/>
   <string>Qty. Returned</string>
  </label>
  <label>
   <rect>
    <x>540</x>
    <y>170</y>
    <width>100</width>
    <height>20</height>
   </rect>
   <font>
    <face>Helvetica</face>
    <size>10</size>
    <weight>normal</weight>
   </font>
   <right/>
   <vcenter/>
   <string>Apply To:</string>
  </label>
  <field>
   <rect>
    <x>50</x>
    <y>50</y>
    <width>200</width>
    <height>20</height>
   </rect>
   <font>
    <face>helvetica</face>
    <size>10</size>
    <weight>normal</weight>
   </font>
   <left/>
   <vcenter/>
   <data>
    <query>GroupHead</query>
    <column>remitto_address1</column>
   </data>
  </field>
  <text>
   <rect>
    <x>485</x>
    <y>225</y>
    <width>315</width>
    <height>15</height>
   </rect>
   <bottompad>10</bottompad>
   <font>
    <face>Arial</face>
    <size>10</size>
    <weight>normal</weight>
   </font>
   <left/>
   <top/>
   <data>
    <query>GroupHead</query>
    <column>f_shiptoaddr</column>
   </data>
  </text>
  <image>
   <rect>
    <x>270</x>
    <y>0</y>
    <width>355</width>
    <height>111</height>
   </rect>
   <mode>stretch</mode>
   <data>
    <query>logo</query>
    <column>image_data</column>
   </data>
  </image>
  <label>
   <rect>
    <x>535</x>
    <y>150</y>
    <width>104</width>
    <height>20</height>
   </rect>
   <font>
    <face>Helvetica</face>
    <size>10</size>
    <weight>normal</weight>
   </font>
   <right/>
   <vcenter/>
   <string>Customer #:</string>
  </label>
  <field>
   <rect>
    <x>660</x>
    <y>150</y>
    <width>180</width>
    <height>20</height>
   </rect>
   <font>
    <face>Helvetica</face>
    <size>10</size>
    <weight>normal</weight>
   </font>
   <left/>
   <vcenter/>
   <data>
    <query>GroupHead</query>
    <column>cust_number</column>
   </data>
  </field>
  <field>
   <rect>
    <x>50</x>
    <y>30</y>
    <width>200</width>
    <height>20</height>
   </rect>
   <font>
    <face>Helvetica</face>
    <size>10</size>
    <weight>bold</weight>
   </font>
   <left/>
   <vcenter/>
   <data>
    <query>GroupHead</query>
    <column>remitto_name</column>
   </data>
  </field>
  <label>
   <rect>
    <x>260</x>
    <y>419</y>
    <width>120</width>
    <height>20</height>
   </rect>
   <font>
    <face>helvetica</face>
    <size>10</size>
    <weight>normal</weight>
   </font>
   <left/>
   <vcenter/>
   <string>Item Description</string>
  </label>
  <label>
   <rect>
    <x>635</x>
    <y>15</y>
    <width>175</width>
    <height>40</height>
   </rect>
   <font>
    <face>helvetica</face>
    <size>20</size>
    <weight>bold</weight>
   </font>
   <right/>
   <vcenter/>
   <string>Return</string>
  </label>
  <field>
   <rect>
    <x>50</x>
    <y>65</y>
    <width>260</width>
    <height>20</height>
   </rect>
   <font>
    <face>helvetica</face>
    <size>10</size>
    <weight>normal</weight>
   </font>
   <left/>
   <vcenter/>
   <data>
    <query>GroupHead</query>
    <column>remitto_citystatezip</column>
   </data>
  </field>
  <label>
   <rect>
    <x>35</x>
    <y>205</y>
    <width>80</width>
    <height>20</height>
   </rect>
   <font>
    <face>helvetica</face>
    <size>14</size>
    <weight>normal</weight>
   </font>
   <left/>
   <vcenter/>
   <string>Bill To:</string>
  </label>
  <label>
   <rect>
    <x>50</x>
    <y>419</y>
    <width>120</width>
    <height>20</height>
   </rect>
   <font>
    <face>helvetica</face>
    <size>10</size>
    <weight>normal</weight>
   </font>
   <hcenter/>
   <vcenter/>
   <string>Qty. Credited</string>
  </label>
  <label>
   <rect>
    <x>260</x>
    <y>400</y>
    <width>120</width>
    <height>20</height>
   </rect>
   <font>
    <face>helvetica</face>
    <size>10</size>
    <weight>normal</weight>
   </font>
   <left/>
   <vcenter/>
   <string>Item Number</string>
  </label>
  <field>
   <rect>
    <x>660</x>
    <y>170</y>
    <width>150</width>
    <height>20</height>
   </rect>
   <font>
    <face>Helvetica</face>
    <size>10</size>
    <weight>normal</weight>
   </font>
   <left/>
   <vcenter/>
   <data>
    <query>GroupHead</query>
    <column>invcnumber</column>
   </data>
  </field>
 </pghead>
 <section>
  <name>detail</name>
  <detail>
   <key>
    <query>Detail</query>
   </key>
   <height>82</height>
   <text>
    <rect>
     <x>160</x>
     <y>55</y>
     <width>600</width>
     <height>17</height>
    </rect>
    <bottompad>14</bottompad>
    <font>
     <face>helvetica</face>
     <size>10</size>
     <weight>normal</weight>
    </font>
    <left/>
    <top/>
    <data>
     <query>Detail</query>
     <column>cmitem_comments</column>
    </data>
   </text>
   <label>
    <rect>
     <x>120</x>
     <y>55</y>
     <width>55</width>
     <height>10</height>
    </rect>
    <font>
     <face>Arial</face>
     <size>6</size>
     <weight>normal</weight>
    </font>
    <left/>
    <vcenter/>
    <string>Notes:</string>
   </label>
   <field>
    <rect>
     <x>670</x>
     <y>5</y>
     <width>100</width>
     <height>20</height>
    </rect>
    <font>
     <face>helvetica</face>
     <size>10</size>
     <weight>normal</weight>
    </font>
    <right/>
    <vcenter/>
    <data>
     <query>Detail</query>
     <column>extprice</column>
    </data>
   </field>
   <field>
    <rect>
     <x>50</x>
     <y>25</y>
     <width>120</width>
     <height>20</height>
    </rect>
    <font>
     <face>helvetica</face>
     <size>10</size>
     <weight>normal</weight>
    </font>
    <right/>
    <vcenter/>
    <data>
     <query>Detail</query>
     <column>qtycredit</column>
    </data>
   </field>
   <field>
    <rect>
     <x>260</x>
     <y>5</y>
     <width>300</width>
     <height>20</height>
    </rect>
    <font>
     <face>helvetica</face>
     <size>10</size>
     <weight>normal</weight>
    </font>
    <left/>
    <vcenter/>
    <data>
     <query>Detail</query>
     <column>item_number</column>
    </data>
   </field>
   <field>
    <rect>
     <x>175</x>
     <y>5</y>
     <width>80</width>
     <height>20</height>
    </rect>
    <font>
     <face>helvetica</face>
     <size>10</size>
     <weight>normal</weight>
    </font>
    <hcenter/>
    <vcenter/>
    <data>
     <query>Detail</query>
     <column>uom_name</column>
    </data>
   </field>
   <field>
    <rect>
     <x>260</x>
     <y>25</y>
     <width>300</width>
     <height>15</height>
    </rect>
    <font>
     <face>helvetica</face>
     <size>8</size>
     <weight>normal</weight>
    </font>
    <left/>
    <vcenter/>
    <data>
     <query>Detail</query>
     <column>item_descrip1</column>
    </data>
   </field>
   <field>
    <rect>
     <x>520</x>
     <y>5</y>
     <width>100</width>
     <height>20</height>
    </rect>
    <font>
     <face>helvetica</face>
     <size>10</size>
     <weight>normal</weight>
    </font>
    <right/>
    <vcenter/>
    <data>
     <query>Detail</query>
     <column>unitprice</column>
    </data>
   </field>
   <field>
    <rect>
     <x>260</x>
     <y>40</y>
     <width>300</width>
     <height>15</height>
    </rect>
    <font>
     <face>helvetica</face>
     <size>8</size>
     <weight>normal</weight>
    </font>
    <left/>
    <vcenter/>
    <data>
     <query>Detail</query>
     <column>item_descrip2</column>
    </data>
   </field>
   <field>
    <rect>
     <x>50</x>
     <y>5</y>
     <width>120</width>
     <height>20</height>
    </rect>
    <font>
     <face>helvetica</face>
     <size>10</size>
     <weight>normal</weight>
    </font>
    <right/>
    <vcenter/>
    <data>
     <query>Detail</query>
     <column>qtyreturned</column>
    </data>
   </field>
  </detail>
 </section>
 <pgfoot>
  <firstpage/>
  <height>144</height>
  <label>
   <rect>
    <x>565</x>
    <y>5</y>
    <width>100</width>
    <height>20</height>
   </rect>
   <font>
    <face>helvetica</face>
    <size>10</size>
    <weight>normal</weight>
   </font>
   <right/>
   <vcenter/>
   <string>Subtotal:</string>
  </label>
  <field>
   <rect>
    <x>670</x>
    <y>5</y>
    <width>100</width>
    <height>20</height>
   </rect>
   <font>
    <face>helvetica</face>
    <size>10</size>
    <weight>normal</weight>
   </font>
   <right/>
   <vcenter/>
   <data>
    <query>GroupFoot</query>
    <column>extprice</column>
   </data>
  </field>
  <text>
   <rect>
    <x>60</x>
    <y>55</y>
    <width>515</width>
    <height>17</height>
   </rect>
   <bottompad>14</bottompad>
   <font>
    <face>helvetica</face>
    <size>10</size>
    <weight>normal</weight>
   </font>
   <left/>
   <top/>
   <data>
    <query>GroupHead</query>
    <column>cmhead_comments</column>
   </data>
  </text>
  <label>
   <rect>
    <x>50</x>
    <y>45</y>
    <width>100</width>
    <height>10</height>
   </rect>
   <font>
    <face>Arial</face>
    <size>6</size>
    <weight>normal</weight>
   </font>
   <left/>
   <vcenter/>
   <string>Comments</string>
  </label>
  <field>
   <rect>
    <x>670</x>
    <y>65</y>
    <width>100</width>
    <height>20</height>
   </rect>
   <font>
    <face>helvetica</face>
    <size>10</size>
    <weight>normal</weight>
   </font>
   <right/>
   <vcenter/>
   <data>
    <query>GroupExtended</query>
    <column>tax</column>
   </data>
  </field>
  <label>
   <rect>
    <x>565</x>
    <y>65</y>
    <width>100</width>
    <height>20</height>
   </rect>
   <font>
    <face>helvetica</face>
    <size>10</size>
    <weight>normal</weight>
   </font>
   <right/>
   <vcenter/>
   <string>Sales Tax:</string>
  </label>
  <field>
   <rect>
    <x>670</x>
    <y>25</y>
    <width>100</width>
    <height>20</height>
   </rect>
   <font>
    <face>helvetica</face>
    <size>10</size>
    <weight>normal</weight>
   </font>
   <right/>
   <vcenter/>
   <data>
    <query>GroupExtended</query>
    <column>misc</column>
   </data>
  </field>
  <label>
   <rect>
    <x>565</x>
    <y>45</y>
    <width>100</width>
    <height>20</height>
   </rect>
   <font>
    <face>helvetica</face>
    <size>10</size>
    <weight>normal</weight>
   </font>
   <right/>
   <vcenter/>
   <string>Freight:</string>
  </label>
  <label>
   <rect>
    <x>565</x>
    <y>85</y>
    <width>100</width>
    <height>20</height>
   </rect>
   <font>
    <face>helvetica</face>
    <size>10</size>
    <weight>normal</weight>
   </font>
   <right/>
   <vcenter/>
   <string>Total Credit:</string>
  </label>
  <field>
   <rect>
    <x>670</x>
    <y>45</y>
    <width>100</width>
    <height>20</height>
   </rect>
   <font>
    <face>helvetica</face>
    <size>10</size>
    <weight>normal</weight>
   </font>
   <right/>
   <vcenter/>
   <data>
    <query>GroupExtended</query>
    <column>freight</column>
   </data>
  </field>
  <label>
   <rect>
    <x>50</x>
    <y>15</y>
    <width>100</width>
    <height>10</height>
   </rect>
   <font>
    <face>Arial</face>
    <size>6</size>
    <weight>normal</weight>
   </font>
   <left/>
   <vcenter/>
   <string>Misc. Comments:</string>
  </label>
  <field>
   <rect>
    <x>670</x>
    <y>85</y>
    <width>100</width>
    <height>20</height>
   </rect>
   <font>
    <face>helvetica</face>
    <size>10</size>
    <weight>normal</weight>
   </font>
   <right/>
   <vcenter/>
   <data>
    <query>GroupExtended</query>
    <column>totaldue</column>
   </data>
  </field>
  <label>
   <rect>
    <x>565</x>
    <y>25</y>
    <width>100</width>
    <height>20</height>
   </rect>
   <font>
    <face>helvetica</face>
    <size>10</size>
    <weight>normal</weight>
   </font>
   <right/>
   <vcenter/>
   <string>Misc:</string>
  </label>
  <field>
   <rect>
    <x>60</x>
    <y>25</y>
    <width>525</width>
    <height>20</height>
   </rect>
   <font>
    <face>helvetica</face>
    <size>10</size>
    <weight>normal</weight>
   </font>
   <left/>
   <vcenter/>
   <data>
    <query>GroupHead</query>
    <column>cmhead_misc_descrip</column>
   </data>
  </field>
 </pgfoot>
</report>
