<!DOCTYPE openRPTDef>
<report>
 <title>Picking List SO With Locations</title>
 <name>PickingListSOLocsNoClosedLines</name>
 <description>This report definition shows location / lot / serial information on an SO Pick List.  If the item is not Location Controlled it shows the contents of its Location Comment in the corresponding Item Site record.</description>
 <parameter default="3349" active="true" listtype="static" type="string" name="sohead_id">
  <description></description>
 </parameter>
 <grid>
  <snap/>
  <show/>
  <x>0.05</x>
  <y>0.05</y>
 </grid>
 <size>Letter</size>
 <portrait/>
 <topmargin>25</topmargin>
 <bottommargin>25</bottommargin>
 <rightmargin>25</rightmargin>
 <leftmargin>25</leftmargin>
 <querysource>
  <name>head</name>
  <sql>SELECT cust_number,
       formatsobarcode(cohead_id) AS order_barcode,

       formataddr(cohead_billtoaddress1,
                  cohead_billtoaddress2,
                  cohead_billtoaddress3,
                  (cohead_billtocity || '  ' ||   cohead_billtostate || '  ' || cohead_billtozipcode),
                  cohead_billtocountry) AS billing_address, 
       formataddr(cohead_shiptoaddress1,
                  cohead_shiptoaddress2,
                  cohead_shiptoaddress3,
                  (cohead_shiptocity || '  ' ||   cohead_shiptostate || '  ' || cohead_shiptozipcode),
                  cohead_shiptocountry) AS shipping_address,           
       trim(cntct_first_name || ' ' || cntct_last_name) AS cust_contact,
       cohead_billtoname,
       cohead_billtoaddress1,
       cohead_billtoaddress2,
       cohead_billtoaddress3,
       (cohead_billtocity || '  ' || cohead_billtostate || '  ' || cohead_billtozipcode) AS billtocitystatezip,
       cntct_phone AS cust_phone,
       cohead_shiptoname,
       cohead_shiptoaddress1,
       cohead_shiptoaddress2,
       cohead_shiptoaddress3,
       (cohead_shiptocity || '  ' || cohead_shiptostate || ' ' || cohead_shiptozipcode) AS shiptocitystatezip,
       cohead_number,
       cohead_shipvia,
       cohead_shiptophone,
       cohead_custponumber,
       formatDate(cohead_orderdate) AS orderdate,
       formatDate(getSoSchedDate(cohead_id)) AS scheddate,
       cohead_shipcomments, 
       terms_descrip
  FROM cohead JOIN custinfo ON (cohead_cust_id=cust_id)
              LEFT OUTER JOIN cntct ON (cust_cntct_id=cntct_id)
              LEFT OUTER JOIN terms ON (cohead_terms_id=terms_id)
 WHERE (cohead_id=&lt;? value("sohead_id") ?>)
