Query to generate Customized aging report
I tried following query but it is not reflecting true picture.
select A.CUSTOMER_ID, B.CUSTOMER_NAME, A.trx_number, A.TRX_DATE, A.amount_due_original, A.amount_due_remaining, A.STATUS, a.class
from AR_PAYMENT_SCHEDULES_ALL A,
AR_CUSTOMERS B
where A.customer_id = B.CUSTOMER_ID
AND amount_due_remaining <> 0
and a.class in ('INV','DM')
and trx_date > '30-JUN-07'
;
Can anyone help ?
Thanks