557: a number;
558:
559: cursor c_header(c_batch_id number) is
560: select je_header_id
561: from gl_je_headers
562: where je_batch_id = c_batch_id
563: and je_source = 'Internal Trading';
564:
565: cursor c_line(c_header_id number)
610: end if;
611:
612: DELETE gl_je_lines where je_header_id IN
613: ( SELECT je_header_id
614: FROM gl_je_headers
615: WHERE je_batch_id = p_batch_id
616: );
617: DELETE gl_je_headers WHERE je_batch_id = p_batch_id;
618: DELETE gl_je_batches WHERE je_batch_id = p_batch_id;
613: ( SELECT je_header_id
614: FROM gl_je_headers
615: WHERE je_batch_id = p_batch_id
616: );
617: DELETE gl_je_headers WHERE je_batch_id = p_batch_id;
618: DELETE gl_je_batches WHERE je_batch_id = p_batch_id;
619:
620:
621: elsif b_budgetary_control_status = 'R'
635: end if;
636:
637: DELETE gl_je_lines where je_header_id IN
638: (SELECT je_header_id
639: FROM gl_je_headers
640: WHERE je_batch_id = p_batch_id);
641: delete gl_je_headers where je_batch_id = p_batch_id;
642: delete gl_je_batches where je_batch_id = p_batch_id;
643:
637: DELETE gl_je_lines where je_header_id IN
638: (SELECT je_header_id
639: FROM gl_je_headers
640: WHERE je_batch_id = p_batch_id);
641: delete gl_je_headers where je_batch_id = p_batch_id;
642: delete gl_je_batches where je_batch_id = p_batch_id;
643:
644:
645: elsif b_budgetary_control_status NOT IN ('R')
659: end if;
660:
661: /* DELETE gl_je_lines where je_header_id IN
662: ( SELECT je_header_id
663: FROM gl_je_headers
664: WHERE je_batch_id = p_batch_id
665: );
666: DELETE gl_je_headers WHERE je_batch_id = p_batch_id;
667: DELETE gl_je_batches WHERE je_batch_id = p_batch_id;
662: ( SELECT je_header_id
663: FROM gl_je_headers
664: WHERE je_batch_id = p_batch_id
665: );
666: DELETE gl_je_headers WHERE je_batch_id = p_batch_id;
667: DELETE gl_je_batches WHERE je_batch_id = p_batch_id;
668: */
669: elsif b_budgetary_control_status = 'N'
670: then
681: end if;
682:
683: DELETE gl_je_lines where je_header_id IN
684: ( SELECT je_header_id
685: FROM gl_je_headers
686: WHERE je_batch_id = p_batch_id
687: );
688: DELETE gl_je_headers WHERE je_batch_id = p_batch_id;
689: DELETE gl_je_batches WHERE je_batch_id = p_batch_id;
684: ( SELECT je_header_id
685: FROM gl_je_headers
686: WHERE je_batch_id = p_batch_id
687: );
688: DELETE gl_je_headers WHERE je_batch_id = p_batch_id;
689: DELETE gl_je_batches WHERE je_batch_id = p_batch_id;
690:
691: elsif b_budgetary_control_status = 'P'
692: then