テーブル情報
システム名 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 
物理テーブル名 rv_storage     
備考


カラム情報
No 論理名 物理名 データ型 Not Null デフォルト 備考
1 ad_client_id numeric(10)  
2 ad_org_id numeric(10)  
3 m_product_id numeric(10)  
4 value character varying(40)  
5 name character varying(255)  
6 description character varying(255)  
7 upc character varying(30)  
8 sku character varying(30)  
9 c_uom_id numeric(10)  
10 m_product_category_id numeric(10)  
11 classification character varying(12)  
12 weight numeric  
13 volume numeric  
14 versionno character varying(20)  
15 guaranteedays numeric(10)  
16 guaranteedaysmin numeric(10)  
17 m_locator_id numeric(10)  
18 m_warehouse_id numeric(10)  
19 x character varying(60)  
20 y character varying(60)  
21 z character varying(60)  
22 qtyonhand numeric  
23 qtyreserved numeric  
24 qtyavailable numeric  
25 qtyordered numeric  
26 datelastinventory timestamp without time zone  
27 m_attributesetinstance_id numeric(10)  
28 m_attributeset_id numeric(10)  
29 serno character varying(40)  
30 lot character varying(40)  
31 m_lot_id numeric(10)  
32 guaranteedate timestamp without time zone  
33 shelflifedays integer  
34 goodfordays numeric  
35 shelfliferemainingpct numeric  
36 m_storage_isactive character(1)  
37 m_storage_updated timestamp without time zone  
38 m_storage_updatedby numeric(10)  
39 m_locator_ad_org_id numeric(10)  
40 m_locator_isactive character(1)  
41 isdefault character(1)  
42 priorityno numeric(10)  
43 m_locator_value character varying(40)  
44 m_product_ad_org_id numeric(10)  
45 m_product_copyfrom character(1)  
46 m_product_created timestamp without time zone  
47 m_product_createdby numeric(10)  
48 c_revenuerecognition_id numeric(10)  
49 c_subscriptiontype_id numeric(10)  
50 c_taxcategory_id numeric(10)  
51 descriptionurl character varying(120)  
52 m_product_discontinued character(1)  
53 m_product_discontinuedat timestamp without time zone  
54 documentnote character varying(2000)  
55 group1 character varying(255)  
56 group2 character varying(255)  
57 help character varying(2000)  
58 imageurl character varying(120)  
59 m_product_isactive character(1)  
60 isbom character(1)  
61 isdropship character(1)  
62 isexcludeautodelivery character(1)  
63 isinvoiceprintdetails character(1)  
64 ispicklistprintdetails character(1)  
65 ispurchased character(1)  
66 isselfservice character(1)  
67 issold character(1)  
68 isstocked character(1)  
69 m_product_issummary character(1)  
70 isverified character(1)  
71 iswebstorefeatured character(1)  
72 lowlevel numeric(10)  
73 m_product_m_attributeset_id numeric(10)  
74 m_product_m_asi_id numeric(10)  
75 m_freightcategory_id numeric(10)  
76 m_product_m_locator_id numeric(10)  
77 m_product_processing character(1)  
78 producttype character(1)  
79 r_mailtext_id numeric(10)  
80 m_product_salesrep_id numeric(10)  
81 s_expensetype_id numeric(10)  
82 shelfdepth numeric(10)  
83 shelfheight numeric  
84 shelfwidth numeric(10)  
85 s_resource_id numeric(10)  
86 unitsperpack numeric(10)  
87 unitsperpallet numeric  
88 m_product_updated timestamp without time zone  
89 m_product_updatedby numeric(10)  
90 m_asi_ad_org_id numeric(10)  
91 m_asi_created timestamp without time zone  
92 m_asi_createdby numeric(10)  
93 m_asi_description character varying(255)  
94 m_asi_isactive character(1)  
95 m_asi_updated timestamp without time zone  
96 m_asi_updatedby numeric(10)  


ソース
ソース
 SELECT s.ad_client_id,
