13: IS
14: CURSOR c IS
15: SELECT SUM(NVL(iil.INTEREST_CHARGED,0))
16: FROM ar_interest_lines iil,
17: ar_interest_headers ii,
18: ar_interest_batches ib
19: WHERE iil.interest_header_id = ii.interest_header_id
20: AND ib.interest_batch_id = ii.interest_batch_id
21: AND ib.interest_batch_id = p_interest_batch_id;
311:
312: DELETE FROM ar_interest_lines iil
313: WHERE EXISTS
314: (SELECT interest_header_id
315: FROM ar_interest_headers ii
316: WHERE iil.interest_header_id = ii.interest_header_id
317: AND ii.interest_batch_id = p_interest_batch_id);
318:
319: DELETE FROM ar_interest_headers
315: FROM ar_interest_headers ii
316: WHERE iil.interest_header_id = ii.interest_header_id
317: AND ii.interest_batch_id = p_interest_batch_id);
318:
319: DELETE FROM ar_interest_headers
320: WHERE interest_batch_id = p_interest_batch_id;
321:
322: DELETE FROM AR_INTEREST_BATCHES
323: WHERE interest_batch_id = p_interest_batch_id ;
448: SET process_status = 'N',
449: object_version_number = NVL(object_version_number,1) + 1
450: WHERE EXISTS
451: (SELECT interest_header_id
452: FROM ar_interest_headers ii
453: WHERE iil.interest_header_id = ii.interest_header_id
454: AND ii.interest_batch_id = p_interest_batch_id)
455: AND iil.process_status <> 'S';
456:
453: WHERE iil.interest_header_id = ii.interest_header_id
454: AND ii.interest_batch_id = p_interest_batch_id)
455: AND iil.process_status <> 'S';
456:
457: UPDATE ar_interest_headers
458: SET process_status = 'N',
459: object_version_number = NVL(object_version_number,1) + 1
460: WHERE interest_batch_id = p_interest_batch_id
461: AND process_status <> 'S';