3332: select sum(ael.entered_dr)
3333: ,ael.code_combination_id
3334: from ra_customer_trx_all inv
3335: ,xla_transaction_entities ent
3336: ,xla_ae_headers aeh
3337: ,xla_ae_lines ael
3338: where ent.application_id = 222
3339: and inv.customer_trx_id = ent.source_id_int_1
3340: and ent.entity_code = 'TRANSACTIONS'
3367: select sum(ael.entered_dr)
3368: ,ael.code_combination_id
3369: from ar_adjustments_all adj
3370: ,xla_transaction_entities ent
3371: ,xla_ae_headers aeh
3372: ,xla_ae_lines ael
3373: where ent.application_id = 222
3374: and adj.adjustment_id = ent.source_id_int_1
3375: and ent.entity_code = 'ADJUSTMENTS'
4151: and not exists
4152: (select 'X'
4153: from xla_events xle
4154: ,XLA_TRANSACTION_ENTITIES XLEE
4155: ,xla_ae_headers aeh
4156: where XLE.application_id = 206
4157: and XLE.event_id = disb.event_id
4158: and XLE.entity_id = xlee.entity_id
4159: and XLEE.source_id_int_1 = dh.loan_id
4220: -- and not exists
4221: -- (select 'X'
4222: -- from xla_events xle
4223: -- ,XLA_TRANSACTION_ENTITIES XLEE
4224: -- ,xla_ae_headers aeh
4225: -- where XLE.application_id = 206
4226: -- and XLE.event_id = disb.event_id
4227: -- and XLE.entity_id = xlee.entity_id
4228: -- and XLEE.source_id_int_1 = dh.loan_id