在應收模塊提取收款分類的SQL腳本
arm.receipt_method_id,
arc.name Class_Name,
arm.name Method_Name,
hp.party_number,
hp.party_name Bank_Name,
hpc.party_name Branch_Name,
cba.bank_branch_id,
cba.bank_account_id,
haou.organization_id Org_ID,
haou.name OU_name,
cba.bank_account_name,
cba.currency_code CUR_Code,
gccc.segment1 || ‘.‘ || gccc.segment2 || ‘.‘ || gccc.segment3 || ‘.‘ || gccc.segment4 || ‘.‘ || gccc.segment5 || ‘.‘ || gccc.segment6 || ‘.‘ || gccc.segment7 || ‘.‘ || gccc.segment8 gcccash_Account, gccuapp.segment1 || ‘.‘ || gccuapp.segment3 gccuapp_Account, gccunid.segment1 || ‘.‘ || gccunid.segment3 gccunid_Account, gccOn.segment1 || ‘.‘ || gccOn.segment3 gccOn_Account
from ar_receipt_classes arc,
ar_receipt_methods arm,
ar_receipt_method_accounts_all ara,
hz_parties hp,
hz_parties hpc,
ce_bank_accounts cba,
ce_bank_acct_uses_all cbau,
hr_all_organization_units haou,
gl_code_combinations gccc,
gl_code_combinations gccunid,
gl_code_combinations gccOn
where arc.receipt_class_id = arm.receipt_class_id
and arc.receipt_class_id > 1
and arm.receipt_method_id = ara.receipt_method_id
and hp.party_id = cba.bank_id
and cba.bank_branch_id = hpc.party_id
and cba.bank_account_id = cbau.bank_account_id
and ara.remit_bank_acct_use_id = cbau.bank_acct_use_id
and haou.organization_id = ara.org_id
and gccc.code_combination_id = ara.cash_ccid
and gccuapp.code_combination_id=ara.unapplied_ccid
and gccunid.code_combination_id=ara.unidentified_ccid
and gccOn.code_combination_id=ara.on_account_ccid
order by cba.bank_branch_id,haou.organization_id
在應收模塊提取收款分類的SQL腳本