;</sql>
 </querysource>
 <querysource>
  <name>detail</name>
  <sql>SELECT 
       coitem_linenumber AS sortline,
       coitem_subnumber AS sortsubline,
       formatsolinenumber(coitem_id) AS linenumber,
       coitem_memo,
       item_number,
       formatitemsitebarcode(itemsite_id) AS item_barcode,
       CASE WHEN (formatLocationName(location_id) = 'N/A') THEN itemsite_location_comments || ' ' || '(comment)'
            ELSE formatLocationName(location_id)
       END AS location_name,
       itemsite_location_comments AS location_comment,
       formatlotserialnumber(itemloc_ls_id),
       formatDate(itemloc_expiration, 'N/A') AS expiration,
       itemloc_qty AS location_qty_qty,
       CASE WHEN fetchMetricBool('EnableSOReservationsByLocation')
            THEN formatQty(qtyReservedLocation(itemloc_id, 'SO', coitem_id)) 
            ELSE  formatQty(0) 
       END AS location_reserved_qty,
       itemuomtouomratio(item_id,item_inv_uom_id, coitem_qty_uom_id) * itemloc_qty AS loc_issue_uom_qty,
       formatqty(itemuomtouomratio(item_id,item_inv_uom_id, coitem_qty_uom_id) * itemloc_qty) AS loc_issue_uom_fmt,
       coitemuom.uom_name AS uom_name,
       item_descrip1,
       item_descrip2,
       formatQty(coitem_qtyord) AS ordered,
       CASE WHEN (coitem_qtyreserved > 0.0)
            THEN formatQty(coitem_qtyreserved)
            ELSE NULL
       END AS reserved,
       CASE WHEN ((coitem_qtyshipped - coitem_qtyreturned) > 0.0)
            THEN formatQty(coitem_qtyshipped - coitem_qtyreturned)
            ELSE NULL
       END AS shipped,
       CASE WHEN (fetchMetricBool('RequireSOReservations'))
            THEN formatQty(coitem_qtyreserved)
            ELSE formatQty(noNeg(coitem_qtyord - coitem_qtyshipped + coitem_qtyreturned - qtyAtShipping('SO', coitem_id)))
       END AS balance,
       CASE WHEN (qtyAtShipping('SO', coitem_id) > 0.0)
            THEN formatQty(qtyAtShipping('SO', coitem_id))
            ELSE NULL
       END AS atShipping,
       formatQty(roundUp((coitem_qtyord * coitem_qty_invuomratio))) AS shipordered,
       formatQty(roundUp(((coitem_qtyshipped - coitem_qtyreturned) * coitem_qty_invuomratio))) AS shipshipped,
       formatQty(roundUp((noNeg(coitem_qtyord - coitem_qtyshipped + coitem_qtyreturned) * coitem_qty_invuomratio))) AS shipbalance,
       getSoitemStatus(coitem_id) AS f_status
   FROM coitem JOIN cohead ON (cohead_id = coitem_cohead_id)
               JOIN custinfo ON (cust_id = cohead_cust_id)
               JOIN itemsite ON (itemsite_id = coitem_itemsite_id)
               JOIN item ON (item_id = itemsite_item_id)
               JOIN whsinfo ON (warehous_id = itemsite_warehous_id)
               JOIN uom invuom ON (invuom.uom_id = item_inv_uom_id)
               JOIN uom coitemuom ON (coitemuom.uom_id = coitem_qty_uom_id) 
               LEFT OUTER JOIN itemloc  ON (itemloc_itemsite_id = itemsite_id)
               LEFT OUTER JOIN location ON (itemloc_location_id = location_id)
 WHERE ( (coitem_cohead_id=&lt;? value("sohead_id") ?>)
   AND   (coitem_status &lt;> 'X')
   AND   (coitem_status &lt;> 'C')
   AND   (item_type != 'K')
   AND   ( (fetchMetricBool('RequireSOReservations') AND (coitem_qtyreserved > 0.0)) OR
           (NOT fetchMetricBool('RequireSOReservations')) )
&lt;? if exists("warehous_id") ?>
   AND (itemsite_warehous_id=&lt;? value("warehous_id") ?>)
&lt;? endif ?>
)
ORDER BY sortline, sortsubline, expiration, location_name;</sql>
 </querysource>
 <querysource>
  <name>logo</name>
  <sql>SELECT image_data 
FROM image 
WHERE ((image_name='logo'));</sql>
 </querysource>
 <querysource>
  <name>site</name>
  <sql>&lt;? if exists("warehous_id") ?>
  SELECT warehous_code AS f_site
  FROM whsinfo
  WHERE (warehous_id=&lt;? value("warehous_id") ?>);
&lt;? else ?>
  SELECT text('') AS f_site;
