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


カラム情報
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 c_bpartner_id numeric(10)  
9 c_currency_id numeric(10)  
10 amt numeric  
11 openamt numeric  
12 datedoc timestamp without time zone  
13 daysdue integer  
14 c_campaign_id numeric(10)  
15 c_project_id numeric(10)  
16 c_activity_id numeric(10)  
17 ad_orgtrx_id numeric(10)  
18 c_charge_id numeric(10)  
19 c_conversiontype_id numeric(10)  
20 c_doctype_id numeric(10)  
21 chargeamt numeric  
22 c_invoice_id numeric(10)  
23 c_order_id numeric(10)  
24 c_payment_id numeric(10)  
25 dateacct timestamp without time zone  
26 description character varying(255)  
27 docstatus character(2)  
28 documentno character varying(30)  
29 isapproved character(1)  
30 isselfservice character(1)  
31 posted character(1)  
32 processedon numeric  
33 reversal_id numeric(10)  


ソース
ソース
 SELECT i.ad_client_id,
i.ad_org_id,
i.isactive,
i.created,
i.createdby,
i.updated,
i.updatedby,
i.c_bpartner_id,
i.c_currency_id,
(i.grandtotal * i.multiplierap) AS amt,
(invoiceopen(i.c_invoice_id, i.c_invoicepayschedule_id) * i.multiplierap) AS openamt,
i.dateinvoiced AS datedoc,
COALESCE(daysbetween(getdate(), (ips.duedate)::timestamp with time zone), paymenttermduedays(i.c_paymentterm_id, (i.dateinvoiced)::timestamp with time zone, getdate())) AS daysdue,
i.c_campaign_id,
i.c_project_id,
i.c_activity_id,
i.ad_orgtrx_id,
i.c_charge_id,
i.c_conversiontype_id,
i.c_doctype_id,
i.chargeamt,
i.c_invoice_id,
i.c_order_id,
i.c_payment_id,
i.dateacct,
i.description,
i.docstatus,
i.documentno,
i.isapproved,
i.isselfservice,
i.posted,
i.processedon,
i.reversal_id
FROM (c_invoice_v i
LEFT JOIN c_invoicepayschedule ips ON ((i.c_invoicepayschedule_id = ips.c_invoicepayschedule_id)))
WHERE ((i.ispaid = 'N'::bpchar) AND (i.docstatus = ANY (ARRAY['CO'::bpchar, 'CL'::bpchar])))
UNION
SELECT p.ad_client_id,
p.ad_org_id,
p.isactive,
p.created,
p.createdby,
p.updated,
p.updatedby,
p.c_bpartner_id,
p.c_currency_id,
((p.payamt * (p.multiplierap)::numeric) * ((-1))::numeric) AS amt,
((paymentavailable(p.c_payment_id) * (p.multiplierap)::numeric) * ((-1))::numeric) AS openamt,
p.datetrx AS datedoc,
NULL::integer AS daysdue,
p.c_campaign_id,
p.c_project_id,
p.c_activity_id,
p.ad_orgtrx_id,
p.c_charge_id,
p.c_conversiontype_id,
p.c_doctype_id,
p.chargeamt,
p.c_invoice_id,
p.c_order_id,
p.c_payment_id,
p.dateacct,
p.description,
p.docstatus,
p.documentno,
p.isapproved,
p.isselfservice,
p.posted,
p.processedon,
p.reversal_id
FROM c_payment_v p
WHERE (((p.isallocated = 'N'::bpchar) AND (p.c_bpartner_id IS NOT NULL)) AND (p.docstatus = ANY (ARRAY['CO'::bpchar, 'CL'::bpchar])));


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


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


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


RDBMS固有の情報
No プロパティ名 プロパティ値
1 schemaname adempiere
2 viewname rv_bpartneropen
3 viewowner adempiere
4 definition SELECT i.ad_client_id,
i.ad_org_id,
i.isactive,
i.created,
i.createdby,
i.updated,
i.updatedby,
i.c_bpartner_id,
i.c_currency_id,
(i.grandtotal * i.multiplierap) AS amt,
(invoiceopen(i.c_invoice_id, i.c_invoicepayschedule_id) * i.multiplierap) AS openamt,
i.dateinvoiced AS datedoc,
COALESCE(daysbetween(getdate(), (ips.duedate)::timestamp with time zone), paymenttermduedays(i.c_paymentterm_id, (i.dateinvoiced)::timestamp with time zone, getdate())) AS daysdue,
i.c_campaign_id,
i.c_project_id,
i.c_activity_id,
i.ad_orgtrx_id,
i.c_charge_id,
i.c_conversiontype_id,
i.c_doctype_id,
i.chargeamt,
i.c_invoice_id,
i.c_order_id,
i.c_payment_id,
i.dateacct,
i.description,
i.docstatus,
i.documentno,
i.isapproved,
i.isselfservice,
i.posted,
i.processedon,
i.reversal_id
FROM (c_invoice_v i
LEFT JOIN c_invoicepayschedule ips ON ((i.c_invoicepayschedule_id = ips.c_invoicepayschedule_id)))
WHERE ((i.ispaid = 'N'::bpchar) AND (i.docstatus = ANY (ARRAY['CO'::bpchar, 'CL'::bpchar])))
UNION
SELECT p.ad_client_id,
p.ad_org_id,
p.isactive,
p.created,
p.createdby,
p.updated,
p.updatedby,
p.c_bpartner_id,
p.c_currency_id,
((p.payamt * (p.multiplierap)::numeric) * ((-1))::numeric) AS amt,
((paymentavailable(p.c_payment_id) * (p.multiplierap)::numeric) * ((-1))::numeric) AS openamt,
p.datetrx AS datedoc,
NULL::integer AS daysdue,
p.c_campaign_id,
p.c_project_id,
p.c_activity_id,
p.ad_orgtrx_id,
p.c_charge_id,
p.c_conversiontype_id,
p.c_doctype_id,
p.chargeamt,
p.c_invoice_id,
p.c_order_id,
p.c_payment_id,
p.dateacct,
p.description,
p.docstatus,
p.documentno,
p.isapproved,
p.isselfservice,
p.posted,
p.processedon,
p.reversal_id
FROM c_payment_v p
WHERE (((p.isallocated = 'N'::bpchar) AND (p.c_bpartner_id IS NOT NULL)) AND (p.docstatus = ANY (ARRAY['CO'::bpchar, 'CL'::bpchar])));