2827: p_start_pc IN NUMBER,
2828: p_end_pc IN NUMBER) IS
2829: /* ************************************************************************
2830: This procedure will convert fa_deprn_periods records for the Primary
2831: Book to the reporting book. All existing records in fa_mc_deprn_periods
2832: for the reporting book are first deleted. To preserve the trail as to
2833: when the reporting book was first set up, fa_deprn_period rows will be
2834: fetched using the first period counter in fa_mc_deprn_periods all the
2835: way upto the current open period. This will ensure that the primary
2830: This procedure will convert fa_deprn_periods records for the Primary
2831: Book to the reporting book. All existing records in fa_mc_deprn_periods
2832: for the reporting book are first deleted. To preserve the trail as to
2833: when the reporting book was first set up, fa_deprn_period rows will be
2834: fetched using the first period counter in fa_mc_deprn_periods all the
2835: way upto the current open period. This will ensure that the primary
2836: book and reporting book have the same open periods after conversion
2837: is completed.
2838: ************************************************************************ */
2846: end if;
2847:
2848: SELECT min(period_counter)
2849: INTO l_pc
2850: FROM fa_mc_deprn_periods
2851: WHERE
2852: set_of_books_id = p_rsob_id AND
2853: book_type_code = p_book_type_code;
2854:
2851: WHERE
2852: set_of_books_id = p_rsob_id AND
2853: book_type_code = p_book_type_code;
2854:
2855: DELETE FROM fa_mc_deprn_periods
2856: WHERE
2857: set_of_books_id = p_rsob_id AND
2858: book_type_code = p_book_type_code;
2859:
2856: WHERE
2857: set_of_books_id = p_rsob_id AND
2858: book_type_code = p_book_type_code;
2859:
2860: INSERT INTO fa_mc_deprn_periods(
2861: set_of_books_id,
2862: book_type_code,
2863: period_name,
2864: period_counter,