[Home] [Help]
350: =========================================================================*/
351: IF (mr_rec.redefault_flag = 'YES') THEN
352: -- Depreciation rules will be redefaulted.
353: -- Reset g_deprn_count before loading the cache table.
354: FA_LOAD_TBL_PKG.g_deprn_count := 0;
355: -- Load depreciation rules table for the corporate book and all the
356: -- associated tax books for the new category.
357: -- Simulates caching effect.
358: FA_LOAD_TBL_PKG.Load_Deprn_Rules_Tbl(
354: FA_LOAD_TBL_PKG.g_deprn_count := 0;
355: -- Load depreciation rules table for the corporate book and all the
356: -- associated tax books for the new category.
357: -- Simulates caching effect.
358: FA_LOAD_TBL_PKG.Load_Deprn_Rules_Tbl(
359: p_corp_book => mr_rec.book_type_code,
360: p_category_id => mr_rec.to_category_id,
361: x_return_status => h_status);
362: IF NOT h_status THEN
520: COMMIT WORK;
521:
522: IF (mr_rec.redefault_flag = 'YES') THEN
523: -- Reset g_deprn_count after completing mass reclass transaction.
524: FA_LOAD_TBL_PKG.g_deprn_count := 0;
525: END IF;
526:
527: /*=========================================================================
528: Fetch the preview records from the interface table and print them on
554: WHEN mrcl_failure THEN
555: retcode := 2; -- Completed with error.
556:
557: -- Reset global variable values.
558: FA_LOAD_TBL_PKG.g_deprn_count := 0;
559: a_tbl.delete;
560: a_index := 0;
561: g_asset_count := 0;
562: --g_total_assets := 0;
589: CALLING_FN => 'FARX_RP.Preview_Reclass');
590: END IF;
591:
592: -- Reset global variable values.
593: FA_LOAD_TBL_PKG.g_deprn_count := 0;
594: a_tbl.delete;
595: a_index := 0;
596: g_asset_count := 0;
597: --g_total_assets := 0;
637: h_depreciate_flag VARCHAR2(3);
638: pos NUMBER;
639: h_dummy_bool1 BOOLEAN;
640: h_dummy_bool2 BOOLEAN;
641: h_dummy_rules1 FA_LOAD_TBL_PKG.asset_deprn_info;
642: h_dummy_rules2 FA_LOAD_TBL_PKG.asset_deprn_info;
643: h_dummy_date DATE;
644: h_dummy_char1 VARCHAR2(10);
645: h_dummy_char2 VARCHAR2(4);
638: pos NUMBER;
639: h_dummy_bool1 BOOLEAN;
640: h_dummy_bool2 BOOLEAN;
641: h_dummy_rules1 FA_LOAD_TBL_PKG.asset_deprn_info;
642: h_dummy_rules2 FA_LOAD_TBL_PKG.asset_deprn_info;
643: h_dummy_date DATE;
644: h_dummy_char1 VARCHAR2(10);
645: h_dummy_char2 VARCHAR2(4);
646: store_failure EXCEPTION;
766: -- Get new depreciation rules.
767:
768: -- First, get the index of the new depreciation rules record
769: -- from the depreciation table.
770: FA_LOAD_TBL_PKG.Find_Position_Deprn_Rules(
771: p_book_type_code => h_book_type_code,
772: p_date_placed_in_service => h_dpis,
773: x_pos => pos);
774: IF pos IS NULL THEN
778: raise store_failure;
779: END IF;
780:
781: a_tbl(a_index).convention
782: := FA_LOAD_TBL_PKG.deprn_table(pos).prorate_conv_code;
783: a_tbl(a_index).ceiling
784: := FA_LOAD_TBL_PKG.deprn_table(pos).ceiling_name;
785: a_tbl(a_index).method
786: := FA_LOAD_TBL_PKG.deprn_table(pos).deprn_method;
780:
781: a_tbl(a_index).convention
782: := FA_LOAD_TBL_PKG.deprn_table(pos).prorate_conv_code;
783: a_tbl(a_index).ceiling
784: := FA_LOAD_TBL_PKG.deprn_table(pos).ceiling_name;
785: a_tbl(a_index).method
786: := FA_LOAD_TBL_PKG.deprn_table(pos).deprn_method;
787: a_tbl(a_index).life_in_months
788: := FA_LOAD_TBL_PKG.deprn_table(pos).life_in_months;
782: := FA_LOAD_TBL_PKG.deprn_table(pos).prorate_conv_code;
783: a_tbl(a_index).ceiling
784: := FA_LOAD_TBL_PKG.deprn_table(pos).ceiling_name;
785: a_tbl(a_index).method
786: := FA_LOAD_TBL_PKG.deprn_table(pos).deprn_method;
787: a_tbl(a_index).life_in_months
788: := FA_LOAD_TBL_PKG.deprn_table(pos).life_in_months;
789: a_tbl(a_index).basic_rate
790: := FA_LOAD_TBL_PKG.deprn_table(pos).basic_rate;
784: := FA_LOAD_TBL_PKG.deprn_table(pos).ceiling_name;
785: a_tbl(a_index).method
786: := FA_LOAD_TBL_PKG.deprn_table(pos).deprn_method;
787: a_tbl(a_index).life_in_months
788: := FA_LOAD_TBL_PKG.deprn_table(pos).life_in_months;
789: a_tbl(a_index).basic_rate
790: := FA_LOAD_TBL_PKG.deprn_table(pos).basic_rate;
791: a_tbl(a_index).adjusted_rate
792: := FA_LOAD_TBL_PKG.deprn_table(pos).adjusted_rate;
786: := FA_LOAD_TBL_PKG.deprn_table(pos).deprn_method;
787: a_tbl(a_index).life_in_months
788: := FA_LOAD_TBL_PKG.deprn_table(pos).life_in_months;
789: a_tbl(a_index).basic_rate
790: := FA_LOAD_TBL_PKG.deprn_table(pos).basic_rate;
791: a_tbl(a_index).adjusted_rate
792: := FA_LOAD_TBL_PKG.deprn_table(pos).adjusted_rate;
793: a_tbl(a_index).bonus_rule
794: := FA_LOAD_TBL_PKG.deprn_table(pos).bonus_rule;
788: := FA_LOAD_TBL_PKG.deprn_table(pos).life_in_months;
789: a_tbl(a_index).basic_rate
790: := FA_LOAD_TBL_PKG.deprn_table(pos).basic_rate;
791: a_tbl(a_index).adjusted_rate
792: := FA_LOAD_TBL_PKG.deprn_table(pos).adjusted_rate;
793: a_tbl(a_index).bonus_rule
794: := FA_LOAD_TBL_PKG.deprn_table(pos).bonus_rule;
795: a_tbl(a_index).capacity
796: := FA_LOAD_TBL_PKG.deprn_table(pos).production_capacity;
790: := FA_LOAD_TBL_PKG.deprn_table(pos).basic_rate;
791: a_tbl(a_index).adjusted_rate
792: := FA_LOAD_TBL_PKG.deprn_table(pos).adjusted_rate;
793: a_tbl(a_index).bonus_rule
794: := FA_LOAD_TBL_PKG.deprn_table(pos).bonus_rule;
795: a_tbl(a_index).capacity
796: := FA_LOAD_TBL_PKG.deprn_table(pos).production_capacity;
797: a_tbl(a_index).unit_of_measure
798: := FA_LOAD_TBL_PKG.deprn_table(pos).unit_of_measure;
792: := FA_LOAD_TBL_PKG.deprn_table(pos).adjusted_rate;
793: a_tbl(a_index).bonus_rule
794: := FA_LOAD_TBL_PKG.deprn_table(pos).bonus_rule;
795: a_tbl(a_index).capacity
796: := FA_LOAD_TBL_PKG.deprn_table(pos).production_capacity;
797: a_tbl(a_index).unit_of_measure
798: := FA_LOAD_TBL_PKG.deprn_table(pos).unit_of_measure;
799: -- We will not redefault depreciate flag through mass reclass.
800: a_tbl(a_index).depreciate_flag := h_depreciate_flag;
794: := FA_LOAD_TBL_PKG.deprn_table(pos).bonus_rule;
795: a_tbl(a_index).capacity
796: := FA_LOAD_TBL_PKG.deprn_table(pos).production_capacity;
797: a_tbl(a_index).unit_of_measure
798: := FA_LOAD_TBL_PKG.deprn_table(pos).unit_of_measure;
799: -- We will not redefault depreciate flag through mass reclass.
800: a_tbl(a_index).depreciate_flag := h_depreciate_flag;
801: a_tbl(a_index).allowed_deprn_limit
802: := FA_LOAD_TBL_PKG.deprn_table(pos).allow_deprn_limit;
798: := FA_LOAD_TBL_PKG.deprn_table(pos).unit_of_measure;
799: -- We will not redefault depreciate flag through mass reclass.
800: a_tbl(a_index).depreciate_flag := h_depreciate_flag;
801: a_tbl(a_index).allowed_deprn_limit
802: := FA_LOAD_TBL_PKG.deprn_table(pos).allow_deprn_limit;
803: a_tbl(a_index).deprn_limit_amt
804: := FA_LOAD_TBL_PKG.deprn_table(pos).deprn_limit_amount;
805: a_tbl(a_index).percent_salvage_val
806: := FA_LOAD_TBL_PKG.deprn_table(pos).percent_salvage_value;
800: a_tbl(a_index).depreciate_flag := h_depreciate_flag;
801: a_tbl(a_index).allowed_deprn_limit
802: := FA_LOAD_TBL_PKG.deprn_table(pos).allow_deprn_limit;
803: a_tbl(a_index).deprn_limit_amt
804: := FA_LOAD_TBL_PKG.deprn_table(pos).deprn_limit_amount;
805: a_tbl(a_index).percent_salvage_val
806: := FA_LOAD_TBL_PKG.deprn_table(pos).percent_salvage_value;
807:
808: -- Convert values using conversion_table, which caches
802: := FA_LOAD_TBL_PKG.deprn_table(pos).allow_deprn_limit;
803: a_tbl(a_index).deprn_limit_amt
804: := FA_LOAD_TBL_PKG.deprn_table(pos).deprn_limit_amount;
805: a_tbl(a_index).percent_salvage_val
806: := FA_LOAD_TBL_PKG.deprn_table(pos).percent_salvage_value;
807:
808: -- Convert values using conversion_table, which caches
809: -- converted values of certain fields for the new rules.
810: -- (The corresponding converted record is stored in the