テーブル情報
システム名 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_header_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 ad_language character varying  
9 c_invoice_id numeric(10)  
10 issotrx character(1)  
11 documentno character varying(30)  
12 docstatus character(2)  
13 c_doctype_id numeric(10)  
14 c_bpartner_id numeric(10)  
15 bpvalue character varying(40)  
16 bptaxid character varying(20)  
17 naics character(6)  
18 duns character(11)  
19 org_location_id numeric(10)  
20 taxid character varying(20)  
21 documenttype character varying(60)  
22 documenttypenote character varying(2000)  
23 c_order_id numeric(10)  
24 salesrep_id numeric(10)  
25 salesrep_name character varying  
26 dateinvoiced timestamp without time zone  
27 bpgreeting character varying(60)  
28 name character varying(120)  
29 name2 character varying(60)  
30 bpcontactgreeting character varying(60)  
31 title character varying(40)  
32 phone character varying(40)  
33 contactname text  
34 c_location_id numeric(10)  
35 referenceno character varying(40)  
36 postal text  
37 description character varying(255)  
38 poreference character varying(20)  
39 dateordered timestamp without time zone  
40 c_currency_id numeric(10)  
41 paymentterm character varying(60)  
42 paymenttermnote character varying(2000)  
43 c_charge_id numeric(10)  
44 chargeamt numeric  
45 totallines numeric  
46 grandtotal numeric  
47 amtinwords numeric  
48 m_pricelist_id numeric(10)  
49 istaxincluded character(1)  
50 c_campaign_id numeric(10)  
51 c_project_id numeric(10)  
52 c_activity_id numeric(10)  
53 ispaid character(1)  
54 logo_id numeric(10)  
55 c_invoice_ad_orgtrx_id numeric(10)  
56 ad_user_id numeric(10)  
57 c_bpartner_location_id numeric(10)  
58 c_conversiontype_id numeric(10)  
59 c_doctypetarget_id numeric(10)  
60 c_dunninglevel_id numeric(10)  
61 c_payment_id numeric(10)  
62 dateacct timestamp without time zone  
63 dateprinted timestamp without time zone  
64 docaction character(2)  
65 dunninggrace date  
66 generateto character(1)  
67 invoicecollectiontype character(1)  
68 isapproved character(1)  
69 isdiscountprinted character(1)  
70 isindispute character(1)  
71 ispayschedulevalid character(1)  
72 isprinted character(1)  
73 c_invoice_isselfservice character(1)  
74 istransferred character(1)  
75 m_rma_id numeric(10)  
76 paymentrule character(1)  
77 posted character(1)  
78 processedon numeric  
79 processing character(1)  
80 ref_invoice_id numeric(10)  
81 reversal_id numeric(10)  
82 sendemail character(1)  
83 user1_id numeric(10)  
84 user2_id numeric(10)  
85 c_paymentterm_ad_org_id numeric(10)  
86 afterdelivery character(1)  
87 c_paymentterm_id numeric(10)  
88 c_paymentterm_description character varying(255)  
89 discount numeric  
90 discount2 numeric  
91 discountdays numeric(10)  
92 discountdays2 numeric(10)  
93 fixmonthcutoff numeric(10)  
94 fixmonthday numeric(10)  
95 fixmonthoffset numeric(10)  
96 gracedays numeric(10)  
97 c_paymentterm_isactive character(1)  
98 isdefault character(1)  
99 isduefixed character(1)  
100 isnextbusinessday character(1)  
101 isvalid character(1)  
102 netday character(1)  
103 netdays numeric(10)  
104 paymenttermusage character(1)  
105 c_paymentterm_value character varying(40)  
106 bp_acqusitioncost numeric  
107 bp_actuallifetimevalue numeric  
108 bp_ad_language character varying(6)  
109 bp_ad_orgbp_id numeric(10)  
110 bp_ad_org_id numeric(10)  
111 bp_bpartner_parent_id numeric(10)  
112 bp_c_bp_group_id numeric(10)  
113 bp_c_dunning_id numeric(10)  
114 bp_c_greeting_id numeric(10)  
115 bp_c_invoiceschedule_id numeric(10)  
116 bp_c_paymentterm_id numeric(10)  
117 bp_created timestamp without time zone  
118 bp_createdby numeric(10)  
119 bp_c_taxgroup_id numeric(10)  
120 bp_deliveryrule character(1)  
121 bp_deliveryviarule character(1)  
122 bp_description character varying(255)  
123 bp_dunninggrace date  
124 bp_firstsale timestamp without time zone  
125 bp_flatdiscount numeric  
126 bp_freightcostrule character(1)  
127 bp_invoicerule character(1)  
128 bp_isactive character(1)  
129 bp_iscustomer character(1)  
130 bp_isdiscountprinted character(1)  
131 bp_isemployee character(1)  
132 bp_ismanufacturer character(1)  
133 bp_isonetime character(1)  
134 bp_ispotaxexempt character(1)  
135 bp_isprospect character(1)  
136 bp_issalesrep character(1)  
137 bp_issummary character(1)  
138 bp_istaxexempt character(1)  
139 bp_isvendor character(1)  
140 bp_logo_id numeric(10)  
141 bp_m_discountschema_id numeric(10)  
142 bp_m_pricelist_id numeric(10)  
143 bp_naics character(6)  
144 bp_numberemployees numeric(10)  
145 bp_paymentrule character(1)  
146 bp_paymentrulepo character(1)  
147 bp_po_discountschema_id numeric(10)  
148 bp_po_paymentterm_id numeric(10)  
149 bp_po_pricelist_id numeric(10)  
150 bp_poreference character varying(20)  
151 bp_potentiallifetimevalue numeric  
152 bp_rating character(1)  
153 bp_salesrep_id numeric(10)  
154 bp_salesvolume numeric(10)  
155 bp_sendemail character(1)  
156 bp_shareofcustomer numeric(10)  
157 bp_shelflifeminpct numeric(10)  
158 bp_so_creditlimit numeric  
159 bp_socreditstatus character(1)  
160 bp_so_creditused numeric  
161 bp_so_description character varying(255)  
162 bp_totalopenbalance numeric  
163 bp_updated timestamp without time zone  
164 bp_updatedby numeric(10)  
165 bp_url character varying(120)  
166 c_greeting_isactive character(1)  
167 isfirstnameonly character(1)  
168 c_greeting_name character varying(60)  
169 bp_location_ad_org_id numeric(10)  
170 bp_location_c_bpartner_id numeric(10)  
171 bp_location_created timestamp without time zone  
172 bp_location_createdby numeric(10)  
173 c_salesregion_id numeric(10)  
174 bp_location_fax character varying(40)  
175 bp_location_isactive character(1)  
176 isbillto character(1)  
177 isdn character varying(40)  
178 ispayfrom character(1)  
179 isremitto character(1)  
180 isshipto character(1)  
181 bp_location_name character varying(60)  
182 bp_location_phone character varying(40)  
183 bp_location_phone2 character varying(40)  
184 bp_location_updated timestamp without time zone  
185 bp_location_updatedby numeric(10)  
186 address1 character varying(60)  
187 address2 character varying(60)  
188 address3 character varying(60)  
189 address4 character varying(60)  
190 c_location_ad_org_id numeric(10)  
191 c_city_id numeric(10)  
192 c_country_id numeric(10)  
193 city character varying(60)  
194 c_location_created timestamp without time zone  
195 c_location_createdby numeric(10)  
196 c_region_id numeric(10)  
197 c_location_isactive character(1)  
198 regionname character varying(40)  
199 c_location_updated timestamp without time zone  
200 c_location_updatedby numeric(10)  
201 ad_user_ad_org_id numeric(10)  
202 ad_user_ad_ad_orgtrx_id numeric(10)  
203 ad_user_ad_birthday timestamp without time zone  
204 ad_user_c_bpartner_id numeric(10)  
205 ad_user_c_bpartner_location_id numeric(10)  
206 ad_user_c_greeting_id numeric(10)  
207 ad_user_comments character varying(2000)  
208 ad_user_created timestamp without time zone  
209 ad_user_createdby numeric(10)  
210 ad_user_description character varying(255)  
211 ad_user_email character varying(60)  
212 ad_user_fax character varying(40)  
213 ad_user_isactive character(1)  
214 ad_user_lastcontact timestamp without time zone  
215 ad_user_lastresult character varying(255)  
216 ad_user_phone2 character varying(40)  
217 ad_user_supervisor_id numeric(10)  
218 ad_user_updated timestamp without time zone  
219 ad_user_updatedby numeric(10)  
220 ad_user_value character varying(40)  
221 user_greeting_isactive character(1)  
222 user_greeting_isfirstnameonly character(1)  
223 user_greeting_name character varying(60)  
224 ad_orginfo_ad_org_id numeric(10)  
225 ad_orgtype_id numeric(10)  
226 c_calendar_id numeric(10)  
227 ad_orginfo_created timestamp without time zone  
228 ad_orginfo_createdby numeric(10)  
229 dropship_warehouse_id numeric(10)  
230 ad_orginfo_duns character(11)  
231 ad_orginfo_email character varying(60)  
232 ad_orginfo_fax character varying(40)  
233 ad_orginfo_isactive character(1)  
234 m_warehouse_id numeric(10)  
235 parent_org_id numeric(10)  
236 ad_orginfo_phone character varying(40)  
237 ad_orginfo_phone2 character varying(40)  
238 receiptfootermsg character varying(1023)  
239 supervisor_id numeric(10)  
240 ad_orginfo_updated timestamp without time zone  
241 ad_orginfo_updatedby numeric(10)  
242 salesrep_ad_org_id numeric(10)  
243 salesrep_ad_ad_orgtrx_id numeric(10)  
244 salesrep_ad_birthday timestamp without time zone  
245 salesrep_c_bpartner_id numeric(10)  
246 salesrep_c_bp_location_id numeric(10)  
247 salesrep_c_greeting_id numeric(10)  
248 salesrep_comments character varying(2000)  
249 salesrep_created timestamp without time zone  
250 salesrep_createdby numeric(10)  
251 salesrep_description character varying(255)  
252 salesrep_email character varying(60)  
253 salesrep_fax character varying(40)  
254 salesrep_isactive character(1)  
255 salesrep_lastcontact timestamp without time zone  
256 salesrep_lastresult character varying(255)  
257 salesrep_phone character varying(40)  
258 salesrep_phone2 character varying(40)  
259 salesrep_supervisor_id numeric(10)  
260 salesrep_title character varying(40)  
261 salesrep_updated timestamp without time zone  
262 salesrep_updatedby numeric(10)  
263 salesrep_value character varying(40)  
264 bpartner_acqusitioncost numeric  
265 bpartner_actuallifetimevalue numeric  
266 bpartner_ad_language character varying(6)  
267 bpartner_ad_orgbp_id numeric(10)  
268 bpartner_ad_org_id numeric(10)  
269 bpartner_bpartner_parent_id numeric(10)  
270 bpartner_c_bp_group_id numeric(10)  
271 bpartner_c_dunning_id numeric(10)  
272 bpartner_c_greeting_id numeric(10)  
273 bpartner_c_invoiceschedule_id numeric(10)  
274 bpartner_c_paymentterm_id numeric(10)  
275 bpartner_created timestamp without time zone  
276 bpartner_createdby numeric(10)  
277 bpartner_c_taxgroup_id numeric(10)  
278 bpartner_deliveryrule character(1)  
279 bpartner_deliveryviarule character(1)  
280 bpartner_description character varying(255)  
281 bpartner_dunninggrace date  
282 bpartner_duns character(11)  
283 bpartner_firstsale timestamp without time zone  
284 bpartner_flatdiscount numeric  
285 bpartner_freightcostrule character(1)  
286 bpartner_invoicerule character(1)  
287 bpartner_isactive character(1)  
288 bpartner_iscustomer character(1)  
289 bpartner_isdiscountprinted character(1)  
290 bpartner_isemployee character(1)  
291 bpartner_ismanufacturer character(1)  
292 bpartner_isonetime character(1)  
293 bpartner_ispotaxexempt character(1)  
294 bpartner_isprospect character(1)  
295 bpartner_issalesrep character(1)  
296 bpartner_issummary character(1)  
297 bpartner_istaxexempt character(1)  
298 bpartner_isvendor character(1)  
299 bpartner_logo_id numeric(10)  
300 bpartner_m_discountschema_id numeric(10)  
301 bpartner_m_pricelist_id numeric(10)  
302 bpartner_naics character(6)  
303 bpartner_name2 character varying(60)  
304 bpartner_numberemployees numeric(10)  
305 bpartner_paymentrule character(1)  
306 bpartner_paymentrulepo character(1)  
307 bpartner_po_discountschema_id numeric(10)  
308 bpartner_po_paymentterm_id numeric(10)  
309 bpartner_po_pricelist_id numeric(10)  
310 bpartner_poreference character varying(20)  
311 bpartner_potentiallifetimeval numeric  
312 bpartner_rating character(1)  
313 bpartner_referenceno character varying(40)  
314 bpartner_salesrep_id numeric(10)  
315 bpartner_salesvolume numeric(10)  
316 bpartner_sendemail character(1)  
317 bpartner_shareofcustomer numeric(10)  
318 bpartner_shelflifeminpct numeric(10)  
319 bpartner_so_creditlimit numeric  
320 bpartner_socreditstatus character(1)  
321 bpartner_so_creditused numeric  
322 bpartner_so_description character varying(255)  
323 bpartner_taxid character varying(20)  
324 bpartner_totalopenbalance numeric  
325 bpartner_updated timestamp without time zone  
326 bpartner_updatedby numeric(10)  
327 bpartner_url character varying(120)  
328 bpartner_value character varying(40)  
329 cursymbol character varying(10)  
330 cur_description character varying(255)  


