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


カラム情報
No 論理名 物理名 データ型 Not Null デフォルト 備考
1 ad_client_id numeric(10)  
2 ad_org_id numeric(10)  
3 ad_language character varying(6)  
4 c_payselection_id numeric(10)  
5 c_payselectioncheck_id numeric(10)  
6 org_location_id numeric(10)  
7 taxid character varying(20)  
8 c_doctype_id numeric(10)  
9 c_bpartner_id numeric(10)  
10 bpvalue character varying(40)  
11 bptaxid character varying(20)  
12 naics character(6)  
13 duns character(11)  
14 bpgreeting character varying(60)  
15 name character varying(120)  
16 name2 character varying(60)  
17 c_location_id numeric  
18 referenceno character varying(40)  
19 poreference character varying(20)  
20 paydate timestamp without time zone  
21 payamt numeric  
22 amtinwords numeric  
23 qty numeric  
24 paymentrule character(1)  
25 documentno character varying(30)  
26 logo_id numeric(10)  
27 documenttype character varying(60)  
28 documenttypenote character varying(2000)  
29 description character varying(255)  
30 bankaccountdescription character varying(255)  
31 c_bp_bankaccount_id numeric(10)  
32 c_payment_id numeric(10)  
33 c_payselectioncheck_created timestamp without time zone  
34 c_payselectioncheck_createdby numeric(10)  
35 c_payselectioncheck_discamt numeric  
36 c_payselectioncheck_isactive character(1)  
37 isgenerateddraft character(1)  
38 isprinted character(1)  
39 isreceipt character(1)  
40 processed character(1)  
41 c_payselectioncheck_updated timestamp without time zone  
42 c_payselectioncheck_updatedby numeric(10)  
43 c_payselection_ad_org_id numeric(10)  
44 c_paysel_c_bankaccount_id numeric(10)  
45 c_payselection_created timestamp without time zone  
46 c_payselection_createdby numeric(10)  
47 c_payselection_description character varying(255)  
48 c_payselection_isactive character(1)  
49 c_payselection_isapproved character(1)  
50 c_payselection_name character varying(120)  
51 c_payselection_processed character(1)  
52 totalamt numeric  
53 c_payselection_updated timestamp without time zone  
54 c_payselection_updatedby numeric(10)  
55 a_city character varying(60)  
56 a_country character varying(40)  
57 c_payment_ad_org_id numeric(10)  
58 a_email character varying(60)  
59 a_ident_dl character varying(20)  
60 a_name character varying(60)  
61 a_state character varying(40)  
62 a_street character varying(60)  
63 a_zip character varying(20)  
64 c_activity_id numeric(10)  
65 c_payment_c_bpartner_id numeric(10)  
66 c_campaign_id numeric(10)  
67 c_payment_c_charge_id numeric(10)  
68 c_conversiontype_id numeric(10)  
69 c_currency_id numeric(10)  
70 c_payment_chargeamt numeric  
71 checkno character varying(20)  
72 c_payment_c_invoice_id numeric(10)  
73 c_payment_c_order_id numeric(10)  
74 c_paymentbatch_id numeric(10)  
75 c_project_id numeric(10)  
76 c_payment_created timestamp without time zone  
77 c_payment_createdby numeric(10)  
78 dateacct timestamp without time zone  
79 datetrx timestamp without time zone  
80 c_payment_discountamt numeric  
81 docstatus character(2)  
82 c_payment_documentno character varying(30)  
83 c_payment_isactive character(1)  
84 isallocated character(1)  
85 isapproved character(1)  
86 isdelayedcapture character(1)  
87 isonline character(1)  
88 isoverunderpayment character(1)  
89 isprepayment character(1)  
90 isreconciled character(1)  
91 c_payment_isselfservice character(1)  
92 micr character varying(20)  
93 orig_trxid character varying(20)  
94 overunderamt numeric  
95 c_payment_payamt numeric  
96 ponum character varying(60)  
97 c_payment_posted character(1)  
98 c_payment_processed character(1)  
99 c_payment_processedon numeric  
100 r_authcode character varying(20)  
101 r_authcode_dc character varying(20)  
102 r_avsaddr character(1)  
103 r_avszip character(1)  
104 r_cvv2match character(1)  
105 ref_payment_id numeric(10)  
106 c_payment_reversal_id numeric(10)  
107 r_info character varying(2000)  
108 routingno character varying(20)  
109 r_pnref character varying(20)  
110 r_pnref_dc character varying(20)  
111 r_respmsg character varying(60)  
112 r_result character varying(20)  
113 swipe character varying(80)  
114 taxamt numeric  
115 tendertype character(1)  
116 trxtype character(1)  
117 c_payment_updated timestamp without time zone  
118 c_payment_updatedby numeric(10)  
119 user1_id numeric(10)  
120 user2_id numeric(10)  
121 voiceauthcode character varying(20)  
122 writeoffamt numeric  
123 c_bp_acqusitioncost numeric  
124 c_bp_actuallifetimevalue numeric  
125 c_bp_ad_language character varying(6)  
126 c_bp_ad_orgbp_id numeric(10)  
127 c_bp_ad_org_id numeric(10)  
128 c_bp_bpartner_parent_id numeric(10)  
129 c_bp_c_bp_group_id numeric(10)  
130 c_bp_c_dunning_id numeric(10)  
131 c_bp_c_greeting_id numeric(10)  
132 c_bp_c_invoiceschedule_id numeric(10)  
133 c_bp_c_paymentterm_id numeric(10)  
134 c_bp_created timestamp without time zone  
135 c_bp_createdby numeric(10)  
136 c_bp_c_taxgroup_id numeric(10)  
137 c_bp_deliveryrule character(1)  
138 c_bp_deliveryviarule character(1)  
139 c_bp_description character varying(255)  
140 c_bp_dunninggrace date  
141 c_bp_firstsale timestamp without time zone  
142 c_bp_flatdiscount numeric  
143 c_bp_freightcostrule character(1)  
144 c_bp_invoicerule character(1)  
145 c_bp_isactive character(1)  
146 c_bp_iscustomer character(1)  
147 c_bp_isdiscountprinted character(1)  
148 c_bp_isemployee character(1)  
149 c_bp_ismanufacturer character(1)  
150 c_bp_isonetime character(1)  
151 c_bp_ispotaxexempt character(1)  
152 c_bp_isprospect character(1)  
153 c_bp_issalesrep character(1)  
154 c_bp_issummary character(1)  
155 c_bp_istaxexempt character(1)  
156 c_bp_isvendor character(1)  
157 c_bp_logo_id numeric(10)  
158 c_bp_m_discountschema_id numeric(10)  
159 c_bp_m_pricelist_id numeric(10)  
160 c_bp_numberemployees numeric(10)  
161 c_bp_paymentrule character(1)  
162 c_bp_paymentrulepo character(1)  
163 c_bp_po_discountschema_id numeric(10)  
164 c_bp_po_paymentterm_id numeric(10)  
165 c_bp_po_pricelist_id numeric(10)  
166 c_bp_potentiallifetimevalue numeric  
167 c_bp_rating character(1)  
168 c_bp_salesrep_id numeric(10)  
169 c_bp_salesvolume numeric(10)  
170 c_bp_sendemail character(1)  
171 c_bp_shareofcustomer numeric(10)  
172 c_bp_shelflifeminpct numeric(10)  
173 c_bp_so_creditlimit numeric  
174 c_bp_socreditstatus character(1)  
175 c_bp_so_creditused numeric  
176 c_bp_so_description character varying(255)  
177 c_bp_totalopenbalance numeric  
178 c_bp_updated timestamp without time zone  
179 c_bp_updatedby numeric(10)  
180 c_bp_url character varying(120)  
181 c_greeting_ad_org_id numeric(10)  
182 c_greeting_isactive character(1)  
183 isfirstnameonly character(1)  
184 c_greeting_name character varying(60)  
185 ad_orginfo_ad_org_id numeric(10)  
186 ad_orgtype_id numeric(10)  
187 c_calendar_id numeric(10)  
188 ad_orginfo_created timestamp without time zone  
189 ad_orginfo_createdby numeric(10)  
190 dropship_warehouse_id numeric(10)  
191 ad_orginfo_duns character(11)  
192 ad_orginfo_email character varying(60)  
193 ad_orginfo_fax character varying(40)  
194 ad_orginfo_isactive character(1)  
195 m_warehouse_id numeric(10)  
196 parent_org_id numeric(10)  
197 ad_orginfo_phone character varying(40)  
198 ad_orginfo_phone2 character varying(40)  
199 receiptfootermsg character varying(1023)  
200 supervisor_id numeric(10)  
201 ad_orginfo_updated timestamp without time zone  
202 ad_orginfo_updatedby numeric(10)  


