システム名 | 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_product_substituterelated_v | ||
備考 |
No | 論理名 | 物理名 | データ型 | Not Null | デフォルト | 備考 |
---|---|---|---|---|---|---|
1 | ad_client_id | numeric(10) | ||||
2 | ad_org_id | numeric(10) | ||||
3 | isactive | character(1) | ||||
4 | created | timestamp without time zone | ||||
5 | createdby | numeric(10) | ||||
6 | updated | timestamp without time zone | ||||
7 | updatedby | numeric(10) | ||||
8 | m_product_id | numeric(10) | ||||
9 | substitute_id | numeric(10) | ||||
10 | rowtype | text | ||||
11 | name | character varying(255) | ||||
12 | qtyavailable | numeric | ||||
13 | qtyonhand | numeric | ||||
14 | qtyreserved | numeric | ||||
15 | pricestd | numeric | ||||
16 | m_pricelist_version_id | numeric(10) | ||||
17 | m_warehouse_id | numeric(10) | ||||
18 | orgname | character varying(60) |
ソース |
---|
SELECT s.ad_client_id, |
No | インデックス名 | カラムリスト | ユニーク | 備考 |
---|
No | 外部キー名 | カラムリスト | 参照先 | 参照先カラムリスト |
---|
No | 外部キー名 | カラムリスト | 参照元 | 参照元カラムリスト |
---|
No | プロパティ名 | プロパティ値 |
---|---|---|
1 | schemaname | adempiere |
2 | viewname | m_product_substituterelated_v |
3 | viewowner | adempiere |
4 | definition | SELECT s.ad_client_id, s.ad_org_id, s.isactive, s.created, s.createdby, s.updated, s.updatedby, s.m_product_id, s.substitute_id, 'S'::text AS rowtype, mp.name, sum(( CASE WHEN (COALESCE(lt.isavailableforreservation, 'Y'::bpchar) = 'Y'::bpchar) THEN ms.qtyonhand ELSE (0)::numeric END - ms.qtyreserved)) AS qtyavailable, sum(ms.qtyonhand) AS qtyonhand, sum(ms.qtyreserved) AS qtyreserved, currencyround(max(mpr.pricestd), mpl.c_currency_id, 'N'::character varying) AS pricestd, mpr.m_pricelist_version_id, mw.m_warehouse_id, org.name AS orgname FROM (((((((((m_substitute s JOIN m_storage ms ON ((ms.m_product_id = s.substitute_id))) JOIN m_product mp ON ((ms.m_product_id = mp.m_product_id))) JOIN m_locator ml ON ((ms.m_locator_id = ml.m_locator_id))) LEFT JOIN m_locatortype lt ON ((ml.m_locatortype_id = lt.m_locatortype_id))) JOIN m_warehouse mw ON ((ml.m_warehouse_id = mw.m_warehouse_id))) JOIN m_productprice mpr ON ((ms.m_product_id = mpr.m_product_id))) JOIN m_pricelist_version mplv ON ((mplv.m_pricelist_version_id = mpr.m_pricelist_version_id))) JOIN m_pricelist mpl ON ((mplv.m_pricelist_id = mpl.m_pricelist_id))) JOIN ad_org org ON ((org.ad_org_id = mw.ad_org_id))) GROUP BY s.ad_client_id, s.ad_org_id, s.isactive, s.created, s.createdby, s.updated, s.updatedby, s.m_product_id, s.substitute_id, mw.m_warehouse_id, mpr.m_pricelist_version_id, org.name, mp.name, mpl.c_currency_id UNION SELECT r.ad_client_id, r.ad_org_id, r.isactive, r.created, r.createdby, r.updated, r.updatedby, r.m_product_id, r.relatedproduct_id AS substitute_id, 'R'::text AS rowtype, mp.name, sum(( CASE WHEN (COALESCE(lt.isavailableforreservation, 'Y'::bpchar) = 'Y'::bpchar) THEN ms.qtyonhand ELSE (0)::numeric END - ms.qtyreserved)) AS qtyavailable, sum(ms.qtyonhand) AS qtyonhand, sum(ms.qtyreserved) AS qtyreserved, currencyround(max(mpr.pricestd), mpl.c_currency_id, 'N'::character varying) AS pricestd, mpr.m_pricelist_version_id, mw.m_warehouse_id, org.name AS orgname FROM (((((((((m_relatedproduct r JOIN m_storage ms ON ((ms.m_product_id = r.relatedproduct_id))) JOIN m_product mp ON ((ms.m_product_id = mp.m_product_id))) JOIN m_locator ml ON ((ms.m_locator_id = ml.m_locator_id))) LEFT JOIN m_locatortype lt ON ((ml.m_locatortype_id = lt.m_locatortype_id))) JOIN m_warehouse mw ON ((ml.m_warehouse_id = mw.m_warehouse_id))) JOIN m_productprice mpr ON ((ms.m_product_id = mpr.m_product_id))) JOIN m_pricelist_version mplv ON ((mplv.m_pricelist_version_id = mpr.m_pricelist_version_id))) JOIN m_pricelist mpl ON ((mplv.m_pricelist_id = mpl.m_pricelist_id))) JOIN ad_org org ON ((org.ad_org_id = mw.ad_org_id))) GROUP BY r.ad_client_id, r.ad_org_id, r.isactive, r.created, r.createdby, r.updated, r.updatedby, r.m_product_id, r.relatedproduct_id, mw.m_warehouse_id, mpr.m_pricelist_version_id, org.name, mp.name, mpl.c_currency_id; |