select rcta.bill_to_customer_id,
rcta.trx_date,
rcta.trx_date,
rcta.ct_reference so_no,
rctla.unit_selling_price,
-- rctla.
rctla.uom_code,
rctla.quantity_invoiced--,
from RA_CUSTOMER_TRX_ALL rcta ,Ra_Customer_Trx_Lines_All rctla
where rcta.trx_number not in
(select arav.TRX_NUMBER from AR_RECEIVABLE_APPLICATIONS_V arav)
and rctla.customer_trx_id = rcta.customer_trx_id
and rcta.set_of_books_id = 1001