ソース
ソース
 SELECT i.ad_client_id,
i.ad_org_id,
i.isactive,
i.created,
i.createdby,
i.updated,
i.updatedby,
'en_US'::character varying AS ad_language,
i.c_invoice_id,
i.issotrx,
i.documentno,
i.docstatus,
i.c_doctype_id,
i.c_bpartner_id,
bp.value AS bpvalue,
bp.taxid AS bptaxid,
bp.naics,
bp.duns,
oi.c_location_id AS org_location_id,
oi.taxid,
dt.printname AS documenttype,
dt.documentnote AS documenttypenote,
i.c_order_id,
i.salesrep_id,
COALESCE(ubp.name, u.name) AS salesrep_name,
i.dateinvoiced,
bpg.greeting AS bpgreeting,
bp.name,
bp.name2,
bpcg.greeting AS bpcontactgreeting,
bpc.title,
bpc.phone,
NULLIF((bpc.name)::text, (bp.name)::text) AS contactname,
bpl.c_location_id,
bp.referenceno,
((l.postal)::text || (l.postal_add)::text) AS postal,
i.description,
i.poreference,
i.dateordered,
i.c_currency_id,
pt.name AS paymentterm,
pt.documentnote AS paymenttermnote,
i.c_charge_id,
i.chargeamt,
i.totallines,
i.grandtotal,
i.grandtotal AS amtinwords,
i.m_pricelist_id,
i.istaxincluded,
i.c_campaign_id,
i.c_project_id,
i.c_activity_id,
i.ispaid,
COALESCE(oi.logo_id, ci.logo_id) AS logo_id,
i.ad_orgtrx_id AS c_invoice_ad_orgtrx_id,
i.ad_user_id,
i.c_bpartner_location_id,
i.c_conversiontype_id,
i.c_doctypetarget_id,
i.c_dunninglevel_id,
i.c_payment_id,
i.dateacct,
i.dateprinted,
i.docaction,
i.dunninggrace,
i.generateto,
i.invoicecollectiontype,
i.isapproved,
i.isdiscountprinted,
i.isindispute,
i.ispayschedulevalid,
i.isprinted,
i.isselfservice AS c_invoice_isselfservice,
i.istransferred,
i.m_rma_id,
i.paymentrule,
i.posted,
i.processedon,
i.processing,
i.ref_invoice_id,
i.reversal_id,
i.sendemail,
i.user1_id,
i.user2_id,
pt.ad_org_id AS c_paymentterm_ad_org_id,
pt.afterdelivery,
pt.c_paymentterm_id,
pt.description AS c_paymentterm_description,
pt.discount,
pt.discount2,
pt.discountdays,
pt.discountdays2,
pt.fixmonthcutoff,
pt.fixmonthday,
pt.fixmonthoffset,
pt.gracedays,
pt.isactive AS c_paymentterm_isactive,
pt.isdefault,
pt.isduefixed,
pt.isnextbusinessday,
pt.isvalid,
pt.netday,
pt.netdays,
pt.paymenttermusage,
pt.value AS c_paymentterm_value,
bp.acqusitioncost AS bp_acqusitioncost,
bp.actuallifetimevalue AS bp_actuallifetimevalue,
bp.ad_language AS bp_ad_language,
bp.ad_orgbp_id AS bp_ad_orgbp_id,
bp.ad_org_id AS bp_ad_org_id,
bp.bpartner_parent_id AS bp_bpartner_parent_id,
bp.c_bp_group_id AS bp_c_bp_group_id,
bp.c_dunning_id AS bp_c_dunning_id,
bp.c_greeting_id AS bp_c_greeting_id,
bp.c_invoiceschedule_id AS bp_c_invoiceschedule_id,
bp.c_paymentterm_id AS bp_c_paymentterm_id,
bp.created AS bp_created,
bp.createdby AS bp_createdby,
bp.c_taxgroup_id AS bp_c_taxgroup_id,
bp.deliveryrule AS bp_deliveryrule,
bp.deliveryviarule AS bp_deliveryviarule,
bp.description AS bp_description,
bp.dunninggrace AS bp_dunninggrace,
bp.firstsale AS bp_firstsale,
bp.flatdiscount AS bp_flatdiscount,
bp.freightcostrule AS bp_freightcostrule,
bp.invoicerule AS bp_invoicerule,
bp.isactive AS bp_isactive,
bp.iscustomer AS bp_iscustomer,
bp.isdiscountprinted AS bp_isdiscountprinted,
bp.isemployee AS bp_isemployee,
bp.ismanufacturer AS bp_ismanufacturer,
bp.isonetime AS bp_isonetime,
bp.ispotaxexempt AS bp_ispotaxexempt,
bp.isprospect AS bp_isprospect,
bp.issalesrep AS bp_issalesrep,
bp.issummary AS bp_issummary,
bp.istaxexempt AS bp_istaxexempt,
bp.isvendor AS bp_isvendor,
bp.logo_id AS bp_logo_id,
bp.m_discountschema_id AS bp_m_discountschema_id,
bp.m_pricelist_id AS bp_m_pricelist_id,
bp.naics AS bp_naics,
bp.numberemployees AS bp_numberemployees,
bp.paymentrule AS bp_paymentrule,
bp.paymentrulepo AS bp_paymentrulepo,
bp.po_discountschema_id AS bp_po_discountschema_id,
bp.po_paymentterm_id AS bp_po_paymentterm_id,
bp.po_pricelist_id AS bp_po_pricelist_id,
bp.poreference AS bp_poreference,
bp.potentiallifetimevalue AS bp_potentiallifetimevalue,
bp.rating AS bp_rating,
bp.salesrep_id AS bp_salesrep_id,
bp.salesvolume AS bp_salesvolume,
bp.sendemail AS bp_sendemail,
bp.shareofcustomer AS bp_shareofcustomer,
bp.shelflifeminpct AS bp_shelflifeminpct,
bp.so_creditlimit AS bp_so_creditlimit,
bp.socreditstatus AS bp_socreditstatus,
bp.so_creditused AS bp_so_creditused,
bp.so_description AS bp_so_description,
bp.totalopenbalance AS bp_totalopenbalance,
bp.updated AS bp_updated,
bp.updatedby AS bp_updatedby,
bp.url AS bp_url,
bpg.isactive AS c_greeting_isactive,
bpg.isfirstnameonly,
bpg.name AS c_greeting_name,
bpl.ad_org_id AS bp_location_ad_org_id,
bpl.c_bpartner_id AS bp_location_c_bpartner_id,
bpl.created AS bp_location_created,
bpl.createdby AS bp_location_createdby,
bpl.c_salesregion_id,
bpl.fax AS bp_location_fax,
bpl.isactive AS bp_location_isactive,
bpl.isbillto,
bpl.isdn,
bpl.ispayfrom,
bpl.isremitto,
bpl.isshipto,
bpl.name AS bp_location_name,
bpl.phone AS bp_location_phone,
bpl.phone2 AS bp_location_phone2,
bpl.updated AS bp_location_updated,
bpl.updatedby AS bp_location_updatedby,
l.address1,
l.address2,
l.address3,
l.address4,
l.ad_org_id AS c_location_ad_org_id,
l.c_city_id,
l.c_country_id,
l.city,
l.created AS c_location_created,
l.createdby AS c_location_createdby,
l.c_region_id,
l.isactive AS c_location_isactive,
l.regionname,
l.updated AS c_location_updated,
l.updatedby AS c_location_updatedby,
bpc.ad_org_id AS ad_user_ad_org_id,
bpc.ad_orgtrx_id AS ad_user_ad_ad_orgtrx_id,
bpc.birthday AS ad_user_ad_birthday,
bpc.c_bpartner_id AS ad_user_c_bpartner_id,
bpc.c_bpartner_location_id AS ad_user_c_bpartner_location_id,
bpc.c_greeting_id AS ad_user_c_greeting_id,
bpc.comments AS ad_user_comments,
bpc.created AS ad_user_created,
bpc.createdby AS ad_user_createdby,
bpc.description AS ad_user_description,
bpc.email AS ad_user_email,
bpc.fax AS ad_user_fax,
bpc.isactive AS ad_user_isactive,
bpc.lastcontact AS ad_user_lastcontact,
bpc.lastresult AS ad_user_lastresult,
bpc.phone2 AS ad_user_phone2,
bpc.supervisor_id AS ad_user_supervisor_id,
bpc.updated AS ad_user_updated,
bpc.updatedby AS ad_user_updatedby,
bpc.value AS ad_user_value,
bpcg.isactive AS user_greeting_isactive,
bpcg.isfirstnameonly AS user_greeting_isfirstnameonly,
bpcg.name AS user_greeting_name,
oi.ad_org_id AS ad_orginfo_ad_org_id,
oi.ad_orgtype_id,
oi.c_calendar_id,
oi.created AS ad_orginfo_created,
oi.createdby AS ad_orginfo_createdby,
oi.dropship_warehouse_id,
oi.duns AS ad_orginfo_duns,
oi.email AS ad_orginfo_email,
oi.fax AS ad_orginfo_fax,
oi.isactive AS ad_orginfo_isactive,
oi.m_warehouse_id,
oi.parent_org_id,
oi.phone AS ad_orginfo_phone,
oi.phone2 AS ad_orginfo_phone2,
oi.receiptfootermsg,
oi.supervisor_id,
oi.updated AS ad_orginfo_updated,
oi.updatedby AS ad_orginfo_updatedby,
u.ad_org_id AS salesrep_ad_org_id,
u.ad_orgtrx_id AS salesrep_ad_ad_orgtrx_id,
u.birthday AS salesrep_ad_birthday,
u.c_bpartner_id AS salesrep_c_bpartner_id,
u.c_bpartner_location_id AS salesrep_c_bp_location_id,
u.c_greeting_id AS salesrep_c_greeting_id,
u.comments AS salesrep_comments,
u.created AS salesrep_created,
u.createdby AS salesrep_createdby,
u.description AS salesrep_description,
u.email AS salesrep_email,
u.fax AS salesrep_fax,
u.isactive AS salesrep_isactive,
u.lastcontact AS salesrep_lastcontact,
u.lastresult AS salesrep_lastresult,
u.phone AS salesrep_phone,
u.phone2 AS salesrep_phone2,
u.supervisor_id AS salesrep_supervisor_id,
u.title AS salesrep_title,
u.updated AS salesrep_updated,
u.updatedby AS salesrep_updatedby,
u.value AS salesrep_value,
ubp.acqusitioncost AS bpartner_acqusitioncost,
ubp.actuallifetimevalue AS bpartner_actuallifetimevalue,
ubp.ad_language AS bpartner_ad_language,
ubp.ad_orgbp_id AS bpartner_ad_orgbp_id,
ubp.ad_org_id AS bpartner_ad_org_id,
ubp.bpartner_parent_id AS bpartner_bpartner_parent_id,
ubp.c_bp_group_id AS bpartner_c_bp_group_id,
ubp.c_dunning_id AS bpartner_c_dunning_id,
ubp.c_greeting_id AS bpartner_c_greeting_id,
ubp.c_invoiceschedule_id AS bpartner_c_invoiceschedule_id,
ubp.c_paymentterm_id AS bpartner_c_paymentterm_id,
ubp.created AS bpartner_created,
ubp.createdby AS bpartner_createdby,
ubp.c_taxgroup_id AS bpartner_c_taxgroup_id,
ubp.deliveryrule AS bpartner_deliveryrule,
ubp.deliveryviarule AS bpartner_deliveryviarule,
ubp.description AS bpartner_description,
ubp.dunninggrace AS bpartner_dunninggrace,
ubp.duns AS bpartner_duns,
ubp.firstsale AS bpartner_firstsale,
ubp.flatdiscount AS bpartner_flatdiscount,
ubp.freightcostrule AS bpartner_freightcostrule,
ubp.invoicerule AS bpartner_invoicerule,
ubp.isactive AS bpartner_isactive,
ubp.iscustomer AS bpartner_iscustomer,
ubp.isdiscountprinted AS bpartner_isdiscountprinted,
ubp.isemployee AS bpartner_isemployee,
ubp.ismanufacturer AS bpartner_ismanufacturer,
ubp.isonetime AS bpartner_isonetime,
ubp.ispotaxexempt AS bpartner_ispotaxexempt,
ubp.isprospect AS bpartner_isprospect,
ubp.issalesrep AS bpartner_issalesrep,
ubp.issummary AS bpartner_issummary,
ubp.istaxexempt AS bpartner_istaxexempt,
ubp.isvendor AS bpartner_isvendor,
ubp.logo_id AS bpartner_logo_id,
ubp.m_discountschema_id AS bpartner_m_discountschema_id,
ubp.m_pricelist_id AS bpartner_m_pricelist_id,
ubp.naics AS bpartner_naics,
ubp.name2 AS bpartner_name2,
ubp.numberemployees AS bpartner_numberemployees,
ubp.paymentrule AS bpartner_paymentrule,
ubp.paymentrulepo AS bpartner_paymentrulepo,
ubp.po_discountschema_id AS bpartner_po_discountschema_id,
ubp.po_paymentterm_id AS bpartner_po_paymentterm_id,
ubp.po_pricelist_id AS bpartner_po_pricelist_id,
ubp.poreference AS bpartner_poreference,
ubp.potentiallifetimevalue AS bpartner_potentiallifetimeval,
ubp.rating AS bpartner_rating,
ubp.referenceno AS bpartner_referenceno,
ubp.salesrep_id AS bpartner_salesrep_id,
ubp.salesvolume AS bpartner_salesvolume,
ubp.sendemail AS bpartner_sendemail,
ubp.shareofcustomer AS bpartner_shareofcustomer,
ubp.shelflifeminpct AS bpartner_shelflifeminpct,
ubp.so_creditlimit AS bpartner_so_creditlimit,
ubp.socreditstatus AS bpartner_socreditstatus,
ubp.so_creditused AS bpartner_so_creditused,
ubp.so_description AS bpartner_so_description,
ubp.taxid AS bpartner_taxid,
ubp.totalopenbalance AS bpartner_totalopenbalance,
ubp.updated AS bpartner_updated,
ubp.updatedby AS bpartner_updatedby,
ubp.url AS bpartner_url,
ubp.value AS bpartner_value,
cur.cursymbol,
cur.description AS cur_description
FROM (((((((((((((c_invoice i
JOIN c_doctype dt ON ((i.c_doctype_id = dt.c_doctype_id)))
JOIN c_paymentterm pt ON ((i.c_paymentterm_id = pt.c_paymentterm_id)))
JOIN c_bpartner bp ON ((i.c_bpartner_id = bp.c_bpartner_id)))
LEFT JOIN c_greeting bpg ON ((bp.c_greeting_id = bpg.c_greeting_id)))
JOIN c_bpartner_location bpl ON ((i.c_bpartner_location_id = bpl.c_bpartner_location_id)))
JOIN c_location l ON ((bpl.c_location_id = l.c_location_id)))
LEFT JOIN ad_user bpc ON ((i.ad_user_id = bpc.ad_user_id)))
LEFT JOIN c_greeting bpcg ON ((bpc.c_greeting_id = bpcg.c_greeting_id)))
JOIN ad_orginfo oi ON ((i.ad_org_id = oi.ad_org_id)))
JOIN ad_clientinfo ci ON ((i.ad_client_id = ci.ad_client_id)))
LEFT JOIN ad_user u ON ((i.salesrep_id = u.ad_user_id)))
LEFT JOIN c_bpartner ubp ON ((u.c_bpartner_id = ubp.c_bpartner_id)))
LEFT JOIN c_currency cur ON ((i.c_currency_id = cur.c_currency_id)));


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


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


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


