-- Group: undefinedManufacturedItems
-- Name: detail
-- Notes: used by dspUndefinedManufacturedItems
-- Copyright (c) 1999-2014 by OpenMFG LLC, d/b/a xTuple.
-- See www.xtuple.com/CPAL for the full text of the software license.

SELECT item_id, 2, item_number, (item_descrip1 || ' ' || item_descrip2) AS itemdescrip,
       item_type, item_active, <? value("noBom") ?> AS exception
FROM item
WHERE ((item_type IN ('M', 'F'))
   AND (item_id NOT IN (SELECT DISTINCT bomitem_parent_item_id
                        FROM bomitem))
<? if exists("notshowInactive") ?>
   AND (item_active)
<? endif ?>
      )
ORDER BY item_number;
