SELECT ACR.ATTRIBUTE1 CHECK_ID ,
ACR.ATTRIBUTE2 CHECK_NUMBER ,
ACR.ATTRIBUTE6 RECEIPT_DATE ,
RCT.TRX_NUMBER AR_INV_NUMBER ,
ARM.NAME PAYMENT_METHOD ,
TO_CHAR(ACR.REVERSAL_DATE,'DD-MON-YYYY') AR_RECEIPT_REVERSAL_DATE ,
AL.MEANING RECEIPT_STATUS ,
HOU.NAME OPERATING_UNIT_NAME ,
ACR.RECEIPT_NUMBER AR_RECEIPT_NUMBER ,
TO_CHAR(ACR.RECEIPT_DATE,'DD-MON-YYYY') AR_RECEIPT_DATE ,
ACR.CURRENCY_CODE ENTERED_CURRENCY_CODE ,
ACR.AMOUNT*SIGN(ARA.ACCTD_AMOUNT_APPLIED_FROM) ENTERED_AMOUNT ,
GSOB.CURRENCY_CODE ACCOUNTED_CURRENCY_CODE ,
ARA.ACCTD_AMOUNT_APPLIED_FROM ACCOUNTED_AMOUNT ,
GCCK.CONCATENATED_SEGMENTS CASH_GL_ACCOUNT ,
GCCK.SEGMENT1 RECEIPT_LE_ME ,
ABA.BANK_ACCOUNT_NUM BANK_ACCOUNT_NUMBER ,
ABB.BANK_NAME BANK_NAME ,
ACR.ORG_ID ,
ACR.STATUS ,
ACR.CASH_RECEIPT_ID ,
ACR.REMITTANCE_BANK_ACCOUNT_ID
-- ,ARA.APPLIED_CUSTOMER_TRX_ID
-- ,ARA.CODE_COMBINATION_ID
,
ARM.RECEIPT_METHOD_ID ,
ABA.BANK_ACCOUNT_ID ,
ABB.BANK_BRANCH_ID
FROM APPS.RA_CUSTOMER_TRX_ALL RCT ,
APPS.AR_RECEIPT_METHODS ARM ,
APPS.AR_CASH_RECEIPTS_ALL ACR ,
APPS.AR_RECEIVABLE_APPLICATIONS_ALL ARA,
APPS.GL_SETS_OF_BOOKS GSOB ,
APPS.GL_CODE_COMBINATIONS_KFV GCCK ,
APPS.AP_BANK_ACCOUNTS_ALL ABA ,
APPS.AP_BANK_BRANCHES ABB ,
APPS.HR_OPERATING_UNITS HOU ,
APPS.AR_LOOKUPS AL ,
APPS.AR_RECEIPT_METHOD_ACCOUNTS_ALL ARMA
WHERE acr.cash_receipt_id = ara.cash_receipt_id
AND acr.receipt_method_id = arm.receipt_method_id
AND ara.applied_customer_trx_id = rct.customer_trx_id(+)
AND acr.set_of_books_id = gsob.set_of_books_id
AND arma.cash_ccid = gcck.code_combination_id
AND arm.receipt_method_id = arma.receipt_method_id
AND aba.bank_account_id = arma.bank_account_id
AND acr.remittance_bank_account_id = aba.bank_account_id
AND aba.bank_branch_id = abb.bank_branch_id
AND acr.org_id = hou.organization_id
AND al.lookup_type = 'CHECK_STATUS'
AND acr.status = al.lookup_code
No comments:
Post a Comment