289	taxAuthorities	detail	 \n Copyright (c) 1999-2014 by OpenMFG LLC, d/b/a xTuple.\n See www.xtuple.com/CPAL for the full text of the software license.\n	-- Group: taxAuthorities\n-- Name:  detail\n-- Notes: \n-- Copyright (c) 1999-2014 by OpenMFG LLC, d/b/a xTuple.\n-- See www.xtuple.com/CPAL for the full text of the software license.\n\nSELECT \n  taxauth_id, taxauth_code, taxauth_name,\n  addr.*\nFROM taxauth\n  LEFT OUTER JOIN addr ON (taxauth_addr_id=addr_id) \nWHERE true\n<? if exists("search_pattern") ?>\n  AND ((taxauth_code ~* <? value("search_pattern") ?>)\n       OR (taxauth_name ~* <? value("search_pattern") ?>)\n       OR (COALESCE(addr_line1,'') || ' ' || COALESCE(addr_line2,'') || ' ' || COALESCE(addr_line3,'') ~* <? value("search_pattern") ?>)\n       OR (COALESCE(addr_city,'') ~* <? value("search_pattern") ?>)\n       OR (COALESCE(addr_state,'') ~* <? value("search_pattern") ?>)\n       OR (COALESCE(addr_postalcode,'') ~* <? value("search_pattern") ?>)\n       OR (COALESCE(addr_country,'') ~* <? value("search_pattern") ?>))\n<? endif ?>\n<? if exists("taxauth_code_pattern") ?>\n  AND (taxauth_code ~* <? value("taxauth_code_pattern") ?>)\n<? endif ?>\n<? if exists("taxauth_name_pattern") ?>\n  AND (taxauth_name ~* <? value("taxauth_name_pattern") ?>)\n<? endif ?>\n<? if exists("addr_street_pattern") ?>\n  AND (COALESCE(addr_line1,'') || ' ' || COALESCE(addr_line2,'') || ' ' || COALESCE(addr_line3,'') ~* <? value("addr_street_pattern") ?>)\n<? endif ?>\n<? if exists("addr_city_pattern") ?>\n  AND (COALESCE(addr_city,'') ~* <? value("addr_city_pattern") ?>)\n<? endif ?>\n<? if exists("addr_state_pattern") ?>\n  AND (COALESCE(addr_state,'') ~* <? value("addr_state_pattern") ?>)\n<? endif ?>\n<? if exists("addr_postalcode_pattern") ?>\n  AND (COALESCE(addr_postalcode,'') ~* <? value("addr_postalcode_pattern") ?>)\n<? endif ?>\n<? if exists("addr_country_pattern") ?>\n  AND (COALESCE(addr_country,'') ~* <? value("addr_country_pattern") ?>)\n<? endif ?>\nORDER BY taxauth_code; \n	admin	2015-10-01	0
290	timePhasedAvailability	detail	 used by dspTimePhasedAvailability\n Copyright (c) 1999-2014 by OpenMFG LLC, d/b/a xTuple.\n See www.xtuple.com/CPAL for the full text of the software license.\n	-- Group: timePhasedAvailability\n-- Name: detail\n-- Notes: used by dspTimePhasedAvailability\n-- Copyright (c) 1999-2014 by OpenMFG LLC, d/b/a xTuple.\n-- See www.xtuple.com/CPAL for the full text of the software license.\n\nSELECT itemsite_id, itemtype,\n       item_number, uom_name, warehous_code,\n       reorderlevel \n       <? foreach("period_id_list") ?>\n         , bucket_<? literal("period_id_list") ?>,\n         'qty' AS bucket_<? literal("period_id_list") ?>_xtnumericrole,\n         CASE WHEN (bucket_<? literal("period_id_list") ?> < reorderlevel) THEN 'error' END AS   bucket_<? literal("period_id_list") ?>_qtforegroundrole \n       <? endforeach ?>\n FROM (SELECT itemsite_id,\n       CASE WHEN (item_type IN ('F', 'B', 'C', 'Y', 'R')) THEN 0\n            WHEN (item_type IN ('M')) THEN 1\n            WHEN (item_type IN ('P', 'O')) THEN 2\n            ELSE 0\n            END AS itemtype,\n            item_number, uom_name, warehous_code,\n            CASE WHEN(itemsite_useparams) THEN itemsite_reorderlevel ELSE 0.0 END AS reorderlevel \n\n       <? foreach("period_id_list") ?>\n       , qtyAvailable(itemsite_id, findPeriodStart(<? value("period_id_list") ?>)) AS bucket_<?  literal("period_id_list") ?> \n       <? endforeach ?>\n FROM itemsite, item, whsinfo, uom\n  WHERE ((itemsite_item_id=item_id)\n   AND (item_inv_uom_id=uom_id) \n   AND (itemsite_warehous_id=warehous_id) \n  <? if exists("warehous_id") ?>\n     AND (itemsite_warehous_id=<? value("warehous_id") ?>) \n  <? endif ?>\n  <? if exists("plancode_id") ?> \n     AND (itemsite_plancode_id=<? value("plancode_id") ?>)\n   <? elseif exists("plancode_pattern") ?>\n     AND (itemsite_plancode_id IN (SELECT plancode_id FROM plancode WHERE (plancode_code ~         <?value("plancode_pattern") ?>)))\n <? endif ?>  \n )) AS data\n  ORDER BY item_number;\n	admin	2015-10-01	0
291	timePhasedBookings	detail	 \n Copyright (c) 1999-2014 by OpenMFG LLC, d/b/a xTuple.\n See www.xtuple.com/CPAL for the full text of the software license.\n	-- Group: timePhasedBookings\n-- Name: detail\n-- Notes: \n-- Copyright (c) 1999-2014 by OpenMFG LLC, d/b/a xTuple.\n-- See www.xtuple.com/CPAL for the full text of the software license.\n\nSELECT\n<? if exists("byCust") ?>\n  cust_id, cust_number, cust_name, \n<? elseif exists("byProdcat") ?>\n  prodcat_id, prodcat_code, prodcat_descrip,\n<? elseif exists("byItem") ?>\n  item_id, item_number, item_descrip1,\n<? endif ?>\n  uom, warehous_code\n-- Loop through each period bucket to find bookings for period\n<? foreach("period_id_list") ?>\n             , SUM(CASE WHEN (cohead_orderdate BETWEEN findPeriodStart(<? value("period_id_list") ?>) AND findPeriodEnd(<? value("period_id_list") ?>)) THEN\n                 amount ELSE 0 END) AS bucket_<? literal("period_id_list") ?>,\n  <? if exists("salesDollars") ?>\n             'curr' AS bucket_<? literal("period_id_list") ?>_xtnumericrole, \n             0 AS bucket_<? literal("period_id_list") ?>_xttotalrole\n  <? else ?>\n             'qty' AS bucket_<? literal("period_id_list") ?>_xtnumericrole, \n             0 AS bucket_<? literal("period_id_list") ?>_xttotalrole \n  <? endif ?>\n<? endforeach ?>\nFROM ( \n  SELECT cohead_orderdate,\n<? if exists("byCust") ?>\n         cust_id, cust_number, cust_name\n<? elseif exists("byProdcat") ?>\n         prodcat_id, prodcat_code, prodcat_descrip\n<? elseif exists("byItem") ?>\n         item_id, item_number, item_descrip1\n<? endif ?>\n       , warehous_code\n<? if exists("salesDollars") ?>\n       , round((coitem_qtyord * coitem_qty_invuomratio) * (currtobase(cohead_curr_id, coitem_price, cohead_orderdate) / coitem_price_invuomratio), 2) AS amount\n       , <? value("baseCurrAbbr") ?>::text AS uom\n<? else ?>\n       , coitem_qtyord\n  <? if exists("capacityUnits") ?>\n       * itemcapinvrat(itemsite_item_id)\n  <? elseif exists("altCapacityUnits") ?>\n       * itemaltcapinvrat(itemsite_item_id)\n  <? endif ?>\n         AS amount\n  <? if exists("inventoryUnits") ?>\n       , uom_name AS uom\n  <? elseif exists("capacityUnits") ?>\n       , itemcapuom(item_id) AS uom\n  <? elseif exists("altCapacityUnits") ?>\n       , itemaltcapuom(item_id) AS uom\n  <? endif ?>\n<? endif ?>\n  FROM coitem\n   JOIN cohead ON (coitem_cohead_id=cohead_id)\n   JOIN itemsite ON (coitem_itemsite_id=itemsite_id)\n   JOIN item ON (itemsite_item_id=item_id)\n<? if exists("inventoryUnits") ?>\n   JOIN uom ON (item_inv_uom_id=uom_id)\n<? endif ?>\n   JOIN site() ON (itemsite_warehous_id=warehous_id)\n<? if reExists("[cC]ust") ?>\n   JOIN custinfo ON (cohead_cust_id=cust_id)\n<? endif ?> \n<? if reExists("[pP]rodcat") ?>\n   JOIN prodcat ON (item_prodcat_id=prodcat_id)\n<? endif ?>\n  WHERE ((coitem_status != 'X')\n    AND (cohead_orderdate BETWEEN \n<? foreach("period_id_list") ?>\n  <? if isFirst("period_id_list") ?>\n    findPeriodStart(<? value("period_id_list") ?>)\n  <? endif ?>\n  <? if isLast("period_id_list") ?>\n    AND findPeriodEnd(<? value("period_id_list") ?>)\n  <? endif ?>\n<? endforeach ?>)\n<? if exists("item_id") ?> \n    AND (item_id=<? value("item_id") ?>)\n<? endif ?>\n<? if exists("cust_id") ?> \n    AND (cust_id=<? value("cust_id") ?>)\n<? endif ?>\n<? if exists("custtype_id") ?> \n    AND (cust_custtype_id=<? value("custtype_id") ?>)\n<? endif ?>\n<? if exists("custtype_pattern") ?>\n    AND (cust_custtype_id IN (SELECT custtype_id \n                              FROM custtype \n                              WHERE (custtype_code ~ <? value("custtype_pattern") ?>)))\n<? endif ?>\n<? if exists("prodcat_id") ?> \n    AND (item_prodcat_id=<? value("prodcat_id") ?>) \n<? endif ?>\n<? if exists("prodcat_pattern") ?>\n    AND (item_prodcat_id IN (SELECT prodcat_id  \n                             FROM prodcat \n                             WHERE (prodcat_code ~ <? value("prodcat_pattern") ?>)))\n<? endif ?>\n<? if exists("warehous_id") ?> \n    AND(itemsite_warehous_id=<? value("warehous_id") ?>) \n<? endif ?>\n      )) data\nGROUP BY\n<? if exists("byCust") ?>\n  cust_id, cust_number, cust_name, \n<? elseif exists("byProdcat") ?>\n  prodcat_id, prodcat_code, prodcat_descrip,\n<? elseif exists("byItem") ?>\n  item_id, item_number, item_descrip1,\n<? endif ?>\n  uom, warehous_code\nORDER BY \n<? if exists("byCust") ?>\n  cust_number,\n<? elseif exists("byProdcat") ?>\n  prodcat_code,\n<? elseif exists("byItem") ?>\n  item_number,\n<? endif ?>\n  uom, warehous_code;\n	admin	2015-10-01	0
294	timePhasedSales	detail	 \n Copyright (c) 1999-2014 by OpenMFG LLC, d/b/a xTuple.\n See www.xtuple.com/CPAL for the full text of the software license.\n	-- Group: timePhasedSales\n-- Name: detail\n-- Notes: \n-- Copyright (c) 1999-2014 by OpenMFG LLC, d/b/a xTuple.\n-- See www.xtuple.com/CPAL for the full text of the software license.\n\nSELECT\n<? if exists("byCust") ?>\n  cust_id, cust_number, cust_name, \n<? elseif exists("byProdcat") ?>\n  prodcat_id, prodcat_code, prodcat_descrip,\n<? elseif exists("byItem") ?>\n  item_id, item_number, item_descrip1,\n<? endif ?>\n  uom, warehous_code\n-- Loop through each period bucket to find bookings for period\n<? foreach("period_id_list") ?>\n             , SUM(CASE WHEN (cohist_invcdate BETWEEN findPeriodStart(<? value("period_id_list") ?>) AND findPeriodEnd(<? value("period_id_list") ?>)) THEN\n                 amount ELSE 0 END) AS bucket_<? literal("period_id_list") ?>,\n  <? if exists("salesDollars") ?>\n             'curr' AS bucket_<? literal("period_id_list") ?>_xtnumericrole, \n             0 AS bucket_<? literal("period_id_list") ?>_xttotalrole\n  <? else ?>\n             'qty' AS bucket_<? literal("period_id_list") ?>_xtnumericrole, \n             0 AS bucket_<? literal("period_id_list") ?>_xttotalrole \n  <? endif ?>\n<? endforeach ?>\nFROM ( \n  SELECT cohist_invcdate,\n<? if exists("byCust") ?>\n         cust_id, cust_number, cust_name\n<? elseif exists("byProdcat") ?>\n         prodcat_id, prodcat_code, prodcat_descrip\n<? elseif exists("byItem") ?>\n         item_id, item_number, item_descrip1\n<? endif ?>\n       , warehous_code\n<? if exists("salesDollars") ?>\n       , round((cohist_qtyshipped * currtobase(cohist_curr_id, cohist_unitprice, cohist_invcdate)), 2) AS amount\n       , <? value("baseCurrAbbr") ?>::text AS uom\n<? else ?>\n       , cohist_qtyshipped\n  <? if exists("capacityUnits") ?>\n       * itemcapinvrat(itemsite_item_id)\n  <? elseif exists("altCapacityUnits") ?>\n       * itemaltcapinvrat(itemsite_item_id)\n  <? endif ?>\n         AS amount\n  <? if exists("inventoryUnits") ?>\n       , uom_name AS uom\n  <? elseif exists("capacityUnits") ?>\n       , itemcapuom(item_id) AS uom\n  <? elseif exists("altCapacityUnits") ?>\n       , itemaltcapuom(item_id) AS uom\n  <? endif ?>\n<? endif ?>\n  FROM cohist JOIN itemsite ON (itemsite_id=cohist_itemsite_id)\n              JOIN item ON (item_id=itemsite_item_id)\n<? if exists("inventoryUnits") ?>\n   JOIN uom ON (item_inv_uom_id=uom_id)\n<? endif ?>\n   JOIN site() ON (itemsite_warehous_id=warehous_id)\n<? if reExists("[cC]ust") ?>\n   JOIN custinfo ON (cohist_cust_id=cust_id)\n<? endif ?> \n<? if reExists("custgrp") ?>\n   JOIN custgrpitem ON (cohist_cust_id=custgrpitem_cust_id)\n   JOIN custgrp ON (custgrp_id=custgrpitem_custgrp_id)\n<? endif ?> \n<? if reExists("[pP]rodcat") ?>\n   JOIN prodcat ON (item_prodcat_id=prodcat_id)\n<? endif ?>\n  WHERE ((cohist_invcdate BETWEEN \n<? foreach("period_id_list") ?>\n  <? if isFirst("period_id_list") ?>\n    findPeriodStart(<? value("period_id_list") ?>)\n  <? endif ?>\n  <? if isLast("period_id_list") ?>\n    AND findPeriodEnd(<? value("period_id_list") ?>)\n  <? endif ?>\n<? endforeach ?>)\n<? if exists("item_id") ?> \n    AND (item_id=<? value("item_id") ?>)\n<? endif ?>\n<? if exists("cust_id") ?> \n    AND (cust_id=<? value("cust_id") ?>)\n<? endif ?>\n<? if exists("custtype_id") ?> \n    AND (cust_custtype_id=<? value("custtype_id") ?>)\n<? endif ?>\n<? if exists("custtype_pattern") ?>\n    AND (cust_custtype_id IN (SELECT custtype_id \n                              FROM custtype \n                              WHERE (custtype_code ~ <? value("custtype_pattern") ?>)))\n<? endif ?>\n<? if exists("prodcat_id") ?> \n    AND (item_prodcat_id=<? value("prodcat_id") ?>) \n<? endif ?>\n<? if exists("prodcat_pattern") ?>\n    AND (item_prodcat_id IN (SELECT prodcat_id  \n                             FROM prodcat \n                             WHERE (prodcat_code ~ <? value("prodcat_pattern") ?>)))\n<? endif ?>\n<? if exists("custgrp_id") ?> \n    AND (custgrp_id=<? value("custgrp_id") ?>) \n<? endif ?>\n<? if exists("custgrp_pattern") ?>\n    AND (custgrp_name  ~ <? value("custgrp_pattern") ?>)\n<? endif ?>\n<? if exists("warehous_id") ?> \n    AND(itemsite_warehous_id=<? value("warehous_id") ?>) \n<? endif ?>\n      )) data\nGROUP BY\n<? if exists("byCust") ?>\n  cust_id, cust_number, cust_name, \n<? elseif exists("byProdcat") ?>\n  prodcat_id, prodcat_code, prodcat_descrip,\n<? elseif exists("byItem") ?>\n  item_id, item_number, item_descrip1,\n<? endif ?>\n  uom, warehous_code\nORDER BY \n<? if exists("byCust") ?>\n  cust_number,\n<? elseif exists("byProdcat") ?>\n  prodcat_code,\n<? elseif exists("byItem") ?>\n  item_number,\n<? endif ?>\n  uom, warehous_code;\n	admin	2015-10-01	0
295	timePhasedUsageStatisticsByItem	detail	 used by dspTimePhasedUsageStatisticsByItem\n Copyright (c) 1999-2014 by OpenMFG LLC, d/b/a xTuple.\n See www.xtuple.com/CPAL for the full text of the software license.\n	-- Group: timePhasedUsageStatisticsByItem\n-- Name: detail\n-- Notes: used by dspTimePhasedUsageStatisticsByItem\n-- Copyright (c) 1999-2014 by OpenMFG LLC, d/b/a xTuple.\n-- See www.xtuple.com/CPAL for the full text of the software license.\n\n\nSELECT itemsite_id, <? value("received") ?> AS label, warehous_code\n     <? foreach("period_id_list") ?>\n       , summTransR(itemsite_id, <? value("period_id_list") ?>) AS bucket_<? literal("period_id_list") ?>\n     <? endforeach ?>\nFROM itemsite, whsinfo\nWHERE ((itemsite_warehous_id=warehous_id)\n<? if exists("item_id") ?>\n   AND (itemsite_item_id=<? value("item_id") ?>)\n<? endif ?>\n<? if exists("warehous_id") ?>\n   AND (itemsite_warehous_id=<? value("warehous_id") ?>)\n<? endif ?>\n      )\nUNION ALL\nSELECT itemsite_id, <? value("issued") ?> AS label, warehous_code\n     <? foreach("period_id_list") ?>\n       , summTransI(itemsite_id, <? value("period_id_list") ?>) AS bucket_<? literal("period_id_list") ?>\n     <? endforeach ?>\nFROM itemsite, whsinfo\nWHERE ((itemsite_warehous_id=warehous_id)\n<? if exists("item_id") ?>\n   AND (itemsite_item_id=<? value("item_id") ?>)\n<? endif ?>\n<? if exists("warehous_id") ?>\n   AND (itemsite_warehous_id=<? value("warehous_id") ?>)\n<? endif ?>\n      )\nUNION ALL\nSELECT itemsite_id, <? value("sold") ?> AS label, warehous_code\n     <? foreach("period_id_list") ?>\n       , summTransS(itemsite_id, <? value("period_id_list") ?>) AS bucket_<? literal("period_id_list") ?>\n     <? endforeach ?>\nFROM itemsite, whsinfo\nWHERE ((itemsite_warehous_id=warehous_id)\n<? if exists("item_id") ?>\n   AND (itemsite_item_id=<? value("item_id") ?>)\n<? endif ?>\n<? if exists("warehous_id") ?>\n   AND (itemsite_warehous_id=<? value("warehous_id") ?>)\n<? endif ?>\n      )\nUNION ALL\nSELECT itemsite_id, <? value("scrap") ?> AS label, warehous_code\n     <? foreach("period_id_list") ?>\n       , summTransC(itemsite_id, <? value("period_id_list") ?>) AS bucket_<? literal("period_id_list") ?>\n     <? endforeach ?>\nFROM itemsite, whsinfo\nWHERE ((itemsite_warehous_id=warehous_id)\n<? if exists("item_id") ?>\n   AND (itemsite_item_id=<? value("item_id") ?>)\n<? endif ?>\n<? if exists("warehous_id") ?>\n   AND (itemsite_warehous_id=<? value("warehous_id") ?>)\n<? endif ?>\n      )\nUNION ALL\nSELECT itemsite_id, <? value("adjustments") ?> AS label, warehous_code\n     <? foreach("period_id_list") ?>\n       , summTransA(itemsite_id, <? value("period_id_list") ?>) AS bucket_<? literal("period_id_list") ?>\n     <? endforeach ?>\nFROM itemsite, whsinfo\nWHERE ((itemsite_warehous_id=warehous_id)\n<? if exists("item_id") ?>\n   AND (itemsite_item_id=<? value("item_id") ?>)\n<? endif ?>\n<? if exists("warehous_id") ?>\n   AND (itemsite_warehous_id=<? value("warehous_id") ?>)\n<? endif ?>\n      )\nORDER BY warehous_code;\n	admin	2015-10-01	0
127	updateprices	update	\n Notes:\n Copyright (c) 1999-2014 by OpenMFG LLC, d/b/a xTuple.\n See www.xtuple.com/CPAL for the full text of the software license.\n	-- Group: updateprices\n-- Name: update\n-- Notes:\n-- Notes:\n-- Copyright (c) 1999-2014 by OpenMFG LLC, d/b/a xTuple.\n-- See www.xtuple.com/CPAL for the full text of the software license.\n\n<? if exists("nominal") ?>\nUPDATE ipsiteminfo SET\n  ipsitem_price=\n<? if exists("updateByValue") ?>\n  ipsitem_price + <? value("updateBy") ?>\n<? else ?>\n  roundSale(ipsitem_price * (1.0 + (<? value("updateBy") ?> / 100.0)))\n<? endif ?>\nFROM selsched, item\n<? if reExists("itemgrp") ?>\n  JOIN itemgrpitem ON (itemgrpitem_item_id=item_id)\n  JOIN itemgrp ON (itemgrpitem_itemgrp_id=itemgrp_id)\n<? elseif reExists("prodcat") ?>\n  JOIN prodcat ON (prodcat_id=item_prodcat_id)\n<? endif ?>\nWHERE ( ipsitem_item_id=item_id\n  AND selsched_ipshead_id=ipsitem_ipshead_id\n  AND ipsitem_type='N'\n<? if exists("item_id") ?>\n  AND item_id=<? value("item_id") ?>\n<? elseif exists("itemgrp_id") ?>\n  AND itemgrp_id=<? value("itemgrp_id") ?>\n<? elseif exists("itemgrp_pattern") ?>\n  AND itemgrp_name ~ <? value("itemgrp_pattern") ?>\n<? elseif exists("prodcat_id") ?>\n  AND prodcat_id=<? value("prodcat_id") ?>\n<? elseif exists("prodcat_pattern") ?>\n  AND prodcat_code ~ <? value("prodcat_pattern") ?>\n<? endif ?>\n);\n<? endif ?>\n\n<? if exists("discount") ?>\nUPDATE ipsiteminfo SET\n  ipsitem_discntprcnt=\n<? if exists("updateByValue") ?>\n  ipsitem_discntprcnt + (<? value("updateBy") ?> / 100.0)\n<? else ?>\n  roundSale(ipsitem_discntprcnt * (1.0 + (<? value("updateBy") ?> / 100.0)))\n<? endif ?>\nFROM selsched, item\n<? if reExists("itemgrp") ?>\n  JOIN itemgrpitem ON (itemgrpitem_item_id=item_id)\n  JOIN itemgrp ON (itemgrpitem_itemgrp_id=itemgrp_id)\n<? elseif reExists("prodcat") ?>\n  JOIN prodcat ON (prodcat_id=item_prodcat_id)\n<? endif ?>\nWHERE ( ipsitem_item_id=item_id\n  AND selsched_ipshead_id=ipsitem_ipshead_id\n  AND ipsitem_type='D'\n<? if exists("item_id") ?>\n  AND item_id=<? value("item_id") ?>\n<? elseif exists("itemgrp_id") ?>\n  AND itemgrp_id=<? value("itemgrp_id") ?>\n<? elseif exists("itemgrp_pattern") ?>\n  AND itemgrp_name ~ <? value("itemgrp_pattern") ?>\n<? elseif exists("prodcat_id") ?>\n  AND prodcat_id=<? value("prodcat_id") ?>\n<? elseif exists("prodcat_pattern") ?>\n  AND prodcat_code ~ <? value("prodcat_pattern") ?>\n<? endif ?>\n);\n<? endif ?>\n\n<? if exists("markup") ?>\nUPDATE ipsiteminfo SET\n  ipsitem_discntprcnt=\n<? if exists("updateByValue") ?>\n  ipsitem_discntprcnt + (<? value("updateBy") ?> / 100.0)\n<? else ?>\n  roundSale(ipsitem_discntprcnt * (1.0 + (<? value("updateBy") ?> / 100.0)))\n<? endif ?>\nFROM selsched, item\n<? if reExists("itemgrp") ?>\n  JOIN itemgrpitem ON (itemgrpitem_item_id=item_id)\n  JOIN itemgrp ON (itemgrpitem_itemgrp_id=itemgrp_id)\n<? elseif reExists("prodcat") ?>\n  JOIN prodcat ON (prodcat_id=item_prodcat_id)\n<? endif ?>\nWHERE ( ipsitem_item_id=item_id\n  AND selsched_ipshead_id=ipsitem_ipshead_id\n  AND ipsitem_type='M'\n<? if exists("item_id") ?>\n  AND item_id=<? value("item_id") ?>\n<? elseif exists("itemgrp_id") ?>\n  AND itemgrp_id=<? value("itemgrp_id") ?>\n<? elseif exists("itemgrp_pattern") ?>\n  AND itemgrp_name ~ <? value("itemgrp_pattern") ?>\n<? elseif exists("prodcat_id") ?>\n  AND prodcat_id=<? value("prodcat_id") ?>\n<? elseif exists("prodcat_pattern") ?>\n  AND prodcat_code ~ <? value("prodcat_pattern") ?>\n<? endif ?>\n);\n<? endif ?>\n	admin	2015-10-01	0
298	unbalancedQOHByClassCode	detail	 used by dspUnbalancedQOHByClassCode\n Copyright (c) 1999-2014 by OpenMFG LLC, d/b/a xTuple.\n See www.xtuple.com/CPAL for the full text of the software license.\n	-- Group: unbalancedQOHByClassCode\n-- Name: detail\n-- Notes: used by dspUnbalancedQOHByClassCode\n-- Copyright (c) 1999-2014 by OpenMFG LLC, d/b/a xTuple.\n-- See www.xtuple.com/CPAL for the full text of the software license.\n\nSELECT itemsite_id, warehous_code, item_number,\n       (item_descrip1 || ' ' || item_descrip2) AS itemdescrip, uom_name,\n       itemsite_qtyonhand,\n       detailedQOH(itemsite_id, FALSE) AS detailedqoh,\n       'qty' AS itemsite_qtyonhand_xtnumericrole,\n       'qty' AS detailedqoh_xtnumericrole\nFROM whsinfo, item, itemsite, uom\nWHERE ( (itemsite_item_id=item_id)\n    AND (item_inv_uom_id=uom_id)\n    AND (itemsite_warehous_id=warehous_id)\n    AND ((itemsite_loccntrl) OR (itemsite_controlmethod IN ('L', 'S')))\n    AND (itemsite_qtyonhand <> detailedQOH(itemsite_id, FALSE))\n<? if exists("classcode_id") ?>\n    AND (item_classcode_id=<? value("classcode_id") ?>)\n<? elseif exists("classcode_pattern") ?>\n    AND (item_classcode_id IN (SELECT classcode_id\n                               FROM classcode\n                               WHERE (classcode_code ~ <? value("classcode_pattern") ?>)))\n<? endif ?>\n<? if exists("warehous_id") ?>\n    AND (warehous_id=<? value("warehous_id") ?>)\n<? endif ?>\n      )\nORDER BY item_number;\n	admin	2015-10-01	0
299	undefinedManufacturedItems	detail	 used by dspUndefinedManufacturedItems\n Copyright (c) 1999-2014 by OpenMFG LLC, d/b/a xTuple.\n See www.xtuple.com/CPAL for the full text of the software license.\n	-- Group: undefinedManufacturedItems\n-- Name: detail\n-- Notes: used by dspUndefinedManufacturedItems\n-- Copyright (c) 1999-2014 by OpenMFG LLC, d/b/a xTuple.\n-- See www.xtuple.com/CPAL for the full text of the software license.\n\nSELECT item_id, 2, item_number, (item_descrip1 || ' ' || item_descrip2) AS itemdescrip,\n       item_type, item_active, <? value("noBom") ?> AS exception\nFROM item\nWHERE ((item_type IN ('M', 'F'))\n   AND (item_id NOT IN (SELECT DISTINCT bomitem_parent_item_id\n                        FROM bomitem))\n<? if exists("notshowInactive") ?>\n   AND (item_active)\n<? endif ?>\n      )\nORDER BY item_number;\n	admin	2015-10-01	0
300	uninvoicedReceivings	detail	 used by dspUninvoicedReceivings\n Copyright (c) 1999-2014 by OpenMFG LLC, d/b/a xTuple.\n See www.xtuple.com/CPAL for the full text of the software license.\n	-- Group: uninvoicedReceivings\n-- Name: detail\n-- Notes: used by dspUninvoicedReceivings\n-- Copyright (c) 1999-2014 by OpenMFG LLC, d/b/a xTuple.\n-- See www.xtuple.com/CPAL for the full text of the software license.\n\nSELECT recv_id AS id,\n       CASE WHEN(poitem_status='C') THEN 2\n            ELSE 1\n       END AS doctype,\n       recv_date AS thedate,\n       recv_trans_usr_name AS f_user,\n       recv_order_number AS ponumber, poitem_linenumber,\n       vend_name,\n       COALESCE(item_number,\n       ('Misc. - ' || recv_vend_item_number)) AS itemnumber,\n       recv_qty AS qty, 'qty' AS qty_xtnumericrole,\n       'Receipt' AS type,\n       recv_value AS value,\n       'curr' AS value_xtnumericrole, 0 AS value_xttotalrole\nFROM recv, vendinfo,\n     poitem LEFT OUTER JOIN (itemsite JOIN item ON (itemsite_item_id=item_id))\n            ON (poitem_itemsite_id=itemsite_id)\nWHERE ((recv_orderitem_id=poitem_id)\n   AND (recv_order_type='PO')\n   AND (recv_vend_id=vend_id)\n   AND (recv_posted)\n   AND (recv_vohead_id IS NULL)\n   AND (NOT recv_invoiced)\n<? if exists("warehous_id") ?>\n   AND (itemsite_warehous_id=<? value("warehous_id") ?>)\n<? endif ?>\n<? if exists("agentUsername") ?>\n   AND (recv_agent_username=<? value("agentUsername") ?>)\n<? endif ?>\n      )\n\nUNION\n\nSELECT poreject_id AS id,\n       3 AS doctype,\n       poreject_date AS thedate,\n       poreject_trans_username AS f_user,\n       poreject_ponumber AS ponumber, poitem_linenumber,\n       vend_name,\n       COALESCE(item_number,\n       ('Misc. - ' || poreject_vend_item_number)) AS itemnumber,\n       poreject_qty, 'qty' AS qty_xtnumericrole,\n       'Return' AS type,\n       poreject_value * -1 AS value,\n       'curr' AS value_xtnumericrole, 0 AS value_xtotalrole\nFROM poreject, vendinfo,\n     poitem LEFT OUTER JOIN (itemsite JOIN item ON (itemsite_item_id=item_id))\n            ON (poitem_itemsite_id=itemsite_id)\nWHERE ((poreject_poitem_id=poitem_id)\n   AND (poreject_vend_id=vend_id)\n   AND (poreject_posted)\n   AND (NOT poreject_invoiced)\n<? if exists("warehous_id") ?>\n   AND (itemsite_warehous_id=<? value("warehous_id") ?>)\n<? endif ?>\n<? if exists("agentUsername") ?>\n   AND (poreject_agent_username=<? value("agentUsername") ?>)\n<? endif ?>\n      )\nORDER BY ponumber, poitem_linenumber;\n	admin	2015-10-01	0
460	uninvoicedShipments	detail	 used by uninvoicedShipments\n Copyright (c) 1999-2014 by OpenMFG LLC, d/b/a xTuple.\n See www.xtuple.com/CPAL for the full text of the software license.\n	-- Group: uninvoicedShipments\n-- Name: detail\n-- Notes: used by uninvoicedShipments\n-- Copyright (c) 1999-2014 by OpenMFG LLC, d/b/a xTuple.\n-- See www.xtuple.com/CPAL for the full text of the software license.\n\nSELECT cohead_id, shipitem_id, cohead_number, coitem_linenumber,\n       cust_number, cust_name,\n       item_number, description,\n       uom_name, shipped, selected,\n       CASE WHEN (level=0) THEN cohead_number\n            ELSE CAST(coitem_linenumber AS TEXT)\n       END AS orderline,\n       CASE WHEN (level=0) THEN cust_number\n            ELSE item_number\n       END AS custitem,\n       CASE WHEN (level=0) THEN cust_name\n            ELSE description\n       END AS custdescrip,\n       'qty' AS shipped_xtnumericrole,\n       'qty' AS selected_xtnumericrole,\n       level AS xtindentrole\nFROM (\nSELECT cohead_id, -1 AS shipitem_id, cohead_number, -1 AS coitem_linenumber, 0 AS level,\n       cust_number, cust_name,\n       '' AS item_number, '' AS description,\n       '' AS uom_name,\n       COALESCE(SUM(shipitem_qty), 0) AS shipped,\n       COALESCE(SUM(cobill_qty), 0) AS selected\nFROM cohead, custinfo, itemsite, item, whsinfo, shipitem, shiphead, uom,\n     coitem LEFT OUTER JOIN\n      ( cobill JOIN cobmisc\n        ON ( (cobill_cobmisc_id=cobmisc_id) AND (NOT cobmisc_posted) ) )\n     ON (cobill_coitem_id=coitem_id)\nWHERE ( (cohead_cust_id=cust_id)\n AND (shipitem_orderitem_id=coitem_id)\n AND (shipitem_shiphead_id=shiphead_id)\n AND (shiphead_order_type='SO')\n AND (coitem_cohead_id=cohead_id)\n AND (coitem_itemsite_id=itemsite_id)\n AND (coitem_qty_uom_id=uom_id)\n AND (itemsite_item_id=item_id)\n AND (itemsite_warehous_id=warehous_id)\n AND (shiphead_shipped)\n AND (NOT shipitem_invoiced)\n<? if exists("warehous_id") ?>\n AND (itemsite_warehous_id=<? value("warehous_id") ?>)\n<? endif ?>\n  )\nGROUP BY cohead_id, cohead_number, cust_number, cust_name\n\nUNION\nSELECT cohead_id, shipitem_id, cohead_number, coitem_linenumber, 1 AS level,\n       cust_number, cust_name,\n       item_number, (item_descrip1 || ' ' || item_descrip2) AS description,\n       uom_name,\n       COALESCE(SUM(shipitem_qty), 0) AS shipped,\n       COALESCE(SUM(cobill_qty), 0) AS selected\nFROM cohead, custinfo, itemsite, item, whsinfo, shipitem, shiphead, uom,\n     coitem LEFT OUTER JOIN\n      ( cobill JOIN cobmisc\n        ON ( (cobill_cobmisc_id=cobmisc_id) AND (NOT cobmisc_posted) ) )\n     ON (cobill_coitem_id=coitem_id)\nWHERE ( (cohead_cust_id=cust_id)\n AND (shipitem_orderitem_id=coitem_id)\n AND (shipitem_shiphead_id=shiphead_id)\n AND (shiphead_order_type='SO')\n AND (coitem_cohead_id=cohead_id)\n AND (coitem_itemsite_id=itemsite_id)\n AND (coitem_qty_uom_id=uom_id)\n AND (itemsite_item_id=item_id)\n AND (itemsite_warehous_id=warehous_id)\n AND (shiphead_shipped)\n AND (NOT shipitem_invoiced)\n<? if exists("warehous_id") ?>\n AND (itemsite_warehous_id=<? value("warehous_id") ?>)\n<? endif ?>\n  )\nGROUP BY cohead_number, cust_number, cust_name,\n         coitem_id, coitem_linenumber, item_number,\n         item_descrip1, item_descrip2, cohead_id, shipitem_id, uom_name\n         \n   ) AS data\n\n<? if exists("showUnselected") ?>\n WHERE (selected = 0)\n<? endif ?>\n\nORDER BY cohead_number DESC, level, coitem_linenumber DESC;\n	admin	2015-10-01	0
88	unpostedCashReceipts	detail	 Used by arWorkBench, cashReceiptsEditList\n Copyright (c) 1999-2014 by OpenMFG LLC, d/b/a xTuple.\n See www.xtuple.com/CPAL for the full text of the software license.\n	-- Group: unpostedCashReceipts\n-- Name: detail\n-- Notes: Used by arWorkBench, cashReceiptsEditList\n-- Copyright (c) 1999-2014 by OpenMFG LLC, d/b/a xTuple.\n-- See www.xtuple.com/CPAL for the full text of the software license.\n\nSELECT DISTINCT\n       cashrcpt_id, \n       cashrcpt_number,\n       cust_number,\n       cust_name,\n       cashrcpt_docnumber, \n       bankaccnt_name,\n       cashrcpt_distdate,\n       cashrcpt_amount, \n       currConcat(cashrcpt_curr_id) AS currabbr,\n       CASE\n              WHEN (cashrcpt_fundstype ='C') THEN <? value("check") ?>\n              WHEN (cashrcpt_fundstype ='T') THEN <? value("certifiedCheck") ?>\n              WHEN (cashrcpt_fundstype ='M') THEN <? value("masterCard") ?>\n              WHEN (cashrcpt_fundstype ='V') THEN <? value("visa") ?>\n              WHEN (cashrcpt_fundstype ='A') THEN <? value("americanExpress") ?>\n              WHEN (cashrcpt_fundstype ='D') THEN <? value("discoverCard") ?>\n              WHEN (cashrcpt_fundstype ='O') THEN <? value("otherCreditCard") ?>\n              WHEN (cashrcpt_fundstype ='K') THEN <? value("cash") ?>\n              WHEN (cashrcpt_fundstype ='W') THEN <? value("wireTransfer") ?>\n              WHEN (cashrcpt_fundstype ='R') THEN <? value("other") ?>\n         END AS cashrcpt_fundstype,\n       'curr' AS cashrcpt_amount_xtnumericrole \nFROM cashrcpt, bankaccnt, custinfo\n<? if exists("custgrp_id") ?>\n  JOIN custgrpitem ON (custgrpitem_cust_id=cust_id)\n  JOIN custgrp ON (custgrp_id=custgrpitem_custgrp_id)\n<? endif ?>\n, custtype\nWHERE ( (NOT cashrcpt_posted)\n  AND   (NOT cashrcpt_void)\n  AND   (cashrcpt_bankaccnt_id=bankaccnt_id)\n  AND   (cashrcpt_cust_id=cust_id)\n  AND   (cust_custtype_id=custtype_id)\n<? if exists("cust_id") ?>\n  AND   (cashrcpt_cust_id=<? value("cust_id") ?>)\n<? endif ?>\n<? if exists("custgrp_id") ?>\n  AND  (custgrp_id=<? value("custgrp_id") ?>)\n<? endif ?>\n<? if exists("custtype_id") ?>\n  AND   (custtype_id=<? value("custtype_id") ?>)\n<? endif ?>\n<? if exists("custtype_pattern") ?>\n  AND   (custtype_code~<? value("custtype_pattern") ?>)\n<? endif ?>\n)\nORDER BY cashrcpt_distdate;\n\n	admin	2015-10-01	0
89	unpostedReceipts	detail	 used by unpostedPoReceipts\n-------PURCHASE ORDERS----------\n Copyright (c) 1999-2014 by OpenMFG LLC, d/b/a xTuple.\n See www.xtuple.com/CPAL for the full text of the software license.\n	-- Group: unpostedReceipts\n-- Name: detail\n-- Notes: used by unpostedPoReceipts\n---------PURCHASE ORDERS----------\n-- Copyright (c) 1999-2014 by OpenMFG LLC, d/b/a xTuple.\n-- See www.xtuple.com/CPAL for the full text of the software license.\n\nSELECT recv_id, recv_orderitem_id, recv_order_number, recv_order_type,\n       vend_name AS orderhead_from,\n       poitem_linenumber AS orderitem_linenumber,\n       formatDate(recv_duedate) AS recv_duedate,\n       warehous_code,\n       COALESCE(item_number, <? value("nonInventory") ?>) AS item_number,\n       COALESCE(uom_name, <? value("na") ?>) AS uom_name,\n       recv_vend_item_number,\n       recv_vend_uom,\n       poitem_qty_ordered AS orderitem_qty_ordered, \n       poitem_qty_received AS orderitem_qty_received,\n       recv_qty, recv_date,\n       COALESCE(recv_gldistdate, recv_date) AS recv_gldistdate,\n       'qty' AS orderitem_qty_ordered_xtnumericrole,\n       'qty' AS orderitem_qty_received_xtnumericrole,\n       'qty' AS recv_qty_xtnumericrole\nFROM pohead JOIN\n     poitem ON (poitem_pohead_id=pohead_id) JOIN \n     recv  ON ((recv_orderitem_id=poitem_id)\n\t   AND (recv_order_type='PO')) LEFT OUTER JOIN\n     (itemsite JOIN item ON (itemsite_item_id=item_id)\n\t       JOIN uom ON (item_inv_uom_id=uom_id)\n               JOIN site() ON (itemsite_warehous_id=warehous_id)\n       )\n      ON (recv_itemsite_id=itemsite_id) JOIN\n     vendinfo ON (pohead_vend_id=vend_id)\nWHERE (NOT recv_posted)\n<? if exists ("EnableReturnAuth") ?>\n-------RETURN AUTHORIZATIONS--------------\nUNION\nSELECT recv_id, recv_orderitem_id, recv_order_number, recv_order_type,\n       cust_name AS orderhead_from,\n       raitem_linenumber AS orderitem_linenumber,\n       formatDate(recv_duedate) AS recv_duedate,\n       warehous_code,\n       COALESCE(item_number, <? value("nonInventory") ?>) AS item_number,\n       COALESCE(uom_name, <? value("na") ?>) AS uom_name,\n       recv_vend_item_number,\n       recv_vend_uom,\n       raitem_qtyauthorized AS orderitem_qty_ordered, \n       raitem_qtyreceived AS orderitem_qty_received,\n       recv_qty, recv_date,\n       COALESCE(recv_gldistdate, recv_date) AS recv_gldistdate,\n       'qty' AS orderitem_qty_ordered_xtnumericrole,\n       'qty' AS orderitem_qty_received_xtnumericrole,\n       'qty' AS recv_qty_xtnumericrole\nFROM rahead JOIN\n     raitem ON (raitem_rahead_id=rahead_id) JOIN \n     recv  ON ((recv_orderitem_id=raitem_id)\n\t   AND (recv_order_type='RA')) LEFT OUTER JOIN\n     (itemsite JOIN item ON (itemsite_item_id=item_id)\n\t       JOIN uom ON (item_inv_uom_id=uom_id)\n               JOIN site() ON (itemsite_warehous_id=warehous_id)\n       )\n      ON (recv_itemsite_id=itemsite_id) LEFT OUTER JOIN\n     custinfo ON (rahead_cust_id=cust_id)\nWHERE (NOT recv_posted)\n<? endif ?>\n<? if exists ("MultiWhs") ?>\n------TRANSFER ORDERS---------\nUNION\nSELECT recv_id, recv_orderitem_id, recv_order_number, recv_order_type,\n       tohead_srcname AS orderhead_from,\n       toitem_linenumber AS orderitem_linenumber,\n       formatDate(recv_duedate) AS recv_duedate,\n       warehous_code,\n       COALESCE(item_number, <? value("nonInventory") ?>) AS item_number,\n       COALESCE(uom_name, <? value("na") ?>) AS uom_name,\n       recv_vend_item_number,\n       recv_vend_uom,\n       toitem_qty_ordered AS orderitem_qty_ordered, \n       toitem_qty_received AS orderitem_qty_received,\n       recv_qty, recv_date,\n       COALESCE(recv_gldistdate, recv_date) AS recv_gldistdate,\n       'qty' AS orderitem_qty_ordered_xtnumericrole,\n       'qty' AS orderitem_qty_received_xtnumericrole,\n       'qty' AS recv_qty_xtnumericrole\nFROM tohead JOIN\n     toitem ON (toitem_tohead_id=tohead_id) JOIN \n     recv  ON ((recv_orderitem_id=toitem_id)\n\t   AND (recv_order_type='TO')) LEFT OUTER JOIN\n     (itemsite JOIN item ON (itemsite_item_id=item_id)\n\t       JOIN uom ON (item_inv_uom_id=uom_id)\n               JOIN site() ON (itemsite_warehous_id=warehous_id)\n       )\n      ON (recv_itemsite_id=itemsite_id) \nWHERE (NOT recv_posted)\n<? endif ?>\nORDER BY recv_order_number, orderitem_linenumber;\n	admin	2015-10-01	0
301	unusedPurchasedItems	detail	 used by dspUnusedPurchasedItems.cpp\n Copyright (c) 1999-2014 by OpenMFG LLC, d/b/a xTuple.\n See www.xtuple.com/CPAL for the full text of the software license.\n	-- Group: unusedPurchasedItems\n-- Name: detail\n-- Notes: used by dspUnusedPurchasedItems.cpp\n-- Copyright (c) 1999-2014 by OpenMFG LLC, d/b/a xTuple.\n-- See www.xtuple.com/CPAL for the full text of the software license.\n\nSELECT DISTINCT item_id, item_number,\n                (item_descrip1 || ' ' || item_descrip2) AS itemdescrip, uom_name,\n                SUM(itemsite_qtyonhand) AS qoh,\n                MAX(itemsite_datelastcount) AS lastcount,\n                MAX(itemsite_datelastused) AS lastused,\n                'qty' AS qoh_xtnumericrole,\n                CASE WHEN (COALESCE(MAX(itemsite_datelastcount), startOfTime()) = startOfTime()) THEN 'Never' END AS lastcount_qtdisplayrole,\n                CASE WHEN (COALESCE(MAX(itemsite_datelastused), startOfTime()) = startOfTime()) THEN 'Never' END AS lastused_qtdisplayrole \nFROM item, itemsite, uom \nWHERE ((itemsite_item_id=item_id)\n AND (item_inv_uom_id=uom_id)\n AND (item_id NOT IN (SELECT DISTINCT bomitem_item_id FROM bomitem))\n AND (NOT item_sold)\n AND (item_type IN ('P', 'O')) \n<? if exists("classcode_id") ?>\n AND (item_classcode_id=<? value("classcode_id") ?>) \n<? elseif exists("classcode_pattern") ?>\n AND (item_classcode_id IN (SELECT classcode_id FROM classcode WHERE (classcode_code ~ <? value("classcode_pattern") ?>))) \n<? endif ?>\n<? if exists("includeUncontrolled") ?>\n AND (itemsite_controlmethod <> 'N')\n<? endif ?>\n) \nGROUP BY item_id, item_number, uom_name, item_descrip1, item_descrip2 \nORDER BY item_number;\n	admin	2015-10-01	0
461	uoms	item	 used by item, bomItem, salesOrderItem, invoiceItem, creditMemoItem, woMaterialItem,\n                returnAuthorizationItem, itemPricingScheduleItem\n Copyright (c) 1999-2015 by OpenMFG LLC, d/b/a xTuple.\n See www.xtuple.com/CPAL for the full text of the software license.\n	-- Group: uoms\n-- Name: item\n-- Notes: used by item, bomItem, salesOrderItem, invoiceItem, creditMemoItem, woMaterialItem,\n--                returnAuthorizationItem, itemPricingScheduleItem\n-- Copyright (c) 1999-2015 by OpenMFG LLC, d/b/a xTuple.\n-- See www.xtuple.com/CPAL for the full text of the software license.\n\n<? if exists("uom_id") ?>\nSELECT uom_id, uom_name\n  FROM uom\n  WHERE(uom_id=<? value("uom_id") ?>)\nUNION\n<? endif ?>\n<? if exists("uom_id2") ?>\nSELECT uom_id, uom_name\n  FROM uom\n  WHERE(uom_id=<? value("uom_id2") ?>)\nUNION\n<? endif ?>\nSELECT uom_id, uom_name\n  FROM item\n  JOIN uom ON (item_inv_uom_id=uom_id)\n WHERE(item_id=<? value("item_id") ?>)\nUNION\nSELECT uom_id, uom_name\n  FROM item\n  JOIN itemuomconv ON (itemuomconv_item_id=item_id)\n  JOIN uom ON (itemuomconv_to_uom_id=uom_id),\n  itemuom, uomtype\n WHERE (itemuomconv_from_uom_id=item_inv_uom_id)\n   AND (item_id=<? value("item_id") ?>)\n   AND (itemuom_itemuomconv_id=itemuomconv_id)\n   AND (uomtype_id=itemuom_uomtype_id)\n   AND (itemuomconv_active)\n<? if exists("uomtype") ?>\n   AND (uomtype_name=<? value("uomtype") ?>)\n<? endif ?>\nUNION\nSELECT uom_id, uom_name\n  FROM item\n  JOIN itemuomconv ON (itemuomconv_item_id=item_id)\n  JOIN uom ON (itemuomconv_from_uom_id=uom_id),\n  itemuom, uomtype\n WHERE (itemuomconv_to_uom_id=item_inv_uom_id)\n   AND (item_id=<? value("item_id") ?>)\n   AND (itemuom_itemuomconv_id=itemuomconv_id)\n   AND (uomtype_id=itemuom_uomtype_id)\n   AND (itemuomconv_active)\n<? if exists("uomtype") ?>\n   AND (uomtype_name=<? value("uomtype") ?>)\n<? endif ?>\n ORDER BY uom_name;\n	admin	2015-10-01	0
119	updateListPrices	update	 Calculates and immediately updates list prices to the database\n Copyright (c) 1999-2014 by OpenMFG LLC, d/b/a xTuple.\n See www.xtuple.com/CPAL for the full text of the software license.\n	-- Group: updateListPrices\n-- Name:  update\n-- Notes: Calculates and immediately updates list prices to the database\n-- Copyright (c) 1999-2014 by OpenMFG LLC, d/b/a xTuple.\n-- See www.xtuple.com/CPAL for the full text of the software license.\n\nUPDATE item SET item_listprice=\n<? if exists("byValue") ?>\n       item_listprice + <? value("updateBy") ?>\n<? else ?>\n       item_listprice * (1.0 + (<? value("updateBy") ?> / 100.0))\n<? endif ?>\nWHERE (item_sold)\n<? if exists("prodcat_id") ?>\n  AND (item_prodcat_id=<? value("prodcat_id") ?>)\n<? elseif exists("prodcat_pattern") ?>\n  AND (item_prodcat_id IN (SELECT prodcat_id FROM prodcat WHERE (prodcat_code ~ <? value("prodcat_pattern" ?>)))\n<? endif ?>\n	admin	2015-10-01	0
120	updateprices	add	\n Notes:\n Copyright (c) 1999-2014 by OpenMFG LLC, d/b/a xTuple.\n See www.xtuple.com/CPAL for the full text of the software license.\n	-- Group: updateprices\n-- Name: add\n-- Notes:\n-- Notes:\n-- Copyright (c) 1999-2014 by OpenMFG LLC, d/b/a xTuple.\n-- See www.xtuple.com/CPAL for the full text of the software license.\n\n  INSERT INTO selsched\n<? if exists("ipshead_id") ?>\n  VALUES (<? value("ipshead_id") ?>);\n<? else ?>\n  SELECT ipshead_id\n  FROM ipshead\n  WHERE ( (ipshead_id NOT IN (\n  \tSELECT selsched_ipshead_id\n  \tFROM selsched\n  \tWHERE (selsched_ipshead_id=ipshead_id)))\n<? if not exists("showEffective") ?>\n  AND (ipshead_effective <= CURRENT_DATE)\n<? endif ?>\n<? if not exists("showExpired") ?>\n  AND (ipshead_expires > CURRENT_DATE)\n<? endif ?>\n<? if not exists("showCurrent") ?>\n  AND (CURRENT_DATE NOT BETWEEN ipshead_effective AND ipshead_expires -1)\n<? endif ?>\n );\n\n	admin	2015-10-01	0
121	updateprices	availsched	\n Notes:\n Copyright (c) 1999-2014 by OpenMFG LLC, d/b/a xTuple.\n See www.xtuple.com/CPAL for the full text of the software license.\n	-- Group: updateprices\n-- Name: availsched\n-- Notes:\n-- Notes:\n-- Copyright (c) 1999-2014 by OpenMFG LLC, d/b/a xTuple.\n-- See www.xtuple.com/CPAL for the full text of the software license.\n\nSELECT ipshead_id, ipshead_name, ipshead_descrip,\n  ipshead_effective, ipshead_expires,\n  CASE WHEN COALESCE(ipshead_effective, startOfTime()) <= startOfTime() THEN \n\t'Always' END AS ipshead_effective_qtdisplayrole,\n  CASE WHEN COALESCE(ipshead_expires, endOfTime()) >= endOfTime() THEN \n\t'Never' END AS ipshead_expires_qtdisplayrole\nFROM ipshead\nWHERE ( (ipshead_id NOT IN (\n  \tSELECT selsched_ipshead_id\n  \tFROM selsched\n  \tWHERE (selsched_ipshead_id=ipshead_id)))\n<? if not exists("showEffective") ?>\n  AND (ipshead_effective <= CURRENT_DATE)\n<? endif ?>\n<? if not exists("showExpired") ?>\n  AND (ipshead_expires > CURRENT_DATE)\n<? endif ?>\n<? if not exists("showCurrent") ?>\n  AND (CURRENT_DATE NOT BETWEEN ipshead_effective AND ipshead_expires -1)\n<? endif ?>\n )\nORDER BY ipshead_effective, ipshead_name;\n	admin	2015-10-01	0
122	updateprices	createselsched	\n Notes:\n Copyright (c) 1999-2014 by OpenMFG LLC, d/b/a xTuple.\n See www.xtuple.com/CPAL for the full text of the software license.\n	-- Group: updateprices\n-- Name: createselsched\n-- Notes:\n-- Notes:\n-- Copyright (c) 1999-2014 by OpenMFG LLC, d/b/a xTuple.\n-- See www.xtuple.com/CPAL for the full text of the software license.\n\nCREATE TEMPORARY TABLE selsched (\n  selsched_ipshead_id INTEGER PRIMARY KEY );\n	admin	2015-10-01	0
123	updateprices	dropselsched	\n Notes:\n Copyright (c) 1999-2014 by OpenMFG LLC, d/b/a xTuple.\n See www.xtuple.com/CPAL for the full text of the software license.\n	-- Group: updateprices\n-- Name: dropselsched\n-- Notes:\n-- Notes:\n-- Copyright (c) 1999-2014 by OpenMFG LLC, d/b/a xTuple.\n-- See www.xtuple.com/CPAL for the full text of the software license.\n\nDROP TABLE selsched;\n	admin	2015-10-01	0
126	updateprices	updatechar	 used by updatePrices\n Copyright (c) 1999-2014 by OpenMFG LLC, d/b/a xTuple.\n See www.xtuple.com/CPAL for the full text of the software license.\n	-- Group: updateprices\n-- Name: updatechar\n-- Notes: used by updatePrices\n-- Copyright (c) 1999-2014 by OpenMFG LLC, d/b/a xTuple.\n-- See www.xtuple.com/CPAL for the full text of the software license.\n\nUPDATE ipsitemchar SET\n  ipsitemchar_price=\n<? if exists("updateByValue") ?>\n  ipsitemchar_price + <? value("updateBy") ?>\n<? else ?>\n  roundSale(ipsitemchar_price * (1.0 + (<? value("updateBy") ?> / 100.0)))\n<? endif ?>\nFROM selsched, ipsiteminfo, item\n<? if reExists("itemgrp") ?>\n  JOIN itemgrpitem ON (itemgrpitem_item_id=item_id)\n  JOIN itemgrp ON (itemgrpitem_itemgrp_id=itemgrp_id)\n<? elseif reExists("prodcat") ?>\n  JOIN prodcat ON (prodcat_id=item_prodcat_id)\n<? endif ?>\nWHERE ( ipsitemchar_ipsitem_id=ipsitem_id\n  AND ipsitem_item_id=item_id\n  AND selsched_ipshead_id=ipsitem_ipshead_id\n<? if exists("item_id") ?>\n  AND item_id=<? value("item_id") ?>\n<? elseif exists("itemgrp_id") ?>\n  AND itemgrp_id=<? value("itemgrp_id") ?>\n<? elseif exists("itemgrp_pattern") ?>\n  AND itemgrp_name ~ <? value("itemgrp_pattern") ?>\n<? elseif exists("prodcat_id") ?>\n  AND prodcat_id=<? value("prodcat_id") ?>\n<? elseif exists("prodcat_pattern") ?>\n  AND prodcat_code ~ <? value("prodcat_pattern") ?>\n<? endif ?>\n);\n	admin	2015-10-01	0
90	updateReorderLevels	post	 itemsite with new reorder level\n Copyright (c) 1999-2014 by OpenMFG LLC, d/b/a xTuple.\n See www.xtuple.com/CPAL for the full text of the software license.\n	-- Group: updateReorderLevels\n-- Name:  post\n-- Notes: itemsite with new reorder level\n-- Copyright (c) 1999-2014 by OpenMFG LLC, d/b/a xTuple.\n-- See www.xtuple.com/CPAL for the full text of the software license.\n\nUPDATE itemsite SET\n  itemsite_reorderlevel=<? value("itemsite_reorderlevel") ?>,\n  itemsite_stocked=CASE WHEN (<? value("itemsite_reorderlevel") ?> = 0) THEN false\n                        ELSE itemsite_stocked END,\n  itemsite_useparams=CASE WHEN (<? value("itemsite_reorderlevel") ?> = 0) THEN false\n                          ELSE itemsite_useparams END\nWHERE (itemsite_id=<? value("itemsite_id") ?>)\n	admin	2015-10-01	0
91	updateReorderLevels	query	 Calculates reorder point levels and returns a proposed result set\n Copyright (c) 1999-2014 by OpenMFG LLC, d/b/a xTuple.\n See www.xtuple.com/CPAL for the full text of the software license.\n	-- Group: updateReorderLevels\n-- Name:  query\n-- Notes: Calculates reorder point levels and returns a proposed result set\n-- Copyright (c) 1999-2014 by OpenMFG LLC, d/b/a xTuple.\n-- See www.xtuple.com/CPAL for the full text of the software license.\n\nSELECT *,\n  'qty' AS reordlvl_curr_level_xtnumericrole,\n  'qty' AS reordlvl_total_usage_xtnumericrole\nFROM updateReorderLevel((\n  SELECT array(\n    SELECT itemsite_id\n    FROM itemsite\n    JOIN item ON (itemsite_item_id=item_id)\n    LEFT OUTER JOIN plancode ON (itemsite_plancode_id=plancode_id)\n    LEFT OUTER JOIN classcode ON (item_classcode_id=classcode_id)\n    WHERE ( (itemsite_active)\n<? if exists("warehous_id") ?>\n     AND (itemsite_warehous_id=<? value("warehous_id") ?>)\n<? endif ?>\n<? if exists("item_id") ?>\n     AND (item_id=<? value("item_id") ?>)\n<? elseif exists("classcode_id") ?>\n     AND (item_classcode_id=<? value("classcode_id") ?>)\n<? elseif exists("classcode_pattern") ?>\n     AND (classcode_code ~ <? value("classcode_pattern") ?>)\n<? elseif exists("plancode_id") ?>\n     AND (itemsite_plancode_id=<? value("plancode_id") ?>)\n<? elseif exists("plancode_pattern") ?>\n     AND (plancode_code ~ <? value("plancode_pattern") ?>)\n<? endif ?>\n     )\n  )\n),\n<? value("daysOfStock") ?>, \n<? if exists("addLeadtime") ?>\n  true,\n<? else ?>\n  false,\n<? endif ?>\n\nARRAY[\n   <? foreach("period_id_list") ?>\n     <? if not isfirst("period_id_list") ?>\n      ,\n     <? endif ?>\n    <? value("period_id_list") ?>\n   <? endforeach ?> ]\n)\nORDER BY reordlvl_warehous_code, reordlvl_item_number;\n	admin	2015-10-01	0
92	updateReorderLevels	update	 Calculates and immediatly updates reorder point levels to the database\n Copyright (c) 1999-2014 by OpenMFG LLC, d/b/a xTuple.\n See www.xtuple.com/CPAL for the full text of the software license.\n	-- Group: updateReorderLevels\n-- Name:  update\n-- Notes: Calculates and immediatly updates reorder point levels to the database\n-- Copyright (c) 1999-2014 by OpenMFG LLC, d/b/a xTuple.\n-- See www.xtuple.com/CPAL for the full text of the software license.\n\nSELECT updateReorderLevel(itemsite_id,<? value("daysOfStock") ?>, \nARRAY[\n   <? foreach("period_id_list") ?>\n     <? if not isfirst("period_id_list") ?>\n      ,\n     <? endif ?>\n    <? value("period_id_list") ?>\n   <? endforeach ?> ]\n) AS result\nFROM itemsite\n  JOIN item ON (itemsite_item_id=item_id)\n  LEFT OUTER JOIN plancode ON (itemsite_plancode_id=plancode_id)\n  LEFT OUTER JOIN classcode ON (item_classcode_id=classcode_id)\nWHERE ( (itemsite_active)\n  AND (itemsite_useparams)\n<? if exists("warehous_id") ?>\n  AND (itemsite_warehous_id=<? value("warehous_id") ?>)\n<? endif ?>\n<? if exists("item_id") ?>\n  AND (item_id=<? value("item_id") ?>)\n<? elseif exists("classcode_id") ?>\n  AND (item_classcode_id=<? value("classcode_id") ?>)\n<? elseif exists("classcode_pattern") ?>\n  AND (classcode_code ~ <? value("classcode_pattern") ?>)\n<? elseif exists("plancode_id") ?>\n  AND (itemsite_plancode_id=<? value("plancode_id") ?>)\n<? elseif exists("plancode_pattern") ?>\n  AND (plancode_code ~ <? value("plancode_pattern") ?>)\n<? endif ?>\n)\n	admin	2015-10-01	0
134	usageStatistics	detail	 \n Copyright (c) 1999-2014 by OpenMFG LLC, d/b/a xTuple.\n See www.xtuple.com/CPAL for the full text of the software license.\n	-- Group: usageStatistics\n-- Name: detail\n-- Notes: \n-- Copyright (c) 1999-2014 by OpenMFG LLC, d/b/a xTuple.\n-- See www.xtuple.com/CPAL for the full text of the software license.\n\nSELECT *,\n  <? if exists("MultiWhs") ?>\n       formatQty(transfer) AS f_transfer,\n  <? endif ?>\n       formatQty(received) AS f_received,\n       formatQty(issued) AS f_issued,\n       formatQty(sold) AS f_sold,\n       formatQty(scrap) AS f_scrap,\n       formatQty(adjust) AS f_adjust,\n       'qty' AS received_xtnumericrole,\n       'qty' AS issued_xtnumericrole,\n       'qty' AS sold_xtnumericrole,\n       'qty' AS scrap_xtnumericrole,\n       'qty' AS adjust_xtnumericrole,\n       'qty' AS transfer_xtnumericrole\nFROM (\nSELECT itemsite_id, item_id, warehous_code,\n       item_number, (item_descrip1 || ' ' || item_descrip2) AS itemdescrip,\n  <? if exists("MultiWhs") ?>\n       summTransT(itemsite_id, <? value("startDate") ?>, <? value("endDate") ?>) AS transfer,\n  <? endif ?>\n       summTransR(itemsite_id, <? value("startDate") ?>, <? value("endDate") ?>) AS received,\n       summTransI(itemsite_id, <? value("startDate") ?>, <? value("endDate") ?>) AS issued,\n       summTransS(itemsite_id, <? value("startDate") ?>, <? value("endDate") ?>) AS sold,\n       summTransC(itemsite_id, <? value("startDate") ?>, <? value("endDate") ?>) AS scrap,\n       summTransA(itemsite_id, <? value("startDate") ?>, <? value("endDate") ?>) AS adjust\nFROM item JOIN itemsite ON (itemsite_item_id=item_id)\n          JOIN whsinfo ON (warehous_id=itemsite_warehous_id)\nWHERE (1=1)\n\n<? if exists("item_id") ?>\n  AND  (item_id=<? value("item_id") ?>)\n<? endif ?>\n\n<? if exists("warehous_id")  ?>\n  AND (itemsite_warehous_id=<? value("warehous_id") ?>)\n<? endif ?>\n\n<? if exists("classcode_id") ?>\n  AND (item_classcode_id=<? value("classcode_id") ?>)\n<? elseif exists("itemgrp_id") ?>\n  AND (item_id IN (SELECT itemgrpitem_item_id\n                   FROM itemgrpitem\n\t\t   WHERE (itemgrpitem_itemgrp_id=<? value("itemgrp_id") ?>)))\n<? elseif exists("plancode_id") ?>\n  AND (itemsite_plancode_id=<? value("plancode_id") ?>)\n<? elseif exists("classcode_pattern") ?>\n  AND (item_classcode_id IN (SELECT classcode_id\n\t\t\t     FROM classcode\n\t\t\t     WHERE (classcode_code ~ <? value ("classcode_pattern") ?>)))\n<? elseif exists("itemgrp_pattern") ?>\n  AND (item_id IN (SELECT itemgrpitem_item_id\n\t\t   FROM itemgrpitem, itemgrp\n\t\t   WHERE ( (itemgrpitem_itemgrp_id=itemgrp_id)\n\t\t     AND  (itemgrp_name ~ <? value ("itemgrp_pattern") ?>))))\n<? elseif exists("plancode_pattern") ?>\n  AND (itemsite_plancode_id IN (SELECT plancode_id\n\t\t\t\tFROM plancode\n\t\t\t\tWHERE (plancode_code ~ <? value("plancode_pattern") ?>)))\n<? elseif exists("itemgrp")?>\n  AND (item_id IN (SELECT DISTINCT itemgrpitem_item_id FROM itemgrpitem))\n<? endif ?>\n) AS data\n\nORDER BY warehous_code, item_number;\n	admin	2015-10-01	0
302	validLocationsByItem	detail	 used by dspValidLocationsByItem.cpp\n Copyright (c) 1999-2014 by OpenMFG LLC, d/b/a xTuple.\n See www.xtuple.com/CPAL for the full text of the software license.\n	-- Group: validLocationsByItem\n-- Name: detail\n-- Notes: used by dspValidLocationsByItem.cpp\n-- Copyright (c) 1999-2014 by OpenMFG LLC, d/b/a xTuple.\n-- See www.xtuple.com/CPAL for the full text of the software license.\n\nSELECT location_id, warehous_code,\n       formatLocationName(location_id) AS locationname,\n       firstLine(location_descrip) AS locationdescrip,\n       location_restrict, location_netable\nFROM itemsite, location, whsinfo\nWHERE ((validLocation(location_id, itemsite_id))\n   AND ((itemsite_loccntrl) OR (itemsite_location_id=location_id))\n   AND (itemsite_item_id=<? value("item_id") ?>)\n   AND (itemsite_warehous_id=warehous_id)\n<? if exists("warehous_id") ?>\n   AND (warehous_id=<? value("warehous_id") ?>)\n<? endif ?>\n      )\nORDER BY warehous_code, locationname;\n	admin	2015-10-01	0
303	vendorAPHistory	detail	 used by dspVendorAPHistory\n Copyright (c) 1999-2014 by OpenMFG LLC, d/b/a xTuple.\n See www.xtuple.com/CPAL for the full text of the software license.\n	-- Group: vendorAPHistory\n-- Name: detail\n-- Notes: used by dspVendorAPHistory\n-- Copyright (c) 1999-2014 by OpenMFG LLC, d/b/a xTuple.\n-- See www.xtuple.com/CPAL for the full text of the software license.\n\nSELECT apopen_id, -1 AS applyid, 0 AS type,\n       apopen_docdate AS sortdate, apopen_docnumber AS sortnumber,\n       apopen_docnumber AS docnumber,\n       formatBoolYN(apopen_open) AS f_open,\n       CASE WHEN (apopen_doctype='V') THEN <? value("voucher") ?>\n            WHEN (apopen_doctype='C') THEN <? value("creditMemo") ?>\n            WHEN (apopen_doctype='D') THEN <? value("debitMemo") ?>\n         ELSE <? value("other") ?>\n       END AS documenttype,\n       apopen_invcnumber AS invoicenumber,\n       apopen_ponumber AS ponumber,\n       apopen_docdate AS docdate, apopen_duedate AS duedate, apopen_amount AS amount,\n       (apopen_amount - apopen_paid) AS balance,\n       currconcat(apopen_curr_id) AS currAbbr,\n       CASE WHEN (apopen_doctype='C') THEN apopen_amount / apopen_curr_rate * -1.0\n         ELSE apopen_amount / apopen_curr_rate\n       END AS base_amount,\n       0 AS base_applied,\n       CASE WHEN (apopen_doctype='C') THEN (apopen_amount - apopen_paid) / apopen_curr_rate * -1.0\n         ELSE (apopen_amount - apopen_paid) / apopen_curr_rate\n       END AS base_balance,\n       'curr' AS amount_xtnumericrole,\n       'curr' AS base_amount_xtnumericrole,\n       0 AS base_amount_xttotalrole,\n       'curr' AS base_applied_xtnumericrole,\n       0 AS base_applied_xttotalrole,\n       'curr' AS balance_xtnumericrole,\n       'curr' AS base_balance_xtnumericrole,\n       0 AS base_balance_xttotalrole,\n       0 AS xtindentrole \nFROM apopen \nWHERE ( (apopen_vend_id=<? value("vend_id") ?>) \n    AND (apopen_docdate BETWEEN <? value("startDate") ?> AND <? value("endDate") ?>) ) \n\nUNION \nSELECT apopen_id, apapply_source_apopen_id AS applyid, 1 AS type,\n       apopen_docdate AS sortdate, apopen_docnumber AS sortnumber,\n       apapply_source_docnumber AS docnumber,\n       '' AS f_open,\n       CASE WHEN (apapply_source_doctype='C') THEN <? value("creditMemo") ?>\n            WHEN (apapply_source_doctype='K') THEN <? value("check") ?>\n         ELSE <? value("other") ?>\n       END AS documenttype,\n       ' ' AS invoicenumber,\n       '' AS ponumber,\n       apapply_postdate AS docdate, CAST(NULL AS DATE) AS duedate,\n       apapply_amount AS amount,\n       0 AS balance,\n       currconcat(apapply_curr_id) AS currAbbr,\n       0 AS base_amount,\n       (apapply_amount / apopen_curr_rate) AS base_applied, \n       0 AS base_balance,\n       'curr' AS amount_xtnumericrole,\n       'curr' AS base_amount_xtnumericrole,\n       0 AS base_amount_xttotalrole,\n       'curr' AS base_applied_xtnumericrole,\n       0 AS base_applied_xttotalrole,\n       'curr' AS balance_xtnumericrole,\n       'curr' AS base_balance_xtnumericrole,\n       0 AS base_balance_xttotalrole,\n       1 AS xtindentrole \nFROM apapply, apopen \nWHERE ( (apapply_target_apopen_id=apopen_id)\n    AND (apapply_vend_id=<? value("vend_id") ?>)\n    AND (apopen_vend_id=<? value("vend_id") ?>)\n    AND (apopen_docdate BETWEEN <? value("startDate") ?> AND <? value("endDate") ?>) ) \n\nUNION \nSELECT apopen_id, apapply_target_apopen_id AS applyid, 2 AS type,\n       apopen_docdate AS sortdate, apopen_docnumber AS sortnumber,\n       apapply_target_docnumber AS docnumber,\n       '' AS f_open,\n       CASE WHEN (apapply_target_doctype='V') THEN <? value("voucher") ?>\n            WHEN (apapply_target_doctype='D') THEN <? value("debitMemo") ?>\n         ELSE <? value("other") ?>\n       END AS documenttype,\n       apopen_invcnumber AS invoicenumber,\n       '' AS ponumber,\n       apapply_postdate AS docdate, CAST(NULL AS DATE) AS duedate,\n       apapply_amount AS amount,\n       0 AS balance,\n       currconcat(apapply_curr_id) AS currAbbr,\n       0 AS base_amount,\n       (apapply_amount / apopen_curr_rate) AS base_applied, \n       0 AS base_balance,\n       'curr' AS amount_xtnumericrole,\n       'curr' AS base_amount_xtnumericrole,\n       0 AS base_amount_xttotalrole,\n       'curr' AS base_applied_xtnumericrole,\n       0 AS base_applied_xttotalrole,\n       'curr' AS balance_xtnumericrole,\n       'curr' AS base_balance_xtnumericrole,\n       0 AS base_balance_xttotalrole,\n       1 AS xtindentrole \nFROM apapply, apopen \nWHERE ( (apapply_source_doctype IN ('C', 'K'))\n    AND (apapply_source_doctype=apopen_doctype)\n    AND (apapply_source_docnumber=apopen_docnumber)\n    AND (apapply_vend_id=<? value("vend_id") ?>)\n    AND (apopen_vend_id=<? value("vend_id") ?>)\n    AND (apopen_docdate BETWEEN <? value("startDate") ?> AND <? value("endDate") ?>) ) \nORDER BY sortdate, apopen_id, type;\n	admin	2015-10-01	0
304	vendors	detail	 \n Copyright (c) 1999-2015 by OpenMFG LLC, d/b/a xTuple.\n See www.xtuple.com/CPAL for the full text of the software license.\n	-- Group: vendors\n-- Name:  detail\n-- Notes: \n-- Copyright (c) 1999-2015 by OpenMFG LLC, d/b/a xTuple.\n-- See www.xtuple.com/CPAL for the full text of the software license.\n\nSELECT \n  vend_id, vend_vendtype_id, \n  vend_active, vend_number, vend_name,\n  vendtype_code,\n<? foreach("char_id_text_list") ?>\n  charass_alias<? literal("char_id_text_list") ?>.charass_value AS char<? literal("char_id_text_list") ?>,\n<? endforeach ?>\n<? foreach("char_id_list_list") ?>\n  charass_alias<? literal("char_id_list_list") ?>.charass_value AS char<? literal("char_id_list_list") ?>,\n<? endforeach ?>\n<? foreach("char_id_date_list") ?>\n  charass_alias<? literal("char_id_date_list") ?>.charass_value::date AS char<? literal("char_id_date_list") ?>,\n<? endforeach ?>\n  cntct.*,\n  CASE WHEN (cntctaddr.addr_id IS NOT NULL) THEN cntctaddr.addr_id ELSE vendaddr.addr_id END AS addr_id,\n  CASE WHEN (cntctaddr.addr_id IS NOT NULL) THEN cntctaddr.addr_active ELSE vendaddr.addr_active END AS addr_active,\n  CASE WHEN (cntctaddr.addr_id IS NOT NULL) THEN cntctaddr.addr_line1 ELSE vendaddr.addr_line1 END AS addr_line1,\n  CASE WHEN (cntctaddr.addr_id IS NOT NULL) THEN cntctaddr.addr_line2 ELSE vendaddr.addr_line2 END AS addr_line2,\n  CASE WHEN (cntctaddr.addr_id IS NOT NULL) THEN cntctaddr.addr_line3 ELSE vendaddr.addr_line3 END AS addr_line3,\n  CASE WHEN (cntctaddr.addr_id IS NOT NULL) THEN cntctaddr.addr_city ELSE vendaddr.addr_city END AS addr_city,\n  CASE WHEN (cntctaddr.addr_id IS NOT NULL) THEN cntctaddr.addr_state ELSE vendaddr.addr_state END AS addr_state,\n  CASE WHEN (cntctaddr.addr_id IS NOT NULL) THEN cntctaddr.addr_postalcode ELSE vendaddr.addr_postalcode END AS addr_postalcode,\n  CASE WHEN (cntctaddr.addr_id IS NOT NULL) THEN cntctaddr.addr_country ELSE vendaddr.addr_country END AS addr_country,\n  CASE WHEN (cntctaddr.addr_id IS NOT NULL) THEN cntctaddr.addr_notes ELSE vendaddr.addr_notes END AS addr_notes,\n  CASE WHEN (cntctaddr.addr_id IS NOT NULL) THEN cntctaddr.addr_number ELSE vendaddr.addr_number END AS addr_number\nFROM vendinfo \n  JOIN vendtype ON (vend_vendtype_id=vendtype_id)\n  LEFT OUTER JOIN cntct ON (vend_cntct1_id=cntct_id) \n  LEFT OUTER JOIN addr AS vendaddr ON (vend_addr_id=vendaddr.addr_id)\n  LEFT OUTER JOIN addr AS  cntctaddr ON (cntct_addr_id=cntctaddr.addr_id) \n<? foreach("char_id_text_list") ?>\n  LEFT OUTER JOIN charass charass_alias<? literal("char_id_text_list") ?> \n       ON ((charass_alias<? literal("char_id_text_list") ?>.charass_target_type='V') \n      AND  (charass_alias<? literal("char_id_text_list") ?>.charass_target_id=vend_id)\n      AND  (charass_alias<? literal("char_id_text_list") ?>.charass_char_id=<? value("char_id_text_list") ?>))\n  LEFT OUTER JOIN char char_alias<? literal("char_id_text_list") ?> \n       ON (charass_alias<? literal("char_id_text_list") ?>.charass_char_id=char_alias<? literal("char_id_text_list") ?>.char_id)\n<? endforeach ?>\n<? foreach("char_id_list_list") ?>\n  LEFT OUTER JOIN charass charass_alias<? literal("char_id_list_list") ?> \n       ON ((charass_alias<? literal("char_id_list_list") ?>.charass_target_type='V') \n      AND  (charass_alias<? literal("char_id_list_list") ?>.charass_target_id=vend_id)\n      AND  (charass_alias<? literal("char_id_list_list") ?>.charass_char_id=<? value("char_id_list_list") ?>))\n  LEFT OUTER JOIN char char_alias<? literal("char_id_list_list") ?> \n       ON (charass_alias<? literal("char_id_list_list") ?>.charass_char_id=char_alias<? literal("char_id_list_list") ?>.char_id)\n<? endforeach ?>\n<? foreach("char_id_date_list") ?>\n  LEFT OUTER JOIN charass charass_alias<? literal("char_id_date_list") ?> \n       ON ((charass_alias<? literal("char_id_date_list") ?>.charass_target_type='V') \n      AND  (charass_alias<? literal("char_id_date_list") ?>.charass_target_id=vend_id)\n      AND  (charass_alias<? literal("char_id_date_list") ?>.charass_char_id=<? value("char_id_date_list") ?>))\n  LEFT OUTER JOIN char char_alias<? literal("char_id_date_list") ?> \n       ON (charass_alias<? literal("char_id_date_list") ?>.charass_char_id=char_alias<? literal("char_id_date_list") ?>.char_id)\n<? endforeach ?>\nWHERE true\n<? if not exists("showInactive") ?> \n  AND vend_active \n<? endif ?>\n<? if exists("search_pattern") ?>\n  AND ((vend_number ~* <? value("search_pattern") ?>)\n       OR (vend_name ~* <? value("search_pattern") ?>)\n       OR (vendtype_code ~* <? value("search_pattern") ?>)\n       OR (COALESCE(cntct_first_name,'') || ' ' || COALESCE(cntct_last_name,'') ~* <? value("search_pattern") ?>)\n       OR (COALESCE(cntct_phone,'') || ' ' || COALESCE(cntct_phone2,'') || ' ' || COALESCE(cntct_fax,'') ~* <? value("search_pattern") ?>)\n       OR (COALESCE(cntct_email,'') ~* <? value("search_pattern") ?>)\n       OR (COALESCE(cntctaddr.addr_line1, vendaddr.addr_line1, '') || ' ' || COALESCE(cntctaddr.addr_line2, vendaddr.addr_line2,'') || ' ' || COALESCE(cntctaddr.addr_line3, vendaddr.addr_line3, '') ~* <? value("search_pattern") ?>)\n       OR (COALESCE(cntctaddr.addr_city, vendaddr.addr_city,'') ~* <? value("search_pattern") ?>)\n       OR (COALESCE(cntctaddr.addr_state, vendaddr.addr_state,'') ~* <? value("search_pattern") ?>)\n       OR (COALESCE(cntctaddr.addr_postalcode, vendaddr.addr_postalcode,'') ~* <? value("search_pattern") ?>)\n       OR (COALESCE(cntctaddr.addr_country, vendaddr.addr_country,'') ~* <? value("search_pattern") ?>))\n<? endif ?>\n<? if exists("vend_number_pattern") ?>\n  AND (vend_number ~* <? value("vend_number_pattern") ?>)\n<? endif ?>\n<? if exists("vend_name_pattern") ?>\n  AND (vend_name ~* <? value("vend_name_pattern") ?>)\n<? endif ?>\n<? if exists("vendtype_code_pattern") ?>\n  AND (vendtype_code ~* <? value("vendtype_code_pattern") ?>)\n<? endif ?>\n<? if exists("cntct_name_pattern") ?>\n  AND (COALESCE(cntct_first_name,'') || ' ' || COALESCE(cntct_last_name,'') ~* <? value("cntct_name_pattern") ?>)\n<? endif ?>\n<? if exists("cntct_phone_pattern") ?>\n  AND (COALESCE(cntct_phone,'') || ' ' || COALESCE(cntct_phone2,'') || ' ' || COALESCE(cntct_fax,'') ~* <? value("cntct_phone_pattern") ?>)\n<? endif ?>\n<? if exists("cntct_email_pattern") ?>\n  AND (COALESCE(cntct_email,'') ~* <? value("cntct_email_pattern") ?>)\n<? endif ?>\n<? if exists("addr_street_pattern") ?>\n  AND (COALESCE(cntctaddr.addr_line1, vendaddr.addr_line1,'') || ' ' || COALESCE(cntctaddr.addr_line2,vendaddr.addr_line2,'') || ' ' || COALESCE(cntctaddr.addr_line3,vendaddr.addr_line3, '') ~* <? value("addr_street_pattern") ?>)\n<? endif ?>\n<? if exists("addr_city_pattern") ?>\n  AND (COALESCE(cntctaddr.addr_city, vendaddr.addr_city,'') ~* <? value("addr_city_pattern") ?>)\n<? endif ?>\n<? if exists("addr_state_pattern") ?>\n  AND (COALESCE(cntctaddr.addr_state,vendaddr.addr_state,'') ~* <? value("addr_state_pattern") ?>)\n<? endif ?>\n<? if exists("addr_postalcode_pattern") ?>\n  AND (COALESCE(cntctaddr.addr_postalcode,vendaddr.addr_postalcode,'') ~* <? value("addr_postalcode_pattern") ?>)\n<? endif ?>\n<? if exists("addr_country_pattern") ?>\n  AND (COALESCE(cntctaddr.addr_country, vendaddr.addr_country,'') ~* <? value("addr_country_pattern") ?>)\n<? endif ?>\n<? literal("charClause") ?>\nORDER BY vend_number; \n	admin	2015-10-01	0
455	voucher	editlist	 used by voucheringEditList\n indent: order\n            line item\n              credit account\n            line item\n              credit account\n            debit account for entire order\n Copyright (c) 1999-2014 by OpenMFG LLC, d/b/a xTuple.\n See www.xtuple.com/CPAL for the full text of the software license.\n	-- Group: voucher\n-- Name: editlist\n-- Notes: used by voucheringEditList\n-- indent: order\n--            line item\n--              credit account\n--            line item\n--              credit account\n--            debit account for entire order\n-- Copyright (c) 1999-2014 by OpenMFG LLC, d/b/a xTuple.\n-- See www.xtuple.com/CPAL for the full text of the software license.\n\nSELECT orderid, seq,\n       CASE WHEN seq = 0 THEN vouchernumber\n            ELSE ''\n       END AS vouchernumber, ponumber, itemnumber,\n       vendnumber, description, itemtype, iteminvuom, f_qty, cost,\n       'curr' AS cost_xtnumericrole,\n       0 AS cost_xttotalrole,\n       CASE WHEN seq = 3 THEN 1\n            ELSE seq END AS xtindentrole,\n       CASE WHEN findAPAccount(vendid) < 0 THEN 'error'\n       END AS qtforegroundrole\nFROM (SELECT orderid,\n       CASE WHEN length(ponumber) > 0 THEN 0 ELSE 1 END AS seq,\n       vouchernumber, ponumber,\n       CASE WHEN (itemid = 1) THEN invoicenumber\n            ELSE itemnumber END AS itemnumber,\n       CASE WHEN (itemid = 1) THEN itemnumber\n            ELSE ''         END AS vendnumber,\n       vendid, description,\n       itemtype, iteminvuom, f_qty, cost\nFROM voucheringEditList\nUNION\n-- pull out the credits\nSELECT DISTINCT orderid, 2 AS seq, vouchernumber, '' AS ponumber,\n       <? value("credit") ?> AS itemnumber, '' AS vendnumber, vendid,\n       account AS description,\n       '' AS itemtype, '' AS iteminvuom, NULL as f_qty, cost\nFROM voucheringEditList\nWHERE itemid = 2\nUNION\n-- calculate the debits\nSELECT orderid, 3 AS seq, vouchernumber, '' AS ponumber,\n       <? value("debit") ?> AS itemnumber, '' AS vendnumber, vendid,\n       CASE WHEN findAPAccount(vendid) < 0 THEN <? value("notassigned") ?>\n            ELSE formatGLAccountLong(findAPAccount(vendid))\n       END AS description,\n       '' AS itemtype, '' AS iteminvuom, NULL as f_qty,\n       SUM(cost) AS cost\nFROM voucheringEditList\nWHERE itemid = 2\nGROUP BY orderid, vouchernumber, vendid\nORDER BY vouchernumber, ponumber desc, seq) AS sub;\n	admin	2015-10-01	0
466	voucherItem	distributions	 used by voucherItem\n Copyright (c) 1999-2014 by OpenMFG LLC, d/b/a xTuple.\n See www.xtuple.com/CPAL for the full text of the software license.\n	-- Group: voucherItem\n-- Name: distributions\n-- Notes: used by voucherItem\n-- Copyright (c) 1999-2014 by OpenMFG LLC, d/b/a xTuple.\n-- See www.xtuple.com/CPAL for the full text of the software license.\n\nSELECT vodist_id, vodist_amount,\n       COALESCE(costelem_type, <? value("none") ?>) AS costelem_type,\n       'currval' AS vodist_amount_xtnumericrole\nFROM vodist\n     LEFT OUTER JOIN costelem ON (vodist_costelem_id=costelem_id)\nWHERE ( (vodist_poitem_id=<? value("poitem_id") ?>)\n  AND   (vodist_vohead_id=<? value("vohead_id") ?>) );\n	admin	2015-10-01	0
467	voucherItem	receipts	 used by voucherItem\n Copyright (c) 1999-2014 by OpenMFG LLC, d/b/a xTuple.\n See www.xtuple.com/CPAL for the full text of the software license.\n	-- Group: voucherItem\n-- Name: receipts\n-- Notes: used by voucherItem\n-- Copyright (c) 1999-2014 by OpenMFG LLC, d/b/a xTuple.\n-- See www.xtuple.com/CPAL for the full text of the software license.\n\nSELECT recv_id AS item_id, 1 AS item_type, 'REC' AS action,\n       recv_date AS item_date,\n       recv_qty AS qty, 'qty' AS qty_xtnumericrole,\n       recv_purchcost AS unitprice,\n       'purchprice' AS unitprice_xtnumericrole,\n       formatBoolYN(recv_vohead_id=<? value("vohead_id") ?>) AS f_tagged,\n       <? value("receiving") ?> AS action_qtdisplayrole,\n       0 AS qty_xttotalrole\nFROM recv\nWHERE ( (NOT recv_invoiced)\n  AND   (recv_posted)\n  AND   ((recv_vohead_id IS NULL) OR (recv_vohead_id=<? value("vohead_id") ?>))\n  AND   (recv_order_type='PO')\n  AND   (recv_orderitem_id=<? value("poitem_id") ?>) )\n\nUNION\nSELECT poreject_id AS item_id, 2 AS item_type, 'REJ' AS action,\n       poreject_date AS item_date,\n       poreject_qty * -1 AS qty, 'qty',\n       COALESCE(recv_purchcost, poitem_unitprice) AS unitprice,\n       'purchprice' AS unitprice_xtnumericrole,\n       formatBoolYN(poreject_vohead_id=<? value("vohead_id") ?>) AS f_tagged,\n       <? value("reject") ?> AS action_qtdisplayrole,\n       0 AS qty_xttotalrole\nFROM poreject LEFT OUTER JOIN recv ON (recv_id=poreject_recv_id)\n              LEFT OUTER JOIN poitem ON (poitem_id=poreject_poitem_id)\nWHERE ( (poreject_posted)\n  AND   (NOT poreject_invoiced)\n  AND   ((poreject_vohead_id IS NULL) OR (poreject_vohead_id=<? value("vohead_id") ?>))\n  AND   (poreject_poitem_id=<? value("poitem_id") ?>) );\n	admin	2015-10-01	0
305	voucherRegister	detail	 used by dspVoucherRegister\n Copyright (c) 1999-2014 by OpenMFG LLC, d/b/a xTuple.\n See www.xtuple.com/CPAL for the full text of the software license.\n	-- Group: voucherRegister\n-- Name: detail\n-- Notes: used by dspVoucherRegister\n-- Copyright (c) 1999-2014 by OpenMFG LLC, d/b/a xTuple.\n-- See www.xtuple.com/CPAL for the full text of the software license.\n\nSELECT gltrans_id, gltrans_date,\n       vend_number, vend_name,\n       gltrans_doctype, gltrans_docnumber, firstLine(gltrans_notes) AS reference,\n       (formatGLAccount(accnt_id) || ' - ' || accnt_descrip) AS account,\n       CASE WHEN (gltrans_amount < 0) THEN ABS(gltrans_amount)\n         ELSE 0\n       END AS debit,\n       CASE WHEN (gltrans_amount > 0) THEN gltrans_amount\n         ELSE 0\n       END AS credit,\n       gltrans_username,\n       'curr' AS debit_xtnumericrole,\n       'curr' AS credit_xtnumericrole\nFROM accnt, gltrans LEFT OUTER JOIN vohead JOIN vendinfo\n                               ON (vohead_vend_id=vend_id)\n                    ON (gltrans_doctype='VO' and gltrans_docnumber=vohead_number)\nWHERE ((gltrans_accnt_id=accnt_id)\n   AND (gltrans_date BETWEEN <? value("startDate") ?> AND <? value("endDate") ?>)\n   AND (gltrans_source='A/P')\n<? if exists("accnt_id") ?>\n   AND (gltrans_accnt_id=<? value("accnt_id") ?>)\n<? endif ?>\n      )\nORDER BY gltrans_created DESC, gltrans_sequence, gltrans_amount;\n	admin	2015-10-01	0
306	whereUsed	detail	 used by dspSingleLevelWhereUsed, dspIndentedWhereUsed\n Copyright (c) 1999-2014 by OpenMFG LLC, d/b/a xTuple.\n See www.xtuple.com/CPAL for the full text of the software license.\n	-- Group: whereUsed\n-- Name: detail\n-- Notes: used by dspSingleLevelWhereUsed, dspIndentedWhereUsed\n-- Copyright (c) 1999-2014 by OpenMFG LLC, d/b/a xTuple.\n-- See www.xtuple.com/CPAL for the full text of the software license.\n\nSELECT <? if exists("byIndented") ?>\n         bomwork_id, item_id, bomwork_parent_id,\n         bomworkitemsequence(bomwork_id) AS seqord, \n         bomwork_seqnumber, item_number,\n         bomwork_qtyfxd ,bomwork_qtyper,\n         'qty' AS bomwork_qtyfxd_xtnumericrole,\n         'qtyper' AS bomwork_qtyper_xtnumericrole,\n         'scrap' AS bomwork_scrap_xtnumericrole,\n         bomwork_scrap,\n         bomwork_effective,\n         bomwork_expires,\n         CASE WHEN COALESCE(bomwork_effective,startOfTime())=startOfTime() \n              THEN 'Always' \n         END AS bomwork_effective_qtdisplayrole,\n         CASE WHEN COALESCE(bomwork_expires,endOfTime())=endOfTime() \n              THEN 'Never' \n         END AS bomwork_expires_qtdisplayrole,\n         bomwork_level - 1 AS xtindentrole, \n       <? else ?>\n         bomitem_parent_item_id, item_id, bomitem_seqnumber,\n         item_number,\n         itemuomtouomratio(bomitem_item_id, bomitem_uom_id, NULL) * bomitem_qtyfxd AS qtyfxd,\n         itemuomtouomratio(bomitem_item_id, bomitem_uom_id, NULL) * bomitem_qtyper AS qtyper,\n         'qty' AS qtyfxd_xtnumericrole,\n         'qtyper' AS qtyper_xtnumericrole,\n         'scrap' AS bomitem_scrap_xtnumericrole,\n         bomitem_scrap,\n         bomitem_effective, bomitem_expires,\n         CASE WHEN (COALESCE(bomitem_effective, startoftime()) = startoftime()) \n              THEN 'Always' \n         END AS bomitem_effective_qtdisplayrole,\n         CASE WHEN (COALESCE(bomitem_expires, endoftime()) = endoftime()) \n              THEN 'Never' \n         END AS bomitem_expires_qtdisplayrole,\n-- formatted for report\n         item_descrip1, item_descrip2,\n         formatQty(itemuomtouomratio(bomitem_item_id, bomitem_uom_id, NULL) * bomitem_qtyfxd) AS f_qtyfxd,\n         formatQtyper(itemuomtouomratio(bomitem_item_id, bomitem_uom_id, NULL) * bomitem_qtyper) AS f_qtyper,\n         formatScrap(bomitem_scrap) AS f_scrap,\n         formatDate(bomitem_effective, <? value("Always") ?>) AS f_effective,\n         formatDate(bomitem_expires, <? value("Never") ?>) AS f_expires,\n         formatBoolYN(bomitem_createwo) AS f_createwo,\n         CASE WHEN (bomitem_issuemethod='S') THEN <? value("Push") ?>\n              WHEN (bomitem_issuemethod='L') THEN <? value("Pull") ?>\n              WHEN (bomitem_issuemethod='M') THEN <? value("Mixed") ?>\n              ELSE <? value("Special") ?>\n         END AS f_issuemethod,\n         formatQtyper(itemuomtouomratio(bomitem_item_id, bomitem_uom_id, NULL) * (bomitem_qtyfxd + bomitem_qtyper) * (1 + bomitem_scrap)) as f_qtyreq,\n       <? endif ?>\n       (item_descrip1 || ' ' || item_descrip2) AS descrip,\n       uom_name\nFROM item, uom, \n     <? if exists("byIndented") ?>\n       bomwork\n     <? else ?> \n       bomitem\n     <? endif ?>\nWHERE ((item_inv_uom_id=uom_id)\n        <? if exists("byIndented") ?>\n          AND (bomwork_item_id=item_id)\n          AND (bomwork_set_id=<? value("bomworkset_id") ?>)\n          <? if not exists("showExpired") ?>\n            AND (bomwork_expires > CURRENT_DATE)\n          <? endif ?>\n          <? if not exists("showFuture") ?>\n            AND (bomwork_effective <= CURRENT_DATE)\n          <? endif ?>\n        <? else ?>\n          AND (bomitem_parent_item_id=item_id)\n          AND (bomitem_item_id=<? value("item_id") ?>)\n          AND (bomitem_rev_id=getActiveRevId('BOM',bomitem_parent_item_id))\n          <? if not exists("notEffective") ?>\n            AND (CURRENT_DATE BETWEEN bomitem_effective AND (bomitem_expires-1)) \n          <? else ?>\n           AND (<? value("effective") ?> BETWEEN bomitem_effective AND (bomitem_expires-1))\n          <? endif ?>\n        <? endif ?>         \n      )\n<? if exists("byIndented") ?>\nORDER BY seqord\n<? else ?>\nORDER BY item_number\n<? endif ?>\n;\n	admin	2015-10-01	0
93	workOrderHistory	detail	 used by dspWoHistoryByNumber, dspWoHistoryByItem, dspWoHistoryByClassCode\n Copyright (c) 1999-2014 by OpenMFG LLC, d/b/a xTuple.\n See www.xtuple.com/CPAL for the full text of the software license.\n	-- Group: workOrderHistory\n-- Name: detail\n-- Notes: used by dspWoHistoryByNumber, dspWoHistoryByItem, dspWoHistoryByClassCode\n-- Copyright (c) 1999-2014 by OpenMFG LLC, d/b/a xTuple.\n-- See www.xtuple.com/CPAL for the full text of the software license.\n\nSELECT\n<? if exists("woHistoryByClassCode") ?>\n       wo_id, formatWoNumber(wo_id) AS wonumber, wo_status,\n       wo_qtyord, wo_qtyrcv, wo_postedvalue,\n       wo_startdate, wo_duedate,\n<? elseif exists("woHistoryByItem") ?>\n       wo_id, formatWoNumber(wo_id) AS wonumber, wo_status,\n       wo_qtyord, wo_qtyrcv, wo_postedvalue,\n       wo_startdate, wo_duedate,\n<? else ?>\n       wo.*, COALESCE((prj_number || ' ' || prj_name), '') AS project,\n  <? if exists("revControl") ?>\n       COALESCE(bom.rev_number, '') AS bom_rev_number,\n       COALESCE(boo.rev_number, '') AS boo_rev_number,\n  <? endif ?>\n       'cost' AS wo_wipvalue_xtnumericrole,\n<? endif ?>\n<? if not exists("woHistoryByItem") ?>\n       item_number, (item_descrip1 || ' ' || item_descrip2) AS itemdescrip,\n       item_descrip1, item_descrip2, uom_name,\n<? endif ?>\n       warehous_code,\n       formatDate(wo_startdate) AS f_wo_startdate,\n       formatDate(wo_duedate) AS f_wo_duedate,\n       formatQty(wo_qtyord) AS f_wo_qtyord,\n       formatQty(wo_qtyrcv) AS f_wo_qtyrcv,\n     <? if exists("showCosts") ?>\n       formatCost(wo_postedvalue) AS f_wo_postedvalue,\n     <? endif ?>\n       'qty' AS wo_qtyord_xtnumericrole,\n       'qty' AS wo_qtyrcv_xtnumericrole,\n       'cost' AS wo_postedvalue_xtnumericrole\nFROM wo JOIN itemsite ON (itemsite_id=wo_itemsite_id)\n        JOIN whsinfo ON (warehous_id=itemsite_warehous_id)\n<? if not exists("woHistoryByItem") ?>\n        JOIN item ON (item_id=itemsite_item_id)\n        JOIN uom ON (uom_id=item_inv_uom_id)\n<? endif ?>\n<? if exists("revControl") ?>\n        LEFT OUTER JOIN rev bom ON (bom.rev_id=wo_bom_rev_id)\n        LEFT OUTER JOIN rev boo ON (boo.rev_id=wo_boo_rev_id)\n<? endif ?>\n        LEFT OUTER JOIN prj ON (prj_id=wo_prj_id)\nWHERE ((true)\n<? if exists("woHistoryByItem") ?>\n   AND (itemsite_item_id=<? value("item_id") ?>)\n   AND (wo_duedate BETWEEN <? value("startDate") ?> AND <? value("endDate") ?>)\n<? endif ?>\n<? if exists("warehous_id") ?>\n   AND (itemsite_warehous_id=<? value("warehous_id") ?>)\n<? endif ?>\n<? if exists("wo_number") ?>\n   AND (CAST(wo_number AS TEXT) ~ <? value("wo_number") ?>)\n<? endif ?>\n<? if exists("woHistoryByClassCode") ?>\n   AND (itemsite_item_id=item_id)\n   AND (wo_duedate BETWEEN <? value("startDate") ?> AND <? value("endDate") ?>)\n  <? if exists("classcode_id") ?>\n    AND (item_classcode_id=<? value("classcode_id") ?>)\n  <? elseif exists("classcode_pattern") ?>\n    AND (item_classcode_id IN (SELECT classcode_id FROM classcode\n                               WHERE (classcode_code ~ <? value("classcode_pattern") ?>)))\n  <? endif ?>\n<? endif ?>\n<? if exists("showOnlyTopLevel") ?>\n   AND ((wo_ordtype<>'W') OR (wo_ordtype IS NULL))\n<? endif ?>\n      )\n\n<? if exists("woHistoryByItem") ?>\n  ORDER BY wo_startdate DESC, wo_number, wo_subnumber\n<? elseif exists("woHistoryByClassCode") ?>\n  ORDER BY item_number\n<? else ?>\n  ORDER BY wo_number, wo_subnumber\n<? endif ?>\n;\n	admin	2015-10-01	0
132	workOrderMaterial	detail	 used by dspWoMaterialsByItem, dspWoMaterialsByWorkOrder\n Copyright (c) 1999-2014 by OpenMFG LLC, d/b/a xTuple.\n See www.xtuple.com/CPAL for the full text of the software license.\n	-- Group: workOrderMaterial\n-- Name: detail\n-- Notes: used by dspWoMaterialsByItem, dspWoMaterialsByWorkOrder\n-- Copyright (c) 1999-2014 by OpenMFG LLC, d/b/a xTuple.\n-- See www.xtuple.com/CPAL for the full text of the software license.\n\nSELECT womatl.*, formatWONumber(wo_id) AS wonumber, item_number,\n       item_descrip1, item_descrip2,\n<? if exists("Manufacturing") ?>\n       formatwooperseq(womatl_wooper_id) AS wooperseq,\n<? endif ?>\n       CASE WHEN (womatl_issuemethod = 'S') THEN <? value("push") ?>\n            WHEN (womatl_issuemethod = 'L') THEN <? value("pull") ?>\n            WHEN (womatl_issuemethod = 'M') THEN <? value("mixed") ?>\n            ELSE <? value("error") ?>\n       END AS issuemethod,\n       uom_name,\n       noNeg(womatl_qtyreq - womatl_qtyiss) AS balance,\n<? if exists("isReport") ?>\n       formatDate(womatl_duedate) AS f_duedate,\n       formatQty(womatl_qtyfxd) AS f_qtyfxd,\n       formatQtyPer(womatl_qtyper) AS f_qtyper,\n       formatPrcnt(womatl_scrap) AS f_scrap,\n       formatQty(womatl_qtyreq) AS f_qtyreq,\n       formatQty(womatl_qtyiss) AS f_qtyiss,\n       formatQty(womatl_qtywipscrap) AS f_qtywipscrap,\n       formatQty(noNeg(womatl_qtyreq - womatl_qtyiss)) AS f_balance,\n<? endif ?>\n       CASE WHEN (womatl_duedate <= CURRENT_DATE) THEN 'error' END AS womatl_duedate_qtforegroundrole,\n       'qty' AS womatl_qtyfxd_xtnumericrole,\n       'qtyper' AS womatl_qtyper_xtnumericrole,\n       'percent' AS womatl_scrap_xtnumericrole,\n       'qty' AS womatl_qtyreq_xtnumericrole,\n       'qty' AS womatl_qtyiss_xtnumericrole,\n       'qty' AS womatl_qtywipscrap_xtnumericrole,\n       'qty' AS balance_xtnumericrole,\n       0 AS womatl_qtyreq_xttotalrole,\n       0 AS womatl_qtyiss_xttotalrole,\n       0 AS womatl_qtywipscrap_xttotalrole,\n       0 AS balance_xttotalrole\nFROM wo JOIN womatl ON (womatl_wo_id=wo_id)\n        JOIN uom ON (uom_id=womatl_uom_id)\n        JOIN itemsite parentsite ON (parentsite.itemsite_id=wo_itemsite_id)\n        JOIN itemsite componentsite ON (componentsite.itemsite_id=womatl_itemsite_id)\n<? if exists("item_id") ?>\n        JOIN item ON (item_id=parentsite.itemsite_item_id)\n<? elseif exists("wo_id") ?>\n        JOIN item ON (item_id=componentsite.itemsite_item_id)\n<? endif ?>\nWHERE (1=1)\n<? if exists("item_id") ?>\n  AND (componentsite.itemsite_item_id=<? value("item_id") ?>)\n  AND (wo_status <> 'C')\n<? endif ?>\n<? if exists("warehous_id") ?>\n  AND (componentsite.itemsite_warehous_id=<? value("warehous_id") ?>)\n<? endif ?>\n<? if exists("wo_id") ?>\n  AND (wo_id=<? value("wo_id") ?>)\n<? endif ?>\n<? if exists("item_id") ?>\nORDER BY wo_startdate, item_number\n<? endif ?>\n<? if exists("wo_id") ?>\n  <? if exists("Manufacturing") ?>\n  ORDER BY wooperseq, item_number\n  <? else ?>\n  ORDER BY item_number\n  <? endif ?>\n<? endif ?>\n;\n	admin	2015-10-01	0
115	workOrderSchedule	detail	 \n Copyright (c) 1999-2014 by OpenMFG LLC, d/b/a xTuple.\n See www.xtuple.com/CPAL for the full text of the software license.\n	-- Group: workOrderSchedule\n-- Name:  detail\n-- Notes: \n-- Copyright (c) 1999-2014 by OpenMFG LLC, d/b/a xTuple.\n-- See www.xtuple.com/CPAL for the full text of the software license.\n\nSELECT wo_id,\n       CASE WHEN (wo_ordid IS NULL) THEN -1\n            ELSE wo_ordid\n       END AS orderid,\n       wo.*, warehous_code, uom_name,\n       item_number, (item_descrip1 || ' ' || item_descrip2) AS itemdescrip,\n       item_descrip1, item_descrip2, prj_number,\n       CASE wo_ordtype WHEN ('S') THEN formatSoitemNumber(wo_ordid)\n                       WHEN ('W') THEN formatWoNumber(wo_ordid)\n       END AS parentorder,\n       formatQty(wo_qtyord) AS ordered,\n       formatQty(wo_qtyrcv) AS received,\n       formatDate(wo_startdate) AS startdate,\n       formatDate(wo_duedate) AS duedate,\n       formatWONumber(wo_id) AS wonumber,\n       'qty' AS wo_qtyord_xtnumericrole,\n       'qty' AS wo_qtyrcv_xtnumericrole,\n       CASE WHEN ((wo_startdate<=CURRENT_DATE) AND (wo_status IN ('O','E','S','R'))) THEN 'error'\n       END AS wo_startdate_qtforegroundrole,\n       CASE WHEN (wo_duedate<=CURRENT_DATE) THEN 'error'\n       END AS wo_duedate_qtforegroundrole,\n       CASE WHEN (wo_duedate<=CURRENT_DATE) THEN <? value("overdue") ?>\n            ELSE <? value("ontime") ?>\n       END AS condition,\n       CASE WHEN (wo_duedate<=CURRENT_DATE) THEN 'error' END AS condition_qtforegroundrole,\n       CASE wo_status WHEN ('O') THEN <? value("open") ?>\n                      WHEN ('E') THEN <? value("exploded") ?>\n                      WHEN ('R') THEN <? value("released") ?>\n                      WHEN ('I') THEN <? value("inprocess") ?>\n                      WHEN ('C') THEN <? value("closed") ?>\n                      ELSE '?'\n       END AS wo_status_qtdisplayrole,\n       CASE wo_ordtype WHEN ('')  THEN ''\n                       WHEN ('W') THEN <? value("wo") ?>\n                       WHEN ('M') THEN <? value("planord") ?>\n                       WHEN ('P') THEN <? value("mps") ?>\n                       WHEN ('S') THEN <? value("so") ?>\n                       ELSE '?'\n       END AS wo_ordtype_qtdisplayrole\nFROM wo JOIN itemsite ON (itemsite_id=wo_itemsite_id)\n        JOIN item ON (item_id=itemsite_item_id)\n        JOIN uom ON (uom_id=item_inv_uom_id)\n        JOIN whsinfo ON (warehous_id=itemsite_warehous_id)\n        LEFT OUTER JOIN prj ON (prj_id=wo_prj_id)\n<? if reExists("woSoStatus") ?>\n        JOIN coitem ON ((coitem_order_id=wo_id) AND (coitem_order_type='W'))\n<? endif ?>\nWHERE ( (true)\n<? if exists("search_pattern") ?>\n  AND ( (wo_number::TEXT ~* <? value("search_pattern") ?>)\n    OR  (item_number ~* <? value("search_pattern") ?>)\n    OR  (item_descrip1 || item_descrip2 ~* <? value("search_pattern") ?>) )\n<? endif ?>\n<? if exists("woSoStatus") ?>\n  AND (coitem_status <> 'X')\n<? elseif exists("woSoStatusMismatch") ?>\n  AND (coitem_status='C')\n<? endif ?>\n<? if exists("prj_id") ?>\n  AND (wo_prj_id=<? value("prj_id") ?>)\n<? endif ?>\n<? if exists("startDate") ?>\n  AND (wo_startdate >= <? value("startDate") ?>)\n<? endif ?>\n<? if exists("endDate") ?>\n  AND (wo_startdate <= <? value("endDate") ?>)\n<? endif ?>\n<? if exists("warehous_id") ?>\n  AND (itemsite_warehous_id=<? value("warehous_id") ?>)\n<? endif ?>\n<? if exists("item_id") ?>\n  AND (itemsite_item_id=<? value("item_id") ?>)\n<? endif ?>\n<? if exists("wo_id") ?>\n  AND (wo_number IN (SELECT wo_number\n                     FROM wo\n                     WHERE (wo_id=<? value("wo_id") ?>)))\n<? endif ?>\n<? if exists("status_list") ?>\n<? foreach("status_list") ?>\n  <? if isfirst("status_list") ?>\n    AND (wo_status=<? value("status_list") ?>\n  <? else ?>\n    OR wo_status=<? value("status_list") ?>\n  <? endif ?>\n  <? if islast("status_list") ?>\n    )\n  <? endif ?>\n<? endforeach ?>\n<? elseif exists("showOnlyRI") ?>\n  AND (wo_status IN ('R','I'))\n<? else ?>\n  AND (wo_status<>'C')\n<? endif ?>\n<? if exists("showOnlyTopLevel") ?>\n  AND (wo_ordtype<>'W')\n<? endif ?>\n<? if exists("classcode_id") ?>\n  AND (item_classcode_id=<? value("classcode_id") ?>)\n<? endif ?>\n<? if exists("itemgrp_id") ?>\n  AND (item_id IN (SELECT itemgrpitem_item_id\n                   FROM itemgrpitem\n                   WHERE (itemgrpitem_itemgrp_id=<? value("itemgrp_id") ?>)))\n<? endif ?>\n<? if exists("plancode_id") ?>\n  AND (itemsite_plancode_id=<? value("plancode_id") ?>)\n<? endif ?>\n<? if exists("wrkcnt_id") ?>\n  AND (wo_id IN (SELECT wooper_wo_id\n                 FROM wooper\n                 WHERE (wooper_wrkcnt_id=<? value("wrkcnt_id") ?>)))\n<? endif ?>\n<? if exists("classcode_pattern") ?>\n  AND (item_classcode_id IN (SELECT classcode_id\n                             FROM classcode\n                             WHERE (classcode_code ~ <? value("classcode_pattern") ?>)))\n<? endif ?>\n<? if exists("itemgrp_pattern") ?>\n  AND (item_id IN (SELECT itemgrpitem_item_id\n                   FROM itemgrpitem, itemgrp\n                   WHERE ( (itemgrpitem_itemgrp_id=itemgrp_id) AND (itemgrp_name ~ <? value("itemgrp_pattern") ?>) ) ))\n<? endif ?>\n<? if exists("plancode_pattern") ?>\n  AND (itemsite_plancode_id IN (SELECT plancode_id\n                                FROM plancode\n                                WHERE (plancode_code ~ <? value("plancode_pattern") ?>)))\n<? endif ?>\n<? if exists("wrkcnt_pattern") ?>\n  AND (wo_id IN (SELECT wooper_wo_id\n                 FROM wooper, wrkcnt\n                 WHERE ((wooper_wrkcnt_id=wrkcnt_id) AND (wrkcnt_code ~ <? value("wrkcnt_pattern") ?>))))\n<? endif ?>\n   )\nORDER BY \n<? if exists("sortByStartDate") ?>\n  wo_startdate,\n<? elseif exists("sortByDueDate") ?>\n  wo_duedate,\n<? elseif exists("sortByItemNumber") ?>\n  item_number,\n<? endif ?>\n  wo_number, wo_subnumber;\n	admin	2015-10-01	0
116	workOrderSchedule	parameterlist	 used by dspWoScheduleByParameterList\n Copyright (c) 1999-2014 by OpenMFG LLC, d/b/a xTuple.\n See www.xtuple.com/CPAL for the full text of the software license.\n	-- Group: workOrderSchedule\n-- Name: parameterlist\n-- Notes: used by dspWoScheduleByParameterList\n-- Copyright (c) 1999-2014 by OpenMFG LLC, d/b/a xTuple.\n-- See www.xtuple.com/CPAL for the full text of the software license.\n\nSELECT wo_id,\n       CASE WHEN (wo_ordid IS NULL) THEN -1\n            ELSE wo_ordid\n       END AS orderid,\n       wo.*, warehous_code, uom_name,\n       item_number, (item_descrip1 || ' ' || item_descrip2) AS itemdescrip,\n       item_descrip1, item_descrip2,\n       formatQty(wo_qtyord) AS ordered,\n       formatQty(wo_qtyrcv) AS received,\n       formatDate(wo_startdate) AS startdate,\n       formatDate(wo_duedate) AS duedate,\n       formatWONumber(wo_id) AS wonumber,\n       'qty' AS wo_qtyord_xtnumericrole,\n       'qty' AS wo_qtyrcv_xtnumericrole,\n       CASE WHEN ((wo_startdate<=CURRENT_DATE) AND (wo_status IN ('O','E','S','R'))) THEN 'error'\n       END AS wo_startdate_qtforegroundrole,\n       CASE WHEN (wo_duedate<=CURRENT_DATE) THEN 'error'\n       END AS wo_duedate_qtforegroundrole,\n       CASE WHEN (wo_duedate<=CURRENT_DATE) THEN 'Overdue'\n            ELSE 'On Time'\n       END AS condition,\n       CASE WHEN (wo_duedate<=CURRENT_DATE) THEN 'error' END AS condition_qtforegroundrole\nFROM wo, itemsite, whsinfo, item, uom\nWHERE ( (wo_itemsite_id=itemsite_id)\n  AND (itemsite_item_id=item_id)\n  AND (item_inv_uom_id=uom_id)\n  AND (itemsite_warehous_id=warehous_id)\n  AND (wo_startdate BETWEEN <? value("startDate") ?> AND <? value("endDate") ?>)\n<? if exists("warehous_id") ?>\n  AND (itemsite_warehous_id=<? value("warehous_id") ?>)\n<? endif ?>\n<? if exists("item_id") ?>\n  AND (itemsite_item_id=<? value("item_id") ?>)\n<? endif ?>\n<? if exists("wo_id") ?>\n  AND (wo_number IN (SELECT wo_number\n                     FROM wo\n                     WHERE (wo_id=<? value("wo_id") ?>)))\n<? endif ?>\n<? if exists("status_list") ?>\n  AND (wo_status IN (\n<? foreach("status_list") ?>\n  <? if not isfirst("status_list") ?>\n    ,\n  <? endif ?>\n  <? value("status_list") ?>\n<? endforeach ?> ))\n<? elseif exists("showOnlyRI") ?>\n  AND (wo_status IN ('R','I'))\n<? else ?>\n  AND (wo_status<>'C')\n<? endif ?>\n<? if exists("showOnlyTopLevel") ?>\n  AND (wo_ordtype<>'W')\n<? endif ?>\n<? if exists("classcode_id") ?>\n  AND (item_classcode_id=<? value("classcode_id") ?>)\n<? elseif exists("itemgrp_id") ?>\n  AND (item_id IN (SELECT itemgrpitem_item_id\n                   FROM itemgrpitem\n                   WHERE (itemgrpitem_itemgrp_id=<? value("itemgrp_id") ?>)))\n<? elseif exists("plancode_id") ?>\n  AND (itemsite_plancode_id=<? value("plancode_id") ?>)\n<? elseif exists("wrkcnt_id") ?>\n  AND (wo_id IN (SELECT wooper_wo_id\n                 FROM wooper\n                 WHERE (wooper_wrkcnt_id=<? value("wrkcnt_id") ?>)))\n<? elseif exists("classcode_pattern") ?>\n  AND (item_classcode_id IN (SELECT classcode_id\n                             FROM classcode\n                             WHERE (classcode_code ~ <? value("classcode_pattern") ?>)))\n<? elseif exists("itemgrp_pattern") ?>\n  AND (item_id IN (SELECT itemgrpitem_item_id\n                   FROM itemgrpitem, itemgrp\n                   WHERE ( (itemgrpitem_itemgrp_id=itemgrp_id) AND (itemgrp_name ~ <? value("itemgrp_pattern") ?>) ) ))\n<? elseif exists("plancode_pattern") ?>\n  AND (itemsite_plancode_id IN (SELECT plancode_id\n                                FROM plancode\n                                WHERE (plancode_code ~ <? value("plancode_pattern") ?>)))\n<? elseif exists("wrkcnt_pattern") ?>\n  AND (wo_id IN (SELECT wooper_wo_id\n                 FROM wooper, wrkcnt\n                 WHERE ((wooper_wrkcnt_id=wrkcnt_id) AND (wrkcnt_code ~ <? value("wrkcnt_pattern") ?>))))\n<? endif ?>\n<? if exists("wo_username") ?>\n  AND (wo_username=<? value("wo_username") ?>)\n<? endif ?>\n   )\nORDER BY \n<? if exists("sortByStartDate") ?>\n  wo_startdate,\n<? elseif exists("sortByDueDate") ?>\n  wo_duedate,\n<? elseif exists("sortByItemNumber") ?>\n  item_number,\n<? endif ?>\n  wo_number, wo_subnumber;\n	admin	2015-10-01	0
128	workOrderVariance	material	 used by dspMaterialUsageVarianceByBOMItem, dspMaterialUsageVarianceByComponentItem,\n                dspMaterialUsageVarianceByItem, dspMaterialUsageVarianceByWarehouse,\n                dspMaterialUsageVarianceByWorkOrder\n Copyright (c) 1999-2014 by OpenMFG LLC, d/b/a xTuple.\n See www.xtuple.com/CPAL for the full text of the software license.\n	-- Group: workOrderVariance\n-- Name: material\n-- Notes: used by dspMaterialUsageVarianceByBOMItem, dspMaterialUsageVarianceByComponentItem,\n--                dspMaterialUsageVarianceByItem, dspMaterialUsageVarianceByWarehouse,\n--                dspMaterialUsageVarianceByWorkOrder\n-- Copyright (c) 1999-2014 by OpenMFG LLC, d/b/a xTuple.\n-- See www.xtuple.com/CPAL for the full text of the software license.\n\nSELECT womatlvar_id, posted, \n       parentitemnumber, parentdescrip,\n       componentitemnumber, componentdescrip,\n       ordered, received,\n       projreq, projqtyper,\n       actiss, actqtyper,\n       (actqtyper - projqtyper) AS qtypervar,\n       CASE WHEN (actqtyper=projqtyper) THEN 0\n            WHEN (projqtyper=0) THEN actqtyper\n            ELSE ((1 - (actqtyper / projqtyper)) * -1)\n       END AS qtypervarpercent,\n       womatlvar_notes, womatlvar_ref,\n<? if exists("isReport") ?>\n       formatDate(posted) AS f_posted,\n       formatQty(ordered) AS f_ordered,\n       formatQty(received) AS f_received,\n       formatQty(projreq) AS f_projreq,\n       formatQtyPer(projqtyper) AS f_projqtyper,\n       formatQty(actiss) AS f_actiss,\n       formatQty(actqtyper) AS f_actqtyper,\n       formatQty(actqtyper - projqtyper) AS f_qtypervar,\n       CASE WHEN (actqtyper=projqtyper) THEN formatQty(0)\n            WHEN (projqtyper=0) THEN formatQty(actqtyper)\n            ELSE formatPrcnt((1 - (actqtyper / projqtyper)) * -1)\n       END AS f_qtypervarpercent,\n<? endif ?>\n       'qty' AS ordered_xtnumericrole,\n       'qty' AS received_xtnumericrole,\n       'qty' AS projreq_xtnumericrole,\n       'qtyper' AS projqtyper_xtnumericrole,\n       'qty' AS actiss_xtnumericrole,\n       'qtyper' AS actqtyper_xtnumericrole,\n       'qtyper' AS qtypervar_xtnumericrole,\n       'percent' AS qtypervarpercent_xtnumericrole\nFROM ( SELECT womatlvar_id, womatlvar_posted AS posted,\n              parentitem.item_number AS parentitemnumber,\n              parentitem.item_descrip1 || ' ' || parentitem.item_descrip2 as parentdescrip,\n              componentitem.item_number AS componentitemnumber,\n              componentitem.item_descrip1 || ' ' || componentitem.item_descrip2 as componentdescrip,\n              womatlvar_notes, womatlvar_ref,\n              womatlvar_qtyord AS ordered, womatlvar_qtyrcv AS received,\n              ((womatlvar_qtyfxd + womatlvar_qtyrcv * womatlvar_qtyper) * (1 + womatlvar_scrap)) AS projreq,\n              womatlvar_qtyper AS projqtyper,\n              (womatlvar_qtyiss) AS actiss, (NONEG(womatlvar_qtyiss - womatlvar_qtyfxd) / (womatlvar_qtyrcv * (1 + womatlvar_scrap))) AS actqtyper\n       FROM womatlvar LEFT OUTER JOIN wo ON ( (wo_number=womatlvar_number) AND\n                                              (wo_subnumber=womatlvar_subnumber) )\n                      LEFT OUTER JOIN itemsite parent ON (parent.itemsite_id=womatlvar_parent_itemsite_id)\n                      LEFT OUTER JOIN item parentitem ON (parentitem.item_id=parent.itemsite_item_id)\n                      LEFT OUTER JOIN itemsite component ON (component.itemsite_id=womatlvar_component_itemsite_id)\n                      LEFT OUTER JOIN item componentitem ON (componentitem.item_id=component.itemsite_item_id)\n       WHERE ( (1=1)\n<? if exists("startDate") ?>\n         AND   (womatlvar_posted BETWEEN <? value("startDate") ?> AND <? value("endDate") ?>)\n<? endif ?>\n<? if exists("wo_id") ?>\n         AND   (wo_id=<? value("wo_id") ?>)\n<? endif ?>\n<? if exists("warehous_id") ?>\n         AND   (parent.itemsite_warehous_id=<? value("warehous_id") ?>)\n<? endif ?>\n<? if exists("item_id") ?>\n         AND   (parent.itemsite_item_id=<? value("item_id") ?>)\n<? endif ?>\n<? if exists("bomitem_id") ?>\n         AND   (womatlvar_bomitem_id=<? value("bomitem_id") ?>)\n<? endif ?>\n<? if exists("component_item_id") ?>\n         AND   (component.itemsite_item_id=<? value("component_item_id") ?>)\n<? endif ?>\n             ) ) AS data\nORDER BY posted;\n	admin	2015-10-01	0
\.


--
-- Name: metasql_metasql_id_seq; Type: SEQUENCE SET; Schema: public; Owner: admin
--

SELECT pg_catalog.setval('metasql_metasql_id_seq', 494, true);


--
-- Data for Name: metric; Type: TABLE DATA; Schema: public; Owner: admin
--

COPY metric (metric_id, metric_name, metric_value, metric_module) FROM stdin;
22	FreightAccount	1	\N
23	DefaultARAccount	2	\N
44	DefaultAPAccount	3	\N
20	InvoiceCustomer	t	\N
21	InvoiceBilling	0	\N
51	DatabaseName!	Schema Benchmark	\N
70	InvoiceWatermark2		\N
71	InvoiceShowPrices2	102	\N
72	InvoiceWatermark3		\N
73	InvoiceShowPrices3	102	\N
49	AccountingSystemImportPath	C:/OpenMFG	\N
50	AccountingSystemExportPath	C:/OpenMFG	\N
78	CreditMemoWatermark2		\N
79	CreditMemoShowPrices2	116	\N
80	CreditMemoWatermark3		\N
81	CreditMemoShowPrices3	116	\N
48	AccountingSystem	Native	\N
2	DefaultEventFence	10	\N
62	MaxLocationNameSize	10	\N
3	PostCountTagToDefault	f	\N
4	CountSlipAuditing	B	\N
14	AllowDiscounts	t	\N
15	AllowASAPShipSchedules	t	\N
16	CONumberGeneration	A	\N
17	QUNumberGeneration	A	\N
18	CMNumberGeneration	A	\N
24	DefaultShipFormId	-1	\N
26	DefaultPartialShipments	t	\N
27	DefaultBackOrders	t	\N
28	DefaultFreeFormShiptos	t	\N
31	DefaultBalanceMethod	B	\N
32	BOLShipper	t	\N
33	BOLCustomer	f	\N
34	BOLTraffic	f	\N
35	BOLBilling	f	\N
36	BOLMisc	0	\N
37	PONumberGeneration	A	\N
38	VoucherNumberGeneration	A	\N
39	PrNumberGeneration	A	\N
40	POAllowFFVendorAddresses	t	\N
43	DefaultPOShipVia	UPS	\N
53	CustListSerial	30	\N
8	AutoExplodeSO	t	\N
10	ExplodeSOEffective	E	\N
11	SOExplosionLevel	M	\N
84	AutoExplodeWO	t	\N
86	ExplodeWOEffective	S	\N
87	WOExplosionLevel	M	\N
12	PostMaterialVariances	t	\N
13	PostLaborVariances	t	\N
90	ItemSiteChangeLog	t	\N
91	WarehouseChangeLog	t	\N
92	AllowInactiveBomItems	f	\N
6	DefaultSoldItemsExclusive	f	\N
93	ItemChangeLog	t	\N
7	DefaultWomatlIssueMethod	M	\N
94	DefaultMSCalendar	-1	\N
85	WorkOrderChangeLog	t	\N
9	WONumberGeneration	A	\N
95	POChangeLog	t	\N
96	VendorChangeLog	t	\N
97	CustomerChangeLog	t	\N
98	SalesOrderChangeLog	t	\N
99	RestrictCreditMemos	f	\N
100	AutoSelectForBilling	t	\N
101	AlwaysShowSaveAndAdd	t	\N
102	DisableSalesOrderPriceOverride	f	\N
103	AutoAllocateCreditMemos	f	\N
104	HideSOMiscCharge	f	\N
105	EnableSOShipping	t	\N
25	DefaultShipViaId	-1	\N
106	DefaultCustType	-1	\N
29	SOCreditLimit	0	\N
30	SOCreditRate	Not Checked	\N
107	InvoiceDateSource	shipdate	\N
64	InvoiceCopies	2	\N
66	InvoiceWatermark0	Internal	\N
67	InvoiceShowPrices0	f	\N
68	InvoiceWatermark1	Customer	\N
69	InvoiceShowPrices1	t	\N
65	CreditMemoCopies	2	\N
74	CreditMemoWatermark0	Internal	\N
75	CreditMemoShowPrices0	t	\N
76	CreditMemoWatermark1	Customer	\N
77	CreditMemoShowPrices1	t	\N
108	ShippingFormCopies	1	\N
109	ShippingFormWatermark0	\N	\N
110	ShippingFormShowPrices0	t	\N
111	DisallowReceiptExcessQty	f	\N
112	UseProjects	t	\N
113	AutoCreateProjectsForOrders	f	\N
114	HideApplyToBalance	f	\N
54	remitto_name	Company Name	\N
55	remitto_address1	Line 1	\N
56	remitto_address2	Line 2	\N
57	remitto_address3	Line 3	\N
58	remitto_city	City	\N
59	remitto_state	ST	\N
60	remitto_zipcode	99999-9999	\N
115	remitto_country	United States	\N
61	remitto_phone	(800) 555-1212	\N
45	GLMainSize	5	\N
117	GLFFProfitCenters	t	\N
118	GLFFSubaccounts	t	\N
119	YearEndEquityAccount	-1	\N
120	CurrencyGainLossAccount	-1	\N
88	CurrencyExchangeSense	1	\N
121	GLSeriesDiscrepancyAccount	-1	\N
122	MandatoryGLEntryNotes	t	\N
63	DatabaseName	Empty Database	\N
52	DatabaseComments	Empty Database	\N
125	UpdatePriceLineEdit	2	\N
126	UseEarliestAvailDateOnPOItem	f	\N
127	RequireStdCostForPOItem	f	\N
128	ShipmentNumberGeneration	A	\N
129	WarnIfReceiptQtyDiffers	f	\N
130	ReceiptQtyTolerancePct		\N
116	GLCompanySize	1	\N
46	GLProfitSize	1	\N
47	GLSubaccountSize	1	\N
131	AllowManualGLAccountEntry	t	\N
132	DefaultTaxAuthority	-1	\N
145	TransferOrderChangeLog	f	\N
146	EnableTOShipping	t	\N
148	MultiWhs	f	\N
149	BBOM	f	\N
150	Transforms	f	\N
151	Routings	f	\N
152	BufferMgt	f	\N
153	LotSerialControl	f	\N
154	Application	PostBooks	\N
155	CCConfirmPreauth	f	\N
156	CCConfirmCharge	f	\N
157	CCConfirmChargePreauth	f	\N
158	CCConfirmCredit	f	\N
159	CCEnablePreauth	f	\N
160	CCEnableCharge	f	\N
161	CCAvsCheck	W	\N
162	CCTestResult	P	\N
164	RecurringInvoiceBuffer	7	\N
165	EmployeeChangeLog	t	\N
167	AllowAvgCostMethod	f	\N
168	AllowStdCostMethod	t	\N
1	InterfaceToGL	t	\N
170	AutoUpdateLocaleHasRun	t	\N
171	LegacyCashReceipts	f	\N
172	VerboseCommentList	t	\N
169	AllowJobCostMethod	t	\N
175	EFTRoutingRegex	^\\d{9}$	\N
176	EFTAccountRegex	^\\d{4,17}$	\N
177	EFTFunction	formatAchChecks	\N
19	InvcNumberGeneration	A	\N
180	CreditTaxDiscount	t	\N
181	POCopies	1	\N
182	POWatermark0	Vendor Copy	\N
183	POWatermark1	Internal Copy #1	\N
184	NumberIssueResetIntervalDays	1	\N
185	InterfaceAPToGL	t	\N
186	InterfaceARToGL	t	\N
174	ACHSupported	t	\N
187	AutoVersionUpdate	t	\N
188	RegistrationKey	JEEJT-CTWEJ-ZGY8Z-MXJZK-ECVCB	\N
189	UnifiedBuild	true	\N
173	ServerVersion	4.9.2	\N
178	desktop/welcome	http://welcome.xtuple.org/index.html	\N
179	desktop/timer	900000	\N
\.


--
-- Name: metric_metric_id_seq; Type: SEQUENCE SET; Schema: public; Owner: admin
--

SELECT pg_catalog.setval('metric_metric_id_seq', 189, true);


--
-- Data for Name: metricenc; Type: TABLE DATA; Schema: public; Owner: admin
--

COPY metricenc (metricenc_id, metricenc_name, metricenc_value, metricenc_module) FROM stdin;
\.


--
-- Name: metricenc_metricenc_id_seq; Type: SEQUENCE SET; Schema: public; Owner: admin
--

SELECT pg_catalog.setval('metricenc_metricenc_id_seq', 1, false);


--
-- Name: misc_index_seq; Type: SEQUENCE SET; Schema: public; Owner: admin
--

SELECT pg_catalog.setval('misc_index_seq', 1166, true);


--
-- Data for Name: mrghist; Type: TABLE DATA; Schema: public; Owner: admin
--

COPY mrghist (mrghist_cntct_id, mrghist_table, mrghist_pkey_col, mrghist_pkey_id, mrghist_cntct_col) FROM stdin;
\.


--
-- Data for Name: mrgundo; Type: TABLE DATA; Schema: public; Owner: admin
--

COPY mrgundo (mrgundo_base_schema, mrgundo_base_table, mrgundo_base_id, mrgundo_schema, mrgundo_table, mrgundo_pkey_col, mrgundo_pkey_id, mrgundo_col, mrgundo_value, mrgundo_type) FROM stdin;
\.


--
-- Data for Name: msg; Type: TABLE DATA; Schema: public; Owner: admin
--

COPY msg (msg_id, msg_posted, msg_scheduled, msg_text, msg_expires, msg_username) FROM stdin;
\.


--
-- Name: msg_msg_id_seq; Type: SEQUENCE SET; Schema: public; Owner: admin
--

SELECT pg_catalog.setval('msg_msg_id_seq', 16, true);


--
-- Data for Name: msguser; Type: TABLE DATA; Schema: public; Owner: admin
--

COPY msguser (msguser_id, msguser_msg_id, msguser_viewed, msguser_username) FROM stdin;
\.


--
-- Name: msguser_msguser_id_seq; Type: SEQUENCE SET; Schema: public; Owner: admin
--

SELECT pg_catalog.setval('msguser_msguser_id_seq', 12, true);


--
-- Name: nvend_nvend_id_seq; Type: SEQUENCE SET; Schema: public; Owner: admin
--

SELECT pg_catalog.setval('nvend_nvend_id_seq', 1, false);


--
-- Data for Name: obsolete_tax; Type: TABLE DATA; Schema: public; Owner: admin
--

COPY obsolete_tax (tax_id, tax_code, tax_descrip, tax_ratea, tax_sales_accnt_id, tax_freight, tax_cumulative, tax_rateb, tax_salesb_accnt_id, tax_ratec, tax_salesc_accnt_id) FROM stdin;
\.


--
-- Data for Name: ophead; Type: TABLE DATA; Schema: public; Owner: admin
--

COPY ophead (ophead_id, ophead_name, ophead_crmacct_id, ophead_owner_username, ophead_opstage_id, ophead_opsource_id, ophead_optype_id, ophead_probability_prcnt, ophead_amount, ophead_target_date, ophead_actual_date, ophead_notes, ophead_curr_id, ophead_active, ophead_cntct_id, ophead_username, ophead_start_date, ophead_assigned_date, ophead_priority_id, ophead_number) FROM stdin;
\.


--
-- Name: ophead_ophead_id_seq; Type: SEQUENCE SET; Schema: public; Owner: admin
--

SELECT pg_catalog.setval('ophead_ophead_id_seq', 1, true);


--
-- Data for Name: opsource; Type: TABLE DATA; Schema: public; Owner: admin
--

COPY opsource (opsource_id, opsource_name, opsource_descrip) FROM stdin;
\.


--
-- Name: opsource_opsource_id_seq; Type: SEQUENCE SET; Schema: public; Owner: admin
--

SELECT pg_catalog.setval('opsource_opsource_id_seq', 1, false);


--
-- Data for Name: opstage; Type: TABLE DATA; Schema: public; Owner: admin
--

COPY opstage (opstage_id, opstage_name, opstage_descrip, opstage_order, opstage_opinactive) FROM stdin;
\.


--
-- Name: opstage_opstage_id_seq; Type: SEQUENCE SET; Schema: public; Owner: admin
--

SELECT pg_catalog.setval('opstage_opstage_id_seq', 1, false);


--
-- Data for Name: optype; Type: TABLE DATA; Schema: public; Owner: admin
--

COPY optype (optype_id, optype_name, optype_descrip) FROM stdin;
\.


--
-- Name: optype_optype_id_seq; Type: SEQUENCE SET; Schema: public; Owner: admin
--

SELECT pg_catalog.setval('optype_optype_id_seq', 1, false);


--
-- Data for Name: orderseq; Type: TABLE DATA; Schema: public; Owner: admin
--

COPY orderseq (orderseq_id, orderseq_name, orderseq_number, orderseq_table, orderseq_numcol, orderseq_seqiss) FROM stdin;
12	IncidentNumber	1	incdt	incdt_number	\N
5	InvcNumber	1	invchead	invchead_invcnumber	\N
10	PlanNumber	1	planord	planord_number	\N
6	PoNumber	1	pohead	pohead_number	\N
8	PrNumber	1	pr	pr_number	\N
3	QuNumber	1	quhead	quhead_number	\N
2	SoNumber	1	cohead	cohead_number	\N
7	VcNumber	1	vohead	vohead_number	\N
1	WoNumber	1	wo	wo_number	\N
15	ToNumber	100	tohead	tohead_number	\N
20	LsRegNumber	1	lsreg	lsreg_number	\N
18	AddressNumber	1	addr	addr_number	\N
19	ContactNumber	1	cntct	cntct_number	\N
21	AlarmNumber	1	alarm	alarm_number	\N
23	CashRcptNumber	10000	cashrcpt	cashrcpt_number	\N
24	ACHBatch	1	checkhead	checkhead_ach_batch	\N
13	APMemoNumber	1	apmemo	apopen_docnumber	\N
11	ARMemoNumber	1	armemo	aropen_docnumber	\N
4	CmNumber	1	armemo	aropen_docnumber	\N
25	OpportunityNumber	1	ophead	ophead_number	\N
26	CRMAccountNumber	0	crmacct	crmacct_number	\N
\.


--
-- Name: orderseq_orderseq_id_seq; Type: SEQUENCE SET; Schema: public; Owner: admin
--

SELECT pg_catalog.setval('orderseq_orderseq_id_seq', 26, true);


--
-- Data for Name: pack; Type: TABLE DATA; Schema: public; Owner: admin
--

COPY pack (pack_id, pack_head_id, pack_head_type, pack_shiphead_id, pack_printed) FROM stdin;
\.


--
-- Name: pack_pack_id_seq; Type: SEQUENCE SET; Schema: public; Owner: admin
--

SELECT pg_catalog.setval('pack_pack_id_seq', 1, true);


--
-- Data for Name: payaropen; Type: TABLE DATA; Schema: public; Owner: admin
--

COPY payaropen (payaropen_ccpay_id, payaropen_aropen_id, payaropen_amount, payaropen_curr_id) FROM stdin;
\.


--
-- Data for Name: payco; Type: TABLE DATA; Schema: public; Owner: admin
--

COPY payco (payco_ccpay_id, payco_cohead_id, payco_amount, payco_curr_id, payco_id) FROM stdin;
\.


--
-- Name: payco_payco_id_seq; Type: SEQUENCE SET; Schema: public; Owner: admin
--

SELECT pg_catalog.setval('payco_payco_id_seq', 1, false);


--
-- Data for Name: period; Type: TABLE DATA; Schema: public; Owner: admin
--

COPY period (period_id, period_start, period_end, period_closed, period_freeze, period_initial, period_name, period_yearperiod_id, period_quarter, period_number) FROM stdin;
\.


--
-- Name: period_period_id_seq; Type: SEQUENCE SET; Schema: public; Owner: admin
--

SELECT pg_catalog.setval('period_period_id_seq', 27, true);


--
-- Data for Name: pkgdep; Type: TABLE DATA; Schema: public; Owner: admin
--

COPY pkgdep (pkgdep_id, pkgdep_pkghead_id, pkgdep_parent_pkghead_id) FROM stdin;
\.


--
-- Name: pkgdep_pkgdep_id_seq; Type: SEQUENCE SET; Schema: public; Owner: admin
--

SELECT pg_catalog.setval('pkgdep_pkgdep_id_seq', 1, true);


--
-- Data for Name: pkghead; Type: TABLE DATA; Schema: public; Owner: admin
--

COPY pkghead (pkghead_id, pkghead_name, pkghead_descrip, pkghead_version, pkghead_developer, pkghead_notes, pkghead_created, pkghead_updated, pkghead_indev) FROM stdin;
7	fixcountry	xTuple package to fix non-standard countries	3.4.0	xTuple	\n  This package contains components to help fix addresses with non-standard countries.\n  	2011-10-27 14:11:17.261723+00	2012-07-16 13:52:28.281582+00	f
6	te	Time and Expense System	2.3.1	xTuple	Time and Expense System add-on package for xTuple ERP.\n\n        This file is part of the xtte package for xTuple ERP: PostBooks Edition,\n        a free and open source Enterprise Resource Planning software suite,\n        Copyright (c) 1999-2013 by OpenMFG LLC, d/b/a xTuple.\n        It is licensed to you under the Common Public Attribution License\n        version 1.0, the full text of which (including xTuple-specific Exhibits)\n        is available at www.xtuple.com/CPAL.  By using this software, you agree\n        to be bound by its terms.\n  	2010-10-26 18:14:56.688819+00	2015-10-01 17:21:32.572357+00	f
5	xtdesktop	xTuple Desktop	4.0.2	xTuple	\n        xTuple Desktop navigational interface for the xTuple main window.\n\n        This package is an extension for xTuple ERP: PostBooks Edition,\n        a free and open source Enterprise Resource Planning software suite,\n        Copyright (c) 1999-2015 by OpenMFG LLC, d/b/a xTuple.\n        It is licensed to you under the Common Public Attribution License\n        version 1.0, the full text of which (including xTuple-specific Exhibits)\n        is available at www.xtuple.com/CPAL.  By using this software, you agree\n        to be bound by its terms.\n  	2010-06-18 15:45:51.129786+00	2015-10-01 17:43:03.592585+00	f
\.


--
-- Name: pkghead_pkghead_id_seq; Type: SEQUENCE SET; Schema: public; Owner: admin
--

SELECT pg_catalog.setval('pkghead_pkghead_id_seq', 7, true);


--
-- Data for Name: pkgitem; Type: TABLE DATA; Schema: public; Owner: admin
--

COPY pkgitem (pkgitem_id, pkgitem_pkghead_id, pkgitem_type, pkgitem_item_id, pkgitem_name, pkgitem_descrip) FROM stdin;
\.


--
-- Name: pkgitem_pkgitem_id_seq; Type: SEQUENCE SET; Schema: public; Owner: admin
--

SELECT pg_catalog.setval('pkgitem_pkgitem_id_seq', 1, false);


--
-- Data for Name: plancode; Type: TABLE DATA; Schema: public; Owner: admin
--

COPY plancode (plancode_id, plancode_code, plancode_name, plancode_mpsexplosion, plancode_consumefcst, plancode_mrpexcp_resched, plancode_mrpexcp_delete) FROM stdin;
\.


--
-- Name: plancode_plancode_id_seq; Type: SEQUENCE SET; Schema: public; Owner: admin
--

SELECT pg_catalog.setval('plancode_plancode_id_seq', 23, true);


--
-- Name: planord_planord_id_seq; Type: SEQUENCE SET; Schema: public; Owner: admin
--

SELECT pg_catalog.setval('planord_planord_id_seq', 1022, true);


--
-- Data for Name: pohead; Type: TABLE DATA; Schema: public; Owner: admin
--

COPY pohead (pohead_id, pohead_status, pohead_number, pohead_orderdate, pohead_vend_id, pohead_fob, pohead_shipvia, pohead_comments, pohead_freight, pohead_printed, pohead_terms_id, pohead_warehous_id, pohead_vendaddr_id, pohead_agent_username, pohead_curr_id, pohead_saved, pohead_taxzone_id, pohead_taxtype_id, pohead_dropship, pohead_vend_cntct_id, pohead_vend_cntct_honorific, pohead_vend_cntct_first_name, pohead_vend_cntct_middle, pohead_vend_cntct_last_name, pohead_vend_cntct_suffix, pohead_vend_cntct_phone, pohead_vend_cntct_title, pohead_vend_cntct_fax, pohead_vend_cntct_email, pohead_vendaddress1, pohead_vendaddress2, pohead_vendaddress3, pohead_vendcity, pohead_vendstate, pohead_vendzipcode, pohead_vendcountry, pohead_shipto_cntct_id, pohead_shipto_cntct_honorific, pohead_shipto_cntct_first_name, pohead_shipto_cntct_middle, pohead_shipto_cntct_last_name, pohead_shipto_cntct_suffix, pohead_shipto_cntct_phone, pohead_shipto_cntct_title, pohead_shipto_cntct_fax, pohead_shipto_cntct_email, pohead_shiptoaddress_id, pohead_shiptoaddress1, pohead_shiptoaddress2, pohead_shiptoaddress3, pohead_shiptocity, pohead_shiptostate, pohead_shiptozipcode, pohead_shiptocountry, pohead_cohead_id, pohead_released, pohead_shiptoname) FROM stdin;
\.


--
-- Name: pohead_pohead_id_seq; Type: SEQUENCE SET; Schema: public; Owner: admin
--

SELECT pg_catalog.setval('pohead_pohead_id_seq', 344, true);


--
-- Data for Name: poitem; Type: TABLE DATA; Schema: public; Owner: admin
--

COPY poitem (poitem_id, poitem_status, poitem_pohead_id, poitem_linenumber, poitem_duedate, poitem_itemsite_id, poitem_vend_item_descrip, poitem_vend_uom, poitem_invvenduomratio, poitem_qty_ordered, poitem_qty_received, poitem_qty_returned, poitem_qty_vouchered, poitem_unitprice, poitem_vend_item_number, poitem_comments, poitem_qty_toreceive, poitem_expcat_id, poitem_itemsrc_id, poitem_freight, poitem_freight_received, poitem_freight_vouchered, poitem_prj_id, poitem_stdcost, poitem_bom_rev_id, poitem_boo_rev_id, poitem_manuf_name, poitem_manuf_item_number, poitem_manuf_item_descrip, poitem_taxtype_id, poitem_tax_recoverable, poitem_rlsd_duedate, poitem_order_id, poitem_order_type) FROM stdin;
\.


--
-- Name: poitem_poitem_id_seq; Type: SEQUENCE SET; Schema: public; Owner: admin
--

SELECT pg_catalog.setval('poitem_poitem_id_seq', 426, true);


--
-- Name: porecv_porecv_id_seq; Type: SEQUENCE SET; Schema: public; Owner: admin
--

SELECT pg_catalog.setval('porecv_porecv_id_seq', 127, true);


--
-- Data for Name: poreject; Type: TABLE DATA; Schema: public; Owner: admin
--

COPY poreject (poreject_id, poreject_date, poreject_ponumber, poreject_itemsite_id, poreject_vend_id, poreject_vend_item_number, poreject_vend_item_descrip, poreject_vend_uom, poreject_qty, poreject_posted, poreject_rjctcode_id, poreject_poitem_id, poreject_invoiced, poreject_vohead_id, poreject_agent_username, poreject_voitem_id, poreject_value, poreject_trans_username, poreject_recv_id) FROM stdin;
\.


--
-- Name: poreject_poreject_id_seq; Type: SEQUENCE SET; Schema: public; Owner: admin
--

SELECT pg_catalog.setval('poreject_poreject_id_seq', 41, true);


--
-- Data for Name: pr; Type: TABLE DATA; Schema: public; Owner: admin
--

COPY pr (pr_id, pr_number, pr_subnumber, pr_status, pr_order_type, pr_order_id, pr_poitem_id, pr_duedate, pr_itemsite_id, pr_qtyreq, pr_prj_id, pr_releasenote, pr_createdate) FROM stdin;
\.


--
-- Name: pr_pr_id_seq; Type: SEQUENCE SET; Schema: public; Owner: admin
--

SELECT pg_catalog.setval('pr_pr_id_seq', 185, true);


--
-- Data for Name: prftcntr; Type: TABLE DATA; Schema: public; Owner: admin
--

COPY prftcntr (prftcntr_id, prftcntr_number, prftcntr_descrip) FROM stdin;
\.


--
-- Name: prftcntr_prftcntr_id_seq; Type: SEQUENCE SET; Schema: public; Owner: admin
--

SELECT pg_catalog.setval('prftcntr_prftcntr_id_seq', 1, false);


--
-- Data for Name: priv; Type: TABLE DATA; Schema: public; Owner: admin
--

COPY priv (priv_id, priv_module, priv_name, priv_descrip, priv_seq) FROM stdin;
4	Products	ViewBOMs	Can View Bills of Materials	\N
485	System	MaintainPreferencesSelf	Can Maintain the preferences for their own user only.	\N
486	System	MaintainPreferencesOthers	Can Maintain the preferences of other users.	\N
182	Manufacture	ScrapWoMaterials	\N	\N
306	Misc.	MaintainShippingChargeTypes	Can Add/Edit/Delete Shipping Charge Types	\N
307	Misc.	ViewShippingChargeTypes	Can View Shipping Charge Types	\N
269	Misc.	MaintainExpenseCategories	Can Add/Edit/Delete Expense Categories	\N
270	Misc.	ViewExpenseCategories	Can View Expense Categories	\N
362	Misc.	MaintainSalesCategories	Can Add/Edit/Delete Sales Categories	\N
363	Misc.	ViewSalesCategories	Can View Sales Categories	\N
446	CRM	MaintainTitles	Can Add/Edit/Delete Titles (Honorifics).	\N
420	CRM	MaintainAddresses	Can Add/Edit/Delete Addresses	\N
422	CRM	MaintainCompetitorMasters	Can Add/Edit/Delete Competitor Masters	\N
426	CRM	MaintainPartners	Can Add/Edit/Delete Partner Masters	\N
429	CRM	MaintainWarrantyTerms	Can Add/Edit/Delete Warranty Terms	\N
447	CRM	ViewTitles	Can View Titles (Honorifics).	\N
433	CRM	ViewAddresses	Can View Addresses	\N
435	CRM	ViewCommLog	Can View the Communications Log	\N
436	CRM	ViewCompetitorMasters	Can View Competitor Masters	\N
441	CRM	ViewPartners	Can View Partner Masters	\N
444	CRM	ViewWarrantyTerms	Can View Warranty Terms	\N
448	CRM	MaintainIncidentCategories	Can Add/Edit/Delete Incident Categories	\N
449	CRM	MaintainIncidentPriorities	Can Add/Edit/Delete Incident Priorities	\N
450	CRM	MaintainIncidentSeverities	Can Add/Edit/Delete Incident Severities	\N
451	CRM	MaintainIncidentResolutions	Can Add/Edit/Delete Incident Resolutions	\N
390	Products	PostStandardCosts	Can Post Product Standard Costs	\N
480	CRM	MaintainOpportunitySources	Can Add/Edit/Delete Opportunity Sources	\N
481	CRM	MaintainOpportunityStages	Can Add/Edit/Delete Opportunity Stages	\N
482	CRM	MaintainOpportunityTypes	Can Add/Edit/Delete Opportunity Types	\N
5	Products	MaintainBOMs	Can Add/Edit/Delete Bills of Materials	\N
103	Products	EnterActualCosts	Can Enter Free Form Actual Costs	\N
104	Products	UpdateActualCosts	Can Update Actual Costs via P/O or P/D	\N
105	Products	PostActualCosts	Can Post Actual Costs to Standard Costs	\N
106	Products	ViewCosts	Can View Actual and Standard Costs	\N
107	Products	MaintainUserCostingElements	Can Add/Edit/Delete User Costing Elements	\N
1	Products	ViewItemMasters	Can View Item Masters	\N
2	Products	MaintainItemMasters	Can Add/Edit/Delete Item Masters	\N
134	Products	MaintainItemGroups	Can Add/Edit/Delete Item Groups	\N
143	Products	ViewClassCodes	Can View Class Codes	\N
144	Products	MaintainClassCodes	Can Add/Edit/Delete Class Codes	\N
160	Products	ViewItemOptions	Can View Item Options	\N
31	Products	MaintainProductCategories	Add/Edit/Delete Product Categories	\N
161	Products	DeleteCosts	Can Delete Item Costs	\N
162	Products	CreateCosts	Can Create User Costs	\N
163	Products	ViewProductCategories	Can View Product Categories	\N
316	Products	MaintainUOMs	Can Add/Edit/Delete Unit of Measures	\N
317	Products	ViewUOMs	Can View Unit of Measures	\N
349	Products	DeleteItemMasters	Can Delete Item Masters	\N
10	Inventory	ViewInventoryHistory	Can View Inventory History	\N
30	Inventory	ViewWarehouses	Can View Warehouses	\N
29	Inventory	MaintainWarehouses	Can Add/Edit/Delete Warehouses	\N
37	Inventory	UpdateABCClass	Can Run Update ABC Class Utility	\N
42	Inventory	FreezeInventory	Can Freeze Inventory	\N
84	Inventory	EnterMiscCounts	Can Enter Misc. Counts	\N
82	Inventory	IssueCountTags	Can Issue Count Tags	\N
83	Inventory	EnterCountTags	Can Enter Count Tags	\N
85	Inventory	MaintainLocations	Can Add/Edit/Delete Warehouse Locations	\N
86	Inventory	ViewLocations	Can View Warehouse Locations	\N
90	Inventory	ViewInventoryAvailability	Can View Inventory Availability	\N
116	Inventory	CreateAdjustmentTrans	Can Create an Adjustment Transaction	\N
117	Inventory	CreateScrapTrans	Can Create a Scrap Transaction	\N
118	Inventory	CreateReceiptTrans	Can Create a Misc. Receipt Transaction	\N
14	Inventory	MaintainItemSites	Can Add/Edit/Delete Item Sites	\N
15	Inventory	ViewItemSites	Can View Item Sites	\N
128	Inventory	PostCountSlips	Can Post Count Slips	\N
129	Inventory	EnterCountSlips	Can Create and Enter Count Slips	\N
131	Inventory	DeleteCountTags	Delete Count Tags	\N
130	Inventory	ZeroCountTags	Can Zero Uncounted Count Tags	\N
132	Inventory	ViewCountTags	View Count Tags	\N
133	Inventory	PostCountTags	Can Post Count Tags	\N
147	Inventory	PurgeCountSlips	Can Purge Posted Count Slips	\N
81	Inventory	PurgeCountTags	Cost Purge Posted Count Tags	\N
148	Inventory	ViewInventoryValue	Can View Inventory Values	\N
19	Inventory	RelocateInventory	Can Relocate Inventory	\N
150	Inventory	ViewQOH	Can View QOH	\N
151	Inventory	UpdateCycleCountFreq	Can Update an Item Site's Cycle Count Frequency	\N
152	Inventory	UpdateLeadTime	Can Update an Item Site's Lead Time	\N
154	Inventory	SummarizeInventoryTransactions	Can Summarized Inventory Transactions	\N
153	Inventory	ThawInventory	Can Thaw Inventory	\N
35	Inventory	MaintainCostCategories	Can Add/Edit/Delete Cost Categories	\N
36	Inventory	ViewCostCategories	Can View Cost Categories	\N
164	Inventory	DeleteCountSlips	Can Delete Count Slips	\N
214	Inventory	ViewShipping	Can View Stock at Shipping	\N
215	Inventory	PrintBillsOfLading	Can Print Bills of Lading	\N
217	Inventory	ShipOrders	Can Ship Orders from Shipping	\N
218	Inventory	ReturnStockFromShipping	Can Return Stock from Shipping	\N
517	Accounting	ViewTaxZones	Can view Tax Zones	\N
219	Inventory	IssueStockToShipping	Can Issue Stock to Shipping	\N
220	Inventory	PurgeShippingRecords	Can Purge Shipping Records	\N
223	Inventory	ViewDestinations	Can View Destinations	\N
224	Inventory	MaintainDestinations	Can Add/Edit/Delete Destinations	\N
225	Inventory	EnterShippingInformation	Can Enter Shipping Information	\N
216	Inventory	RecallOrders	Can Recall Orders to Shipping	\N
222	Inventory	ViewCarriers	Can View Shippers	\N
221	Inventory	MaintainCarriers	Can Add/Edit/Delete Shippers	\N
226	Inventory	EnterReceipts	Can Enter Receipts	\N
227	Inventory	EnterReturns	Can Enter Returns	\N
241	Inventory	UpdateOUTLevels	Can Update Order Up To Levels	\N
238	Inventory	UpdateReorderLevels	Can Update Reorder Levels	\N
255	Inventory	MaintainPackingListBatch	Can Modify Packing List Batch	\N
256	Inventory	ViewPackingListBatch	Can View Packing List Batch	\N
264	Inventory	MaintainCharacteristics	Can Add/Edit/Delete Characteristics	\N
265	Inventory	ViewCharacteristics	Can View Characteristics	\N
350	Inventory	DeleteItemSites	Can Delete Item Sites	\N
351	Inventory	CreateExpenseTrans	Can Create an Expense Transaction	\N
454	Inventory	RecallInvoicedShipment	Can recall shipments that have already been invoiced.	\N
470	Inventory	ViewItemAvailabilityWorkbench	Can View Item Availability Workbench.	\N
45	Purchase	ViewVendors	Can View Vendors	\N
44	Purchase	MaintainVendors	Can Add/Edit/Delete Vendors	\N
48	Purchase	MaintainItemSources	Can Add/Edit/Delete P/O Item Sources	\N
49	Purchase	ViewItemSources	Can View P/O Item Sources	\N
53	Purchase	MaintainPurchaseOrders	Can Add/Edit/Delete Purchase Orders	\N
54	Purchase	ViewPurchaseOrders	Can View Orders	\N
46	Purchase	MaintainPlannerCodes	Can Add/Edit/Delete Planner Codes	\N
47	Purchase	ViewPlannerCodes	Can View Planner Codes	\N
120	Purchase	AssignItemsToPlannerCode	Can Assign Items to a Planner Code	\N
189	Purchase	PrintPurchaseOrders	Can Print Purchase Orders	\N
204	Purchase	MaintainRejectCodes	Can Add/Edit/Delete Reject Codes	\N
205	Purchase	ViewRejectCodes	Can View Reject Codes	\N
207	Purchase	ViewVendorPerformance	Can View Vendor Performance	\N
208	Purchase	ViewCashRequirements	Can View Cash Requirements	\N
209	Purchase	ViewPurchaseRequests	Can View Purchase Requests	\N
213	Purchase	MaintainPurchaseRequests	Can Add/Edit/Delete Purchase Requests	\N
231	Purchase	ViewReceiptsReturns	View Receipts and Returns	\N
244	Purchase	ViewBuyCard	Can View Buy Cards	\N
245	Purchase	ViewVendorAddresses	Can View Vendor Addresses	\N
246	Purchase	MaintainVendorAddresses	Can Add/Edit/Delete Vendor Addresses	\N
249	Purchase	MaintainVendorTypes	Can Add/Edit/Delete Vendor Types	\N
250	Purchase	ViewVendorTypes	Can View Vendor Types	\N
353	Purchase	ReschedulePurchaseOrders	Can Reschedule Purchase Orders	\N
354	Purchase	ChangePurchaseOrderQty	Can Change Purchase Order Item Quantities	\N
368	Purchase	MaintainUninvoicedReceipts	Can Mark as invoiced and Correct Receiving on uninvoiced receipts	\N
383	Purchase	ViewUninvoicedReceipts	User is allowed to View Uninvoiced Receivings.	\N
452	Purchase	MaintainPostedPurchaseOrders	Can Edit Purchase Orders which have already been Posted	\N
17	Manufacture	ReturnWoMaterials	Can Return Work Order Materials	\N
16	Manufacture	IssueWoMaterials	Can Issue Work Order Materials	\N
91	Manufacture	MaintainWoMaterials	Can Add/Edit/Delete Work Order Materials	\N
27	Manufacture	PostProduction	Can Post Production	\N
11	Manufacture	ViewWorkOrders	Can View Work Orders	\N
93	Manufacture	ViewWoMaterials	Can View Work Order Materials	\N
12	Manufacture	MaintainWorkOrders	Can Add/Edit/Delete Work Orders	\N
13	Manufacture	ExplodeWorkOrders	Can Explode Work Orders	\N
26	Manufacture	ImplodeWorkOrders	Can Implode Work Orders	\N
75	Manufacture	RescheduleWorkOrders	Can Reschedule Work Orders	\N
76	Manufacture	ChangeWorkOrderQty	Can Change Work Order Quantities	\N
94	Manufacture	CloseWorkOrders	Can Close Work Orders	\N
125	Manufacture	PostMiscProduction	Can Make Miscellaneous Production Postings	\N
140	Manufacture	PurgeWorkOrders	Can Purge Closed Work Orders	\N
173	Manufacture	ViewMaterialVariances	Can View W/O Material Variances	\N
176	Manufacture	PrintWorkOrderPaperWork	Can Print Work Order Paper Work	\N
177	Manufacture	ReleaseWorkOrders	Can Release Work Orders	\N
178	Manufacture	RecallWorkOrders	Can Recall Work Orders	\N
228	Manufacture	DeleteWorkOrders	Can Delete Open Work Orders	\N
352	Manufacture	ReprioritizeWorkOrders	Can Reprioritize Work Orders	\N
408	Manufacture	ChangeNonPickItems	Can change the Issue Items Not On Pick List flag on Post Production.	\N
409	Manufacture	ChangeReceiveInventory	Can change the Receive Inventory List flag on Post Operations.	\N
22	Sales	MaintainCustomerMasters	Can Add/Edit/Delete Customer Masters	\N
23	Sales	ViewCustomerMasters	Can View Customer Masters	\N
51	Sales	ViewShipVias	Can View Ship Via's	\N
55	Sales	ViewCustomerTypes	Can View Customer Types	\N
56	Sales	MaintainCustomerTypes	Can Add/Edit/Delete Customer Types	\N
57	Sales	ViewSalesReps	Can View Sales Reps.	\N
58	Sales	MaintainSalesReps	Can Add/Edit/Delete Sales Reps.	\N
61	Sales	ViewTerms	Can View Terms	\N
59	Sales	MaintainTaxCodes	Can Add/Edit/Delete Tax Codes	\N
60	Sales	ViewTaxCodes	Can View Tax Codes	\N
50	Sales	MaintainShipVias	Can Add/Edit/Delete Ship Via's	\N
88	Sales	MaintainShiptos	Can Add/Edit/Delete Ship-Tos	\N
89	Sales	ViewShiptos	Can View Ship-Tos	\N
111	Sales	OverridePrice	Can Override Item Sales Prices	\N
126	Sales	MaintainSalesAccount	Can Add/Edit/Delete Sales Account Assignments	\N
127	Sales	ViewSalesAccount	Can View Sales Account Assignments	\N
141	Sales	MaintainSalesOrders	Can Add/Edit/Delete Sales Orders	\N
142	Sales	ViewSalesOrders	Can View Sales Orders	\N
180	Sales	MaintainPricingSchedules	Can Add/Edit/Delete Pricing Schedules	\N
181	Sales	ViewPricingSchedules	Can View Pricing Schedules	\N
190	Sales	SelectBilling	Can Select an Order for Billing	\N
192	Sales	MaintainShippingForms	Can Add/Edit/Delete Shipping Forms	\N
193	Sales	MaintainShippingZones	Can Add/Edit/Delete Shipping Zones	\N
194	Sales	AssignPricingSchedules	Can Assign Pricing Schedules	\N
195	Sales	CreateSales	Can Create Sales	\N
196	Sales	UpdatePricingSchedules	Can Update Pricing Schedules	\N
197	Sales	MaintainCreditMemos	Can Add/Edit/Delete Unposted Credit Memos	\N
198	Sales	ViewCreditMemos	Can View Unposted Credit Memos	\N
199	Sales	PrintCreditMemos	Print Credit Memos	\N
200	Sales	PurgeCreditMemos	Purge Credit Memos	\N
201	Sales	PurgeInvoices	Purge Invoices	\N
232	Sales	MaintainQuotes	Can Add/Edit/Delete Quotes	\N
203	Sales	ViewCommissions	Can View Earned Commissions	\N
233	Sales	ViewQuotes	Can View Quotes	\N
70	Sales	ViewCustomerPrices	Can View Customer Type Prices	\N
234	Sales	ConvertQuotes	Can Convert Quotes to Sales Orders	\N
235	Sales	PrintPackingLists	\N	\N
211	Sales	ViewShippingZones	Can View Shipping Zones	\N
212	Sales	ViewSalesHistory	\N	\N
239	Sales	PrintQuotes	Can Print Quotes	\N
242	Sales	OverrideSODate	Can Override S/O Enter Dates	\N
257	Sales	MaintainCustomerGroups	Can Add/Edit/Delete/Modify Customer Groups	\N
258	Sales	ViewCustomerGroups	Can View Customer Groups	\N
273	Sales	MaintainListPrices	Can Modify List Prices	\N
274	Sales	ViewListPrices	Can View List Prices	\N
281	Sales	EditSalesHistory	Can Edit Posted Sales History	\N
336	Sales	CreateSOForHoldCustomer	Can Create an Sales Order for a Customer on Credit Hold	\N
337	Sales	CreateSOForWarnCustomer	Can Create an Sales Order for a Customer on Credit Warning	\N
346	Sales	UpdateCustomerCreditStatus	Can Update a Customer's Credit Status	\N
347	Sales	ArchiveSalesHistory	Can Archive Sales History	\N
348	Sales	RestoreSalesHistory	Can Restore Sales History	\N
355	Sales	AlterPackDate	Can Alter a Sales Order Pack Date	\N
385	Sales	MaintainCustomerMastersCustomerType	Users are allowed to edit the Customer Type for a customer.	\N
386	Sales	MaintainCustomerMastersCustomerTypeOnCreate	Users are allowed to edit the Customer Type for a customer when creating a new customer.	\N
389	Sales	AllowSelectOrderEditing	Users are allowed to edit some additional information on the Select Order for Billing screen.	\N
393	Sales	ShowMarginsOnSalesOrder	Users will see the margins on the Sales Order and Quote Screens for that older.	\N
459	Sales	MaintainProspectMasters	Can Add/Edit/Delete Prospect information.	\N
460	Sales	ViewProspectMasters	Can View Prospect information.	\N
179	Accounting	MaintainChartOfAccounts	Can Add/Edit/Delete Accounts in the Chart of Accounts	\N
251	Accounting	MaintainStandardJournals	Can Add/Edit/Delete Standard Journals	\N
252	Accounting	ViewStandardJournals	Can View Standard Journals	\N
254	Accounting	PostStandardJournals	Can Post Standard Journals	\N
260	Accounting	MaintainVendorAccounts	Can Add/Edit/Delete Vendor Account Assignments	\N
261	Accounting	ViewVendorAccounts	Can View Vendor Account Assignments	\N
262	Accounting	MaintainCheckFormats	Can Add/Edit/Delete A/P Check Formats	\N
263	Accounting	ViewCheckFormats	Can View A/P Check Formats	\N
266	Accounting	MaintainStandardJournalGroups	Can Add/Edit/Delete Standard Journal Groups	\N
267	Accounting	ViewStandardJournalGroups	Can View Standard Journal Groups	\N
268	Accounting	PostStandardJournalGroups	Can Post Standard Journal Groups	\N
271	Accounting	MaintainAccountingPeriods	Can Add/Edit/Delete Accounting Periods	\N
272	Accounting	ViewAccountingPeriods	Can View Accounting Periods	\N
275	Accounting	MaintainARMemos	Can Add/Edit/Delete A/R Credit/Demo Memos	\N
276	Accounting	ViewARMemos	Can View A/R Credit/Demo Memos	\N
277	Accounting	ApplyARMemos	Can Apply A/R Credit/Demo Memos	\N
278	Accounting	MaintainMiscInvoices	Can Add/Edit/Delete Misc. Invoices	\N
279	Accounting	ViewMiscInvoices	Can View Misc. Invoices	\N
280	Accounting	PostMiscInvoices	Can Post Misc. Invoices	\N
294	Accounting	PostJournalEntries	Can Post Journal Entries	\N
297	Accounting	ViewGLTransactions	Can View G/L Transactions	\N
298	Accounting	ViewTrialBalances	Can View Trial Balances	\N
302	Accounting	MaintainCashReceipts	Can Add/Edit/Delete Cash Receipts	\N
303	Accounting	ViewCashReceipts	Can View Cash Receipts	\N
305	Accounting	PostCashReceipts	Can Post Cash Receipts	\N
369	Accounting	MaintainPayments	Can Maintain Payment and Check information.	\N
370	Accounting	ViewAPOpenItems	Can view A/P Open Item infomation and related screens that use that information.	\N
313	Accounting	MaintainFinancialLayouts	Can Add/Edit/Delete Financial Layouts	\N
314	Accounting	ViewFinancialLayouts	Can View Financial Layouts	\N
315	Accounting	ViewFinancialReports	Can View Financial Reports	\N
371	Accounting	PrintAPJournals	Can view A/P Open Item infomation and related screens that use that information.	\N
372	Accounting	ViewAROpenItems	Can view A/R Open Item infomation and related screens that use that information.	\N
334	Accounting	EditAPOpenItem	Can Edit A/P Open Items	\N
335	Accounting	EditAROpenItem	Can Edit A/R Open Items	\N
373	Accounting	PrintARJournals	Can view A/R Open Item infomation and related screens that use that information.	\N
374	Accounting	MaintainAdjustmentTypes	Can Add/Edit/Delete Adjustment Types	\N
375	Accounting	ViewAdjustmentTypes	Can View Adjustment Types	\N
376	Accounting	MaintainBankAdjustments	Can Add/Edit/Delete Bank Adjustments	\N
377	Accounting	ViewBankAdjustments	Can View Bank Adjustments	\N
378	Accounting	PostBankAdjustments	Can Post Bank Adjustments	\N
356	Accounting	MaintainAPMemos	Can Add/Edit/Post A/P Memos	\N
357	Accounting	ViewAPMemos	Can View A/P Memos	\N
358	Accounting	ApplyAPMemos	Can Apply A/P Memos	\N
379	Accounting	MaintainBankRec	Can Maintain Bank Reconciliations	\N
380	Accounting	ViewBankRec	Can View Bank Reconciliation Information	\N
382	Accounting	MaintainReasonCodes	User is allowed to maintain the Reason Codes.	\N
395	Accounting	CreateNewCurrency	Create New Currencies	\N
396	Accounting	MaintainCurrencies	Modify Existing Currencies	\N
397	Accounting	MaintainCurrencyRates	Add and Modify Currency Exchange Rates	\N
398	Accounting	ViewCurrencyRates	View Currency Exchange Rates	\N
407	Accounting	VoidPostedAPCheck	Can void a posted A/P Check.	\N
455	Accounting	ChangeARInvcDistDate	Can distribute an Invoice to the G/L using a date other than the Invoice Date	\N
456	Accounting	ChangePORecvPostDate	Can post a Purchase Order Receipt to the G/L using a date other than the actual Receipt Date	\N
457	Accounting	ChangeSOMemoPostDate	Can post a Sales Order Credit Memo to the G/L using a date other than the Credit Memo Document Date	\N
458	Accounting	ChangeVOPostDate	Can post a Voucher to the G/L using a date other than the Voucher Distribution Date	\N
461	Accounting	MaintainTaxAuthorities	Can Add/Edit/Delete Tax Authorities.	\N
462	Accounting	ViewTaxAuthorities	Can View Tax Authorities.	\N
463	Accounting	MaintainTaxTypes	Can Add/Edit/Delete Tax Types.	\N
464	Accounting	ViewTaxTypes	Can View Tax Types.	\N
467	Accounting	OverrideTax	Can manually override the system-selected Tax Code and/or tax % for individual Invoice line items.	\N
468	Accounting	MaintainTaxReconciliations	Can Add/Edit/Delete unposted Tax Reconciliation records and associated data.	\N
469	Accounting	ViewTaxReconciliations	Can View Tax Reconciliation records and associated data.	\N
475	Accounting	MaintainBudgets	Can maintain budget information	\N
476	Accounting	ViewBudgets	Can view budget information, not affecting FRE ability to view budgets.	\N
100	System	DispatchOtherEvents	Can Dispatch Other User's Events	\N
63	System	ConfigureIM	Configure I/M Module Parameters	\N
64	System	ConfigurePO	Configure P/O Module Parameters	\N
65	System	ConfigurePD	Configure P/D Module Parameters	\N
73	System	ConfigDatabaseInfo	Can Configure the Database Information	\N
121	System	DeleteOwnEvents	Can Delete Own Events	\N
122	System	DeleteOtherEvents	Can Delete Other Users' Events	\N
101	System	ViewOtherEvents	Can View Other User's Events	\N
87	System	ConfigureWO	Configure S/O Module Parameters	\N
123	System	DispatchOwnEvents	Can Dispatch Own Events	\N
124	System	ConfigureSR	Configure S/R Module Parameters	\N
68	System	ConfigureSO	Configure S/O Module Parameters	\N
166	System	MaintainImages	Can Add/Edit/Delete Images	\N
167	System	MaintainReports	Can Add/Edit/Delete Reports	\N
168	System	MaintainForms	Can Add/Edit/Delete Forms	\N
169	System	MaintainCalendars	Can Add/Edit/Delete Calendars	\N
170	System	MaintainLocales	Can Add/Edit/Delete Locales	\N
236	System	ConfigureGL	Can Configure the G/L Module	\N
248	System	ConfigureAR	Can Configure the A/R Module	\N
253	System	MaintainBankAccounts	Can Add/Edit/Delete Bank Accounts	\N
3	System	MaintainUsers	Can Add/Edit/List Users	\N
345	System	MaintainCommentTypes	Can Add/Edit/Delete Comment Types	\N
359	System	ConfigureAP	Can Configure the A/P Module	\N
388	System	ConfigureCC	User is allowed to alter the Credit Card Configuration.	\N
394	System	ConfigurePM	Users will be able to view and edit the configuration options for the P/M Module.	\N
399	System	MaintainCustomCommands	User can Create/Edit/View Custom commands	\N
403	System	MaintainDepartments	Can create and modify Department definitions.	\N
404	System	ViewDepartments	Can view Department definitions.	\N
406	System	ViewShifts	Can view Shift definitions.	\N
445	System	ConfigureCRM	Can change the CRM configuration module options.	\N
453	System	MaintainCountries	Can Add/Edit/Delete Country information.	\N
471	System	FixSerial	Can fix problems with serial values used to assign primary keys.	\N
487	Accounting	PostPayments	Can Post Payments/Checks.	\N
488	Accounting	ViewDepositsRegister	Can view the Deposits Register.	\N
489	Accounting	ViewInvoiceRegister	Can view the Invoice Register.	\N
490	System	ConfigureImportExport	Can Change or Create Settings For Importing and Exporting Data	\N
491	System	ImportXML	Can Import Data From XML Sources	\N
187	Accounting	MaintainVouchers	Can Add/Edit/Delete Vouchers	\N
188	Accounting	PostVouchers	Can Post Vouchers	\N
259	Accounting	ViewVouchers	Can View Vouchers	\N
492	Accounting	ProcessCreditCards	Can Process Credit Card Transactions	\N
498	System	MaintainScripts	Can Change or Create Scripts that are executed by windows when they are opened.	\N
500	Inventory	AlterTransactionDates	Can set the Transaction Date written to the G/L and Inventory History tables for inventory transactions.	\N
501	System	MaintainEmployees	Can Change or Create Employee records.	\N
502	System	ViewEmployees	Can view Employee records.	\N
503	System	MaintainGroups	Can Change or Create Settings For Groups	\N
504	System	MaintainEmployeeGroups	Can Change or Create Employee Groups.	\N
505	System	ViewEmployeeGroups	Can view Employee Group records.	\N
499	System	MaintainScreens	Can Change or Create UI Forms that are executed by custom windows when they are opened.	\N
506	Inventory	MaintainExternalShipping	Can Change or Create External Shipping Records.	\N
507	System	fixACL	Can fix Access Control List problems at the database level.	\N
509	System	ViewPackages	Can View installed Packages.	\N
510	Accounting	SynchronizeCompanies	Can run company trial balance synchronization utility.	\N
511	Inventory	MaintainSiteTypes	Can Change or Create Settings For Site Types	\N
512	Inventory	ViewSiteTypes	Can View Settings For Site Types	\N
62	Accounting	MaintainTerms	Can Add/Edit/Delete Terms	\N
191	Accounting	PrintInvoices	Can Print Invoices	\N
202	Accounting	PostARDocuments	Can Post Invoices and Credit Memos	\N
513	Products	MaintainFreightClasses	Can Add/Edit/Delete Freight Classes	\N
514	Products	ViewFreightClasses	Can View Freight Classes	\N
515	Sales	FirmSalesOrder	Can Firm a Sales Order line item to prevent editing	\N
516	CRM	EditOwner	Can Edit Owner in CRM documents	\N
518	Accounting	MaintainTaxZones	Can Add/Edit/Delete Tax Zones	\N
519	Accounting	ViewTaxClasses	Can view Tax Classes	\N
520	Accounting	MaintainTaxClasses	Can Add/Edit/Delete Tax Classes	\N
522	System	EditOwnComments	User is allowed to edit comments they have entered that are of an editable comment type.	\N
523	System	EditOthersComments	User is allowed to edit iany comments entered that are of an editable comment type.	\N
465	Accounting	MaintainTaxAssignments	Can Add/Edit/Delete Tax Assignments	\N
466	Accounting	ViewTaxAssignments	Can View Tax Assignments	\N
524	System	MaintainStates	User is allowed to edit the list of States and Provinces	\N
525	System	MaintainMetaSQL	User is allowed to edit MetaSQL statements with the MetaSQL editor.	\N
526	System	ViewMetaSQL	User is allowed to view MetaSQL statements with the MetaSQL editor.	\N
527	System	ExecuteMetaSQL	User is allowed to execute MetaSQL statements with the MetaSQL editor that change the database.	\N
137	Purchase	ReleasePurchaseOrders	Can Release Purchase Orders	\N
528	Sys	ConfigureEncryption	Allowed to view and change the Encryption Key File	\N
529	System	ExportXML	Can Export XML Files	\N
604	Accounting	DeletePostedJournals	Can delete posted Standard Journals and Journal Entries	\N
605	Accounting	EditPostedJournals	Can edit posted Journal Entries	\N
606	Accounting	ViewJournals	Can view Journals	\N
607	Accounting	PostJournals	Can post Journals	\N
619	CRM	MergeContacts	Can use Contact Merge utility	\N
620	System	MaintainTranslations	User is allowed to maintain/download translations to their local computer.	\N
621	System	MaintainDictionaries	User is allowed to maintain/download spell check dictionaries to their local computer.	\N
431	CRM	ReassignToDoItems	Can Reassign ToDoItems to other people	\N
416	CRM	CloseAllIncidents	Can Close all Incidents after confirming that it has been satisfactorily resolved	\N
631	CRM	ClosePersonalIncidents	Can Incidents when Owner or Assigned after confirming that it has been resolved	\N
425	CRM	MaintainAllToDoItems	Can Add/Edit/Delete all ToDoItems	0
423	CRM	MaintainAllContacts	Can Add/Edit/Delete all Contacts	0
419	CRM	MaintainAllCRMAccounts	Can Add/Edit/Delete all CRM Accounts	0
483	CRM	MaintainAllOpportunities	Can Add/Edit/Delete all Opportunities	0
424	CRM	MaintainAllIncidents	Can Add/Edit/Delete all Incidents	0
392	CRM	MaintainAllProjects	Can Add/Edit/Delete all Projects	0
440	CRM	ViewAllToDoItems	Can View all ToDoItems	1
437	CRM	ViewAllContacts	Can View all Contacts	1
432	CRM	ViewAllCRMAccounts	Can View all CRM Accounts	1
484	CRM	ViewAllOpportunities	Can View all Opportunities	1
439	CRM	ViewAllIncidents	Can View all Incidents	1
391	CRM	ViewAllProjects	Can View all Projects	1
427	CRM	MaintainPersonalToDoItems	Can Add/Edit/Delete ToDoItems when Owner or Assigned	2
623	CRM	MaintainPersonalContacts	Can Add/Edit/Delete Contacts when Owner or Assigned	2
625	CRM	MaintainPersonalCRMAccounts	Can Add/Edit/Delete CRM Accounts when Owner or Assigned	2
627	CRM	MaintainPersonalOpportunities	Can Add/Edit/Delete Opportunities when Owner or Assigned	2
629	CRM	MaintainPersonalIncidents	Can Add/Edit/Delete Incidents when Owner or Assigned	2
633	CRM	MaintainPersonalProjects	Can Add/Edit/Delete Projects when Owner or Assigned	2
442	CRM	ViewPersonalToDoItems	Can View ToDoItems when Owner or Assigned	4
622	CRM	ViewPersonalContacts	Can View Contacts when Owner or Assigned	4
624	CRM	ViewPersonalCRMAccounts	Can View CRM Accounts when Owner or Assigned	4
626	CRM	ViewPersonalOpportunities	Can View Opportunities when Owner or Assigned	4
628	CRM	ViewPersonalIncidents	Can View Incidents when Owner or Assigned	4
630	CRM	ViewPersonalIncidentHistory	Can View Incident History when Owner or Assigned	4
632	CRM	ViewPersonalProjects	Can View Projects when Owner or Assigned	4
634	Accounting	VoidPostedVouchers	Can void posted A/P Vouchers.	\N
635	Accounting	VoidPostedARCreditMemos	Can void posted A/R Credit Memos.	\N
636	Accounting	VoidPostedInvoices	Can void posted A/R Invoices.	\N
521	Accounting	VoidPostedCashReceipts	Can void posted A/R Cash Receipts.	\N
637	Accounting	MaintainTaxRegistrations	Can Add/Edit/Delete Tax Registrations.	\N
638	Accounting	ViewTaxRegistrations	Can View Tax Registrations.	\N
639	Accounting	PostFrozenPeriod	Can Post into frozen Accounting Period	\N
644	Sales	MaintainSaleTypes	Can Add/Edit/Delete Sale Types.	\N
645	Sales	ViewSaleTypes	Can View Sale Types.	\N
648	Sales	ConvertQuotesInvoice	Can Convert Quote to Invoice.	\N
649	System	MaintainRegistrationKey	Can Configure the Registration Key.	\N
651	CRM	MaintainProjectTypes	Maintain Project Types	\N
650	Purchase	UnreleasePurchaseOrders	Can Unrelease Purchase Orders.	\N
652	Accounting	ChangeCashRecvPostDate	Can change the distribution date when posting Cash Receipts	\N
653	Sales	OverrideSOHoldType	Allowed to override the Sales Order Hold Type	\N
\.


--
-- Name: priv_priv_id_seq; Type: SEQUENCE SET; Schema: public; Owner: admin
--

SELECT pg_catalog.setval('priv_priv_id_seq', 654, true);


--
-- Data for Name: prj; Type: TABLE DATA; Schema: public; Owner: admin
--

COPY prj (prj_id, prj_number, prj_name, prj_descrip, prj_status, prj_so, prj_wo, prj_po, prj_owner_username, prj_start_date, prj_due_date, prj_assigned_date, prj_completed_date, prj_username, prj_recurring_prj_id, prj_crmacct_id, prj_cntct_id, prj_prjtype_id) FROM stdin;
\.


--
-- Name: prj_prj_id_seq; Type: SEQUENCE SET; Schema: public; Owner: admin
--

SELECT pg_catalog.setval('prj_prj_id_seq', 1, false);


--
-- Data for Name: prjtask; Type: TABLE DATA; Schema: public; Owner: admin
--

COPY prjtask (prjtask_id, prjtask_number, prjtask_name, prjtask_descrip, prjtask_prj_id, prjtask_anyuser, prjtask_status, prjtask_hours_budget, prjtask_hours_actual, prjtask_exp_budget, prjtask_exp_actual, prjtask_owner_username, prjtask_start_date, prjtask_due_date, prjtask_assigned_date, prjtask_completed_date, prjtask_username) FROM stdin;
\.


--
-- Name: prjtask_prjtask_id_seq; Type: SEQUENCE SET; Schema: public; Owner: admin
--

SELECT pg_catalog.setval('prjtask_prjtask_id_seq', 1, false);


--
-- Data for Name: prjtaskuser; Type: TABLE DATA; Schema: public; Owner: admin
--

COPY prjtaskuser (prjtaskuser_id, prjtaskuser_prjtask_id, prjtaskuser_username) FROM stdin;
\.


--
-- Name: prjtaskuser_prjtaskuser_id_seq; Type: SEQUENCE SET; Schema: public; Owner: admin
--

SELECT pg_catalog.setval('prjtaskuser_prjtaskuser_id_seq', 1, false);


--
-- Data for Name: prjtype; Type: TABLE DATA; Schema: public; Owner: admin
--

COPY prjtype (prjtype_id, prjtype_code, prjtype_descr, prjtype_active) FROM stdin;
1	Standard	Standard Projects	t
\.


--
-- Name: prjtype_prjtype_id_seq; Type: SEQUENCE SET; Schema: public; Owner: admin
--

SELECT pg_catalog.setval('prjtype_prjtype_id_seq', 1, false);


--
-- Data for Name: prodcat; Type: TABLE DATA; Schema: public; Owner: admin
--

COPY prodcat (prodcat_id, prodcat_code, prodcat_descrip) FROM stdin;
\.


--
-- Name: prodcat_prodcat_id_seq; Type: SEQUENCE SET; Schema: public; Owner: admin
--

SELECT pg_catalog.setval('prodcat_prodcat_id_seq', 27, true);


--
-- Data for Name: prospect; Type: TABLE DATA; Schema: public; Owner: admin
--

COPY prospect (prospect_id, prospect_active, prospect_number, prospect_name, prospect_cntct_id, prospect_comments, prospect_created, prospect_salesrep_id, prospect_warehous_id, prospect_taxzone_id) FROM stdin;
\.


--
-- Data for Name: qryhead; Type: TABLE DATA; Schema: public; Owner: admin
--

COPY qryhead (qryhead_id, qryhead_name, qryhead_descrip, qryhead_notes, qryhead_username, qryhead_updated) FROM stdin;
\.


--
-- Name: qryhead_qryhead_id_seq; Type: SEQUENCE SET; Schema: public; Owner: admin
--

SELECT pg_catalog.setval('qryhead_qryhead_id_seq', 1, false);


--
-- Data for Name: qryitem; Type: TABLE DATA; Schema: public; Owner: admin
--

COPY qryitem (qryitem_id, qryitem_qryhead_id, qryitem_name, qryitem_order, qryitem_src, qryitem_group, qryitem_detail, qryitem_notes, qryitem_username, qryitem_updated) FROM stdin;
\.


--
-- Name: qryitem_qryitem_id_seq; Type: SEQUENCE SET; Schema: public; Owner: admin
--

SELECT pg_catalog.setval('qryitem_qryitem_id_seq', 1, false);


--
-- Data for Name: quhead; Type: TABLE DATA; Schema: public; Owner: admin
--

COPY quhead (quhead_id, quhead_number, quhead_cust_id, quhead_quotedate, quhead_shipto_id, quhead_shiptoname, quhead_shiptoaddress1, quhead_shiptoaddress2, quhead_shiptoaddress3, quhead_shiptocity, quhead_shiptostate, quhead_shiptozipcode, quhead_shiptophone, quhead_salesrep_id, quhead_terms_id, quhead_freight, quhead_ordercomments, quhead_shipcomments, quhead_billtoname, quhead_billtoaddress1, quhead_billtoaddress2, quhead_billtoaddress3, quhead_billtocity, quhead_billtostate, quhead_billtozip, quhead_commission, quhead_custponumber, quhead_fob, quhead_shipvia, quhead_warehous_id, quhead_packdate, quhead_prj_id, quhead_misc, quhead_misc_accnt_id, quhead_misc_descrip, quhead_billtocountry, quhead_shiptocountry, quhead_curr_id, quhead_imported, quhead_expire, quhead_calcfreight, quhead_shipto_cntct_id, quhead_shipto_cntct_honorific, quhead_shipto_cntct_first_name, quhead_shipto_cntct_middle, quhead_shipto_cntct_last_name, quhead_shipto_cntct_suffix, quhead_shipto_cntct_phone, quhead_shipto_cntct_title, quhead_shipto_cntct_fax, quhead_shipto_cntct_email, quhead_billto_cntct_id, quhead_billto_cntct_honorific, quhead_billto_cntct_first_name, quhead_billto_cntct_middle, quhead_billto_cntct_last_name, quhead_billto_cntct_suffix, quhead_billto_cntct_phone, quhead_billto_cntct_title, quhead_billto_cntct_fax, quhead_billto_cntct_email, quhead_taxzone_id, quhead_taxtype_id, quhead_ophead_id, quhead_status, quhead_saletype_id, quhead_shipzone_id) FROM stdin;
\.


--
-- Name: quhead_quhead_id_seq; Type: SEQUENCE SET; Schema: public; Owner: admin
--

SELECT pg_catalog.setval('quhead_quhead_id_seq', 86, true);


--
-- Data for Name: quitem; Type: TABLE DATA; Schema: public; Owner: admin
--

COPY quitem (quitem_id, quitem_quhead_id, quitem_linenumber, quitem_itemsite_id, quitem_scheddate, quitem_qtyord, quitem_unitcost, quitem_price, quitem_custprice, quitem_memo, quitem_custpn, quitem_createorder, quitem_order_warehous_id, quitem_item_id, quitem_prcost, quitem_imported, quitem_qty_uom_id, quitem_qty_invuomratio, quitem_price_uom_id, quitem_price_invuomratio, quitem_promdate, quitem_taxtype_id, quitem_dropship, quitem_itemsrc_id, quitem_pricemode) FROM stdin;
\.


--
-- Name: quitem_quitem_id_seq; Type: SEQUENCE SET; Schema: public; Owner: admin
--

SELECT pg_catalog.setval('quitem_quitem_id_seq', 89, true);


--
-- Data for Name: rcalitem; Type: TABLE DATA; Schema: public; Owner: admin
--

COPY rcalitem (rcalitem_id, rcalitem_calhead_id, rcalitem_offsettype, rcalitem_offsetcount, rcalitem_periodtype, rcalitem_periodcount, rcalitem_name) FROM stdin;
\.


--
-- Data for Name: recur; Type: TABLE DATA; Schema: public; Owner: admin
--

COPY recur (recur_id, recur_parent_id, recur_parent_type, recur_period, recur_freq, recur_start, recur_end, recur_max, recur_data) FROM stdin;
\.


--
-- Name: recur_recur_id_seq; Type: SEQUENCE SET; Schema: public; Owner: admin
--

SELECT pg_catalog.setval('recur_recur_id_seq', 1, false);


--
-- Data for Name: recurtype; Type: TABLE DATA; Schema: public; Owner: admin
--

COPY recurtype (recurtype_id, recurtype_type, recurtype_table, recurtype_donecheck, recurtype_schedcol, recurtype_limit, recurtype_copyfunc, recurtype_copyargs, recurtype_delfunc) FROM stdin;
4	I	invchead	invchead_posted	invchead_invcdate	\N	copyinvoice	{integer,date}	deleteinvoice
3	J	prj	(prj_completed_date IS NOT NULL OR prj_status = 'C')	prj_due_date	\N	copyprj	{int,date}	\N
5	V	vohead	vohead_posted	vohead_docdate	\N	copyvoucher	{integer,date}	\N
2	INCDT	incdt	incdt_status IN ('R', 'L')	incdt_timestamp	\N	copyincdt	{int,timestamp}	deleteincident
1	TODO	todoitem	todoitem_completed_date IS NOT NULL	todoitem_due_date	checkprivilege('MaintainAllToDoItems') OR (checkprivilege('MaintainPersonalToDoItems') AND CURRENT_USER IN (todoitem_owner_username, todoitem_username))	copytodoitem	{int,date,NULL}	\N
\.


--
-- Name: recurtype_recurtype_id_seq; Type: SEQUENCE SET; Schema: public; Owner: admin
--

SELECT pg_catalog.setval('recurtype_recurtype_id_seq', 5, true);


--
-- Data for Name: recv; Type: TABLE DATA; Schema: public; Owner: admin
--

COPY recv (recv_id, recv_order_type, recv_order_number, recv_orderitem_id, recv_agent_username, recv_itemsite_id, recv_vend_id, recv_vend_item_number, recv_vend_item_descrip, recv_vend_uom, recv_purchcost, recv_purchcost_curr_id, recv_duedate, recv_qty, recv_recvcost, recv_recvcost_curr_id, recv_freight, recv_freight_curr_id, recv_date, recv_value, recv_posted, recv_invoiced, recv_vohead_id, recv_voitem_id, recv_trans_usr_name, recv_notes, recv_gldistdate, recv_splitfrom_id, recv_rlsd_duedate) FROM stdin;
\.


--
-- Name: recv_recv_id_seq; Type: SEQUENCE SET; Schema: public; Owner: admin
--

SELECT pg_catalog.setval('recv_recv_id_seq', 1, true);


--
-- Data for Name: report; Type: TABLE DATA; Schema: public; Owner: admin
--

COPY report (report_id, report_name, report_sys, report_source, report_descrip, report_grade, report_loaddate) FROM stdin;
453	BacklogByParameterList	\N	<!DOCTYPE openRPTDef>\n<report>\n <title>Backlog By Parameter List</title>\n <name>BacklogByParameterList</name>\n <description></description>\n <parameter default="01-01-2020" active="true" listtype="static" type="string" name="endDate">\n  <description></description>\n </parameter>\n <parameter default="t" active="true" listtype="static" type="string" name="showPrices">\n  <description></description>\n </parameter>\n <parameter default="01-01-1990" active="true" listtype="static" type="string" name="startDate">\n  <description></description>\n </parameter>\n <grid>\n  <snap/>\n  <show/>\n  <x>0.05</x>\n  <y>0.05</y>\n </grid>\n <size>Letter</size>\n <portrait/>\n <topmargin>50</topmargin>\n <bottommargin>50</bottommargin>\n <rightmargin>50</rightmargin>\n <leftmargin>50</leftmargin>\n <querysource>\n  <name>head</name>\n  <sql>SELECT CASE WHEN (checkPrivilege('ViewCustomerPrices') \n             AND isMultiCurr()) THEN\n         text('Amount(base)')\n       WHEN (checkPrivilege('ViewCustomerPrices')) THEN\n         text('Amount')\n       ELSE\n         text('')\n       END\n       AS lbl_baseamount,\n       CASE WHEN (checkPrivilege('ViewCustomerPrices') \n         AND isMultiCurr()) THEN\n         text('Amount(foreign)')\n       ELSE\n         text('')\n       END\n       AS lbl_foreignamount;</sql>\n </querysource>\n <querysource>\n  <name>detail</name>\n  <sql>SELECT cohead_number, coitem_linenumber, cust_name,\n       formatDate(cohead_orderdate) AS f_orderdate,\n       formatDate(coitem_scheddate) AS f_scheddate,\n       item_number, uom_name,\n       item_descrip1, item_descrip2,\n       formatQty(coitem_qtyord) AS f_qtyord,\n       formatQty(coitem_qtyshipped) AS f_qtyship,\n       formatQty(noNeg(coitem_qtyord - coitem_qtyshipped + coitem_qtyreturned)) AS f_balance, \n       CASE WHEN (checkPrivilege('ViewCustomerPrices')) THEN\nformatMoney(round((noNeg(coitem_qtyord - coitem_qtyshipped + coitem_qtyreturned) * coitem_qty_invuomratio)\n                * (currtobase(cohead_curr_id,coitem_price,cohead_orderdate) / coitem_price_invuomratio),2))\n       ELSE\n         text('')\n       END\n       AS f_ammount,\n       CASE WHEN (checkPrivilege('ViewCustomerPrices') AND isMultiCurr()) THEN\nformatMoney(round((noNeg(coitem_qtyord - coitem_qtyshipped + coitem_qtyreturned) * coitem_qty_invuomratio)\n                * (coitem_price / coitem_price_invuomratio),2))\n       ELSE\n         text('')\n       END\n       AS foreign_ammount,\nround((noNeg(coitem_qtyord - coitem_qtyshipped + coitem_qtyreturned) * coitem_qty_invuomratio)\n    * (currtobase(cohead_curr_id,coitem_price,cohead_orderdate) / coitem_price_invuomratio),2) AS backlog \n  FROM cohead, coitem, itemsite, item, cust, uom\n WHERE ((coitem_cohead_id=cohead_id)\n   AND (cohead_cust_id=cust_id)\n   AND (coitem_itemsite_id=itemsite_id)\n   AND (itemsite_item_id=item_id)\n   AND (item_inv_uom_id=uom_id)\n   AND (coitem_status='O')\n  &lt;? if exists("cohead_id") ?>\n    AND  (coitem_cohead_id=&lt;? value("cohead_id") ?>)\n  &lt;? endif ?>\n  &lt;? if exists("startDate") ?>\n    AND  (cohead_orderdate >= &lt;? value("startDate") ?>)\n  &lt;? endif ?>\n  &lt;? if exists("endDate") ?>\n    AND  (cohead_orderdate &lt;= &lt;? value("endDate") ?>)\n  &lt;? endif ?>\n  &lt;? if exists("startDateSched") ?>\n    AND  (coitem_scheddate >= &lt;? value("startDateSched") ?>)\n  &lt;? endif ?>\n  &lt;? if exists("endDateSched") ?>\n    AND  (coitem_scheddate >= &lt;? value("endDateSched") ?>)\n  &lt;? endif ?>\n  &lt;? if exists("salesrep_id") ?>\n    AND  (cohead_salesrep_id=&lt;? value("salesrep_id") ?>)\n  &lt;? endif ?>\n  &lt;? if exists("shipto_id") ?>\n    AND  (cohead_shipto_id=&lt;? value("shipto_id") ?>)\n  &lt;? endif ?>\n  &lt;? if exists("cust_id") ?>\n    AND  (cohead_cust_id=&lt;? value("cust_id") ?>)\n  &lt;? endif ?>\n  &lt;? if exists("custtype_id") ?>\n    AND  (cust_custtype_id=&lt;? value("custtype_id") ?>)\n  &lt;? endif ?>\n  &lt;? if exists("custtype_pattern") ?>\n    AND  (cust_custtype_id IN (SELECT DISTINCT custtype_id\n                               FROM custtype\n                               WHERE (custtype_code ~ &lt;? value("custtype_pattern") ?>)))\n  &lt;? endif ?>\n  &lt;? if exists("custgrp") ?>\n    AND (cust_id IN (SELECT DISTINCT custgrpitem_cust_id\n                     FROM custgrpitem))\n  &lt;? endif ?>\n  &lt;? if exists("custgrp_id") ?>\n    AND (cust_id IN (SELECT DISTINCT custgrpitem_cust_id\n                     FROM custgrpitem\n                     WHERE (custgrpitem_custgrp_id=&lt;? value("custgrp_id") ?>)))\n  &lt;? endif ?>\n  &lt;? if exists("custgrp_pattern") ?>\n    AND (cust_id IN (SELECT DISTINCT custgrpitem_cust_id\n                     FROM custgrp, custgrpitem\n                     WHERE ( (custgrpitem_custgrp_id=custgrp_id)\n                       AND   (custgrp_name ~ &lt;? value("custgrp_pattern") ?>) )) )\n  &lt;? endif ?>\n\n  &lt;? if exists("item_id") ?>\n    AND  (itemsite_item_id=&lt;? value("item_id") ?>)\n  &lt;? endif ?>\n  &lt;? if exists("prodcat_id") ?>\n    AND (item_prodcat_id=&lt;? value("prodcat_id") ?>)\n  &lt;? endif ?>\n  &lt;? if exists("prodcat_pattern") ?>\n    AND (item_prodcat_id IN (SELECT DISTINCT prodcat_id\n                             FROM prodcat\n                             WHERE (prodcat_code ~ &lt;? value("prodcat_pattern") ?>)))\n  &lt;? endif ?>\n\n  &lt;? if exists("warehous_id") ?>\n    AND  (itemsite_warehous_id=&lt;? value("warehous_id") ?>)\n  &lt;? endif ?>\n)\nORDER BY coitem_scheddate, cohead_number, coitem_linenumber;</sql>\n </querysource>\n <querysource>\n  <name>total</name>\n  <sql>SELECT now()\n WHERE 't' =\nCASE WHEN (checkPrivilege('ViewCustomerPrices') \n  't'\nELSE\n  'f'\nEND</sql>\n </querysource>\n <rpthead>\n  <height>226</height>\n  <label>\n   <rect>\n    <x>305</x>\n    <y>185</y>\n    <width>102</width>\n    <height>15</height>\n   </rect>\n   <font>\n    <face>Arial</face>\n    <size>8</size>\n    <weight>normal</weight>\n   </font>\n   <left/>\n   <vcenter/>\n   <string>Item Number</string>\n  </label>\n  <label>\n   <rect>\n    <x>112</x>\n    <y>185</y>\n    <width>110</width>\n    <height>15</height>\n   </rect>\n   <font>\n    <face>Arial</face>\n    <size>8</size>\n    <weight>normal</weight>\n   </font>\n   <left/>\n   <vcenter/>\n   <string>Customer</string>\n  </label>\n  <label>\n   <rect>\n    <x>305</x>\n    <y>200</y>\n    <width>102</width>\n    <height>15</height>\n   </rect>\n   <font>\n    <face>Arial</face>\n    <size>8</size>\n    <weight>normal</weight>\n   </font>\n   <left/>\n   <vcenter/>\n   <string>Description</string>\n  </label>\n  <field>\n   <rect>\n    <x>660</x>\n    <y>185</y>\n    <width>85</width>\n    <height>15</height>\n   </rect>\n   <font>\n    <face>Arial</face>\n    <size>8</size>\n    <weight>normal</weight>\n   </font>\n   <hcenter/>\n   <vcenter/>\n   <data>\n    <query>head</query>\n    <column>lbl_baseamount</column>\n   </data>\n  </field>\n  <line>\n   <xstart>5</xstart>\n   <ystart>215</ystart>\n   <xend>745</xend>\n   <yend>215</yend>\n   <weight>2</weight>\n  </line>\n  <field>\n   <rect>\n    <x>660</x>\n    <y>200</y>\n    <width>85</width>\n    <height>15</height>\n   </rect>\n   <font>\n    <face>Arial</face>\n    <size>8</size>\n    <weight>normal</weight>\n   </font>\n   <hcenter/>\n   <vcenter/>\n   <data>\n    <query>head</query>\n    <column>lbl_foreignamount</column>\n   </data>\n  </field>\n  <label>\n   <rect>\n    <x>275</x>\n    <y>0</y>\n    <width>465</width>\n    <height>37</height>\n   </rect>\n   <font>\n    <face>Arial</face>\n    <size>18</size>\n    <weight>bold</weight>\n   </font>\n   <right/>\n   <vcenter/>\n   <string>Backlog</string>\n  </label>\n  <label>\n   <rect>\n    <x>450</x>\n    <y>185</y>\n    <width>50</width>\n    <height>15</height>\n   </rect>\n   <font>\n    <face>Arial</face>\n    <size>8</size>\n    <weight>normal</weight>\n   </font>\n   <hcenter/>\n   <vcenter/>\n   <string>UOM</string>\n  </label>\n  <label>\n   <rect>\n    <x>5</x>\n    <y>185</y>\n    <width>60</width>\n    <height>15</height>\n   </rect>\n   <font>\n    <face>Arial</face>\n    <size>8</size>\n    <weight>normal</weight>\n   </font>\n   <left/>\n   <vcenter/>\n   <string>S/O #</string>\n  </label>\n  <label>\n   <rect>\n    <x>65</x>\n    <y>185</y>\n    <width>50</width>\n    <height>15</height>\n   </rect>\n   <font>\n    <face>Arial</face>\n    <size>8</size>\n    <weight>normal</weight>\n   </font>\n   <hcenter/>\n   <vcenter/>\n   <string>#</string>\n  </label>\n  <label>\n   <rect>\n    <x>590</x>\n    <y>185</y>\n    <width>75</width>\n    <height>15</height>\n   </rect>\n   <font>\n    <face>Arial</face>\n    <size>8</size>\n    <weight>normal</weight>\n   </font>\n   <hcenter/>\n   <vcenter/>\n   <string>Balance</string>\n  </label>\n  <label>\n   <rect>\n    <x>507</x>\n    <y>200</y>\n    <width>75</width>\n    <height>15</height>\n   </rect>\n   <font>\n    <face>Arial</face>\n    <size>8</size>\n    <weight>normal</weight>\n   </font>\n   <hcenter/>\n   <vcenter/>\n   <string>Qty. Shipped</string>\n  </label>\n  <label>\n   <rect>\n    <x>225</x>\n    <y>185</y>\n    <width>75</width>\n    <height>15</height>\n   </rect>\n   <font>\n    <face>Arial</face>\n    <size>8</size>\n    <weight>normal</weight>\n   </font>\n   <hcenter/>\n   <vcenter/>\n   <string>Ordered</string>\n  </label>\n  <label>\n   <rect>\n    <x>225</x>\n    <y>200</y>\n    <width>75</width>\n    <height>15</height>\n   </rect>\n   <font>\n    <face>Arial</face>\n    <size>8</size>\n    <weight>normal</weight>\n   </font>\n   <hcenter/>\n   <vcenter/>\n   <string>Scheduled</string>\n  </label>\n  <label>\n   <rect>\n    <x>507</x>\n    <y>185</y>\n    <width>75</width>\n    <height>15</height>\n   </rect>\n   <font>\n    <face>Arial</face>\n    <size>8</size>\n    <weight>normal</weight>\n   </font>\n   <hcenter/>\n   <vcenter/>\n   <string>Qty. Ordered</string>\n  </label>\n  <text>\n   <rect>\n    <x>5</x>\n    <y>28</y>\n    <width>725</width>\n    <height>15</height>\n   </rect>\n   <bottompad>12</bottompad>\n   <font>\n    <face>Arial</face>\n    <size>10</size>\n    <weight>bold</weight>\n   </font>\n   <left/>\n   <top/>\n   <data>\n    <query>Parameter Query</query>\n    <column>filter</column>\n   </data>\n  </text>\n </rpthead>\n <pghead>\n  <firstpage/>\n  <height>6</height>\n </pghead>\n <pghead>\n  <height>36</height>\n  <label>\n   <rect>\n    <x>507</x>\n    <y>0</y>\n    <width>75</width>\n    <height>15</height>\n   </rect>\n   <font>\n    <face>Arial</face>\n    <size>8</size>\n    <weight>normal</weight>\n   </font>\n   <hcenter/>\n   <vcenter/>\n   <string>Qty. Ordered</string>\n  </label>\n  <label>\n   <rect>\n    <x>305</x>\n    <y>0</y>\n    <width>102</width>\n    <height>15</height>\n   </rect>\n   <font>\n    <face>Arial</face>\n    <size>8</size>\n    <weight>normal</weight>\n   </font>\n   <left/>\n   <vcenter/>\n   <string>Item Number</string>\n  </label>\n  <label>\n   <rect>\n    <x>305</x>\n    <y>15</y>\n    <width>102</width>\n    <height>15</height>\n   </rect>\n   <font>\n    <face>Arial</face>\n    <size>8</size>\n    <weight>normal</weight>\n   </font>\n   <left/>\n   <vcenter/>\n   <string>Description</string>\n  </label>\n  <label>\n   <rect>\n    <x>65</x>\n    <y>0</y>\n    <width>50</width>\n    <height>15</height>\n   </rect>\n   <font>\n    <face>Arial</face>\n    <size>8</size>\n    <weight>normal</weight>\n   </font>\n   <hcenter/>\n   <vcenter/>\n   <string>#</string>\n  </label>\n  <label>\n   <rect>\n    <x>225</x>\n    <y>0</y>\n    <width>75</width>\n    <height>15</height>\n   </rect>\n   <font>\n    <face>Arial</face>\n    <size>8</size>\n    <weight>normal</weight>\n   </font>\n   <hcenter/>\n   <vcenter/>\n   <string>Ordered</string>\n  </label>\n  <label>\n   <rect>\n    <x>507</x>\n    <y>15</y>\n    <width>75</width>\n    <height>15</height>\n   </rect>\n   <font>\n    <face>Arial</face>\n    <size>8</size>\n    <weight>normal</weight>\n   </font>\n   <hcenter/>\n   <vcenter/>\n   <string>Qty. Shipped</string>\n  </label>\n  <label>\n   <rect>\n    <x>450</x>\n    <y>0</y>\n    <width>50</width>\n    <height>15</height>\n   </rect>\n   <font>\n    <face>Arial</face>\n    <size>8</size>\n    <weight>normal</weight>\n   </font>\n   <hcenter/>\n   <vcenter/>\n   <string>UOM</string>\n  </label>\n  <label>\n   <rect>\n    <x>590</x>\n    <y>0</y>\n    <width>75</width>\n    <height>15</height>\n   </rect>\n   <font>\n    <face>Arial</face>\n    <size>8</size>\n    <weight>normal</weight>\n   </font>\n   <hcenter/>\n   <vcenter/>\n   <string>Balance</string>\n  </label>\n  <label>\n   <rect>\n    <x>225</x>\n    <y>15</y>\n    <width>75</width>\n    <height>15</height>\n   </rect>\n   <font>\n    <face>Arial</face>\n    <size>8</size>\n    <weight>normal</weight>\n   </font>\n   <hcenter/>\n   <vcenter/>\n   <string>Scheduled</string>\n  </label>\n  <label>\n   <rect>\n    <x>5</x>\n    <y>0</y>\n    <width>60</width>\n    <height>15</height>\n   </rect>\n   <font>\n    <face>Arial</face>\n    <size>8</size>\n    <weight>normal</weight>\n   </font>\n   <left/>\n   <vcenter/>\n   <string>S/O #</string>\n  </label>\n  <field>\n   <rect>\n    <x>660</x>\n    <y>0</y>\n    <width>85</width>\n    <height>15</height>\n   </rect>\n   <font>\n    <face>Arial</face>\n    <size>8</size>\n    <weight>normal</weight>\n   </font>\n   <hcenter/>\n   <vcenter/>\n   <data>\n    <query>head</query>\n    <column>lbl_baseamount</column>\n   </data>\n  </field>\n  <field>\n   <rect>\n    <x>660</x>\n    <y>15</y>\n    <width>85</width>\n    <height>15</height>\n   </rect>\n   <font>\n    <face>Arial</face>\n    <size>8</size>\n    <weight>normal</weight>\n   </font>\n   <hcenter/>\n   <vcenter/>\n   <data>\n    <query>head</query>\n    <column>lbl_foreignamount</column>\n   </data>\n  </field>\n  <line>\n   <xstart>5</xstart>\n   <ystart>30</ystart>\n   <xend>745</xend>\n   <yend>30</yend>\n   <weight>2</weight>\n  </line>\n  <label>\n   <rect>\n    <x>112</x>\n    <y>0</y>\n    <width>110</width>\n    <height>15</height>\n   </rect>\n   <font>\n    <face>Arial</face>\n    <size>8</size>\n    <weight>normal</weight>\n   </font>\n   <left/>\n   <vcenter/>\n   <string>Customer</string>\n  </label>\n </pghead>\n <section>\n  <name>detail</name>\n  <detail>\n   <key>\n    <query>detail</query>\n   </key>\n   <height>52</height>\n   <field>\n    <rect>\n     <x>305</x>\n     <y>30</y>\n     <width>250</width>\n     <height>15</height>\n    </rect>\n    <font>\n     <face>Arial</face>\n     <size>8</size>\n     <weight>bold</weight>\n    </font>\n    <left/>\n    <vcenter/>\n    <data>\n     <query>detail</query>\n     <column>item_descrip2</column>\n    </data>\n   </field>\n   <field>\n    <rect>\n     <x>65</x>\n     <y>0</y>\n     <width>50</width>\n     <height>15</height>\n    </rect>\n    <font>\n     <face>Arial</face>\n     <size>8</size>\n     <weight>bold</weight>\n    </font>\n    <hcenter/>\n    <vcenter/>\n    <data>\n     <query>detail</query>\n     <column>coitem_linenumber</column>\n    </data>\n   </field>\n   <line>\n    <xstart>5</xstart>\n    <ystart>45</ystart>\n    <xend>745</xend>\n    <yend>45</yend>\n    <weight>0</weight>\n   </line>\n   <field>\n    <rect>\n     <x>305</x>\n     <y>15</y>\n     <width>200</width>\n     <height>15</height>\n    </rect>\n    <font>\n     <face>Arial</face>\n     <size>8</size>\n     <weight>bold</weight>\n    </font>\n    <left/>\n    <vcenter/>\n    <data>\n     <query>detail</query>\n     <column>item_descrip1</column>\n    </data>\n   </field>\n   <field>\n    <rect>\n     <x>507</x>\n     <y>15</y>\n     <width>75</width>\n     <height>15</height>\n    </rect>\n    <font>\n     <face>Arial</face>\n     <size>8</size>\n     <weight>bold</weight>\n    </font>\n    <right/>\n    <vcenter/>\n    <data>\n     <query>detail</query>\n     <column>f_qtyship</column>\n    </data>\n   </field>\n   <field>\n    <rect>\n     <x>671</x>\n     <y>15</y>\n     <width>75</width>\n     <height>15</height>\n    </rect>\n    <font>\n     <face>Arial</face>\n     <size>8</size>\n     <weight>bold</weight>\n    </font>\n    <right/>\n    <vcenter/>\n    <data>\n     <query>detail</query>\n     <column>foreign_ammount</column>\n    </data>\n   </field>\n   <field>\n    <rect>\n     <x>305</x>\n     <y>0</y>\n     <width>140</width>\n     <height>15</height>\n    </rect>\n    <font>\n     <face>Arial</face>\n     <size>8</size>\n     <weight>bold</weight>\n    </font>\n    <left/>\n    <vcenter/>\n    <data>\n     <query>detail</query>\n     <column>item_number</column>\n    </data>\n   </field>\n   <field>\n    <rect>\n     <x>670</x>\n     <y>0</y>\n     <width>75</width>\n     <height>15</height>\n    </rect>\n    <font>\n     <face>Arial</face>\n     <size>8</size>\n     <weight>bold</weight>\n    </font>\n    <right/>\n    <vcenter/>\n    <data>\n     <query>detail</query>\n     <column>f_ammount</column>\n    </data>\n   </field>\n   <field>\n    <rect>\n     <x>450</x>\n     <y>0</y>\n     <width>50</width>\n     <height>15</height>\n    </rect>\n    <font>\n     <face>Arial</face>\n     <size>8</size>\n     <weight>bold</weight>\n    </font>\n    <hcenter/>\n    <vcenter/>\n    <data>\n     <query>detail</query>\n     <column>uom_name</column>\n    </data>\n   </field>\n   <field>\n    <rect>\n     <x>225</x>\n     <y>0</y>\n     <width>75</width>\n     <height>15</height>\n    </rect>\n    <font>\n     <face>Arial</face>\n     <size>8</size>\n     <weight>bold</weight>\n    </font>\n    <right/>\n    <vcenter/>\n    <data>\n     <query>detail</query>\n     <column>f_orderdate</column>\n    </data>\n   </field>\n   <field>\n    <rect>\n     <x>507</x>\n     <y>0</y>\n     <width>75</width>\n     <height>15</height>\n    </rect>\n    <font>\n     <face>Arial</face>\n     <size>8</size>\n     <weight>bold</weight>\n    </font>\n    <right/>\n    <vcenter/>\n    <data>\n     <query>detail</query>\n     <column>f_qtyord</column>\n    </data>\n   </field>\n   <field>\n    <rect>\n     <x>225</x>\n     <y>15</y>\n     <width>75</width>\n     <height>15</height>\n    </rect>\n    <font>\n     <face>Arial</face>\n     <size>8</size>\n     <weight>bold</weight>\n    </font>\n    <right/>\n    <vcenter/>\n    <data>\n     <query>detail</query>\n     <column>f_scheddate</column>\n    </data>\n   </field>\n   <field>\n    <rect>\n     <x>112</x>\n     <y>0</y>\n     <width>110</width>\n     <height>15</height>\n    </rect>\n    <font>\n     <face>Arial</face>\n     <size>8</size>\n     <weight>bold</weight>\n    </font>\n    <left/>\n    <vcenter/>\n    <data>\n     <query>detail</query>\n     <column>cust_name</column>\n    </data>\n   </field>\n   <field>\n    <rect>\n     <x>580</x>\n     <y>0</y>\n     <width>75</width>\n     <height>15</height>\n    </rect>\n    <font>\n     <face>Arial</face>\n     <size>8</size>\n     <weight>bold</weight>\n    </font>\n    <right/>\n    <vcenter/>\n    <data>\n     <query>detail</query>\n     <column>f_balance</column>\n    </data>\n   </field>\n   <field>\n    <rect>\n     <x>5</x>\n     <y>0</y>\n     <width>60</width>\n     <height>15</height>\n    </rect>\n    <font>\n     <face>Arial</face>\n     <size>8</size>\n     <weight>bold</weight>\n    </font>\n    <left/>\n    <vcenter/>\n    <data>\n     <query>detail</query>\n     <column>cohead_number</column>\n    </data>\n   </field>\n  </detail>\n </section>\n <section>\n  <name>totals</name>\n  <detail>\n   <key>\n    <query>total</query>\n   </key>\n   <height>18</height>\n   <label>\n    <rect>\n     <x>230</x>\n     <y>0</y>\n     <width>415</width>\n     <height>15</height>\n    </rect>\n    <font>\n     <face>Arial</face>\n     <size>8</size>\n     <weight>normal</weight>\n    </font>\n    <right/>\n    <vcenter/>\n    <string>Total:</string>\n   </label>\n   <field>\n    <rect>\n     <x>670</x>\n     <y>0</y>\n     <width>75</width>\n     <height>15</height>\n    </rect>\n    <font>\n     <face>Arial</face>\n     <size>8</size>\n     <weight>bold</weight>\n    </font>\n    <right/>\n    <vcenter/>\n    <data>\n     <query>detail</query>\n     <column>backlog</column>\n    </data>\n    <format builtin="true">money</format>\n    <tracktotal/>\n   </field>\n  </detail>\n </section>\n <pgfoot>\n  <height>18</height>\n  <field>\n   <rect>\n    <x>90</x>\n    <y>0</y>\n    <width>100</width>\n    <height>15</height>\n   </rect>\n   <font>\n    <face>Arial</face>\n    <size>8</size>\n    <weight>bold</weight>\n   </font>\n   <left/>\n   <vcenter/>\n   <data>\n    <query>Context Query</query>\n    <column>report_date</column>\n   </data>\n  </field>\n  <label>\n   <rect>\n    <x>0</x>\n    <y>0</y>\n    <width>85</width>\n    <height>15</height>\n   </rect>\n   <font>\n    <face>Arial</face>\n    <size>8</size>\n    <weight>normal</weight>\n   </font>\n   <right/>\n   <vcenter/>\n   <string>Report Date:</string>\n  </label>\n  <label>\n   <rect>\n    <x>615</x>\n    <y>0</y>\n    <width>85</width>\n    <height>15</height>\n   </rect>\n   <font>\n    <face>Arial</face>\n    <size>8</size>\n    <weight>normal</weight>\n   </font>\n   <right/>\n   <vcenter/>\n   <string>Page:</string>\n  </label>\n  <field>\n   <rect>\n    <x>705</x>\n    <y>0</y>\n    <width>40</width>\n    <height>15</height>\n   </rect>\n   <font>\n    <face>Arial</face>\n    <size>8</size>\n    <weight>bold</weight>\n   </font>\n   <left/>\n   <vcenter/>\n   <data>\n    <query>Context Query</query>\n    <column>page_number</column>\n   </data>\n  </field>\n </pgfoot>\n</report>\n	\N	0	2011-02-16 10:08:43.701392
29	TimePhasedUsageStatisticsByItem	\N	<!DOCTYPE openRPTDef>\n<report>\n <title>Time Phased Usage Statistics By Item</title>\n <name>TimePhasedUsageStatisticsByItem</name>\n <description/>\n <size>Letter</size>\n <portrait/>\n <topmargin>50</topmargin>\n <bottommargin>50</bottommargin>\n <rightmargin>50</rightmargin>\n <leftmargin>50</leftmargin>\n <querysource>\n  <name>head</name>\n  <sql>SELECT item_number, item_descrip1, item_descrip2,\n       CASE WHEN (%2=-1) THEN 'All Warehouses'\n                  ELSE ( SELECT warehous_code\n                                 FROM warehous\n                              WHERE (warehous_id=%2) )\n       END AS warehouse\nFROM item\nWHERE (item_id=%1);</sql>\n </querysource>\n <querysource>\n  <name>detail</name>\n  <sql>SELECT findPeriodStart(rcalitem_id) AS pstart,\n       findPeriodEnd(rcalitem_id) AS pend,\n       (formatDate(findPeriodStart(rcalitem_id)) || '-' || formatDate(findPeriodEnd(rcalitem_id))) AS period,\n       warehous_code,\n       formatQty(summTransR(itemsite_id, rcalitem_id)) AS received,\n       formatQty(summTransI(itemsite_id, rcalitem_id)) AS issued,\n       formatQty(summTransS(itemsite_id, rcalitem_id)) AS sold,\n       formatQty(summTransC(itemsite_id, rcalitem_id)) AS scrap,\n       formatQty(summTransA(itemsite_id, rcalitem_id)) AS adjustments\n  FROM rcalitem, itemsite, warehous\n WHERE ((rcalitem_id in (%4))\n   AND (itemsite_warehous_id=warehous_id)\n   AND (itemsite_item_id=%1)\n   AND ((%2=-1) OR (itemsite_warehous_id=%2)) )\n UNION\nSELECT findPeriodStart(acalitem_id) AS pstart,\n       findPeriodEnd(acalitem_id) AS pend,\n       (formatDate(findPeriodStart(acalitem_id)) || '-' || formatDate(findPeriodEnd(acalitem_id))) AS period,\n       warehous_code,\n       formatQty(summTransR(itemsite_id, acalitem_id)) AS received,\n       formatQty(summTransI(itemsite_id, acalitem_id)) AS issued,\n       formatQty(summTransS(itemsite_id, acalitem_id)) AS sold,\n       formatQty(summTransC(itemsite_id, acalitem_id)) AS scrap,\n       formatQty(summTransA(itemsite_id, acalitem_id)) AS adjustments\n  FROM acalitem, itemsite, warehous\n WHERE ((acalitem_id IN (%4))\n   AND (itemsite_warehous_id=warehous_id)\n   AND (itemsite_item_id=%1)\n   AND ((%2=-1) OR (itemsite_warehous_id=%2)) )\nORDER BY pstart, warehous_code;</sql>\n </querysource>\n <rpthead>\n  <height>221</height>\n  <label>\n   <rect>\n    <x>575</x>\n    <y>200</y>\n    <width>80</width>\n    <height>15</height>\n   </rect>\n   <font>\n    <face>Arial</face>\n    <size>8</size>\n    <weight>normal</weight>\n   </font>\n   <hcenter/>\n   <vcenter/>\n   <string>Scrap</string>\n  </label>\n  <label>\n   <rect>\n    <x>660</x>\n    <y>200</y>\n    <width>80</width>\n    <height>15</height>\n   </rect>\n   <font>\n    <face>Arial</face>\n    <size>8</size>\n    <weight>normal</weight>\n   </font>\n   <hcenter/>\n   <vcenter/>\n   <string>Adjusted</string>\n  </label>\n  <label>\n   <rect>\n    <x>270</x>\n    <y>200</y>\n    <width>35</width>\n    <height>15</height>\n   </rect>\n   <font>\n    <face>Arial</face>\n    <size>8</size>\n    <weight>normal</weight>\n   </font>\n   <hcenter/>\n   <vcenter/>\n   <string>Whs.</string>\n  </label>\n  <label>\n   <rect>\n    <x>30</x>\n    <y>80</y>\n    <width>105</width>\n    <height>20</height>\n   </rect>\n   <font>\n    <face>Arial</face>\n    <size>10</size>\n    <weight>normal</weight>\n   </font>\n   <right/>\n   <vcenter/>\n   <string>Item Number:</string>\n  </label>\n  <field>\n   <rect>\n    <x>140</x>\n    <y>140</y>\n    <width>200</width>\n    <height>20</height>\n   </rect>\n   <font>\n    <face>Arial</face>\n    <size>10</size>\n    <weight>bold</weight>\n   </font>\n   <left/>\n   <vcenter/>\n   <data>\n    <query>head</query>\n    <column>warehouse</column>\n   </data>\n  </field>\n  <field>\n   <rect>\n    <x>140</x>\n    <y>120</y>\n    <width>385</width>\n    <height>20</height>\n   </rect>\n   <font>\n    <face>Arial</face>\n    <size>10</size>\n    <weight>bold</weight>\n   </font>\n   <left/>\n   <vcenter/>\n   <data>\n    <query>head</query>\n    <column>item_descrip2</column>\n   </data>\n  </field>\n  <line>\n   <xstart>5</xstart>\n   <ystart>215</ystart>\n   <xend>740</xend>\n   <yend>215</yend>\n   <weight>2</weight>\n  </line>\n  <label>\n   <rect>\n    <x>405</x>\n    <y>200</y>\n    <width>80</width>\n    <height>15</height>\n   </rect>\n   <font>\n    <face>Arial</face>\n    <size>8</size>\n    <weight>normal</weight>\n   </font>\n   <hcenter/>\n   <vcenter/>\n   <string>Issued</string>\n  </label>\n  <label>\n   <rect>\n    <x>30</x>\n    <y>140</y>\n    <width>105</width>\n    <height>20</height>\n   </rect>\n   <font>\n    <face>Arial</face>\n    <size>10</size>\n    <weight>normal</weight>\n   </font>\n   <right/>\n   <vcenter/>\n   <string>Warehouse:</string>\n  </label>\n  <label>\n   <rect>\n    <x>10</x>\n    <y>200</y>\n    <width>250</width>\n    <height>15</height>\n   </rect>\n   <font>\n    <face>Arial</face>\n    <size>8</size>\n    <weight>normal</weight>\n   </font>\n   <hcenter/>\n   <vcenter/>\n   <string>Period</string>\n  </label>\n  <field>\n   <rect>\n    <x>140</x>\n    <y>100</y>\n    <width>385</width>\n    <height>20</height>\n   </rect>\n   <font>\n    <face>Arial</face>\n    <size>10</size>\n    <weight>bold</weight>\n   </font>\n   <left/>\n   <vcenter/>\n   <data>\n    <query>head</query>\n    <column>item_descrip1</column>\n   </data>\n  </field>\n  <label>\n   <rect>\n    <x>490</x>\n    <y>200</y>\n    <width>80</width>\n    <height>15</height>\n   </rect>\n   <font>\n    <face>Arial</face>\n    <size>8</size>\n    <weight>normal</weight>\n   </font>\n   <hcenter/>\n   <vcenter/>\n   <string>Sold</string>\n  </label>\n  <label>\n   <rect>\n    <x>240</x>\n    <y>10</y>\n    <width>485</width>\n    <height>38</height>\n   </rect>\n   <font>\n    <face>Arial</face>\n    <size>18</size>\n    <weight>bold</weight>\n   </font>\n   <right/>\n   <vcenter/>\n   <string>Time Phased Usage Statistics By Item</string>\n  </label>\n  <label>\n   <rect>\n    <x>320</x>\n    <y>200</y>\n    <width>80</width>\n    <height>15</height>\n   </rect>\n   <font>\n    <face>Arial</face>\n    <size>8</size>\n    <weight>normal</weight>\n   </font>\n   <hcenter/>\n   <vcenter/>\n   <string>Received</string>\n  </label>\n  <field>\n   <rect>\n    <x>140</x>\n    <y>80</y>\n    <width>200</width>\n    <height>20</height>\n   </rect>\n   <font>\n    <face>Arial</face>\n    <size>10</size>\n    <weight>bold</weight>\n   </font>\n   <left/>\n   <vcenter/>\n   <data>\n    <query>head</query>\n    <column>item_number</column>\n   </data>\n  </field>\n </rpthead>\n <pghead>\n  <firstpage/>\n  <height>6</height>\n </pghead>\n <pghead>\n  <height>21</height>\n  <label>\n   <rect>\n    <x>490</x>\n    <y>0</y>\n    <width>80</width>\n    <height>15</height>\n   </rect>\n   <font>\n    <face>Arial</face>\n    <size>8</size>\n    <weight>normal</weight>\n   </font>\n   <hcenter/>\n   <vcenter/>\n   <string>Sold</string>\n  </label>\n  <label>\n   <rect>\n    <x>10</x>\n    <y>0</y>\n    <width>250</width>\n    <height>15</height>\n   </rect>\n   <font>\n    <face>Arial</face>\n    <size>8</size>\n    <weight>normal</weight>\n   </font>\n   <hcenter/>\n   <vcenter/>\n   <string>Period</string>\n  </label>\n  <label>\n   <rect>\n    <x>405</x>\n    <y>0</y>\n    <width>80</width>\n    <height>15</height>\n   </rect>\n   <font>\n    <face>Arial</face>\n    <size>8</size>\n    <weight>normal</weight>\n   </font>\n   <hcenter/>\n   <vcenter/>\n   <string>Issued</string>\n  </label>\n  <label>\n   <rect>\n    <x>270</x>\n    <y>0</y>\n    <width>35</width>\n    <height>15</height>\n   </rect>\n   <font>\n    <face>Arial</face>\n    <size>8</size>\n    <weight>normal</weight>\n   </font>\n   <hcenter/>\n   <vcenter/>\n   <string>Whs.</string>\n  </label>\n  <label>\n   <rect>\n    <x>575</x>\n    <y>0</y>\n    <width>80</width>\n    <height>15</height>\n   </rect>\n   <font>\n    <face>Arial</face>\n    <size>8</size>\n    <weight>normal</weight>\n   </font>\n   <hcenter/>\n   <vcenter/>\n   <string>Scrap</string>\n  </label>\n  <line>\n   <xstart>5</xstart>\n   <ystart>15</ystart>\n   <xend>740</xend>\n   <yend>15</yend>\n   <weight>2</weight>\n  </line>\n  <label>\n   <rect>\n    <x>320</x>\n    <y>0</y>\n    <width>80</width>\n    <height>15</height>\n   </rect>\n   <font>\n    <face>Arial</face>\n    <size>8</size>\n    <weight>normal</weight>\n   </font>\n   <hcenter/>\n   <vcenter/>\n   <string>Received</string>\n  </label>\n  <label>\n   <rect>\n    <x>660</x>\n    <y>0</y>\n    <width>80</width>\n    <height>15</height>\n   </rect>\n   <font>\n    <face>Arial</face>\n    <size>8</size>\n    <weight>normal</weight>\n   </font>\n   <hcenter/>\n   <vcenter/>\n   <string>Adjusted</string>\n  </label>\n </pghead>\n <section>\n  <name>detail</name>\n  <group>\n   <name>detail</name>\n   <column>pstart</column>\n   <head>\n    <height>6</height>\n    <field>\n     <rect>\n      <x>10</x>\n      <y>5</y>\n      <width>250</width>\n      <height>15</height>\n     </rect>\n     <font>\n      <face>Arial</face>\n      <size>8</size>\n      <weight>bold</weight>\n     </font>\n     <hcenter/>\n     <vcenter/>\n     <data>\n      <query>detail</query>\n      <column>period</column>\n     </data>\n    </field>\n   </head>\n  </group>\n  <detail>\n   <key>\n    <query>detail</query>\n   </key>\n   <height>16</height>\n   <field>\n    <rect>\n     <x>490</x>\n     <y>0</y>\n     <width>80</width>\n     <height>15</height>\n    </rect>\n    <font>\n     <face>Arial</face>\n     <size>8</size>\n     <weight>bold</weight>\n    </font>\n    <right/>\n    <vcenter/>\n    <data>\n     <query>detail</query>\n     <column>sold</column>\n    </data>\n   </field>\n   <field>\n    <rect>\n     <x>575</x>\n     <y>0</y>\n     <width>80</width>\n     <height>15</height>\n    </rect>\n    <font>\n     <face>Arial</face>\n     <size>8</size>\n     <weight>bold</weight>\n    </font>\n    <right/>\n    <vcenter/>\n    <data>\n     <query>detail</query>\n     <column>scrap</column>\n    </data>\n   </field>\n   <field>\n    <rect>\n     <x>405</x>\n     <y>0</y>\n     <width>80</width>\n     <height>15</height>\n    </rect>\n    <font>\n     <face>Arial</face>\n     <size>8</size>\n     <weight>bold</weight>\n    </font>\n    <right/>\n    <vcenter/>\n    <data>\n     <query>detail</query>\n     <column>issued</column>\n    </data>\n   </field>\n   <field>\n    <rect>\n     <x>270</x>\n     <y>0</y>\n     <width>35</width>\n     <height>15</height>\n    </rect>\n    <font>\n     <face>Arial</face>\n     <size>8</size>\n     <weight>bold</weight>\n    </font>\n    <hcenter/>\n    <vcenter/>\n    <data>\n     <query>detail</query>\n     <column>warehous_code</column>\n    </data>\n   </field>\n   <field>\n    <rect>\n     <x>660</x>\n     <y>0</y>\n     <width>80</width>\n     <height>15</height>\n    </rect>\n    <font>\n     <face>Arial</face>\n     <size>8</size>\n     <weight>bold</weight>\n    </font>\n    <right/>\n    <vcenter/>\n    <data>\n     <query>detail</query>\n     <column>adjustments</column>\n    </data>\n   </field>\n   <field>\n    <rect>\n     <x>320</x>\n     <y>0</y>\n     <width>80</width>\n     <height>15</height>\n    </rect>\n    <font>\n     <face>Arial</face>\n     <size>8</size>\n     <weight>bold</weight>\n    </font>\n    <right/>\n    <vcenter/>\n    <data>\n     <query>detail</query>\n     <column>received</column>\n    </data>\n   </field>\n  </detail>\n </section>\n <pgfoot>\n  <height>16</height>\n  <label>\n   <rect>\n    <x>600</x>\n    <y>0</y>\n    <width>85</width>\n    <height>15</height>\n   </rect>\n   <font>\n    <face>Arial</face>\n    <size>8</size>\n    <weight>normal</weight>\n   </font>\n   <right/>\n   <vcenter/>\n   <string>Page:</string>\n  </label>\n  <field>\n   <rect>\n    <x>95</x>\n    <y>0</y>\n    <width>100</width>\n    <height>15</height>\n   </rect>\n   <font>\n    <face>Arial</face>\n    <size>8</size>\n    <weight>bold</weight>\n   </font>\n   <left/>\n   <vcenter/>\n   <data>\n    <query>Context Query</query>\n    <column>report_date</column>\n   </data>\n  </field>\n  <field>\n   <rect>\n    <x>690</x>\n    <y>0</y>\n    <width>51</width>\n    <height>15</height>\n   </rect>\n   <font>\n    <face>Arial</face>\n    <size>8</size>\n    <weight>bold</weight>\n   </font>\n   <left/>\n   <vcenter/>\n   <data>\n    <query>Context Query</query>\n    <column>page_number</column>\n   </data>\n  </field>\n  <label>\n   <rect>\n    <x>5</x>\n    <y>0</y>\n    <width>85</width>\n    <height>15</height>\n   </rect>\n   <font>\n    <face>Arial</face>\n    <size>8</size>\n    <weight>normal</weight>\n   </font>\n   <right/>\n   <vcenter/>\n   <string>Report Date:</string>\n  </label>\n </pgfoot>\n</report>\n		0	2004-02-10 10:24:16.076157
481	ContractActivity	\N	<!DOCTYPE openRPTDef>\n<report>\n <title>Contract Activity Summary Report</title>\n <name>ContractActivity</name>\n <description></description>\n <parameter default="11" active="true" listtype="static" type="integer" name="contrct_id">\n  <description></description>\n </parameter>\n <grid>\n  <snap/>\n  <show/>\n  <x>0.05</x>\n  <y>0.05</y>\n </grid>\n <size>Letter</size>\n <landscape/>\n <topmargin>50</topmargin>\n <bottommargin>50</bottommargin>\n <rightmargin>25</rightmargin>\n <leftmargin>25</leftmargin>\n <querysource>\n  <name>head</name>\n  <sql>select contrct_id,\n  contrct_number,\n  contrct_vend_id,\n  contrct_descrip,\n  contrct_effective,\n  contrct_expires,\n  contrct_note,\n  vend_number,\n  vend_name\n  from contrct JOIN vendinfo ON (vend_id = contrct_vend_id)\n  where contrct_id = &lt;? value("contrct_id") ?>;\n   </sql>\n </querysource>\n <querysource>\n  <name>detail</name>\n  <sql>-- Group: contrct\n-- Name:  itemsources\n-- Notes: Selection of Contract Related Item Sources\nSELECT itemsrc_id,\n\t-1 AS pohead_id, \n\t' ' AS seq,\n\t' ' AS poitem_ordnumber, \n        item_number,\n\titem_descrip1,\n\titemsrc_vend_uom,\n\titemsrc_vend_item_number,\n\titemsrc_contrct_min,\n\tsum(poitem_qty_unreleased) AS poitem_qty_unreleased,\n\tsum(poitem_qty_ordered)    AS poitem_qty_ordered,\n\tsum(poitem_qty_received)   AS poitem_qty_received,\n\tsum(poitem_qty_returned)   AS poitem_qty_returned,\n\tnull AS poitem_duedate,\n\tnull AS poitem_status,\n\t0 AS xtindentrole \n\tFROM (SELECT contrct_id, \n\t\titemsrc_id,\n\t\tpohead_number || '-' || ltrim(to_char(poitem_linenumber, '999')) AS poitem_ordnumber, \n\t\titem_number,\n\t\titem_descrip1,\n\t\titemsrc_vend_uom,\n\t\titemsrc_vend_item_number,\n\t\titemsrc_contrct_min,\n\t\tCASE WHEN poitem_status = 'U' THEN poitem_qty_ordered\n\t\t  ELSE 0\n\t\tEND AS poitem_qty_unreleased,\n\t\tCASE WHEN poitem_status = 'O' THEN poitem_qty_ordered\n\t\t     WHEN poitem_status = 'C' THEN poitem_qty_ordered\n                  ELSE 0\n\t\tEND AS poitem_qty_ordered,\n\t\tpoitem_qty_received,\n\t\tpoitem_qty_returned,\n\t\tpoitem_duedate, \n\t\tpoitem_status\n\t\tFROM contrct JOIN itemsrc    ON (itemsrc_contrct_id  = contrct_id)\n\t\t  LEFT OUTER JOIN poitem     ON (poitem_itemsrc_id   = itemsrc_id)\n\t\t  LEFT OUTER JOIN pohead     ON (pohead_id           = poitem_pohead_id)\n\t\t\t   JOIN item       ON (itemsrc_item_id     = item_id)\n\t\tWHERE (contrct_id = &lt;? value("contrct_id") ?>)) AS dummy1\n\tWHERE (contrct_id = &lt;? value("contrct_id") ?>)\n\tGROUP BY itemsrc_id, itemsrc_vend_item_number, itemsrc_vend_uom, itemsrc_contrct_min,\n                item_number, item_descrip1\n\nUNION  -- PO Line Items\n\nSELECT itemsrc_id,\n\tpohead_id, \n\tpohead_number || '-' || ltrim(to_char(poitem_linenumber, '999')) AS seq,\n        pohead_number || '-' || ltrim(to_char(poitem_linenumber, '999')) AS poitem_ordnumber,  \n        null AS item_number,\n\tnull AS item_descrip1,\n\tnull AS itemsrc_vend_uom,\n\tnull AS itemsrc_vend_item_number,\n\tnull AS itemsrc_contrct_min,\n\tCASE WHEN poitem_status = 'U' THEN poitem_qty_ordered\n\t  ELSE 0\n\tEND AS poitem_qty_unreleased,\n\tCASE WHEN poitem_status = 'O' THEN poitem_qty_ordered\n\t     WHEN poitem_status = 'C' THEN poitem_qty_ordered\n          ELSE 0\n\tEND AS poitem_qty_ordered,\n\tpoitem_qty_received,\n\tpoitem_qty_returned,\n\tto_char(poitem_duedate, 'YYYY-MM-DD HH24:MI:SS'), \n\tCASE WHEN poitem_status = 'O' THEN 'Open'\n\t     WHEN poitem_status = 'C' THEN 'Closed'\n\t     ELSE 'Unreleased'\n\tEND AS poitem_status,\n\t1 AS xtindentrole \n\tFROM contrct JOIN itemsrc  ON (itemsrc_contrct_id  = contrct_id)\n\t\t   JOIN poitem   ON (poitem_itemsrc_id   = itemsrc_id)\n\t\t   JOIN pohead   ON (pohead_id           = poitem_pohead_id)\n\t\t   JOIN item     ON (itemsrc_item_id     = item_id)\n\tWHERE (contrct_id = &lt;? value("contrct_id") ?>)\n\nUNION -- Receipts\n\nSELECT itemsrc_id,\n\tpohead_id,  \n\tpoitem_ordnumber || 'R' || to_char(recv_date, 'YYYYMMDDHH24:MI:SS') AS seq,\n\t'Receipt' AS poitem_ordnumber,\n\tnull AS item_number,\n\tnull AS item_descrip1,\n\trecv_vend_uom AS vend_uom,\n\tnull AS itemsrc_vend_item_number,\n\tnull AS itemsrc_contrct_min,\n\tnull AS poitem_qty_unreleased,\n\tnull AS poitem_qty_ordered,\n\trecv_qty AS poitem_qty_received,\n\tnull AS poitem_qty_returned,\n\tto_char(recv_date, 'YYYY-MM-DD HH24:MI:SS') AS poitem_duedate,\n\trecv_trans_usr_name AS username,\n\t2 AS xtindentrole\n  FROM recv JOIN (SELECT pohead_number || '-' || ltrim(to_char(poitem_linenumber, '999')) AS poitem_ordnumber, \n\t\t\t    poitem_pohead_id, poitem_linenumber, poitem_id, pohead_id, \n\t\t\t    poitem_itemsrc_id\n\t\t\tFROM poitem JOIN pohead ON (pohead_id = poitem_pohead_id)) AS dummy ON (poitem_id   = recv_orderitem_id)\n               JOIN itemsite ON (itemsite_id = recv_itemsite_id)\n               JOIN item     ON (item_id     = itemsite_item_id)\n               JOIN itemsrc  ON (poitem_itemsrc_id = itemsrc_id)\n  WHERE (itemsrc_contrct_id = &lt;? value("contrct_id") ?>) \n\nUNION -- Returns\n\nSELECT itemsrc_id, \n\tpohead_id,  \n\tpoitem_ordnumber || 'R' || to_char(poreject_date, 'YYYYMMDDHH24:MI:SS') AS seq,\n\t'Return' AS poitem_ordnumber,\n\tnull AS item_number,\n\tnull AS item_descrip1,\n\tporeject_vend_uom AS vend_uom,\n\tnull AS itemsrc_vend_item_number,\n\tnull AS itemsrc_contrct_min,\n\tnull AS poitem_qty_unreleased,\n\tnull AS poitem_qty_ordered,\n\tnull AS poitem_qty_received,\n\tporeject_qty AS poitem_qty_returned,\n\tto_char(poreject_date, 'YYYY-MM-DD HH24:MI:SS') AS poitem_duedate,\n\tporeject_trans_username AS username,\n\t2 AS xtindentrole \n  FROM poreject JOIN (SELECT pohead_number || '-' || ltrim(to_char(poitem_linenumber, '999')) AS poitem_ordnumber, \n\t\t\t    poitem_pohead_id, poitem_linenumber, poitem_id, pohead_id, \n\t\t\t    poitem_itemsrc_id\n\t\t\tFROM poitem JOIN pohead ON (pohead_id = poitem_pohead_id)) AS dummy ON (poitem_id   = poreject_poitem_id)\n               JOIN itemsite ON (itemsite_id = poreject_itemsite_id)\n               JOIN item     ON (item_id     = itemsite_item_id)\n               JOIN itemsrc  ON (poitem_itemsrc_id = itemsrc_id)\n  WHERE (itemsrc_contrct_id = &lt;? value("contrct_id") ?>) \n\nORDER BY itemsrc_id, seq, poitem_ordnumber, poitem_duedate, xtindentrole;\n</sql>\n </querysource>\n <rpthead>\n  <height>183</height>\n  <field>\n   <rect>\n    <x>135</x>\n    <y>55</y>\n    <width>598</width>\n    <height>20</height>\n   </rect>\n   <font>\n    <face>Arial</face>\n    <size>10</size>\n    <weight>normal</weight>\n   </font>\n   <left/>\n   <vcenter/>\n   <data>\n    <query>head</query>\n    <column>contrct_descrip</column>\n   </data>\n  </field>\n  <field>\n   <rect>\n    <x>85</x>\n    <y>120</y>\n    <width>275</width>\n    <height>20</height>\n   </rect>\n   <font>\n    <face>Arial</face>\n    <size>10</size>\n    <weight>normal</weight>\n   </font>\n   <left/>\n   <vcenter/>\n   <data>\n    <query>head</query>\n    <column>vend_name</column>\n   </data>\n  </field>\n  <field>\n   <rect>\n    <x>205</x>\n    <y>10</y>\n    <width>171</width>\n    <height>35</height>\n   </rect>\n   <font>\n    <face>Arial</face>\n    <size>18</size>\n    <weight>bold</weight>\n   </font>\n   <left/>\n   <vcenter/>\n   <data>\n    <query>head</query>\n    <column>contrct_number</column>\n   </data>\n  </field>\n  <label>\n   <rect>\n    <x>25</x>\n    <y>55</y>\n    <width>104</width>\n    <height>20</height>\n   </rect>\n   <font>\n    <face>Arial</face>\n    <size>10</size>\n    <weight>bold</weight>\n   </font>\n   <right/>\n   <vcenter/>\n   <string>Description:</string>\n  </label>\n  <label>\n   <rect>\n    <x>5</x>\n    <y>120</y>\n    <width>73</width>\n    <height>20</height>\n   </rect>\n   <font>\n    <face>Arial</face>\n    <size>10</size>\n    <weight>bold</weight>\n   </font>\n   <right/>\n   <vcenter/>\n   <string>Name:</string>\n  </label>\n  <label>\n   <rect>\n    <x>45</x>\n    <y>10</y>\n    <width>152</width>\n    <height>37</height>\n   </rect>\n   <font>\n    <face>Arial</face>\n    <size>18</size>\n    <weight>bold</weight>\n   </font>\n   <hcenter/>\n   <vcenter/>\n   <string>CONTRACT</string>\n  </label>\n  <label>\n   <rect>\n    <x>0</x>\n    <y>140</y>\n    <width>79.8</width>\n    <height>20</height>\n   </rect>\n   <font>\n    <face>Arial</face>\n    <size>10</size>\n    <weight>bold</weight>\n   </font>\n   <right/>\n   <vcenter/>\n   <string>Effective:</string>\n  </label>\n  <field>\n   <rect>\n    <x>85</x>\n    <y>140</y>\n    <width>150</width>\n    <height>20</height>\n   </rect>\n   <font>\n    <face>Arial</face>\n    <size>10</size>\n    <weight>normal</weight>\n   </font>\n   <left/>\n   <vcenter/>\n   <data>\n    <query>head</query>\n    <column>contrct_effective</column>\n   </data>\n  </field>\n  <label>\n   <rect>\n    <x>0</x>\n    <y>160</y>\n    <width>79.8</width>\n    <height>20</height>\n   </rect>\n   <font>\n    <face>Arial</face>\n    <size>10</size>\n    <weight>bold</weight>\n   </font>\n   <right/>\n   <vcenter/>\n   <string>Expires:</string>\n  </label>\n  <field>\n   <rect>\n    <x>85</x>\n    <y>160</y>\n    <width>150</width>\n    <height>20</height>\n   </rect>\n   <font>\n    <face>Arial</face>\n    <size>10</size>\n    <weight>normal</weight>\n   </font>\n   <left/>\n   <vcenter/>\n   <data>\n    <query>head</query>\n    <column>contrct_expires</column>\n   </data>\n  </field>\n  <field>\n   <rect>\n    <x>85</x>\n    <y>100</y>\n    <width>140</width>\n    <height>20</height>\n   </rect>\n   <font>\n    <face>Arial</face>\n    <size>10</size>\n    <weight>normal</weight>\n   </font>\n   <left/>\n   <vcenter/>\n   <data>\n    <query>head</query>\n    <column>vend_number</column>\n   </data>\n  </field>\n  <label>\n   <rect>\n    <x>5</x>\n    <y>100</y>\n    <width>72</width>\n    <height>20</height>\n   </rect>\n   <font>\n    <face>Arial</face>\n    <size>10</size>\n    <weight>bold</weight>\n   </font>\n   <right/>\n   <vcenter/>\n   <string>Vendor:</string>\n  </label>\n  <label>\n   <rect>\n    <x>335</x>\n    <y>100</y>\n    <width>72</width>\n    <height>20</height>\n   </rect>\n   <font>\n    <face>Arial</face>\n    <size>10</size>\n    <weight>bold</weight>\n   </font>\n   <right/>\n   <vcenter/>\n   <string>Notes:</string>\n  </label>\n  <text>\n   <rect>\n    <x>415</x>\n    <y>100</y>\n    <width>330</width>\n    <height>20</height>\n   </rect>\n   <bottompad>0</bottompad>\n   <font>\n    <face>Arial</face>\n    <size>10</size>\n    <weight>normal</weight>\n   </font>\n   <left/>\n   <vcenter/>\n   <data>\n    <query>head</query>\n    <column>contrct_note</column>\n   </data>\n  </text>\n </rpthead>\n <pghead>\n  <firstpage/>\n  <height>6</height>\n </pghead>\n <pghead>\n  <height>36</height>\n  <line>\n   <xstart>5</xstart>\n   <ystart>30</ystart>\n   <xend>1045</xend>\n   <yend>30</yend>\n   <weight>1</weight>\n  </line>\n </pghead>\n <section>\n  <name>detail</name>\n  <group>\n   <name>ItemSource</name>\n   <column>itemsrc_id</column>\n   <head>\n    <height>30</height>\n    <line>\n     <xstart>3.5</xstart>\n     <ystart>23.5</ystart>\n     <xend>1043.5</xend>\n     <yend>23.5</yend>\n     <weight>1</weight>\n    </line>\n    <label>\n     <rect>\n      <x>5</x>\n      <y>5</y>\n      <width>79.8</width>\n      <height>20</height>\n     </rect>\n     <font>\n      <face>Arial</face>\n      <size>8</size>\n      <weight>bold</weight>\n     </font>\n     <left/>\n     <vcenter/>\n     <string>Item #</string>\n    </label>\n    <label>\n     <rect>\n      <x>85</x>\n      <y>5</y>\n      <width>79.8</width>\n      <height>20</height>\n     </rect>\n     <font>\n      <face>Arial</face>\n      <size>8</size>\n      <weight>bold</weight>\n     </font>\n     <left/>\n     <vcenter/>\n     <string>Description</string>\n    </label>\n    <label>\n     <rect>\n      <x>265</x>\n      <y>5</y>\n      <width>95</width>\n      <height>20</height>\n     </rect>\n     <font>\n      <face>Arial</face>\n      <size>8</size>\n      <weight>bold</weight>\n     </font>\n     <left/>\n     <vcenter/>\n     <string>Vendor Part #</string>\n    </label>\n    <label>\n     <rect>\n      <x>360</x>\n      <y>5</y>\n      <width>95</width>\n      <height>20</height>\n     </rect>\n     <font>\n      <face>Arial</face>\n      <size>8</size>\n      <weight>bold</weight>\n     </font>\n     <left/>\n     <vcenter/>\n     <string>Description</string>\n    </label>\n    <label>\n     <rect>\n      <x>460</x>\n      <y>5</y>\n      <width>65</width>\n      <height>20</height>\n     </rect>\n     <font>\n      <face>Arial</face>\n      <size>8</size>\n      <weight>bold</weight>\n     </font>\n     <left/>\n     <vcenter/>\n     <string>Order/Oper</string>\n    </label>\n    <label>\n     <rect>\n      <x>555</x>\n      <y>5</y>\n      <width>55</width>\n      <height>20</height>\n     </rect>\n     <font>\n      <face>Arial</face>\n      <size>8</size>\n      <weight>bold</weight>\n     </font>\n     <left/>\n     <vcenter/>\n     <string>Cont Qty</string>\n    </label>\n    <label>\n     <rect>\n      <x>620</x>\n      <y>5</y>\n      <width>55</width>\n      <height>20</height>\n     </rect>\n     <font>\n      <face>Arial</face>\n      <size>8</size>\n      <weight>bold</weight>\n     </font>\n     <left/>\n     <vcenter/>\n     <string>Unrel Qty</string>\n    </label>\n    <label>\n     <rect>\n      <x>690</x>\n      <y>5</y>\n      <width>55</width>\n      <height>20</height>\n     </rect>\n     <font>\n      <face>Arial</face>\n      <size>8</size>\n      <weight>bold</weight>\n     </font>\n     <left/>\n     <vcenter/>\n     <string>Order Qty</string>\n    </label>\n    <label>\n     <rect>\n      <x>760</x>\n      <y>5</y>\n      <width>55</width>\n      <height>20</height>\n     </rect>\n     <font>\n      <face>Arial</face>\n      <size>8</size>\n      <weight>bold</weight>\n     </font>\n     <left/>\n     <vcenter/>\n     <string>Rcpt Qty</string>\n    </label>\n    <label>\n     <rect>\n      <x>830</x>\n      <y>5</y>\n      <width>55</width>\n      <height>20</height>\n     </rect>\n     <font>\n      <face>Arial</face>\n      <size>8</size>\n      <weight>bold</weight>\n     </font>\n     <left/>\n     <vcenter/>\n     <string>Rtrn Qty</string>\n    </label>\n    <label>\n     <rect>\n      <x>920</x>\n      <y>5</y>\n      <width>55</width>\n      <height>20</height>\n     </rect>\n     <font>\n      <face>Arial</face>\n      <size>8</size>\n      <weight>bold</weight>\n     </font>\n     <left/>\n     <vcenter/>\n     <string>Date</string>\n    </label>\n    <label>\n     <rect>\n      <x>995</x>\n      <y>5</y>\n      <width>55</width>\n      <height>20</height>\n     </rect>\n     <font>\n      <face>Arial</face>\n      <size>8</size>\n      <weight>bold</weight>\n     </font>\n     <left/>\n     <vcenter/>\n     <string>Stat/User</string>\n    </label>\n   </head>\n   <foot>\n    <height>10</height>\n   </foot>\n  </group>\n  <group>\n   <name>PurchaseOrder</name>\n   <column>pohead_id</column>\n   <foot>\n    <height>10</height>\n    <line>\n     <xstart>458.5</xstart>\n     <ystart>3.5</ystart>\n     <xend>1043.5</xend>\n     <yend>3.5</yend>\n     <weight>1</weight>\n    </line>\n   </foot>\n  </group>\n  <detail>\n   <key>\n    <query>detail</query>\n   </key>\n   <height>25</height>\n   <field>\n    <rect>\n     <x>885</x>\n     <y>5</y>\n     <width>110</width>\n     <height>20</height>\n    </rect>\n    <font>\n     <face>Helvetica</face>\n     <size>8</size>\n     <weight>normal</weight>\n    </font>\n    <right/>\n    <vcenter/>\n    <data>\n     <query>detail</query>\n     <column>poitem_duedate</column>\n    </data>\n   </field>\n   <field>\n    <rect>\n     <x>5</x>\n     <y>5</y>\n     <width>65</width>\n     <height>20</height>\n    </rect>\n    <font>\n     <face>Helvetica</face>\n     <size>8</size>\n     <weight>normal</weight>\n    </font>\n    <left/>\n    <vcenter/>\n    <data>\n     <query>detail</query>\n     <column>item_number</column>\n    </data>\n   </field>\n   <field>\n    <rect>\n     <x>810</x>\n     <y>5</y>\n     <width>65</width>\n     <height>20</height>\n    </rect>\n    <font>\n     <face>Helvetica</face>\n     <size>8</size>\n     <weight>normal</weight>\n    </font>\n    <right/>\n    <vcenter/>\n    <data>\n     <query>detail</query>\n     <column>poitem_qty_returned</column>\n    </data>\n    <format builtin="true">qty</format>\n   </field>\n   <field>\n    <rect>\n     <x>345</x>\n     <y>5</y>\n     <width>155</width>\n     <height>20</height>\n    </rect>\n    <font>\n     <face>Helvetica</face>\n     <size>8</size>\n     <weight>normal</weight>\n    </font>\n    <left/>\n    <vcenter/>\n    <data>\n     <query>detail</query>\n     <column>item_descrip1</column>\n    </data>\n   </field>\n   <field>\n    <rect>\n     <x>740</x>\n     <y>5</y>\n     <width>65</width>\n     <height>20</height>\n    </rect>\n    <font>\n     <face>Helvetica</face>\n     <size>8</size>\n     <weight>normal</weight>\n    </font>\n    <right/>\n    <vcenter/>\n    <data>\n     <query>detail</query>\n     <column>poitem_qty_received</column>\n    </data>\n    <format builtin="true">qty</format>\n   </field>\n   <field>\n    <rect>\n     <x>530</x>\n     <y>5</y>\n     <width>65</width>\n     <height>20</height>\n    </rect>\n    <font>\n     <face>Helvetica</face>\n     <size>8</size>\n     <weight>normal</weight>\n    </font>\n    <right/>\n    <vcenter/>\n    <data>\n     <query>detail</query>\n     <column>itemsrc_contrct_min</column>\n    </data>\n    <format builtin="true">qty</format>\n   </field>\n   <field>\n    <rect>\n     <x>670</x>\n     <y>5</y>\n     <width>65</width>\n     <height>20</height>\n    </rect>\n    <font>\n     <face>Helvetica</face>\n     <size>8</size>\n     <weight>normal</weight>\n    </font>\n    <right/>\n    <vcenter/>\n    <data>\n     <query>detail</query>\n     <column>poitem_qty_ordered</column>\n    </data>\n    <format builtin="true">qty</format>\n   </field>\n   <field>\n    <rect>\n     <x>80</x>\n     <y>5</y>\n     <width>185</width>\n     <height>20</height>\n    </rect>\n    <font>\n     <face>Helvetica</face>\n     <size>8</size>\n     <weight>normal</weight>\n    </font>\n    <left/>\n    <vcenter/>\n    <data>\n     <query>detail</query>\n     <column>item_descrip1</column>\n    </data>\n   </field>\n   <field>\n    <rect>\n     <x>1000</x>\n     <y>5</y>\n     <width>45</width>\n     <height>20</height>\n    </rect>\n    <font>\n     <face>Helvetica</face>\n     <size>8</size>\n     <weight>normal</weight>\n    </font>\n    <right/>\n    <vcenter/>\n    <data>\n     <query>detail</query>\n     <column>poitem_status</column>\n    </data>\n   </field>\n   <field>\n    <rect>\n     <x>460</x>\n     <y>5</y>\n     <width>65</width>\n     <height>20</height>\n    </rect>\n    <font>\n     <face>Helvetica</face>\n     <size>8</size>\n     <weight>normal</weight>\n    </font>\n    <left/>\n    <vcenter/>\n    <data>\n     <query>detail</query>\n     <column>poitem_ordnumber</column>\n    </data>\n   </field>\n   <field>\n    <rect>\n     <x>275</x>\n     <y>5</y>\n     <width>65</width>\n     <height>20</height>\n    </rect>\n    <font>\n     <face>Helvetica</face>\n     <size>8</size>\n     <weight>normal</weight>\n    </font>\n    <left/>\n    <vcenter/>\n    <data>\n     <query>detail</query>\n     <column>itemsrc_vend_item_number</column>\n    </data>\n   </field>\n   <field>\n    <rect>\n     <x>600</x>\n     <y>5</y>\n     <width>65</width>\n     <height>20</height>\n    </rect>\n    <font>\n     <face>Helvetica</face>\n     <size>8</size>\n     <weight>normal</weight>\n    </font>\n    <right/>\n    <vcenter/>\n    <data>\n     <query>detail</query>\n     <column>poitem_qty_unreleased</column>\n    </data>\n    <format builtin="true">qty</format>\n   </field>\n  </detail>\n </section>\n <pgfoot>\n  <height>27.4814</height>\n  <label>\n   <rect>\n    <x>910</x>\n    <y>7.4814</y>\n    <width>85</width>\n    <height>15</height>\n   </rect>\n   <font>\n    <face>Arial</face>\n    <size>8</size>\n    <weight>normal</weight>\n   </font>\n   <right/>\n   <vcenter/>\n   <string>Page:</string>\n  </label>\n  <field>\n   <rect>\n    <x>1000</x>\n    <y>7.4814</y>\n    <width>40</width>\n    <height>15</height>\n   </rect>\n   <font>\n    <face>Arial</face>\n    <size>8</size>\n    <weight>bold</weight>\n   </font>\n   <left/>\n   <vcenter/>\n   <data>\n    <query>Context Query</query>\n    <column>page_number</column>\n   </data>\n  </field>\n  <label>\n   <rect>\n    <x>5</x>\n    <y>7.4814</y>\n    <width>85</width>\n    <height>15</height>\n   </rect>\n   <font>\n    <face>Arial</face>\n    <size>8</size>\n    <weight>normal</weight>\n   </font>\n   <right/>\n   <vcenter/>\n   <string>Report Date:</string>\n  </label>\n  <field>\n   <rect>\n    <x>95</x>\n    <y>7.4814</y>\n    <width>100</width>\n    <height>15</height>\n   </rect>\n   <font>\n    <face>Arial</face>\n    <size>8</size>\n    <weight>bold</weight>\n   </font>\n   <left/>\n   <vcenter/>\n   <data>\n    <query>Context Query</query>\n    <column>report_date</column>\n   </data>\n  </field>\n </pgfoot>\n <rptfoot>\n  <height>27.5186</height>\n </rptfoot>\n</report>\n	\N	0	2014-03-20 16:30:39.072368
202	PurchaseRequestsByPlannerCode	\N	<!DOCTYPE openRPTDef>\n<report>\n <title>Purchase Requests By Planner Code</title>\n <name>PurchaseRequestsByPlannerCode</name>\n <description/>\n <size>Letter</size>\n <portrait/>\n <topmargin>50</topmargin>\n <bottommargin>50</bottommargin>\n <rightmargin>50</rightmargin>\n <leftmargin>50</leftmargin>\n <querysource>\n  <name>head</name>\n  <sql>SELECT CASE WHEN('%1'='-1') THEN 'All Planner Codes'\n            WHEN((SELECT count(*)\n                    FROM plancode\n                   WHERE plancode_code = '%1') = 1) THEN\n                        (SELECT ()\n                           FROM plancode\n                          WHERE plancode_code = '%1')\n            ELSE '%1'::text\n       END AS plancode,\n       CASE WHEN(%2=-1) THEN 'All Warehouses'\n            ELSE (SELECT warehous_code\n                    FROM warehous\n                   WHERE warehous_id=%2)\n       END AS warehouse;</sql>\n </querysource>\n <querysource>\n  <name>detail</name>\n  <sql>SELECT item_number,\n       (item_descrip1 || ' ' || item_descrip2) as item_descrip,\n       pr_status,\n       CASE WHEN (pr_order_type='W') THEN ('W/O ' || ( SELECT formatWoNumber(womatl_wo_id)\n                                                         FROM womatl\n                                                        WHERE (womatl_id=pr_order_id) ) )\n            WHEN (pr_order_type='S') THEN ('S/O ' || (SELECT formatSoNumber(pr_order_id)))\n            WHEN (pr_order_type='F') THEN ('Planned Order')\n            WHEN (pr_order_type='M') THEN 'Manual'\n            ELSE 'Other'\n       END AS f_type,\n       formatDate(pr_duedate) AS f_duedate,\n       formatQty(pr_qtyreq) AS f_qtyreq\n  FROM pr, itemsite, item\n WHERE ( (pr_itemsite_id=itemsite_id)\n   AND (itemsite_item_id=item_id)\n   AND (itemsite_warehous_id=%2)\n   AND (itemsite_plancode_id IN (SELECT plancode_id FROM plancode WHERE (plancode_code ~ '%1') ) )\n)\nORDER BY pr_duedate;</sql>\n </querysource>\n <rpthead>\n  <height>171</height>\n  <label>\n   <rect>\n    <x>450</x>\n    <y>65</y>\n    <width>100</width>\n    <height>20</height>\n   </rect>\n   <font>\n    <face>Arial</face>\n    <size>10</size>\n    <weight>normal</weight>\n   </font>\n   <right/>\n   <vcenter/>\n   <string>Start Date:</string>\n  </label>\n  <label>\n   <rect>\n    <x>270</x>\n    <y>5</y>\n    <width>475</width>\n    <height>40</height>\n   </rect>\n   <font>\n    <face>Arial</face>\n    <size>18</size>\n    <weight>bold</weight>\n   </font>\n   <right/>\n   <vcenter/>\n   <string>Purchase Requests By Planner Code</string>\n  </label>\n  <label>\n   <rect>\n    <x>10</x>\n    <y>65</y>\n    <width>120</width>\n    <height>20</height>\n   </rect>\n   <font>\n    <face>Arial</face>\n    <size>10</size>\n    <weight>normal</weight>\n   </font>\n   <right/>\n   <vcenter/>\n   <string>Planner Code:</string>\n  </label>\n  <label>\n   <rect>\n    <x>450</x>\n    <y>85</y>\n    <width>100</width>\n    <height>20</height>\n   </rect>\n   <font>\n    <face>Arial</face>\n    <size>10</size>\n    <weight>normal</weight>\n   </font>\n   <right/>\n   <vcenter/>\n   <string>End Date:</string>\n  </label>\n  <label>\n   <rect>\n    <x>340</x>\n    <y>150</y>\n    <width>80</width>\n    <height>15</height>\n   </rect>\n   <font>\n    <face>Arial</face>\n    <size>8</size>\n    <weight>normal</weight>\n   </font>\n   <hcenter/>\n   <vcenter/>\n   <string>Status</string>\n  </label>\n  <field>\n   <rect>\n    <x>135</x>\n    <y>65</y>\n    <width>300</width>\n    <height>20</height>\n   </rect>\n   <font>\n    <face>Arial</face>\n    <size>10</size>\n    <weight>bold</weight>\n   </font>\n   <left/>\n   <vcenter/>\n   <data>\n    <query>head</query>\n    <column>plancode</column>\n   </data>\n  </field>\n  <field>\n   <rect>\n    <x>555</x>\n    <y>65</y>\n    <width>100</width>\n    <height>20</height>\n   </rect>\n   <font>\n    <face>Arial</face>\n    <size>10</size>\n    <weight>bold</weight>\n   </font>\n   <left/>\n   <vcenter/>\n   <data>\n    <query>Parameter Query</query>\n    <column>3</column>\n   </data>\n  </field>\n  <field>\n   <rect>\n    <x>135</x>\n    <y>85</y>\n    <width>300</width>\n    <height>20</height>\n   </rect>\n   <font>\n    <face>Arial</face>\n    <size>10</size>\n    <weight>bold</weight>\n   </font>\n   <left/>\n   <vcenter/>\n   <data>\n    <query>head</query>\n    <column>warehouse</column>\n   </data>\n  </field>\n  <line>\n   <xstart>5</xstart>\n   <ystart>165</ystart>\n   <xend>745</xend>\n   <yend>165</yend>\n   <weight>2</weight>\n  </line>\n  <label>\n   <rect>\n    <x>10</x>\n    <y>150</y>\n    <width>100</width>\n    <height>15</height>\n   </rect>\n   <font>\n    <face>Arial</face>\n    <size>8</size>\n    <weight>normal</weight>\n   </font>\n   <left/>\n   <vcenter/>\n   <string>Item Number</string>\n  </label>\n  <label>\n   <rect>\n    <x>665</x>\n    <y>150</y>\n    <width>80</width>\n    <height>15</height>\n   </rect>\n   <font>\n    <face>Arial</face>\n    <size>8</size>\n    <weight>normal</weight>\n   </font>\n   <hcenter/>\n   <vcenter/>\n   <string>Qty.</string>\n  </label>\n  <label>\n   <rect>\n    <x>30</x>\n    <y>85</y>\n    <width>100</width>\n    <height>20</height>\n   </rect>\n   <font>\n    <face>Arial</face>\n    <size>10</size>\n    <weight>normal</weight>\n   </font>\n   <right/>\n   <vcenter/>\n   <string>Warehouse:</string>\n  </label>\n  <label>\n   <rect>\n    <x>425</x>\n    <y>150</y>\n    <width>100</width>\n    <height>15</height>\n   </rect>\n   <font>\n    <face>Arial</face>\n    <size>8</size>\n    <weight>normal</weight>\n   </font>\n   <left/>\n   <vcenter/>\n   <string>Parent Order</string>\n  </label>\n  <field>\n   <rect>\n    <x>555</x>\n    <y>85</y>\n    <width>100</width>\n    <height>20</height>\n   </rect>\n   <font>\n    <face>Arial</face>\n    <size>10</size>\n    <weight>bold</weight>\n   </font>\n   <left/>\n   <vcenter/>\n   <data>\n    <query>Parameter Query</query>\n    <column>4</column>\n   </data>\n  </field>\n  <label>\n   <rect>\n    <x>580</x>\n    <y>150</y>\n    <width>80</width>\n    <height>15</height>\n   </rect>\n   <font>\n    <face>Arial</face>\n    <size>8</size>\n    <weight>normal</weight>\n   </font>\n   <hcenter/>\n   <vcenter/>\n   <string>Due Date</string>\n  </label>\n  <label>\n   <rect>\n    <x>135</x>\n    <y>150</y>\n    <width>100</width>\n    <height>15</height>\n   </rect>\n   <font>\n    <face>Arial</face>\n    <size>8</size>\n    <weight>normal</weight>\n   </font>\n   <left/>\n   <vcenter/>\n   <string>Description</string>\n  </label>\n </rpthead>\n <pghead>\n  <firstpage/>\n  <height>6</height>\n </pghead>\n <pghead>\n  <height>26</height>\n  <label>\n   <rect>\n    <x>340</x>\n    <y>5</y>\n    <width>80</width>\n    <height>15</height>\n   </rect>\n   <font>\n    <face>Arial</face>\n    <size>8</size>\n    <weight>normal</weight>\n   </font>\n   <hcenter/>\n   <vcenter/>\n   <string>Status</string>\n  </label>\n  <label>\n   <rect>\n    <x>665</x>\n    <y>5</y>\n    <width>80</width>\n    <height>15</height>\n   </rect>\n   <font>\n    <face>Arial</face>\n    <size>8</size>\n    <weight>normal</weight>\n   </font>\n   <hcenter/>\n   <vcenter/>\n   <string>Qty.</string>\n  </label>\n  <label>\n   <rect>\n    <x>10</x>\n    <y>5</y>\n    <width>100</width>\n    <height>15</height>\n   </rect>\n   <font>\n    <face>Arial</face>\n    <size>8</size>\n    <weight>normal</weight>\n   </font>\n   <left/>\n   <vcenter/>\n   <string>Item Number</string>\n  </label>\n  <label>\n   <rect>\n    <x>580</x>\n    <y>5</y>\n    <width>80</width>\n    <height>15</height>\n   </rect>\n   <font>\n    <face>Arial</face>\n    <size>8</size>\n    <weight>normal</weight>\n   </font>\n   <hcenter/>\n   <vcenter/>\n   <string>Due Date</string>\n  </label>\n  <label>\n   <rect>\n    <x>425</x>\n    <y>5</y>\n    <width>100</width>\n    <height>15</height>\n   </rect>\n   <font>\n    <face>Arial</face>\n    <size>8</size>\n    <weight>normal</weight>\n   </font>\n   <left/>\n   <vcenter/>\n   <string>Parent Order</string>\n  </label>\n  <line>\n   <xstart>5</xstart>\n   <ystart>20</ystart>\n   <xend>745</xend>\n   <yend>20</yend>\n   <weight>2</weight>\n  </line>\n  <label>\n   <rect>\n    <x>135</x>\n    <y>5</y>\n    <width>100</width>\n    <height>15</height>\n   </rect>\n   <font>\n    <face>Arial</face>\n    <size>8</size>\n    <weight>normal</weight>\n   </font>\n   <left/>\n   <vcenter/>\n   <string>Description</string>\n  </label>\n </pghead>\n <section>\n  <name>detail</name>\n  <detail>\n   <key>\n    <query>detail</query>\n   </key>\n   <height>16</height>\n   <field>\n    <rect>\n     <x>340</x>\n     <y>0</y>\n     <width>80</width>\n     <height>15</height>\n    </rect>\n    <font>\n     <face>Arial</face>\n     <size>8</size>\n     <weight>bold</weight>\n    </font>\n    <hcenter/>\n    <vcenter/>\n    <data>\n     <query>detail</query>\n     <column>pr_status</column>\n    </data>\n   </field>\n   <field>\n    <rect>\n     <x>135</x>\n     <y>0</y>\n     <width>200</width>\n     <height>15</height>\n    </rect>\n    <font>\n     <face>Arial</face>\n     <size>8</size>\n     <weight>bold</weight>\n    </font>\n    <left/>\n    <vcenter/>\n    <data>\n     <query>detail</query>\n     <column>item_descrip</column>\n    </data>\n   </field>\n   <field>\n    <rect>\n     <x>425</x>\n     <y>0</y>\n     <width>150</width>\n     <height>15</height>\n    </rect>\n    <font>\n     <face>Arial</face>\n     <size>8</size>\n     <weight>bold</weight>\n    </font>\n    <left/>\n    <vcenter/>\n    <data>\n     <query>detail</query>\n     <column>f_type</column>\n    </data>\n   </field>\n   <field>\n    <rect>\n     <x>665</x>\n     <y>0</y>\n     <width>80</width>\n     <height>15</height>\n    </rect>\n    <font>\n     <face>Arial</face>\n     <size>8</size>\n     <weight>bold</weight>\n    </font>\n    <right/>\n    <vcenter/>\n    <data>\n     <query>detail</query>\n     <column>f_qtyreq</column>\n    </data>\n   </field>\n   <field>\n    <rect>\n     <x>10</x>\n     <y>0</y>\n     <width>120</width>\n     <height>15</height>\n    </rect>\n    <font>\n     <face>Arial</face>\n     <size>8</size>\n     <weight>bold</weight>\n    </font>\n    <hcenter/>\n    <vcenter/>\n    <data>\n     <query>detail</query>\n     <column>item_number</column>\n    </data>\n   </field>\n   <field>\n    <rect>\n     <x>580</x>\n     <y>0</y>\n     <width>80</width>\n     <height>15</height>\n    </rect>\n    <font>\n     <face>Arial</face>\n     <size>8</size>\n     <weight>bold</weight>\n    </font>\n    <hcenter/>\n    <vcenter/>\n    <data>\n     <query>detail</query>\n     <column>f_duedate</column>\n    </data>\n   </field>\n  </detail>\n </section>\n <pgfoot>\n  <height>16</height>\n  <label>\n   <rect>\n    <x>600</x>\n    <y>0</y>\n    <width>100</width>\n    <height>15</height>\n   </rect>\n   <font>\n    <face>Arial</face>\n    <size>8</size>\n    <weight>normal</weight>\n   </font>\n   <right/>\n   <vcenter/>\n   <string>Page:</string>\n  </label>\n  <label>\n   <rect>\n    <x>0</x>\n    <y>0</y>\n    <width>100</width>\n    <height>15</height>\n   </rect>\n   <font>\n    <face>Arial</face>\n    <size>8</size>\n    <weight>normal</weight>\n   </font>\n   <right/>\n   <vcenter/>\n   <string>Report Date:</string>\n  </label>\n  <field>\n   <rect>\n    <x>705</x>\n    <y>0</y>\n    <width>40</width>\n    <height>15</height>\n   </rect>\n   <font>\n    <face>Arial</face>\n    <size>8</size>\n    <weight>bold</weight>\n   </font>\n   <left/>\n   <vcenter/>\n   <data>\n    <query>Context Query</query>\n    <column>page_number</column>\n   </data>\n  </field>\n  <field>\n   <rect>\n    <x>105</x>\n    <y>0</y>\n    <width>100</width>\n    <height>15</height>\n   </rect>\n   <font>\n    <face>Arial</face>\n    <size>8</size>\n    <weight>bold</weight>\n   </font>\n   <left/>\n   <vcenter/>\n   <data>\n    <query>Context Query</query>\n    <column>report_date</column>\n   </data>\n  </field>\n </pgfoot>\n</report>\n		0	2004-02-10 10:24:16.076157
204	APAssignments Master List	\N	<!DOCTYPE openRPTDef>\n<report>\n <title>A/P Account Assignments Master List</title>\n <name>APAssignments Master List</name>\n <description/>\n <size>Letter</size>\n <portrait/>\n <topmargin>50</topmargin>\n <bottommargin>50</bottommargin>\n <rightmargin>50</rightmargin>\n <leftmargin>50</leftmargin>\n <querysource>\n  <name>detail</name>\n  <sql>SELECT CASE WHEN apaccnt_vendtype_id=-1 THEN apaccnt_vendtype\n            ELSE (SELECT vendtype_code FROM vendtype WHERE (vendtype_id=apaccnt_vendtype_id))\n       END AS vendtypecode,\n       formatGLAccount(apaccnt_ap_accnt_id) AS f_account\nFROM apaccnt\nORDER BY vendtypecode;</sql>\n </querysource>\n <rpthead>\n  <height>77</height>\n  <line>\n   <xstart>5</xstart>\n   <ystart>70</ystart>\n   <xend>745</xend>\n   <yend>70</yend>\n   <weight>2</weight>\n  </line>\n  <label>\n   <rect>\n    <x>250</x>\n    <y>10</y>\n    <width>495</width>\n    <height>38</height>\n   </rect>\n   <font>\n    <face>Arial</face>\n    <size>18</size>\n    <weight>bold</weight>\n   </font>\n   <right/>\n   <vcenter/>\n   <string>A/P Account Assignments Master List</string>\n  </label>\n  <label>\n   <rect>\n    <x>10</x>\n    <y>55</y>\n    <width>95</width>\n    <height>15</height>\n   </rect>\n   <font>\n    <face>Arial</face>\n    <size>8</size>\n    <weight>normal</weight>\n   </font>\n   <left/>\n   <vcenter/>\n   <string>Vendor Type</string>\n  </label>\n  <label>\n   <rect>\n    <x>120</x>\n    <y>55</y>\n    <width>80</width>\n    <height>15</height>\n   </rect>\n   <font>\n    <face>Arial</face>\n    <size>8</size>\n    <weight>normal</weight>\n   </font>\n   <left/>\n   <vcenter/>\n   <string>A/P Account</string>\n  </label>\n </rpthead>\n <pghead>\n  <firstpage/>\n  <height>7</height>\n </pghead>\n <pghead>\n  <height>22</height>\n  <line>\n   <xstart>5</xstart>\n   <ystart>15</ystart>\n   <xend>745</xend>\n   <yend>15</yend>\n   <weight>2</weight>\n  </line>\n  <label>\n   <rect>\n    <x>120</x>\n    <y>0</y>\n    <width>80</width>\n    <height>15</height>\n   </rect>\n   <font>\n    <face>Arial</face>\n    <size>8</size>\n    <weight>normal</weight>\n   </font>\n   <left/>\n   <vcenter/>\n   <string>A/P Account</string>\n  </label>\n  <label>\n   <rect>\n    <x>10</x>\n    <y>0</y>\n    <width>95</width>\n    <height>15</height>\n   </rect>\n   <font>\n    <face>Arial</face>\n    <size>8</size>\n    <weight>normal</weight>\n   </font>\n   <left/>\n   <vcenter/>\n   <string>Venbor Type</string>\n  </label>\n </pghead>\n <section>\n  <name>detail</name>\n  <detail>\n   <key>\n    <query>detail</query>\n   </key>\n   <height>17</height>\n   <field>\n    <rect>\n     <x>10</x>\n     <y>0</y>\n     <width>100</width>\n     <height>15</height>\n    </rect>\n    <font>\n     <face>Arial</face>\n     <size>8</size>\n     <weight>bold</weight>\n    </font>\n    <left/>\n    <vcenter/>\n    <data>\n     <query>detail</query>\n     <column>venttypecode</column>\n    </data>\n   </field>\n   <field>\n    <rect>\n     <x>120</x>\n     <y>0</y>\n     <width>500</width>\n     <height>15</height>\n    </rect>\n    <font>\n     <face>Arial</face>\n     <size>8</size>\n     <weight>bold</weight>\n    </font>\n    <left/>\n    <vcenter/>\n    <data>\n     <query>detail</query>\n     <column>f_account</column>\n    </data>\n   </field>\n  </detail>\n </section>\n <pgfoot>\n  <height>17</height>\n  <field>\n   <rect>\n    <x>705</x>\n    <y>0</y>\n    <width>40</width>\n    <height>15</height>\n   </rect>\n   <font>\n    <face>Arial</face>\n    <size>8</size>\n    <weight>bold</weight>\n   </font>\n   <left/>\n   <vcenter/>\n   <data>\n    <query>Context Query</query>\n    <column>page_number</column>\n   </data>\n  </field>\n  <field>\n   <rect>\n    <x>95</x>\n    <y>0</y>\n    <width>100</width>\n    <height>15</height>\n   </rect>\n   <font>\n    <face>Arial</face>\n    <size>8</size>\n    <weight>bold</weight>\n   </font>\n   <left/>\n   <vcenter/>\n   <data>\n    <query>Context Query</query>\n    <column>report_date</column>\n   </data>\n  </field>\n  <label>\n   <rect>\n    <x>5</x>\n    <y>0</y>\n    <width>85</width>\n    <height>15</height>\n   </rect>\n   <font>\n    <face>Arial</face>\n    <size>8</size>\n    <weight>normal</weight>\n   </font>\n   <right/>\n   <vcenter/>\n   <string>Report Date:</string>\n  </label>\n  <label>\n   <rect>\n    <x>615</x>\n    <y>0</y>\n    <width>85</width>\n    <height>15</height>\n   </rect>\n   <font>\n    <face>Arial</face>\n    <size>8</size>\n    <weight>normal</weight>\n   </font>\n   <right/>\n   <vcenter/>\n   <string>Page:</string>\n  </label>\n </pgfoot>\n</report>\n		0	2004-02-10 10:24:16.076157
270	CheckFormat	\N	<!DOCTYPE openRPTDef>\n<report>\n <title>Sample Check Format</title>\n <name>CheckFormat</name>\n <description>OpenMFG Sample A/P Check Format</description>\n <size>Letter</size>\n <portrait/>\n <topmargin>50</topmargin>\n <bottommargin>50</bottommargin>\n <rightmargin>50</rightmargin>\n <leftmargin>50</leftmargin>\n <querysource>\n  <name>Head</name>\n  <sql>SELECT vend_name,\n       vend_address1,\n       vend_address3,\n       vend_address3,\n       vend_city,\n       vend_state,\n       vend_zip,\n       formatDate(apchk_checkdate) AS f_checkdate,\n       formatMoney(apchk_amount) AS f_amount,\n       spellAmount(apchk_amount) AS f_words,\n       CASE WHEN(apchk_void) THEN text('V O I D')\n            ELSE text('')\n       END AS f_void,\n       apchk_for\n  FROM apchk, vend\n WHERE ( (apchk_vend_id=vend_id)\n   AND (apchk_id=&lt;? value(&quot;apchk_id&quot;) ?>) );</sql>\n </querysource>\n <querysource>\n  <name>Detail</name>\n  <sql>SELECT apchkitem_invcnumber, apchkitem_ponumber,\n       formatMoney(apchkitem_amount) AS f_amount\nFROM apchkitem\nWHERE (apchkitem_apchk_id=%1)\nORDER BY apchkitem_invcnumber;</sql>\n </querysource>\n <pghead>\n  <firstpage/>\n  <height>197</height>\n  <label>\n   <rect>\n    <x>525</x>\n    <y>175</y>\n    <width>83</width>\n    <height>20</height>\n   </rect>\n   <font>\n    <face>Helvetica [Urw]</face>\n    <size>10</size>\n    <weight>normal</weight>\n   </font>\n   <hcenter/>\n   <vcenter/>\n   <string>Amount</string>\n  </label>\n  <label>\n   <rect>\n    <x>530</x>\n    <y>75</y>\n    <width>20</width>\n    <height>20</height>\n   </rect>\n   <font>\n    <face>Helvetica [Urw]</face>\n    <size>10</size>\n    <weight>normal</weight>\n   </font>\n   <right/>\n   <vcenter/>\n   <string>$</string>\n  </label>\n  <label>\n   <rect>\n    <x>5</x>\n    <y>155</y>\n    <width>50</width>\n    <height>20</height>\n   </rect>\n   <font>\n    <face>Helvetica [Urw]</face>\n    <size>10</size>\n    <weight>normal</weight>\n   </font>\n   <right/>\n   <vcenter/>\n   <string>Memo:</string>\n  </label>\n  <label>\n   <rect>\n    <x>270</x>\n    <y>175</y>\n    <width>100</width>\n    <height>20</height>\n   </rect>\n   <font>\n    <face>Helvetica [Urw]</face>\n    <size>10</size>\n    <weight>normal</weight>\n   </font>\n   <hcenter/>\n   <vcenter/>\n   <string>Invoice #</string>\n  </label>\n  <field>\n   <rect>\n    <x>300</x>\n    <y>75</y>\n    <width>150</width>\n    <height>40</height>\n   </rect>\n   <font>\n    <face>Arial</face>\n    <size>18</size>\n    <weight>bold</weight>\n   </font>\n   <hcenter/>\n   <vcenter/>\n   <data>\n    <query>Head</query>\n    <column>f_void</column>\n   </data>\n  </field>\n  <field>\n   <rect>\n    <x>60</x>\n    <y>30</y>\n    <width>150</width>\n    <height>40</height>\n   </rect>\n   <font>\n    <face>Arial</face>\n    <size>18</size>\n    <weight>bold</weight>\n   </font>\n   <hcenter/>\n   <vcenter/>\n   <data>\n    <query>Head</query>\n    <column>f_void</column>\n   </data>\n  </field>\n  <label>\n   <rect>\n    <x>395</x>\n    <y>175</y>\n    <width>100</width>\n    <height>20</height>\n   </rect>\n   <font>\n    <face>Helvetica [Urw]</face>\n    <size>10</size>\n    <weight>normal</weight>\n   </font>\n   <hcenter/>\n   <vcenter/>\n   <string>P/O #</string>\n  </label>\n  <field>\n   <rect>\n    <x>60</x>\n    <y>155</y>\n    <width>325</width>\n    <height>20</height>\n   </rect>\n   <font>\n    <face>Helvetica</face>\n    <size>12</size>\n    <weight>normal</weight>\n   </font>\n   <left/>\n   <top/>\n   <data>\n    <query>Head</query>\n    <column>apchk_for</column>\n   </data>\n  </field>\n  <field>\n   <rect>\n    <x>555</x>\n    <y>30</y>\n    <width>150</width>\n    <height>40</height>\n   </rect>\n   <font>\n    <face>Arial</face>\n    <size>18</size>\n    <weight>bold</weight>\n   </font>\n   <hcenter/>\n   <vcenter/>\n   <data>\n    <query>Head</query>\n    <column>f_void</column>\n   </data>\n  </field>\n  <field>\n   <rect>\n    <x>60</x>\n    <y>120</y>\n    <width>150</width>\n    <height>40</height>\n   </rect>\n   <font>\n    <face>Arial</face>\n    <size>18</size>\n    <weight>bold</weight>\n   </font>\n   <hcenter/>\n   <vcenter/>\n   <data>\n    <query>Head</query>\n    <column>f_void</column>\n   </data>\n  </field>\n  <field>\n   <rect>\n    <x>85</x>\n    <y>75</y>\n    <width>185</width>\n    <height>20</height>\n   </rect>\n   <font>\n    <face>Helvetica</face>\n    <size>12</size>\n    <weight>normal</weight>\n   </font>\n   <left/>\n   <top/>\n   <data>\n    <query>Head</query>\n    <column>vend_name</column>\n   </data>\n  </field>\n  <field>\n   <rect>\n    <x>555</x>\n    <y>20</y>\n    <width>121</width>\n    <height>20</height>\n   </rect>\n   <font>\n    <face>Helvetica</face>\n    <size>12</size>\n    <weight>normal</weight>\n   </font>\n   <left/>\n   <top/>\n   <data>\n    <query>Head</query>\n    <column>f_checkdate</column>\n   </data>\n  </field>\n  <field>\n   <rect>\n    <x>45</x>\n    <y>100</y>\n    <width>675</width>\n    <height>20</height>\n   </rect>\n   <font>\n    <face>Helvetica</face>\n    <size>12</size>\n    <weight>normal</weight>\n   </font>\n   <left/>\n   <top/>\n   <data>\n    <query>Head</query>\n    <column>f_words</column>\n   </data>\n  </field>\n  <field>\n   <rect>\n    <x>555</x>\n    <y>120</y>\n    <width>150</width>\n    <height>40</height>\n   </rect>\n   <font>\n    <face>Arial</face>\n    <size>18</size>\n    <weight>bold</weight>\n   </font>\n   <hcenter/>\n   <vcenter/>\n   <data>\n    <query>Head</query>\n    <column>f_void</column>\n   </data>\n  </field>\n  <field>\n   <rect>\n    <x>555</x>\n    <y>75</y>\n    <width>150</width>\n    <height>20</height>\n   </rect>\n   <font>\n    <face>Helvetica</face>\n    <size>12</size>\n    <weight>normal</weight>\n   </font>\n   <left/>\n   <top/>\n   <data>\n    <query>Head</query>\n    <column>f_amount</column>\n   </data>\n  </field>\n </pghead>\n <section>\n  <name>Apchkitem</name>\n  <detail>\n   <key>\n    <query>Detail</query>\n   </key>\n   <height>22</height>\n   <field>\n    <rect>\n     <x>509</x>\n     <y>0</y>\n     <width>100</width>\n     <height>20</height>\n    </rect>\n    <font>\n     <face>Helvetica [Urw]</face>\n     <size>10</size>\n     <weight>normal</weight>\n    </font>\n    <right/>\n    <vcenter/>\n    <data>\n     <query>Detail</query>\n     <column>f_amount</column>\n    </data>\n   </field>\n   <field>\n    <rect>\n     <x>390</x>\n     <y>0</y>\n     <width>100</width>\n     <height>20</height>\n    </rect>\n    <font>\n     <face>Helvetica [Urw]</face>\n     <size>10</size>\n     <weight>normal</weight>\n    </font>\n    <hcenter/>\n    <vcenter/>\n    <data>\n     <query>Detail</query>\n     <column>apchkitem_ponumber</column>\n    </data>\n   </field>\n   <field>\n    <rect>\n     <x>270</x>\n     <y>0</y>\n     <width>100</width>\n     <height>20</height>\n    </rect>\n    <font>\n     <face>Helvetica [Urw]</face>\n     <size>10</size>\n     <weight>normal</weight>\n    </font>\n    <hcenter/>\n    <vcenter/>\n    <data>\n     <query>Detail</query>\n     <column>apchkitem_invcnumber</column>\n    </data>\n   </field>\n  </detail>\n </section>\n</report>\n	OpenMFG Sample A/P Check Format	0	2004-08-26 10:48:34.979983
416	ListOpenReturnAuthorizations	\N	<!DOCTYPE openRPTDef>\n<report>\n <title>List Open Return Authorizations</title>\n <name>ListOpenReturnAuthorizations</name>\n <description></description>\n <grid>\n  <snap/>\n  <show/>\n  <x>0.05</x>\n  <y>0.05</y>\n </grid>\n <size>Letter</size>\n <portrait/>\n <topmargin>50</topmargin>\n <bottommargin>50</bottommargin>\n <rightmargin>50</rightmargin>\n <leftmargin>50</leftmargin>\n <querysource>\n  <name>head</name>\n  <sql>SELECT &lt;? if exists("warehous_id") ?>\n         ( SELECT warehous_code\n             FROM warehous\n            WHERE (warehous_id=&lt;? value("warehous_id") ?>) )\n       &lt;? else ?>\n         text('All Warehouses')\n       &lt;? endif ?>\n       AS warehouse;\n</sql>\n </querysource>\n <querysource loadFromDb="true">\n  <name>detail</name>\n  <mqlgroup>returnAuthorizations</mqlgroup>\n  <mqlname>detail</mqlname>\n </querysource>\n <rpthead>\n  <height>221</height>\n  <label>\n   <rect>\n    <x>100</x>\n    <y>200</y>\n    <width>85</width>\n    <height>15</height>\n   </rect>\n   <font>\n    <face>Arial</face>\n    <size>8</size>\n    <weight>normal</weight>\n   </font>\n   <left/>\n   <vcenter/>\n   <string>Cust. #</string>\n  </label>\n  <label>\n   <rect>\n    <x>265</x>\n    <y>5</y>\n    <width>475</width>\n    <height>38</height>\n   </rect>\n   <font>\n    <face>Arial</face>\n    <size>18</size>\n    <weight>bold</weight>\n   </font>\n   <right/>\n   <vcenter/>\n   <string>List Open Return Authorizations</string>\n  </label>\n  <line>\n   <xstart>5</xstart>\n   <ystart>215</ystart>\n   <xend>745</xend>\n   <yend>215</yend>\n   <weight>2</weight>\n  </line>\n  <label>\n   <rect>\n    <x>645</x>\n    <y>200</y>\n    <width>100</width>\n    <height>15</height>\n   </rect>\n   <font>\n    <face>Arial</face>\n    <size>8</size>\n    <weight>normal</weight>\n   </font>\n   <left/>\n   <vcenter/>\n   <string>Expires</string>\n  </label>\n  <label>\n   <rect>\n    <x>195</x>\n    <y>200</y>\n    <width>100</width>\n    <height>15</height>\n   </rect>\n   <font>\n    <face>Arial</face>\n    <size>8</size>\n    <weight>normal</weight>\n   </font>\n   <left/>\n   <vcenter/>\n   <string>Customer</string>\n  </label>\n  <label>\n   <rect>\n    <x>535</x>\n    <y>200</y>\n    <width>100</width>\n    <height>15</height>\n   </rect>\n   <font>\n    <face>Arial</face>\n    <size>8</size>\n    <weight>normal</weight>\n   </font>\n   <left/>\n   <vcenter/>\n   <string>Created</string>\n  </label>\n  <field>\n   <rect>\n    <x>100</x>\n    <y>104</y>\n    <width>200</width>\n    <height>20</height>\n   </rect>\n   <font>\n    <face>Arial</face>\n    <size>10</size>\n    <weight>bold</weight>\n   </font>\n   <left/>\n   <vcenter/>\n   <data>\n    <query>head</query>\n    <column>warehouse</column>\n   </data>\n  </field>\n  <label>\n   <rect>\n    <x>15</x>\n    <y>104</y>\n    <width>80</width>\n    <height>20</height>\n   </rect>\n   <font>\n    <face>Arial</face>\n    <size>10</size>\n    <weight>normal</weight>\n   </font>\n   <right/>\n   <vcenter/>\n   <string>Warehouse:</string>\n  </label>\n  <label>\n   <rect>\n    <x>10</x>\n    <y>200</y>\n    <width>50</width>\n    <height>15</height>\n   </rect>\n   <font>\n    <face>Arial</face>\n    <size>8</size>\n    <weight>normal</weight>\n   </font>\n   <left/>\n   <vcenter/>\n   <string>R/A #</string>\n  </label>\n  <label>\n   <rect>\n    <x>425</x>\n    <y>200</y>\n    <width>100</width>\n    <height>15</height>\n   </rect>\n   <font>\n    <face>Arial</face>\n    <size>8</size>\n    <weight>normal</weight>\n   </font>\n   <left/>\n   <vcenter/>\n   <string>Disposition</string>\n  </label>\n </rpthead>\n <pghead>\n  <firstpage/>\n  <height>6</height>\n </pghead>\n <pghead>\n  <height>21</height>\n  <label>\n   <rect>\n    <x>100</x>\n    <y>0</y>\n    <width>85</width>\n    <height>15</height>\n   </rect>\n   <font>\n    <face>Arial</face>\n    <size>8</size>\n    <weight>normal</weight>\n   </font>\n   <left/>\n   <vcenter/>\n   <string>Cust. #</string>\n  </label>\n  <label>\n   <rect>\n    <x>425</x>\n    <y>0</y>\n    <width>100</width>\n    <height>15</height>\n   </rect>\n   <font>\n    <face>Arial</face>\n    <size>8</size>\n    <weight>normal</weight>\n   </font>\n   <left/>\n   <vcenter/>\n   <string>Disposition</string>\n  </label>\n  <label>\n   <rect>\n    <x>10</x>\n    <y>0</y>\n    <width>50</width>\n    <height>15</height>\n   </rect>\n   <font>\n    <face>Arial</face>\n    <size>8</size>\n    <weight>normal</weight>\n   </font>\n   <left/>\n   <vcenter/>\n   <string>R/A #</string>\n  </label>\n  <label>\n   <rect>\n    <x>535</x>\n    <y>0</y>\n    <width>100</width>\n    <height>15</height>\n   </rect>\n   <font>\n    <face>Arial</face>\n    <size>8</size>\n    <weight>normal</weight>\n   </font>\n   <left/>\n   <vcenter/>\n   <string>Created</string>\n  </label>\n  <label>\n   <rect>\n    <x>195</x>\n    <y>0</y>\n    <width>100</width>\n    <height>15</height>\n   </rect>\n   <font>\n    <face>Arial</face>\n    <size>8</size>\n    <weight>normal</weight>\n   </font>\n   <left/>\n   <vcenter/>\n   <string>Customer</string>\n  </label>\n  <line>\n   <xstart>5</xstart>\n   <ystart>15</ystart>\n   <xend>745</xend>\n   <yend>15</yend>\n   <weight>2</weight>\n  </line>\n  <label>\n   <rect>\n    <x>645</x>\n    <y>0</y>\n    <width>100</width>\n    <height>15</height>\n   </rect>\n   <font>\n    <face>Arial</face>\n    <size>8</size>\n    <weight>normal</weight>\n   </font>\n   <left/>\n   <vcenter/>\n   <string>Expires</string>\n  </label>\n </pghead>\n <section>\n  <name>detail</name>\n  <detail>\n   <key>\n    <query>detail</query>\n   </key>\n   <height>18</height>\n   <field>\n    <rect>\n     <x>100</x>\n     <y>0</y>\n     <width>85</width>\n     <height>15</height>\n    </rect>\n    <font>\n     <face>Arial</face>\n     <size>8</size>\n     <weight>bold</weight>\n    </font>\n    <left/>\n    <vcenter/>\n    <data>\n     <query>detail</query>\n     <column>custnumber</column>\n    </data>\n   </field>\n   <field>\n    <rect>\n     <x>425</x>\n     <y>0</y>\n     <width>100</width>\n     <height>15</height>\n    </rect>\n    <font>\n     <face>Arial</face>\n     <size>8</size>\n     <weight>bold</weight>\n    </font>\n    <left/>\n    <vcenter/>\n    <data>\n     <query>detail</query>\n     <column>disposition</column>\n    </data>\n   </field>\n   <field>\n    <rect>\n     <x>535</x>\n     <y>0</y>\n     <width>100</width>\n     <height>15</height>\n    </rect>\n    <font>\n     <face>Arial</face>\n     <size>8</size>\n     <weight>bold</weight>\n    </font>\n    <left/>\n    <vcenter/>\n    <data>\n     <query>detail</query>\n     <column>f_authorized</column>\n    </data>\n   </field>\n   <field>\n    <rect>\n     <x>645</x>\n     <y>0</y>\n     <width>100</width>\n     <height>15</height>\n    </rect>\n    <font>\n     <face>Arial</face>\n     <size>8</size>\n     <weight>bold</weight>\n    </font>\n    <left/>\n    <vcenter/>\n    <data>\n     <query>detail</query>\n     <column>f_expires</column>\n    </data>\n   </field>\n   <field>\n    <rect>\n     <x>5</x>\n     <y>0</y>\n     <width>85</width>\n     <height>15</height>\n    </rect>\n    <font>\n     <face>Arial</face>\n     <size>8</size>\n     <weight>bold</weight>\n    </font>\n    <left/>\n    <vcenter/>\n    <data>\n     <query>detail</query>\n     <column>rahead_number</column>\n    </data>\n   </field>\n   <field>\n    <rect>\n     <x>195</x>\n     <y>0</y>\n     <width>225</width>\n     <height>15</height>\n    </rect>\n    <font>\n     <face>Arial</face>\n     <size>8</size>\n     <weight>bold</weight>\n    </font>\n    <left/>\n    <vcenter/>\n    <data>\n     <query>detail</query>\n     <column>rahead_billtoname</column>\n    </data>\n   </field>\n  </detail>\n </section>\n <pgfoot>\n  <height>18</height>\n  <label>\n   <rect>\n    <x>615</x>\n    <y>0</y>\n    <width>85</width>\n    <height>15</height>\n   </rect>\n   <font>\n    <face>Arial</face>\n    <size>8</size>\n    <weight>normal</weight>\n   </font>\n   <right/>\n   <vcenter/>\n   <string>Page:</string>\n  </label>\n  <label>\n   <rect>\n    <x>0</x>\n    <y>0</y>\n    <width>85</width>\n    <height>15</height>\n   </rect>\n   <font>\n    <face>Arial</face>\n    <size>8</size>\n    <weight>normal</weight>\n   </font>\n   <right/>\n   <vcenter/>\n   <string>Report Date:</string>\n  </label>\n  <field>\n   <rect>\n    <x>705</x>\n    <y>0</y>\n    <width>40</width>\n    <height>15</height>\n   </rect>\n   <font>\n    <face>Arial</face>\n    <size>8</size>\n    <weight>bold</weight>\n   </font>\n   <left/>\n   <vcenter/>\n   <data>\n    <query>Context Query</query>\n    <column>page_number</column>\n   </data>\n  </field>\n  <field>\n   <rect>\n    <x>90</x>\n    <y>0</y>\n    <width>100</width>\n    <height>15</height>\n   </rect>\n   <font>\n    <face>Arial</face>\n    <size>8</size>\n    <weight>bold</weight>\n   </font>\n   <left/>\n   <vcenter/>\n   <data>\n    <query>Context Query</query>\n    <column>report_date</column>\n   </data>\n  </field>\n </pgfoot>\n</report>\n	\N	0	2012-11-07 15:38:54.982573
138	ExpediteExceptionsByPlannerCode	\N	<!DOCTYPE openRPTDef>\n<report>\n <title>Expedite Exceptions by Planner Code</title>\n <name>ExpediteExceptionsByPlannerCode</name>\n <description/>\n <size>Letter</size>\n <portrait/>\n <topmargin>50</topmargin>\n <bottommargin>50</bottommargin>\n <rightmargin>50</rightmargin>\n <leftmargin>50</leftmargin>\n <querysource>\n  <name>head</name>\n  <sql>SELECT &lt;? if exists("plancode_id") ?>\n         ( SELECT (plancode_code || '-' || plancode_name)\n             FROM plancode\n            WHERE (plancode_id=&lt;? value("plancode_id") ?>) )\n       &lt;? elseif exists("plancode_pattern") ?>\n         text(&lt;? value("plancode_pattern") ?>)\n       &lt;? else ?>\n         text('All Planner Codes')\n       &lt;? endif ?>\n       AS plannercode,\n       &lt;? if exists("warehous_id") ?>\n         ( SELECT warehous_code\n             FROM warehous\n            WHERE (warehous_id=&lt;? value("warehous_id") ?>) )\n       &lt;? else ?>\n         text('All Sites')\n       &lt;? endif ?>\n       AS warehouse;</sql>\n </querysource>\n <querysource>\n  <name>detail</name>\n  <sql>SELECT planord_id AS order_id, 1 AS order_code,\n       CASE WHEN (planord_type='W') THEN ('PW/O-' || formatPloNumber(planord_id))\n            WHEN (planord_type='P') THEN ('PP/O-' || formatPloNumber(planord_id))\n            ELSE text(planord_number)\n       END AS order_number,\n       warehous_code, item_number, item_descrip1, item_descrip2,\n       CASE WHEN (planord_type='W') THEN formatDate(planord_startdate)\n            ELSE formatDate(planord_duedate)\n       END AS f_keydate,\n       CASE WHEN (planord_type='W') THEN planord_startdate\n            ELSE planord_duedate\n       END AS keydate, 'Release Order' AS exception \n  FROM planord, itemsite, item, warehous \n WHERE ( (planord_itemsite_id=itemsite_id)\n   AND (itemsite_item_id=item_id)\n   AND (itemsite_warehous_id=warehous_id)\n   AND ( ( (planord_type='W') AND (planord_startdate &lt;= (CURRENT_DATE + &lt;? value("lookAheadDays") ?>)) )\n      OR ( (planord_type='P') AND (planord_duedate &lt;= (CURRENT_DATE + &lt;? value("lookAheadDays") ?>)) ) ) \n&lt;? if exists("warehous_id") ?>\n   AND (itemsite_warehous_id=&lt;? value("warehous_id") ?>)\n&lt;? endif ?>\n&lt;? if exists("plancode_id") ?>\n   AND (itemsite_plancode_id=&lt;? value("plancode_id") ?>)\n&lt;? elseif exists("plancode_pattern") ?>\n   AND (itemsite_plancode_id IN (SELECT plancode_id FROM plancode WHERE (plancode_code ~ &lt;? value("plancode_pattern") ?>)))\n&lt;? endif ?>\n)\n\nUNION SELECT wo_id AS order_id, 2 AS order_code, ('W/O-' || formatWoNumber(wo_id)) AS order_number,\n             warehous_code, item_number, item_descrip1, item_descrip2,\n             formatDate(wo_startdate) AS f_keydate, wo_startdate AS keydate, 'Start Production' AS exception \nFROM wo, itemsite, item, warehous \nWHERE ( (wo_itemsite_id=itemsite_id)\n AND (itemsite_item_id=item_id)\n AND (itemsite_warehous_id=warehous_id)\n AND (wo_status IN ('O', 'E', 'R'))\n AND (wo_startdate &lt;= (CURRENT_DATE + &lt;? value("lookAheadDays") ?>))\n&lt;? if exists("warehous_id") ?>\n AND (itemsite_warehous_id=&lt;? value("warehous_id") ?>)\n&lt;? endif ?>\n&lt;? if exists("plancode_id") ?>\n AND (itemsite_plancode_id=&lt;? value("plancode_id") ?>)\n&lt;? elseif exists("plancode_pattern") ?>\n AND (itemsite_plancode_id IN (SELECT plancode_id FROM plancode WHERE (plancode_code ~ &lt;? value("plancode_pattern")?>)))\n&lt;? endif ?>\n)\n\nUNION SELECT wo_id AS order_id, 2 AS order_code, ('W/O-' || formatWoNumber(wo_id)) AS order_number,\n             warehous_code, item_number, item_descrip1, item_descrip2,\n             formatDate(wo_startdate) AS f_keydate, wo_startdate AS keydate, 'Expedite Production' AS exception \nFROM wo, itemsite, item, warehous \nWHERE ( (wo_itemsite_id=itemsite_id)\n AND (itemsite_item_id=item_id)\n AND (itemsite_warehous_id=warehous_id)\n AND (wo_status='I')\n AND (wo_startdate &lt;= (CURRENT_DATE + &lt;? value("lookAheadDays") ?>))\n&lt;? if exists("warehous_id") ?>\n AND (itemsite_warehous_id=&lt;? value("warehous_id") ?>)\n&lt;? endif ?>\n&lt;? if exists("plancode_id") ?>\n AND (itemsite_plancode_id=&lt;? value("plancode_id") ?>)\n&lt;? elseif exists("plancode_pattern") ?>\n AND (itemsite_plancode_id IN (SELECT plancode_id FROM plancode WHERE (plancode_code ~ &lt;? value("plancode_pattern") ?>)))\n&lt;? endif ?>\n)\norder by keydate;</sql>\n </querysource>\n <rpthead>\n  <height>223</height>\n  <line>\n   <xstart>5</xstart>\n   <ystart>215</ystart>\n   <xend>745</xend>\n   <yend>215</yend>\n   <weight>2</weight>\n  </line>\n  <label>\n   <rect>\n    <x>20</x>\n    <y>100</y>\n    <width>114</width>\n    <height>20</height>\n   </rect>\n   <font>\n    <face>Arial</face>\n    <size>10</size>\n    <weight>normal</weight>\n   </font>\n   <right/>\n   <vcenter/>\n   <string>Planner Code(s):</string>\n  </label>\n  <field>\n   <rect>\n    <x>140</x>\n    <y>140</y>\n    <width>200</width>\n    <height>20</height>\n   </rect>\n   <font>\n    <face>Arial</face>\n    <size>10</size>\n    <weight>bold</weight>\n   </font>\n   <left/>\n   <vcenter/>\n   <data>\n    <query>Parameter Query</query>\n    <column>lookAheadDays</column>\n   </data>\n  </field>\n  <label>\n   <rect>\n    <x>5</x>\n    <y>185</y>\n    <width>95</width>\n    <height>15</height>\n   </rect>\n   <font>\n    <face>Arial</face>\n    <size>8</size>\n    <weight>normal</weight>\n   </font>\n   <left/>\n   <vcenter/>\n   <string>Order Type/#</string>\n  </label>\n  <label>\n   <rect>\n    <x>595</x>\n    <y>185</y>\n    <width>150</width>\n    <height>15</height>\n   </rect>\n   <font>\n    <face>Arial</face>\n    <size>8</size>\n    <weight>normal</weight>\n   </font>\n   <left/>\n   <vcenter/>\n   <string>Exception</string>\n  </label>\n  <label>\n   <rect>\n    <x>30</x>\n    <y>120</y>\n    <width>105</width>\n    <height>20</height>\n   </rect>\n   <font>\n    <face>Arial</face>\n    <size>10</size>\n    <weight>normal</weight>\n   </font>\n   <right/>\n   <vcenter/>\n   <string>Site:</string>\n  </label>\n  <label>\n   <rect>\n    <x>490</x>\n    <y>185</y>\n    <width>100</width>\n    <height>15</height>\n   </rect>\n   <font>\n    <face>Arial</face>\n    <size>8</size>\n    <weight>normal</weight>\n   </font>\n   <hcenter/>\n   <vcenter/>\n   <string>Start/Due Date</string>\n  </label>\n  <field>\n   <rect>\n    <x>140</x>\n    <y>100</y>\n    <width>385</width>\n    <height>20</height>\n   </rect>\n   <font>\n    <face>Arial</face>\n    <size>10</size>\n    <weight>bold</weight>\n   </font>\n   <left/>\n   <vcenter/>\n   <data>\n    <query>head</query>\n    <column>plannercode</column>\n   </data>\n  </field>\n  <label>\n   <rect>\n    <x>150</x>\n    <y>185</y>\n    <width>106</width>\n    <height>15</height>\n   </rect>\n   <font>\n    <face>Arial</face>\n    <size>8</size>\n    <weight>normal</weight>\n   </font>\n   <left/>\n   <vcenter/>\n   <string>Item Number</string>\n  </label>\n  <field>\n   <rect>\n    <x>140</x>\n    <y>120</y>\n    <width>200</width>\n    <height>20</height>\n   </rect>\n   <font>\n    <face>Arial</face>\n    <size>10</size>\n    <weight>bold</weight>\n   </font>\n   <left/>\n   <vcenter/>\n   <data>\n    <query>head</query>\n    <column>warehouse</column>\n   </data>\n  </field>\n  <label>\n   <rect>\n    <x>105</x>\n    <y>185</y>\n    <width>35</width>\n    <height>15</height>\n   </rect>\n   <font>\n    <face>Arial</face>\n    <size>8</size>\n    <weight>normal</weight>\n   </font>\n   <hcenter/>\n   <vcenter/>\n   <string>Site</string>\n  </label>\n  <label>\n   <rect>\n    <x>5</x>\n    <y>140</y>\n    <width>130</width>\n    <height>20</height>\n   </rect>\n   <font>\n    <face>Arial</face>\n    <size>10</size>\n    <weight>normal</weight>\n   </font>\n   <right/>\n   <vcenter/>\n   <string>Look Ahead Days:</string>\n  </label>\n  <label>\n   <rect>\n    <x>150</x>\n    <y>200</y>\n    <width>106</width>\n    <height>15</height>\n   </rect>\n   <font>\n    <face>Arial</face>\n    <size>8</size>\n    <weight>normal</weight>\n   </font>\n   <left/>\n   <vcenter/>\n   <string>Description</string>\n  </label>\n  <label>\n   <rect>\n    <x>240</x>\n    <y>10</y>\n    <width>484</width>\n    <height>38</height>\n   </rect>\n   <font>\n    <face>Arial</face>\n    <size>18</size>\n    <weight>bold</weight>\n   </font>\n   <right/>\n   <vcenter/>\n   <string>Expedite Exceptions by Planner Code</string>\n  </label>\n </rpthead>\n <pghead>\n  <firstpage/>\n  <height>7</height>\n </pghead>\n <pghead>\n  <height>42</height>\n  <label>\n   <rect>\n    <x>5</x>\n    <y>5</y>\n    <width>95</width>\n    <height>15</height>\n   </rect>\n   <font>\n    <face>Arial</face>\n    <size>8</size>\n    <weight>normal</weight>\n   </font>\n   <left/>\n   <vcenter/>\n   <string>Order Type/#</string>\n  </label>\n  <label>\n   <rect>\n    <x>150</x>\n    <y>20</y>\n    <width>106</width>\n    <height>15</height>\n   </rect>\n   <font>\n    <face>Arial</face>\n    <size>8</size>\n    <weight>normal</weight>\n   </font>\n   <left/>\n   <vcenter/>\n   <string>Description</string>\n  </label>\n  <label>\n   <rect>\n    <x>490</x>\n    <y>5</y>\n    <width>100</width>\n    <height>15</height>\n   </rect>\n   <font>\n    <face>Arial</face>\n    <size>8</size>\n    <weight>normal</weight>\n   </font>\n   <hcenter/>\n   <vcenter/>\n   <string>Start/Due Date</string>\n  </label>\n  <line>\n   <xstart>5</xstart>\n   <ystart>35</ystart>\n   <xend>745</xend>\n   <yend>35</yend>\n   <weight>2</weight>\n  </line>\n  <label>\n   <rect>\n    <x>105</x>\n    <y>5</y>\n    <width>35</width>\n    <height>15</height>\n   </rect>\n   <font>\n    <face>Arial</face>\n    <size>8</size>\n    <weight>normal</weight>\n   </font>\n   <hcenter/>\n   <vcenter/>\n   <string>Site</string>\n  </label>\n  <label>\n   <rect>\n    <x>150</x>\n    <y>5</y>\n    <width>106</width>\n    <height>15</height>\n   </rect>\n   <font>\n    <face>Arial</face>\n    <size>8</size>\n    <weight>normal</weight>\n   </font>\n   <left/>\n   <vcenter/>\n   <string>Item Number</string>\n  </label>\n  <label>\n   <rect>\n    <x>595</x>\n    <y>5</y>\n    <width>150</width>\n    <height>15</height>\n   </rect>\n   <font>\n    <face>Arial</face>\n    <size>8</size>\n    <weight>normal</weight>\n   </font>\n   <left/>\n   <vcenter/>\n   <string>Exception</string>\n  </label>\n </pghead>\n <section>\n  <name>detail</name>\n  <detail>\n   <key>\n    <query>detail</query>\n   </key>\n   <height>53</height>\n   <field>\n    <rect>\n     <x>490</x>\n     <y>0</y>\n     <width>100</width>\n     <height>15</height>\n    </rect>\n    <font>\n     <face>Arial</face>\n     <size>8</size>\n     <weight>bold</weight>\n    </font>\n    <hcenter/>\n    <vcenter/>\n    <data>\n     <query>detail</query>\n     <column>f_keydate</column>\n    </data>\n   </field>\n   <field>\n    <rect>\n     <x>595</x>\n     <y>0</y>\n     <width>150</width>\n     <height>15</height>\n    </rect>\n    <font>\n     <face>Arial</face>\n     <size>8</size>\n     <weight>bold</weight>\n    </font>\n    <left/>\n    <vcenter/>\n    <data>\n     <query>detail</query>\n     <column>exception</column>\n    </data>\n   </field>\n   <field>\n    <rect>\n     <x>105</x>\n     <y>0</y>\n     <width>35</width>\n     <height>15</height>\n    </rect>\n    <font>\n     <face>Arial</face>\n     <size>8</size>\n     <weight>bold</weight>\n    </font>\n    <hcenter/>\n    <vcenter/>\n    <data>\n     <query>detail</query>\n     <column>warehous_code</column>\n    </data>\n   </field>\n   <line>\n    <xstart>5</xstart>\n    <ystart>45</ystart>\n    <xend>745</xend>\n    <yend>45</yend>\n    <weight>0</weight>\n   </line>\n   <field>\n    <rect>\n     <x>150</x>\n     <y>30</y>\n     <width>300</width>\n     <height>15</height>\n    </rect>\n    <font>\n     <face>Arial</face>\n     <size>8</size>\n     <weight>bold</weight>\n    </font>\n    <left/>\n    <vcenter/>\n    <data>\n     <query>detail</query>\n     <column>item_descrip2</column>\n    </data>\n   </field>\n   <field>\n    <rect>\n     <x>150</x>\n     <y>15</y>\n     <width>300</width>\n     <height>15</height>\n    </rect>\n    <font>\n     <face>Arial</face>\n     <size>8</size>\n     <weight>bold</weight>\n    </font>\n    <left/>\n    <vcenter/>\n    <data>\n     <query>detail</query>\n     <column>item_descrip1</column>\n    </data>\n   </field>\n   <field>\n    <rect>\n     <x>150</x>\n     <y>0</y>\n     <width>250</width>\n     <height>15</height>\n    </rect>\n    <font>\n     <face>Arial</face>\n     <size>8</size>\n     <weight>bold</weight>\n    </font>\n    <left/>\n    <vcenter/>\n    <data>\n     <query>detail</query>\n     <column>item_number</column>\n    </data>\n   </field>\n   <field>\n    <rect>\n     <x>5</x>\n     <y>0</y>\n     <width>95</width>\n     <height>15</height>\n    </rect>\n    <font>\n     <face>Arial</face>\n     <size>8</size>\n     <weight>bold</weight>\n    </font>\n    <left/>\n    <vcenter/>\n    <data>\n     <query>detail</query>\n     <column>order_number</column>\n    </data>\n   </field>\n  </detail>\n </section>\n <pgfoot>\n  <height>18</height>\n  <label>\n   <rect>\n    <x>615</x>\n    <y>0</y>\n    <width>85</width>\n    <height>15</height>\n   </rect>\n   <font>\n    <face>Arial</face>\n    <size>8</size>\n    <weight>normal</weight>\n   </font>\n   <right/>\n   <vcenter/>\n   <string>Page:</string>\n  </label>\n  <field>\n   <rect>\n    <x>90</x>\n    <y>0</y>\n    <width>100</width>\n    <height>15</height>\n   </rect>\n   <font>\n    <face>Arial</face>\n    <size>8</size>\n    <weight>bold</weight>\n   </font>\n   <left/>\n   <vcenter/>\n   <data>\n    <query>Context Query</query>\n    <column>report_date</column>\n   </data>\n  </field>\n  <field>\n   <rect>\n    <x>705</x>\n    <y>0</y>\n    <width>40</width>\n    <height>15</height>\n   </rect>\n   <font>\n    <face>Arial</face>\n    <size>8</size>\n    <weight>bold</weight>\n   </font>\n   <left/>\n   <vcenter/>\n   <data>\n    <query>Context Query</query>\n    <column>page_number</column>\n   </data>\n  </field>\n  <label>\n   <rect>\n    <x>0</x>\n    <y>0</y>\n    <width>85</width>\n    <height>15</height>\n   </rect>\n   <font>\n    <face>Arial</face>\n    <size>8</size>\n    <weight>normal</weight>\n   </font>\n   <right/>\n   <vcenter/>\n   <string>Report Date:</string>\n  </label>\n </pgfoot>\n</report>\n	\N	0	2008-07-25 16:12:17.804536
51	SequencedBOM	\N	<!DOCTYPE openRPTDef>\n<report>\n <title>Sequenced Bill of Materials</title>\n <name>SequencedBOM</name>\n <description/>\n <size>Letter</size>\n <portrait/>\n <topmargin>50</topmargin>\n <bottommargin>50</bottommargin>\n <rightmargin>50</rightmargin>\n <leftmargin>50</leftmargin>\n <querysource>\n  <name>head</name>\n  <sql>SELECT item_number,\n       uom_name AS item_invuom,\n       item_descrip1,\n       item_descrip2\n  FROM item, uom\n WHERE ((item_id=&lt;? value("item_id") ?>)\n AND (item_inv_uom_id=uom_id));\n    </sql>\n </querysource>\n <querysource>\n  <name>detail</name>\n  <sql>SELECT text(booitem_seqnumber) AS booseqnumber, bomitem_seqnumber,\n       item_number, uom_name AS item_invuom, item_descrip1, item_descrip2,\n       formatQtyPer(bomitem_qtyper) AS qtyper,\n       formatScrap(bomitem_scrap) AS scrap,\n       formatQtyPer(bomitem_qtyper + (1 * bomitem_scrap)) AS qtyreq,\n       formatDate(bomitem_effective, 'Always') AS effective,\n       formatDate(bomitem_expires, 'Never') AS expires,\n       formatBoolYN(bomitem_createwo) AS createchild,\n       CASE WHEN (bomitem_issuemethod='S') THEN 'Push'\n            WHEN (bomitem_issuemethod='L') THEN 'Pull'\n            WHEN (bomitem_issuemethod='M') THEN 'Mixed'\n            ELSE 'Special'\n       END AS issuemethod\n  FROM booitem(&lt;? value("item_id") ?>), bomitem(&lt;? value("item_id") ?>,&lt;? value("revision_id") ?>), item, uom\n WHERE ((bomitem_item_id=item_id)\n   AND (bomitem_booitem_seq_id=booitem_seq_id)\n   AND (item_inv_uom_id=uom_id)\n&lt;? if not exists("showExpired") ?>\n   AND (bomitem_expires > CURRENT_DATE)\n&lt;? endif ?>\n&lt;? if not exists("showFuture") ?>\n   AND (bomitem_effective &lt;= CURRENT_DATE)\n&lt;? endif ?>\n)\nUNION\nSELECT text('') AS booseqnumber, bomitem_seqnumber,\n       item_number, uom_name AS item_invuom, item_descrip1, item_descrip2,\n       formatQtyPer(bomitem_qtyper) AS qtyper,\n       formatScrap(bomitem_scrap) AS scrap,\n       formatQtyPer(bomitem_qtyper + (1 * bomitem_scrap)) AS qtyreq,\n       formatDate(bomitem_effective, 'Always') AS effective,\n       formatDate(bomitem_expires, 'Never') AS expires,\n       formatBoolYN(bomitem_createwo) AS createchild,\n       CASE WHEN (bomitem_issuemethod='S') THEN 'Push'\n            WHEN (bomitem_issuemethod='L') THEN 'Pull'\n            WHEN (bomitem_issuemethod='M') THEN 'Mixed'\n            ELSE 'Special'\n       END AS issuemethod\n  FROM bomitem(&lt;? value("item_id") ?>,&lt;? value("revision_id") ?>), item, uom\n WHERE ((bomitem_item_id=item_id)\n   AND (bomitem_booitem_seq_id=-1)\n   AND (item_inv_uom_id=uom_id)\n&lt;? if not exists("showExpired") ?>\n   AND (bomitem_expires > CURRENT_DATE)\n&lt;? endif ?>\n&lt;? if not exists("showFuture") ?>\n   AND (bomitem_effective &lt;= CURRENT_DATE)\n&lt;? endif ?>\n)\nORDER BY booseqnumber, bomitem_seqnumber;\n</sql>\n </querysource>\n <querysource>\n  <name>bomhead</name>\n  <sql>SELECT bomhead_docnum, bomhead_revision,\nformatDate(bomhead_revisiondate) AS f_revisiondate\nFROM bomhead\nWHERE ((bomhead_item_id=&lt;? value("item_id") ?>)\nAND (bomhead_rev_id=&lt;? value("revision_id") ?>));</sql>\n </querysource>\n <rpthead>\n  <height>233</height>\n  <field>\n   <rect>\n    <x>100</x>\n    <y>160</y>\n    <width>300</width>\n    <height>20</height>\n   </rect>\n   <font>\n    <face>Arial</face>\n    <size>10</size>\n    <weight>bold</weight>\n   </font>\n   <left/>\n   <vcenter/>\n   <data>\n    <query>head</query>\n    <column>item_descrip2</column>\n   </data>\n  </field>\n  <field>\n   <rect>\n    <x>505</x>\n    <y>160</y>\n    <width>200</width>\n    <height>20</height>\n   </rect>\n   <font>\n    <face>Arial</face>\n    <size>10</size>\n    <weight>bold</weight>\n   </font>\n   <left/>\n   <vcenter/>\n   <data>\n    <query>bomhead</query>\n    <column>bomhead_revision</column>\n   </data>\n  </field>\n  <field>\n   <rect>\n    <x>100</x>\n    <y>140</y>\n    <width>300</width>\n    <height>20</height>\n   </rect>\n   <font>\n    <face>Arial</face>\n    <size>10</size>\n    <weight>bold</weight>\n   </font>\n   <left/>\n   <vcenter/>\n   <data>\n    <query>head</query>\n    <column>item_descrip1</column>\n   </data>\n  </field>\n  <label>\n   <rect>\n    <x>15</x>\n    <y>120</y>\n    <width>80</width>\n    <height>20</height>\n   </rect>\n   <font>\n    <face>Arial</face>\n    <size>10</size>\n    <weight>normal</weight>\n   </font>\n   <right/>\n   <vcenter/>\n   <string>Item:</string>\n  </label>\n  <field>\n   <rect>\n    <x>505</x>\n    <y>140</y>\n    <width>200</width>\n    <height>20</height>\n   </rect>\n   <font>\n    <face>Arial</face>\n    <size>10</size>\n    <weight>bold</weight>\n   </font>\n   <left/>\n   <vcenter/>\n   <data>\n    <query>bomhead</query>\n    <column>f_revisiondate</column>\n   </data>\n  </field>\n  <label>\n   <rect>\n    <x>75</x>\n    <y>200</y>\n    <width>228</width>\n    <height>15</height>\n   </rect>\n   <font>\n    <face>Arial</face>\n    <size>8</size>\n    <weight>normal</weight>\n   </font>\n   <left/>\n   <vcenter/>\n   <string>Component Item Number</string>\n  </label>\n  <label>\n   <rect>\n    <x>600</x>\n    <y>200</y>\n    <width>75</width>\n    <height>15</height>\n   </rect>\n   <font>\n    <face>Arial</face>\n    <size>8</size>\n    <weight>normal</weight>\n   </font>\n   <hcenter/>\n   <vcenter/>\n   <string>Effective</string>\n  </label>\n  <label>\n   <rect>\n    <x>675</x>\n    <y>215</y>\n    <width>75</width>\n    <height>15</height>\n   </rect>\n   <font>\n    <face>Arial</face>\n    <size>8</size>\n    <weight>normal</weight>\n   </font>\n   <hcenter/>\n   <vcenter/>\n   <string>Issue Method</string>\n  </label>\n  <field>\n   <rect>\n    <x>505</x>\n    <y>120</y>\n    <width>200</width>\n    <height>20</height>\n   </rect>\n   <font>\n    <face>Arial</face>\n    <size>10</size>\n    <weight>bold</weight>\n   </font>\n   <left/>\n   <vcenter/>\n   <data>\n    <query>bomhead</query>\n    <column>bomhead_docnum</column>\n   </data>\n  </field>\n  <label>\n   <rect>\n    <x>400</x>\n    <y>200</y>\n    <width>40</width>\n    <height>15</height>\n   </rect>\n   <font>\n    <face>Arial</face>\n    <size>8</size>\n    <weight>normal</weight>\n   </font>\n   <hcenter/>\n   <vcenter/>\n   <string>UOM</string>\n  </label>\n  <label>\n   <rect>\n    <x>400</x>\n    <y>120</y>\n    <width>100</width>\n    <height>20</height>\n   </rect>\n   <font>\n    <face>Arial</face>\n    <size>10</size>\n    <weight>normal</weight>\n   </font>\n   <right/>\n   <vcenter/>\n   <string>Document</string>\n  </label>\n  <label>\n   <rect>\n    <x>400</x>\n    <y>140</y>\n    <width>100</width>\n    <height>20</height>\n   </rect>\n   <font>\n    <face>Arial</face>\n    <size>10</size>\n    <weight>normal</weight>\n   </font>\n   <right/>\n   <vcenter/>\n   <string>Revision Date:</string>\n  </label>\n  <label>\n   <rect>\n    <x>300</x>\n    <y>200</y>\n    <width>75</width>\n    <height>15</height>\n   </rect>\n   <font>\n    <face>Arial</face>\n    <size>8</size>\n    <weight>normal</weight>\n   </font>\n   <hcenter/>\n   <vcenter/>\n   <string>Qty. Per</string>\n  </label>\n  <label>\n   <rect>\n    <x>675</x>\n    <y>200</y>\n    <width>75</width>\n    <height>15</height>\n   </rect>\n   <font>\n    <face>Arial</face>\n    <size>8</size>\n    <weight>normal</weight>\n   </font>\n   <hcenter/>\n   <vcenter/>\n   <string>Expires</string>\n  </label>\n  <label>\n   <rect>\n    <x>443</x>\n    <y>200</y>\n    <width>75</width>\n    <height>15</height>\n   </rect>\n   <font>\n    <face>Arial</face>\n    <size>8</size>\n    <weight>normal</weight>\n   </font>\n   <hcenter/>\n   <vcenter/>\n   <string>Scrap</string>\n  </label>\n  <label>\n   <rect>\n    <x>75</x>\n    <y>215</y>\n    <width>228</width>\n    <height>15</height>\n   </rect>\n   <font>\n    <face>Arial</face>\n    <size>8</size>\n    <weight>normal</weight>\n   </font>\n   <left/>\n   <vcenter/>\n   <string>Item Description</string>\n  </label>\n  <label>\n   <rect>\n    <x>525</x>\n    <y>200</y>\n    <width>75</width>\n    <height>15</height>\n   </rect>\n   <font>\n    <face>Arial</face>\n    <size>8</size>\n    <weight>normal</weight>\n   </font>\n   <hcenter/>\n   <vcenter/>\n   <string>Qty. Required</string>\n  </label>\n  <field>\n   <rect>\n    <x>100</x>\n    <y>120</y>\n    <width>200</width>\n    <height>20</height>\n   </rect>\n   <font>\n    <face>Arial</face>\n    <size>10</size>\n    <weight>bold</weight>\n   </font>\n   <left/>\n   <vcenter/>\n   <data>\n    <query>head</query>\n    <column>item_number</column>\n   </data>\n  </field>\n  <label>\n   <rect>\n    <x>600</x>\n    <y>215</y>\n    <width>75</width>\n    <height>15</height>\n   </rect>\n   <font>\n    <face>Arial</face>\n    <size>8</size>\n    <weight>normal</weight>\n   </font>\n   <hcenter/>\n   <vcenter/>\n   <string>Create W/O</string>\n  </label>\n  <label>\n   <rect>\n    <x>375</x>\n    <y>10</y>\n    <width>350</width>\n    <height>37</height>\n   </rect>\n   <font>\n    <face>Arial</face>\n    <size>18</size>\n    <weight>bold</weight>\n   </font>\n   <right/>\n   <vcenter/>\n   <string>Sequenced Bill of Materials</string>\n  </label>\n  <label>\n   <rect>\n    <x>400</x>\n    <y>160</y>\n    <width>100</width>\n    <height>20</height>\n   </rect>\n   <font>\n    <face>Arial</face>\n    <size>10</size>\n    <weight>normal</weight>\n   </font>\n   <right/>\n   <vcenter/>\n   <string>Revision:</string>\n  </label>\n  <label>\n   <rect>\n    <x>5</x>\n    <y>200</y>\n    <width>65</width>\n    <height>15</height>\n   </rect>\n   <font>\n    <face>Arial</face>\n    <size>8</size>\n    <weight>normal</weight>\n   </font>\n   <hcenter/>\n   <vcenter/>\n   <string>BOO Seq. #</string>\n  </label>\n  <line>\n   <xstart>5</xstart>\n   <ystart>228</ystart>\n   <xend>745</xend>\n   <yend>228</yend>\n   <weight>2</weight>\n  </line>\n  <label>\n   <rect>\n    <x>5</x>\n    <y>215</y>\n    <width>65</width>\n    <height>15</height>\n   </rect>\n   <font>\n    <face>Arial</face>\n    <size>8</size>\n    <weight>normal</weight>\n   </font>\n   <hcenter/>\n   <vcenter/>\n   <string>BOM Seq. #</string>\n  </label>\n </rpthead>\n <pghead>\n  <firstpage/>\n  <height>6</height>\n </pghead>\n <pghead>\n  <height>36</height>\n  <label>\n   <rect>\n    <x>5</x>\n    <y>15</y>\n    <width>65</width>\n    <height>15</height>\n   </rect>\n   <font>\n    <face>Arial</face>\n    <size>8</size>\n    <weight>normal</weight>\n   </font>\n   <hcenter/>\n   <vcenter/>\n   <string>BOM Seq. #</string>\n  </label>\n  <line>\n   <xstart>5</xstart>\n   <ystart>30</ystart>\n   <xend>745</xend>\n   <yend>30</yend>\n   <weight>2</weight>\n  </line>\n  <label>\n   <rect>\n    <x>400</x>\n    <y>0</y>\n    <width>40</width>\n    <height>15</height>\n   </rect>\n   <font>\n    <face>Arial</face>\n    <size>8</size>\n    <weight>normal</weight>\n   </font>\n   <hcenter/>\n   <vcenter/>\n   <string>UOM</string>\n  </label>\n  <label>\n   <rect>\n    <x>675</x>\n    <y>0</y>\n    <width>75</width>\n    <height>15</height>\n   </rect>\n   <font>\n    <face>Arial</face>\n    <size>8</size>\n    <weight>normal</weight>\n   </font>\n   <hcenter/>\n   <vcenter/>\n   <string>Expires</string>\n  </label>\n  <label>\n   <rect>\n    <x>75</x>\n    <y>15</y>\n    <width>228</width>\n    <height>15</height>\n   </rect>\n   <font>\n    <face>Arial</face>\n    <size>8</size>\n    <weight>normal</weight>\n   </font>\n   <left/>\n   <vcenter/>\n   <string>Item Description</string>\n  </label>\n  <label>\n   <rect>\n    <x>675</x>\n    <y>15</y>\n    <width>75</width>\n    <height>15</height>\n   </rect>\n   <font>\n    <face>Arial</face>\n    <size>8</size>\n    <weight>normal</weight>\n   </font>\n   <hcenter/>\n   <vcenter/>\n   <string>Issue Method</string>\n  </label>\n  <label>\n   <rect>\n    <x>600</x>\n    <y>0</y>\n    <width>75</width>\n    <height>15</height>\n   </rect>\n   <font>\n    <face>Arial</face>\n    <size>8</size>\n    <weight>normal</weight>\n   </font>\n   <hcenter/>\n   <vcenter/>\n   <string>Effective</string>\n  </label>\n  <label>\n   <rect>\n    <x>600</x>\n    <y>15</y>\n    <width>75</width>\n    <height>15</height>\n   </rect>\n   <font>\n    <face>Arial</face>\n    <size>8</size>\n    <weight>normal</weight>\n   </font>\n   <hcenter/>\n   <vcenter/>\n   <string>Create W/O</string>\n  </label>\n  <label>\n   <rect>\n    <x>5</x>\n    <y>0</y>\n    <width>65</width>\n    <height>15</height>\n   </rect>\n   <font>\n    <face>Arial</face>\n    <size>8</size>\n    <weight>normal</weight>\n   </font>\n   <hcenter/>\n   <vcenter/>\n   <string>BOO Seq. #</string>\n  </label>\n  <label>\n   <rect>\n    <x>300</x>\n    <y>0</y>\n    <width>75</width>\n    <height>15</height>\n   </rect>\n   <font>\n    <face>Arial</face>\n    <size>8</size>\n    <weight>normal</weight>\n   </font>\n   <hcenter/>\n   <vcenter/>\n   <string>Qty. Per</string>\n  </label>\n  <label>\n   <rect>\n    <x>525</x>\n    <y>0</y>\n    <width>75</width>\n    <height>15</height>\n   </rect>\n   <font>\n    <face>Arial</face>\n    <size>8</size>\n    <weight>normal</weight>\n   </font>\n   <hcenter/>\n   <vcenter/>\n   <string>Qty. Required</string>\n  </label>\n  <label>\n   <rect>\n    <x>443</x>\n    <y>0</y>\n    <width>75</width>\n    <height>15</height>\n   </rect>\n   <font>\n    <face>Arial</face>\n    <size>8</size>\n    <weight>normal</weight>\n   </font>\n   <hcenter/>\n   <vcenter/>\n   <string>Scrap</string>\n  </label>\n  <label>\n   <rect>\n    <x>75</x>\n    <y>0</y>\n    <width>228</width>\n    <height>15</height>\n   </rect>\n   <font>\n    <face>Arial</face>\n    <size>8</size>\n    <weight>normal</weight>\n   </font>\n   <left/>\n   <vcenter/>\n   <string>Component Item Number</string>\n  </label>\n </pghead>\n <section>\n  <name>detail</name>\n  <detail>\n   <key>\n    <query>detail</query>\n   </key>\n   <height>57</height>\n   <field>\n    <rect>\n     <x>675</x>\n     <y>15</y>\n     <width>75</width>\n     <height>15</height>\n    </rect>\n    <font>\n     <face>Arial</face>\n     <size>8</size>\n     <weight>bold</weight>\n    </font>\n    <hcenter/>\n    <vcenter/>\n    <data>\n     <query>detail</query>\n     <column>issuemethod</column>\n    </data>\n   </field>\n   <line>\n    <xstart>3</xstart>\n    <ystart>50</ystart>\n    <xend>745</xend>\n    <yend>50</yend>\n    <weight>0</weight>\n   </line>\n   <field>\n    <rect>\n     <x>315</x>\n     <y>0</y>\n     <width>75</width>\n     <height>15</height>\n    </rect>\n    <font>\n     <face>Arial</face>\n     <size>8</size>\n     <weight>bold</weight>\n    </font>\n    <right/>\n    <vcenter/>\n    <data>\n     <query>detail</query>\n     <column>qtyper</column>\n    </data>\n   </field>\n   <field>\n    <rect>\n     <x>75</x>\n     <y>0</y>\n     <width>228</width>\n     <height>15</height>\n    </rect>\n    <font>\n     <face>Arial</face>\n     <size>8</size>\n     <weight>bold</weight>\n    </font>\n    <left/>\n    <vcenter/>\n    <data>\n     <query>detail</query>\n     <column>item_number</column>\n    </data>\n   </field>\n   <field>\n    <rect>\n     <x>10</x>\n     <y>0</y>\n     <width>65</width>\n     <height>15</height>\n    </rect>\n    <font>\n     <face>Arial</face>\n     <size>8</size>\n     <weight>bold</weight>\n    </font>\n    <hcenter/>\n    <vcenter/>\n    <data>\n     <query>detail</query>\n     <column>booseqnumber</column>\n    </data>\n   </field>\n   <field>\n    <rect>\n     <x>443</x>\n     <y>0</y>\n     <width>75</width>\n     <height>15</height>\n    </rect>\n    <font>\n     <face>Arial</face>\n     <size>8</size>\n     <weight>bold</weight>\n    </font>\n    <right/>\n    <vcenter/>\n    <data>\n     <query>detail</query>\n     <column>scrap</column>\n    </data>\n   </field>\n   <field>\n    <rect>\n     <x>75</x>\n     <y>15</y>\n     <width>228</width>\n     <height>15</height>\n    </rect>\n    <font>\n     <face>Arial</face>\n     <size>8</size>\n     <weight>bold</weight>\n    </font>\n    <left/>\n    <vcenter/>\n    <data>\n     <query>detail</query>\n     <column>item_descrip1</column>\n    </data>\n   </field>\n   <field>\n    <rect>\n     <x>675</x>\n     <y>0</y>\n     <width>75</width>\n     <height>15</height>\n    </rect>\n    <font>\n     <face>Arial</face>\n     <size>8</size>\n     <weight>bold</weight>\n    </font>\n    <hcenter/>\n    <vcenter/>\n    <data>\n     <query>detail</query>\n     <column>expires</column>\n    </data>\n   </field>\n   <field>\n    <rect>\n     <x>10</x>\n     <y>15</y>\n     <width>65</width>\n     <height>15</height>\n    </rect>\n    <font>\n     <face>Arial</face>\n     <size>8</size>\n     <weight>bold</weight>\n    </font>\n    <hcenter/>\n    <vcenter/>\n    <data>\n     <query>detail</query>\n     <column>bomitem_seqnumber</column>\n    </data>\n   </field>\n   <field>\n    <rect>\n     <x>403</x>\n     <y>0</y>\n     <width>37</width>\n     <height>15</height>\n    </rect>\n    <font>\n     <face>Arial</face>\n     <size>8</size>\n     <weight>bold</weight>\n    </font>\n    <hcenter/>\n    <vcenter/>\n    <data>\n     <query>detail</query>\n     <column>item_invuom</column>\n    </data>\n   </field>\n   <field>\n    <rect>\n     <x>525</x>\n     <y>0</y>\n     <width>75</width>\n     <height>15</height>\n    </rect>\n    <font>\n     <face>Arial</face>\n     <size>8</size>\n     <weight>bold</weight>\n    </font>\n    <right/>\n    <vcenter/>\n    <data>\n     <query>detail</query>\n     <column>qtyreq</column>\n    </data>\n   </field>\n   <field>\n    <rect>\n     <x>600</x>\n     <y>0</y>\n     <width>75</width>\n     <height>15</height>\n    </rect>\n    <font>\n     <face>Arial</face>\n     <size>8</size>\n     <weight>bold</weight>\n    </font>\n    <hcenter/>\n    <vcenter/>\n    <data>\n     <query>detail</query>\n     <column>effective</column>\n    </data>\n   </field>\n   <field>\n    <rect>\n     <x>600</x>\n     <y>15</y>\n     <width>75</width>\n     <height>15</height>\n    </rect>\n    <font>\n     <face>Arial</face>\n     <size>8</size>\n     <weight>bold</weight>\n    </font>\n    <hcenter/>\n    <vcenter/>\n    <data>\n     <query>detail</query>\n     <column>createchild</column>\n    </data>\n   </field>\n   <field>\n    <rect>\n     <x>75</x>\n     <y>30</y>\n     <width>228</width>\n     <height>15</height>\n    </rect>\n    <font>\n     <face>Arial</face>\n     <size>8</size>\n     <weight>bold</weight>\n    </font>\n    <left/>\n    <vcenter/>\n    <data>\n     <query>detail</query>\n     <column>item_descrip2</column>\n    </data>\n   </field>\n  </detail>\n </section>\n <pgfoot>\n  <height>18</height>\n  <field>\n   <rect>\n    <x>95</x>\n    <y>0</y>\n    <width>100</width>\n    <height>15</height>\n   </rect>\n   <font>\n    <face>Arial</face>\n    <size>8</size>\n    <weight>bold</weight>\n   </font>\n   <left/>\n   <vcenter/>\n   <data>\n    <query>Context Query</query>\n    <column>report_date</column>\n   </data>\n  </field>\n  <label>\n   <rect>\n    <x>615</x>\n    <y>0</y>\n    <width>85</width>\n    <height>15</height>\n   </rect>\n   <font>\n    <face>Arial</face>\n    <size>8</size>\n    <weight>normal</weight>\n   </font>\n   <right/>\n   <vcenter/>\n   <string>Page:</string>\n  </label>\n  <label>\n   <rect>\n    <x>5</x>\n    <y>0</y>\n    <width>85</width>\n    <height>15</height>\n   </rect>\n   <font>\n    <face>Arial</face>\n    <size>8</size>\n    <weight>normal</weight>\n   </font>\n   <right/>\n   <vcenter/>\n   <string>Report Date:</string>\n  </label>\n  <field>\n   <rect>\n    <x>705</x>\n    <y>0</y>\n    <width>40</width>\n    <height>15</height>\n   </rect>\n   <font>\n    <face>Arial</face>\n    <size>8</size>\n    <weight>bold</weight>\n   </font>\n   <left/>\n   <vcenter/>\n   <data>\n    <query>Context Query</query>\n    <column>page_number</column>\n   </data>\n  </field>\n </pgfoot>\n</report>\n	\N	0	2008-08-08 12:40:01.283663
415	AROpenItem	\N	<!DOCTYPE openRPTDef>\n<report>\n <title>AROpenItem</title>\n <name>AROpenItem</name>\n <description>A report showing details of a single AR Open Item</description>\n <parameter default="-1" active="true" listtype="static" type="integer" name="aropen_id">\n  <description></description>\n </parameter>\n <parameter default="-1" active="false" listtype="static" type="integer" name="docTypeID">\n  <description></description>\n </parameter>\n <parameter default="-1" active="true" listtype="static" type="integer" name="docTypeRC">\n  <description></description>\n </parameter>\n <grid>\n  <snap/>\n  <show/>\n  <x>0.05</x>\n  <y>0.05</y>\n </grid>\n <size>Letter</size>\n <portrait/>\n <topmargin>50</topmargin>\n <bottommargin>50</bottommargin>\n <rightmargin>50</rightmargin>\n <leftmargin>50</leftmargin>\n <querysource>\n  <name>head</name>\n  <sql>SELECT aropen_cust_id, aropen_docdate, aropen_duedate, \naropen_doctype,\nCASE WHEN (aropen_doctype = 'C' AND ((SELECT COUNT(*) AS num_rows FROM cmhead, aropen WHERE cmhead_number = aropen_ordernumber AND aropen_id = &lt;? value("aropen_id") ?> ) = 0)) THEN 'Misc. Credit Memo'\n     WHEN (aropen_doctype = 'D' AND ((SELECT COUNT(*) AS num_rows FROM cmhead, aropen WHERE cmhead_number = aropen_ordernumber AND aropen_id = &lt;? value("aropen_id") ?> ) = 0)) THEN 'Misc. Debit Memo'\n     WHEN (aropen_doctype = 'C' AND ((SELECT COUNT(*) AS num_rows FROM cmhead, aropen WHERE cmhead_number = aropen_ordernumber AND aropen_id = &lt;? value("aropen_id") ?> ) > 0)) THEN 'Credit Memo'\n     WHEN (aropen_doctype = 'D' AND ((SELECT COUNT(*) AS num_rows FROM cmhead, aropen WHERE cmhead_number = aropen_ordernumber AND aropen_id = &lt;? value("aropen_id") ?> ) > 0)) THEN 'Debit Memo'\n     END AS doc_name, \naropen_docnumber, \naropen_ordernumber, aropen_journalnumber, \naropen_amount, aropen_amount, \naropen_paid, \n(aropen_amount - aropen_paid) AS f_balance, \naropen_terms_id, aropen_salesrep_id, \naropen_commission_due, \naropen_notes, aropen_rsncode_id, aropen_salescat_id, \naropen_accnt_id, aropen_curr_id, cust_name, salesrep_name, terms_code, \nrsncode_code, formatboolyn(aropen_commission_paid) AS commission_paid \nFROM aropen \nJOIN custinfo ON(cust_id = aropen_cust_id)\nLEFT OUTER JOIN salesrep ON(aropen_salesrep_id = salesrep_id)\nLEFT OUTER JOIN terms ON(terms_id = aropen_terms_id)\nLEFT OUTER JOIN rsncode ON(rsncode_id = aropen_rsncode_id)\nWHERE (aropen_id=&lt;? value("aropen_id") ?>)</sql>\n </querysource>\n <querysource>\n  <name>applications</name>\n  <sql>&lt;? if exists("docTypeID") ?>\nSELECT arapply_id, arapply_source_aropen_id,\n     CASE WHEN (arapply_source_doctype = 'C') THEN &lt;? value("creditMemo") ?>\n       WHEN (arapply_source_doctype = 'R') THEN &lt;? value("cashdeposit") ?>\n       WHEN (arapply_fundstype='C') THEN &lt;? value("check") ?>\n       WHEN (arapply_fundstype='T') THEN &lt;? value("certifiedCheck") ?>\n       WHEN (arapply_fundstype='M') THEN &lt;? value("masterCard") ?>\n       WHEN (arapply_fundstype='V') THEN &lt;? value("visa") ?>\n       WHEN (arapply_fundstype='A') THEN &lt;? value("americanExpress") ?>\n       WHEN (arapply_fundstype='D') THEN &lt;? value("discoverCard") ?>       \n       WHEN (arapply_fundstype='R') THEN &lt;? value("otherCreditCard") ?>\n       WHEN (arapply_fundstype='K') THEN &lt;? value("cash") ?>\n       WHEN (arapply_fundstype='W') THEN &lt;? value("wireTransfer") ?>\n       WHEN (arapply_fundstype='O') THEN &lt;? value("other") ?>\n     END AS doctype,\n     CASE WHEN (arapply_source_doctype IN ('C','R')) THEN arapply_source_docnumber\n     WHEN (arapply_source_doctype = 'K') THEN arapply_refnumber\n     ELSE 'Other'\n     END AS docnumber,\narapply_postdate, arapply_applied, \ncurrConcat(arapply_curr_id) AS currabbr, \ncurrToBase(arapply_curr_id, arapply_applied, arapply_postdate) AS baseapplied, \n'curr' AS arapply_applied_xtnumericrole, \n'curr' AS baseapplied_xtnumericrole \nFROM arapply \nWHERE (arapply_target_aropen_id=&lt;? value("aropen_id") ?> ) \nORDER BY arapply_postdate\n\n&lt;? elseif exists("docTypeRC") ?>\n\nSELECT arapply_id, arapply_target_aropen_id, \n     CASE WHEN (arapply_target_doctype = 'I') THEN &lt;? value("invoice") ?>\n      WHEN (arapply_target_doctype = 'D') THEN &lt;? value("debitMemo") ?>\n      WHEN (arapply_target_doctype = 'K') THEN &lt;? value("apcheck") ?>\n      WHEN (arapply_target_doctype = 'R') THEN &lt;? value("cashreceipt") ?>\n      ELSE &lt;? value("other") ?>\n     END AS doctype, \narapply_target_docnumber AS docnumber, \narapply_postdate, arapply_applied, \ncurrConcat(arapply_curr_id) AS currabbr, \ncurrToBase(arapply_curr_id, arapply_applied, arapply_postdate) AS baseapplied, \n'curr' AS arapply_applied_xtnumericrole, \n'curr' AS baseapplied_xtnumericrole \nFROM arapply \nWHERE (arapply_source_aropen_id=&lt;? value("aropen_id") ?> )\nORDER BY arapply_postdate\n\n&lt;? endif ?></sql>\n </querysource>\n <rpthead>\n  <height>445</height>\n  <field>\n   <rect>\n    <x>530</x>\n    <y>160</y>\n    <width>196</width>\n    <height>25</height>\n   </rect>\n   <font>\n    <face>Sans Serif</face>\n    <size>10</size>\n    <weight>normal</weight>\n   </font>\n   <left/>\n   <top/>\n   <data>\n    <query>head</query>\n    <column>aropen_paid</column>\n   </data>\n  </field>\n  <field>\n   <rect>\n    <x>530</x>\n    <y>185</y>\n    <width>195</width>\n    <height>25</height>\n   </rect>\n   <font>\n    <face>Sans Serif</face>\n    <size>10</size>\n    <weight>normal</weight>\n   </font>\n   <left/>\n   <top/>\n   <data>\n    <query>head</query>\n    <column>f_balance</column>\n   </data>\n  </field>\n  <field>\n   <rect>\n    <x>140</x>\n    <y>70</y>\n    <width>201</width>\n    <height>25</height>\n   </rect>\n   <font>\n    <face>Sans Serif</face>\n    <size>10</size>\n    <weight>normal</weight>\n   </font>\n   <left/>\n   <top/>\n   <data>\n    <query>head</query>\n    <column>aropen_docdate</column>\n   </data>\n  </field>\n  <label>\n   <rect>\n    <x>5</x>\n    <y>45</y>\n    <width>126.032</width>\n    <height>18.3</height>\n   </rect>\n   <font>\n    <face>Sans Serif</face>\n    <size>10</size>\n    <weight>normal</weight>\n   </font>\n   <right/>\n   <top/>\n   <string>Customer:</string>\n  </label>\n  <label>\n   <rect>\n    <x>-10</x>\n    <y>185</y>\n    <width>142</width>\n    <height>25</height>\n   </rect>\n   <font>\n    <face>Sans Serif</face>\n    <size>10</size>\n    <weight>normal</weight>\n   </font>\n   <right/>\n   <top/>\n   <string>Order Number:</string>\n  </label>\n  <label>\n   <rect>\n    <x>30</x>\n    <y>90</y>\n    <width>100</width>\n    <height>25</height>\n   </rect>\n   <font>\n    <face>Sans Serif</face>\n    <size>10</size>\n    <weight>normal</weight>\n   </font>\n   <right/>\n   <top/>\n   <string>Due Date:</string>\n  </label>\n  <field>\n   <rect>\n    <x>140</x>\n    <y>235</y>\n    <width>250</width>\n    <height>25</height>\n   </rect>\n   <font>\n    <face>Sans Serif</face>\n    <size>10</size>\n    <weight>normal</weight>\n   </font>\n   <left/>\n   <top/>\n   <data>\n    <query>head</query>\n    <column>rsncode_code</column>\n   </data>\n  </field>\n  <label>\n   <rect>\n    <x>430</x>\n    <y>90</y>\n    <width>95.8</width>\n    <height>19.6</height>\n   </rect>\n   <font>\n    <face>Sans Serif</face>\n    <size>10</size>\n    <weight>normal</weight>\n   </font>\n   <right/>\n   <top/>\n   <string>Sales Rep.:</string>\n  </label>\n  <label>\n   <rect>\n    <x>460</x>\n    <y>70</y>\n    <width>66.5</width>\n    <height>18.4</height>\n   </rect>\n   <font>\n    <face>Sans Serif</face>\n    <size>10</size>\n    <weight>normal</weight>\n   </font>\n   <right/>\n   <top/>\n   <string>Terms:</string>\n  </label>\n  <field>\n   <rect>\n    <x>530</x>\n    <y>135</y>\n    <width>216</width>\n    <height>25</height>\n   </rect>\n   <font>\n    <face>Sans Serif</face>\n    <size>10</size>\n    <weight>normal</weight>\n   </font>\n   <left/>\n   <top/>\n   <data>\n    <query>head</query>\n    <column>aropen_amount</column>\n   </data>\n  </field>\n  <field>\n   <rect>\n    <x>535</x>\n    <y>70</y>\n    <width>210</width>\n    <height>25</height>\n   </rect>\n   <font>\n    <face>Sans Serif</face>\n    <size>10</size>\n    <weight>normal</weight>\n   </font>\n   <left/>\n   <top/>\n   <data>\n    <query>head</query>\n    <column>terms_code</column>\n   </data>\n  </field>\n  <label>\n   <rect>\n    <x>440</x>\n    <y>185</y>\n    <width>82</width>\n    <height>18.2</height>\n   </rect>\n   <font>\n    <face>Sans Serif</face>\n    <size>10</size>\n    <weight>normal</weight>\n   </font>\n   <right/>\n   <top/>\n   <string>Balance:</string>\n  </label>\n  <label>\n   <rect>\n    <x>-20</x>\n    <y>160</y>\n    <width>152</width>\n    <height>25</height>\n   </rect>\n   <font>\n    <face>Sans Serif</face>\n    <size>10</size>\n    <weight>normal</weight>\n   </font>\n   <right/>\n   <top/>\n   <string>Document Number:</string>\n  </label>\n  <field>\n   <rect>\n    <x>140</x>\n    <y>160</y>\n    <width>210</width>\n    <height>25</height>\n   </rect>\n   <font>\n    <face>Sans Serif</face>\n    <size>10</size>\n    <weight>normal</weight>\n   </font>\n   <left/>\n   <top/>\n   <data>\n    <query>head</query>\n    <column>aropen_docnumber</column>\n   </data>\n  </field>\n  <field>\n   <rect>\n    <x>140</x>\n    <y>90</y>\n    <width>216</width>\n    <height>25</height>\n   </rect>\n   <font>\n    <face>Sans Serif</face>\n    <size>10</size>\n    <weight>normal</weight>\n   </font>\n   <left/>\n   <top/>\n   <data>\n    <query>head</query>\n    <column>aropen_duedate</column>\n   </data>\n  </field>\n  <field>\n   <rect>\n    <x>140</x>\n    <y>45</y>\n    <width>432.315</width>\n    <height>25</height>\n   </rect>\n   <font>\n    <face>Sans Serif</face>\n    <size>10</size>\n    <weight>normal</weight>\n   </font>\n   <left/>\n   <top/>\n   <data>\n    <query>head</query>\n    <column>cust_name</column>\n   </data>\n  </field>\n  <label>\n   <rect>\n    <x>-15</x>\n    <y>70</y>\n    <width>143.191</width>\n    <height>25</height>\n   </rect>\n   <font>\n    <face>Sans Serif</face>\n    <size>10</size>\n    <weight>normal</weight>\n   </font>\n   <right/>\n   <top/>\n   <string>Document Date:</string>\n  </label>\n  <label>\n   <rect>\n    <x>-15</x>\n    <y>235</y>\n    <width>146</width>\n    <height>25</height>\n   </rect>\n   <font>\n    <face>Sans Serif</face>\n    <size>10</size>\n    <weight>normal</weight>\n   </font>\n   <right/>\n   <top/>\n   <string>Reason Code:</string>\n  </label>\n  <label>\n   <rect>\n    <x>390</x>\n    <y>210</y>\n    <width>131</width>\n    <height>18.8</height>\n   </rect>\n   <font>\n    <face>Sans Serif</face>\n    <size>10</size>\n    <weight>normal</weight>\n   </font>\n   <right/>\n   <top/>\n   <string>Commission Due:</string>\n  </label>\n  <field>\n   <rect>\n    <x>140</x>\n    <y>135</y>\n    <width>175</width>\n    <height>25</height>\n   </rect>\n   <font>\n    <face>Sans Serif</face>\n    <size>10</size>\n    <weight>normal</weight>\n   </font>\n   <left/>\n   <top/>\n   <data>\n    <query>head</query>\n    <column>aropen_doctype</column>\n   </data>\n  </field>\n  <field>\n   <rect>\n    <x>87.7597</x>\n    <y>271.717</y>\n    <width>624</width>\n    <height>127.611</height>\n   </rect>\n   <font>\n    <face>Sans Serif</face>\n    <size>10</size>\n    <weight>normal</weight>\n   </font>\n   <wordwrap/>\n   <left/>\n   <top/>\n   <data>\n    <query>head</query>\n    <column>aropen_notes</column>\n   </data>\n  </field>\n  <field>\n   <rect>\n    <x>140</x>\n    <y>210</y>\n    <width>177</width>\n    <height>25</height>\n   </rect>\n   <font>\n    <face>Sans Serif</face>\n    <size>10</size>\n    <weight>normal</weight>\n   </font>\n   <left/>\n   <top/>\n   <data>\n    <query>head</query>\n    <column>aropen_journalnumber</column>\n   </data>\n  </field>\n  <label>\n   <rect>\n    <x>0</x>\n    <y>135</y>\n    <width>133</width>\n    <height>25</height>\n   </rect>\n   <font>\n    <face>Sans Serif</face>\n    <size>10</size>\n    <weight>normal</weight>\n   </font>\n   <right/>\n   <top/>\n   <string>Document Type:</string>\n  </label>\n  <field>\n   <rect>\n    <x>530</x>\n    <y>235</y>\n    <width>199</width>\n    <height>25</height>\n   </rect>\n   <font>\n    <face>Sans Serif</face>\n    <size>10</size>\n    <weight>normal</weight>\n   </font>\n   <left/>\n   <top/>\n   <data>\n    <query>head</query>\n    <column>commission_paid</column>\n   </data>\n  </field>\n  <label>\n   <rect>\n    <x>435</x>\n    <y>135</y>\n    <width>86.4</width>\n    <height>17.2</height>\n   </rect>\n   <font>\n    <face>Sans Serif</face>\n    <size>10</size>\n    <weight>normal</weight>\n   </font>\n   <right/>\n   <top/>\n   <string>Amount:</string>\n  </label>\n  <label>\n   <rect>\n    <x>470</x>\n    <y>160</y>\n    <width>52.6</width>\n    <height>19.9</height>\n   </rect>\n   <font>\n    <face>Sans Serif</face>\n    <size>10</size>\n    <weight>normal</weight>\n   </font>\n   <right/>\n   <top/>\n   <string>Paid:</string>\n  </label>\n  <field>\n   <rect>\n    <x>535</x>\n    <y>90</y>\n    <width>210</width>\n    <height>25</height>\n   </rect>\n   <font>\n    <face>Sans Serif</face>\n    <size>10</size>\n    <weight>normal</weight>\n   </font>\n   <left/>\n   <top/>\n   <data>\n    <query>head</query>\n    <column>salesrep_name</column>\n   </data>\n  </field>\n  <label>\n   <rect>\n    <x>390</x>\n    <y>235</y>\n    <width>132</width>\n    <height>20.8</height>\n   </rect>\n   <font>\n    <face>Sans Serif</face>\n    <size>10</size>\n    <weight>normal</weight>\n   </font>\n   <right/>\n   <top/>\n   <string>Commission Paid:</string>\n  </label>\n  <field>\n   <rect>\n    <x>530</x>\n    <y>210</y>\n    <width>198</width>\n    <height>25</height>\n   </rect>\n   <font>\n    <face>Sans Serif</face>\n    <size>10</size>\n    <weight>normal</weight>\n   </font>\n   <left/>\n   <top/>\n   <data>\n    <query>head</query>\n    <column>aropen_commission_due</column>\n   </data>\n  </field>\n  <field>\n   <rect>\n    <x>140</x>\n    <y>185</y>\n    <width>176</width>\n    <height>25</height>\n   </rect>\n   <font>\n    <face>Sans Serif</face>\n    <size>10</size>\n    <weight>normal</weight>\n   </font>\n   <left/>\n   <top/>\n   <data>\n    <query>head</query>\n    <column>aropen_ordernumber</column>\n   </data>\n  </field>\n  <label>\n   <rect>\n    <x>20.3924</x>\n    <y>267.207</y>\n    <width>100</width>\n    <height>25</height>\n   </rect>\n   <font>\n    <face>Sans Serif</face>\n    <size>10</size>\n    <weight>bold</weight>\n   </font>\n   <left/>\n   <top/>\n   <string>Notes:</string>\n  </label>\n  <label>\n   <rect>\n    <x>-35</x>\n    <y>210</y>\n    <width>166</width>\n    <height>25</height>\n   </rect>\n   <font>\n    <face>Sans Serif</face>\n    <size>10</size>\n    <weight>normal</weight>\n   </font>\n   <right/>\n   <top/>\n   <string>Journal Number:</string>\n  </label>\n  <label>\n   <rect>\n    <x>9</x>\n    <y>417.355</y>\n    <width>100</width>\n    <height>20</height>\n   </rect>\n   <font>\n    <face>Sans Serif</face>\n    <size>12</size>\n    <weight>normal</weight>\n   </font>\n   <left/>\n   <top/>\n   <string>Doc Type</string>\n  </label>\n  <label>\n   <rect>\n    <x>125</x>\n    <y>417.355</y>\n    <width>110</width>\n    <height>20</height>\n   </rect>\n   <font>\n    <face>Sans Serif</face>\n    <size>12</size>\n    <weight>normal</weight>\n   </font>\n   <left/>\n   <top/>\n   <string>Doc Number</string>\n  </label>\n  <label>\n   <rect>\n    <x>242</x>\n    <y>416.355</y>\n    <width>100</width>\n    <height>21</height>\n   </rect>\n   <font>\n    <face>Sans Serif</face>\n    <size>12</size>\n    <weight>normal</weight>\n   </font>\n   <left/>\n   <top/>\n   <string>Apply Date</string>\n  </label>\n  <label>\n   <rect>\n    <x>351</x>\n    <y>417.355</y>\n    <width>100</width>\n    <height>20</height>\n   </rect>\n   <font>\n    <face>Sans Serif</face>\n    <size>12</size>\n    <weight>normal</weight>\n   </font>\n   <left/>\n   <top/>\n   <string>Amount</string>\n  </label>\n  <label>\n   <rect>\n    <x>470</x>\n    <y>417.355</y>\n    <width>100</width>\n    <height>20</height>\n   </rect>\n   <font>\n    <face>Sans Serif</face>\n    <size>12</size>\n    <weight>normal</weight>\n   </font>\n   <left/>\n   <top/>\n   <string>Currency</string>\n  </label>\n  <label>\n   <rect>\n    <x>608</x>\n    <y>418.355</y>\n    <width>120</width>\n    <height>19</height>\n   </rect>\n   <font>\n    <face>Sans Serif</face>\n    <size>12</size>\n    <weight>normal</weight>\n   </font>\n   <left/>\n   <top/>\n   <string>Base Amount</string>\n  </label>\n  <line>\n   <xstart>4</xstart>\n   <ystart>434</ystart>\n   <xend>737</xend>\n   <yend>434</yend>\n   <weight>2</weight>\n  </line>\n  <field>\n   <rect>\n    <x>30.7855</x>\n    <y>9.22414</y>\n    <width>698.682</width>\n    <height>37.1</height>\n   </rect>\n   <font>\n    <face>Sans Serif</face>\n    <size>20</size>\n    <weight>bold</weight>\n   </font>\n   <right/>\n   <top/>\n   <data>\n    <query>head</query>\n    <column>doc_name</column>\n   </data>\n  </field>\n </rpthead>\n <section>\n  <name>applications_detail</name>\n  <detail>\n   <key>\n    <query>applications</query>\n   </key>\n   <height>23</height>\n   <field>\n    <rect>\n     <x>8</x>\n     <y>1.71311</y>\n     <width>100</width>\n     <height>25</height>\n    </rect>\n    <font>\n     <face>Sans Serif</face>\n     <size>12</size>\n     <weight>normal</weight>\n    </font>\n    <left/>\n    <top/>\n    <data>\n     <query>applications</query>\n     <column>doctype</column>\n    </data>\n   </field>\n   <field>\n    <rect>\n     <x>124</x>\n     <y>1.71311</y>\n     <width>100</width>\n     <height>25</height>\n    </rect>\n    <font>\n     <face>Sans Serif</face>\n     <size>12</size>\n     <weight>normal</weight>\n    </font>\n    <left/>\n    <top/>\n    <data>\n     <query>applications</query>\n     <column>docnumber</column>\n    </data>\n   </field>\n   <field>\n    <rect>\n     <x>241</x>\n     <y>1.71311</y>\n     <width>100</width>\n     <height>25</height>\n    </rect>\n    <font>\n     <face>Sans Serif</face>\n     <size>12</size>\n     <weight>normal</weight>\n    </font>\n    <left/>\n    <top/>\n    <data>\n     <query>applications</query>\n     <column>arapply_postdate</column>\n    </data>\n   </field>\n   <field>\n    <rect>\n     <x>352</x>\n     <y>1.71311</y>\n     <width>100</width>\n     <height>25</height>\n    </rect>\n    <font>\n     <face>Sans Serif</face>\n     <size>12</size>\n     <weight>normal</weight>\n    </font>\n    <left/>\n    <top/>\n    <data>\n     <query>applications</query>\n     <column>arapply_applied</column>\n    </data>\n   </field>\n   <field>\n    <rect>\n     <x>474</x>\n     <y>1.71311</y>\n     <width>100</width>\n     <height>25</height>\n    </rect>\n    <font>\n     <face>Sans Serif</face>\n     <size>12</size>\n     <weight>normal</weight>\n    </font>\n    <left/>\n    <top/>\n    <data>\n     <query>applications</query>\n     <column>currabbr</column>\n    </data>\n   </field>\n   <field>\n    <rect>\n     <x>611</x>\n     <y>1.71311</y>\n     <width>100</width>\n     <height>25</height>\n    </rect>\n    <font>\n     <face>Sans Serif</face>\n     <size>12</size>\n     <weight>normal</weight>\n    </font>\n    <left/>\n    <top/>\n    <data>\n     <query>applications</query>\n     <column>baseapplied</column>\n    </data>\n   </field>\n  </detail>\n </section>\n</report>\n	A report showing details of a single AR Open Item	0	2015-10-01 17:14:33.361434
290	CashReceipts	\N	<!DOCTYPE openRPTDef>\n<report>\n <title>Cash Receipts</title>\n <name>CashReceipts</name>\n <description></description>\n <grid>\n  <snap/>\n  <show/>\n  <x>0.05</x>\n  <y>0.05</y>\n </grid>\n <size>Letter</size>\n <portrait/>\n <topmargin>50</topmargin>\n <bottommargin>50</bottommargin>\n <rightmargin>50</rightmargin>\n <leftmargin>50</leftmargin>\n <querysource>\n  <name>head</name>\n  <sql>SELECT &lt;? if exists("cust_id") ?>\n         (SELECT (cust_number || '-' || cust_name)\n            FROM custinfo\n           WHERE (cust_id=&lt;? value("cust_id") ?>) )\n       &lt;? elseif exists("custtype_id") ?>\n         (select (custtype_code||'-'||custtype_descrip)\n            FROM custtype\n           WHERE (custtype_id=&lt;? value("custtype_id") ?>) )\n       &lt;? elseif exists("custtype_pattern") ?>\n         text(&lt;? value("custtype_pattern") ?>)\n       &lt;? else ?>\n         text('All Customers')\n       &lt;? endif ?>\n       AS f_value,\n       &lt;? if exists("custtype_id") ?>\n         text('Cust. Type:')\n       &lt;? elseif exists("custtype_pattern") ?>\n         text('Cust. Type Pattern:')\n       &lt;? else ?>\n         text('Customer:')\n       &lt;? endif ?>\n       AS f_label,\n       formatDate(&lt;? value("startDate") ?>, 'Earliest') AS startdate,\n       formatDate(&lt;? value("endDate") ?>, 'Latest') AS enddate;</sql>\n </querysource>\n <querysource loadFromDb="true">\n  <name>detail</name>\n  <mqlgroup>cashReceipts</mqlgroup>\n  <mqlname>detail</mqlname>\n </querysource>\n <querysource>\n  <name>foot</name>\n  <sql>SELECT formatMoney(SUM(base_applied)) AS f_base_applied_total\nFROM (\n&lt;? if exists("LegacyDisplayMode") ?>\n-- Posted cash receipts\nSELECT  currtobase(arapply_curr_id,arapply_applied,arapply_postdate) AS base_applied\nFROM custinfo LEFT OUTER JOIN custgrpitem ON (custgrpitem_cust_id=cust_id), arapply\nWHERE ( (arapply_cust_id=cust_id)\n  AND   (arapply_postdate BETWEEN &lt;? value("startDate") ?> AND &lt;? value("endDate") ?>)\n  AND   (arapply_source_doctype ='K')\n&lt;? if exists("cust_id") ?>\n  AND   (cust_id=&lt;? value("cust_id") ?>)\n&lt;? elseif exists("custtype_id") ?>\n  AND   (cust_custtype_id=&lt;? value("custtype_id") ?>)\n&lt;? elseif exists("custgrp_id") ?>\n  AND   (custgrpitem_custgrp_id=&lt;? value("custgrp_id") ?>)\n&lt;? elseif exists("custtype_pattern") ?>\n  AND   (cust_custtype_id IN (SELECT custtype_id FROM custtype WHERE (custtype_code ~ &lt;? value("custtype_pattern") ?>)))\n&lt;? endif ?>\n      )\n\n-- Unposted cash receipts\nUNION ALL\nSELECT currtobase(cashrcpt_curr_id,cashrcpt_amount,cashrcpt_distdate) AS base_applied\nFROM cashrcpt, custinfo LEFT OUTER JOIN custgrpitem ON (custgrpitem_cust_id=cust_id)\nWHERE ( (NOT cashrcpt_posted)\n  AND   (cashrcpt_cust_id=cust_id)\n  AND   (cashrcpt_distdate BETWEEN &lt;? value("startDate") ?> AND &lt;? value("endDate") ?>)\n&lt;? if exists("cust_id") ?>\n  AND   (cust_id=&lt;? value("cust_id") ?>)\n&lt;? elseif exists("custtype_id") ?>\n  AND   (cust_custtype_id=&lt;? value("custtype_id") ?>)\n&lt;? elseif exists("custgrp_id") ?>\n  AND   (custgrpitem_custgrp_id=&lt;? value("custgrp_id") ?>)\n&lt;? elseif exists("custtype_pattern") ?>\n  AND   (cust_custtype_id IN (SELECT custtype_id FROM custtype WHERE (custtype_code ~ &lt;? value("custtype_pattern") ?>)))\n&lt;? endif ?>\n      )\n\n-- Cash Advance\nUNION ALL\nSELECT aropen_amount / aropen_curr_rate AS base_applied\nFROM custinfo LEFT OUTER JOIN custgrpitem ON (custgrpitem_cust_id=cust_id), aropen\n  JOIN cashrcptitem ON (aropen_id=cashrcptitem_aropen_id)\nWHERE ( (aropen_cust_id=cust_id)\n  AND   (aropen_doctype IN ('R','C'))\n  AND   (aropen_docdate BETWEEN &lt;? value("startDate") ?> AND &lt;? value("endDate") ?>)\n&lt;? if exists("cust_id") ?>\n  AND   (cust_id=&lt;? value("cust_id") ?>)\n&lt;? elseif exists("custtype_id") ?>\n  AND   (cust_custtype_id=&lt;? value("custtype_id") ?>)\n&lt;? elseif exists("custgrp_id") ?>\n  AND   (custgrpitem_custgrp_id=&lt;? value("custgrp_id") ?>)\n&lt;? elseif exists("custtype_pattern") ?>\n  AND   (cust_custtype_id IN (SELECT custtype_id FROM custtype WHERE (custtype_code ~ &lt;? value("custtype_pattern") ?>)))\n&lt;? endif ?>\n      )\n&lt;? else ?>\n-- New mode\nSELECT (cashrcpt_amount / cashrcpt_curr_rate) AS base_applied\nFROM cashrcpt JOIN custinfo ON (cust_id=cashrcpt_cust_id)\n&lt;? if exists("custgrp_id") ?>\n LEFT OUTER JOIN custgrpitem ON (custgrpitem_cust_id=cust_id)\n&lt;? endif ?>\nWHERE ( (cashrcpt_distdate BETWEEN &lt;? value("startDate") ?> AND &lt;? value("endDate") ?>)\n&lt;? if exists("cust_id") ?>\n  AND   (cust_id=&lt;? value("cust_id") ?>)\n&lt;? elseif exists("custtype_id") ?>\n  AND   (cust_custtype_id=&lt;? value("custtype_id") ?>)\n&lt;? elseif exists("custgrp_id") ?>\n  AND   (custgrpitem_custgrp_id=&lt;? value("custgrp_id") ?>)\n&lt;? elseif exists("custtype_pattern") ?>\n  AND   (cust_custtype_id IN (SELECT custtype_id FROM custtype WHERE (custtype_code ~ &lt;? value("custtype_pattern") ?>)))\n&lt;? endif ?>\n      )\n&lt;? endif ?>\n) data\n;\n</sql>\n </querysource>\n <rpthead>\n  <height>146</height>\n  <field>\n   <rect>\n    <x>10</x>\n    <y>65</y>\n    <width>125</width>\n    <height>20</height>\n   </rect>\n   <font>\n    <face>Arial</face>\n    <size>10</size>\n    <weight>normal</weight>\n   </font>\n   <right/>\n   <vcenter/>\n   <data>\n    <query>head</query>\n    <column>f_label</column>\n   </data>\n  </field>\n  <label>\n   <rect>\n    <x>5</x>\n    <y>125</y>\n    <width>80</width>\n    <height>15</height>\n   </rect>\n   <font>\n    <face>Arial</face>\n    <size>8</size>\n    <weight>normal</weight>\n   </font>\n   <left/>\n   <vcenter/>\n   <string>Cust. #</string>\n  </label>\n  <label>\n   <rect>\n    <x>410</x>\n    <y>126</y>\n    <width>85</width>\n    <height>15</height>\n   </rect>\n   <font>\n    <face>Arial</face>\n    <size>8</size>\n    <weight>normal</weight>\n   </font>\n   <hcenter/>\n   <vcenter/>\n   <string>Target</string>\n  </label>\n  <field>\n   <rect>\n    <x>140</x>\n    <y>65</y>\n    <width>300</width>\n    <height>20</height>\n   </rect>\n   <font>\n    <face>Arial</face>\n    <size>10</size>\n    <weight>bold</weight>\n   </font>\n   <left/>\n   <vcenter/>\n   <data>\n    <query>head</query>\n    <column>f_value</column>\n   </data>\n  </field>\n  <field>\n   <rect>\n    <x>565</x>\n    <y>85</y>\n    <width>100</width>\n    <height>20</height>\n   </rect>\n   <font>\n    <face>Arial</face>\n    <size>10</size>\n    <weight>bold</weight>\n   </font>\n   <left/>\n   <vcenter/>\n   <data>\n    <query>head</query>\n    <column>enddate</column>\n   </data>\n  </field>\n  <label>\n   <rect>\n    <x>458</x>\n    <y>65</y>\n    <width>100</width>\n    <height>18</height>\n   </rect>\n   <font>\n    <face>Arial</face>\n    <size>10</size>\n    <weight>normal</weight>\n   </font>\n   <right/>\n   <vcenter/>\n   <string>Start Date:</string>\n  </label>\n  <label>\n   <rect>\n    <x>100</x>\n    <y>125</y>\n    <width>100</width>\n    <height>15</height>\n   </rect>\n   <font>\n    <face>Arial</face>\n    <size>8</size>\n    <weight>normal</weight>\n   </font>\n   <left/>\n   <vcenter/>\n   <string>Customer Name</string>\n  </label>\n  <line>\n   <xstart>5</xstart>\n   <ystart>140</ystart>\n   <xend>745</xend>\n   <yend>140</yend>\n   <weight>2</weight>\n  </line>\n  <field>\n   <rect>\n    <x>565</x>\n    <y>65</y>\n    <width>100</width>\n    <height>20</height>\n   </rect>\n   <font>\n    <face>Arial</face>\n    <size>10</size>\n    <weight>bold</weight>\n   </font>\n   <left/>\n   <vcenter/>\n   <data>\n    <query>head</query>\n    <column>startdate</column>\n   </data>\n  </field>\n  <label>\n   <rect>\n    <x>500</x>\n    <y>126</y>\n    <width>100</width>\n    <height>15</height>\n   </rect>\n   <font>\n    <face>Arial</face>\n    <size>8</size>\n    <weight>normal</weight>\n   </font>\n   <hcenter/>\n   <vcenter/>\n   <string>Amount</string>\n  </label>\n  <label>\n   <rect>\n    <x>210</x>\n    <y>126</y>\n    <width>80</width>\n    <height>15</height>\n   </rect>\n   <font>\n    <face>Arial</face>\n    <size>8</size>\n    <weight>normal</weight>\n   </font>\n   <hcenter/>\n   <vcenter/>\n   <string>Date</string>\n  </label>\n  <label>\n   <rect>\n    <x>595</x>\n    <y>126</y>\n    <width>45</width>\n    <height>15</height>\n   </rect>\n   <font>\n    <face>Arial</face>\n    <size>8</size>\n    <weight>normal</weight>\n   </font>\n   <hcenter/>\n   <vcenter/>\n   <string>Currency</string>\n  </label>\n  <label>\n   <rect>\n    <x>458</x>\n    <y>85</y>\n    <width>100</width>\n    <height>18</height>\n   </rect>\n   <font>\n    <face>Arial</face>\n    <size>10</size>\n    <weight>normal</weight>\n   </font>\n   <right/>\n   <vcenter/>\n   <string>End Date:</string>\n  </label>\n  <label>\n   <rect>\n    <x>300</x>\n    <y>126</y>\n    <width>80</width>\n    <height>15</height>\n   </rect>\n   <font>\n    <face>Arial</face>\n    <size>8</size>\n    <weight>normal</weight>\n   </font>\n   <hcenter/>\n   <vcenter/>\n   <string>Source</string>\n  </label>\n  <label>\n   <rect>\n    <x>640</x>\n    <y>126</y>\n    <width>100</width>\n    <height>15</height>\n   </rect>\n   <font>\n    <face>Arial</face>\n    <size>8</size>\n    <weight>normal</weight>\n   </font>\n   <hcenter/>\n   <vcenter/>\n   <string>Base Amount</string>\n  </label>\n  <label>\n   <rect>\n    <x>270</x>\n    <y>3.13521</y>\n    <width>475</width>\n    <height>40</height>\n   </rect>\n   <font>\n    <face>Arial</face>\n    <size>18</size>\n    <weight>bold</weight>\n   </font>\n   <right/>\n   <vcenter/>\n   <string>Cash Receipts</string>\n  </label>\n </rpthead>\n <pghead>\n  <firstpage/>\n  <height>6</height>\n </pghead>\n <pghead>\n  <height>28</height>\n  <label>\n   <rect>\n    <x>100</x>\n    <y>5</y>\n    <width>100</width>\n    <height>15</height>\n   </rect>\n   <font>\n    <face>Arial</face>\n    <size>8</size>\n    <weight>normal</weight>\n   </font>\n   <left/>\n   <vcenter/>\n   <string>Customer Name</string>\n  </label>\n  <label>\n   <rect>\n    <x>5</x>\n    <y>5</y>\n    <width>80</width>\n    <height>15</height>\n   </rect>\n   <font>\n    <face>Arial</face>\n    <size>8</size>\n    <weight>normal</weight>\n   </font>\n   <left/>\n   <vcenter/>\n   <string>Cust. #</string>\n  </label>\n  <label>\n   <rect>\n    <x>295</x>\n    <y>4</y>\n    <width>95</width>\n    <height>15</height>\n   </rect>\n   <font>\n    <face>Arial</face>\n    <size>8</size>\n    <weight>normal</weight>\n   </font>\n   <hcenter/>\n   <vcenter/>\n   <string>Source</string>\n  </label>\n  <line>\n   <xstart>5</xstart>\n   <ystart>20</ystart>\n   <xend>745</xend>\n   <yend>20</yend>\n   <weight>2</weight>\n  </line>\n  <label>\n   <rect>\n    <x>420</x>\n    <y>4</y>\n    <width>70</width>\n    <height>15</height>\n   </rect>\n   <font>\n    <face>Arial</face>\n    <size>8</size>\n    <weight>normal</weight>\n   </font>\n   <hcenter/>\n   <vcenter/>\n   <string>Target</string>\n  </label>\n  <label>\n   <rect>\n    <x>595</x>\n    <y>4</y>\n    <width>45</width>\n    <height>15</height>\n   </rect>\n   <font>\n    <face>Arial</face>\n    <size>8</size>\n    <weight>normal</weight>\n   </font>\n   <hcenter/>\n   <vcenter/>\n   <string>Currency</string>\n  </label>\n  <label>\n   <rect>\n    <x>495</x>\n    <y>4</y>\n    <width>100</width>\n    <height>15</height>\n   </rect>\n   <font>\n    <face>Arial</face>\n    <size>8</size>\n    <weight>normal</weight>\n   </font>\n   <hcenter/>\n   <vcenter/>\n   <string>Amount</string>\n  </label>\n  <label>\n   <rect>\n    <x>215</x>\n    <y>4</y>\n    <width>80</width>\n    <height>15</height>\n   </rect>\n   <font>\n    <face>Arial</face>\n    <size>8</size>\n    <weight>normal</weight>\n   </font>\n   <hcenter/>\n   <vcenter/>\n   <string>Date</string>\n  </label>\n  <label>\n   <rect>\n    <x>665</x>\n    <y>4</y>\n    <width>75</width>\n    <height>15</height>\n   </rect>\n   <font>\n    <face>Arial</face>\n    <size>8</size>\n    <weight>normal</weight>\n   </font>\n   <hcenter/>\n   <vcenter/>\n   <string>Base Amount</string>\n  </label>\n </pghead>\n <section>\n  <name>detail</name>\n  <detail>\n   <key>\n    <query>detail</query>\n   </key>\n   <height>20</height>\n   <field>\n    <rect>\n     <x>55</x>\n     <y>0</y>\n     <width>155</width>\n     <height>15</height>\n    </rect>\n    <font>\n     <face>Arial</face>\n     <size>8</size>\n     <weight>bold</weight>\n    </font>\n    <left/>\n    <vcenter/>\n    <data>\n     <query>detail</query>\n     <column>cust_name</column>\n    </data>\n   </field>\n   <field>\n    <rect>\n     <x>215</x>\n     <y>0</y>\n     <width>65</width>\n     <height>15</height>\n    </rect>\n    <font>\n     <face>Arial</face>\n     <size>8</size>\n     <weight>bold</weight>\n    </font>\n    <hcenter/>\n    <vcenter/>\n    <data>\n     <query>detail</query>\n     <column>f_postdate</column>\n    </data>\n   </field>\n   <field>\n    <rect>\n     <x>600</x>\n     <y>0</y>\n     <width>40</width>\n     <height>15</height>\n    </rect>\n    <font>\n     <face>Arial</face>\n     <size>8</size>\n     <weight>bold</weight>\n    </font>\n    <hcenter/>\n    <vcenter/>\n    <data>\n     <query>detail</query>\n     <column>currAbbr</column>\n    </data>\n   </field>\n   <field>\n    <rect>\n     <x>400</x>\n     <y>0</y>\n     <width>110</width>\n     <height>15</height>\n    </rect>\n    <font>\n     <face>Arial</face>\n     <size>8</size>\n     <weight>bold</weight>\n    </font>\n    <left/>\n    <vcenter/>\n    <data>\n     <query>detail</query>\n     <column>target</column>\n    </data>\n   </field>\n   <field>\n    <rect>\n     <x>5</x>\n     <y>0</y>\n     <width>40</width>\n     <height>15</height>\n    </rect>\n    <font>\n     <face>Arial</face>\n     <size>8</size>\n     <weight>bold</weight>\n    </font>\n    <left/>\n    <vcenter/>\n    <data>\n     <query>detail</query>\n     <column>cust_number</column>\n    </data>\n   </field>\n   <field>\n    <rect>\n     <x>285</x>\n     <y>0</y>\n     <width>115</width>\n     <height>15</height>\n    </rect>\n    <font>\n     <face>Arial</face>\n     <size>8</size>\n     <weight>bold</weight>\n    </font>\n    <left/>\n    <vcenter/>\n    <data>\n     <query>detail</query>\n     <column>source</column>\n    </data>\n   </field>\n   <field>\n    <rect>\n     <x>645</x>\n     <y>0</y>\n     <width>90</width>\n     <height>15</height>\n    </rect>\n    <font>\n     <face>Arial</face>\n     <size>8</size>\n     <weight>bold</weight>\n    </font>\n    <right/>\n    <vcenter/>\n    <data>\n     <query>detail</query>\n     <column>f_base_applied</column>\n    </data>\n   </field>\n   <field>\n    <rect>\n     <x>509</x>\n     <y>0</y>\n     <width>80</width>\n     <height>15</height>\n    </rect>\n    <font>\n     <face>Arial</face>\n     <size>8</size>\n     <weight>bold</weight>\n    </font>\n    <right/>\n    <vcenter/>\n    <data>\n     <query>detail</query>\n     <column>f_applied</column>\n    </data>\n   </field>\n  </detail>\n </section>\n <pgfoot>\n  <height>18</height>\n  <label>\n   <rect>\n    <x>595.676</x>\n    <y>2.59436</y>\n    <width>100</width>\n    <height>15</height>\n   </rect>\n   <font>\n    <face>Arial</face>\n    <size>8</size>\n    <weight>normal</weight>\n   </font>\n   <right/>\n   <vcenter/>\n   <string>Page:</string>\n  </label>\n  <field>\n   <rect>\n    <x>700.755</x>\n    <y>2</y>\n    <width>40</width>\n    <height>15</height>\n   </rect>\n   <font>\n    <face>Arial</face>\n    <size>8</size>\n    <weight>bold</weight>\n   </font>\n   <left/>\n   <vcenter/>\n   <data>\n    <query>Context Query</query>\n    <column>page_number</column>\n   </data>\n  </field>\n  <label>\n   <rect>\n    <x>0</x>\n    <y>0</y>\n    <width>100</width>\n    <height>15</height>\n   </rect>\n   <font>\n    <face>Arial</face>\n    <size>8</size>\n    <weight>normal</weight>\n   </font>\n   <right/>\n   <vcenter/>\n   <string>Report Date:</string>\n  </label>\n  <field>\n   <rect>\n    <x>103</x>\n    <y>0</y>\n    <width>100</width>\n    <height>15</height>\n   </rect>\n   <font>\n    <face>Arial</face>\n    <size>8</size>\n    <weight>bold</weight>\n   </font>\n   <left/>\n   <vcenter/>\n   <data>\n    <query>Context Query</query>\n    <column>report_date</column>\n   </data>\n  </field>\n </pgfoot>\n <rptfoot>\n  <height>100</height>\n  <label>\n   <rect>\n    <x>535</x>\n    <y>10</y>\n    <width>100</width>\n    <height>15</height>\n   </rect>\n   <font>\n    <face>Arial</face>\n    <size>8</size>\n    <weight>normal</weight>\n   </font>\n   <hcenter/>\n   <vcenter/>\n   <string>Total Base Amount</string>\n  </label>\n  <field>\n   <rect>\n    <x>646</x>\n    <y>10.7068</y>\n    <width>90</width>\n    <height>15</height>\n   </rect>\n   <font>\n    <face>Arial</face>\n    <size>8</size>\n    <weight>bold</weight>\n   </font>\n   <right/>\n   <vcenter/>\n   <data>\n    <query>foot</query>\n    <column>f_base_applied_total</column>\n   </data>\n  </field>\n </rptfoot>\n</report>\n		0	2015-10-01 17:14:33.361434
184	UsageStatisticsByItemGroup	\N	<!DOCTYPE openRPTDef>\n<report>\n <title>Item Usage Statistics by Item Group</title>\n <name>UsageStatisticsByItemGroup</name>\n <description></description>\n <size>Letter</size>\n <portrait/>\n <topmargin>50</topmargin>\n <bottommargin>50</bottommargin>\n <rightmargin>50</rightmargin>\n <leftmargin>50</leftmargin>\n <querysource>\n  <name>head</name>\n  <sql>SELECT formatDate(&lt;? value("startDate") ?>) AS startdate,\n       formatDate(&lt;? value("endDate") ?>) AS enddate,\n       &lt;? if exists("itemgrp_id") ?>\n         ( SELECT (itemgrp_name || '-' || itemgrp_descrip)\n             FROM itemgrp\n            WHERE (itemgrp_id=&lt;? value("itemgrp_id") ?>) )\n       &lt;? elseif exists("itemgrp_pattern") ?>\n         text(&lt;? value("itemgrp_pattern") ?>)\n       &lt;? else ?>\n         text('All Item Groups')\n       &lt;? endif ?>\n       AS itemgroup,\n       &lt;? if exists("warehous_id") ?>\n         ( SELECT warehous_code\n             FROM warehous\n            WHERE (warehous_id=&lt;? value("warehous_id") ?>) )\n       &lt;? else ?>\n         text('All Sites')\n       &lt;? endif ?>\n       AS warehouse;</sql>\n </querysource>\n <querysource loadFromDb="true" >\n  <name>detail</name>\n  <mqlgroup>usageStatistics</mqlgroup>\n  <mqlname>detail</mqlname>\n </querysource>\n <rpthead>\n  <height>221</height>\n  <label>\n   <rect>\n    <x>425</x>\n    <y>188</y>\n    <width>75</width>\n    <height>15</height>\n   </rect>\n   <font>\n    <face>Arial</face>\n    <size>8</size>\n    <weight>normal</weight>\n   </font>\n   <hcenter/>\n   <vcenter/>\n   <string>Sold</string>\n  </label>\n  <label>\n   <rect>\n    <x>505</x>\n    <y>188</y>\n    <width>75</width>\n    <height>15</height>\n   </rect>\n   <font>\n    <face>Arial</face>\n    <size>8</size>\n    <weight>normal</weight>\n   </font>\n   <hcenter/>\n   <vcenter/>\n   <string>Scrap</string>\n  </label>\n  <label>\n   <rect>\n    <x>260</x>\n    <y>10</y>\n    <width>465</width>\n    <height>38</height>\n   </rect>\n   <font>\n    <face>Arial</face>\n    <size>18</size>\n    <weight>bold</weight>\n   </font>\n   <right/>\n   <vcenter/>\n   <string>Item Usage Statistics By Item Group</string>\n  </label>\n  <label>\n   <rect>\n    <x>65</x>\n    <y>200</y>\n    <width>106</width>\n    <height>15</height>\n   </rect>\n   <font>\n    <face>Arial</face>\n    <size>8</size>\n    <weight>normal</weight>\n   </font>\n   <left/>\n   <vcenter/>\n   <string>Description</string>\n  </label>\n  <label>\n   <rect>\n    <x>65</x>\n    <y>185</y>\n    <width>106</width>\n    <height>15</height>\n   </rect>\n   <font>\n    <face>Arial</face>\n    <size>8</size>\n    <weight>normal</weight>\n   </font>\n   <left/>\n   <vcenter/>\n   <string>Item Number</string>\n  </label>\n  <label>\n   <rect>\n    <x>585</x>\n    <y>188</y>\n    <width>75</width>\n    <height>15</height>\n   </rect>\n   <font>\n    <face>Arial</face>\n    <size>8</size>\n    <weight>normal</weight>\n   </font>\n   <hcenter/>\n   <vcenter/>\n   <string>Adjustments</string>\n  </label>\n  <label>\n   <rect>\n    <x>665</x>\n    <y>188</y>\n    <width>75</width>\n    <height>15</height>\n   </rect>\n   <font>\n    <face>Arial</face>\n    <size>8</size>\n    <weight>normal</weight>\n   </font>\n   <hcenter/>\n   <vcenter/>\n   <string>Transfers</string>\n  </label>\n  <label>\n   <rect>\n    <x>345</x>\n    <y>188</y>\n    <width>75</width>\n    <height>15</height>\n   </rect>\n   <font>\n    <face>Arial</face>\n    <size>8</size>\n    <weight>normal</weight>\n   </font>\n   <hcenter/>\n   <vcenter/>\n   <string>Issued</string>\n  </label>\n  <label>\n   <rect>\n    <x>10</x>\n    <y>185</y>\n    <width>35</width>\n    <height>15</height>\n   </rect>\n   <font>\n    <face>Arial</face>\n    <size>8</size>\n    <weight>normal</weight>\n   </font>\n   <hcenter/>\n   <vcenter/>\n   <string>Site</string>\n  </label>\n  <label>\n   <rect>\n    <x>30</x>\n    <y>120</y>\n    <width>105</width>\n    <height>20</height>\n   </rect>\n   <font>\n    <face>Arial</face>\n    <size>10</size>\n    <weight>normal</weight>\n   </font>\n   <right/>\n   <vcenter/>\n   <string>Site:</string>\n  </label>\n  <label>\n   <rect>\n    <x>440</x>\n    <y>120</y>\n    <width>105</width>\n    <height>20</height>\n   </rect>\n   <font>\n    <face>Arial</face>\n    <size>10</size>\n    <weight>normal</weight>\n   </font>\n   <right/>\n   <vcenter/>\n   <string>End Date:</string>\n  </label>\n  <field>\n   <rect>\n    <x>140</x>\n    <y>120</y>\n    <width>200</width>\n    <height>20</height>\n   </rect>\n   <font>\n    <face>Arial</face>\n    <size>10</size>\n    <weight>bold</weight>\n   </font>\n   <left/>\n   <vcenter/>\n   <data>\n    <query>head</query>\n    <column>warehouse</column>\n   </data>\n  </field>\n  <field>\n   <rect>\n    <x>140</x>\n    <y>100</y>\n    <width>250</width>\n    <height>20</height>\n   </rect>\n   <font>\n    <face>Arial</face>\n    <size>10</size>\n    <weight>bold</weight>\n   </font>\n   <left/>\n   <vcenter/>\n   <data>\n    <query>head</query>\n    <column>itemgroup</column>\n   </data>\n  </field>\n  <line>\n   <xstart>5</xstart>\n   <ystart>215</ystart>\n   <xend>745</xend>\n   <yend>215</yend>\n   <weight>2</weight>\n  </line>\n  <label>\n   <rect>\n    <x>30</x>\n    <y>100</y>\n    <width>105</width>\n    <height>20</height>\n   </rect>\n   <font>\n    <face>Arial</face>\n    <size>10</size>\n    <weight>normal</weight>\n   </font>\n   <right/>\n   <vcenter/>\n   <string>Item Group(s):</string>\n  </label>\n  <field>\n   <rect>\n    <x>550</x>\n    <y>120</y>\n    <width>150</width>\n    <height>20</height>\n   </rect>\n   <font>\n    <face>Arial</face>\n    <size>10</size>\n    <weight>bold</weight>\n   </font>\n   <left/>\n   <vcenter/>\n   <data>\n    <query>head</query>\n    <column>enddate</column>\n   </data>\n  </field>\n  <field>\n   <rect>\n    <x>550</x>\n    <y>100</y>\n    <width>150</width>\n    <height>20</height>\n   </rect>\n   <font>\n    <face>Arial</face>\n    <size>10</size>\n    <weight>bold</weight>\n   </font>\n   <left/>\n   <vcenter/>\n   <data>\n    <query>head</query>\n    <column>startdate</column>\n   </data>\n  </field>\n  <label>\n   <rect>\n    <x>440</x>\n    <y>100</y>\n    <width>105</width>\n    <height>20</height>\n   </rect>\n   <font>\n    <face>Arial</face>\n    <size>10</size>\n    <weight>normal</weight>\n   </font>\n   <right/>\n   <vcenter/>\n   <string>Start Date:</string>\n  </label>\n  <label>\n   <rect>\n    <x>260</x>\n    <y>188</y>\n    <width>75</width>\n    <height>15</height>\n   </rect>\n   <font>\n    <face>Arial</face>\n    <size>8</size>\n    <weight>normal</weight>\n   </font>\n   <hcenter/>\n   <vcenter/>\n   <string>Received</string>\n  </label>\n </rpthead>\n <pghead>\n  <firstpage/>\n  <height>6</height>\n </pghead>\n <pghead>\n  <height>36</height>\n  <label>\n   <rect>\n    <x>65</x>\n    <y>0</y>\n    <width>106</width>\n    <height>15</height>\n   </rect>\n   <font>\n    <face>Arial</face>\n    <size>8</size>\n    <weight>normal</weight>\n   </font>\n   <left/>\n   <vcenter/>\n   <string>Item Number</string>\n  </label>\n  <label>\n   <rect>\n    <x>345</x>\n    <y>4</y>\n    <width>75</width>\n    <height>15</height>\n   </rect>\n   <font>\n    <face>Arial</face>\n    <size>8</size>\n    <weight>normal</weight>\n   </font>\n   <hcenter/>\n   <vcenter/>\n   <string>Issued</string>\n  </label>\n  <label>\n   <rect>\n    <x>505</x>\n    <y>4</y>\n    <width>75</width>\n    <height>15</height>\n   </rect>\n   <font>\n    <face>Arial</face>\n    <size>8</size>\n    <weight>normal</weight>\n   </font>\n   <hcenter/>\n   <vcenter/>\n   <string>Scrap</string>\n  </label>\n  <label>\n   <rect>\n    <x>425</x>\n    <y>4</y>\n    <width>75</width>\n    <height>15</height>\n   </rect>\n   <font>\n    <face>Arial</face>\n    <size>8</size>\n    <weight>normal</weight>\n   </font>\n   <hcenter/>\n   <vcenter/>\n   <string>Sold</string>\n  </label>\n  <label>\n   <rect>\n    <x>65</x>\n    <y>15</y>\n    <width>106</width>\n    <height>15</height>\n   </rect>\n   <font>\n    <face>Arial</face>\n    <size>8</size>\n    <weight>normal</weight>\n   </font>\n   <left/>\n   <vcenter/>\n   <string>Description</string>\n  </label>\n  <line>\n   <xstart>5</xstart>\n   <ystart>30</ystart>\n   <xend>745</xend>\n   <yend>30</yend>\n   <weight>2</weight>\n  </line>\n  <label>\n   <rect>\n    <x>665</x>\n    <y>4</y>\n    <width>75</width>\n    <height>15</height>\n   </rect>\n   <font>\n    <face>Arial</face>\n    <size>8</size>\n    <weight>normal</weight>\n   </font>\n   <hcenter/>\n   <vcenter/>\n   <string>Transfers</string>\n  </label>\n  <label>\n   <rect>\n    <x>10</x>\n    <y>0</y>\n    <width>35</width>\n    <height>15</height>\n   </rect>\n   <font>\n    <face>Arial</face>\n    <size>8</size>\n    <weight>normal</weight>\n   </font>\n   <hcenter/>\n   <vcenter/>\n   <string>Site</string>\n  </label>\n  <label>\n   <rect>\n    <x>585</x>\n    <y>4</y>\n    <width>75</width>\n    <height>15</height>\n   </rect>\n   <font>\n    <face>Arial</face>\n    <size>8</size>\n    <weight>normal</weight>\n   </font>\n   <hcenter/>\n   <vcenter/>\n   <string>Adjustments</string>\n  </label>\n  <label>\n   <rect>\n    <x>265</x>\n    <y>4</y>\n    <width>75</width>\n    <height>15</height>\n   </rect>\n   <font>\n    <face>Arial</face>\n    <size>8</size>\n    <weight>normal</weight>\n   </font>\n   <hcenter/>\n   <vcenter/>\n   <string>Received</string>\n  </label>\n </pghead>\n <section>\n  <name>detail</name>\n  <detail>\n   <key>\n    <query>detail</query>\n   </key>\n   <height>56</height>\n   <line>\n    <xstart>5</xstart>\n    <ystart>50</ystart>\n    <xend>745</xend>\n    <yend>50</yend>\n    <weight>0</weight>\n   </line>\n   <field>\n    <rect>\n     <x>665</x>\n     <y>2</y>\n     <width>75</width>\n     <height>15</height>\n    </rect>\n    <font>\n     <face>Arial</face>\n     <size>8</size>\n     <weight>bold</weight>\n    </font>\n    <right/>\n    <vcenter/>\n    <data>\n     <query>detail</query>\n     <column>f_transfer</column>\n    </data>\n   </field>\n   <field>\n    <rect>\n     <x>65</x>\n     <y>0</y>\n     <width>175</width>\n     <height>15</height>\n    </rect>\n    <font>\n     <face>Arial</face>\n     <size>8</size>\n     <weight>bold</weight>\n    </font>\n    <left/>\n    <vcenter/>\n    <data>\n     <query>detail</query>\n     <column>item_number</column>\n    </data>\n   </field>\n   <field>\n    <rect>\n     <x>585</x>\n     <y>2</y>\n     <width>75</width>\n     <height>15</height>\n    </rect>\n    <font>\n     <face>Arial</face>\n     <size>8</size>\n     <weight>bold</weight>\n    </font>\n    <right/>\n    <vcenter/>\n    <data>\n     <query>detail</query>\n     <column>f_adjust</column>\n    </data>\n   </field>\n   <field>\n    <rect>\n     <x>425</x>\n     <y>2</y>\n     <width>75</width>\n     <height>15</height>\n    </rect>\n    <font>\n     <face>Arial</face>\n     <size>8</size>\n     <weight>bold</weight>\n    </font>\n    <right/>\n    <vcenter/>\n    <data>\n     <query>detail</query>\n     <column>f_sold</column>\n    </data>\n   </field>\n   <field>\n    <rect>\n     <x>65</x>\n     <y>30</y>\n     <width>250</width>\n     <height>15</height>\n    </rect>\n    <font>\n     <face>Arial</face>\n     <size>8</size>\n     <weight>bold</weight>\n    </font>\n    <left/>\n    <vcenter/>\n    <data>\n     <query>detail</query>\n     <column>item_descrip2</column>\n    </data>\n   </field>\n   <field>\n    <rect>\n     <x>10</x>\n     <y>0</y>\n     <width>35</width>\n     <height>15</height>\n    </rect>\n    <font>\n     <face>Arial</face>\n     <size>8</size>\n     <weight>bold</weight>\n    </font>\n    <hcenter/>\n    <vcenter/>\n    <data>\n     <query>detail</query>\n     <column>warehous_code</column>\n    </data>\n   </field>\n   <field>\n    <rect>\n     <x>65</x>\n     <y>15</y>\n     <width>250</width>\n     <height>15</height>\n    </rect>\n    <font>\n     <face>Arial</face>\n     <size>8</size>\n     <weight>bold</weight>\n    </font>\n    <left/>\n    <vcenter/>\n    <data>\n     <query>detail</query>\n     <column>item_descrip1</column>\n    </data>\n   </field>\n   <field>\n    <rect>\n     <x>505</x>\n     <y>2</y>\n     <width>75</width>\n     <height>15</height>\n    </rect>\n    <font>\n     <face>Arial</face>\n     <size>8</size>\n     <weight>bold</weight>\n    </font>\n    <right/>\n    <vcenter/>\n    <data>\n     <query>detail</query>\n     <column>f_scrap</column>\n    </data>\n   </field>\n   <field>\n    <rect>\n     <x>345</x>\n     <y>2</y>\n     <width>75</width>\n     <height>15</height>\n    </rect>\n    <font>\n     <face>Arial</face>\n     <size>8</size>\n     <weight>bold</weight>\n    </font>\n    <right/>\n    <vcenter/>\n    <data>\n     <query>detail</query>\n     <column>f_issued</column>\n    </data>\n   </field>\n   <field>\n    <rect>\n     <x>260</x>\n     <y>2</y>\n     <width>75</width>\n     <height>15</height>\n    </rect>\n    <font>\n     <face>Arial</face>\n     <size>8</size>\n     <weight>bold</weight>\n    </font>\n    <right/>\n    <vcenter/>\n    <data>\n     <query>detail</query>\n     <column>f_received</column>\n    </data>\n   </field>\n  </detail>\n </section>\n <pgfoot>\n  <height>16</height>\n  <label>\n   <rect>\n    <x>0</x>\n    <y>0</y>\n    <width>85</width>\n    <height>15</height>\n   </rect>\n   <font>\n    <face>Arial</face>\n    <size>8</size>\n    <weight>normal</weight>\n   </font>\n   <right/>\n   <vcenter/>\n   <string>Report Date:</string>\n  </label>\n  <label>\n   <rect>\n    <x>615</x>\n    <y>0</y>\n    <width>85</width>\n    <height>15</height>\n   </rect>\n   <font>\n    <face>Arial</face>\n    <size>8</size>\n    <weight>normal</weight>\n   </font>\n   <right/>\n   <vcenter/>\n   <string>Page:</string>\n  </label>\n  <field>\n   <rect>\n    <x>705</x>\n    <y>0</y>\n    <width>40</width>\n    <height>15</height>\n   </rect>\n   <font>\n    <face>Arial</face>\n    <size>8</size>\n    <weight>bold</weight>\n   </font>\n   <left/>\n   <vcenter/>\n   <data>\n    <query>Context Query</query>\n    <column>page_number</column>\n   </data>\n  </field>\n  <field>\n   <rect>\n    <x>90</x>\n    <y>0</y>\n    <width>100</width>\n    <height>15</height>\n   </rect>\n   <font>\n    <face>Arial</face>\n    <size>8</size>\n    <weight>bold</weight>\n   </font>\n   <left/>\n   <vcenter/>\n   <data>\n    <query>Context Query</query>\n    <column>report_date</column>\n   </data>\n  </field>\n </pgfoot>\n</report>\n	\N	0	2010-06-01 10:42:21.492483
447	QOHByParameterList	\N	<!DOCTYPE openRPTDef>\n<report>\n <title>Quantities on Hand by Parameter List</title>\n <name>QOHByParameterList</name>\n <description></description>\n <grid>\n  <snap/>\n  <show/>\n  <x>0.05</x>\n  <y>0.05</y>\n </grid>\n <size>Letter</size>\n <portrait/>\n <topmargin>50</topmargin>\n <bottommargin>50</bottommargin>\n <rightmargin>50</rightmargin>\n <leftmargin>50</leftmargin>\n <querysource>\n  <name>head</name>\n  <sql>SELECT &lt;? if exists("onlyShowPositive") ?>\n         text('Only Showing Positive Quantities')\n       &lt;? elseif exists("onlyShowNegative") ?>\n         text('Only Showing Negative Quantities')\n       &lt;? else ?>\n         text('Showing All Quantities')\n       &lt;? endif ?>\n       AS showquantities,\n       &lt;? if exists("showValue") ?>\n         text('Unit Cost') AS lbl_unitcost,\n         text('Value') AS lbl_value,\n         text('NN Value') AS lbl_nnvalue,\n         text('Cost Method') AS lbl_costmethod,\n       &lt;? else ?>\n         text('') AS lbl_unitcost,\n         text('') AS lbl_value,\n         text('') AS lbl_nnvalue,\n         text('') AS lbl_costmethod,\n       &lt;? endif ?>\n       &lt;? if exists("showValue") ?>\n         &lt;? if exists("useActualCosts") ?>\n           text('Showing Actual Costs')\n         &lt;? elseif exists("useStandardCosts") ?>\n           text('Showing Standard Costs')\n         &lt;? else ?>\n           text('Showing Posted Costs')\n         &lt;? endif ?>\n       &lt;? else ?>\n         text('')\n       &lt;? endif ?>\n       AS showvalues;\n</sql>\n </querysource>\n <querysource>\n  <name>detail</name>\n  <sql>SELECT itemsite_id,\n       detail,\n       item_number,\n       item_descrip1,\n       item_descrip2,\n       uom_name,\n       warehous_code,\n       formatQty(reorderlevel) AS f_reorderlevel,\n       formatQty(qoh) AS f_qoh,\n       CASE WHEN (NOT useDefaultLocation(itemsite_id)) THEN 'None'\n                 ELSE defaultLocationName(itemsite_id)\n       END AS defaultlocation,\n       formatQty(nonnetable) AS f_nonnetable,\n       &lt;? if exists("showValue") ?>\n         formatCost(standardcost)\n       &lt;? else ?>\n         text('')\n       &lt;? endif ?>\n       AS f_unitcost,\n       &lt;? if exists("showValue") ?>\n         formatExtPrice((standardcost * qoh))\n       &lt;? else ?>\n         text('')\n       &lt;? endif ?>\n       AS f_value,\n       &lt;? if exists("showValue") ?>\n         CASE WHEN (itemsite_loccntrl) THEN formatExtPrice((standardcost * nonnetable))\n              ELSE 'N/A'\n         END\n       &lt;? else ?>\n         text('')\n       &lt;? endif ?>\n       AS f_nonnetvalue,\n       standardcost,\n       qoh,\n       nonnetable,\n       qoh AS r_qoh,\n       nonnetable AS r_nonnetable,\n       &lt;? if exists("showValue") ?>\n         (standardcost * qoh)\n       &lt;? else ?>\n         0\n       &lt;? endif ?>\n       AS r_value,\n       &lt;? if exists("showValue") ?>\n         CASE WHEN (itemsite_loccntrl) THEN (standardcost * nonnetable)\n              ELSE 0\n         END\n       &lt;? else ?>\n         0\n       &lt;? endif ?>\n       AS r_nonnetvalue,\n       &lt;? if exists("showValue") ?>\n         &lt;? if exists("usePostedCosts") ?>\n           CASE WHEN(itemsite_costmethod='A') THEN text('Average')\n                WHEN(itemsite_costmethod='S') THEN text('Standard')\n                WHEN(itemsite_costmethod='J') THEN text('Job')\n                WHEN(itemsite_costmethod='N') THEN text('None')\n                ELSE text('UNKNOWN')\n           END\n         &lt;? else ?>\n           text('')\n         &lt;? endif ?>\n       &lt;? else ?>\n         text('')\n       &lt;? endif ?>\n       AS f_costmethod\nFROM ( SELECT itemsite_id, itemsite_costmethod,\n              item_number,\n              item_descrip1, item_descrip2, itemsite_loccntrl,\n              warehous_code,\n              uom_name,\n              CASE WHEN(itemsite_useparams) THEN itemsite_reorderlevel ELSE 0.0 END AS reorderlevel,\n              itemsite_qtyonhand AS qoh,\n              CASE WHEN ((itemsite_loccntrl) OR (itemsite_controlmethod IN ('L', 'S'))) THEN 1\n                   ELSE 0\n              END AS detail,\n              itemsite_nnqoh AS nonnetable,\n              &lt;? if exists("useActualCosts") ?>\n                actcost(itemsite_item_id)\n              &lt;? elseif exists("useStandardCosts") ?>\n                stdcost(itemsite_item_id)\n              &lt;? else ?>\n                (itemsite_value / CASE WHEN(itemsite_qtyonhand=0) THEN 1 ELSE itemsite_qtyonhand END)\n              &lt;? endif ?>\n              AS standardcost\n         FROM itemsite, item, uom, warehous, costcat\n        WHERE ((itemsite_item_id=item_id)\n          AND (item_inv_uom_id=uom_id)\n          AND (itemsite_warehous_id=warehous_id)\n          AND (itemsite_costcat_id=costcat_id)\n          AND (itemsite_active)\n&lt;? if exists("classcode_id") ?>\n          AND (item_classcode_id=&lt;? value("classcode_id") ?>)\n&lt;? endif ?>\n&lt;? if exists("classcode_pattern") ?>\n          AND (item_classcode_id IN (SELECT classcode_id\n                                       FROM classcode\n                                      WHERE (classcode_code ~ &lt;? value("classcode_pattern") ?>) ) )\n&lt;? endif ?>\n&lt;? if exists("costcat_id") ?>\n          AND (costcat_id=&lt;? value("costcat_id") ?>)\n&lt;? endif ?>\n&lt;? if exists("costcat_pattern") ?>\n          AND (costcat_id IN (SELECT costcat_id\n                                       FROM costcat\n                                      WHERE (costcat_code ~ &lt;? value("costcat_pattern") ?>) ) )\n&lt;? endif ?>\n&lt;? if exists("itemgrp_id") ?>\n          AND (item_id IN (SELECT itemgrpitem_item_id FROM itemgrpitem WHERE (itemgrpitem_itemgrp_id=&lt;? value("itemgrp_id") ?>)))\n&lt;? endif ?>\n&lt;? if exists("itemgrp_pattern") ?>\n          AND (item_id IN (SELECT itemgrpitem_item_id\n                             FROM itemgrpitem, itemgrp\n                            WHERE ( (itemgrpitem_itemgrp_id=itemgrp_id)\n                              AND (itemgrp_name ~ &lt;? value("itemgrp_pattern") ?>) ) ))\n&lt;? endif ?>\n&lt;? if exists("onlyShowPositive") ?>\n          AND (itemsite_qtyonhand > 0)\n&lt;? elseif exists("onlyShowNegative") ?>\n          AND (itemsite_qtyonhand &lt; 0)\n&lt;? endif ?>\n&lt;? if exists("warehous_id") ?>\n          AND (itemsite_warehous_id=&lt;? value("warehous_id") ?>)\n&lt;? endif ?>\n) ) AS data\nORDER BY warehous_code, item_number;\n</sql>\n </querysource>\n <rpthead>\n  <height>234</height>\n  <label>\n   <rect>\n    <x>5</x>\n    <y>200</y>\n    <width>35</width>\n    <height>15</height>\n   </rect>\n   <font>\n    <face>Arial</face>\n    <size>8</size>\n    <weight>normal</weight>\n   </font>\n   <hcenter/>\n   <vcenter/>\n   <string>Site</string>\n  </label>\n  <field>\n   <rect>\n    <x>590</x>\n    <y>200</y>\n    <width>80</width>\n    <height>15</height>\n   </rect>\n   <font>\n    <face>Arial</face>\n    <size>8</size>\n    <weight>normal</weight>\n   </font>\n   <hcenter/>\n   <vcenter/>\n   <data>\n    <query>head</query>\n    <column>lbl_value</column>\n   </data>\n  </field>\n  <field>\n   <rect>\n    <x>509</x>\n    <y>200</y>\n    <width>80</width>\n    <height>15</height>\n   </rect>\n   <font>\n    <face>Arial</face>\n    <size>8</size>\n    <weight>normal</weight>\n   </font>\n   <hcenter/>\n   <vcenter/>\n   <data>\n    <query>head</query>\n    <column>lbl_unitcost</column>\n   </data>\n  </field>\n  <label>\n   <rect>\n    <x>360</x>\n    <y>200</y>\n    <width>65</width>\n    <height>15</height>\n   </rect>\n   <font>\n    <face>Arial</face>\n    <size>8</size>\n    <weight>normal</weight>\n   </font>\n   <hcenter/>\n   <vcenter/>\n   <string>QOH</string>\n  </label>\n  <field>\n   <rect>\n    <x>185</x>\n    <y>43</y>\n    <width>300</width>\n    <height>15</height>\n   </rect>\n   <font>\n    <face>Arial</face>\n    <size>10</size>\n    <weight>bold</weight>\n   </font>\n   <left/>\n   <vcenter/>\n   <data>\n    <query>head</query>\n    <column>showvalues</column>\n   </data>\n  </field>\n  <line>\n   <xstart>8</xstart>\n   <ystart>231.167</ystart>\n   <xend>748</xend>\n   <yend>231.167</yend>\n   <weight>2</weight>\n  </line>\n  <label>\n   <rect>\n    <x>430</x>\n    <y>200</y>\n    <width>80</width>\n    <height>15</height>\n   </rect>\n   <font>\n    <face>Arial</face>\n    <size>8</size>\n    <weight>normal</weight>\n   </font>\n   <hcenter/>\n   <vcenter/>\n   <string>Non-Netable</string>\n  </label>\n  <label>\n   <rect>\n    <x>265</x>\n    <y>200</y>\n    <width>80</width>\n    <height>15</height>\n   </rect>\n   <font>\n    <face>Arial</face>\n    <size>8</size>\n    <weight>normal</weight>\n   </font>\n   <hcenter/>\n   <vcenter/>\n   <string>Reorder Lvl.</string>\n  </label>\n  <label>\n   <rect>\n    <x>104</x>\n    <y>200</y>\n    <width>150</width>\n    <height>15</height>\n   </rect>\n   <font>\n    <face>Arial</face>\n    <size>8</size>\n    <weight>normal</weight>\n   </font>\n   <left/>\n   <vcenter/>\n   <string>Item Number</string>\n  </label>\n  <field>\n   <rect>\n    <x>670</x>\n    <y>200</y>\n    <width>80</width>\n    <height>15</height>\n   </rect>\n   <font>\n    <face>Arial</face>\n    <size>8</size>\n    <weight>normal</weight>\n   </font>\n   <hcenter/>\n   <vcenter/>\n   <data>\n    <query>head</query>\n    <column>lbl_nnvalue</column>\n   </data>\n  </field>\n  <label>\n   <rect>\n    <x>10</x>\n    <y>215</y>\n    <width>90</width>\n    <height>15</height>\n   </rect>\n   <font>\n    <face>Arial</face>\n    <size>8</size>\n    <weight>normal</weight>\n   </font>\n   <left/>\n   <vcenter/>\n   <string>Default Location</string>\n  </label>\n  <field>\n   <rect>\n    <x>10</x>\n    <y>43</y>\n    <width>300</width>\n    <height>15</height>\n   </rect>\n   <font>\n    <face>Arial</face>\n    <size>10</size>\n    <weight>bold</weight>\n   </font>\n   <left/>\n   <vcenter/>\n   <data>\n    <query>head</query>\n    <column>showquantities</column>\n   </data>\n  </field>\n  <field>\n   <rect>\n    <x>670</x>\n    <y>215</y>\n    <width>80</width>\n    <height>15</height>\n   </rect>\n   <font>\n    <face>Arial</face>\n    <size>8</size>\n    <weight>normal</weight>\n   </font>\n   <hcenter/>\n   <vcenter/>\n   <data>\n    <query>head</query>\n    <column>lbl_costmethod</column>\n   </data>\n  </field>\n  <label>\n   <rect>\n    <x>104</x>\n    <y>215</y>\n    <width>229</width>\n    <height>15</height>\n   </rect>\n   <font>\n    <face>Arial</face>\n    <size>8</size>\n    <weight>normal</weight>\n   </font>\n   <left/>\n   <vcenter/>\n   <string>Item Description</string>\n  </label>\n  <text>\n   <rect>\n    <x>10</x>\n    <y>58</y>\n    <width>725</width>\n    <height>15</height>\n   </rect>\n   <bottompad>12</bottompad>\n   <font>\n    <face>Arial</face>\n    <size>10</size>\n    <weight>bold</weight>\n   </font>\n   <left/>\n   <top/>\n   <data>\n    <query>Parameter Query</query>\n    <column>filter</column>\n   </data>\n  </text>\n  <label>\n   <rect>\n    <x>505</x>\n    <y>8</y>\n    <width>240</width>\n    <height>35</height>\n   </rect>\n   <font>\n    <face>Arial</face>\n    <size>18</size>\n    <weight>bold</weight>\n   </font>\n   <right/>\n   <vcenter/>\n   <string>Quantity On Hand</string>\n  </label>\n </rpthead>\n <pghead>\n  <firstpage/>\n  <height>6</height>\n </pghead>\n <pghead>\n  <height>36</height>\n  <field>\n   <rect>\n    <x>590</x>\n    <y>0</y>\n    <width>80</width>\n    <height>15</height>\n   </rect>\n   <font>\n    <face>Arial</face>\n    <size>8</size>\n    <weight>normal</weight>\n   </font>\n   <hcenter/>\n   <vcenter/>\n   <data>\n    <query>head</query>\n    <column>lbl_value</column>\n   </data>\n  </field>\n  <label>\n   <rect>\n    <x>360</x>\n    <y>0</y>\n    <width>65</width>\n    <height>15</height>\n   </rect>\n   <font>\n    <face>Arial</face>\n    <size>8</size>\n    <weight>normal</weight>\n   </font>\n   <hcenter/>\n   <vcenter/>\n   <string>QOH</string>\n  </label>\n  <field>\n   <rect>\n    <x>670</x>\n    <y>0</y>\n    <width>80</width>\n    <height>15</height>\n   </rect>\n   <font>\n    <face>Arial</face>\n    <size>8</size>\n    <weight>normal</weight>\n   </font>\n   <hcenter/>\n   <vcenter/>\n   <data>\n    <query>head</query>\n    <column>lbl_nnvalue</column>\n   </data>\n  </field>\n  <field>\n   <rect>\n    <x>509</x>\n    <y>0</y>\n    <width>80</width>\n    <height>15</height>\n   </rect>\n   <font>\n    <face>Arial</face>\n    <size>8</size>\n    <weight>normal</weight>\n   </font>\n   <hcenter/>\n   <vcenter/>\n   <data>\n    <query>head</query>\n    <column>lbl_unitcost</column>\n   </data>\n  </field>\n  <label>\n   <rect>\n    <x>104</x>\n    <y>15</y>\n    <width>229</width>\n    <height>15</height>\n   </rect>\n   <font>\n    <face>Arial</face>\n    <size>8</size>\n    <weight>normal</weight>\n   </font>\n   <left/>\n   <vcenter/>\n   <string>Item Description</string>\n  </label>\n  <label>\n   <rect>\n    <x>5</x>\n    <y>0</y>\n    <width>35</width>\n    <height>15</height>\n   </rect>\n   <font>\n    <face>Arial</face>\n    <size>8</size>\n    <weight>normal</weight>\n   </font>\n   <hcenter/>\n   <vcenter/>\n   <string>Site</string>\n  </label>\n  <label>\n   <rect>\n    <x>104</x>\n    <y>0</y>\n    <width>150</width>\n    <height>15</height>\n   </rect>\n   <font>\n    <face>Arial</face>\n    <size>8</size>\n    <weight>normal</weight>\n   </font>\n   <left/>\n   <vcenter/>\n   <string>Item Number</string>\n  </label>\n  <field>\n   <rect>\n    <x>670</x>\n    <y>15</y>\n    <width>80</width>\n    <height>15</height>\n   </rect>\n   <font>\n    <face>Arial</face>\n    <size>8</size>\n    <weight>normal</weight>\n   </font>\n   <hcenter/>\n   <vcenter/>\n   <data>\n    <query>head</query>\n    <column>lbl_costmethod</column>\n   </data>\n  </field>\n  <label>\n   <rect>\n    <x>265</x>\n    <y>0</y>\n    <width>80</width>\n    <height>15</height>\n   </rect>\n   <font>\n    <face>Arial</face>\n    <size>8</size>\n    <weight>normal</weight>\n   </font>\n   <hcenter/>\n   <vcenter/>\n   <string>Reorder Lvl.</string>\n  </label>\n  <label>\n   <rect>\n    <x>430</x>\n    <y>0</y>\n    <width>80</width>\n    <height>15</height>\n   </rect>\n   <font>\n    <face>Arial</face>\n    <size>8</size>\n    <weight>normal</weight>\n   </font>\n   <hcenter/>\n   <vcenter/>\n   <string>Non-Netable</string>\n  </label>\n  <label>\n   <rect>\n    <x>10</x>\n    <y>15</y>\n    <width>90</width>\n    <height>15</height>\n   </rect>\n   <font>\n    <face>Arial</face>\n    <size>8</size>\n    <weight>normal</weight>\n   </font>\n   <left/>\n   <vcenter/>\n   <string>Default Location</string>\n  </label>\n  <line>\n   <xstart>10</xstart>\n   <ystart>33.3333</ystart>\n   <xend>750</xend>\n   <yend>33.3333</yend>\n   <weight>2</weight>\n  </line>\n </pghead>\n <section>\n  <name>detail</name>\n  <detail>\n   <key>\n    <query>detail</query>\n   </key>\n   <height>51</height>\n   <field>\n    <rect>\n     <x>265</x>\n     <y>0</y>\n     <width>80</width>\n     <height>15</height>\n    </rect>\n    <font>\n     <face>Arial</face>\n     <size>8</size>\n     <weight>bold</weight>\n    </font>\n    <right/>\n    <vcenter/>\n    <data>\n     <query>detail</query>\n     <column>f_reorderlevel</column>\n    </data>\n   </field>\n   <line>\n    <xstart>5</xstart>\n    <ystart>45</ystart>\n    <xend>745</xend>\n    <yend>45</yend>\n    <weight>0</weight>\n   </line>\n   <field>\n    <rect>\n     <x>104</x>\n     <y>0</y>\n     <width>150</width>\n     <height>15</height>\n    </rect>\n    <font>\n     <face>Arial</face>\n     <size>8</size>\n     <weight>bold</weight>\n    </font>\n    <left/>\n    <vcenter/>\n    <data>\n     <query>detail</query>\n     <column>item_number</column>\n    </data>\n   </field>\n   <field>\n    <rect>\n     <x>104</x>\n     <y>30</y>\n     <width>300</width>\n     <height>15</height>\n    </rect>\n    <font>\n     <face>Arial</face>\n     <size>8</size>\n     <weight>bold</weight>\n    </font>\n    <left/>\n    <vcenter/>\n    <data>\n     <query>detail</query>\n     <column>item_descrip2</column>\n    </data>\n   </field>\n   <field>\n    <rect>\n     <x>5</x>\n     <y>0</y>\n     <width>35</width>\n     <height>15</height>\n    </rect>\n    <font>\n     <face>Arial</face>\n     <size>8</size>\n     <weight>bold</weight>\n    </font>\n    <hcenter/>\n    <vcenter/>\n    <data>\n     <query>detail</query>\n     <column>warehous_code</column>\n    </data>\n   </field>\n   <field>\n    <rect>\n     <x>10</x>\n     <y>15</y>\n     <width>90</width>\n     <height>15</height>\n    </rect>\n    <font>\n     <face>Arial</face>\n     <size>8</size>\n     <weight>bold</weight>\n    </font>\n    <left/>\n    <vcenter/>\n    <data>\n     <query>detail</query>\n     <column>defaultlocation</column>\n    </data>\n   </field>\n   <field>\n    <rect>\n     <x>585</x>\n     <y>0</y>\n     <width>80</width>\n     <height>15</height>\n    </rect>\n    <font>\n     <face>Arial</face>\n     <size>8</size>\n     <weight>bold</weight>\n    </font>\n    <right/>\n    <vcenter/>\n    <data>\n     <query>detail</query>\n     <column>f_value</column>\n    </data>\n   </field>\n   <field>\n    <rect>\n     <x>345</x>\n     <y>0</y>\n     <width>80</width>\n     <height>15</height>\n    </rect>\n    <font>\n     <face>Arial</face>\n     <size>8</size>\n     <weight>bold</weight>\n    </font>\n    <right/>\n    <vcenter/>\n    <data>\n     <query>detail</query>\n     <column>f_qoh</column>\n    </data>\n   </field>\n   <field>\n    <rect>\n     <x>104</x>\n     <y>15</y>\n     <width>300</width>\n     <height>15</height>\n    </rect>\n    <font>\n     <face>Arial</face>\n     <size>8</size>\n     <weight>bold</weight>\n    </font>\n    <left/>\n    <vcenter/>\n    <data>\n     <query>detail</query>\n     <column>item_descrip1</column>\n    </data>\n   </field>\n   <field>\n    <rect>\n     <x>665</x>\n     <y>0</y>\n     <width>80</width>\n     <height>15</height>\n    </rect>\n    <font>\n     <face>Arial</face>\n     <size>8</size>\n     <weight>bold</weight>\n    </font>\n    <right/>\n    <vcenter/>\n    <data>\n     <query>detail</query>\n     <column>f_nonnetvalue</column>\n    </data>\n   </field>\n   <field>\n    <rect>\n     <x>670</x>\n     <y>15</y>\n     <width>80</width>\n     <height>15</height>\n    </rect>\n    <font>\n     <face>Arial</face>\n     <size>8</size>\n     <weight>bold</weight>\n    </font>\n    <right/>\n    <vcenter/>\n    <data>\n     <query>detail</query>\n     <column>f_costmethod</column>\n    </data>\n   </field>\n   <field>\n    <rect>\n     <x>505</x>\n     <y>0</y>\n     <width>80</width>\n     <height>15</height>\n    </rect>\n    <font>\n     <face>Arial</face>\n     <size>8</size>\n     <weight>bold</weight>\n    </font>\n    <right/>\n    <vcenter/>\n    <data>\n     <query>detail</query>\n     <column>f_unitcost</column>\n    </data>\n   </field>\n   <field>\n    <rect>\n     <x>425</x>\n     <y>0</y>\n     <width>80</width>\n     <height>15</height>\n    </rect>\n    <font>\n     <face>Arial</face>\n     <size>8</size>\n     <weight>bold</weight>\n    </font>\n    <right/>\n    <vcenter/>\n    <data>\n     <query>detail</query>\n     <column>f_nonnetable</column>\n    </data>\n   </field>\n  </detail>\n </section>\n <pgfoot>\n  <height>16</height>\n  <field>\n   <rect>\n    <x>705</x>\n    <y>0</y>\n    <width>40</width>\n    <height>15</height>\n   </rect>\n   <font>\n    <face>Arial</face>\n    <size>8</size>\n    <weight>bold</weight>\n   </font>\n   <left/>\n   <vcenter/>\n   <data>\n    <query>Context Query</query>\n    <column>page_number</column>\n   </data>\n  </field>\n  <label>\n   <rect>\n    <x>615</x>\n    <y>0</y>\n    <width>85</width>\n    <height>15</height>\n   </rect>\n   <font>\n    <face>Arial</face>\n    <size>8</size>\n    <weight>normal</weight>\n   </font>\n   <right/>\n   <vcenter/>\n   <string>Page:</string>\n  </label>\n  <field>\n   <rect>\n    <x>90</x>\n    <y>0</y>\n    <width>100</width>\n    <height>15</height>\n   </rect>\n   <font>\n    <face>Arial</face>\n    <size>8</size>\n    <weight>bold</weight>\n   </font>\n   <left/>\n   <vcenter/>\n   <data>\n    <query>Context Query</query>\n    <column>report_date</column>\n   </data>\n  </field>\n  <label>\n   <rect>\n    <x>0</x>\n    <y>0</y>\n    <width>85</width>\n    <height>15</height>\n   </rect>\n   <font>\n    <face>Arial</face>\n    <size>8</size>\n    <weight>normal</weight>\n   </font>\n   <right/>\n   <vcenter/>\n   <string>Report Date:</string>\n  </label>\n </pgfoot>\n <rptfoot>\n  <height>16</height>\n  <field>\n   <rect>\n    <x>425</x>\n    <y>0</y>\n    <width>80</width>\n    <height>15</height>\n   </rect>\n   <font>\n    <face>Arial</face>\n    <size>8</size>\n    <weight>bold</weight>\n   </font>\n   <right/>\n   <vcenter/>\n   <data>\n    <query>detail</query>\n    <column>r_nonnetable</column>\n   </data>\n   <format>%.02f</format>\n   <tracktotal/>\n  </field>\n  <field>\n   <rect>\n    <x>585</x>\n    <y>0</y>\n    <width>80</width>\n    <height>15</height>\n   </rect>\n   <font>\n    <face>Arial</face>\n    <size>8</size>\n    <weight>bold</weight>\n   </font>\n   <right/>\n   <vcenter/>\n   <data>\n    <query>detail</query>\n    <column>r_value</column>\n   </data>\n   <format>%.02f</format>\n   <tracktotal/>\n  </field>\n  <field>\n   <rect>\n    <x>665</x>\n    <y>0</y>\n    <width>80</width>\n    <height>15</height>\n   </rect>\n   <font>\n    <face>Arial</face>\n    <size>8</size>\n    <weight>bold</weight>\n   </font>\n   <right/>\n   <vcenter/>\n   <data>\n    <query>detail</query>\n    <column>r_nonnetvalue</column>\n   </data>\n   <format>%.02f</format>\n   <tracktotal/>\n  </field>\n  <field>\n   <rect>\n    <x>345</x>\n    <y>0</y>\n    <width>80</width>\n    <height>15</height>\n   </rect>\n   <font>\n    <face>Arial</face>\n    <size>8</size>\n    <weight>bold</weight>\n   </font>\n   <right/>\n   <vcenter/>\n   <data>\n    <query>detail</query>\n    <column>r_qoh</column>\n   </data>\n   <format>%.02f</format>\n   <tracktotal/>\n  </field>\n  <label>\n   <rect>\n    <x>5</x>\n    <y>0</y>\n    <width>40</width>\n    <height>15</height>\n   </rect>\n   <font>\n    <face>Arial</face>\n    <size>8</size>\n    <weight>bold</weight>\n   </font>\n   <hcenter/>\n   <vcenter/>\n   <string>Totals</string>\n  </label>\n </rptfoot>\n</report>\n	\N	0	2011-01-31 14:51:44.665252
444	Bookings	\N	<!DOCTYPE openRPTDef>\n<report>\n <title>Bookings</title>\n <name>Bookings</name>\n <description></description>\n <grid>\n  <snap/>\n  <show/>\n  <x>0.05</x>\n  <y>0.05</y>\n </grid>\n <size>Letter</size>\n <portrait/>\n <topmargin>50</topmargin>\n <bottommargin>50</bottommargin>\n <rightmargin>50</rightmargin>\n <leftmargin>50</leftmargin>\n <querysource>\n  <name>detail</name>\n  <sql>SELECT cohead_number AS sonumber,\n       formatDate(cohead_orderdate) AS orddate,\n       cust_number, cust_name,\n       item_number, item_descrip1, item_descrip2,\n       formatQty(coitem_qtyord) AS ordered,\nformatPrice(currtobase(cohead_curr_id,coitem_price,cohead_orderdate) / coitem_price_invuomratio) AS unitprice,\nformatExtPrice(round((noNeg(coitem_qtyord - coitem_qtyshipped + coitem_qtyreturned) * coitem_qty_invuomratio)\n                   * (currtobase(cohead_curr_id,coitem_price,cohead_orderdate) / coitem_price_invuomratio),2)) AS f_extprice\n  FROM coitem JOIN cohead ON (cohead_id=coitem_cohead_id)\n              JOIN custinfo ON (cust_id=cohead_cust_id)\n              JOIN itemsite ON (itemsite_id=coitem_itemsite_id)\n              JOIN site() ON (warehous_id=itemsite_warehous_id)\n              JOIN item ON (item_id=itemsite_item_id)\n              JOIN uom ON (uom_id=coitem_qty_uom_id)\n              JOIN curr_symbol ON (curr_id=cohead_curr_id)\n  WHERE ( (coitem_status&lt;>'X')\n  &lt;? if exists("cohead_id") ?>\n    AND  (coitem_cohead_id=&lt;? value("cohead_id") ?>)\n  &lt;? endif ?>\n  &lt;? if exists("openOnly") ?>\n    AND  (coitem_status&lt;>'C')\n  &lt;? endif ?>\n  &lt;? if exists("startDate") ?>\n    AND  (cohead_orderdate BETWEEN &lt;? value("startDate") ?> AND &lt;? value("endDate") ?>)\n  &lt;? endif ?>\n\n  &lt;? if exists("salesrep_id") ?>\n    AND  (cohead_salesrep_id=&lt;? value("salesrep_id") ?>)\n  &lt;? endif ?>\n  &lt;? if exists("shipto_id") ?>\n    AND  (cohead_shipto_id=&lt;? value("shipto_id") ?>)\n  &lt;? endif ?>\n  &lt;? if exists("cust_id") ?>\n    AND  (cohead_cust_id=&lt;? value("cust_id") ?>)\n  &lt;? endif ?>\n  &lt;? if exists("custtype_id") ?>\n    AND  (cust_custtype_id=&lt;? value("custtype_id") ?>)\n  &lt;? endif ?>\n  &lt;? if exists("custtype_pattern") ?>\n    AND  (cust_custtype_id IN (SELECT DISTINCT custtype_id\n                               FROM custtype\n                               WHERE (custtype_code ~ &lt;? value("custtype_pattern") ?>)))\n  &lt;? endif ?>\n  &lt;? if exists("custgrp") ?>\n    AND (cust_id IN (SELECT DISTINCT custgrpitem_cust_id\n                     FROM custgrpitem))\n  &lt;? endif ?>\n  &lt;? if exists("custgrp_id") ?>\n    AND (cust_id IN (SELECT DISTINCT custgrpitem_cust_id\n                     FROM custgrpitem\n                     WHERE (custgrpitem_custgrp_id=&lt;? value("custgrp_id") ?>)))\n  &lt;? endif ?>\n  &lt;? if exists("custgrp_pattern") ?>\n    AND (cust_id IN (SELECT DISTINCT custgrpitem_cust_id\n                     FROM custgrp, custgrpitem\n                     WHERE ( (custgrpitem_custgrp_id=custgrp_id)\n                       AND   (custgrp_name ~ &lt;? value("custgrp_pattern") ?>) )) )\n  &lt;? endif ?>\n\n  &lt;? if exists("item_id") ?>\n    AND  (itemsite_item_id=&lt;? value("item_id") ?>)\n  &lt;? endif ?>\n  &lt;? if exists("prodcat_id") ?>\n    AND (item_prodcat_id=&lt;? value("prodcat_id") ?>)\n  &lt;? endif ?>\n  &lt;? if exists("prodcat_pattern") ?>\n    AND (item_prodcat_id IN (SELECT DISTINCT prodcat_id\n                             FROM prodcat\n                             WHERE (prodcat_code ~ &lt;? value("prodcat_pattern") ?>)))\n  &lt;? endif ?>\n\n  &lt;? if exists("warehous_id") ?>\n    AND  (itemsite_warehous_id=&lt;? value("warehous_id") ?>)\n  &lt;? endif ?>\n)\nORDER BY cohead_orderdate;\n      </sql>\n </querysource>\n <rpthead>\n  <height>237</height>\n  <label>\n   <rect>\n    <x>5</x>\n    <y>200</y>\n    <width>100</width>\n    <height>15</height>\n   </rect>\n   <font>\n    <face>Arial</face>\n    <size>8</size>\n    <weight>normal</weight>\n   </font>\n   <left/>\n   <vcenter/>\n   <string>S/O #</string>\n  </label>\n  <label>\n   <rect>\n    <x>432</x>\n    <y>215</y>\n    <width>100</width>\n    <height>15</height>\n   </rect>\n   <font>\n    <face>Arial</face>\n    <size>8</size>\n    <weight>normal</weight>\n   </font>\n   <left/>\n   <vcenter/>\n   <string>Description</string>\n  </label>\n  <label>\n   <rect>\n    <x>110</x>\n    <y>200</y>\n    <width>80</width>\n    <height>15</height>\n   </rect>\n   <font>\n    <face>Arial</face>\n    <size>8</size>\n    <weight>normal</weight>\n   </font>\n   <hcenter/>\n   <vcenter/>\n   <string>Ord. Date</string>\n  </label>\n  <line>\n   <xstart>5</xstart>\n   <ystart>233</ystart>\n   <xend>745</xend>\n   <yend>233</yend>\n   <weight>2</weight>\n  </line>\n  <label>\n   <rect>\n    <x>200</x>\n    <y>200</y>\n    <width>100</width>\n    <height>15</height>\n   </rect>\n   <font>\n    <face>Arial</face>\n    <size>8</size>\n    <weight>normal</weight>\n   </font>\n   <left/>\n   <vcenter/>\n   <string>Customer #</string>\n  </label>\n  <label>\n   <rect>\n    <x>665</x>\n    <y>200</y>\n    <width>80</width>\n    <height>15</height>\n   </rect>\n   <font>\n    <face>Arial</face>\n    <size>8</size>\n    <weight>normal</weight>\n   </font>\n   <right/>\n   <vcenter/>\n   <string>Unit Price</string>\n  </label>\n  <label>\n   <rect>\n    <x>665</x>\n    <y>215</y>\n    <width>80</width>\n    <height>15</height>\n   </rect>\n   <font>\n    <face>Arial</face>\n    <size>8</size>\n    <weight>normal</weight>\n   </font>\n   <right/>\n   <vcenter/>\n   <string>Ext'd Price</string>\n  </label>\n  <label>\n   <rect>\n    <x>432</x>\n    <y>200</y>\n    <width>100</width>\n    <height>15</height>\n   </rect>\n   <font>\n    <face>Arial</face>\n    <size>8</size>\n    <weight>normal</weight>\n   </font>\n   <left/>\n   <vcenter/>\n   <string>Item Number</string>\n  </label>\n  <label>\n   <rect>\n    <x>270</x>\n    <y>5</y>\n    <width>475</width>\n    <height>40</height>\n   </rect>\n   <font>\n    <face>Arial</face>\n    <size>18</size>\n    <weight>bold</weight>\n   </font>\n   <right/>\n   <vcenter/>\n   <string>Bookings</string>\n  </label>\n  <label>\n   <rect>\n    <x>585</x>\n    <y>200</y>\n    <width>80</width>\n    <height>15</height>\n   </rect>\n   <font>\n    <face>Arial</face>\n    <size>8</size>\n    <weight>normal</weight>\n   </font>\n   <right/>\n   <vcenter/>\n   <string>Shipped</string>\n  </label>\n  <label>\n   <rect>\n    <x>200</x>\n    <y>215</y>\n    <width>100</width>\n    <height>15</height>\n   </rect>\n   <font>\n    <face>Arial</face>\n    <size>8</size>\n    <weight>normal</weight>\n   </font>\n   <left/>\n   <vcenter/>\n   <string>Customer Name</string>\n  </label>\n  <text>\n   <rect>\n    <x>10</x>\n    <y>41</y>\n    <width>725</width>\n    <height>15</height>\n   </rect>\n   <bottompad>12</bottompad>\n   <font>\n    <face>Arial</face>\n    <size>10</size>\n    <weight>bold</weight>\n   </font>\n   <left/>\n   <top/>\n   <data>\n    <query>Parameter Query</query>\n    <column>filter</column>\n   </data>\n  </text>\n </rpthead>\n <pghead>\n  <firstpage/>\n  <height>7</height>\n </pghead>\n <pghead>\n  <height>37</height>\n  <label>\n   <rect>\n    <x>432</x>\n    <y>0</y>\n    <width>100</width>\n    <height>15</height>\n   </rect>\n   <font>\n    <face>Arial</face>\n    <size>8</size>\n    <weight>normal</weight>\n   </font>\n   <left/>\n   <vcenter/>\n   <string>Item Number</string>\n  </label>\n  <label>\n   <rect>\n    <x>200</x>\n    <y>0</y>\n    <width>100</width>\n    <height>15</height>\n   </rect>\n   <font>\n    <face>Arial</face>\n    <size>8</size>\n    <weight>normal</weight>\n   </font>\n   <left/>\n   <vcenter/>\n   <string>Customer #</string>\n  </label>\n  <label>\n   <rect>\n    <x>665</x>\n    <y>0</y>\n    <width>80</width>\n    <height>15</height>\n   </rect>\n   <font>\n    <face>Arial</face>\n    <size>8</size>\n    <weight>normal</weight>\n   </font>\n   <right/>\n   <vcenter/>\n   <string>Unit Price</string>\n  </label>\n  <label>\n   <rect>\n    <x>585</x>\n    <y>0</y>\n    <width>80</width>\n    <height>15</height>\n   </rect>\n   <font>\n    <face>Arial</face>\n    <size>8</size>\n    <weight>normal</weight>\n   </font>\n   <right/>\n   <vcenter/>\n   <string>Shipped</string>\n  </label>\n  <line>\n   <xstart>5</xstart>\n   <ystart>30</ystart>\n   <xend>745</xend>\n   <yend>30</yend>\n   <weight>2</weight>\n  </line>\n  <label>\n   <rect>\n    <x>200</x>\n    <y>15</y>\n    <width>100</width>\n    <height>15</height>\n   </rect>\n   <font>\n    <face>Arial</face>\n    <size>8</size>\n    <weight>normal</weight>\n   </font>\n   <left/>\n   <vcenter/>\n   <string>Customer Name</string>\n  </label>\n  <label>\n   <rect>\n    <x>110</x>\n    <y>0</y>\n    <width>80</width>\n    <height>15</height>\n   </rect>\n   <font>\n    <face>Arial</face>\n    <size>8</size>\n    <weight>normal</weight>\n   </font>\n   <hcenter/>\n   <vcenter/>\n   <string>Ord. Date</string>\n  </label>\n  <label>\n   <rect>\n    <x>5</x>\n    <y>0</y>\n    <width>100</width>\n    <height>15</height>\n   </rect>\n   <font>\n    <face>Arial</face>\n    <size>8</size>\n    <weight>normal</weight>\n   </font>\n   <left/>\n   <vcenter/>\n   <string>S/O #</string>\n  </label>\n  <label>\n   <rect>\n    <x>665</x>\n    <y>15</y>\n    <width>80</width>\n    <height>15</height>\n   </rect>\n   <font>\n    <face>Arial</face>\n    <size>8</size>\n    <weight>normal</weight>\n   </font>\n   <right/>\n   <vcenter/>\n   <string>Ext'd Price</string>\n  </label>\n  <label>\n   <rect>\n    <x>432</x>\n    <y>15</y>\n    <width>100</width>\n    <height>15</height>\n   </rect>\n   <font>\n    <face>Arial</face>\n    <size>8</size>\n    <weight>normal</weight>\n   </font>\n   <left/>\n   <vcenter/>\n   <string>Description</string>\n  </label>\n </pghead>\n <section>\n  <name>detail</name>\n  <detail>\n   <key>\n    <query>detail</query>\n   </key>\n   <height>52</height>\n   <field>\n    <rect>\n     <x>585</x>\n     <y>0</y>\n     <width>80</width>\n     <height>15</height>\n    </rect>\n    <font>\n     <face>Arial</face>\n     <size>8</size>\n     <weight>bold</weight>\n    </font>\n    <right/>\n    <vcenter/>\n    <data>\n     <query>detail</query>\n     <column>ordered</column>\n    </data>\n   </field>\n   <field>\n    <rect>\n     <x>432</x>\n     <y>15</y>\n     <width>225</width>\n     <height>15</height>\n    </rect>\n    <font>\n     <face>Arial</face>\n     <size>8</size>\n     <weight>bold</weight>\n    </font>\n    <left/>\n    <vcenter/>\n    <data>\n     <query>detail</query>\n     <column>item_descrip1</column>\n    </data>\n   </field>\n   <field>\n    <rect>\n     <x>5</x>\n     <y>0</y>\n     <width>100</width>\n     <height>15</height>\n    </rect>\n    <font>\n     <face>Arial</face>\n     <size>8</size>\n     <weight>bold</weight>\n    </font>\n    <left/>\n    <vcenter/>\n    <data>\n     <query>detail</query>\n     <column>sonumber</column>\n    </data>\n   </field>\n   <field>\n    <rect>\n     <x>432</x>\n     <y>0</y>\n     <width>150</width>\n     <height>15</height>\n    </rect>\n    <font>\n     <face>Arial</face>\n     <size>8</size>\n     <weight>bold</weight>\n    </font>\n    <left/>\n    <vcenter/>\n    <data>\n     <query>detail</query>\n     <column>item_number</column>\n    </data>\n   </field>\n   <field>\n    <rect>\n     <x>665</x>\n     <y>15</y>\n     <width>80</width>\n     <height>15</height>\n    </rect>\n    <font>\n     <face>Arial</face>\n     <size>8</size>\n     <weight>bold</weight>\n    </font>\n    <right/>\n    <vcenter/>\n    <data>\n     <query>detail</query>\n     <column>f_extprice</column>\n    </data>\n   </field>\n   <field>\n    <rect>\n     <x>200</x>\n     <y>15</y>\n     <width>200</width>\n     <height>15</height>\n    </rect>\n    <font>\n     <face>Arial</face>\n     <size>8</size>\n     <weight>bold</weight>\n    </font>\n    <left/>\n    <vcenter/>\n    <data>\n     <query>detail</query>\n     <column>cust_name</column>\n    </data>\n   </field>\n   <field>\n    <rect>\n     <x>665</x>\n     <y>0</y>\n     <width>80</width>\n     <height>15</height>\n    </rect>\n    <font>\n     <face>Arial</face>\n     <size>8</size>\n     <weight>bold</weight>\n    </font>\n    <right/>\n    <vcenter/>\n    <data>\n     <query>detail</query>\n     <column>unitprice</column>\n    </data>\n   </field>\n   <line>\n    <xstart>4</xstart>\n    <ystart>47</ystart>\n    <xend>744</xend>\n    <yend>47</yend>\n    <weight>0</weight>\n   </line>\n   <field>\n    <rect>\n     <x>200</x>\n     <y>0</y>\n     <width>200</width>\n     <height>15</height>\n    </rect>\n    <font>\n     <face>Arial</face>\n     <size>8</size>\n     <weight>bold</weight>\n    </font>\n    <left/>\n    <vcenter/>\n    <data>\n     <query>detail</query>\n     <column>cust_number</column>\n    </data>\n   </field>\n   <field>\n    <rect>\n     <x>432</x>\n     <y>30</y>\n     <width>300</width>\n     <height>15</height>\n    </rect>\n    <font>\n     <face>Arial</face>\n     <size>8</size>\n     <weight>bold</weight>\n    </font>\n    <left/>\n    <vcenter/>\n    <data>\n     <query>detail</query>\n     <column>item_descrip2</column>\n    </data>\n   </field>\n   <field>\n    <rect>\n     <x>110</x>\n     <y>0</y>\n     <width>80</width>\n     <height>15</height>\n    </rect>\n    <font>\n     <face>Arial</face>\n     <size>8</size>\n     <weight>bold</weight>\n    </font>\n    <hcenter/>\n    <vcenter/>\n    <data>\n     <query>detail</query>\n     <column>orddate</column>\n    </data>\n   </field>\n  </detail>\n </section>\n <pgfoot>\n  <height>17</height>\n  <label>\n   <rect>\n    <x>600</x>\n    <y>0</y>\n    <width>100</width>\n    <height>15</height>\n   </rect>\n   <font>\n    <face>Arial</face>\n    <size>8</size>\n    <weight>normal</weight>\n   </font>\n   <right/>\n   <vcenter/>\n   <string>Page:</string>\n  </label>\n  <field>\n   <rect>\n    <x>102</x>\n    <y>0</y>\n    <width>100</width>\n    <height>15</height>\n   </rect>\n   <font>\n    <face>Arial</face>\n    <size>8</size>\n    <weight>bold</weight>\n   </font>\n   <left/>\n   <vcenter/>\n   <data>\n    <query>Context Query</query>\n    <column>report_date</column>\n   </data>\n  </field>\n  <label>\n   <rect>\n    <x>0</x>\n    <y>0</y>\n    <width>100</width>\n    <height>15</height>\n   </rect>\n   <font>\n    <face>Arial</face>\n    <size>8</size>\n    <weight>normal</weight>\n   </font>\n   <right/>\n   <vcenter/>\n   <string>Report Date:</string>\n  </label>\n  <field>\n   <rect>\n    <x>705</x>\n    <y>0</y>\n    <width>40</width>\n    <height>15</height>\n   </rect>\n   <font>\n    <face>Arial</face>\n    <size>8</size>\n    <weight>bold</weight>\n   </font>\n   <left/>\n   <vcenter/>\n   <data>\n    <query>Context Query</query>\n    <column>page_number</column>\n   </data>\n  </field>\n </pgfoot>\n</report>\n		0	2015-10-01 17:14:33.361434
445	BriefSalesHistory	\N	<!DOCTYPE openRPTDef>\n<report>\n <title>Brief Sales History</title>\n <name>BriefSalesHistory</name>\n <description></description>\n <grid>\n  <snap/>\n  <show/>\n  <x>0.05</x>\n  <y>0.05</y>\n </grid>\n <size>Letter</size>\n <portrait/>\n <topmargin>50</topmargin>\n <bottommargin>50</bottommargin>\n <rightmargin>50</rightmargin>\n <leftmargin>50</leftmargin>\n <querysource>\n  <name>head</name>\n  <sql>SELECT &lt;? if exists("startDate") ?>\n         formatDate(date(&lt;? value("startDate") ?>))\n       &lt;? else ?>\n         text('Earliest')\n       &lt;? endif ?> AS startDate,\n       &lt;? if exists("endDate") ?>\n         formatDate(date(&lt;? value("endDate") ?>))\n       &lt;? else ?>\n         text('Latest')\n       &lt;? endif ?> AS endDate,\n       &lt;? if exists("showPrices") ?>\n           text('Unit Price') AS lbl_unitprice,\n           text('Total') AS lbl_total,\n       &lt;? else ?>\n           text('') AS lbl_unitprice,\n           text('') AS lbl_total,\n       &lt;? endif ?>\n       &lt;? if exists("warehous_id") ?>\n         (SELECT warehous_code FROM whsinfo WHERE warehous_id=&lt;? value("warehous_id") ?>)\n       &lt;? else ?>\n         text('All Sites')\n       &lt;? endif ?>\n       AS warehouse,\n       &lt;? if exists("cust_id") ?>\n         (SELECT cust_name FROM custinfo WHERE cust_id=&lt;? value("cust_id") ?>)\n       &lt;? else ?>\n         text('All Customers')\n       &lt;? endif ?>\n         AS cust_name,\n       &lt;? if exists("custtype_id") ?>\n         (SELECT custtype_code FROM custtype WHERE custtype_id=&lt;? value("custtype_id") ?>)\n       &lt;? else ?>\n         text('All Customer Types')\n       &lt;? endif ?>\n         AS custtype_code,\n       &lt;? if exists("custtype_pattern") ?>\n           text(&lt;? value("custtype_pattern") ?>)\n       &lt;? else ?>\n           text('Not Applicable')\n       &lt;? endif ?>\n         AS custtype_pattern,\n       &lt;? if exists("custgrp_id") ?>\n         (SELECT custgrp_name FROM custgrp WHERE custgrp_id=&lt;? value("custgrp_id") ?>)\n       &lt;? else ?>\n         text('All Customer Groups')\n       &lt;? endif ?>\n         AS custgrp_name,\n       &lt;? if exists("custgrp_pattern") ?>\n           text(&lt;? value("custgrp_pattern") ?>)\n       &lt;? else ?>\n           text('Not Applicable')\n       &lt;? endif ?>\n         AS custgrp_pattern,\n      &lt;? if exists("prodcat_id") ?>\n         (SELECT prodcat_code FROM prodcat WHERE prodcat_id=&lt;? value("prodcat_id") ?>)\n       &lt;? else ?>\n         text('All Product Categories')\n       &lt;? endif ?>\n         AS prodcat_code,\n       &lt;? if exists("prodcat_pattern") ?>\n           text(&lt;? value("prodcat_pattern") ?>)\n       &lt;? else ?>\n           text('Not Applicable')\n       &lt;? endif ?>\n         AS prodcat_pattern,\n       &lt;? if exists("item_id") ?>\n         (SELECT item_number FROM item WHERE item_id=&lt;? value("item_id") ?>)\n       &lt;? else ?>\n         text('All Item Numbers')\n       &lt;? endif ?>\n         AS item_number,\n       &lt;? if exists("cohead_id") ?>\n         (SELECT cohead_number FROM cohead WHERE cohead_id=&lt;? value("cohead_id") ?>)\n       &lt;? else ?>\n         text('All Orders')\n       &lt;? endif ?>\n         AS docnumber; </sql>\n </querysource>\n <querysource loadFromDb="true">\n  <name>detail</name>\n  <mqlgroup>briefSalesHistory</mqlgroup>\n  <mqlname>detail</mqlname>\n </querysource>\n <rpthead>\n  <height>221</height>\n  <label>\n   <rect>\n    <x>5</x>\n    <y>198</y>\n    <width>100</width>\n    <height>15</height>\n   </rect>\n   <font>\n    <face>Arial</face>\n    <size>8</size>\n    <weight>normal</weight>\n   </font>\n   <left/>\n   <vcenter/>\n   <string>Doc. #</string>\n  </label>\n  <label>\n   <rect>\n    <x>305</x>\n    <y>198</y>\n    <width>80</width>\n    <height>15</height>\n   </rect>\n   <font>\n    <face>Arial</face>\n    <size>8</size>\n    <weight>normal</weight>\n   </font>\n   <hcenter/>\n   <vcenter/>\n   <string>Invc. Date</string>\n  </label>\n  <label>\n   <rect>\n    <x>110</x>\n    <y>198</y>\n    <width>100</width>\n    <height>15</height>\n   </rect>\n   <font>\n    <face>Arial</face>\n    <size>8</size>\n    <weight>normal</weight>\n   </font>\n   <left/>\n   <vcenter/>\n   <string>Invoice #</string>\n  </label>\n  <label>\n   <rect>\n    <x>345</x>\n    <y>5</y>\n    <width>400</width>\n    <height>40</height>\n   </rect>\n   <font>\n    <face>Arial</face>\n    <size>18</size>\n    <weight>bold</weight>\n   </font>\n   <right/>\n   <vcenter/>\n   <string>Brief Sales History</string>\n  </label>\n  <label>\n   <rect>\n    <x>385</x>\n    <y>198</y>\n    <width>80</width>\n    <height>15</height>\n   </rect>\n   <font>\n    <face>Arial</face>\n    <size>8</size>\n    <weight>normal</weight>\n   </font>\n   <right/>\n   <vcenter/>\n   <string>Total Price</string>\n  </label>\n  <label>\n   <rect>\n    <x>220</x>\n    <y>198</y>\n    <width>80</width>\n    <height>15</height>\n   </rect>\n   <font>\n    <face>Arial</face>\n    <size>8</size>\n    <weight>normal</weight>\n   </font>\n   <hcenter/>\n   <vcenter/>\n   <string>Ord. Date</string>\n  </label>\n  <line>\n   <xstart>0</xstart>\n   <ystart>218</ystart>\n   <xend>745</xend>\n   <yend>218</yend>\n   <weight>2</weight>\n  </line>\n  <text>\n   <rect>\n    <x>10</x>\n    <y>38</y>\n    <width>725</width>\n    <height>15</height>\n   </rect>\n   <bottompad>12</bottompad>\n   <font>\n    <face>Arial</face>\n    <size>10</size>\n    <weight>bold</weight>\n   </font>\n   <left/>\n   <top/>\n   <data>\n    <query>Parameter Query</query>\n    <column>filter</column>\n   </data>\n  </text>\n  <label>\n   <rect>\n    <x>5</x>\n    <y>183</y>\n    <width>100</width>\n    <height>15</height>\n   </rect>\n   <font>\n    <face>Arial</face>\n    <size>8</size>\n    <weight>normal</weight>\n   </font>\n   <left/>\n   <vcenter/>\n   <string>Cust. #</string>\n  </label>\n  <label>\n   <rect>\n    <x>110</x>\n    <y>183</y>\n    <width>100</width>\n    <height>15</height>\n   </rect>\n   <font>\n    <face>Arial</face>\n    <size>8</size>\n    <weight>normal</weight>\n   </font>\n   <left/>\n   <vcenter/>\n   <string>Cust. Type</string>\n  </label>\n  <label>\n   <rect>\n    <x>240</x>\n    <y>183</y>\n    <width>100</width>\n    <height>15</height>\n   </rect>\n   <font>\n    <face>Arial</face>\n    <size>8</size>\n    <weight>normal</weight>\n   </font>\n   <left/>\n   <vcenter/>\n   <string>Cust. Name</string>\n  </label>\n  <label>\n   <rect>\n    <x>475</x>\n    <y>198</y>\n    <width>80</width>\n    <height>15</height>\n   </rect>\n   <font>\n    <face>Arial</face>\n    <size>8</size>\n    <weight>normal</weight>\n   </font>\n   <right/>\n   <vcenter/>\n   <string>Total Cost</string>\n  </label>\n  <label>\n   <rect>\n    <x>565</x>\n    <y>198</y>\n    <width>80</width>\n    <height>15</height>\n   </rect>\n   <font>\n    <face>Arial</face>\n    <size>8</size>\n    <weight>normal</weight>\n   </font>\n   <right/>\n   <vcenter/>\n   <string>Margin</string>\n  </label>\n  <label>\n   <rect>\n    <x>655</x>\n    <y>198</y>\n    <width>80</width>\n    <height>15</height>\n   </rect>\n   <font>\n    <face>Arial</face>\n    <size>8</size>\n    <weight>normal</weight>\n   </font>\n   <right/>\n   <vcenter/>\n   <string>Margin %</string>\n  </label>\n </rpthead>\n <pghead>\n  <firstpage/>\n  <height>6</height>\n </pghead>\n <pghead>\n  <height>21</height>\n  <label>\n   <rect>\n    <x>665</x>\n    <y>0</y>\n    <width>80</width>\n    <height>15</height>\n   </rect>\n   <font>\n    <face>Arial</face>\n    <size>8</size>\n    <weight>normal</weight>\n   </font>\n   <hcenter/>\n   <vcenter/>\n   <string>Total</string>\n  </label>\n  <label>\n   <rect>\n    <x>270</x>\n    <y>0</y>\n    <width>80</width>\n    <height>15</height>\n   </rect>\n   <font>\n    <face>Arial</face>\n    <size>8</size>\n    <weight>normal</weight>\n   </font>\n   <hcenter/>\n   <vcenter/>\n   <string>Ord. Date</string>\n  </label>\n  <label>\n   <rect>\n    <x>110</x>\n    <y>0</y>\n    <width>100</width>\n    <height>15</height>\n   </rect>\n   <font>\n    <face>Arial</face>\n    <size>8</size>\n    <weight>normal</weight>\n   </font>\n   <left/>\n   <vcenter/>\n   <string>Invoice #</string>\n  </label>\n  <line>\n   <xstart>5</xstart>\n   <ystart>15</ystart>\n   <xend>745</xend>\n   <yend>15</yend>\n   <weight>2</weight>\n  </line>\n  <label>\n   <rect>\n    <x>355</x>\n    <y>0</y>\n    <width>80</width>\n    <height>15</height>\n   </rect>\n   <font>\n    <face>Arial</face>\n    <size>8</size>\n    <weight>normal</weight>\n   </font>\n   <hcenter/>\n   <vcenter/>\n   <string>Ship Date</string>\n  </label>\n  <label>\n   <rect>\n    <x>5</x>\n    <y>0</y>\n    <width>100</width>\n    <height>15</height>\n   </rect>\n   <font>\n    <face>Arial</face>\n    <size>8</size>\n    <weight>normal</weight>\n   </font>\n   <left/>\n   <vcenter/>\n   <string>Doc. #</string>\n  </label>\n </pghead>\n <section>\n  <name>detail</name>\n  <detail>\n   <key>\n    <query>detail</query>\n   </key>\n   <height>37</height>\n   <field>\n    <rect>\n     <x>5</x>\n     <y>17</y>\n     <width>100</width>\n     <height>15</height>\n    </rect>\n    <font>\n     <face>Arial</face>\n     <size>8</size>\n     <weight>bold</weight>\n    </font>\n    <left/>\n    <vcenter/>\n    <data>\n     <query>detail</query>\n     <column>cohist_ordernumber</column>\n    </data>\n   </field>\n   <field>\n    <rect>\n     <x>110</x>\n     <y>17</y>\n     <width>100</width>\n     <height>15</height>\n    </rect>\n    <font>\n     <face>Arial</face>\n     <size>8</size>\n     <weight>bold</weight>\n    </font>\n    <left/>\n    <vcenter/>\n    <data>\n     <query>detail</query>\n     <column>invoicenumber</column>\n    </data>\n   </field>\n   <field>\n    <rect>\n     <x>565</x>\n     <y>17</y>\n     <width>80</width>\n     <height>15</height>\n    </rect>\n    <font>\n     <face>Arial</face>\n     <size>8</size>\n     <weight>bold</weight>\n    </font>\n    <right/>\n    <vcenter/>\n    <data>\n     <query>detail</query>\n     <column>f_margin</column>\n    </data>\n   </field>\n   <field>\n    <rect>\n     <x>305</x>\n     <y>17</y>\n     <width>80</width>\n     <height>15</height>\n    </rect>\n    <font>\n     <face>Arial</face>\n     <size>8</size>\n     <weight>bold</weight>\n    </font>\n    <hcenter/>\n    <vcenter/>\n    <data>\n     <query>detail</query>\n     <column>f_invcdate</column>\n    </data>\n   </field>\n   <field>\n    <rect>\n     <x>220</x>\n     <y>17</y>\n     <width>80</width>\n     <height>15</height>\n    </rect>\n    <font>\n     <face>Arial</face>\n     <size>8</size>\n     <weight>bold</weight>\n    </font>\n    <hcenter/>\n    <vcenter/>\n    <data>\n     <query>detail</query>\n     <column>f_orderdate</column>\n    </data>\n   </field>\n   <field>\n    <rect>\n     <x>5</x>\n     <y>2</y>\n     <width>100</width>\n     <height>15</height>\n    </rect>\n    <font>\n     <face>Arial</face>\n     <size>8</size>\n     <weight>bold</weight>\n    </font>\n    <left/>\n    <vcenter/>\n    <data>\n     <query>detail</query>\n     <column>cust_number</column>\n    </data>\n   </field>\n   <field>\n    <rect>\n     <x>110</x>\n     <y>2</y>\n     <width>100</width>\n     <height>15</height>\n    </rect>\n    <font>\n     <face>Arial</face>\n     <size>8</size>\n     <weight>bold</weight>\n    </font>\n    <left/>\n    <vcenter/>\n    <data>\n     <query>detail</query>\n     <column>custtype_code</column>\n    </data>\n   </field>\n   <field>\n    <rect>\n     <x>225</x>\n     <y>2</y>\n     <width>320</width>\n     <height>15</height>\n    </rect>\n    <font>\n     <face>Arial</face>\n     <size>8</size>\n     <weight>bold</weight>\n    </font>\n    <left/>\n    <vcenter/>\n    <data>\n     <query>detail</query>\n     <column>cust_name</column>\n    </data>\n   </field>\n   <field>\n    <rect>\n     <x>390</x>\n     <y>17</y>\n     <width>80</width>\n     <height>15</height>\n    </rect>\n    <font>\n     <face>Arial</face>\n     <size>8</size>\n     <weight>bold</weight>\n    </font>\n    <right/>\n    <vcenter/>\n    <data>\n     <query>detail</query>\n     <column>f_baseextprice</column>\n    </data>\n   </field>\n   <field>\n    <rect>\n     <x>475</x>\n     <y>17</y>\n     <width>80</width>\n     <height>15</height>\n    </rect>\n    <font>\n     <face>Arial</face>\n     <size>8</size>\n     <weight>bold</weight>\n    </font>\n    <right/>\n    <vcenter/>\n    <data>\n     <query>detail</query>\n     <column>f_extcost</column>\n    </data>\n   </field>\n   <field>\n    <rect>\n     <x>655</x>\n     <y>17</y>\n     <width>80</width>\n     <height>15</height>\n    </rect>\n    <font>\n     <face>Arial</face>\n     <size>8</size>\n     <weight>bold</weight>\n    </font>\n    <right/>\n    <vcenter/>\n    <data>\n     <query>detail</query>\n     <column>f_marginpercent</column>\n    </data>\n   </field>\n  </detail>\n </section>\n <pgfoot>\n  <height>16</height>\n  <label>\n   <rect>\n    <x>0</x>\n    <y>0</y>\n    <width>100</width>\n    <height>15</height>\n   </rect>\n   <font>\n    <face>Arial</face>\n    <size>8</size>\n    <weight>normal</weight>\n   </font>\n   <right/>\n   <vcenter/>\n   <string>Report Date:</string>\n  </label>\n  <field>\n   <rect>\n    <x>705</x>\n    <y>0</y>\n    <width>40</width>\n    <height>15</height>\n   </rect>\n   <font>\n    <face>Arial</face>\n    <size>8</size>\n    <weight>bold</weight>\n   </font>\n   <left/>\n   <vcenter/>\n   <data>\n    <query>Context Query</query>\n    <column>page_number</column>\n   </data>\n  </field>\n  <field>\n   <rect>\n    <x>103</x>\n    <y>0</y>\n    <width>100</width>\n    <height>15</height>\n   </rect>\n   <font>\n    <face>Arial</face>\n    <size>8</size>\n    <weight>bold</weight>\n   </font>\n   <left/>\n   <vcenter/>\n   <data>\n    <query>Context Query</query>\n    <column>report_date</column>\n   </data>\n  </field>\n  <label>\n   <rect>\n    <x>600</x>\n    <y>0</y>\n    <width>100</width>\n    <height>15</height>\n   </rect>\n   <font>\n    <face>Arial</face>\n    <size>8</size>\n    <weight>normal</weight>\n   </font>\n   <right/>\n   <vcenter/>\n   <string>Page:</string>\n  </label>\n </pgfoot>\n <rptfoot>\n  <height>21</height>\n  <label>\n   <rect>\n    <x>285</x>\n    <y>5</y>\n    <width>80</width>\n    <height>15</height>\n   </rect>\n   <font>\n    <face>Arial</face>\n    <size>8</size>\n    <weight>normal</weight>\n   </font>\n   <right/>\n   <vcenter/>\n   <string>Total:</string>\n  </label>\n  <field>\n   <rect>\n    <x>390</x>\n    <y>5</y>\n    <width>80</width>\n    <height>15</height>\n   </rect>\n   <font>\n    <face>Arial</face>\n    <size>8</size>\n    <weight>bold</weight>\n   </font>\n   <right/>\n   <vcenter/>\n   <data>\n    <query>detail</query>\n    <column>baseextprice</column>\n   </data>\n   <format builtin="true">money</format>\n   <tracktotal/>\n  </field>\n  <field>\n   <rect>\n    <x>475</x>\n    <y>5</y>\n    <width>80</width>\n    <height>15</height>\n   </rect>\n   <font>\n    <face>Arial</face>\n    <size>8</size>\n    <weight>bold</weight>\n   </font>\n   <right/>\n   <vcenter/>\n   <data>\n    <query>detail</query>\n    <column>extcost</column>\n   </data>\n   <format builtin="true">money</format>\n   <tracktotal/>\n  </field>\n  <field>\n   <rect>\n    <x>565</x>\n    <y>5</y>\n    <width>80</width>\n    <height>15</height>\n   </rect>\n   <font>\n    <face>Arial</face>\n    <size>8</size>\n    <weight>bold</weight>\n   </font>\n   <right/>\n   <vcenter/>\n   <data>\n    <query>detail</query>\n    <column>margin</column>\n   </data>\n   <format builtin="true">money</format>\n   <tracktotal/>\n  </field>\n </rptfoot>\n</report>\n		0	2015-10-01 17:14:33.361434
211	CashReceiptsEditList	\N	<!DOCTYPE openRPTDef>\n<report>\n <title>Cash Receipt Edit List</title>\n <name>CashReceiptsEditList</name>\n <description></description>\n <grid>\n  <snap/>\n  <show/>\n  <x>0.05</x>\n  <y>0.05</y>\n </grid>\n <size>Letter</size>\n <portrait/>\n <topmargin>50</topmargin>\n <bottommargin>50</bottommargin>\n <rightmargin>50</rightmargin>\n <leftmargin>50</leftmargin>\n <querysource>\n  <name>detail</name>\n  <sql>SELECT cashrcpt_id, 1 AS orderBy,\n       cust_number, cust_name,\n       formatDate(cashrcpt_distdate) AS f_distdate,\n       CASE WHEN (cashrcpt_fundstype = 'C') THEN &lt;? value("check") ?>\n            WHEN (cashrcpt_fundstype = 'T') THEN &lt;? value("certifiedCheck") ?>\n            WHEN (cashrcpt_fundstype = 'M') THEN &lt;? value("masterCard") ?>\n            WHEN (cashrcpt_fundstype = 'V') THEN &lt;? value("visa") ?>\n            WHEN (cashrcpt_fundstype = 'A') THEN &lt;? value("americanExpress") ?>\n            WHEN (cashrcpt_fundstype = 'D') THEN &lt;? value("discoverCard") ?>\n            WHEN (cashrcpt_fundstype = 'R') THEN &lt;? value("otherCreditCard") ?>\n            WHEN (cashrcpt_fundstype = 'K') THEN &lt;? value("cash") ?>\n            WHEN (cashrcpt_fundstype = 'W') THEN &lt;? value("wireTransfer") ?>\n            ELSE &lt;? value("other") ?>\n       END AS f_fundstype,\n       'C/R' AS doctype,\n       cashrcpt_docnumber AS docnumber,\n       cashrcpt_amount AS amount,\n       formatMoney(cashrcpt_amount) AS f_amount,\n       0 AS detailedamount,\n       formatMoney(0) AS f_detailedamount,\n       bankaccnt_name\nFROM cashrcpt, bankaccnt, custinfo\nWHERE ( (cashrcpt_bankaccnt_id=bankaccnt_id)\n  AND   (cashrcpt_cust_id=cust_id)\n  AND   (NOT cashrcpt_posted)\n  AND   (NOT cashrcpt_void) )\n\nUNION\nSELECT cashrcpt_id, 2 AS orderBy,\n       '' AS cust_number, '' AS cust_name,\n       '' AS f_distdate,\n       '' AS f_fundstype,\n       aropen_doctype AS doctype,\n       aropen_docnumber AS docnumber,\n       0 AS amount,\n       formatMoney(0) AS f_amount,\n       cashrcptitem_amount AS detailedamount,\n       formatMoney(cashrcptitem_amount) AS f_detailedamount,\n       '' AS bankaccnt_name\nFROM cashrcptitem, cashrcpt, aropen\nWHERE ( (cashrcptitem_cashrcpt_id=cashrcpt_id)\n  AND   (cashrcptitem_aropen_id=aropen_id)\n  AND   (NOT cashrcpt_posted)\n  AND   (NOT cashrcpt_void) )\n\nUNION\nSELECT cashrcpt_id, 3 AS orderBy,\n       '' AS cust_number, '' AS cust_name,\n       '' AS f_distdate,\n       '' AS f_fundstype,\n       'Misc.' AS doctype,\n       (formatGLAccount(accnt_id) || '-' || accnt_descrip) AS docnumber,\n       0 AS amount,\n       formatMoney(0) AS f_amount,\n       cashrcptmisc_amount AS detailedamount,\n       formatMoney(cashrcptmisc_amount) AS f_detailedamount,\n       '' AS bankaccnt_name\nFROM cashrcptmisc, cashrcpt, accnt\nWHERE ( (cashrcptmisc_cashrcpt_id=cashrcpt_id)\n  AND   (cashrcptmisc_accnt_id=accnt_id)\n  AND   (NOT cashrcpt_posted)\n  AND   (NOT cashrcpt_void) )\n\nORDER BY cashrcpt_id, orderBy;\n\n</sql>\n </querysource>\n <rpthead>\n  <height>145</height>\n  <label>\n   <rect>\n    <x>80</x>\n    <y>100</y>\n    <width>125</width>\n    <height>15</height>\n   </rect>\n   <font>\n    <face>Arial</face>\n    <size>8</size>\n    <weight>normal</weight>\n   </font>\n   <hcenter/>\n   <vcenter/>\n   <string>Customer</string>\n  </label>\n  <label>\n   <rect>\n    <x>525</x>\n    <y>113</y>\n    <width>80</width>\n    <height>15</height>\n   </rect>\n   <font>\n    <face>Arial</face>\n    <size>8</size>\n    <weight>normal</weight>\n   </font>\n   <hcenter/>\n   <vcenter/>\n   <string>Amount Applied</string>\n  </label>\n  <label>\n   <rect>\n    <x>525</x>\n    <y>100</y>\n    <width>80</width>\n    <height>15</height>\n   </rect>\n   <font>\n    <face>Arial</face>\n    <size>8</size>\n    <weight>normal</weight>\n   </font>\n   <hcenter/>\n   <vcenter/>\n   <string>Amount</string>\n  </label>\n  <label>\n   <rect>\n    <x>85</x>\n    <y>113</y>\n    <width>155</width>\n    <height>15</height>\n   </rect>\n   <font>\n    <face>Arial</face>\n    <size>8</size>\n    <weight>normal</weight>\n   </font>\n   <left/>\n   <vcenter/>\n   <string>Document/Account Number</string>\n  </label>\n  <label>\n   <rect>\n    <x>5</x>\n    <y>113</y>\n    <width>75</width>\n    <height>15</height>\n   </rect>\n   <font>\n    <face>Arial</face>\n    <size>8</size>\n    <weight>normal</weight>\n   </font>\n   <hcenter/>\n   <vcenter/>\n   <string>Doc. Type</string>\n  </label>\n  <label>\n   <rect>\n    <x>315</x>\n    <y>100</y>\n    <width>80</width>\n    <height>15</height>\n   </rect>\n   <font>\n    <face>Arial</face>\n    <size>8</size>\n    <weight>normal</weight>\n   </font>\n   <hcenter/>\n   <vcenter/>\n   <string>Payment Type</string>\n  </label>\n  <label>\n   <rect>\n    <x>10</x>\n    <y>100</y>\n    <width>60</width>\n    <height>15</height>\n   </rect>\n   <font>\n    <face>Arial</face>\n    <size>8</size>\n    <weight>normal</weight>\n   </font>\n   <hcenter/>\n   <vcenter/>\n   <string>Cust #</string>\n  </label>\n  <label>\n   <rect>\n    <x>265</x>\n    <y>5</y>\n    <width>465</width>\n    <height>38</height>\n   </rect>\n   <font>\n    <face>Arial</face>\n    <size>18</size>\n    <weight>bold</weight>\n   </font>\n   <right/>\n   <vcenter/>\n   <string>Cash Receipts Edit List</string>\n  </label>\n  <line>\n   <xstart>5</xstart>\n   <ystart>130</ystart>\n   <xend>745</xend>\n   <yend>130</yend>\n   <weight>2</weight>\n  </line>\n  <label>\n   <rect>\n    <x>229</x>\n    <y>100</y>\n    <width>60</width>\n    <height>15</height>\n   </rect>\n   <font>\n    <face>Arial</face>\n    <size>8</size>\n    <weight>normal</weight>\n   </font>\n   <hcenter/>\n   <vcenter/>\n   <string>Dist. Date</string>\n  </label>\n  <label>\n   <rect>\n    <x>415</x>\n    <y>100</y>\n    <width>70</width>\n    <height>15</height>\n   </rect>\n   <font>\n    <face>Arial</face>\n    <size>8</size>\n    <weight>normal</weight>\n   </font>\n   <hcenter/>\n   <vcenter/>\n   <string>Reference #</string>\n  </label>\n  <label>\n   <rect>\n    <x>610</x>\n    <y>100</y>\n    <width>80</width>\n    <height>15</height>\n   </rect>\n   <font>\n    <face>Arial</face>\n    <size>8</size>\n    <weight>normal</weight>\n   </font>\n   <hcenter/>\n   <vcenter/>\n   <string>Bank Account</string>\n  </label>\n </rpthead>\n <section>\n  <name>detail</name>\n  <group>\n   <name>detail</name>\n   <column>cashrcpt_id</column>\n   <head>\n    <height>18</height>\n    <field>\n     <rect>\n      <x>540</x>\n      <y>0</y>\n      <width>60</width>\n      <height>15</height>\n     </rect>\n     <font>\n      <face>Arial</face>\n      <size>8</size>\n      <weight>bold</weight>\n     </font>\n     <right/>\n     <vcenter/>\n     <data>\n      <query>detail</query>\n      <column>f_amount</column>\n     </data>\n    </field>\n    <field>\n     <rect>\n      <x>85</x>\n      <y>0</y>\n      <width>130</width>\n      <height>15</height>\n     </rect>\n     <font>\n      <face>Arial</face>\n      <size>8</size>\n      <weight>bold</weight>\n     </font>\n     <hcenter/>\n     <vcenter/>\n     <data>\n      <query>detail</query>\n      <column>cust_name</column>\n     </data>\n    </field>\n    <field>\n     <rect>\n      <x>615</x>\n      <y>0</y>\n      <width>125</width>\n      <height>15</height>\n     </rect>\n     <font>\n      <face>Arial</face>\n      <size>8</size>\n      <weight>bold</weight>\n     </font>\n     <left/>\n     <vcenter/>\n     <data>\n      <query>detail</query>\n      <column>bankaccnt_name</column>\n     </data>\n    </field>\n    <field>\n     <rect>\n      <x>10</x>\n      <y>0</y>\n      <width>60</width>\n      <height>15</height>\n     </rect>\n     <font>\n      <face>Arial</face>\n      <size>8</size>\n      <weight>bold</weight>\n     </font>\n     <hcenter/>\n     <vcenter/>\n     <data>\n      <query>detail</query>\n      <column>cust_number</column>\n     </data>\n    </field>\n    <field>\n     <rect>\n      <x>315</x>\n      <y>0</y>\n      <width>80</width>\n      <height>15</height>\n     </rect>\n     <font>\n      <face>Arial</face>\n      <size>8</size>\n      <weight>bold</weight>\n     </font>\n     <hcenter/>\n     <vcenter/>\n     <data>\n      <query>detail</query>\n      <column>f_fundstype</column>\n     </data>\n    </field>\n    <field>\n     <rect>\n      <x>409</x>\n      <y>0</y>\n      <width>110</width>\n      <height>15</height>\n     </rect>\n     <font>\n      <face>Arial</face>\n      <size>8</size>\n      <weight>bold</weight>\n     </font>\n     <right/>\n     <vcenter/>\n     <data>\n      <query>detail</query>\n      <column>docnumber</column>\n     </data>\n    </field>\n    <field>\n     <rect>\n      <x>229</x>\n      <y>0</y>\n      <width>60</width>\n      <height>15</height>\n     </rect>\n     <font>\n      <face>Arial</face>\n      <size>8</size>\n      <weight>bold</weight>\n     </font>\n     <left/>\n     <vcenter/>\n     <data>\n      <query>detail</query>\n      <column>f_distdate</column>\n     </data>\n    </field>\n   </head>\n   <foot>\n    <height>41</height>\n    <field>\n     <rect>\n      <x>670</x>\n      <y>5</y>\n      <width>75</width>\n      <height>15</height>\n     </rect>\n     <font>\n      <face>Arial</face>\n      <size>8</size>\n      <weight>bold</weight>\n     </font>\n     <right/>\n     <vcenter/>\n     <data>\n      <query>detail</query>\n      <column>detailedamount</column>\n     </data>\n     <format builtin="true">extprice</format>\n     <tracktotal subtotal="true"/>\n    </field>\n    <line>\n     <xstart>5</xstart>\n     <ystart>25</ystart>\n     <xend>740</xend>\n     <yend>25</yend>\n     <weight>2</weight>\n    </line>\n    <label>\n     <rect>\n      <x>585</x>\n      <y>5</y>\n      <width>80</width>\n      <height>15</height>\n     </rect>\n     <font>\n      <face>Arial</face>\n      <size>8</size>\n      <weight>normal</weight>\n     </font>\n     <right/>\n     <vcenter/>\n     <string>Applications:</string>\n    </label>\n   </foot>\n  </group>\n  <detail>\n   <key>\n    <query>detail</query>\n   </key>\n   <height>18</height>\n   <field>\n    <rect>\n     <x>85</x>\n     <y>0</y>\n     <width>315</width>\n     <height>15</height>\n    </rect>\n    <font>\n     <face>Arial</face>\n     <size>8</size>\n     <weight>bold</weight>\n    </font>\n    <left/>\n    <vcenter/>\n    <data>\n     <query>detail</query>\n     <column>docnumber</column>\n    </data>\n   </field>\n   <field>\n    <rect>\n     <x>15</x>\n     <y>0</y>\n     <width>50</width>\n     <height>15</height>\n    </rect>\n    <font>\n     <face>Arial</face>\n     <size>8</size>\n     <weight>bold</weight>\n    </font>\n    <hcenter/>\n    <vcenter/>\n    <data>\n     <query>detail</query>\n     <column>doctype</column>\n    </data>\n   </field>\n   <field>\n    <rect>\n     <x>540</x>\n     <y>0</y>\n     <width>60</width>\n     <height>15</height>\n    </rect>\n    <font>\n     <face>Arial</face>\n     <size>8</size>\n     <weight>bold</weight>\n    </font>\n    <right/>\n    <vcenter/>\n    <data>\n     <query>detail</query>\n     <column>f_detailedamount</column>\n    </data>\n   </field>\n  </detail>\n </section>\n <pgfoot>\n  <height>28</height>\n  <field>\n   <rect>\n    <x>90</x>\n    <y>0</y>\n    <width>100</width>\n    <height>15</height>\n   </rect>\n   <font>\n    <face>Arial</face>\n    <size>8</size>\n    <weight>bold</weight>\n   </font>\n   <left/>\n   <vcenter/>\n   <data>\n    <query>Context Query</query>\n    <column>report_date</column>\n   </data>\n  </field>\n  <label>\n   <rect>\n    <x>615</x>\n    <y>0</y>\n    <width>85</width>\n    <height>15</height>\n   </rect>\n   <font>\n    <face>Arial</face>\n    <size>8</size>\n    <weight>normal</weight>\n   </font>\n   <right/>\n   <vcenter/>\n   <string>Page:</string>\n  </label>\n  <field>\n   <rect>\n    <x>705</x>\n    <y>0</y>\n    <width>40</width>\n    <height>15</height>\n   </rect>\n   <font>\n    <face>Arial</face>\n    <size>8</size>\n    <weight>bold</weight>\n   </font>\n   <left/>\n   <vcenter/>\n   <data>\n    <query>Context Query</query>\n    <column>page_number</column>\n   </data>\n  </field>\n  <label>\n   <rect>\n    <x>0</x>\n    <y>0</y>\n    <width>85</width>\n    <height>15</height>\n   </rect>\n   <font>\n    <face>Arial</face>\n    <size>8</size>\n    <weight>normal</weight>\n   </font>\n   <right/>\n   <vcenter/>\n   <string>Report Date:</string>\n  </label>\n </pgfoot>\n <rptfoot>\n  <height>43</height>\n  <field>\n   <rect>\n    <x>670</x>\n    <y>5</y>\n    <width>75</width>\n    <height>15</height>\n   </rect>\n   <font>\n    <face>Arial</face>\n    <size>8</size>\n    <weight>bold</weight>\n   </font>\n   <right/>\n   <vcenter/>\n   <data>\n    <query>detail</query>\n    <column>amount</column>\n   </data>\n   <format builtin="true">extprice</format>\n   <tracktotal/>\n  </field>\n  <label>\n   <rect>\n    <x>585</x>\n    <y>5</y>\n    <width>80</width>\n    <height>15</height>\n   </rect>\n   <font>\n    <face>Arial</face>\n    <size>8</size>\n    <weight>normal</weight>\n   </font>\n   <right/>\n   <vcenter/>\n   <string>Total Receipts:</string>\n  </label>\n  <line>\n   <xstart>7</xstart>\n   <ystart>28</ystart>\n   <xend>742</xend>\n   <yend>28</yend>\n   <weight>2</weight>\n  </line>\n </rptfoot>\n</report>\n		0	2015-10-01 17:14:33.361434
189	CostedIndentedBOM	\N	<!DOCTYPE openRPTDef>\n<report>\n <title>Costed Indented Bill of Materials</title>\n <name>CostedIndentedBOM</name>\n <description></description>\n <grid>\n  <snap/>\n  <show/>\n  <x>0.05</x>\n  <y>0.05</y>\n </grid>\n <size>Letter</size>\n <portrait/>\n <topmargin>50</topmargin>\n <bottommargin>50</bottommargin>\n <rightmargin>50</rightmargin>\n <leftmargin>50</leftmargin>\n <querysource>\n  <name>head</name>\n  <sql>SELECT item_number,\n       uom_name AS item_invuom,\n       item_descrip1,\n       item_descrip2,\n       &lt;? if exists("useActualCosts") ?>\n         text('Using Actual Costs') AS lbl_usecosts,\n         (SELECT formatCost(SUM(bomdata_actextendedcost))\n          FROM indentedbom(&lt;? value("item_id") ?>,&lt;? value("revision_id") ?>,0,0)\n          WHERE (bomdata_bomwork_level=1)) as t_extendedcost,\n       &lt;? else ?>\n         text('Using Standard Costs') AS lbl_usecosts,\n         (SELECT formatCost(SUM(bomdata_stdextendedcost))\n          FROM indentedbom(&lt;? value("item_id") ?>,&lt;? value("revision_id") ?>,0,0)\n          WHERE (bomdata_bomwork_level=1)) as t_extendedcost,\n       &lt;? endif ?>\n       formatCost(actcost(item_id)) AS f_actual,\n       formatCost(stdcost(item_id)) AS f_standard\n  FROM item JOIN uom ON (uom_id=item_inv_uom_id)\n WHERE (item_id=&lt;? value("item_id") ?>);\n    </sql>\n </querysource>\n <querysource>\n  <name>detail</name>\n  <sql>select (REPEAT(' ',(bomdata_bomwork_level-1)*3) || bomdata_bomwork_seqnumber) AS f_seqnumber,\n       1 AS seq_ord,\n       bomdata_item_number AS item_number,\n       bomdata_uom_name AS item_invuom,\n       bomdata_item_descrip1 AS item_descrip1,\n       bomdata_item_descrip2 AS item_descrip2,\n       bomdata_createchild as createchild,\n       bomdata_issuemethod AS issuemethod,\n       formatQtyPer(bomdata_qtyreq) AS qtyreq,\n       formatScrap(bomdata_scrap) AS scrap,\n       CASE WHEN COALESCE(bomdata_effective, startOfTime()) &lt;= startOfTime() THEN\n                 &lt;? value("always") ?> \n            ELSE formatDate(bomdata_effective)\n       END AS effective,\n       CASE WHEN COALESCE(bomdata_expires, endOfTime()) &lt;= endOfTime() THEN\n                 &lt;? value("never") ?>\n            ELSE formatDate(bomdata_expires)\n       END AS expires,\n&lt;? if exists("useActualCosts") ?>\n       formatCost(bomdata_actunitcost) AS f_unitcost,\n       formatCost(bomdata_actextendedcost) AS f_extendedcost,\n       CASE WHEN(bomdata_bomwork_parent_id=-1) THEN bomdata_actextendedcost\n            ELSE 0\n       END AS extendedcost,\n&lt;? else ?>\n       formatCost(bomdata_stdunitcost) AS f_unitcost,\n       formatCost(bomdata_stdextendedcost) AS f_extendedcost,\n       CASE WHEN(bomdata_bomwork_parent_id=-1) THEN bomdata_stdextendedcost\n            ELSE 0\n       END AS extendedcost,\n&lt;? endif ?>\n       bomdata_bomwork_level\nFROM indentedBOM(&lt;? value("item_id") ?>,&lt;? value("revision_id") ?>,0,0);\n</sql>\n </querysource>\n <querysource>\n  <name>bomhead</name>\n  <sql>SELECT bomhead_docnum, bomhead_revision,\nformatDate(bomhead_revisiondate) AS f_revisiondate\nFROM bomhead\nWHERE ((bomhead_item_id=&lt;? value("item_id") ?>)\nAND (bomhead_rev_id=&lt;? value("revision_id") ?>));</sql>\n </querysource>\n <rpthead>\n  <height>242</height>\n  <label>\n   <rect>\n    <x>580</x>\n    <y>204</y>\n    <width>75</width>\n    <height>15</height>\n   </rect>\n   <font>\n    <face>Arial</face>\n    <size>8</size>\n    <weight>normal</weight>\n   </font>\n   <hcenter/>\n   <vcenter/>\n   <string>Expires</string>\n  </label>\n  <field>\n   <rect>\n    <x>100</x>\n    <y>104</y>\n    <width>150</width>\n    <height>20</height>\n   </rect>\n   <font>\n    <face>Arial</face>\n    <size>10</size>\n    <weight>bold</weight>\n   </font>\n   <left/>\n   <vcenter/>\n   <data>\n    <query>head</query>\n    <column>item_number</column>\n   </data>\n  </field>\n  <label>\n   <rect>\n    <x>490</x>\n    <y>104</y>\n    <width>90</width>\n    <height>20</height>\n   </rect>\n   <font>\n    <face>Arial</face>\n    <size>10</size>\n    <weight>normal</weight>\n   </font>\n   <right/>\n   <vcenter/>\n   <string>Document #:</string>\n  </label>\n  <label>\n   <rect>\n    <x>340</x>\n    <y>204</y>\n    <width>75</width>\n    <height>15</height>\n   </rect>\n   <font>\n    <face>Arial</face>\n    <size>8</size>\n    <weight>normal</weight>\n   </font>\n   <hcenter/>\n   <vcenter/>\n   <string>Ext. Qty. Req.</string>\n  </label>\n  <label>\n   <rect>\n    <x>114</x>\n    <y>204</y>\n    <width>165</width>\n    <height>15</height>\n   </rect>\n   <font>\n    <face>Arial</face>\n    <size>8</size>\n    <weight>normal</weight>\n   </font>\n   <left/>\n   <vcenter/>\n   <string>Component Item Number</string>\n  </label>\n  <line>\n   <xstart>5</xstart>\n   <ystart>235</ystart>\n   <xend>745</xend>\n   <yend>235</yend>\n   <weight>2</weight>\n  </line>\n  <field>\n   <rect>\n    <x>585</x>\n    <y>104</y>\n    <width>150</width>\n    <height>20</height>\n   </rect>\n   <font>\n    <face>Arial</face>\n    <size>10</size>\n    <weight>bold</weight>\n   </font>\n   <left/>\n   <vcenter/>\n   <data>\n    <query>bomhead</query>\n    <column>bomhead_docnum</column>\n   </data>\n  </field>\n  <label>\n   <rect>\n    <x>10</x>\n    <y>204</y>\n    <width>40</width>\n    <height>15</height>\n   </rect>\n   <font>\n    <face>Arial</face>\n    <size>8</size>\n    <weight>normal</weight>\n   </font>\n   <hcenter/>\n   <vcenter/>\n   <string>Seq. #</string>\n  </label>\n  <label>\n   <rect>\n    <x>580</x>\n    <y>220</y>\n    <width>75</width>\n    <height>15</height>\n   </rect>\n   <font>\n    <face>Arial</face>\n    <size>8</size>\n    <weight>normal</weight>\n   </font>\n   <hcenter/>\n   <vcenter/>\n   <string>Issue Method</string>\n  </label>\n  <field>\n   <rect>\n    <x>100</x>\n    <y>145</y>\n    <width>300</width>\n    <height>20</height>\n   </rect>\n   <font>\n    <face>Arial</face>\n    <size>10</size>\n    <weight>bold</weight>\n   </font>\n   <left/>\n   <vcenter/>\n   <data>\n    <query>head</query>\n    <column>item_descrip2</column>\n   </data>\n  </field>\n  <label>\n   <rect>\n    <x>665</x>\n    <y>204</y>\n    <width>80</width>\n    <height>15</height>\n   </rect>\n   <font>\n    <face>Arial</face>\n    <size>8</size>\n    <weight>normal</weight>\n   </font>\n   <hcenter/>\n   <vcenter/>\n   <string>Unit Cost</string>\n  </label>\n  <label>\n   <rect>\n    <x>275</x>\n    <y>204</y>\n    <width>50</width>\n    <height>15</height>\n   </rect>\n   <font>\n    <face>Arial</face>\n    <size>8</size>\n    <weight>normal</weight>\n   </font>\n   <hcenter/>\n   <vcenter/>\n   <string>UOM</string>\n  </label>\n  <field>\n   <rect>\n    <x>585</x>\n    <y>145</y>\n    <width>150</width>\n    <height>20</height>\n   </rect>\n   <font>\n    <face>Arial</face>\n    <size>10</size>\n    <weight>bold</weight>\n   </font>\n   <left/>\n   <vcenter/>\n   <data>\n    <query>bomhead</query>\n    <column>bomhead_revision</column>\n   </data>\n  </field>\n  <label>\n   <rect>\n    <x>500</x>\n    <y>204</y>\n    <width>75</width>\n    <height>15</height>\n   </rect>\n   <font>\n    <face>Arial</face>\n    <size>8</size>\n    <weight>normal</weight>\n   </font>\n   <hcenter/>\n   <vcenter/>\n   <string>Effective</string>\n  </label>\n  <label>\n   <rect>\n    <x>419</x>\n    <y>204</y>\n    <width>75</width>\n    <height>15</height>\n   </rect>\n   <font>\n    <face>Arial</face>\n    <size>8</size>\n    <weight>normal</weight>\n   </font>\n   <hcenter/>\n   <vcenter/>\n   <string>Scrap</string>\n  </label>\n  <field>\n   <rect>\n    <x>315</x>\n    <y>104</y>\n    <width>150</width>\n    <height>20</height>\n   </rect>\n   <font>\n    <face>Arial</face>\n    <size>10</size>\n    <weight>bold</weight>\n   </font>\n   <left/>\n   <vcenter/>\n   <data>\n    <query>head</query>\n    <column>item_invuom</column>\n   </data>\n  </field>\n  <label>\n   <rect>\n    <x>490</x>\n    <y>125</y>\n    <width>90</width>\n    <height>20</height>\n   </rect>\n   <font>\n    <face>Arial</face>\n    <size>10</size>\n    <weight>normal</weight>\n   </font>\n   <right/>\n   <vcenter/>\n   <string>Revision Date:</string>\n  </label>\n  <label>\n   <rect>\n    <x>490</x>\n    <y>145</y>\n    <width>90</width>\n    <height>20</height>\n   </rect>\n   <font>\n    <face>Arial</face>\n    <size>10</size>\n    <weight>normal</weight>\n   </font>\n   <right/>\n   <vcenter/>\n   <string>Revision:</string>\n  </label>\n  <field>\n   <rect>\n    <x>350</x>\n    <y>60</y>\n    <width>205</width>\n    <height>20</height>\n   </rect>\n   <font>\n    <face>Arial</face>\n    <size>10</size>\n    <weight>bold</weight>\n   </font>\n   <left/>\n   <vcenter/>\n   <data>\n    <query>head</query>\n    <column>lbl_usecosts</column>\n   </data>\n  </field>\n  <label>\n   <rect>\n    <x>15</x>\n    <y>104</y>\n    <width>80</width>\n    <height>20</height>\n   </rect>\n   <font>\n    <face>Arial</face>\n    <size>10</size>\n    <weight>normal</weight>\n   </font>\n   <right/>\n   <vcenter/>\n   <string>Item:</string>\n  </label>\n  <label>\n   <rect>\n    <x>260</x>\n    <y>10</y>\n    <width>465</width>\n    <height>37</height>\n   </rect>\n   <font>\n    <face>Arial</face>\n    <size>18</size>\n    <weight>bold</weight>\n   </font>\n   <right/>\n   <vcenter/>\n   <string>Costed Indented Bill of Materials</string>\n  </label>\n  <field>\n   <rect>\n    <x>100</x>\n    <y>125</y>\n    <width>300</width>\n    <height>20</height>\n   </rect>\n   <font>\n    <face>Arial</face>\n    <size>10</size>\n    <weight>bold</weight>\n   </font>\n   <left/>\n   <vcenter/>\n   <data>\n    <query>head</query>\n    <column>item_descrip1</column>\n   </data>\n  </field>\n  <label>\n   <rect>\n    <x>114</x>\n    <y>220</y>\n    <width>229</width>\n    <height>15</height>\n   </rect>\n   <font>\n    <face>Arial</face>\n    <size>8</size>\n    <weight>normal</weight>\n   </font>\n   <left/>\n   <vcenter/>\n   <string>Description</string>\n  </label>\n  <label>\n   <rect>\n    <x>260</x>\n    <y>104</y>\n    <width>50</width>\n    <height>20</height>\n   </rect>\n   <font>\n    <face>Arial</face>\n    <size>10</size>\n    <weight>normal</weight>\n   </font>\n   <right/>\n   <vcenter/>\n   <string>UOM:</string>\n  </label>\n  <label>\n   <rect>\n    <x>500</x>\n    <y>220</y>\n    <width>75</width>\n    <height>15</height>\n   </rect>\n   <font>\n    <face>Arial</face>\n    <size>8</size>\n    <weight>normal</weight>\n   </font>\n   <hcenter/>\n   <vcenter/>\n   <string>Create W/O</string>\n  </label>\n  <field>\n   <rect>\n    <x>585</x>\n    <y>125</y>\n    <width>150</width>\n    <height>20</height>\n   </rect>\n   <font>\n    <face>Arial</face>\n    <size>10</size>\n    <weight>bold</weight>\n   </font>\n   <left/>\n   <vcenter/>\n   <data>\n    <query>bomhead</query>\n    <column>f_revisiondate</column>\n   </data>\n  </field>\n  <label>\n   <rect>\n    <x>665</x>\n    <y>220</y>\n    <width>80</width>\n    <height>15</height>\n   </rect>\n   <font>\n    <face>Arial</face>\n    <size>8</size>\n    <weight>normal</weight>\n   </font>\n   <hcenter/>\n   <vcenter/>\n   <string>Ext'd Cost</string>\n  </label>\n </rpthead>\n <pghead>\n  <firstpage/>\n  <height>6</height>\n </pghead>\n <pghead>\n  <height>36</height>\n  <label>\n   <rect>\n    <x>114</x>\n    <y>0</y>\n    <width>165</width>\n    <height>15</height>\n   </rect>\n   <font>\n    <face>Arial</face>\n    <size>8</size>\n    <weight>normal</weight>\n   </font>\n   <left/>\n   <vcenter/>\n   <string>Component Item Number</string>\n  </label>\n  <label>\n   <rect>\n    <x>665</x>\n    <y>15</y>\n    <width>80</width>\n    <height>15</height>\n   </rect>\n   <font>\n    <face>Arial</face>\n    <size>8</size>\n    <weight>normal</weight>\n   </font>\n   <hcenter/>\n   <vcenter/>\n   <string>Ext'd Cost</string>\n  </label>\n  <label>\n   <rect>\n    <x>340</x>\n    <y>0</y>\n    <width>75</width>\n    <height>15</height>\n   </rect>\n   <font>\n    <face>Arial</face>\n    <size>8</size>\n    <weight>normal</weight>\n   </font>\n   <hcenter/>\n   <vcenter/>\n   <string>Ext. Qty. Req.</string>\n  </label>\n  <label>\n   <rect>\n    <x>580</x>\n    <y>15</y>\n    <width>75</width>\n    <height>15</height>\n   </rect>\n   <font>\n    <face>Arial</face>\n    <size>8</size>\n    <weight>normal</weight>\n   </font>\n   <hcenter/>\n   <vcenter/>\n   <string>Issue Method</string>\n  </label>\n  <label>\n   <rect>\n    <x>500</x>\n    <y>15</y>\n    <width>75</width>\n    <height>15</height>\n   </rect>\n   <font>\n    <face>Arial</face>\n    <size>8</size>\n    <weight>normal</weight>\n   </font>\n   <hcenter/>\n   <vcenter/>\n   <string>Create W/O</string>\n  </label>\n  <label>\n   <rect>\n    <x>500</x>\n    <y>0</y>\n    <width>75</width>\n    <height>15</height>\n   </rect>\n   <font>\n    <face>Arial</face>\n    <size>8</size>\n    <weight>normal</weight>\n   </font>\n   <hcenter/>\n   <vcenter/>\n   <string>Effective</string>\n  </label>\n  <label>\n   <rect>\n    <x>10</x>\n    <y>0</y>\n    <width>40</width>\n    <height>15</height>\n   </rect>\n   <font>\n    <face>Arial</face>\n    <size>8</size>\n    <weight>normal</weight>\n   </font>\n   <hcenter/>\n   <vcenter/>\n   <string>Seq. #</string>\n  </label>\n  <label>\n   <rect>\n    <x>114</x>\n    <y>15</y>\n    <width>229</width>\n    <height>15</height>\n   </rect>\n   <font>\n    <face>Arial</face>\n    <size>8</size>\n    <weight>normal</weight>\n   </font>\n   <left/>\n   <vcenter/>\n   <string>Description</string>\n  </label>\n  <label>\n   <rect>\n    <x>419</x>\n    <y>0</y>\n    <width>75</width>\n    <height>15</height>\n   </rect>\n   <font>\n    <face>Arial</face>\n    <size>8</size>\n    <weight>normal</weight>\n   </font>\n   <hcenter/>\n   <vcenter/>\n   <string>Scrap</string>\n  </label>\n  <label>\n   <rect>\n    <x>580</x>\n    <y>0</y>\n    <width>75</width>\n    <height>15</height>\n   </rect>\n   <font>\n    <face>Arial</face>\n    <size>8</size>\n    <weight>normal</weight>\n   </font>\n   <hcenter/>\n   <vcenter/>\n   <string>Expires</string>\n  </label>\n  <line>\n   <xstart>5</xstart>\n   <ystart>30</ystart>\n   <xend>745</xend>\n   <yend>30</yend>\n   <weight>2</weight>\n  </line>\n  <label>\n   <rect>\n    <x>665</x>\n    <y>0</y>\n    <width>80</width>\n    <height>15</height>\n   </rect>\n   <font>\n    <face>Arial</face>\n    <size>8</size>\n    <weight>normal</weight>\n   </font>\n   <hcenter/>\n   <vcenter/>\n   <string>Unit Cost</string>\n  </label>\n  <label>\n   <rect>\n    <x>275</x>\n    <y>0</y>\n    <width>50</width>\n    <height>15</height>\n   </rect>\n   <font>\n    <face>Arial</face>\n    <size>8</size>\n    <weight>normal</weight>\n   </font>\n   <hcenter/>\n   <vcenter/>\n   <string>UOM</string>\n  </label>\n </pghead>\n <section>\n  <name>detail</name>\n  <detail>\n   <key>\n    <query>detail</query>\n   </key>\n   <height>52</height>\n   <field>\n    <rect>\n     <x>500</x>\n     <y>0</y>\n     <width>75</width>\n     <height>15</height>\n    </rect>\n    <font>\n     <face>Arial</face>\n     <size>8</size>\n     <weight>bold</weight>\n    </font>\n    <hcenter/>\n    <vcenter/>\n    <data>\n     <query>detail</query>\n     <column>effective</column>\n    </data>\n   </field>\n   <field>\n    <rect>\n     <x>114</x>\n     <y>0</y>\n     <width>150</width>\n     <height>15</height>\n    </rect>\n    <font>\n     <face>Arial</face>\n     <size>8</size>\n     <weight>bold</weight>\n    </font>\n    <left/>\n    <vcenter/>\n    <data>\n     <query>detail</query>\n     <column>item_number</column>\n    </data>\n   </field>\n   <field>\n    <rect>\n     <x>114</x>\n     <y>15</y>\n     <width>300</width>\n     <height>15</height>\n    </rect>\n    <font>\n     <face>Arial</face>\n     <size>8</size>\n     <weight>bold</weight>\n    </font>\n    <left/>\n    <vcenter/>\n    <data>\n     <query>detail</query>\n     <column>item_descrip1</column>\n    </data>\n   </field>\n   <field>\n    <rect>\n     <x>5</x>\n     <y>0</y>\n     <width>104</width>\n     <height>15</height>\n    </rect>\n    <font>\n     <face>Arial</face>\n     <size>8</size>\n     <weight>bold</weight>\n    </font>\n    <left/>\n    <vcenter/>\n    <data>\n     <query>detail</query>\n     <column>f_seqnumber</column>\n    </data>\n   </field>\n   <field>\n    <rect>\n     <x>580</x>\n     <y>0</y>\n     <width>75</width>\n     <height>15</height>\n    </rect>\n    <font>\n     <face>Arial</face>\n     <size>8</size>\n     <weight>bold</weight>\n    </font>\n    <hcenter/>\n    <vcenter/>\n    <data>\n     <query>detail</query>\n     <column>expires</column>\n    </data>\n   </field>\n   <field>\n    <rect>\n     <x>665</x>\n     <y>15</y>\n     <width>80</width>\n     <height>15</height>\n    </rect>\n    <font>\n     <face>Arial</face>\n     <size>8</size>\n     <weight>bold</weight>\n    </font>\n    <right/>\n    <vcenter/>\n    <data>\n     <query>detail</query>\n     <column>f_extendedcost</column>\n    </data>\n   </field>\n   <field>\n    <rect>\n     <x>340</x>\n     <y>0</y>\n     <width>75</width>\n     <height>15</height>\n    </rect>\n    <font>\n     <face>Arial</face>\n     <size>8</size>\n     <weight>bold</weight>\n    </font>\n    <right/>\n    <vcenter/>\n    <data>\n     <query>detail</query>\n     <column>qtyreq</column>\n    </data>\n   </field>\n   <line>\n    <xstart>5</xstart>\n    <ystart>45</ystart>\n    <xend>745</xend>\n    <yend>45</yend>\n    <weight>0</weight>\n   </line>\n   <field>\n    <rect>\n     <x>275</x>\n     <y>0</y>\n     <width>50</width>\n     <height>15</height>\n    </rect>\n    <font>\n     <face>Arial</face>\n     <size>8</size>\n     <weight>bold</weight>\n    </font>\n    <hcenter/>\n    <vcenter/>\n    <data>\n     <query>detail</query>\n     <column>item_invuom</column>\n    </data>\n   </field>\n   <field>\n    <rect>\n     <x>665</x>\n     <y>0</y>\n     <width>80</width>\n     <height>15</height>\n    </rect>\n    <font>\n     <face>Arial</face>\n     <size>8</size>\n     <weight>bold</weight>\n    </font>\n    <right/>\n    <vcenter/>\n    <data>\n     <query>detail</query>\n     <column>f_unitcost</column>\n    </data>\n   </field>\n   <field>\n    <rect>\n     <x>419</x>\n     <y>0</y>\n     <width>75</width>\n     <height>15</height>\n    </rect>\n    <font>\n     <face>Arial</face>\n     <size>8</size>\n     <weight>bold</weight>\n    </font>\n    <right/>\n    <vcenter/>\n    <data>\n     <query>detail</query>\n     <column>scrap</column>\n    </data>\n   </field>\n   <field>\n    <rect>\n     <x>580</x>\n     <y>15</y>\n     <width>75</width>\n     <height>15</height>\n    </rect>\n    <font>\n     <face>Arial</face>\n     <size>8</size>\n     <weight>bold</weight>\n    </font>\n    <hcenter/>\n    <vcenter/>\n    <data>\n     <query>detail</query>\n     <column>issuemethod</column>\n    </data>\n   </field>\n   <field>\n    <rect>\n     <x>500</x>\n     <y>15</y>\n     <width>75</width>\n     <height>15</height>\n    </rect>\n    <font>\n     <face>Arial</face>\n     <size>8</size>\n     <weight>bold</weight>\n    </font>\n    <hcenter/>\n    <vcenter/>\n    <data>\n     <query>detail</query>\n     <column>createchild</column>\n    </data>\n   </field>\n   <field>\n    <rect>\n     <x>114</x>\n     <y>30</y>\n     <width>300</width>\n     <height>15</height>\n    </rect>\n    <font>\n     <face>Arial</face>\n     <size>8</size>\n     <weight>bold</weight>\n    </font>\n    <left/>\n    <vcenter/>\n    <data>\n     <query>detail</query>\n     <column>item_descrip2</column>\n    </data>\n   </field>\n  </detail>\n </section>\n <pgfoot>\n  <height>18</height>\n  <field>\n   <rect>\n    <x>95</x>\n    <y>0</y>\n    <width>100</width>\n    <height>15</height>\n   </rect>\n   <font>\n    <face>Arial</face>\n    <size>8</size>\n    <weight>bold</weight>\n   </font>\n   <left/>\n   <vcenter/>\n   <data>\n    <query>Context Query</query>\n    <column>report_date</column>\n   </data>\n  </field>\n  <field>\n   <rect>\n    <x>705</x>\n    <y>0</y>\n    <width>40</width>\n    <height>15</height>\n   </rect>\n   <font>\n    <face>Arial</face>\n    <size>8</size>\n    <weight>bold</weight>\n   </font>\n   <left/>\n   <vcenter/>\n   <data>\n    <query>Context Query</query>\n    <column>page_number</column>\n   </data>\n  </field>\n  <label>\n   <rect>\n    <x>615</x>\n    <y>0</y>\n    <width>85</width>\n    <height>15</height>\n   </rect>\n   <font>\n    <face>Arial</face>\n    <size>8</size>\n    <weight>normal</weight>\n   </font>\n   <right/>\n   <vcenter/>\n   <string>Page:</string>\n  </label>\n  <label>\n   <rect>\n    <x>5</x>\n    <y>0</y>\n    <width>85</width>\n    <height>15</height>\n   </rect>\n   <font>\n    <face>Arial</face>\n    <size>8</size>\n    <weight>normal</weight>\n   </font>\n   <right/>\n   <vcenter/>\n   <string>Report Date:</string>\n  </label>\n </pgfoot>\n <rptfoot>\n  <height>47</height>\n  <label>\n   <rect>\n    <x>484</x>\n    <y>30</y>\n    <width>90</width>\n    <height>15</height>\n   </rect>\n   <font>\n    <face>Arial</face>\n    <size>8</size>\n    <weight>normal</weight>\n   </font>\n   <right/>\n   <vcenter/>\n   <string>Standard Cost:</string>\n  </label>\n  <field>\n   <rect>\n    <x>665</x>\n    <y>15</y>\n    <width>80</width>\n    <height>15</height>\n   </rect>\n   <font>\n    <face>Arial</face>\n    <size>8</size>\n    <weight>bold</weight>\n   </font>\n   <right/>\n   <vcenter/>\n   <data>\n    <query>head</query>\n    <column>f_actual</column>\n   </data>\n  </field>\n  <field>\n   <rect>\n    <x>665</x>\n    <y>30</y>\n    <width>80</width>\n    <height>15</height>\n   </rect>\n   <font>\n    <face>Arial</face>\n    <size>8</size>\n    <weight>bold</weight>\n   </font>\n   <right/>\n   <vcenter/>\n   <data>\n    <query>head</query>\n    <column>f_standard</column>\n   </data>\n  </field>\n  <field>\n   <rect>\n    <x>665</x>\n    <y>0</y>\n    <width>80</width>\n    <height>15</height>\n   </rect>\n   <font>\n    <face>Arial</face>\n    <size>8</size>\n    <weight>bold</weight>\n   </font>\n   <right/>\n   <vcenter/>\n   <data>\n    <query>head</query>\n    <column>t_extendedcost</column>\n   </data>\n  </field>\n  <label>\n   <rect>\n    <x>500</x>\n    <y>15</y>\n    <width>75</width>\n    <height>15</height>\n   </rect>\n   <font>\n    <face>Arial</face>\n    <size>8</size>\n    <weight>normal</weight>\n   </font>\n   <right/>\n   <vcenter/>\n   <string>Actual Cost:</string>\n  </label>\n  <label>\n   <rect>\n    <x>500</x>\n    <y>0</y>\n    <width>75</width>\n    <height>15</height>\n   </rect>\n   <font>\n    <face>Arial</face>\n    <size>8</size>\n    <weight>normal</weight>\n   </font>\n   <right/>\n   <vcenter/>\n   <string>Total Cost:</string>\n  </label>\n </rptfoot>\n</report>\n		0	2015-10-01 17:14:33.361434
104	Alignment	\N	<!DOCTYPE openRPTDef>\n<report>\n <title>Alignment</title>\n <name>Alignment</name>\n <description></description>\n <size>Letter</size>\n <portrait/>\n <topmargin>0</topmargin>\n <bottommargin>0</bottommargin>\n <rightmargin>0</rightmargin>\n <leftmargin>0</leftmargin>\n <rpthead>\n  <height>1152</height>\n  <label>\n   <rect>\n    <x>100</x>\n    <y>795</y>\n    <width>100</width>\n    <height>10</height>\n   </rect>\n   <font>\n    <face>Arial</face>\n    <size>10</size>\n    <weight>normal</weight>\n   </font>\n   <hcenter/>\n   <vcenter/>\n   <string>800</string>\n  </label>\n  <label>\n   <rect>\n    <x>550</x>\n    <y>250</y>\n    <width>100</width>\n    <height>10</height>\n   </rect>\n   <font>\n    <face>Arial</face>\n    <size>10</size>\n    <weight>normal</weight>\n   </font>\n   <hcenter/>\n   <vcenter/>\n   <string>600</string>\n  </label>\n  <line>\n   <xstart>0</xstart>\n   <ystart>919</ystart>\n   <xend>850</xend>\n   <yend>919</yend>\n   <weight>1</weight>\n  </line>\n  <line>\n   <xstart>580</xstart>\n   <ystart>0</ystart>\n   <xend>580</xend>\n   <yend>1150</yend>\n   <weight>1</weight>\n  </line>\n  <line>\n   <xstart>280</xstart>\n   <ystart>0</ystart>\n   <xend>280</xend>\n   <yend>1150</yend>\n   <weight>1</weight>\n  </line>\n  <line>\n   <xstart>0</xstart>\n   <ystart>470</ystart>\n   <xend>850</xend>\n   <yend>470</yend>\n   <weight>1</weight>\n  </line>\n  <line>\n   <xstart>0</xstart>\n   <ystart>869</ystart>\n   <xend>850</xend>\n   <yend>869</yend>\n   <weight>1</weight>\n  </line>\n  <line>\n   <xstart>0</xstart>\n   <ystart>800</ystart>\n   <xend>850</xend>\n   <yend>800</yend>\n   <weight>1</weight>\n  </line>\n  <label>\n   <rect>\n    <x>100</x>\n    <y>195</y>\n    <width>100</width>\n    <height>10</height>\n   </rect>\n   <font>\n    <face>Arial</face>\n    <size>10</size>\n    <weight>normal</weight>\n   </font>\n   <hcenter/>\n   <vcenter/>\n   <string>200</string>\n  </label>\n  <line>\n   <xstart>0</xstart>\n   <ystart>459</ystart>\n   <xend>850</xend>\n   <yend>459</yend>\n   <weight>1</weight>\n  </line>\n  <line>\n   <xstart>340</xstart>\n   <ystart>0</ystart>\n   <xend>340</xend>\n   <yend>1150</yend>\n   <weight>1</weight>\n  </line>\n  <line>\n   <xstart>0</xstart>\n   <ystart>690</ystart>\n   <xend>850</xend>\n   <yend>690</yend>\n   <weight>1</weight>\n  </line>\n  <line>\n   <xstart>0</xstart>\n   <ystart>960</ystart>\n   <xend>850</xend>\n   <yend>960</yend>\n   <weight>1</weight>\n  </line>\n  <line>\n   <xstart>0</xstart>\n   <ystart>1090</ystart>\n   <xend>850</xend>\n   <yend>1090</yend>\n   <weight>1</weight>\n  </line>\n  <line>\n   <xstart>0</xstart>\n   <ystart>380</ystart>\n   <xend>850</xend>\n   <yend>380</yend>\n   <weight>1</weight>\n  </line>\n  <line>\n   <xstart>560</xstart>\n   <ystart>0</ystart>\n   <xend>560</xend>\n   <yend>1150</yend>\n   <weight>1</weight>\n  </line>\n  <line>\n   <xstart>0</xstart>\n   <ystart>300</ystart>\n   <xend>850</xend>\n   <yend>300</yend>\n   <weight>1</weight>\n  </line>\n  <line>\n   <xstart>0</xstart>\n   <ystart>1120</ystart>\n   <xend>850</xend>\n   <yend>1120</yend>\n   <weight>1</weight>\n  </line>\n  <line>\n   <xstart>0</xstart>\n   <ystart>819</ystart>\n   <xend>850</xend>\n   <yend>819</yend>\n   <weight>1</weight>\n  </line>\n  <line>\n   <xstart>350</xstart>\n   <ystart>0</ystart>\n   <xend>350</xend>\n   <yend>1150</yend>\n   <weight>1</weight>\n  </line>\n  <line>\n   <xstart>0</xstart>\n   <ystart>30</ystart>\n   <xend>850</xend>\n   <yend>30</yend>\n   <weight>1</weight>\n  </line>\n  <line>\n   <xstart>170</xstart>\n   <ystart>0</ystart>\n   <xend>170</xend>\n   <yend>1150</yend>\n   <weight>1</weight>\n  </line>\n  <line>\n   <xstart>0</xstart>\n   <ystart>990</ystart>\n   <xend>850</xend>\n   <yend>990</yend>\n   <weight>1</weight>\n  </line>\n  <line>\n   <xstart>0</xstart>\n   <ystart>760</ystart>\n   <xend>850</xend>\n   <yend>760</yend>\n   <weight>1</weight>\n  </line>\n  <line>\n   <xstart>0</xstart>\n   <ystart>0</ystart>\n   <xend>0</xend>\n   <yend>1150</yend>\n   <weight>1</weight>\n  </line>\n  <line>\n   <xstart>0</xstart>\n   <ystart>220</ystart>\n   <xend>850</xend>\n   <yend>220</yend>\n   <weight>1</weight>\n  </line>\n  <label>\n   <rect>\n    <x>100</x>\n    <y>595</y>\n    <width>100</width>\n    <height>10</height>\n   </rect>\n   <font>\n    <face>Arial</face>\n    <size>10</size>\n    <weight>normal</weight>\n   </font>\n   <hcenter/>\n   <vcenter/>\n   <string>600</string>\n  </label>\n  <line>\n   <xstart>360</xstart>\n   <ystart>0</ystart>\n   <xend>360</xend>\n   <yend>1150</yend>\n   <weight>1</weight>\n  </line>\n  <line>\n   <xstart>0</xstart>\n   <ystart>10</ystart>\n   <xend>850</xend>\n   <yend>10</yend>\n   <weight>1</weight>\n  </line>\n  <line>\n   <xstart>0</xstart>\n   <ystart>1150</ystart>\n   <xend>850</xend>\n   <yend>1150</yend>\n   <weight>1</weight>\n  </line>\n  <line>\n   <xstart>0</xstart>\n   <ystart>210</ystart>\n   <xend>850</xend>\n   <yend>210</yend>\n   <weight>1</weight>\n  </line>\n  <line>\n   <xstart>0</xstart>\n   <ystart>570</ystart>\n   <xend>850</xend>\n   <yend>570</yend>\n   <weight>1</weight>\n  </line>\n  <line>\n   <xstart>70</xstart>\n   <ystart>0</ystart>\n   <xend>70</xend>\n   <yend>1150</yend>\n   <weight>1</weight>\n  </line>\n  <line>\n   <xstart>0</xstart>\n   <ystart>100</ystart>\n   <xend>850</xend>\n   <yend>100</yend>\n   <weight>1</weight>\n  </line>\n  <line>\n   <xstart>400</xstart>\n   <ystart>0</ystart>\n   <xend>400</xend>\n   <yend>1150</yend>\n   <weight>1</weight>\n  </line>\n  <line>\n   <xstart>540</xstart>\n   <ystart>0</ystart>\n   <xend>540</xend>\n   <yend>1150</yend>\n   <weight>1</weight>\n  </line>\n  <label>\n   <rect>\n    <x>100</x>\n    <y>695</y>\n    <width>100</width>\n    <height>10</height>\n   </rect>\n   <font>\n    <face>Arial</face>\n    <size>10</size>\n    <weight>normal</weight>\n   </font>\n   <hcenter/>\n   <vcenter/>\n   <string>700</string>\n  </label>\n  <line>\n   <xstart>730</xstart>\n   <ystart>0</ystart>\n   <xend>730</xend>\n   <yend>1150</yend>\n   <weight>1</weight>\n  </line>\n  <label>\n   <rect>\n    <x>250</x>\n    <y>250</y>\n    <width>100</width>\n    <height>10</height>\n   </rect>\n   <font>\n    <face>Arial</face>\n    <size>10</size>\n    <weight>normal</weight>\n   </font>\n   <hcenter/>\n   <vcenter/>\n   <string>300</string>\n  </label>\n  <label>\n   <rect>\n    <x>650</x>\n    <y>250</y>\n    <width>100</width>\n    <height>10</height>\n   </rect>\n   <font>\n    <face>Arial</face>\n    <size>10</size>\n    <weight>normal</weight>\n   </font>\n   <hcenter/>\n   <vcenter/>\n   <string>700</string>\n  </label>\n  <line>\n   <xstart>20</xstart>\n   <ystart>0</ystart>\n   <xend>20</xend>\n   <yend>1150</yend>\n   <weight>1</weight>\n  </line>\n  <line>\n   <xstart>0</xstart>\n   <ystart>900</ystart>\n   <xend>850</xend>\n   <yend>900</yend>\n   <weight>1</weight>\n  </line>\n  <line>\n   <xstart>220</xstart>\n   <ystart>0</ystart>\n   <xend>220</xend>\n   <yend>1150</yend>\n   <weight>1</weight>\n  </line>\n  <line>\n   <xstart>200</xstart>\n   <ystart>0</ystart>\n   <xend>200</xend>\n   <yend>1150</yend>\n   <weight>1</weight>\n  </line>\n  <line>\n   <xstart>0</xstart>\n   <ystart>509</ystart>\n   <xend>850</xend>\n   <yend>509</yend>\n   <weight>1</weight>\n  </line>\n  <line>\n   <xstart>300</xstart>\n   <ystart>0</ystart>\n   <xend>300</xend>\n   <yend>1150</yend>\n   <weight>1</weight>\n  </line>\n  <line>\n   <xstart>0</xstart>\n   <ystart>740</ystart>\n   <xend>850</xend>\n   <yend>740</yend>\n   <weight>1</weight>\n  </line>\n  <label>\n   <rect>\n    <x>100</x>\n    <y>395</y>\n    <width>100</width>\n    <height>10</height>\n   </rect>\n   <font>\n    <face>Arial</face>\n    <size>10</size>\n    <weight>normal</weight>\n   </font>\n   <hcenter/>\n   <vcenter/>\n   <string>400</string>\n  </label>\n  <line>\n   <xstart>490</xstart>\n   <ystart>0</ystart>\n   <xend>490</xend>\n   <yend>1150</yend>\n   <weight>1</weight>\n  </line>\n  <line>\n   <xstart>0</xstart>\n   <ystart>530</ystart>\n   <xend>850</xend>\n   <yend>530</yend>\n   <weight>1</weight>\n  </line>\n  <line>\n   <xstart>0</xstart>\n   <ystart>930</ystart>\n   <xend>850</xend>\n   <yend>930</yend>\n   <weight>1</weight>\n  </line>\n  <line>\n   <xstart>630</xstart>\n   <ystart>0</ystart>\n   <xend>630</xend>\n   <yend>1150</yend>\n   <weight>1</weight>\n  </line>\n  <line>\n   <xstart>0</xstart>\n   <ystart>980</ystart>\n   <xend>850</xend>\n   <yend>980</yend>\n   <weight>1</weight>\n  </line>\n  <line>\n   <xstart>0</xstart>\n   <ystart>620</ystart>\n   <xend>850</xend>\n   <yend>620</yend>\n   <weight>1</weight>\n  </line>\n  <line>\n   <xstart>780</xstart>\n   <ystart>0</ystart>\n   <xend>780</xend>\n   <yend>1150</yend>\n   <weight>1</weight>\n  </line>\n  <line>\n   <xstart>0</xstart>\n   <ystart>670</ystart>\n   <xend>850</xend>\n   <yend>670</yend>\n   <weight>1</weight>\n  </line>\n  <line>\n   <xstart>420</xstart>\n   <ystart>0</ystart>\n   <xend>420</xend>\n   <yend>1150</yend>\n   <weight>1</weight>\n  </line>\n  <line>\n   <xstart>0</xstart>\n   <ystart>180</ystart>\n   <xend>850</xend>\n   <yend>180</yend>\n   <weight>1</weight>\n  </line>\n  <line>\n   <xstart>0</xstart>\n   <ystart>150</ystart>\n   <xend>850</xend>\n   <yend>150</yend>\n   <weight>1</weight>\n  </line>\n  <line>\n   <xstart>0</xstart>\n   <ystart>730</ystart>\n   <xend>850</xend>\n   <yend>730</yend>\n   <weight>1</weight>\n  </line>\n  <line>\n   <xstart>80</xstart>\n   <ystart>0</ystart>\n   <xend>80</xend>\n   <yend>1150</yend>\n   <weight>1</weight>\n  </line>\n  <line>\n   <xstart>0</xstart>\n   <ystart>400</ystart>\n   <xend>850</xend>\n   <yend>400</yend>\n   <weight>1</weight>\n  </line>\n  <line>\n   <xstart>0</xstart>\n   <ystart>110</ystart>\n   <xend>850</xend>\n   <yend>110</yend>\n   <weight>1</weight>\n  </line>\n  <line>\n   <xstart>0</xstart>\n   <ystart>310</ystart>\n   <xend>850</xend>\n   <yend>310</yend>\n   <weight>1</weight>\n  </line>\n  <line>\n   <xstart>0</xstart>\n   <ystart>940</ystart>\n   <xend>850</xend>\n   <yend>940</yend>\n   <weight>1</weight>\n  </line>\n  <line>\n   <xstart>0</xstart>\n   <ystart>640</ystart>\n   <xend>850</xend>\n   <yend>640</yend>\n   <weight>1</weight>\n  </line>\n  <line>\n   <xstart>0</xstart>\n   <ystart>1040</ystart>\n   <xend>850</xend>\n   <yend>1040</yend>\n   <weight>1</weight>\n  </line>\n  <line>\n   <xstart>140</xstart>\n   <ystart>0</ystart>\n   <xend>140</xend>\n   <yend>1150</yend>\n   <weight>1</weight>\n  </line>\n  <label>\n   <rect>\n    <x>100</x>\n    <y>295</y>\n    <width>100</width>\n    <height>10</height>\n   </rect>\n   <font>\n    <face>Arial</face>\n    <size>10</size>\n    <weight>normal</weight>\n   </font>\n   <hcenter/>\n   <vcenter/>\n   <string>300</string>\n  </label>\n  <line>\n   <xstart>440</xstart>\n   <ystart>0</ystart>\n   <xend>440</xend>\n   <yend>1150</yend>\n   <weight>1</weight>\n  </line>\n  <line>\n   <xstart>0</xstart>\n   <ystart>280</ystart>\n   <xend>850</xend>\n   <yend>280</yend>\n   <weight>1</weight>\n  </line>\n  <line>\n   <xstart>0</xstart>\n   <ystart>660</ystart>\n   <xend>850</xend>\n   <yend>660</yend>\n   <weight>1</weight>\n  </line>\n  <line>\n   <xstart>30</xstart>\n   <ystart>0</ystart>\n   <xend>30</xend>\n   <yend>1150</yend>\n   <weight>1</weight>\n  </line>\n  <line>\n   <xstart>130</xstart>\n   <ystart>0</ystart>\n   <xend>130</xend>\n   <yend>1150</yend>\n   <weight>1</weight>\n  </line>\n  <line>\n   <xstart>0</xstart>\n   <ystart>950</ystart>\n   <xend>850</xend>\n   <yend>950</yend>\n   <weight>1</weight>\n  </line>\n  <line>\n   <xstart>0</xstart>\n   <ystart>40</ystart>\n   <xend>850</xend>\n   <yend>40</yend>\n   <weight>1</weight>\n  </line>\n  <line>\n   <xstart>0</xstart>\n   <ystart>650</ystart>\n   <xend>850</xend>\n   <yend>650</yend>\n   <weight>1</weight>\n  </line>\n  <line>\n   <xstart>0</xstart>\n   <ystart>700</ystart>\n   <xend>850</xend>\n   <yend>700</yend>\n   <weight>1</weight>\n  </line>\n  <line>\n   <xstart>470</xstart>\n   <ystart>0</ystart>\n   <xend>470</xend>\n   <yend>1150</yend>\n   <weight>1</weight>\n  </line>\n  <line>\n   <xstart>0</xstart>\n   <ystart>130</ystart>\n   <xend>850</xend>\n   <yend>130</yend>\n   <weight>1</weight>\n  </line>\n  <line>\n   <xstart>0</xstart>\n   <ystart>260</ystart>\n   <xend>850</xend>\n   <yend>260</yend>\n   <weight>1</weight>\n  </line>\n  <line>\n   <xstart>0</xstart>\n   <ystart>360</ystart>\n   <xend>850</xend>\n   <yend>360</yend>\n   <weight>1</weight>\n  </line>\n  <line>\n   <xstart>0</xstart>\n   <ystart>890</ystart>\n   <xend>850</xend>\n   <yend>890</yend>\n   <weight>1</weight>\n  </line>\n  <label>\n   <rect>\n    <x>100</x>\n    <y>895</y>\n    <width>100</width>\n    <height>10</height>\n   </rect>\n   <font>\n    <face>Arial</face>\n    <size>10</size>\n    <weight>normal</weight>\n   </font>\n   <hcenter/>\n   <vcenter/>\n   <string>900</string>\n  </label>\n  <line>\n   <xstart>0</xstart>\n   <ystart>350</ystart>\n   <xend>850</xend>\n   <yend>350</yend>\n   <weight>1</weight>\n  </line>\n  <line>\n   <xstart>0</xstart>\n   <ystart>480</ystart>\n   <xend>850</xend>\n   <yend>480</yend>\n   <weight>1</weight>\n  </line>\n  <line>\n   <xstart>260</xstart>\n   <ystart>0</ystart>\n   <xend>260</xend>\n   <yend>1150</yend>\n   <weight>1</weight>\n  </line>\n  <label>\n   <rect>\n    <x>100</x>\n    <y>1095</y>\n    <width>100</width>\n    <height>10</height>\n   </rect>\n   <font>\n    <face>Arial</face>\n    <size>10</size>\n    <weight>normal</weight>\n   </font>\n   <hcenter/>\n   <vcenter/>\n   <string>1100</string>\n  </label>\n  <label>\n   <rect>\n    <x>150</x>\n    <y>250</y>\n    <width>100</width>\n    <height>10</height>\n   </rect>\n   <font>\n    <face>Arial</face>\n    <size>10</size>\n    <weight>normal</weight>\n   </font>\n   <hcenter/>\n   <vcenter/>\n   <string>200</string>\n  </label>\n  <label>\n   <rect>\n    <x>350</x>\n    <y>250</y>\n    <width>100</width>\n    <height>10</height>\n   </rect>\n   <font>\n    <face>Arial</face>\n    <size>10</size>\n    <weight>normal</weight>\n   </font>\n   <hcenter/>\n   <vcenter/>\n   <string>400</string>\n  </label>\n  <line>\n   <xstart>0</xstart>\n   <ystart>370</ystart>\n   <xend>850</xend>\n   <yend>370</yend>\n   <weight>1</weight>\n  </line>\n  <line>\n   <xstart>550</xstart>\n   <ystart>0</ystart>\n   <xend>550</xend>\n   <yend>1150</yend>\n   <weight>1</weight>\n  </line>\n  <line>\n   <xstart>250</xstart>\n   <ystart>0</ystart>\n   <xend>250</xend>\n   <yend>1150</yend>\n   <weight>1</weight>\n  </line>\n  <line>\n   <xstart>0</xstart>\n   <ystart>600</ystart>\n   <xend>850</xend>\n   <yend>600</yend>\n   <weight>1</weight>\n  </line>\n  <line>\n   <xstart>600</xstart>\n   <ystart>0</ystart>\n   <xend>600</xend>\n   <yend>1150</yend>\n   <weight>1</weight>\n  </line>\n  <line>\n   <xstart>0</xstart>\n   <ystart>0</ystart>\n   <xend>850</xend>\n   <yend>0</yend>\n   <weight>1</weight>\n  </line>\n  <line>\n   <xstart>509</xstart>\n   <ystart>0</ystart>\n   <xend>509</xend>\n   <yend>1150</yend>\n   <weight>1</weight>\n  </line>\n  <line>\n   <xstart>640</xstart>\n   <ystart>0</ystart>\n   <xend>640</xend>\n   <yend>1150</yend>\n   <weight>1</weight>\n  </line>\n  <line>\n   <xstart>409</xstart>\n   <ystart>0</ystart>\n   <xend>409</xend>\n   <yend>1150</yend>\n   <weight>1</weight>\n  </line>\n  <line>\n   <xstart>0</xstart>\n   <ystart>250</ystart>\n   <xend>850</xend>\n   <yend>250</yend>\n   <weight>1</weight>\n  </line>\n  <line>\n   <xstart>480</xstart>\n   <ystart>0</ystart>\n   <xend>480</xend>\n   <yend>1150</yend>\n   <weight>1</weight>\n  </line>\n  <line>\n   <xstart>0</xstart>\n   <ystart>50</ystart>\n   <xend>850</xend>\n   <yend>50</yend>\n   <weight>1</weight>\n  </line>\n  <line>\n   <xstart>0</xstart>\n   <ystart>720</ystart>\n   <xend>850</xend>\n   <yend>720</yend>\n   <weight>1</weight>\n  </line>\n  <line>\n   <xstart>0</xstart>\n   <ystart>1070</ystart>\n   <xend>850</xend>\n   <yend>1070</yend>\n   <weight>1</weight>\n  </line>\n  <line>\n   <xstart>819</xstart>\n   <ystart>0</ystart>\n   <xend>819</xend>\n   <yend>1150</yend>\n   <weight>1</weight>\n  </line>\n  <line>\n   <xstart>0</xstart>\n   <ystart>770</ystart>\n   <xend>850</xend>\n   <yend>770</yend>\n   <weight>1</weight>\n  </line>\n  <line>\n   <xstart>0</xstart>\n   <ystart>560</ystart>\n   <xend>850</xend>\n   <yend>560</yend>\n   <weight>1</weight>\n  </line>\n  <line>\n   <xstart>0</xstart>\n   <ystart>20</ystart>\n   <xend>850</xend>\n   <yend>20</yend>\n   <weight>1</weight>\n  </line>\n  <line>\n   <xstart>0</xstart>\n   <ystart>90</ystart>\n   <xend>850</xend>\n   <yend>90</yend>\n   <weight>1</weight>\n  </line>\n  <line>\n   <xstart>0</xstart>\n   <ystart>860</ystart>\n   <xend>850</xend>\n   <yend>860</yend>\n   <weight>1</weight>\n  </line>\n  <line>\n   <xstart>660</xstart>\n   <ystart>0</ystart>\n   <xend>660</xend>\n   <yend>1150</yend>\n   <weight>1</weight>\n  </line>\n  <line>\n   <xstart>790</xstart>\n   <ystart>0</ystart>\n   <xend>790</xend>\n   <yend>1150</yend>\n   <weight>1</weight>\n  </line>\n  <line>\n   <xstart>0</xstart>\n   <ystart>580</ystart>\n   <xend>850</xend>\n   <yend>580</yend>\n   <weight>1</weight>\n  </line>\n  <line>\n   <xstart>459</xstart>\n   <ystart>0</ystart>\n   <xend>459</xend>\n   <yend>1150</yend>\n   <weight>1</weight>\n  </line>\n  <line>\n   <xstart>0</xstart>\n   <ystart>170</ystart>\n   <xend>850</xend>\n   <yend>170</yend>\n   <weight>1</weight>\n  </line>\n  <line>\n   <xstart>50</xstart>\n   <ystart>0</ystart>\n   <xend>50</xend>\n   <yend>1150</yend>\n   <weight>1</weight>\n  </line>\n  <label>\n   <rect>\n    <x>750</x>\n    <y>250</y>\n    <width>100</width>\n    <height>10</height>\n   </rect>\n   <font>\n    <face>Arial</face>\n    <size>10</size>\n    <weight>normal</weight>\n   </font>\n   <hcenter/>\n   <vcenter/>\n   <string>800</string>\n  </label>\n  <line>\n   <xstart>150</xstart>\n   <ystart>0</ystart>\n   <xend>150</xend>\n   <yend>1150</yend>\n   <weight>1</weight>\n  </line>\n  <line>\n   <xstart>0</xstart>\n   <ystart>1100</ystart>\n   <xend>850</xend>\n   <yend>1100</yend>\n   <weight>1</weight>\n  </line>\n  <line>\n   <xstart>500</xstart>\n   <ystart>0</ystart>\n   <xend>500</xend>\n   <yend>1150</yend>\n   <weight>1</weight>\n  </line>\n  <line>\n   <xstart>0</xstart>\n   <ystart>70</ystart>\n   <xend>850</xend>\n   <yend>70</yend>\n   <weight>1</weight>\n  </line>\n  <line>\n   <xstart>0</xstart>\n   <ystart>610</ystart>\n   <xend>850</xend>\n   <yend>610</yend>\n   <weight>1</weight>\n  </line>\n  <line>\n   <xstart>0</xstart>\n   <ystart>1140</ystart>\n   <xend>850</xend>\n   <yend>1140</yend>\n   <weight>1</weight>\n  </line>\n  <line>\n   <xstart>110</xstart>\n   <ystart>0</ystart>\n   <xend>110</xend>\n   <yend>1150</yend>\n   <weight>1</weight>\n  </line>\n  <line>\n   <xstart>770</xstart>\n   <ystart>0</ystart>\n   <xend>770</xend>\n   <yend>1150</yend>\n   <weight>1</weight>\n  </line>\n  <line>\n   <xstart>0</xstart>\n   <ystart>590</ystart>\n   <xend>850</xend>\n   <yend>590</yend>\n   <weight>1</weight>\n  </line>\n  <line>\n   <xstart>740</xstart>\n   <ystart>0</ystart>\n   <xend>740</xend>\n   <yend>1150</yend>\n   <weight>1</weight>\n  </line>\n  <line>\n   <xstart>0</xstart>\n   <ystart>630</ystart>\n   <xend>850</xend>\n   <yend>630</yend>\n   <weight>1</weight>\n  </line>\n  <line>\n   <xstart>0</xstart>\n   <ystart>1030</ystart>\n   <xend>850</xend>\n   <yend>1030</yend>\n   <weight>1</weight>\n  </line>\n  <line>\n   <xstart>690</xstart>\n   <ystart>0</ystart>\n   <xend>690</xend>\n   <yend>1150</yend>\n   <weight>1</weight>\n  </line>\n  <label>\n   <rect>\n    <x>100</x>\n    <y>95</y>\n    <width>100</width>\n    <height>10</height>\n   </rect>\n   <font>\n    <face>Arial</face>\n    <size>10</size>\n    <weight>normal</weight>\n   </font>\n   <hcenter/>\n   <vcenter/>\n   <string>100</string>\n  </label>\n  <line>\n   <xstart>0</xstart>\n   <ystart>550</ystart>\n   <xend>850</xend>\n   <yend>550</yend>\n   <weight>1</weight>\n  </line>\n  <line>\n   <xstart>0</xstart>\n   <ystart>140</ystart>\n   <xend>850</xend>\n   <yend>140</yend>\n   <weight>1</weight>\n  </line>\n  <line>\n   <xstart>0</xstart>\n   <ystart>1050</ystart>\n   <xend>850</xend>\n   <yend>1050</yend>\n   <weight>1</weight>\n  </line>\n  <line>\n   <xstart>0</xstart>\n   <ystart>1019</ystart>\n   <xend>850</xend>\n   <yend>1019</yend>\n   <weight>1</weight>\n  </line>\n  <line>\n   <xstart>520</xstart>\n   <ystart>0</ystart>\n   <xend>520</xend>\n   <yend>1150</yend>\n   <weight>1</weight>\n  </line>\n  <line>\n   <xstart>0</xstart>\n   <ystart>1000</ystart>\n   <xend>850</xend>\n   <yend>1000</yend>\n   <weight>1</weight>\n  </line>\n  <line>\n   <xstart>100</xstart>\n   <ystart>0</ystart>\n   <xend>100</xend>\n   <yend>1150</yend>\n   <weight>1</weight>\n  </line>\n  <line>\n   <xstart>450</xstart>\n   <ystart>0</ystart>\n   <xend>450</xend>\n   <yend>1150</yend>\n   <weight>1</weight>\n  </line>\n  <line>\n   <xstart>720</xstart>\n   <ystart>0</ystart>\n   <xend>720</xend>\n   <yend>1150</yend>\n   <weight>1</weight>\n  </line>\n  <line>\n   <xstart>160</xstart>\n   <ystart>0</ystart>\n   <xend>160</xend>\n   <yend>1150</yend>\n   <weight>1</weight>\n  </line>\n  <line>\n   <xstart>0</xstart>\n   <ystart>60</ystart>\n   <xend>850</xend>\n   <yend>60</yend>\n   <weight>1</weight>\n  </line>\n  <line>\n   <xstart>0</xstart>\n   <ystart>450</ystart>\n   <xend>850</xend>\n   <yend>450</yend>\n   <weight>1</weight>\n  </line>\n  <line>\n   <xstart>760</xstart>\n   <ystart>0</ystart>\n   <xend>760</xend>\n   <yend>1150</yend>\n   <weight>1</weight>\n  </line>\n  <line>\n   <xstart>0</xstart>\n   <ystart>420</ystart>\n   <xend>850</xend>\n   <yend>420</yend>\n   <weight>1</weight>\n  </line>\n  <line>\n   <xstart>680</xstart>\n   <ystart>0</ystart>\n   <xend>680</xend>\n   <yend>1150</yend>\n   <weight>1</weight>\n  </line>\n  <line>\n   <xstart>0</xstart>\n   <ystart>850</ystart>\n   <xend>850</xend>\n   <yend>850</yend>\n   <weight>1</weight>\n  </line>\n  <line>\n   <xstart>650</xstart>\n   <ystart>0</ystart>\n   <xend>650</xend>\n   <yend>1150</yend>\n   <weight>1</weight>\n  </line>\n  <line>\n   <xstart>620</xstart>\n   <ystart>0</ystart>\n   <xend>620</xend>\n   <yend>1150</yend>\n   <weight>1</weight>\n  </line>\n  <line>\n   <xstart>0</xstart>\n   <ystart>190</ystart>\n   <xend>850</xend>\n   <yend>190</yend>\n   <weight>1</weight>\n  </line>\n  <line>\n   <xstart>0</xstart>\n   <ystart>409</ystart>\n   <xend>850</xend>\n   <yend>409</yend>\n   <weight>1</weight>\n  </line>\n  <line>\n   <xstart>40</xstart>\n   <ystart>0</ystart>\n   <xend>40</xend>\n   <yend>1150</yend>\n   <weight>1</weight>\n  </line>\n  <line>\n   <xstart>700</xstart>\n   <ystart>0</ystart>\n   <xend>700</xend>\n   <yend>1150</yend>\n   <weight>1</weight>\n  </line>\n  <line>\n   <xstart>0</xstart>\n   <ystart>1010</ystart>\n   <xend>850</xend>\n   <yend>1010</yend>\n   <weight>1</weight>\n  </line>\n  <line>\n   <xstart>800</xstart>\n   <ystart>0</ystart>\n   <xend>800</xend>\n   <yend>1150</yend>\n   <weight>1</weight>\n  </line>\n  <line>\n   <xstart>240</xstart>\n   <ystart>0</ystart>\n   <xend>240</xend>\n   <yend>1150</yend>\n   <weight>1</weight>\n  </line>\n  <line>\n   <xstart>310</xstart>\n   <ystart>0</ystart>\n   <xend>310</xend>\n   <yend>1150</yend>\n   <weight>1</weight>\n  </line>\n  <line>\n   <xstart>710</xstart>\n   <ystart>0</ystart>\n   <xend>710</xend>\n   <yend>1150</yend>\n   <weight>1</weight>\n  </line>\n  <line>\n   <xstart>0</xstart>\n   <ystart>540</ystart>\n   <xend>850</xend>\n   <yend>540</yend>\n   <weight>1</weight>\n  </line>\n  <line>\n   <xstart>10</xstart>\n   <ystart>0</ystart>\n   <xend>10</xend>\n   <yend>1150</yend>\n   <weight>1</weight>\n  </line>\n  <line>\n   <xstart>570</xstart>\n   <ystart>0</ystart>\n   <xend>570</xend>\n   <yend>1150</yend>\n   <weight>1</weight>\n  </line>\n  <line>\n   <xstart>0</xstart>\n   <ystart>810</ystart>\n   <xend>850</xend>\n   <yend>810</yend>\n   <weight>1</weight>\n  </line>\n  <line>\n   <xstart>0</xstart>\n   <ystart>1130</ystart>\n   <xend>850</xend>\n   <yend>1130</yend>\n   <weight>1</weight>\n  </line>\n  <line>\n   <xstart>390</xstart>\n   <ystart>0</ystart>\n   <xend>390</xend>\n   <yend>1150</yend>\n   <weight>1</weight>\n  </line>\n  <line>\n   <xstart>229</xstart>\n   <ystart>0</ystart>\n   <xend>229</xend>\n   <yend>1150</yend>\n   <weight>1</weight>\n  </line>\n  <label>\n   <rect>\n    <x>450</x>\n    <y>250</y>\n    <width>100</width>\n    <height>10</height>\n   </rect>\n   <font>\n    <face>Arial</face>\n    <size>10</size>\n    <weight>normal</weight>\n   </font>\n   <hcenter/>\n   <vcenter/>\n   <string>500</string>\n  </label>\n  <line>\n   <xstart>0</xstart>\n   <ystart>680</ystart>\n   <xend>850</xend>\n   <yend>680</yend>\n   <weight>1</weight>\n  </line>\n  <line>\n   <xstart>0</xstart>\n   <ystart>270</ystart>\n   <xend>850</xend>\n   <yend>270</yend>\n   <weight>1</weight>\n  </line>\n  <line>\n   <xstart>180</xstart>\n   <ystart>0</ystart>\n   <xend>180</xend>\n   <yend>1150</yend>\n   <weight>1</weight>\n  </line>\n  <line>\n   <xstart>850</xstart>\n   <ystart>0</ystart>\n   <xend>850</xend>\n   <yend>1150</yend>\n   <weight>1</weight>\n  </line>\n  <line>\n   <xstart>0</xstart>\n   <ystart>80</ystart>\n   <xend>850</xend>\n   <yend>80</yend>\n   <weight>1</weight>\n  </line>\n  <line>\n   <xstart>0</xstart>\n   <ystart>240</ystart>\n   <xend>850</xend>\n   <yend>240</yend>\n   <weight>1</weight>\n  </line>\n  <line>\n   <xstart>0</xstart>\n   <ystart>750</ystart>\n   <xend>850</xend>\n   <yend>750</yend>\n   <weight>1</weight>\n  </line>\n  <line>\n   <xstart>0</xstart>\n   <ystart>160</ystart>\n   <xend>850</xend>\n   <yend>160</yend>\n   <weight>1</weight>\n  </line>\n  <line>\n   <xstart>0</xstart>\n   <ystart>290</ystart>\n   <xend>850</xend>\n   <yend>290</yend>\n   <weight>1</weight>\n  </line>\n  <line>\n   <xstart>0</xstart>\n   <ystart>910</ystart>\n   <xend>850</xend>\n   <yend>910</yend>\n   <weight>1</weight>\n  </line>\n  <line>\n   <xstart>840</xstart>\n   <ystart>0</ystart>\n   <xend>840</xend>\n   <yend>1150</yend>\n   <weight>1</weight>\n  </line>\n  <line>\n   <xstart>0</xstart>\n   <ystart>229</ystart>\n   <xend>850</xend>\n   <yend>229</yend>\n   <weight>1</weight>\n  </line>\n  <line>\n   <xstart>670</xstart>\n   <ystart>0</ystart>\n   <xend>670</xend>\n   <yend>1150</yend>\n   <weight>1</weight>\n  </line>\n  <line>\n   <xstart>0</xstart>\n   <ystart>330</ystart>\n   <xend>850</xend>\n   <yend>330</yend>\n   <weight>1</weight>\n  </line>\n  <line>\n   <xstart>0</xstart>\n   <ystart>710</ystart>\n   <xend>850</xend>\n   <yend>710</yend>\n   <weight>1</weight>\n  </line>\n  <line>\n   <xstart>0</xstart>\n   <ystart>840</ystart>\n   <xend>850</xend>\n   <yend>840</yend>\n   <weight>1</weight>\n  </line>\n  <line>\n   <xstart>60</xstart>\n   <ystart>0</ystart>\n   <xend>60</xend>\n   <yend>1150</yend>\n   <weight>1</weight>\n  </line>\n  <line>\n   <xstart>0</xstart>\n   <ystart>790</ystart>\n   <xend>850</xend>\n   <yend>790</yend>\n   <weight>1</weight>\n  </line>\n  <line>\n   <xstart>0</xstart>\n   <ystart>1060</ystart>\n   <xend>850</xend>\n   <yend>1060</yend>\n   <weight>1</weight>\n  </line>\n  <line>\n   <xstart>190</xstart>\n   <ystart>0</ystart>\n   <xend>190</xend>\n   <yend>1150</yend>\n   <weight>1</weight>\n  </line>\n  <line>\n   <xstart>590</xstart>\n   <ystart>0</ystart>\n   <xend>590</xend>\n   <yend>1150</yend>\n   <weight>1</weight>\n  </line>\n  <line>\n   <xstart>810</xstart>\n   <ystart>0</ystart>\n   <xend>810</xend>\n   <yend>1150</yend>\n   <weight>1</weight>\n  </line>\n  <line>\n   <xstart>530</xstart>\n   <ystart>0</ystart>\n   <xend>530</xend>\n   <yend>1150</yend>\n   <weight>1</weight>\n  </line>\n  <line>\n   <xstart>0</xstart>\n   <ystart>520</ystart>\n   <xend>850</xend>\n   <yend>520</yend>\n   <weight>1</weight>\n  </line>\n  <line>\n   <xstart>0</xstart>\n   <ystart>340</ystart>\n   <xend>850</xend>\n   <yend>340</yend>\n   <weight>1</weight>\n  </line>\n  <line>\n   <xstart>0</xstart>\n   <ystart>390</ystart>\n   <xend>850</xend>\n   <yend>390</yend>\n   <weight>1</weight>\n  </line>\n  <line>\n   <xstart>90</xstart>\n   <ystart>0</ystart>\n   <xend>90</xend>\n   <yend>1150</yend>\n   <weight>1</weight>\n  </line>\n  <line>\n   <xstart>0</xstart>\n   <ystart>120</ystart>\n   <xend>850</xend>\n   <yend>120</yend>\n   <weight>1</weight>\n  </line>\n  <label>\n   <rect>\n    <x>100</x>\n    <y>495</y>\n    <width>100</width>\n    <height>10</height>\n   </rect>\n   <font>\n    <face>Arial</face>\n    <size>10</size>\n    <weight>normal</weight>\n   </font>\n   <hcenter/>\n   <vcenter/>\n   <string>500</string>\n  </label>\n  <label>\n   <rect>\n    <x>100</x>\n    <y>995</y>\n    <width>100</width>\n    <height>10</height>\n   </rect>\n   <font>\n    <face>Arial</face>\n    <size>10</size>\n    <weight>normal</weight>\n   </font>\n   <hcenter/>\n   <vcenter/>\n   <string>1000</string>\n  </label>\n  <line>\n   <xstart>0</xstart>\n   <ystart>830</ystart>\n   <xend>850</xend>\n   <yend>830</yend>\n   <weight>1</weight>\n  </line>\n  <line>\n   <xstart>0</xstart>\n   <ystart>880</ystart>\n   <xend>850</xend>\n   <yend>880</yend>\n   <weight>1</weight>\n  </line>\n  <label>\n   <rect>\n    <x>50</x>\n    <y>250</y>\n    <width>100</width>\n    <height>10</height>\n   </rect>\n   <font>\n    <face>Arial</face>\n    <size>10</size>\n    <weight>normal</weight>\n   </font>\n   <hcenter/>\n   <vcenter/>\n   <string>100</string>\n  </label>\n  <line>\n   <xstart>0</xstart>\n   <ystart>200</ystart>\n   <xend>850</xend>\n   <yend>200</yend>\n   <weight>1</weight>\n  </line>\n  <line>\n   <xstart>830</xstart>\n   <ystart>0</ystart>\n   <xend>830</xend>\n   <yend>1150</yend>\n   <weight>1</weight>\n  </line>\n  <line>\n   <xstart>0</xstart>\n   <ystart>780</ystart>\n   <xend>850</xend>\n   <yend>780</yend>\n   <weight>1</weight>\n  </line>\n  <line>\n   <xstart>0</xstart>\n   <ystart>500</ystart>\n   <xend>850</xend>\n   <yend>500</yend>\n   <weight>1</weight>\n  </line>\n  <line>\n   <xstart>120</xstart>\n   <ystart>0</ystart>\n   <xend>120</xend>\n   <yend>1150</yend>\n   <weight>1</weight>\n  </line>\n  <line>\n   <xstart>0</xstart>\n   <ystart>440</ystart>\n   <xend>850</xend>\n   <yend>440</yend>\n   <weight>1</weight>\n  </line>\n  <line>\n   <xstart>320</xstart>\n   <ystart>0</ystart>\n   <xend>320</xend>\n   <yend>1150</yend>\n   <weight>1</weight>\n  </line>\n  <line>\n   <xstart>370</xstart>\n   <ystart>0</ystart>\n   <xend>370</xend>\n   <yend>1150</yend>\n   <weight>1</weight>\n  </line>\n  <line>\n   <xstart>0</xstart>\n   <ystart>430</ystart>\n   <xend>850</xend>\n   <yend>430</yend>\n   <weight>1</weight>\n  </line>\n  <line>\n   <xstart>210</xstart>\n   <ystart>0</ystart>\n   <xend>210</xend>\n   <yend>1150</yend>\n   <weight>1</weight>\n  </line>\n  <line>\n   <xstart>610</xstart>\n   <ystart>0</ystart>\n   <xend>610</xend>\n   <yend>1150</yend>\n   <weight>1</weight>\n  </line>\n  <line>\n   <xstart>290</xstart>\n   <ystart>0</ystart>\n   <xend>290</xend>\n   <yend>1150</yend>\n   <weight>1</weight>\n  </line>\n  <line>\n   <xstart>330</xstart>\n   <ystart>0</ystart>\n   <xend>330</xend>\n   <yend>1150</yend>\n   <weight>1</weight>\n  </line>\n  <line>\n   <xstart>0</xstart>\n   <ystart>1080</ystart>\n   <xend>850</xend>\n   <yend>1080</yend>\n   <weight>1</weight>\n  </line>\n  <line>\n   <xstart>430</xstart>\n   <ystart>0</ystart>\n   <xend>430</xend>\n   <yend>1150</yend>\n   <weight>1</weight>\n  </line>\n  <line>\n   <xstart>380</xstart>\n   <ystart>0</ystart>\n   <xend>380</xend>\n   <yend>1150</yend>\n   <weight>1</weight>\n  </line>\n  <line>\n   <xstart>750</xstart>\n   <ystart>0</ystart>\n   <xend>750</xend>\n   <yend>1150</yend>\n   <weight>1</weight>\n  </line>\n  <line>\n   <xstart>0</xstart>\n   <ystart>969</ystart>\n   <xend>850</xend>\n   <yend>969</yend>\n   <weight>1</weight>\n  </line>\n  <line>\n   <xstart>0</xstart>\n   <ystart>490</ystart>\n   <xend>850</xend>\n   <yend>490</yend>\n   <weight>1</weight>\n  </line>\n  <line>\n   <xstart>270</xstart>\n   <ystart>0</ystart>\n   <xend>270</xend>\n   <yend>1150</yend>\n   <weight>1</weight>\n  </line>\n  <line>\n   <xstart>0</xstart>\n   <ystart>1110</ystart>\n   <xend>850</xend>\n   <yend>1110</yend>\n   <weight>1</weight>\n  </line>\n  <line>\n   <xstart>0</xstart>\n   <ystart>320</ystart>\n   <xend>850</xend>\n   <yend>320</yend>\n   <weight>1</weight>\n  </line>\n </rpthead>\n</report>\n		0	2015-10-01 17:14:33.361434
461	ItemSites	\N	<!DOCTYPE openRPTDef>\n<report>\n <title>Item Sites</title>\n <name>ItemSites</name>\n <description></description>\n <grid>\n  <snap/>\n  <show/>\n  <x>0.05</x>\n  <y>0.05</y>\n </grid>\n <size>Letter</size>\n <portrait/>\n <topmargin>50</topmargin>\n <bottommargin>50</bottommargin>\n <rightmargin>50</rightmargin>\n <leftmargin>50</leftmargin>\n <querysource>\n  <name>detail</name>\n  <sql>SELECT warehous_code,\n       formatBoolYN(itemsite_active) AS active,\n       item_number,\n       item_descrip1,\n       item_descrip2,\n       formatBoolYN(itemsite_wosupply) AS supplied,\n       formatBoolYN(itemsite_sold) AS sold,\n       itemsite_soldranking,\n       formatBoolYN(itemsite_stocked) AS stocked,\n       formatBoolYN(itemsite_createpr) AS createpr,\n       CASE WHEN (itemsite_controlmethod='N') THEN 'None'\n            WHEN (itemsite_controlmethod='R') THEN 'Regular'\n            WHEN (itemsite_controlmethod='L') THEN 'Lot #'\n            WHEN (itemsite_controlmethod='S') THEN 'Serial #'\n            ELSE '?'\n       END AS controlmethod,\n       formatBoolYN(itemsite_loccntrl) AS locationcontrol,\n       CASE WHEN (itemsite_location_id=-1) THEN 'None'\n            ELSE ( SELECT location_name\n                     FROM location\n                    WHERE (location_id=itemsite_location_id) )\n       END AS defaultlocation,\n       formatBoolYN(itemsite_useparams) AS enforceparams,\n       formatBoolYN(itemsite_useparamsmanual) AS onmanualorders,\n       formatQty(itemsite_reorderlevel) AS reorderlevel,\n       formatQty(itemsite_ordertoqty) AS orderupto,\n       formatQty(itemsite_multordqty) AS ordermult,\n       formatQty(itemsite_safetystock) AS safetystock,\n       itemsite_abcclass,\n       itemsite_cyclecountfreq,\n       itemsite_leadtime,\n       itemsite_eventfence,\n       formatQty(itemsite_qtyonhand) AS qoh,\n       formatDate(itemsite_datelastused, 'Never') AS lastused,\n       formatDate(itemsite_datelastcount, 'Never') AS lastcounted,\n       CASE WHEN(itemsite_plancode_id=-1) THEN 'Error'\n            ELSE (SELECT (plancode_code || '-' || plancode_name)\n                    FROM plancode\n                   WHERE (plancode_id=itemsite_plancode_id) )\n       END AS plannercode\n  FROM item, uom, itemsite, whsinfo\n WHERE ((itemsite_warehous_id=warehous_id)\n         AND (itemsite_item_id=item_id)\n         AND(item_inv_uom_id=uom_id)\n       &lt;? if exists("search_pattern") ?>\n         AND ((item_number ~* &lt;? value("search_pattern") ?>)\n           OR (item_descrip1 || ' ' || item_descrip2 ~* &lt;? value("search_pattern") ?>)\n           OR (warehous_code ~* &lt;? value("search_pattern") ?>))\n       &lt;? endif ?>\n       &lt;? if exists("item_id") ?>\n         AND (item_id=&lt;? value("item_id") ?>)\n       &lt;? endif ?>\n       &lt;? if exists("classcode_id") ?>\n         AND (item_classcode_id=&lt;? value("classcode_id") ?>)\n       &lt;? endif ?>\n       &lt;? if exists("itemgrp_id") ?>\n         AND (item_id IN (SELECT itemgrpitem_item_id \n                          FROM itemgrpitem \n                          WHERE (itemgrpitem_itemgrp_id=&lt;? value("itemgrp_id") ?>)))\n       &lt;? endif ?>\n       &lt;? if exists("plancode_id") ?>\n         AND (itemsite_plancode_id=&lt;? value("plancode_id") ?>)\n       &lt;? endif ?>\n       &lt;? if exists("costcat_id") ?>\n         AND (itemsite_costcat_id=&lt;? value("costcat_id") ?>)\n       &lt;? endif ?>\n       &lt;? if exists("classcode_pattern") ?>\n         AND (item_classcode_id IN (SELECT classcode_id \n                                    FROM classcode \n                                    WHERE (classcode_code ~ &lt;? value("classcode_pattern") ?>)))\n       &lt;? endif ?>\n       &lt;? if exists("itemgrp_pattern") ?>\n         AND (item_id IN (SELECT itemgrpitem_item_id \n                          FROM itemgrpitem, itemgrp \n                          WHERE ( (itemgrpitem_itemgrp_id=itemgrp_id) \n                              AND (itemgrp_name ~ &lt;? value("itemgrp_pattern") ?>) ) ))\n       &lt;? endif ?>\n       &lt;? if exists("plancode_pattern") ?>\n         AND (itemsite_plancode_id IN (SELECT plancode_id \n                                       FROM plancode \n                                       WHERE (plancode_code ~ &lt;? value("plancode_pattern") ?>)))\n       &lt;? endif ?>\n       &lt;? if exists("costcat_pattern") ?>\n         AND (itemsite_costcat_id IN (SELECT costcat_id \n                                      FROM costcat \n                                      WHERE (costcat_code ~ &lt;? value("costcat_pattern") ?>)))\n       &lt;? endif ?>\n     &lt;? if exists("warehous_id") ?>\n       AND (warehous_id=&lt;? value("warehous_id") ?>)\n     &lt;? endif ?>\n   &lt;? if not exists("showInactive") ?>\n     AND (itemsite_active)\n   &lt;? endif ?>\n)\nORDER BY item_number, warehous_code;</sql>\n </querysource>\n <rpthead>\n  <height>281</height>\n  <label>\n   <rect>\n    <x>430</x>\n    <y>254</y>\n    <width>80</width>\n    <height>15</height>\n   </rect>\n   <font>\n    <face>Arial</face>\n    <size>8</size>\n    <weight>normal</weight>\n   </font>\n   <hcenter/>\n   <vcenter/>\n   <string>Last Counted</string>\n  </label>\n  <label>\n   <rect>\n    <x>345</x>\n    <y>254</y>\n    <width>80</width>\n    <height>15</height>\n   </rect>\n   <font>\n    <face>Arial</face>\n    <size>8</size>\n    <weight>normal</weight>\n   </font>\n   <hcenter/>\n   <vcenter/>\n   <string>Last Used</string>\n  </label>\n  <label>\n   <rect>\n    <x>330</x>\n    <y>200</y>\n    <width>75</width>\n    <height>15</height>\n   </rect>\n   <font>\n    <face>Arial</face>\n    <size>8</size>\n    <weight>normal</weight>\n   </font>\n   <hcenter/>\n   <vcenter/>\n   <string>Create P/Rs</string>\n  </label>\n  <label>\n   <rect>\n    <x>280</x>\n    <y>229</y>\n    <width>45</width>\n    <height>15</height>\n   </rect>\n   <font>\n    <face>Arial</face>\n    <size>8</size>\n    <weight>normal</weight>\n   </font>\n   <hcenter/>\n   <vcenter/>\n   <string>Stocked</string>\n  </label>\n  <label>\n   <rect>\n    <x>10</x>\n    <y>215</y>\n    <width>35</width>\n    <height>15</height>\n   </rect>\n   <font>\n    <face>Arial</face>\n    <size>8</size>\n    <weight>normal</weight>\n   </font>\n   <hcenter/>\n   <vcenter/>\n   <string>Active</string>\n  </label>\n  <label>\n   <rect>\n    <x>50</x>\n    <y>245</y>\n    <width>100</width>\n    <height>15</height>\n   </rect>\n   <font>\n    <face>Arial</face>\n    <size>8</size>\n    <weight>normal</weight>\n   </font>\n   <left/>\n   <vcenter/>\n   <string>Planner Code</string>\n  </label>\n  <label>\n   <rect>\n    <x>580</x>\n    <y>215</y>\n    <width>80</width>\n    <height>15</height>\n   </rect>\n   <font>\n    <face>Arial</face>\n    <size>8</size>\n    <weight>normal</weight>\n   </font>\n   <hcenter/>\n   <vcenter/>\n   <string>Order Up To</string>\n  </label>\n  <label>\n   <rect>\n    <x>670</x>\n    <y>229</y>\n    <width>55</width>\n    <height>15</height>\n   </rect>\n   <font>\n    <face>Arial</face>\n    <size>8</size>\n    <weight>normal</weight>\n   </font>\n   <hcenter/>\n   <vcenter/>\n   <string>Lead Time</string>\n  </label>\n  <label>\n   <rect>\n    <x>280</x>\n    <y>215</y>\n    <width>45</width>\n    <height>15</height>\n   </rect>\n   <font>\n    <face>Arial</face>\n    <size>8</size>\n    <weight>normal</weight>\n   </font>\n   <hcenter/>\n   <vcenter/>\n   <string>Sold</string>\n  </label>\n  <label>\n   <rect>\n    <x>330</x>\n    <y>215</y>\n    <width>75</width>\n    <height>15</height>\n   </rect>\n   <font>\n    <face>Arial</face>\n    <size>8</size>\n    <weight>normal</weight>\n   </font>\n   <hcenter/>\n   <vcenter/>\n   <string>Ranking</string>\n  </label>\n  <label>\n   <rect>\n    <x>670</x>\n    <y>245</y>\n    <width>55</width>\n    <height>15</height>\n   </rect>\n   <font>\n    <face>Arial</face>\n    <size>8</size>\n    <weight>normal</weight>\n   </font>\n   <hcenter/>\n   <vcenter/>\n   <string>Event Fnc.</string>\n  </label>\n  <line>\n   <xstart>5</xstart>\n   <ystart>275</ystart>\n   <xend>745</xend>\n   <yend>275</yend>\n   <weight>2</weight>\n  </line>\n  <label>\n   <rect>\n    <x>275</x>\n    <y>254</y>\n    <width>65</width>\n    <height>15</height>\n   </rect>\n   <font>\n    <face>Arial</face>\n    <size>8</size>\n    <weight>normal</weight>\n   </font>\n   <hcenter/>\n   <vcenter/>\n   <string>QOH</string>\n  </label>\n  <label>\n   <rect>\n    <x>490</x>\n    <y>200</y>\n    <width>85</width>\n    <height>15</height>\n   </rect>\n   <font>\n    <face>Arial</face>\n    <size>8</size>\n    <weight>normal</weight>\n   </font>\n   <hcenter/>\n   <vcenter/>\n   <string>Enforce Params.</string>\n  </label>\n  <label>\n   <rect>\n    <x>375</x>\n    <y>10</y>\n    <width>350</width>\n    <height>38</height>\n   </rect>\n   <font>\n    <face>Arial</face>\n    <size>18</size>\n    <weight>bold</weight>\n   </font>\n   <right/>\n   <vcenter/>\n   <string>Item Sites</string>\n  </label>\n  <label>\n   <rect>\n    <x>580</x>\n    <y>200</y>\n    <width>80</width>\n    <height>15</height>\n   </rect>\n   <font>\n    <face>Arial</face>\n    <size>8</size>\n    <weight>normal</weight>\n   </font>\n   <hcenter/>\n   <vcenter/>\n   <string>Reorder Lvl.</string>\n  </label>\n  <label>\n   <rect>\n    <x>10</x>\n    <y>200</y>\n    <width>35</width>\n    <height>15</height>\n   </rect>\n   <font>\n    <face>Arial</face>\n    <size>8</size>\n    <weight>normal</weight>\n   </font>\n   <hcenter/>\n   <vcenter/>\n   <string>Site</string>\n  </label>\n  <label>\n   <rect>\n    <x>670</x>\n    <y>215</y>\n    <width>55</width>\n    <height>15</height>\n   </rect>\n   <font>\n    <face>Arial</face>\n    <size>8</size>\n    <weight>normal</weight>\n   </font>\n   <hcenter/>\n   <vcenter/>\n   <string>Cycle Cnt.</string>\n  </label>\n  <label>\n   <rect>\n    <x>670</x>\n    <y>200</y>\n    <width>55</width>\n    <height>15</height>\n   </rect>\n   <font>\n    <face>Arial</face>\n    <size>8</size>\n    <weight>normal</weight>\n   </font>\n   <hcenter/>\n   <vcenter/>\n   <string>ABC Class</string>\n  </label>\n  <label>\n   <rect>\n    <x>280</x>\n    <y>200</y>\n    <width>45</width>\n    <height>15</height>\n   </rect>\n   <font>\n    <face>Arial</face>\n    <size>8</size>\n    <weight>normal</weight>\n   </font>\n   <hcenter/>\n   <vcenter/>\n   <string>Supplied</string>\n  </label>\n  <label>\n   <rect>\n    <x>490</x>\n    <y>215</y>\n    <width>85</width>\n    <height>15</height>\n   </rect>\n   <font>\n    <face>Arial</face>\n    <size>8</size>\n    <weight>normal</weight>\n   </font>\n   <hcenter/>\n   <vcenter/>\n   <string>on Manual Ords.</string>\n  </label>\n  <label>\n   <rect>\n    <x>50</x>\n    <y>215</y>\n    <width>229</width>\n    <height>15</height>\n   </rect>\n   <font>\n    <face>Arial</face>\n    <size>8</size>\n    <weight>normal</weight>\n   </font>\n   <left/>\n   <vcenter/>\n   <string>Item Description</string>\n  </label>\n  <label>\n   <rect>\n    <x>50</x>\n    <y>200</y>\n    <width>229</width>\n    <height>15</height>\n   </rect>\n   <font>\n    <face>Arial</face>\n    <size>8</size>\n    <weight>normal</weight>\n   </font>\n   <left/>\n   <vcenter/>\n   <string>Item Number</string>\n  </label>\n  <label>\n   <rect>\n    <x>409</x>\n    <y>215</y>\n    <width>75</width>\n    <height>15</height>\n   </rect>\n   <font>\n    <face>Arial</face>\n    <size>8</size>\n    <weight>normal</weight>\n   </font>\n   <hcenter/>\n   <vcenter/>\n   <string>Location Cntrl.</string>\n  </label>\n  <label>\n   <rect>\n    <x>409</x>\n    <y>200</y>\n    <width>75</width>\n    <height>15</height>\n   </rect>\n   <font>\n    <face>Arial</face>\n    <size>8</size>\n    <weight>normal</weight>\n   </font>\n   <hcenter/>\n   <vcenter/>\n   <string>Control Method</string>\n  </label>\n  <label>\n   <rect>\n    <x>409</x>\n    <y>229</y>\n    <width>75</width>\n    <height>15</height>\n   </rect>\n   <font>\n    <face>Arial</face>\n    <size>8</size>\n    <weight>normal</weight>\n   </font>\n   <hcenter/>\n   <vcenter/>\n   <string>Default Loc.</string>\n  </label>\n  <label>\n   <rect>\n    <x>580</x>\n    <y>229</y>\n    <width>80</width>\n    <height>15</height>\n   </rect>\n   <font>\n    <face>Arial</face>\n    <size>8</size>\n    <weight>normal</weight>\n   </font>\n   <hcenter/>\n   <vcenter/>\n   <string>Order Mult.</string>\n  </label>\n  <label>\n   <rect>\n    <x>580</x>\n    <y>245</y>\n    <width>80</width>\n    <height>15</height>\n   </rect>\n   <font>\n    <face>Arial</face>\n    <size>8</size>\n    <weight>normal</weight>\n   </font>\n   <hcenter/>\n   <vcenter/>\n   <string>Safety Stock</string>\n  </label>\n  <text>\n   <rect>\n    <x>10</x>\n    <y>38</y>\n    <width>725</width>\n    <height>15</height>\n   </rect>\n   <bottompad>12</bottompad>\n   <font>\n    <face>Arial</face>\n    <size>10</size>\n    <weight>bold</weight>\n   </font>\n   <left/>\n   <top/>\n   <data>\n    <query>Parameter Query</query>\n    <column>filter</column>\n   </data>\n  </text>\n </rpthead>\n <pghead>\n  <firstpage/>\n  <height>6</height>\n </pghead>\n <pghead>\n  <height>81</height>\n  <label>\n   <rect>\n    <x>409</x>\n    <y>15</y>\n    <width>75</width>\n    <height>15</height>\n   </rect>\n   <font>\n    <face>Arial</face>\n    <size>8</size>\n    <weight>normal</weight>\n   </font>\n   <hcenter/>\n   <vcenter/>\n   <string>Location Cntrl.</string>\n  </label>\n  <label>\n   <rect>\n    <x>50</x>\n    <y>45</y>\n    <width>100</width>\n    <height>15</height>\n   </rect>\n   <font>\n    <face>Arial</face>\n    <size>8</size>\n    <weight>normal</weight>\n   </font>\n   <left/>\n   <vcenter/>\n   <string>Planner Code</string>\n  </label>\n  <label>\n   <rect>\n    <x>490</x>\n    <y>15</y>\n    <width>85</width>\n    <height>15</height>\n   </rect>\n   <font>\n    <face>Arial</face>\n    <size>8</size>\n    <weight>normal</weight>\n   </font>\n   <hcenter/>\n   <vcenter/>\n   <string>on Manual Ords.</string>\n  </label>\n  <label>\n   <rect>\n    <x>409</x>\n    <y>0</y>\n    <width>75</width>\n    <height>15</height>\n   </rect>\n   <font>\n    <face>Arial</face>\n    <size>8</size>\n    <weight>normal</weight>\n   </font>\n   <hcenter/>\n   <vcenter/>\n   <string>Control Method</string>\n  </label>\n  <label>\n   <rect>\n    <x>10</x>\n    <y>0</y>\n    <width>35</width>\n    <height>15</height>\n   </rect>\n   <font>\n    <face>Arial</face>\n    <size>8</size>\n    <weight>normal</weight>\n   </font>\n   <hcenter/>\n   <vcenter/>\n   <string>Site</string>\n  </label>\n  <label>\n   <rect>\n    <x>670</x>\n    <y>15</y>\n    <width>55</width>\n    <height>15</height>\n   </rect>\n   <font>\n    <face>Arial</face>\n    <size>8</size>\n    <weight>normal</weight>\n   </font>\n   <hcenter/>\n   <vcenter/>\n   <string>Cycle Cnt.</string>\n  </label>\n  <label>\n   <rect>\n    <x>330</x>\n    <y>15</y>\n    <width>75</width>\n    <height>15</height>\n   </rect>\n   <font>\n    <face>Arial</face>\n    <size>8</size>\n    <weight>normal</weight>\n   </font>\n   <hcenter/>\n   <vcenter/>\n   <string>Ranking</string>\n  </label>\n  <label>\n   <rect>\n    <x>10</x>\n    <y>15</y>\n    <width>35</width>\n    <height>15</height>\n   </rect>\n   <font>\n    <face>Arial</face>\n    <size>8</size>\n    <weight>normal</weight>\n   </font>\n   <hcenter/>\n   <vcenter/>\n   <string>Active</string>\n  </label>\n  <label>\n   <rect>\n    <x>330</x>\n    <y>0</y>\n    <width>75</width>\n    <height>15</height>\n   </rect>\n   <font>\n    <face>Arial</face>\n    <size>8</size>\n    <weight>normal</weight>\n   </font>\n   <hcenter/>\n   <vcenter/>\n   <string>Create P/Rs</string>\n  </label>\n  <label>\n   <rect>\n    <x>50</x>\n    <y>15</y>\n    <width>229</width>\n    <height>15</height>\n   </rect>\n   <font>\n    <face>Arial</face>\n    <size>8</size>\n    <weight>normal</weight>\n   </font>\n   <left/>\n   <vcenter/>\n   <string>Item Description</string>\n  </label>\n  <label>\n   <rect>\n    <x>409</x>\n    <y>30</y>\n    <width>75</width>\n    <height>15</height>\n   </rect>\n   <font>\n    <face>Arial</face>\n    <size>8</size>\n    <weight>normal</weight>\n   </font>\n   <hcenter/>\n   <vcenter/>\n   <string>Default Loc.</string>\n  </label>\n  <label>\n   <rect>\n    <x>50</x>\n    <y>0</y>\n    <width>229</width>\n    <height>15</height>\n   </rect>\n   <font>\n    <face>Arial</face>\n    <size>8</size>\n    <weight>normal</weight>\n   </font>\n   <left/>\n   <vcenter/>\n   <string>Item Number</string>\n  </label>\n  <label>\n   <rect>\n    <x>670</x>\n    <y>30</y>\n    <width>55</width>\n    <height>15</height>\n   </rect>\n   <font>\n    <face>Arial</face>\n    <size>8</size>\n    <weight>normal</weight>\n   </font>\n   <hcenter/>\n   <vcenter/>\n   <string>Lead Time</string>\n  </label>\n  <line>\n   <xstart>5</xstart>\n   <ystart>75</ystart>\n   <xend>745</xend>\n   <yend>75</yend>\n   <weight>2</weight>\n  </line>\n  <label>\n   <rect>\n    <x>490</x>\n    <y>0</y>\n    <width>85</width>\n    <height>15</height>\n   </rect>\n   <font>\n    <face>Arial</face>\n    <size>8</size>\n    <weight>normal</weight>\n   </font>\n   <hcenter/>\n   <vcenter/>\n   <string>Enforce Params.</string>\n  </label>\n  <label>\n   <rect>\n    <x>580</x>\n    <y>15</y>\n    <width>80</width>\n    <height>15</height>\n   </rect>\n   <font>\n    <face>Arial</face>\n    <size>8</size>\n    <weight>normal</weight>\n   </font>\n   <hcenter/>\n   <vcenter/>\n   <string>Order Up To</string>\n  </label>\n  <label>\n   <rect>\n    <x>275</x>\n    <y>55</y>\n    <width>65</width>\n    <height>15</height>\n   </rect>\n   <font>\n    <face>Arial</face>\n    <size>8</size>\n    <weight>normal</weight>\n   </font>\n   <hcenter/>\n   <vcenter/>\n   <string>QOH</string>\n  </label>\n  <label>\n   <rect>\n    <x>670</x>\n    <y>45</y>\n    <width>55</width>\n    <height>15</height>\n   </rect>\n   <font>\n    <face>Arial</face>\n    <size>8</size>\n    <weight>normal</weight>\n   </font>\n   <hcenter/>\n   <vcenter/>\n   <string>Event Fnc.</string>\n  </label>\n  <label>\n   <rect>\n    <x>580</x>\n    <y>45</y>\n    <width>80</width>\n    <height>15</height>\n   </rect>\n   <font>\n    <face>Arial</face>\n    <size>8</size>\n    <weight>normal</weight>\n   </font>\n   <hcenter/>\n   <vcenter/>\n   <string>Safety Stock</string>\n  </label>\n  <label>\n   <rect>\n    <x>280</x>\n    <y>15</y>\n    <width>45</width>\n    <height>15</height>\n   </rect>\n   <font>\n    <face>Arial</face>\n    <size>8</size>\n    <weight>normal</weight>\n   </font>\n   <hcenter/>\n   <vcenter/>\n   <string>Sold</string>\n  </label>\n  <label>\n   <rect>\n    <x>430</x>\n    <y>55</y>\n    <width>80</width>\n    <height>15</height>\n   </rect>\n   <font>\n    <face>Arial</face>\n    <size>8</size>\n    <weight>normal</weight>\n   </font>\n   <hcenter/>\n   <vcenter/>\n   <string>Last Counted</string>\n  </label>\n  <label>\n   <rect>\n    <x>280</x>\n    <y>30</y>\n    <width>45</width>\n    <height>15</height>\n   </rect>\n   <font>\n    <face>Arial</face>\n    <size>8</size>\n    <weight>normal</weight>\n   </font>\n   <hcenter/>\n   <vcenter/>\n   <string>Stocked</string>\n  </label>\n  <label>\n   <rect>\n    <x>670</x>\n    <y>0</y>\n    <width>55</width>\n    <height>15</height>\n   </rect>\n   <font>\n    <face>Arial</face>\n    <size>8</size>\n    <weight>normal</weight>\n   </font>\n   <hcenter/>\n   <vcenter/>\n   <string>ABC Class</string>\n  </label>\n  <label>\n   <rect>\n    <x>580</x>\n    <y>30</y>\n    <width>80</width>\n    <height>15</height>\n   </rect>\n   <font>\n    <face>Arial</face>\n    <size>8</size>\n    <weight>normal</weight>\n   </font>\n   <hcenter/>\n   <vcenter/>\n   <string>Order Mult.</string>\n  </label>\n  <label>\n   <rect>\n    <x>345</x>\n    <y>55</y>\n    <width>80</width>\n    <height>15</height>\n   </rect>\n   <font>\n    <face>Arial</face>\n    <size>8</size>\n    <weight>normal</weight>\n   </font>\n   <hcenter/>\n   <vcenter/>\n   <string>Last Used</string>\n  </label>\n  <label>\n   <rect>\n    <x>280</x>\n    <y>0</y>\n    <width>45</width>\n    <height>15</height>\n   </rect>\n   <font>\n    <face>Arial</face>\n    <size>8</size>\n    <weight>normal</weight>\n   </font>\n   <hcenter/>\n   <vcenter/>\n   <string>Supplied</string>\n  </label>\n  <label>\n   <rect>\n    <x>580</x>\n    <y>0</y>\n    <width>80</width>\n    <height>15</height>\n   </rect>\n   <font>\n    <face>Arial</face>\n    <size>8</size>\n    <weight>normal</weight>\n   </font>\n   <hcenter/>\n   <vcenter/>\n   <string>Reorder Lvl.</string>\n  </label>\n </pghead>\n <section>\n  <name>detail</name>\n  <detail>\n   <key>\n    <query>detail</query>\n   </key>\n   <height>81</height>\n   <field>\n    <rect>\n     <x>580</x>\n     <y>15</y>\n     <width>80</width>\n     <height>15</height>\n    </rect>\n    <font>\n     <face>Arial</face>\n     <size>8</size>\n     <weight>bold</weight>\n    </font>\n    <right/>\n    <vcenter/>\n    <data>\n     <query>detail</query>\n     <column>orderupto</column>\n    </data>\n   </field>\n   <field>\n    <rect>\n     <x>490</x>\n     <y>0</y>\n     <width>85</width>\n     <height>15</height>\n    </rect>\n    <font>\n     <face>Arial</face>\n     <size>8</size>\n     <weight>bold</weight>\n    </font>\n    <hcenter/>\n    <vcenter/>\n    <data>\n     <query>detail</query>\n     <column>enforceparams</column>\n    </data>\n   </field>\n   <field>\n    <rect>\n     <x>10</x>\n     <y>0</y>\n     <width>35</width>\n     <height>15</height>\n    </rect>\n    <font>\n     <face>Arial</face>\n     <size>8</size>\n     <weight>bold</weight>\n    </font>\n    <hcenter/>\n    <vcenter/>\n    <data>\n     <query>detail</query>\n     <column>warehous_code</column>\n    </data>\n   </field>\n   <field>\n    <rect>\n     <x>260</x>\n     <y>60</y>\n     <width>80</width>\n     <height>15</height>\n    </rect>\n    <font>\n     <face>Arial</face>\n     <size>8</size>\n     <weight>bold</weight>\n    </font>\n    <right/>\n    <vcenter/>\n    <data>\n     <query>detail</query>\n     <column>qoh</column>\n    </data>\n   </field>\n   <field>\n    <rect>\n     <x>430</x>\n     <y>60</y>\n     <width>80</width>\n     <height>15</height>\n    </rect>\n    <font>\n     <face>Arial</face>\n     <size>8</size>\n     <weight>bold</weight>\n    </font>\n    <hcenter/>\n    <vcenter/>\n    <data>\n     <query>detail</query>\n     <column>lastcounted</column>\n    </data>\n   </field>\n   <field>\n    <rect>\n     <x>580</x>\n     <y>45</y>\n     <width>80</width>\n     <height>15</height>\n    </rect>\n    <font>\n     <face>Arial</face>\n     <size>8</size>\n     <weight>bold</weight>\n    </font>\n    <right/>\n    <vcenter/>\n    <data>\n     <query>detail</query>\n     <column>safetystock</column>\n    </data>\n   </field>\n   <field>\n    <rect>\n     <x>580</x>\n     <y>0</y>\n     <width>80</width>\n     <height>15</height>\n    </rect>\n    <font>\n     <face>Arial</face>\n     <size>8</size>\n     <weight>bold</weight>\n    </font>\n    <right/>\n    <vcenter/>\n    <data>\n     <query>detail</query>\n     <column>reorderlevel</column>\n    </data>\n   </field>\n   <field>\n    <rect>\n     <x>409</x>\n     <y>0</y>\n     <width>75</width>\n     <height>15</height>\n    </rect>\n    <font>\n     <face>Arial</face>\n     <size>8</size>\n     <weight>bold</weight>\n    </font>\n    <hcenter/>\n    <vcenter/>\n    <data>\n     <query>detail</query>\n     <column>controlmethod</column>\n    </data>\n   </field>\n   <field>\n    <rect>\n     <x>50</x>\n     <y>0</y>\n     <width>229</width>\n     <height>15</height>\n    </rect>\n    <font>\n     <face>Arial</face>\n     <size>8</size>\n     <weight>bold</weight>\n    </font>\n    <left/>\n    <vcenter/>\n    <data>\n     <query>detail</query>\n     <column>item_number</column>\n    </data>\n   </field>\n   <field>\n    <rect>\n     <x>280</x>\n     <y>0</y>\n     <width>45</width>\n     <height>15</height>\n    </rect>\n    <font>\n     <face>Arial</face>\n     <size>8</size>\n     <weight>bold</weight>\n    </font>\n    <hcenter/>\n    <vcenter/>\n    <data>\n     <query>detail</query>\n     <column>supplied</column>\n    </data>\n   </field>\n   <field>\n    <rect>\n     <x>330</x>\n     <y>0</y>\n     <width>75</width>\n     <height>15</height>\n    </rect>\n    <font>\n     <face>Arial</face>\n     <size>8</size>\n     <weight>bold</weight>\n    </font>\n    <hcenter/>\n    <vcenter/>\n    <data>\n     <query>detail</query>\n     <column>createpr</column>\n    </data>\n   </field>\n   <field>\n    <rect>\n     <x>280</x>\n     <y>30</y>\n     <width>45</width>\n     <height>15</height>\n    </rect>\n    <font>\n     <face>Arial</face>\n     <size>8</size>\n     <weight>bold</weight>\n    </font>\n    <hcenter/>\n    <vcenter/>\n    <data>\n     <query>detail</query>\n     <column>stocked</column>\n    </data>\n   </field>\n   <field>\n    <rect>\n     <x>330</x>\n     <y>15</y>\n     <width>75</width>\n     <height>15</height>\n    </rect>\n    <font>\n     <face>Arial</face>\n     <size>8</size>\n     <weight>bold</weight>\n    </font>\n    <hcenter/>\n    <vcenter/>\n    <data>\n     <query>detail</query>\n     <column>itemsite_soldranking</column>\n    </data>\n   </field>\n   <field>\n    <rect>\n     <x>409</x>\n     <y>30</y>\n     <width>75</width>\n     <height>15</height>\n    </rect>\n    <font>\n     <face>Arial</face>\n     <size>8</size>\n     <weight>bold</weight>\n    </font>\n    <hcenter/>\n    <vcenter/>\n    <data>\n     <query>detail</query>\n     <column>defaultlocation</column>\n    </data>\n   </field>\n   <field>\n    <rect>\n     <x>409</x>\n     <y>15</y>\n     <width>75</width>\n     <height>15</height>\n    </rect>\n    <font>\n     <face>Arial</face>\n     <size>8</size>\n     <weight>bold</weight>\n    </font>\n    <hcenter/>\n    <vcenter/>\n    <data>\n     <query>detail</query>\n     <column>locationcontrol</column>\n    </data>\n   </field>\n   <field>\n    <rect>\n     <x>10</x>\n     <y>15</y>\n     <width>35</width>\n     <height>15</height>\n    </rect>\n    <font>\n     <face>Arial</face>\n     <size>8</size>\n     <weight>bold</weight>\n    </font>\n    <hcenter/>\n    <vcenter/>\n    <data>\n     <query>detail</query>\n     <column>active</column>\n    </data>\n   </field>\n   <line>\n    <xstart>5</xstart>\n    <ystart>75</ystart>\n    <xend>745</xend>\n    <yend>75</yend>\n    <weight>0</weight>\n   </line>\n   <field>\n    <rect>\n     <x>670</x>\n     <y>15</y>\n     <width>55</width>\n     <height>15</height>\n    </rect>\n    <font>\n     <face>Arial</face>\n     <size>8</size>\n     <weight>bold</weight>\n    </font>\n    <hcenter/>\n    <vcenter/>\n    <data>\n     <query>detail</query>\n     <column>itemsite_cyclecountfreq</column>\n    </data>\n   </field>\n   <field>\n    <rect>\n     <x>280</x>\n     <y>15</y>\n     <width>45</width>\n     <height>15</height>\n    </rect>\n    <font>\n     <face>Arial</face>\n     <size>8</size>\n     <weight>bold</weight>\n    </font>\n    <hcenter/>\n    <vcenter/>\n    <data>\n     <query>detail</query>\n     <column>sold</column>\n    </data>\n   </field>\n   <field>\n    <rect>\n     <x>50</x>\n     <y>30</y>\n     <width>229</width>\n     <height>15</height>\n    </rect>\n    <font>\n     <face>Arial</face>\n     <size>8</size>\n     <weight>bold</weight>\n    </font>\n    <left/>\n    <vcenter/>\n    <data>\n     <query>detail</query>\n     <column>item_descrip2</column>\n    </data>\n   </field>\n   <field>\n    <rect>\n     <x>670</x>\n     <y>0</y>\n     <width>55</width>\n     <height>15</height>\n    </rect>\n    <font>\n     <face>Arial</face>\n     <size>8</size>\n     <weight>bold</weight>\n    </font>\n    <hcenter/>\n    <vcenter/>\n    <data>\n     <query>detail</query>\n     <column>itemsite_abcclass</column>\n    </data>\n   </field>\n   <field>\n    <rect>\n     <x>50</x>\n     <y>15</y>\n     <width>229</width>\n     <height>15</height>\n    </rect>\n    <font>\n     <face>Arial</face>\n     <size>8</size>\n     <weight>bold</weight>\n    </font>\n    <left/>\n    <vcenter/>\n    <data>\n     <query>detail</query>\n     <column>item_descrip1</column>\n    </data>\n   </field>\n   <field>\n    <rect>\n     <x>490</x>\n     <y>15</y>\n     <width>85</width>\n     <height>15</height>\n    </rect>\n    <font>\n     <face>Arial</face>\n     <size>8</size>\n     <weight>bold</weight>\n    </font>\n    <hcenter/>\n    <vcenter/>\n    <data>\n     <query>detail</query>\n     <column>onmanualorders</column>\n    </data>\n   </field>\n   <field>\n    <rect>\n     <x>50</x>\n     <y>45</y>\n     <width>150</width>\n     <height>15</height>\n    </rect>\n    <font>\n     <face>Arial</face>\n     <size>8</size>\n     <weight>bold</weight>\n    </font>\n    <left/>\n    <vcenter/>\n    <data>\n     <query>detail</query>\n     <column>plannercode</column>\n    </data>\n   </field>\n   <field>\n    <rect>\n     <x>345</x>\n     <y>60</y>\n     <width>80</width>\n     <height>15</height>\n    </rect>\n    <font>\n     <face>Arial</face>\n     <size>8</size>\n     <weight>bold</weight>\n    </font>\n    <hcenter/>\n    <vcenter/>\n    <data>\n     <query>detail</query>\n     <column>lastused</column>\n    </data>\n   </field>\n   <field>\n    <rect>\n     <x>670</x>\n     <y>45</y>\n     <width>55</width>\n     <height>15</height>\n    </rect>\n    <font>\n     <face>Arial</face>\n     <size>8</size>\n     <weight>bold</weight>\n    </font>\n    <hcenter/>\n    <vcenter/>\n    <data>\n     <query>detail</query>\n     <column>itemsite_eventfence</column>\n    </data>\n   </field>\n   <field>\n    <rect>\n     <x>580</x>\n     <y>30</y>\n     <width>80</width>\n     <height>15</height>\n    </rect>\n    <font>\n     <face>Arial</face>\n     <size>8</size>\n     <weight>bold</weight>\n    </font>\n    <right/>\n    <vcenter/>\n    <data>\n     <query>detail</query>\n     <column>ordermult</column>\n    </data>\n   </field>\n   <field>\n    <rect>\n     <x>670</x>\n     <y>30</y>\n     <width>55</width>\n     <height>15</height>\n    </rect>\n    <font>\n     <face>Arial</face>\n     <size>8</size>\n     <weight>bold</weight>\n    </font>\n    <hcenter/>\n    <vcenter/>\n    <data>\n     <query>detail</query>\n     <column>itemsite_leadtime</column>\n    </data>\n   </field>\n  </detail>\n </section>\n <pgfoot>\n  <height>16</height>\n  <field>\n   <rect>\n    <x>90</x>\n    <y>0</y>\n    <width>100</width>\n    <height>15</height>\n   </rect>\n   <font>\n    <face>Arial</face>\n    <size>8</size>\n    <weight>bold</weight>\n   </font>\n   <left/>\n   <vcenter/>\n   <data>\n    <query>Context Query</query>\n    <column>report_date</column>\n   </data>\n  </field>\n  <label>\n   <rect>\n    <x>0</x>\n    <y>0</y>\n    <width>85</width>\n    <height>15</height>\n   </rect>\n   <font>\n    <face>Arial</face>\n    <size>8</size>\n    <weight>normal</weight>\n   </font>\n   <right/>\n   <vcenter/>\n   <string>Report Date:</string>\n  </label>\n  <field>\n   <rect>\n    <x>705</x>\n    <y>0</y>\n    <width>40</width>\n    <height>15</height>\n   </rect>\n   <font>\n    <face>Arial</face>\n    <size>8</size>\n    <weight>bold</weight>\n   </font>\n   <left/>\n   <vcenter/>\n   <data>\n    <query>Context Query</query>\n    <column>page_number</column>\n   </data>\n  </field>\n  <label>\n   <rect>\n    <x>615</x>\n    <y>0</y>\n    <width>85</width>\n    <height>15</height>\n   </rect>\n   <font>\n    <face>Arial</face>\n    <size>8</size>\n    <weight>normal</weight>\n   </font>\n   <right/>\n   <vcenter/>\n   <string>Page:</string>\n  </label>\n </pgfoot>\n</report>\n		0	2015-10-01 17:14:33.361434
