80:
81: cursor update_event (p_trx_id ra_customer_trx.customer_trx_id%TYPE)
82: is
83: select distinct trh.event_id
84: from ar_transaction_history_all trh
85: where trh.customer_trx_id = p_trx_id and
86: trh.event_id is not null and /* This condition is to make sure that null events are not selected for update. Null events get inserted in TRH when fields like maturity date are updated */
87: not exists
88: ( select 'Y'
85: where trh.customer_trx_id = p_trx_id and
86: trh.event_id is not null and /* This condition is to make sure that null events are not selected for update. Null events get inserted in TRH when fields like maturity date are updated */
87: not exists
88: ( select 'Y'
89: from ar_transaction_history_all trh_sub
90: where trh_sub.customer_trx_id = p_trx_id and
91: trh_sub.postable_flag ='Y' and
92: trh_sub.event_id = trh.event_id
93: );
340: IF (p_trh_rec.status = 'PENDING_REMITTANCE' AND l_old_trh_rec.status = 'INCOMPLETE') THEN
341:
342: select count(distinct trh.event_id)
343: into l_event_count
344: from ar_transaction_history_all trh
345: where trh.customer_trx_id = p_trh_rec.customer_trx_id and
346: not exists
347: ( select 'Y'
348: from ar_transaction_history_all trh_sub
344: from ar_transaction_history_all trh
345: where trh.customer_trx_id = p_trh_rec.customer_trx_id and
346: not exists
347: ( select 'Y'
348: from ar_transaction_history_all trh_sub
349: where trh_sub.customer_trx_id = p_trh_rec.customer_trx_id and
350: trh_sub.postable_flag ='Y' and
351: trh_sub.event_id = trh.event_id
352: );