模块:AP
相关表:AP.AP_CHECKS_ALL ACA AP付款头信息表
AP.AP_INVOICE_PAYMENTS_ALL AIP AP发票-付款关联信息表
CE_BANK_ACCOUNTS CBA 银行帐户信息表
CE_BANK_ACCT_USES_ALL CBAU 付款银行关系表
CE_BANK_BRANCHES_V CBB
ce_payment_documents 付款单据
其他:(ACA.CE_BANK_ACCT_USE_ID = CBAU.bank_acct_use_id(+)
AND CBAU.bank_account_id = CBA.bank_account_id(+) AND CBA.BANK_BRANCH_ID = CBB.bank_party_id(+))
SQL:
相关表:AP.AP_CHECKS_ALL ACA AP付款头信息表
AP.AP_INVOICE_PAYMENTS_ALL AIP AP发票-付款关联信息表
CE_BANK_ACCOUNTS CBA 银行帐户信息表
CE_BANK_ACCT_USES_ALL CBAU 付款银行关系表
CE_BANK_BRANCHES_V CBB
ce_payment_documents 付款单据
其他:(ACA.CE_BANK_ACCT_USE_ID = CBAU.bank_acct_use_id(+)
AND CBAU.bank_account_id = CBA.bank_account_id(+) AND CBA.BANK_BRANCH_ID = CBB.bank_party_id(+))
SQL:
select aca.check_number,
pv.segment1 vendor_code,
pv.vendor_name,
aca.check_date,
aca.currency_code,
aca.exchange_rate,
aca.payment_document_id,
pd.payment_document_name, --付款单据
aia.invoice_num,
aia.invoice_amount,
aip.amount
from ap.ap_checks_all aca,
ap.ap_invoice_payments_all aip,
ce.ce_bank_accounts cba,
ce.ce_bank_acct_uses_all cbau,
ce_bank_branches_v cbb,
ap.ap_invoices_all aia,
apps.po_vendors pv,
ce_payment_documents pd
where aca.check_id = aip.check_id
and aca.ce_bank_acct_use_id = cbau.bank_acct_use_id(+)
and cbau.bank_account_id = cba.bank_account_id(+)
and cbau.org_id = aip.org_id(+)
and cba.bank_branch_id = cbb.bank_party_id(+)
and aip.invoice_id = aia.invoice_id
and aia.vendor_id = pv.vendor_id
and aca.payment_document_id = pd.payment_document_id(+)
and aca.check_number = '9'
pv.segment1 vendor_code,
pv.vendor_name,
aca.check_date,
aca.currency_code,
aca.exchange_rate,
aca.payment_document_id,
pd.payment_document_name, --付款单据
aia.invoice_num,
aia.invoice_amount,
aip.amount
from ap.ap_checks_all aca,
ap.ap_invoice_payments_all aip,
ce.ce_bank_accounts cba,
ce.ce_bank_acct_uses_all cbau,
ce_bank_branches_v cbb,
ap.ap_invoices_all aia,
apps.po_vendors pv,
ce_payment_documents pd
where aca.check_id = aip.check_id
and aca.ce_bank_acct_use_id = cbau.bank_acct_use_id(+)
and cbau.bank_account_id = cba.bank_account_id(+)
and cbau.org_id = aip.org_id(+)
and cba.bank_branch_id = cbb.bank_party_id(+)
and aip.invoice_id = aia.invoice_id
and aia.vendor_id = pv.vendor_id
and aca.payment_document_id = pd.payment_document_id(+)
and aca.check_number = '9'