Need to find all unapplied creit memos
we need to list all unapplied credit memos in AR .
I am assuming that as soon as a credit memo is applied it will create a record in table ar_receivable_applications_all.
so below is the query i have made
select * from
ra_customer_trx_all rcta
where not exists (select 1 from
ar_receivable_applications_all araa
where
araa.applied_customer_trx_id=rcta.customer_trx_id )
and CUST_TRX_TYPE_ID =2---This corrosponds to Credit memo.
can someone validate or comment???