テーブル情報
システム名 http://www.as-link.com/  作成者 秦 松甫 
サブシステム名 ERPlus@iDempiere3.1_daily  作成日 2016/3/7 
スキーマ名 adempiere  更新日  
論理テーブル名   RDBMS  PostgreSQL 9.4.5 on x86_64-unknown-linux-gnu, compiled by gcc (GCC) 4.8.3 20140911 (Red Hat 4.8.3-9), 64-bit 9.4.5 
物理テーブル名 m_packagelines_avail_v     
備考


カラム情報
No 論理名 物理名 データ型 Not Null デフォルト 備考
1 ad_client_id numeric(10)  
2 ad_org_id numeric(10)  
3 m_inout_id numeric(10)  
4 m_inoutline_id numeric(10)  
5 line numeric  
6 qty numeric  
7 m_product_id numeric(10)  
8 productname character varying(255)  
9 uom character varying(60)  


ソース
ソース
 SELECT DISTINCT iol.ad_client_id,
iol.ad_org_id,
iol.m_inout_id,
iol.m_inoutline_id,
iol.line,
(iol.qtyentered - COALESCE(( SELECT sum(m_packageline.qty) AS sum
FROM m_packageline
WHERE (m_packageline.m_inoutline_id = iol.m_inoutline_id)), (0)::numeric)) AS qty,
iol.m_product_id,
p.name AS productname,
uom.name AS uom
FROM ((((m_inoutline iol
LEFT JOIN m_packageline mpl ON ((iol.m_inoutline_id = mpl.m_inoutline_id)))
JOIN m_product p ON ((iol.m_product_id = p.m_product_id)))
JOIN c_uom uom ON ((iol.c_uom_id = uom.c_uom_id)))
JOIN ad_clientinfo ci ON ((ci.ad_client_id = iol.ad_client_id)))
WHERE (((p.ispicklistprintdetails = 'N'::bpchar) AND (iol.m_product_id <> COALESCE(ci.m_productfreight_id, (0)::numeric))) AND ((iol.qtyentered - COALESCE(( SELECT sum(m_packageline.qty) AS sum
FROM m_packageline
WHERE (m_packageline.m_inoutline_id = iol.m_inoutline_id)), (0)::numeric)) <> (0)::numeric))
UNION
SELECT DISTINCT iol.ad_client_id,
iol.ad_org_id,
iol.m_inout_id,
iol.m_inoutline_id,
(iol.line + (pbom.line / (100)::numeric)) AS line,
((iol.qtyentered * pbom.bomqty) - COALESCE(( SELECT sum(m_packageline.qty) AS sum
FROM m_packageline
WHERE ((m_packageline.m_product_id = p2.m_product_id) AND (m_packageline.m_package_id IN ( SELECT m_package.m_package_id
FROM m_package
WHERE (m_package.m_inout_id = iol.m_inout_id))))), (0)::numeric)) AS qty,
pbom.m_productbom_id AS m_product_id,
p2.name AS productname,
uom.name AS uom
FROM (((((m_inoutline iol
LEFT JOIN m_packageline mpl ON ((iol.m_inoutline_id = mpl.m_inoutline_id)))
JOIN m_product p ON ((iol.m_product_id = p.m_product_id)))
JOIN m_product_bom pbom ON ((p.m_product_id = pbom.m_product_id)))
JOIN m_product p2 ON ((pbom.m_productbom_id = p2.m_product_id)))
JOIN c_uom uom ON ((iol.c_uom_id = uom.c_uom_id)))
WHERE ((((p.isbom = 'Y'::bpchar) AND (p.isverified = 'Y'::bpchar)) AND (p.ispicklistprintdetails = 'Y'::bpchar)) AND (((iol.qtyentered * pbom.bomqty) - COALESCE(( SELECT sum(m_packageline.qty) AS sum
FROM m_packageline
WHERE ((m_packageline.m_product_id = p2.m_product_id) AND (m_packageline.m_package_id IN ( SELECT m_package.m_package_id
FROM m_package
WHERE (m_package.m_inout_id = iol.m_inout_id))))), (0)::numeric)) <> (0)::numeric))
ORDER BY 1, 2, 3, 5;