s.ad_org_id,
s.m_product_id,
p.value,
p.name,
p.description,
p.upc,
p.sku,
p.c_uom_id,
p.m_product_category_id,
p.classification,
p.weight,
p.volume,
p.versionno,
p.guaranteedays,
p.guaranteedaysmin,
s.m_locator_id,
l.m_warehouse_id,
l.x,
l.y,
l.z,
s.qtyonhand,
s.qtyreserved,
(
CASE
WHEN (COALESCE(lt.isavailableforreservation, 'Y'::bpchar) = 'Y'::bpchar) THEN s.qtyonhand
ELSE (0)::numeric
END - s.qtyreserved) AS qtyavailable,
s.qtyordered,
s.datelastinventory,
s.m_attributesetinstance_id,
asi.m_attributeset_id,
asi.serno,
asi.lot,
asi.m_lot_id,
asi.guaranteedate,
daysbetween((asi.guaranteedate)::timestamp with time zone, getdate()) AS shelflifedays,
((daysbetween((asi.guaranteedate)::timestamp with time zone, getdate()))::numeric - p.guaranteedaysmin) AS goodfordays,
CASE
WHEN (COALESCE(p.guaranteedays, (0)::numeric) > (0)::numeric) THEN round((((daysbetween((asi.guaranteedate)::timestamp with time zone, getdate()))::numeric / p.guaranteedays) * (100)::numeric), 0)
ELSE NULL::numeric
END AS shelfliferemainingpct,
s.isactive AS m_storage_isactive,
s.updated AS m_storage_updated,
s.updatedby AS m_storage_updatedby,
l.ad_org_id AS m_locator_ad_org_id,
l.isactive AS m_locator_isactive,
l.isdefault,
l.priorityno,
l.value AS m_locator_value,
p.ad_org_id AS m_product_ad_org_id,
p.copyfrom AS m_product_copyfrom,
p.created AS m_product_created,
p.createdby AS m_product_createdby,
p.c_revenuerecognition_id,
p.c_subscriptiontype_id,
p.c_taxcategory_id,
p.descriptionurl,
p.discontinued AS m_product_discontinued,
p.discontinuedat AS m_product_discontinuedat,
p.documentnote,
p.group1,
p.group2,
p.help,
p.imageurl,
p.isactive AS m_product_isactive,
p.isbom,
p.isdropship,
p.isexcludeautodelivery,
p.isinvoiceprintdetails,
p.ispicklistprintdetails,
p.ispurchased,
p.isselfservice,
p.issold,
p.isstocked,
p.issummary AS m_product_issummary,
p.isverified,
p.iswebstorefeatured,
p.lowlevel,
p.m_attributeset_id AS m_product_m_attributeset_id,
p.m_attributesetinstance_id AS m_product_m_asi_id,
p.m_freightcategory_id,
p.m_locator_id AS m_product_m_locator_id,
p.processing AS m_product_processing,
p.producttype,
p.r_mailtext_id,
p.salesrep_id AS m_product_salesrep_id,
p.s_expensetype_id,
p.shelfdepth,
p.shelfheight,
p.shelfwidth,
p.s_resource_id,
p.unitsperpack,
p.unitsperpallet,
p.updated AS m_product_updated,
p.updatedby AS m_product_updatedby,
asi.ad_org_id AS m_asi_ad_org_id,
asi.created AS m_asi_created,
asi.createdby AS m_asi_createdby,
asi.description AS m_asi_description,
asi.isactive AS m_asi_isactive,
asi.updated AS m_asi_updated,
asi.updatedby AS m_asi_updatedby
FROM ((((m_storage s
JOIN m_locator l ON ((s.m_locator_id = l.m_locator_id)))
LEFT JOIN m_locatortype lt ON ((l.m_locatortype_id = lt.m_locatortype_id)))
JOIN m_product p ON ((s.m_product_id = p.m_product_id)))
LEFT JOIN m_attributesetinstance asi ON ((s.m_attributesetinstance_id = asi.m_attributesetinstance_id)));


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


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


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


