2696: p_start_pc IN NUMBER,
2697: p_end_pc IN NUMBER) IS
2698: /* ************************************************************************
2699: This procedure will convert fa_deprn_periods records for the Primary
2700: Book to the reporting book. All existing records in fa_mc_deprn_periods
2701: for the reporting book are first deleted. To preserve the trail as to
2702: when the reporting book was first set up, fa_deprn_period rows will be
2703: fetched using the first period counter in fa_mc_deprn_periods all the
2704: way upto the current open period. This will ensure that the primary
2699: This procedure will convert fa_deprn_periods records for the Primary
2700: Book to the reporting book. All existing records in fa_mc_deprn_periods
2701: for the reporting book are first deleted. To preserve the trail as to
2702: when the reporting book was first set up, fa_deprn_period rows will be
2703: fetched using the first period counter in fa_mc_deprn_periods all the
2704: way upto the current open period. This will ensure that the primary
2705: book and reporting book have the same open periods after conversion
2706: is completed.
2707: ************************************************************************ */
2715: end if;
2716:
2717: SELECT min(period_counter)
2718: INTO l_pc
2719: FROM fa_mc_deprn_periods
2720: WHERE
2721: set_of_books_id = p_rsob_id AND
2722: book_type_code = p_book_type_code;
2723:
2720: WHERE
2721: set_of_books_id = p_rsob_id AND
2722: book_type_code = p_book_type_code;
2723:
2724: DELETE FROM fa_mc_deprn_periods
2725: WHERE
2726: set_of_books_id = p_rsob_id AND
2727: book_type_code = p_book_type_code;
2728:
2725: WHERE
2726: set_of_books_id = p_rsob_id AND
2727: book_type_code = p_book_type_code;
2728:
2729: INSERT INTO fa_mc_deprn_periods(
2730: set_of_books_id,
2731: book_type_code,
2732: period_name,
2733: period_counter,