ソース
ソース
 SELECT psc.ad_client_id,
psc.ad_org_id,
l.ad_language,
psc.c_payselection_id,
psc.c_payselectioncheck_id,
oi.c_location_id AS org_location_id,
oi.taxid,
p.c_doctype_id,
bp.c_bpartner_id,
bp.value AS bpvalue,
bp.taxid AS bptaxid,
bp.naics,
bp.duns,
bpgt.greeting AS bpgreeting,
bp.name,
bp.name2,
bpartnerremitlocation(bp.c_bpartner_id) AS c_location_id,
bp.referenceno,
bp.poreference,
ps.paydate,
psc.payamt,
psc.payamt AS amtinwords,
psc.qty,
psc.paymentrule,
psc.documentno,
COALESCE(oi.logo_id, ci.logo_id) AS logo_id,
dt.printname AS documenttype,
dt.documentnote AS documenttypenote,
p.description,
ba.description AS bankaccountdescription,
psc.c_bp_bankaccount_id,
psc.c_payment_id,
psc.created AS c_payselectioncheck_created,
psc.createdby AS c_payselectioncheck_createdby,
psc.discountamt AS c_payselectioncheck_discamt,
psc.isactive AS c_payselectioncheck_isactive,
psc.isgenerateddraft,
psc.isprinted,
psc.isreceipt,
psc.processed,
psc.updated AS c_payselectioncheck_updated,
psc.updatedby AS c_payselectioncheck_updatedby,
ps.ad_org_id AS c_payselection_ad_org_id,
ps.c_bankaccount_id AS c_paysel_c_bankaccount_id,
ps.created AS c_payselection_created,
ps.createdby AS c_payselection_createdby,
ps.description AS c_payselection_description,
ps.isactive AS c_payselection_isactive,
ps.isapproved AS c_payselection_isapproved,
ps.name AS c_payselection_name,
ps.processed AS c_payselection_processed,
ps.totalamt,
ps.updated AS c_payselection_updated,
ps.updatedby AS c_payselection_updatedby,
p.a_city,
p.a_country,
p.ad_org_id AS c_payment_ad_org_id,
p.a_email,
p.a_ident_dl,
p.a_name,
p.a_state,
p.a_street,
p.a_zip,
p.c_activity_id,
p.c_bpartner_id AS c_payment_c_bpartner_id,
p.c_campaign_id,
p.c_charge_id AS c_payment_c_charge_id,
p.c_conversiontype_id,
p.c_currency_id,
p.chargeamt AS c_payment_chargeamt,
p.checkno,
p.c_invoice_id AS c_payment_c_invoice_id,
p.c_order_id AS c_payment_c_order_id,
p.c_paymentbatch_id,
p.c_project_id,
p.created AS c_payment_created,
p.createdby AS c_payment_createdby,
p.dateacct,
p.datetrx,
p.discountamt AS c_payment_discountamt,
p.docstatus,
p.documentno AS c_payment_documentno,
p.isactive AS c_payment_isactive,
p.isallocated,
p.isapproved,
p.isdelayedcapture,
p.isonline,
p.isoverunderpayment,
p.isprepayment,
p.isreconciled,
p.isselfservice AS c_payment_isselfservice,
p.micr,
p.orig_trxid,
p.overunderamt,
p.payamt AS c_payment_payamt,
p.ponum,
p.posted AS c_payment_posted,
p.processed AS c_payment_processed,
p.processedon AS c_payment_processedon,
p.r_authcode,
p.r_authcode_dc,
p.r_avsaddr,
p.r_avszip,
p.r_cvv2match,
p.ref_payment_id,
p.reversal_id AS c_payment_reversal_id,
p.r_info,
p.routingno,
p.r_pnref,
p.r_pnref_dc,
p.r_respmsg,
p.r_result,
p.swipe,
p.taxamt,
p.tendertype,
p.trxtype,
p.updated AS c_payment_updated,
p.updatedby AS c_payment_updatedby,
p.user1_id,
p.user2_id,
p.voiceauthcode,
p.writeoffamt,
bp.acqusitioncost AS c_bp_acqusitioncost,
bp.actuallifetimevalue AS c_bp_actuallifetimevalue,
bp.ad_language AS c_bp_ad_language,
bp.ad_orgbp_id AS c_bp_ad_orgbp_id,
bp.ad_org_id AS c_bp_ad_org_id,
bp.bpartner_parent_id AS c_bp_bpartner_parent_id,
bp.c_bp_group_id AS c_bp_c_bp_group_id,
bp.c_dunning_id AS c_bp_c_dunning_id,
bp.c_greeting_id AS c_bp_c_greeting_id,
bp.c_invoiceschedule_id AS c_bp_c_invoiceschedule_id,
bp.c_paymentterm_id AS c_bp_c_paymentterm_id,
bp.created AS c_bp_created,
bp.createdby AS c_bp_createdby,
bp.c_taxgroup_id AS c_bp_c_taxgroup_id,
bp.deliveryrule AS c_bp_deliveryrule,
bp.deliveryviarule AS c_bp_deliveryviarule,
bp.description AS c_bp_description,
bp.dunninggrace AS c_bp_dunninggrace,
bp.firstsale AS c_bp_firstsale,
bp.flatdiscount AS c_bp_flatdiscount,
bp.freightcostrule AS c_bp_freightcostrule,
bp.invoicerule AS c_bp_invoicerule,
bp.isactive AS c_bp_isactive,
bp.iscustomer AS c_bp_iscustomer,
bp.isdiscountprinted AS c_bp_isdiscountprinted,
bp.isemployee AS c_bp_isemployee,
bp.ismanufacturer AS c_bp_ismanufacturer,
bp.isonetime AS c_bp_isonetime,
bp.ispotaxexempt AS c_bp_ispotaxexempt,
bp.isprospect AS c_bp_isprospect,
bp.issalesrep AS c_bp_issalesrep,
bp.issummary AS c_bp_issummary,
bp.istaxexempt AS c_bp_istaxexempt,
bp.isvendor AS c_bp_isvendor,
bp.logo_id AS c_bp_logo_id,
bp.m_discountschema_id AS c_bp_m_discountschema_id,
bp.m_pricelist_id AS c_bp_m_pricelist_id,
bp.numberemployees AS c_bp_numberemployees,
bp.paymentrule AS c_bp_paymentrule,
bp.paymentrulepo AS c_bp_paymentrulepo,
bp.po_discountschema_id AS c_bp_po_discountschema_id,
bp.po_paymentterm_id AS c_bp_po_paymentterm_id,
bp.po_pricelist_id AS c_bp_po_pricelist_id,
bp.potentiallifetimevalue AS c_bp_potentiallifetimevalue,
bp.rating AS c_bp_rating,
bp.salesrep_id AS c_bp_salesrep_id,
bp.salesvolume AS c_bp_salesvolume,
bp.sendemail AS c_bp_sendemail,
bp.shareofcustomer AS c_bp_shareofcustomer,
bp.shelflifeminpct AS c_bp_shelflifeminpct,
bp.so_creditlimit AS c_bp_so_creditlimit,
bp.socreditstatus AS c_bp_socreditstatus,
bp.so_creditused AS c_bp_so_creditused,
bp.so_description AS c_bp_so_description,
bp.totalopenbalance AS c_bp_totalopenbalance,
bp.updated AS c_bp_updated,
bp.updatedby AS c_bp_updatedby,
bp.url AS c_bp_url,
bpgt.ad_org_id AS c_greeting_ad_org_id,
bpgt.isactive AS c_greeting_isactive,
bpg.isfirstnameonly,
bpgt.name AS c_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
FROM ((((((((((c_payselectioncheck psc
JOIN c_payselection ps ON ((psc.c_payselection_id = ps.c_payselection_id)))
LEFT JOIN c_payment p ON ((psc.c_payment_id = p.c_payment_id)))
LEFT JOIN c_bankaccount ba ON ((p.c_bankaccount_id = ba.c_bankaccount_id)))
LEFT JOIN c_doctype_trl dt ON ((p.c_doctype_id = dt.c_doctype_id)))
JOIN c_bpartner bp ON ((psc.c_bpartner_id = bp.c_bpartner_id)))
JOIN ad_orginfo oi ON ((psc.ad_org_id = oi.ad_org_id)))
JOIN ad_clientinfo ci ON ((psc.ad_client_id = ci.ad_client_id)))
LEFT JOIN ad_language l ON ((l.issystemlanguage = 'Y'::bpchar)))
LEFT JOIN c_greeting bpg ON ((bp.c_greeting_id = bpg.c_greeting_id)))
LEFT JOIN c_greeting_trl bpgt ON (((bp.c_greeting_id = bpgt.c_greeting_id) AND ((bpgt.ad_language)::text = (l.ad_language)::text))));


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


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


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