&lt;? endif ?>
</sql>
 </querysource>
 <rpthead>
  <height>467</height>
  <image>
   <rect>
    <x>375</x>
    <y>5</y>
    <width>425</width>
    <height>85</height>
   </rect>
   <mode>stretch</mode>
   <data>
    <query>logo</query>
    <column>image_data</column>
   </data>
  </image>
  <field>
   <rect>
    <x>170</x>
    <y>125</y>
    <width>170</width>
    <height>20</height>
   </rect>
   <font>
    <face>Arial</face>
    <size>14</size>
    <weight>normal</weight>
   </font>
   <left/>
   <vcenter/>
   <data>
    <query>head</query>
    <column>cust_number</column>
   </data>
  </field>
  <label>
   <rect>
    <x>380</x>
    <y>400</y>
    <width>75</width>
    <height>20</height>
   </rect>
   <font>
    <face>Arial</face>
    <size>12</size>
    <weight>normal</weight>
   </font>
   <left/>
   <vcenter/>
   <string>Terms:</string>
  </label>
  <label>
   <rect>
    <x>385</x>
    <y>260</y>
    <width>75</width>
    <height>20</height>
   </rect>
   <font>
    <face>Arial</face>
    <size>14</size>
    <weight>normal</weight>
   </font>
   <right/>
   <vcenter/>
   <string>Ship To:</string>
  </label>
  <label>
   <rect>
    <x>433</x>
    <y>444</y>
    <width>100</width>
    <height>20</height>
   </rect>
   <font>
    <face>Arial</face>
    <size>10</size>
    <weight>bold</weight>
   </font>
   <hcenter/>
   <vcenter/>
   <string>Shipped</string>
  </label>
  <text>
   <rect>
    <x>75</x>
    <y>280</y>
    <width>295</width>
    <height>20</height>
   </rect>
   <bottompad>10</bottompad>
   <font>
    <face>Arial</face>
    <size>10</size>
    <weight>normal</weight>
   </font>
   <left/>
   <top/>
   <data>
    <query>head</query>
    <column>billing_address</column>
   </data>
  </text>
  <label>
   <rect>
    <x>10</x>
    <y>400</y>
    <width>95</width>
    <height>25</height>
   </rect>
   <font>
    <face>Arial</face>
    <size>12</size>
    <weight>normal</weight>
   </font>
   <left/>
   <top/>
   <string>Attention:</string>
  </label>
  <line>
   <xstart>5</xstart>
   <ystart>425</ystart>
   <xend>797</xend>
   <yend>425</yend>
   <weight>0</weight>
  </line>
  <field>
   <rect>
    <x>100</x>
    <y>400</y>
    <width>253</width>
    <height>25</height>
   </rect>
   <font>
    <face>Arial</face>
    <size>12</size>
    <weight>normal</weight>
   </font>
   <left/>
   <top/>
   <data>
    <query>head</query>
    <column>cust_contact</column>
   </data>
  </field>
  <field>
   <rect>
    <x>170</x>
    <y>200</y>
    <width>100</width>
    <height>20</height>
   </rect>
   <font>
    <face>Arial</face>
    <size>14</size>
    <weight>normal</weight>
   </font>
   <left/>
   <vcenter/>
   <data>
    <query>head</query>
    <column>scheddate</column>
   </data>
  </field>
  <field>
   <rect>
    <x>475</x>
    <y>400</y>
    <width>320</width>
    <height>20</height>
   </rect>
   <font>
    <face>Arial</face>
    <size>12</size>
    <weight>normal</weight>
   </font>
   <left/>
   <vcenter/>
   <data>
    <query>head</query>
    <column>terms_descrip</column>
   </data>
  </field>
  <label>
   <rect>
    <x>10</x>
    <y>155</y>
    <width>150</width>
    <height>20</height>
   </rect>
   <font>
    <face>Arial</face>
    <size>14</size>
    <weight>normal</weight>
   </font>
   <left/>
   <vcenter/>
   <string>Customer P/O #:</string>
  </label>
  <field>
   <rect>
    <x>170</x>
    <y>220</y>
    <width>390</width>
    <height>20</height>
   </rect>
   <font>
    <face>Arial</face>
    <size>14</size>
    <weight>normal</weight>
   </font>
   <left/>
   <vcenter/>
   <data>
    <query>head</query>
    <column>cohead_shipvia</column>
   </data>
  </field>
  <field>
   <rect>
    <x>170</x>
    <y>155</y>
    <width>170</width>
    <height>20</height>
   </rect>
   <font>
    <face>Arial</face>
    <size>14</size>
    <weight>normal</weight>
   </font>
   <left/>
   <vcenter/>
   <data>
    <query>head</query>
    <column>cohead_custponumber</column>
   </data>
  </field>
  <label>
   <rect>
    <x>233</x>
    <y>444</y>
    <width>80</width>
    <height>20</height>
   </rect>
   <font>
    <face>Arial</face>
    <size>10</size>
    <weight>bold</weight>
   </font>
   <hcenter/>
   <vcenter/>
   <string>Ordered</string>
  </label>
  <field>
   <rect>
    <x>170</x>
    <y>95</y>
    <width>100</width>
    <height>20</height>
   </rect>
   <font>
    <face>Arial</face>
    <size>14</size>
    <weight>normal</weight>
   </font>
   <left/>
   <vcenter/>
   <data>
    <query>head</query>
    <column>cohead_number</column>
   </data>
  </field>
  <label>
   <rect>
    <x>10</x>
    <y>125</y>
    <width>122</width>
    <height>20</height>
   </rect>
   <font>
    <face>Arial</face>
    <size>14</size>
    <weight>normal</weight>
   </font>
   <left/>
   <vcenter/>
   <string>Customer #:</string>
  </label>
  <label>
   <rect>
    <x>10</x>
    <y>95</y>
    <width>60</width>
    <height>20</height>
   </rect>
   <font>
    <face>Arial</face>
    <size>14</size>
    <weight>normal</weight>
   </font>
   <left/>
   <vcenter/>
   <string>S/O #:</string>
  </label>
  <label>
   <rect>
    <x>325</x>
    <y>444</y>
    <width>100</width>
    <height>20</height>
   </rect>
   <font>
    <face>Arial</face>
    <size>10</size>
    <weight>bold</weight>
   </font>
   <hcenter/>
   <vcenter/>
   <string>Reserved</string>
  </label>
  <barcode>
   <rect>
    <x>375</x>
    <y>130</y>
    <width>177</width>
    <height>25</height>
   </rect>
   <format>3of9</format>
   <maxlength>10</maxlength>
   <left/>
   <narrowBarWidth>0.01</narrowBarWidth>
   <data>
    <query>head</query>
    <column>cust_number</column>
   </data>
  </barcode>
  <barcode>
   <rect>
    <x>375</x>
    <y>95</y>
    <width>233</width>
    <height>25</height>
   </rect>
   <format>128</format>
   <maxlength>10</maxlength>
   <left/>
   <narrowBarWidth>0.01</narrowBarWidth>
   <data>
    <query>head</query>
    <column>order_barcode</column>
   </data>
  </barcode>
  <field>
   <rect>
    <x>170</x>
    <y>180</y>
    <width>100</width>
    <height>20</height>
   </rect>
   <font>
    <face>Arial</face>
    <size>14</size>
    <weight>normal</weight>
   </font>
   <left/>
   <vcenter/>
   <data>
    <query>head</query>
    <column>orderdate</column>
   </data>
  </field>
  <label>
   <rect>
    <x>10</x>
    <y>5</y>
    <width>330</width>
    <height>40</height>
   </rect>
   <font>
    <face>Arial</face>
    <size>20</size>
    <weight>bold</weight>
   </font>
   <left/>
   <vcenter/>
   <string>Sales Order Pick List</string>
  </label>
  <field>
   <rect>
    <x>465</x>
    <y>260</y>
    <width>305</width>
    <height>20</height>
   </rect>
   <font>
    <face>Arial</face>
    <size>14</size>
    <weight>normal</weight>
   </font>
   <left/>
   <vcenter/>
   <data>
    <query>head</query>
    <column>cohead_shiptoname</column>
   </data>
  </field>
  <label>
   <rect>
    <x>10</x>
    <y>220</y>
    <width>125</width>
    <height>20</height>
   </rect>
   <font>
    <face>Arial</face>
    <size>14</size>
    <weight>normal</weight>
   </font>
   <left/>
   <vcenter/>
   <string>Ship Via:</string>
  </label>
  <label>
   <rect>
    <x>10</x>
    <y>180</y>
    <width>125</width>
    <height>20</height>
   </rect>
   <font>
    <face>Arial</face>
    <size>14</size>
    <weight>normal</weight>
   </font>
   <left/>
   <vcenter/>
   <string>S/O Date:</string>
  </label>
  <label>
   <rect>
    <x>535</x>
    <y>430</y>
    <width>100</width>
    <height>20</height>
   </rect>
   <font>
    <face>Arial</face>
    <size>10</size>
    <weight>bold</weight>
   </font>
   <hcenter/>
   <vcenter/>
   <string>Balance</string>
  </label>
  <label>
   <rect>
    <x>10</x>
    <y>425</y>
    <width>85</width>
    <height>20</height>
   </rect>
   <font>
    <face>Arial</face>
    <size>10</size>
    <weight>bold</weight>
   </font>
   <left/>
   <vcenter/>
   <string>Item Number</string>
  </label>
  <label>
   <rect>
    <x>10</x>
    <y>444</y>
    <width>95</width>
    <height>13</height>
   </rect>
   <font>
    <face>Arial</face>
    <size>8</size>
    <weight>bold</weight>
   </font>
   <left/>
   <vcenter/>
   <string>Item Description</string>
  </label>
  <label>
   <rect>
    <x>730</x>
    <y>444</y>
    <width>55</width>
    <height>20</height>
   </rect>
   <font>
    <face>Arial</face>
    <size>10</size>
    <weight>bold</weight>
   </font>
   <hcenter/>
   <vcenter/>
   <string>Packed</string>
  </label>
  <label>
   <rect>
    <x>630</x>
    <y>444</y>
    <width>100</width>
    <height>20</height>
   </rect>
   <font>
    <face>Arial</face>
    <size>10</size>
    <weight>bold</weight>
   </font>
   <hcenter/>
   <vcenter/>
   <string>At Shipping</string>
  </label>
  <field>
   <rect>
    <x>75</x>
    <y>260</y>
    <width>305</width>
    <height>20</height>
   </rect>
   <font>
    <face>Arial</face>
    <size>14</size>
    <weight>normal</weight>
   </font>
   <left/>
   <vcenter/>
   <data>
    <query>head</query>
    <column>cohead_billtoname</column>
   </data>
  </field>
  <label>
   <rect>
    <x>535</x>
    <y>444</y>
    <width>100</width>
    <height>20</height>
   </rect>
   <font>
    <face>Arial</face>
    <size>10</size>
    <weight>bold</weight>
   </font>
   <hcenter/>
   <vcenter/>
   <string>To Pick</string>
  </label>
  <label>
   <rect>
    <x>10</x>
    <y>260</y>
    <width>65</width>
    <height>20</height>
   </rect>
   <font>
    <face>Arial</face>
    <size>14</size>
    <weight>normal</weight>
   </font>
   <left/>
   <vcenter/>
   <string>Bill To:</string>
  </label>
  <text>
   <rect>
    <x>465</x>
    <y>280</y>
    <width>305</width>
    <height>20</height>
   </rect>
   <bottompad>10</bottompad>
   <font>
    <face>Arial</face>
    <size>10</size>
    <weight>normal</weight>
   </font>
   <left/>
   <top/>
   <data>
    <query>head</query>
    <column>shipping_address</column>
   </data>
  </text>
  <label>
   <rect>
    <x>10</x>
    <y>200</y>
    <width>125</width>
    <height>20</height>
   </rect>
   <font>
    <face>Arial</face>
    <size>14</size>
    <weight>normal</weight>
   </font>
   <left/>
   <vcenter/>
   <string>Sched. Date:</string>
  </label>
  <barcode>
   <rect>
    <x>375</x>
    <y>160</y>
    <width>307</width>
    <height>25</height>
   </rect>
   <format>3of9</format>
   <maxlength>20</maxlength>
   <left/>
   <narrowBarWidth>0.01</narrowBarWidth>
   <data>
    <query>head</query>
    <column>cohead_custponumber</column>
   </data>
  </barcode>
  <label>
   <rect>
    <x>10</x>
    <y>70</y>
    <width>60</width>
    <height>20</height>
   </rect>
   <font>
    <face>Arial</face>
    <size>14</size>
    <weight>normal</weight>
   </font>
   <left/>
   <vcenter/>
   <string>Site:</string>
  </label>
  <field>
   <rect>
    <x>170</x>
    <y>70</y>
    <width>100</width>
    <height>20</height>
   </rect>
   <font>
    <face>Arial</face>
    <size>14</size>
    <weight>normal</weight>
   </font>
   <left/>
   <vcenter/>
   <data>
    <query>site</query>
    <column>f_site</column>
   </data>
  </field>
 </rpthead>
 <section>
  <name>detail</name>
  <group>
   <name>lineitems</name>
   <column>linenumber</column>
   <head>
    <height>132</height>
    <line>
     <xstart>5</xstart>
     <ystart>5</ystart>
     <xend>797</xend>
     <yend>5</yend>
     <weight>2</weight>
    </line>
    <label>
     <rect>
      <x>630</x>
      <y>100</y>
      <width>90</width>
      <height>17</height>
     </rect>
     <font>
      <face>Arial</face>
      <size>10</size>
      <weight>bold</weight>
     </font>
     <right/>
     <vcenter/>
     <string>Expiration</string>
    </label>
    <label>
     <rect>
      <x>30</x>
      <y>80</y>
      <width>48</width>
      <height>17</height>
     </rect>
     <font>
      <face>Arial</face>
      <size>10</size>
      <weight>normal</weight>
     </font>
     <left/>
     <vcenter/>
     <string>Qty:</string>
    </label>
    <field>
     <rect>
      <x>30</x>
      <y>25</y>
      <width>285</width>
      <height>20</height>
     </rect>
     <font>
      <face>Arial</face>
      <size>11</size>
      <weight>bold</weight>
     </font>
     <left/>
     <vcenter/>
     <data>
      <query>detail</query>
      <column>item_descrip1</column>
     </data>
    </field>
    <field>
     <rect>
      <x>20</x>
      <y>10</y>
      <width>200</width>
      <height>20</height>
     </rect>
     <font>
      <face>Arial</face>
      <size>11</size>
      <weight>bold</weight>
     </font>
     <left/>
     <vcenter/>
     <data>
      <query>detail</query>
      <column>item_number</column>
     </data>
    </field>
    <label>
     <rect>
      <x>415</x>
      <y>100</y>
      <width>205</width>
      <height>17</height>
     </rect>
     <font>
      <face>Arial</face>
      <size>10</size>
      <weight>bold</weight>
     </font>
     <hcenter/>
     <vcenter/>
     <string>QtyAtLocn   QtyReserved   UOM</string>
    </label>
    <barcode>
     <rect>
      <x>408</x>
      <y>35</y>
      <width>380</width>
      <height>45</height>
     </rect>
     <format>128</format>
     <maxlength>15</maxlength>
     <left/>
     <narrowBarWidth>0.01</narrowBarWidth>
     <data>
      <query>detail</query>
      <column>item_barcode</column>
     </data>
    </barcode>
    <label>
     <rect>
      <x>80</x>
      <y>100</y>
      <width>80</width>
      <height>17</height>
     </rect>
     <font>
      <face>Arial</face>
      <size>10</size>
      <weight>bold</weight>
     </font>
     <left/>
     <vcenter/>
     <string>Location:</string>
    </label>
    <label>
     <rect>
      <x>250</x>
      <y>100</y>
      <width>145</width>
      <height>17</height>
     </rect>
     <font>
      <face>Arial</face>
      <size>10</size>
      <weight>bold</weight>
     </font>
     <right/>
     <vcenter/>
     <string>Lot / Serial</string>
    </label>
    <label>
     <rect>
      <x>30</x>
      <y>60</y>
      <width>48</width>
      <height>17</height>
     </rect>
     <font>
      <face>Arial</face>
      <size>10</size>
      <weight>normal</weight>
     </font>
     <left/>
     <vcenter/>
     <string>Carton:</string>
    </label>
    <field>
     <rect>
      <x>225</x>
      <y>10</y>
      <width>85</width>
      <height>20</height>
     </rect>
     <font>
      <face>Arial</face>
      <size>10</size>
      <weight>normal</weight>
     </font>
     <right/>
     <vcenter/>
     <data>
      <query>detail</query>
      <column>ordered</column>
     </data>
    </field>
    <label>
     <rect>
      <x>660</x>
      <y>100</y>
      <width>135</width>
      <height>17</height>
     </rect>
     <font>
      <face>Arial</face>
      <size>10</size>
      <weight>bold</weight>
     </font>
     <right/>
     <vcenter/>
     <string>Qty Picked</string>
    </label>
    <field>
     <rect>
      <x>620</x>
      <y>10</y>
      <width>100</width>
      <height>20</height>
     </rect>
     <font>
      <face>Arial</face>
      <size>10</size>
      <weight>normal</weight>
     </font>
     <right/>
     <vcenter/>
     <data>
      <query>detail</query>
      <column>atshipping</column>
     </data>
    </field>
    <line>
     <xstart>135</xstart>
     <ystart>75</ystart>
     <xend>175</xend>
     <yend>75</yend>
     <weight>0</weight>
    </line>
    <line>
     <xstart>75</xstart>
     <ystart>75</ystart>
     <xend>112</xend>
     <yend>75</yend>
     <weight>0</weight>
    </line>
    <label>
     <rect>
      <x>320</x>
      <y>63</y>
      <width>40</width>
      <height>17</height>
     </rect>
     <font>
      <face>Arial</face>
      <size>10</size>
      <weight>normal</weight>
     </font>
     <left/>
     <vcenter/>
     <string>Status:</string>
    </label>
    <label>
     <rect>
      <x>660</x>
      <y>85</y>
      <width>135</width>
      <height>17</height>
     </rect>
     <font>
      <face>Arial</face>
      <size>10</size>
      <weight>bold</weight>
     </font>
     <right/>
     <vcenter/>
     <string>Loc / Lot</string>
    </label>
    <line>
     <xstart>75</xstart>
     <ystart>95</ystart>
     <xend>112</xend>
     <yend>95</yend>
     <weight>0</weight>
    </line>
    <line>
     <xstart>252</xstart>
     <ystart>75</ystart>
     <xend>295</xend>
     <yend>75</yend>
     <weight>0</weight>
    </line>
    <field>
     <rect>
      <x>515</x>
      <y>10</y>
      <width>100</width>
      <height>20</height>
     </rect>
     <font>
      <face>Arial</face>
      <size>10</size>
      <weight>bold</weight>
     </font>
     <right/>
     <vcenter/>
     <data>
      <query>detail</query>
      <column>balance</column>
     </data>
    </field>
    <line>
     <xstart>252</xstart>
     <ystart>95</ystart>
     <xend>295</xend>
     <yend>95</yend>
     <weight>0</weight>
    </line>
    <line>
     <xstart>615</xstart>
     <ystart>30</ystart>
     <xend>535</xend>
     <yend>30</yend>
     <weight>0</weight>
    </line>
    <line>
     <xstart>135</xstart>
     <ystart>95</ystart>
     <xend>175</xend>
     <yend>95</yend>
     <weight>0</weight>
    </line>
    <field>
     <rect>
      <x>415</x>
      <y>10</y>
      <width>100</width>
      <height>20</height>
     </rect>
     <font>
      <face>Arial</face>
      <size>10</size>
      <weight>normal</weight>
     </font>
     <right/>
     <vcenter/>
     <data>
      <query>detail</query>
      <column>shipped</column>
     </data>
    </field>
    <line>
     <xstart>745</xstart>
     <ystart>25</ystart>
     <xend>795</xend>
     <yend>25</yend>
     <weight>1</weight>
    </line>
    <line>
     <xstart>195</xstart>
     <ystart>95</ystart>
     <xend>235</xend>
     <yend>95</yend>
     <weight>0</weight>
    </line>
    <field>
     <rect>
      <x>365</x>
      <y>63</y>
      <width>25</width>
      <height>17</height>
     </rect>
     <font>
      <face>Arial</face>
      <size>10</size>
      <weight>normal</weight>
     </font>
     <right/>
     <vcenter/>
     <data>
      <query>detail</query>
      <column>f_status</column>
     </data>
    </field>
    <field>
     <rect>
      <x>30</x>
      <y>40</y>
      <width>285</width>
      <height>20</height>
     </rect>
     <font>
      <face>Arial</face>
      <size>11</size>
      <weight>bold</weight>
     </font>
     <left/>
     <vcenter/>
     <data>
      <query>detail</query>
      <column>item_descrip2</column>
     </data>
    </field>
    <line>
     <xstart>195</xstart>
     <ystart>75</ystart>
     <xend>235</xend>
     <yend>75</yend>
     <weight>0</weight>
    </line>
    <line>
     <xstart>70</xstart>
     <ystart>120</ystart>
     <xend>793</xend>
     <yend>120</yend>
     <weight>0</weight>
    </line>
    <field>
     <rect>
      <x>305</x>
      <y>10</y>
      <width>100</width>
      <height>20</height>
     </rect>
     <font>
      <face>Arial</face>
      <size>10</size>
      <weight>normal</weight>
     </font>
     <right/>
     <vcenter/>
     <data>
      <query>detail</query>
      <column>reserved</column>
     </data>
    </field>
    <field>
     <rect>
      <x>365</x>
      <y>43</y>
      <width>25</width>
      <height>17</height>
     </rect>
     <font>
      <face>Arial</face>
      <size>10</size>
      <weight>normal</weight>
     </font>
     <right/>
     <vcenter/>
     <data>
      <query>detail</query>
      <column>uom_name</column>
     </data>
    </field>
    <label>
     <rect>
      <x>320</x>
      <y>43</y>
      <width>40</width>
      <height>17</height>
     </rect>
     <font>
      <face>Arial</face>
      <size>10</size>
      <weight>normal</weight>
     </font>
     <left/>
     <vcenter/>
     <string>UOM:</string>
    </label>
   </head>
   <foot>
    <height>29</height>
    <field>
     <rect>
      <x>490</x>
      <y>5</y>
      <width>50</width>
      <height>20</height>
     </rect>
     <font>
      <face>Arial</face>
      <size>10</size>
      <weight>normal</weight>
     </font>
     <left/>
     <vcenter/>
     <data>
      <query>detail</query>
      <column>uom_name</column>
     </data>
    </field>
    <label>
     <rect>
      <x>80</x>
      <y>5</y>
      <width>48</width>
      <height>17</height>
     </rect>
     <font>
      <face>Arial</face>
      <size>10</size>
      <weight>normal</weight>
     </font>
     <left/>
     <vcenter/>
     <string>Item:</string>
    </label>
    <line>
     <xstart>70</xstart>
     <ystart>5</ystart>
     <xend>793</xend>
     <yend>5</yend>
     <weight>0</weight>
    </line>
    <field>
     <rect>
      <x>415</x>
      <y>5</y>
      <width>70</width>
      <height>20</height>
     </rect>
     <font>
      <face>Arial</face>
      <size>10</size>
      <weight>normal</weight>
     </font>
     <right/>
     <vcenter/>
     <data>
      <query>detail</query>
      <column>loc_issue_uom_qty</column>
     </data>
     <format builtin="true">qty</format>
     <tracktotal subtotal="true"/>
    </field>
    <field>
     <rect>
      <x>110</x>
      <y>5</y>
      <width>135</width>
      <height>17</height>
     </rect>
     <font>
      <face>Arial</face>
      <size>10</size>
      <weight>normal</weight>
     </font>
     <right/>
     <vcenter/>
     <data>
      <query>detail</query>
      <column>item_number</column>
     </data>
    </field>
    <label>
     <rect>
      <x>250</x>
      <y>5</y>
      <width>145</width>
      <height>17</height>
     </rect>
     <font>
      <face>Arial</face>
      <size>10</size>
      <weight>bold</weight>
     </font>
     <right/>
     <vcenter/>
     <string>Total, All Lot/Ser/Loc:</string>
    </label>
   </foot>
  </group>
  <detail>
   <key>
    <query>detail</query>
   </key>
   <height>29</height>
   <field>
    <rect>
     <x>250</x>
     <y>0</y>
     <width>145</width>
     <height>20</height>
    </rect>
    <font>
     <face>Arial</face>
     <size>10</size>
     <weight>normal</weight>
    </font>
    <right/>
    <vcenter/>
    <data>
     <query>detail</query>
     <column>formatlotserialnumber</column>
    </data>
   </field>
   <field>
    <rect>
     <x>490</x>
     <y>0</y>
     <width>70</width>
     <height>20</height>
    </rect>
    <font>
     <face>Arial</face>
     <size>10</size>
     <weight>normal</weight>
    </font>
    <right/>
    <vcenter/>
    <data>
     <query>detail</query>
     <column>location_reserved_qty</column>
    </data>
   </field>
   <field>
    <rect>
     <x>415</x>
     <y>0</y>
     <width>70</width>
     <height>20</height>
    </rect>
    <font>
     <face>Arial</face>
     <size>10</size>
     <weight>normal</weight>
    </font>
    <right/>
    <vcenter/>
    <data>
     <query>detail</query>
     <column>loc_issue_uom_fmt</column>
    </data>
   </field>
   <line>
    <xstart>745</xstart>
    <ystart>15</ystart>
    <xend>795</xend>
    <yend>15</yend>
    <weight>1</weight>
   </line>
   <field>
    <rect>
     <x>80</x>
     <y>0</y>
     <width>155</width>
     <height>20</height>
    </rect>
    <font>
     <face>Arial</face>
     <size>10</size>
     <weight>normal</weight>
    </font>
    <left/>
    <vcenter/>
    <data>
     <query>detail</query>
     <column>location_name</column>
    </data>
   </field>
   <field>
    <rect>
     <x>565</x>
     <y>0</y>
     <width>50</width>
     <height>20</height>
    </rect>
    <font>
     <face>Arial</face>
     <size>10</size>
     <weight>normal</weight>
    </font>
    <right/>
    <vcenter/>
    <data>
     <query>detail</query>
     <column>uom_name</column>
    </data>
   </field>
   <field>
    <rect>
     <x>635</x>
     <y>0</y>
     <width>85</width>
     <height>20</height>
    </rect>
    <font>
     <face>Arial</face>
     <size>10</size>
     <weight>normal</weight>
    </font>
    <right/>
    <vcenter/>
    <data>
     <query>detail</query>
     <column>expiration</column>
    </data>
   </field>
  </detail>
 </section>
 <pgfoot>
  <height>29</height>
  <label>
   <rect>
    <x>330</x>
    <y>5</y>
    <width>90</width>
    <height>17</height>
   </rect>
   <font>
    <face>Arial</face>
    <size>8</size>
    <weight>normal</weight>
   </font>
   <right/>
   <top/>
   <string>Sales Order #:</string>
  </label>
  <label>
   <rect>
    <x>10</x>
    <y>5</y>
    <width>62</width>
    <height>17</height>
   </rect>
   <font>
    <face>Arial</face>
    <size>8</size>
    <weight>normal</weight>
   </font>
   <left/>
   <top/>
   <string>Print Date: </string>
  </label>
  <field>
   <rect>
    <x>750</x>
    <y>5</y>
    <width>45</width>
    <height>17</height>
   </rect>
   <font>
    <face>Arial</face>
    <size>8</size>
    <weight>normal</weight>
   </font>
   <left/>
   <top/>
   <data>
    <query>Context Query</query>
    <column>page_number</column>
   </data>
  </field>
  <field>
   <rect>
    <x>430</x>
    <y>5</y>
    <width>80</width>
    <height>17</height>
   </rect>
   <font>
    <face>Arial</face>
    <size>8</size>
    <weight>normal</weight>
   </font>
   <left/>
   <top/>
   <data>
    <query>head</query>
    <column>cohead_number</column>
   </data>
  </field>
  <label>
   <rect>
    <x>705</x>
    <y>5</y>
    <width>37</width>
    <height>17</height>
   </rect>
   <font>
    <face>Arial</face>
    <size>8</size>
    <weight>normal</weight>
   </font>
   <right/>
   <top/>
   <string>Page:</string>
  </label>
  <field>
   <rect>
    <x>70</x>
    <y>5</y>
    <width>95</width>
    <height>17</height>
   </rect>
   <font>
    <face>Arial</face>
    <size>8</size>
    <weight>normal</weight>
   </font>
   <left/>
   <top/>
   <data>
    <query>Context Query</query>
    <column>report_date</column>
   </data>
  </field>
 </pgfoot>
 <rptfoot>
  <height>94</height>
  <line>
   <xstart>0</xstart>
   <ystart>0</ystart>
   <xend>203</xend>
   <yend>0</yend>
   <weight>2</weight>
  </line>
  <label>
   <rect>
    <x>10</x>
    <y>0</y>
    <width>160</width>
    <height>35</height>
   </rect>
   <font>
    <face>Arial</face>
    <size>14</size>
    <weight>bold</weight>
   </font>
   <left/>
   <vcenter/>
   <string>Completed By:</string>
  </label>
  <text>
   <rect>
    <x>215</x>
    <y>35</y>
    <width>580</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>cohead_shipcomments</column>
   </data>
  </text>
  <line>
   <xstart>202</xstart>
   <ystart>0</ystart>
   <xend>203</xend>
   <yend>55</yend>
   <weight>2</weight>
  </line>
  <line>
   <xstart>155</xstart>
   <ystart>25</ystart>
   <xend>195</xend>
   <yend>25</yend>
   <weight>0</weight>
  </line>
  <label>
   <rect>
    <x>215</x>
    <y>10</y>
    <width>85</width>
    <height>17</height>
   </rect>
   <font>
    <face>Arial</face>
    <size>10</size>
    <weight>normal</weight>
   </font>
   <left/>
   <vcenter/>
   <string>Order Notes:</string>
  </label>
  <label>
   <rect>
    <x>10</x>
    <y>25</y>
    <width>165</width>
    <height>30</height>
   </rect>
   <font>
    <face>Arial</face>
    <size>14</size>
    <weight>bold</weight>
   </font>
   <left/>
   <vcenter/>
   <string>Checked By:</string>
  </label>
  <line>
   <xstart>155</xstart>
   <ystart>50</ystart>
   <xend>195</xend>
   <yend>50</yend>
   <weight>0</weight>
  </line>
  <line>
   <xstart>0</xstart>
   <ystart>55</ystart>
   <xend>203</xend>
   <yend>55</yend>
   <weight>2</weight>
  </line>
 </rptfoot>
</report>