RDBMS固有の情報
No プロパティ名 プロパティ値
1 schemaname adempiere
2 viewname rv_storage
3 viewowner adempiere
4 definition SELECT s.ad_client_id,
s.ad_org_id,
s.m_product_id,
p.value,
p.name,
p.description,
p.upc,
p.sku,
p.c_uom_id,
p.m_product_category_id,
p.classification,
p.weight,
p.volume,
p.versionno,
p.guaranteedays,
p.guaranteedaysmin,
s.m_locator_id,
l.m_warehouse_id,
l.x,
l.y,
l.z,
s.qtyonhand,
s.qtyreserved,
(
CASE
WHEN (COALESCE(lt.isavailableforreservation, 'Y'::bpchar) = 'Y'::bpchar) THEN s.qtyonhand
ELSE (0)::numeric
END - s.qtyreserved) AS qtyavailable,
s.qtyordered,
s.datelastinventory,
s.m_attributesetinstance_id,
asi.m_attributeset_id,
asi.serno,
asi.lot,
asi.m_lot_id,
asi.guaranteedate,
daysbetween((asi.guaranteedate)::timestamp with time zone, getdate()) AS shelflifedays,
((daysbetween((asi.guaranteedate)::timestamp with time zone, getdate()))::numeric - p.guaranteedaysmin) AS goodfordays,
CASE
WHEN (COALESCE(p.guaranteedays, (0)::numeric) > (0)::numeric) THEN round((((daysbetween((asi.guaranteedate)::timestamp with time zone, getdate()))::numeric / p.guaranteedays) * (100)::numeric), 0)
ELSE NULL::numeric
END AS shelfliferemainingpct,
s.isactive AS m_storage_isactive,
s.updated AS m_storage_updated,
s.updatedby AS m_storage_updatedby,
l.ad_org_id AS m_locator_ad_org_id,
l.isactive AS m_locator_isactive,
l.isdefault,
l.priorityno,
l.value AS m_locator_value,
p.ad_org_id AS m_product_ad_org_id,
p.copyfrom AS m_product_copyfrom,
p.created AS m_product_created,
p.createdby AS m_product_createdby,
p.c_revenuerecognition_id,
p.c_subscriptiontype_id,
p.c_taxcategory_id,
p.descriptionurl,
p.discontinued AS m_product_discontinued,
p.discontinuedat AS m_product_discontinuedat,
p.documentnote,
p.group1,
p.group2,
p.help,
p.imageurl,
p.isactive AS m_product_isactive,
p.isbom,
p.isdropship,
p.isexcludeautodelivery,
p.isinvoiceprintdetails,
p.ispicklistprintdetails,
p.ispurchased,
p.isselfservice,
p.issold,
p.isstocked,
p.issummary AS m_product_issummary,
p.isverified,
p.iswebstorefeatured,
p.lowlevel,
p.m_attributeset_id AS m_product_m_attributeset_id,
p.m_attributesetinstance_id AS m_product_m_asi_id,
p.m_freightcategory_id,
p.m_locator_id AS m_product_m_locator_id,
p.processing AS m_product_processing,
p.producttype,
p.r_mailtext_id,
p.salesrep_id AS m_product_salesrep_id,
p.s_expensetype_id,
p.shelfdepth,
p.shelfheight,
p.shelfwidth,
p.s_resource_id,
p.unitsperpack,
p.unitsperpallet,
p.updated AS m_product_updated,
p.updatedby AS m_product_updatedby,
asi.ad_org_id AS m_asi_ad_org_id,
asi.created AS m_asi_created,
asi.createdby AS m_asi_createdby,
asi.description AS m_asi_description,
asi.isactive AS m_asi_isactive,
asi.updated AS m_asi_updated,
asi.updatedby AS m_asi_updatedby
FROM ((((m_storage s
JOIN m_locator l ON ((s.m_locator_id = l.m_locator_id)))
LEFT JOIN m_locatortype lt ON ((l.m_locatortype_id = lt.m_locatortype_id)))
JOIN m_product p ON ((s.m_product_id = p.m_product_id)))
LEFT JOIN m_attributesetinstance asi ON ((s.m_attributesetinstance_id = asi.m_attributesetinstance_id)));