ar_payments_schedules_all Joins with gl_code_combinations
Hi,
I have the following query to get the invoice amount. Now I need to restrict this query with gl_code_combination.Segment5 (which is a natural a/c code)
can somebody give me an idea which tables needs to join.
SELECT NVL (SUM (apsa.amount_due_original), 0)
FROM ar_payment_schedules_all apsa, hz_cust_accounts hca
WHERE apsa.CLASS IN ('INV')
AND hca.cust_account_id = apsa.customer_id
AND apsa.org_id = 122
AND TRUNC (apsa.gl_date) BETWEEN '01-SEP-2016' and '30-SEP-2016'
AND hca.party_id = 211201
AND hca.account_number = 58038;
Thanks.
- Shahid