select distinct
rct.ORG_ID,
rct.trx_number,
rct.trx_date,
rct.TERM_DUE_DATE,
hp.PARTY_NUMBER Customer_Number,
hp.party_name Customer_Name,
aps.AMOUNT_APPLIED,
aps.AMOUNT_DUE_ORIGINAL,
aps.AMOUNT_DUE_REMAINING,
acr.receipt_number,
acr.receipt_date,
ara.cash_receipt_id,
aps.PAYMENT_SCHEDULE_ID,
ara.PAYMENT_SCHEDULE_ID,
taxline.PRECEDENCE_1,
taxline.PRECEDENCE_2,
taxline.PRECEDENCE_3,
taxline.PRECEDENCE_4,
taxline.PRECEDENCE_5,
taxline.tax_amount T_AMOUNT
From ra_customer_trx_all rct,
ra_customer_trx_lines_all rctl,
ja_in_ra_cust_trx_tax_lines taxline,
hz_cust_accounts hca,
hz_parties hp,
AR_PAYMENT_SCHEDULES_ALL aps,
ar_receivable_applications_all ara,
AR_CASH_RECEIPTS_ALL acr
where rct.bill_to_customer_id = hca.cust_account_id
AND hca.party_id = hp.party_id
and rct.customer_trx_id = aps.customer_trx_id(+)
and rct.customer_trx_id = ara.applied_customer_trx_id(+)
and ara.CASH_RECEIPT_ID = acr.CASH_RECEIPT_ID(+)
and rct.CUSTOMER_TRX_ID = rctl.CUSTOMER_TRX_ID
AND taxline.link_to_cust_trx_line_id(+) = rctl.customer_trx_line_id
AND TRUNC (rct.CREATION_DATE) BETWEEN '01-APR-2011' AND '13-AUG-2011'
and rct.SET_OF_BOOKS_ID = 5
--and rct.ORG_ID = 90
No comments:
Post a Comment