AIM: This query is used for RA Customer transaction in Account receivable.

Script  :

SELECT hp.party_name CUSTOMER_NAME,

rcta.TRX_NUMBER INVOICE_NUMBER,

rcta.trx_date INVOICE_DATE,

(SELECT SUM (extended_amount)

FROM ra_customer_trx_lines_all ct

WHERE ct.customer_trx_id = rcta.customer_trx_id)

INVOICE_TOTAL,

hcal.Account_Number ACCOUNT_NUMBER

FROM ra_customer_trx_all rcta,

hz_cust_accounts_all hcal,

hz_parties hp

WHERE     hcal.PARTY_ID     =       hp.PARTY_ID

AND hcal.cust_account_id   =      rcta.bill_to_customer_id

AND rcta.TRX_NUMBER BETWEEN NVL (:P_INVOICE_NUMBER_LOW,

rcta.TRX_NUMBER)

AND NVL (:P_INVOICE_NUMBER_HIGH,

rcta.TRX_NUMBER)

AND rcta.TRX_DATE BETWEEN NVL (:P_FROM_TRANSACTION_DATE,

rcta.TRX_DATE)

AND NVL (:P_TO_TRANSACTION_DATE, rcta.TRX_DATE)

AND hcal.account_number = NVL (:P_ACCOUNT_NUMBER, hcal.account_number)

–AND rcta.batch_source_id IN (

—                                      SELECT batch_source_id

—                                         FROM ra_batch_sources

—                                       WHERE NAME IN

—                                               (‘OSDP Imported Invoice’,

—                                               ‘OSDP Manual Transaction’))

GROUP BY hp.party_name,

rcta.TRX_NUMBER,

rcta.trx_date,

Account_Number,

rcta.customer_trx_id

Do drop a note by writing us at Dileep.dinesh@doyensys.com or use the comment section below to ask your questions

Recent Posts

Start typing and press Enter to search