RDBMS固有の情報
No プロパティ名 プロパティ値
1 schemaname adempiere
2 viewname c_payselection_check_vt
3 viewowner adempiere
4 definition SELECT psc.ad_client_id,
psc.ad_org_id,
l.ad_language,
psc.c_payselection_id,
psc.c_payselectioncheck_id,
oi.c_location_id AS org_location_id,
oi.taxid,
p.c_doctype_id,
bp.c_bpartner_id,
bp.value AS bpvalue,
bp.taxid AS bptaxid,
bp.naics,
bp.duns,
bpgt.greeting AS bpgreeting,
bp.name,
bp.name2,
bpartnerremitlocation(bp.c_bpartner_id) AS c_location_id,
bp.referenceno,
bp.poreference,
ps.paydate,
psc.payamt,
psc.payamt AS amtinwords,
psc.qty,
psc.paymentrule,
psc.documentno,
COALESCE(oi.logo_id, ci.logo_id) AS logo_id,
dt.printname AS documenttype,
dt.documentnote AS documenttypenote,
p.description,
ba.description AS bankaccountdescription,
psc.c_bp_bankaccount_id,
psc.c_payment_id,
psc.created AS c_payselectioncheck_created,
psc.createdby AS c_payselectioncheck_createdby,
psc.discountamt AS c_payselectioncheck_discamt,
psc.isactive AS c_payselectioncheck_isactive,
psc.isgenerateddraft,
psc.isprinted,
psc.isreceipt,
psc.processed,
psc.updated AS c_payselectioncheck_updated,
psc.updatedby AS c_payselectioncheck_updatedby,
ps.ad_org_id AS c_payselection_ad_org_id,
ps.c_bankaccount_id AS c_paysel_c_bankaccount_id,
ps.created AS c_payselection_created,
ps.createdby AS c_payselection_createdby,
ps.description AS c_payselection_description,
ps.isactive AS c_payselection_isactive,
ps.isapproved AS c_payselection_isapproved,
ps.name AS c_payselection_name,
ps.processed AS c_payselection_processed,
ps.totalamt,
ps.updated AS c_payselection_updated,
ps.updatedby AS c_payselection_updatedby,
p.a_city,
p.a_country,
p.ad_org_id AS c_payment_ad_org_id,
p.a_email,
p.a_ident_dl,
p.a_name,
p.a_state,
p.a_street,
p.a_zip,
p.c_activity_id,
p.c_bpartner_id AS c_payment_c_bpartner_id,
p.c_campaign_id,
p.c_charge_id AS c_payment_c_charge_id,
p.c_conversiontype_id,
p.c_currency_id,
p.chargeamt AS c_payment_chargeamt,
p.checkno,
p.c_invoice_id AS c_payment_c_invoice_id,
p.c_order_id AS c_payment_c_order_id,
p.c_paymentbatch_id,
p.c_project_id,
p.created AS c_payment_created,
p.createdby AS c_payment_createdby,
p.dateacct,
p.datetrx,
p.discountamt AS c_payment_discountamt,
p.docstatus,
p.documentno AS c_payment_documentno,
p.isactive AS c_payment_isactive,
p.isallocated,
p.isapproved,
p.isdelayedcapture,
p.isonline,
p.isoverunderpayment,
p.isprepayment,
p.isreconciled,
p.isselfservice AS c_payment_isselfservice,
p.micr,
p.orig_trxid,
p.overunderamt,
p.payamt AS c_payment_payamt,
p.ponum,
p.posted AS c_payment_posted,
p.processed AS c_payment_processed,
p.processedon AS c_payment_processedon,
p.r_authcode,
p.r_authcode_dc,
p.r_avsaddr,
p.r_avszip,
p.r_cvv2match,
p.ref_payment_id,
p.reversal_id AS c_payment_reversal_id,
p.r_info,
p.routingno,
p.r_pnref,
p.r_pnref_dc,
p.r_respmsg,
p.r_result,
p.swipe,
p.taxamt,
p.tendertype,
p.trxtype,
p.updated AS c_payment_updated,
p.updatedby AS c_payment_updatedby,
p.user1_id,
p.user2_id,
p.voiceauthcode,
p.writeoffamt,
bp.acqusitioncost AS c_bp_acqusitioncost,
bp.actuallifetimevalue AS c_bp_actuallifetimevalue,
bp.ad_language AS c_bp_ad_language,
bp.ad_orgbp_id AS c_bp_ad_orgbp_id,
bp.ad_org_id AS c_bp_ad_org_id,
bp.bpartner_parent_id AS c_bp_bpartner_parent_id,
bp.c_bp_group_id AS c_bp_c_bp_group_id,
bp.c_dunning_id AS c_bp_c_dunning_id,
bp.c_greeting_id AS c_bp_c_greeting_id,
bp.c_invoiceschedule_id AS c_bp_c_invoiceschedule_id,
bp.c_paymentterm_id AS c_bp_c_paymentterm_id,
bp.created AS c_bp_created,
bp.createdby AS c_bp_createdby,
bp.c_taxgroup_id AS c_bp_c_taxgroup_id,
bp.deliveryrule AS c_bp_deliveryrule,
bp.deliveryviarule AS c_bp_deliveryviarule,
bp.description AS c_bp_description,
bp.dunninggrace AS c_bp_dunninggrace,
bp.firstsale AS c_bp_firstsale,
bp.flatdiscount AS c_bp_flatdiscount,
bp.freightcostrule AS c_bp_freightcostrule,
bp.invoicerule AS c_bp_invoicerule,
bp.isactive AS c_bp_isactive,
bp.iscustomer AS c_bp_iscustomer,
bp.isdiscountprinted AS c_bp_isdiscountprinted,
bp.isemployee AS c_bp_isemployee,
bp.ismanufacturer AS c_bp_ismanufacturer,
bp.isonetime AS c_bp_isonetime,
bp.ispotaxexempt AS c_bp_ispotaxexempt,
bp.isprospect AS c_bp_isprospect,
bp.issalesrep AS c_bp_issalesrep,
bp.issummary AS c_bp_issummary,
bp.istaxexempt AS c_bp_istaxexempt,
bp.isvendor AS c_bp_isvendor,
bp.logo_id AS c_bp_logo_id,
bp.m_discountschema_id AS c_bp_m_discountschema_id,
bp.m_pricelist_id AS c_bp_m_pricelist_id,
bp.numberemployees AS c_bp_numberemployees,
bp.paymentrule AS c_bp_paymentrule,
bp.paymentrulepo AS c_bp_paymentrulepo,
bp.po_discountschema_id AS c_bp_po_discountschema_id,
bp.po_paymentterm_id AS c_bp_po_paymentterm_id,
bp.po_pricelist_id AS c_bp_po_pricelist_id,
bp.potentiallifetimevalue AS c_bp_potentiallifetimevalue,
bp.rating AS c_bp_rating,
bp.salesrep_id AS c_bp_salesrep_id,
bp.salesvolume AS c_bp_salesvolume,
bp.sendemail AS c_bp_sendemail,
bp.shareofcustomer AS c_bp_shareofcustomer,
bp.shelflifeminpct AS c_bp_shelflifeminpct,
bp.so_creditlimit AS c_bp_so_creditlimit,
bp.socreditstatus AS c_bp_socreditstatus,
bp.so_creditused AS c_bp_so_creditused,
bp.so_description AS c_bp_so_description,
bp.totalopenbalance AS c_bp_totalopenbalance,
bp.updated AS c_bp_updated,
bp.updatedby AS c_bp_updatedby,
bp.url AS c_bp_url,
bpgt.ad_org_id AS c_greeting_ad_org_id,
bpgt.isactive AS c_greeting_isactive,
bpg.isfirstnameonly,
bpgt.name AS c_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
FROM ((((((((((c_payselectioncheck psc
JOIN c_payselection ps ON ((psc.c_payselection_id = ps.c_payselection_id)))
LEFT JOIN c_payment p ON ((psc.c_payment_id = p.c_payment_id)))
LEFT JOIN c_bankaccount ba ON ((p.c_bankaccount_id = ba.c_bankaccount_id)))
LEFT JOIN c_doctype_trl dt ON ((p.c_doctype_id = dt.c_doctype_id)))
JOIN c_bpartner bp ON ((psc.c_bpartner_id = bp.c_bpartner_id)))
JOIN ad_orginfo oi ON ((psc.ad_org_id = oi.ad_org_id)))
JOIN ad_clientinfo ci ON ((psc.ad_client_id = ci.ad_client_id)))
LEFT JOIN ad_language l ON ((l.issystemlanguage = 'Y'::bpchar)))
LEFT JOIN c_greeting bpg ON ((bp.c_greeting_id = bpg.c_greeting_id)))
LEFT JOIN c_greeting_trl bpgt ON (((bp.c_greeting_id = bpgt.c_greeting_id) AND ((bpgt.ad_language)::text = (l.ad_language)::text))));