インデックス情報
No インデックス名 カラムリスト ユニーク 備考


外部キー情報
No 外部キー名 カラムリスト 参照先 参照先カラムリスト


外部キー情報(PK側)
No 外部キー名 カラムリスト 参照元 参照元カラムリスト


RDBMS固有の情報
No プロパティ名 プロパティ値
1 schemaname adempiere
2 viewname m_packagelines_avail_v
3 viewowner adempiere
4 definition SELECT DISTINCT iol.ad_client_id,
iol.ad_org_id,
iol.m_inout_id,
iol.m_inoutline_id,
iol.line,
(iol.qtyentered - COALESCE(( SELECT sum(m_packageline.qty) AS sum
FROM m_packageline
WHERE (m_packageline.m_inoutline_id = iol.m_inoutline_id)), (0)::numeric)) AS qty,
iol.m_product_id,
p.name AS productname,
uom.name AS uom
FROM ((((m_inoutline iol
LEFT JOIN m_packageline mpl ON ((iol.m_inoutline_id = mpl.m_inoutline_id)))
JOIN m_product p ON ((iol.m_product_id = p.m_product_id)))
JOIN c_uom uom ON ((iol.c_uom_id = uom.c_uom_id)))
JOIN ad_clientinfo ci ON ((ci.ad_client_id = iol.ad_client_id)))
WHERE (((p.ispicklistprintdetails = 'N'::bpchar) AND (iol.m_product_id <> COALESCE(ci.m_productfreight_id, (0)::numeric))) AND ((iol.qtyentered - COALESCE(( SELECT sum(m_packageline.qty) AS sum
FROM m_packageline
WHERE (m_packageline.m_inoutline_id = iol.m_inoutline_id)), (0)::numeric)) <> (0)::numeric))
UNION
SELECT DISTINCT iol.ad_client_id,
iol.ad_org_id,
iol.m_inout_id,
iol.m_inoutline_id,
(iol.line + (pbom.line / (100)::numeric)) AS line,
((iol.qtyentered * pbom.bomqty) - COALESCE(( SELECT sum(m_packageline.qty) AS sum
FROM m_packageline
WHERE ((m_packageline.m_product_id = p2.m_product_id) AND (m_packageline.m_package_id IN ( SELECT m_package.m_package_id
FROM m_package
WHERE (m_package.m_inout_id = iol.m_inout_id))))), (0)::numeric)) AS qty,
pbom.m_productbom_id AS m_product_id,
p2.name AS productname,
uom.name AS uom
FROM (((((m_inoutline iol
LEFT JOIN m_packageline mpl ON ((iol.m_inoutline_id = mpl.m_inoutline_id)))
JOIN m_product p ON ((iol.m_product_id = p.m_product_id)))
JOIN m_product_bom pbom ON ((p.m_product_id = pbom.m_product_id)))
JOIN m_product p2 ON ((pbom.m_productbom_id = p2.m_product_id)))
JOIN c_uom uom ON ((iol.c_uom_id = uom.c_uom_id)))
WHERE ((((p.isbom = 'Y'::bpchar) AND (p.isverified = 'Y'::bpchar)) AND (p.ispicklistprintdetails = 'Y'::bpchar)) AND (((iol.qtyentered * pbom.bomqty) - COALESCE(( SELECT sum(m_packageline.qty) AS sum
FROM m_packageline
WHERE ((m_packageline.m_product_id = p2.m_product_id) AND (m_packageline.m_package_id IN ( SELECT m_package.m_package_id
FROM m_package
WHERE (m_package.m_inout_id = iol.m_inout_id))))), (0)::numeric)) <> (0)::numeric))
ORDER BY 1, 2, 3, 5;