223: FUNCTION IsRecordCopiedBefore ( fp_crh_id in number) return boolean
224: IS
225: CURSOR c_crh is
226: select 'x'
227: from igi_ar_cash_receipt_hist_all igi
228: where igi.cash_receipt_history_id = fp_crh_id
229: ;
230: BEGIN
231: FOR l_crh IN c_crh LOOP
247: NULL;
248: ELSE
249:
250: BEGIN
251: INSERT into igi_ar_cash_receipt_hist_all (
252: cash_receipt_history_id
253: , last_update_date
254: , last_updated_by
255: , last_update_login
305: FUNCTION IsRecordCopiedBefore ( fp_crh_id in number) return boolean
306: IS
307: CURSOR c_crh is
308: select 'x'
309: from igi_ar_cash_receipt_hist_all igi
310: where igi.cash_receipt_history_id = fp_crh_id
311: ;
312: BEGIN
313: FOR l_crh IN c_crh LOOP
326: FOR lcrh in CCRH LOOP
327:
328: IF IsRecordCopiedBefore ( lcrh.cash_receipt_history_id) THEN
329:
330: UPDATE igi_Ar_cash_receipt_hist_all
331: SET arc_rev_post_control_id = -3
332: , arc_rev_gl_posted_date = null
333: WHERE cash_receipt_history_id = lcrh.cash_receipt_history_id
334: ;
335:
336: ELSE
337:
338: BEGIN
339: INSERT into igi_ar_cash_receipt_hist_all (
340: cash_receipt_history_id
341: , last_update_date
342: , last_updated_by
343: , last_update_login