Find AR Invoice Post to GL Query

---AR Invoice is Posted to GL Query

SELECT arc.customer_name,
         rct.trx_number,
         rct.trx_date,
         rctt.name trx_name,
         rctt.description,
         rctt.TYPE,
         SUM (extended_amount)
    FROM ar_customers arc,
         ra_customer_trx_all rct,
         ra_customer_trx_lines_all rctl,
         ra_cust_trx_types_all rctt
   WHERE     rct.customer_trx_id = rctl.customer_trx_id
         AND rct.org_id = rctt.org_id
         AND rct.cust_trx_type_id = rctt.cust_trx_type_id
         AND rct.sold_to_customer_id = arc.customer_id
         --AND     RCTT.TYPE='INV'
         AND rctl.line_type = 'LINE'
         AND rct.complete_flag = 'Y'
         AND rctt.post_to_gl = 'Y'         --Post to GL
         AND rctt.accounting_affect_flag = 'Y'
GROUP BY arc.customer_name,
         rct.trx_number,
         rct.trx_date,
         rctt.name,
         rctt.description,
         rctt.type