RDBMS固有の情報
No プロパティ名 プロパティ値
1 schemaname adempiere
2 viewname c_invoice_header_v
3 viewowner adempiere
4 definition SELECT i.ad_client_id,
i.ad_org_id,
i.isactive,
i.created,
i.createdby,
i.updated,
i.updatedby,
'en_US'::character varying AS ad_language,
i.c_invoice_id,
i.issotrx,
i.documentno,
i.docstatus,
i.c_doctype_id,
i.c_bpartner_id,
bp.value AS bpvalue,
bp.taxid AS bptaxid,
bp.naics,
bp.duns,
oi.c_location_id AS org_location_id,
oi.taxid,
dt.printname AS documenttype,
dt.documentnote AS documenttypenote,
i.c_order_id,
i.salesrep_id,
COALESCE(ubp.name, u.name) AS salesrep_name,
i.dateinvoiced,
bpg.greeting AS bpgreeting,
bp.name,
bp.name2,
bpcg.greeting AS bpcontactgreeting,
bpc.title,
bpc.phone,
NULLIF((bpc.name)::text, (bp.name)::text) AS contactname,
bpl.c_location_id,
bp.referenceno,
((l.postal)::text || (l.postal_add)::text) AS postal,
i.description,
i.poreference,
i.dateordered,
i.c_currency_id,
pt.name AS paymentterm,
pt.documentnote AS paymenttermnote,
i.c_charge_id,
i.chargeamt,
i.totallines,
i.grandtotal,
i.grandtotal AS amtinwords,
i.m_pricelist_id,
i.istaxincluded,
i.c_campaign_id,
i.c_project_id,
i.c_activity_id,
i.ispaid,
COALESCE(oi.logo_id, ci.logo_id) AS logo_id,
i.ad_orgtrx_id AS c_invoice_ad_orgtrx_id,
i.ad_user_id,
i.c_bpartner_location_id,
i.c_conversiontype_id,
i.c_doctypetarget_id,
i.c_dunninglevel_id,
i.c_payment_id,
i.dateacct,
i.dateprinted,
i.docaction,
i.dunninggrace,
i.generateto,
i.invoicecollectiontype,
i.isapproved,
i.isdiscountprinted,
i.isindispute,
i.ispayschedulevalid,
i.isprinted,
i.isselfservice AS c_invoice_isselfservice,
i.istransferred,
i.m_rma_id,
i.paymentrule,
i.posted,
i.processedon,
i.processing,
i.ref_invoice_id,
i.reversal_id,
i.sendemail,
i.user1_id,
i.user2_id,
pt.ad_org_id AS c_paymentterm_ad_org_id,
pt.afterdelivery,
pt.c_paymentterm_id,
pt.description AS c_paymentterm_description,
pt.discount,
pt.discount2,
pt.discountdays,
pt.discountdays2,
pt.fixmonthcutoff,
pt.fixmonthday,
pt.fixmonthoffset,
pt.gracedays,
pt.isactive AS c_paymentterm_isactive,
pt.isdefault,
pt.isduefixed,
pt.isnextbusinessday,
pt.isvalid,
pt.netday,
pt.netdays,
pt.paymenttermusage,
pt.value AS c_paymentterm_value,
bp.acqusitioncost AS bp_acqusitioncost,
bp.actuallifetimevalue AS bp_actuallifetimevalue,
bp.ad_language AS bp_ad_language,
bp.ad_orgbp_id AS bp_ad_orgbp_id,
bp.ad_org_id AS bp_ad_org_id,
bp.bpartner_parent_id AS bp_bpartner_parent_id,
bp.c_bp_group_id AS bp_c_bp_group_id,
bp.c_dunning_id AS bp_c_dunning_id,
bp.c_greeting_id AS bp_c_greeting_id,
bp.c_invoiceschedule_id AS bp_c_invoiceschedule_id,
bp.c_paymentterm_id AS bp_c_paymentterm_id,
bp.created AS bp_created,
bp.createdby AS bp_createdby,
bp.c_taxgroup_id AS bp_c_taxgroup_id,
bp.deliveryrule AS bp_deliveryrule,
bp.deliveryviarule AS bp_deliveryviarule,
bp.description AS bp_description,
bp.dunninggrace AS bp_dunninggrace,
bp.firstsale AS bp_firstsale,
bp.flatdiscount AS bp_flatdiscount,
bp.freightcostrule AS bp_freightcostrule,
bp.invoicerule AS bp_invoicerule,
bp.isactive AS bp_isactive,
bp.iscustomer AS bp_iscustomer,
bp.isdiscountprinted AS bp_isdiscountprinted,
bp.isemployee AS bp_isemployee,
bp.ismanufacturer AS bp_ismanufacturer,
bp.isonetime AS bp_isonetime,
bp.ispotaxexempt AS bp_ispotaxexempt,
bp.isprospect AS bp_isprospect,
bp.issalesrep AS bp_issalesrep,
bp.issummary AS bp_issummary,
bp.istaxexempt AS bp_istaxexempt,
bp.isvendor AS bp_isvendor,
bp.logo_id AS bp_logo_id,
bp.m_discountschema_id AS bp_m_discountschema_id,
bp.m_pricelist_id AS bp_m_pricelist_id,
bp.naics AS bp_naics,
bp.numberemployees AS bp_numberemployees,
bp.paymentrule AS bp_paymentrule,
bp.paymentrulepo AS bp_paymentrulepo,
bp.po_discountschema_id AS bp_po_discountschema_id,
bp.po_paymentterm_id AS bp_po_paymentterm_id,
bp.po_pricelist_id AS bp_po_pricelist_id,
bp.poreference AS bp_poreference,
bp.potentiallifetimevalue AS bp_potentiallifetimevalue,
bp.rating AS bp_rating,
bp.salesrep_id AS bp_salesrep_id,
bp.salesvolume AS bp_salesvolume,
bp.sendemail AS bp_sendemail,
bp.shareofcustomer AS bp_shareofcustomer,
bp.shelflifeminpct AS bp_shelflifeminpct,
bp.so_creditlimit AS bp_so_creditlimit,
bp.socreditstatus AS bp_socreditstatus,
bp.so_creditused AS bp_so_creditused,
bp.so_description AS bp_so_description,
bp.totalopenbalance AS bp_totalopenbalance,
bp.updated AS bp_updated,
bp.updatedby AS bp_updatedby,
bp.url AS bp_url,
bpg.isactive AS c_greeting_isactive,
bpg.isfirstnameonly,
bpg.name AS c_greeting_name,
bpl.ad_org_id AS bp_location_ad_org_id,
bpl.c_bpartner_id AS bp_location_c_bpartner_id,
bpl.created AS bp_location_created,
bpl.createdby AS bp_location_createdby,
bpl.c_salesregion_id,
bpl.fax AS bp_location_fax,
bpl.isactive AS bp_location_isactive,
bpl.isbillto,
bpl.isdn,
bpl.ispayfrom,
bpl.isremitto,
bpl.isshipto,
bpl.name AS bp_location_name,
bpl.phone AS bp_location_phone,
bpl.phone2 AS bp_location_phone2,
bpl.updated AS bp_location_updated,
bpl.updatedby AS bp_location_updatedby,
l.address1,
l.address2,
l.address3,
l.address4,
l.ad_org_id AS c_location_ad_org_id,
l.c_city_id,
l.c_country_id,
l.city,
l.created AS c_location_created,
l.createdby AS c_location_createdby,
l.c_region_id,
l.isactive AS c_location_isactive,
l.regionname,
l.updated AS c_location_updated,
l.updatedby AS c_location_updatedby,
bpc.ad_org_id AS ad_user_ad_org_id,
bpc.ad_orgtrx_id AS ad_user_ad_ad_orgtrx_id,
bpc.birthday AS ad_user_ad_birthday,
bpc.c_bpartner_id AS ad_user_c_bpartner_id,
bpc.c_bpartner_location_id AS ad_user_c_bpartner_location_id,
bpc.c_greeting_id AS ad_user_c_greeting_id,
bpc.comments AS ad_user_comments,
bpc.created AS ad_user_created,
bpc.createdby AS ad_user_createdby,
bpc.description AS ad_user_description,
bpc.email AS ad_user_email,
bpc.fax AS ad_user_fax,
bpc.isactive AS ad_user_isactive,
bpc.lastcontact AS ad_user_lastcontact,
bpc.lastresult AS ad_user_lastresult,
bpc.phone2 AS ad_user_phone2,
bpc.supervisor_id AS ad_user_supervisor_id,
bpc.updated AS ad_user_updated,
bpc.updatedby AS ad_user_updatedby,
bpc.value AS ad_user_value,
bpcg.isactive AS user_greeting_isactive,
bpcg.isfirstnameonly AS user_greeting_isfirstnameonly,
bpcg.name AS user_greeting_name,
oi.ad_org_id AS ad_orginfo_ad_org_id,
oi.ad_orgtype_id,
oi.c_calendar_id,
oi.created AS ad_orginfo_created,
oi.createdby AS ad_orginfo_createdby,
oi.dropship_warehouse_id,
oi.duns AS ad_orginfo_duns,
oi.email AS ad_orginfo_email,
oi.fax AS ad_orginfo_fax,
oi.isactive AS ad_orginfo_isactive,
oi.m_warehouse_id,
oi.parent_org_id,
oi.phone AS ad_orginfo_phone,
oi.phone2 AS ad_orginfo_phone2,
oi.receiptfootermsg,
oi.supervisor_id,
oi.updated AS ad_orginfo_updated,
oi.updatedby AS ad_orginfo_updatedby,
u.ad_org_id AS salesrep_ad_org_id,
u.ad_orgtrx_id AS salesrep_ad_ad_orgtrx_id,
u.birthday AS salesrep_ad_birthday,
u.c_bpartner_id AS salesrep_c_bpartner_id,
u.c_bpartner_location_id AS salesrep_c_bp_location_id,
u.c_greeting_id AS salesrep_c_greeting_id,
u.comments AS salesrep_comments,
u.created AS salesrep_created,
u.createdby AS salesrep_createdby,
u.description AS salesrep_description,
u.email AS salesrep_email,
u.fax AS salesrep_fax,
u.isactive AS salesrep_isactive,
u.lastcontact AS salesrep_lastcontact,
u.lastresult AS salesrep_lastresult,
u.phone AS salesrep_phone,
u.phone2 AS salesrep_phone2,
u.supervisor_id AS salesrep_supervisor_id,
u.title AS salesrep_title,
u.updated AS salesrep_updated,
u.updatedby AS salesrep_updatedby,
u.value AS salesrep_value,
ubp.acqusitioncost AS bpartner_acqusitioncost,
ubp.actuallifetimevalue AS bpartner_actuallifetimevalue,
ubp.ad_language AS bpartner_ad_language,
ubp.ad_orgbp_id AS bpartner_ad_orgbp_id,
ubp.ad_org_id AS bpartner_ad_org_id,
ubp.bpartner_parent_id AS bpartner_bpartner_parent_id,
ubp.c_bp_group_id AS bpartner_c_bp_group_id,
ubp.c_dunning_id AS bpartner_c_dunning_id,
ubp.c_greeting_id AS bpartner_c_greeting_id,
ubp.c_invoiceschedule_id AS bpartner_c_invoiceschedule_id,
ubp.c_paymentterm_id AS bpartner_c_paymentterm_id,
ubp.created AS bpartner_created,
ubp.createdby AS bpartner_createdby,
ubp.c_taxgroup_id AS bpartner_c_taxgroup_id,
ubp.deliveryrule AS bpartner_deliveryrule,
ubp.deliveryviarule AS bpartner_deliveryviarule,
ubp.description AS bpartner_description,
ubp.dunninggrace AS bpartner_dunninggrace,
ubp.duns AS bpartner_duns,
ubp.firstsale AS bpartner_firstsale,
ubp.flatdiscount AS bpartner_flatdiscount,
ubp.freightcostrule AS bpartner_freightcostrule,
ubp.invoicerule AS bpartner_invoicerule,
ubp.isactive AS bpartner_isactive,
ubp.iscustomer AS bpartner_iscustomer,
ubp.isdiscountprinted AS bpartner_isdiscountprinted,
ubp.isemployee AS bpartner_isemployee,
ubp.ismanufacturer AS bpartner_ismanufacturer,
ubp.isonetime AS bpartner_isonetime,
ubp.ispotaxexempt AS bpartner_ispotaxexempt,
ubp.isprospect AS bpartner_isprospect,
ubp.issalesrep AS bpartner_issalesrep,
ubp.issummary AS bpartner_issummary,
ubp.istaxexempt AS bpartner_istaxexempt,
ubp.isvendor AS bpartner_isvendor,
ubp.logo_id AS bpartner_logo_id,
ubp.m_discountschema_id AS bpartner_m_discountschema_id,
ubp.m_pricelist_id AS bpartner_m_pricelist_id,
ubp.naics AS bpartner_naics,
ubp.name2 AS bpartner_name2,
ubp.numberemployees AS bpartner_numberemployees,
ubp.paymentrule AS bpartner_paymentrule,
ubp.paymentrulepo AS bpartner_paymentrulepo,
ubp.po_discountschema_id AS bpartner_po_discountschema_id,
ubp.po_paymentterm_id AS bpartner_po_paymentterm_id,
ubp.po_pricelist_id AS bpartner_po_pricelist_id,
ubp.poreference AS bpartner_poreference,
ubp.potentiallifetimevalue AS bpartner_potentiallifetimeval,
ubp.rating AS bpartner_rating,
ubp.referenceno AS bpartner_referenceno,
ubp.salesrep_id AS bpartner_salesrep_id,
ubp.salesvolume AS bpartner_salesvolume,
ubp.sendemail AS bpartner_sendemail,
ubp.shareofcustomer AS bpartner_shareofcustomer,
ubp.shelflifeminpct AS bpartner_shelflifeminpct,
ubp.so_creditlimit AS bpartner_so_creditlimit,
ubp.socreditstatus AS bpartner_socreditstatus,
ubp.so_creditused AS bpartner_so_creditused,
ubp.so_description AS bpartner_so_description,
ubp.taxid AS bpartner_taxid,
ubp.totalopenbalance AS bpartner_totalopenbalance,
ubp.updated AS bpartner_updated,
ubp.updatedby AS bpartner_updatedby,
ubp.url AS bpartner_url,
ubp.value AS bpartner_value,
cur.cursymbol,
cur.description AS cur_description
FROM (((((((((((((c_invoice i
JOIN c_doctype dt ON ((i.c_doctype_id = dt.c_doctype_id)))
JOIN c_paymentterm pt ON ((i.c_paymentterm_id = pt.c_paymentterm_id)))
JOIN c_bpartner bp ON ((i.c_bpartner_id = bp.c_bpartner_id)))
LEFT JOIN c_greeting bpg ON ((bp.c_greeting_id = bpg.c_greeting_id)))
JOIN c_bpartner_location bpl ON ((i.c_bpartner_location_id = bpl.c_bpartner_location_id)))
JOIN c_location l ON ((bpl.c_location_id = l.c_location_id)))
LEFT JOIN ad_user bpc ON ((i.ad_user_id = bpc.ad_user_id)))
LEFT JOIN c_greeting bpcg ON ((bpc.c_greeting_id = bpcg.c_greeting_id)))
JOIN ad_orginfo oi ON ((i.ad_org_id = oi.ad_org_id)))
JOIN ad_clientinfo ci ON ((i.ad_client_id = ci.ad_client_id)))
LEFT JOIN ad_user u ON ((i.salesrep_id = u.ad_user_id)))
LEFT JOIN c_bpartner ubp ON ((u.c_bpartner_id = ubp.c_bpartner_id)))
LEFT JOIN c_currency cur ON ((i.c_currency_id = cur.c_currency_id)));