システム名 | 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 | |
物理テーブル名 | c_invoice_candidate_v | ||
備考 |
No | 論理名 | 物理名 | データ型 | Not Null | デフォルト | 備考 |
---|---|---|---|---|---|---|
1 | ad_client_id | numeric(10) | ||||
2 | ad_org_id | numeric(10) | ||||
3 | c_bpartner_id | numeric(10) | ||||
4 | c_order_id | numeric(10) | ||||
5 | documentno | character varying(30) | ||||
6 | dateordered | timestamp without time zone | ||||
7 | c_doctype_id | numeric(10) | ||||
8 | totallines | numeric |
ソース |
---|
SELECT o.ad_client_id, |
No | インデックス名 | カラムリスト | ユニーク | 備考 |
---|
No | 外部キー名 | カラムリスト | 参照先 | 参照先カラムリスト |
---|
No | 外部キー名 | カラムリスト | 参照元 | 参照元カラムリスト |
---|
No | プロパティ名 | プロパティ値 |
---|---|---|
1 | schemaname | adempiere |
2 | viewname | c_invoice_candidate_v |
3 | viewowner | adempiere |
4 | definition | SELECT o.ad_client_id, o.ad_org_id, o.c_bpartner_id, o.c_order_id, o.documentno, o.dateordered, o.c_doctype_id, sum(((l.qtyordered - l.qtyinvoiced) * l.priceactual)) AS totallines FROM (((c_order o JOIN c_orderline l ON ((o.c_order_id = l.c_order_id))) JOIN c_bpartner bp ON ((o.c_bpartner_id = bp.c_bpartner_id))) LEFT JOIN c_invoiceschedule si ON ((bp.c_invoiceschedule_id = si.c_invoiceschedule_id))) WHERE ((((o.docstatus = ANY (ARRAY['CO'::bpchar, 'CL'::bpchar, 'IP'::bpchar])) AND (o.c_doctype_id IN ( SELECT c_doctype.c_doctype_id FROM c_doctype WHERE ((c_doctype.docbasetype = 'SOO'::bpchar) AND (c_doctype.docsubtypeso <> ALL (ARRAY['ON'::bpchar, 'OB'::bpchar, 'WR'::bpchar])))))) AND (l.qtyordered <> l.qtyinvoiced)) AND (((((o.invoicerule = 'I'::bpchar) OR ((o.invoicerule = 'O'::bpchar) AND (NOT (EXISTS ( SELECT 1 FROM c_orderline zz1 WHERE ((zz1.c_order_id = o.c_order_id) AND (zz1.qtyordered <> zz1.qtydelivered))))))) OR ((o.invoicerule = 'D'::bpchar) AND (l.qtyinvoiced <> l.qtydelivered))) OR ((o.invoicerule = 'S'::bpchar) AND (bp.c_invoiceschedule_id IS NULL))) OR (((o.invoicerule = 'S'::bpchar) AND (bp.c_invoiceschedule_id IS NOT NULL)) AND (((((si.invoicefrequency IS NULL) OR (si.invoicefrequency = 'D'::bpchar)) OR (si.invoicefrequency = 'W'::bpchar)) OR ((si.invoicefrequency = 'T'::bpchar) AND (((trunc((o.dateordered)::timestamp with time zone) <= (((firstof(getdate(), 'MM'::character varying))::timestamp with time zone + si.invoicedaycutoff) - 1)) AND (trunc(getdate()) >= (((firstof((o.dateordered)::timestamp with time zone, 'MM'::character varying))::timestamp with time zone + si.invoiceday) - 1))) OR ((trunc((o.dateordered)::timestamp with time zone) <= (((firstof(getdate(), 'MM'::character varying))::timestamp with time zone + si.invoicedaycutoff) + 14)) AND (trunc(getdate()) >= (((firstof((o.dateordered)::timestamp with time zone, 'MM'::character varying))::timestamp with time zone + si.invoiceday) + 14)))))) OR (((si.invoicefrequency = 'M'::bpchar) AND (trunc((o.dateordered)::timestamp with time zone) <= (((firstof(getdate(), 'MM'::character varying))::timestamp with time zone + si.invoicedaycutoff) - 1))) AND (trunc(getdate()) >= (((firstof((o.dateordered)::timestamp with time zone, 'MM'::character varying))::timestamp with time zone + si.invoiceday) - 1))))))) GROUP BY o.ad_client_id, o.ad_org_id, o.c_bpartner_id, o.c_order_id, o.documentno, o.dateordered, o.c_doctype_id; |