Line 1143: and EXISTS ( select '1' from ra_cust_trx_types rctt
1139: and rct.org_id = l_ou_id
1140: and rctl.customer_trx_id = rct.customer_trx_id
1141: and rct.complete_flag = 'Y'
1142: and rctl.customer_trx_line_id = rctlgd.customer_trx_line_id 1143: and EXISTS ( select '1' from ra_cust_trx_types rctt 1144: where rct.cust_trx_type_id = rctt.cust_trx_type_id
1145: and rctt.type = 'CM')
1146: and rctlgd.org_id = l_ou_id
1147: and rctlgd.gl_date is not NULL