486: */
487:
488: l_jdpis := to_number(to_char(l_old_rules.start_dpis, 'J'));
489:
490: if not fa_cache_pkg.fazccbd
491: (X_book => book_rec.book_type_code,
492: X_cat_id => px_asset_cat_rec_new.category_id,
493: X_jdpis => l_jdpis, p_log_level_rec => p_log_level_rec) then
494: raise call_err;
498: l_new_rules := l_old_rules;
499: else
500: -- now load cached values into the new rules table
501: l_new_rules.book_type_code := book_rec.book_type_code;
502: l_new_rules.start_dpis := fa_cache_pkg.fazccbd_record.start_dpis;
503: l_new_rules.end_dpis := fa_cache_pkg.fazccbd_record.end_dpis;
504: l_new_rules.prorate_conv_code := fa_cache_pkg.fazccbd_record.prorate_convention_code;
505: l_new_rules.deprn_method := fa_cache_pkg.fazccbd_record.deprn_method;
506: l_new_rules.life_in_months := fa_cache_pkg.fazccbd_record.life_in_months;
499: else
500: -- now load cached values into the new rules table
501: l_new_rules.book_type_code := book_rec.book_type_code;
502: l_new_rules.start_dpis := fa_cache_pkg.fazccbd_record.start_dpis;
503: l_new_rules.end_dpis := fa_cache_pkg.fazccbd_record.end_dpis;
504: l_new_rules.prorate_conv_code := fa_cache_pkg.fazccbd_record.prorate_convention_code;
505: l_new_rules.deprn_method := fa_cache_pkg.fazccbd_record.deprn_method;
506: l_new_rules.life_in_months := fa_cache_pkg.fazccbd_record.life_in_months;
507: l_new_rules.basic_rate := fa_cache_pkg.fazccbd_record.basic_rate;
500: -- now load cached values into the new rules table
501: l_new_rules.book_type_code := book_rec.book_type_code;
502: l_new_rules.start_dpis := fa_cache_pkg.fazccbd_record.start_dpis;
503: l_new_rules.end_dpis := fa_cache_pkg.fazccbd_record.end_dpis;
504: l_new_rules.prorate_conv_code := fa_cache_pkg.fazccbd_record.prorate_convention_code;
505: l_new_rules.deprn_method := fa_cache_pkg.fazccbd_record.deprn_method;
506: l_new_rules.life_in_months := fa_cache_pkg.fazccbd_record.life_in_months;
507: l_new_rules.basic_rate := fa_cache_pkg.fazccbd_record.basic_rate;
508: l_new_rules.adjusted_rate := fa_cache_pkg.fazccbd_record.adjusted_rate;
501: l_new_rules.book_type_code := book_rec.book_type_code;
502: l_new_rules.start_dpis := fa_cache_pkg.fazccbd_record.start_dpis;
503: l_new_rules.end_dpis := fa_cache_pkg.fazccbd_record.end_dpis;
504: l_new_rules.prorate_conv_code := fa_cache_pkg.fazccbd_record.prorate_convention_code;
505: l_new_rules.deprn_method := fa_cache_pkg.fazccbd_record.deprn_method;
506: l_new_rules.life_in_months := fa_cache_pkg.fazccbd_record.life_in_months;
507: l_new_rules.basic_rate := fa_cache_pkg.fazccbd_record.basic_rate;
508: l_new_rules.adjusted_rate := fa_cache_pkg.fazccbd_record.adjusted_rate;
509: l_new_rules.production_capacity := fa_cache_pkg.fazccbd_record.production_capacity;
502: l_new_rules.start_dpis := fa_cache_pkg.fazccbd_record.start_dpis;
503: l_new_rules.end_dpis := fa_cache_pkg.fazccbd_record.end_dpis;
504: l_new_rules.prorate_conv_code := fa_cache_pkg.fazccbd_record.prorate_convention_code;
505: l_new_rules.deprn_method := fa_cache_pkg.fazccbd_record.deprn_method;
506: l_new_rules.life_in_months := fa_cache_pkg.fazccbd_record.life_in_months;
507: l_new_rules.basic_rate := fa_cache_pkg.fazccbd_record.basic_rate;
508: l_new_rules.adjusted_rate := fa_cache_pkg.fazccbd_record.adjusted_rate;
509: l_new_rules.production_capacity := fa_cache_pkg.fazccbd_record.production_capacity;
510: l_new_rules.unit_of_measure := fa_cache_pkg.fazccbd_record.unit_of_measure;
503: l_new_rules.end_dpis := fa_cache_pkg.fazccbd_record.end_dpis;
504: l_new_rules.prorate_conv_code := fa_cache_pkg.fazccbd_record.prorate_convention_code;
505: l_new_rules.deprn_method := fa_cache_pkg.fazccbd_record.deprn_method;
506: l_new_rules.life_in_months := fa_cache_pkg.fazccbd_record.life_in_months;
507: l_new_rules.basic_rate := fa_cache_pkg.fazccbd_record.basic_rate;
508: l_new_rules.adjusted_rate := fa_cache_pkg.fazccbd_record.adjusted_rate;
509: l_new_rules.production_capacity := fa_cache_pkg.fazccbd_record.production_capacity;
510: l_new_rules.unit_of_measure := fa_cache_pkg.fazccbd_record.unit_of_measure;
511: if (px_asset_type_rec.asset_type <> 'GROUP') then
504: l_new_rules.prorate_conv_code := fa_cache_pkg.fazccbd_record.prorate_convention_code;
505: l_new_rules.deprn_method := fa_cache_pkg.fazccbd_record.deprn_method;
506: l_new_rules.life_in_months := fa_cache_pkg.fazccbd_record.life_in_months;
507: l_new_rules.basic_rate := fa_cache_pkg.fazccbd_record.basic_rate;
508: l_new_rules.adjusted_rate := fa_cache_pkg.fazccbd_record.adjusted_rate;
509: l_new_rules.production_capacity := fa_cache_pkg.fazccbd_record.production_capacity;
510: l_new_rules.unit_of_measure := fa_cache_pkg.fazccbd_record.unit_of_measure;
511: if (px_asset_type_rec.asset_type <> 'GROUP') then
512: l_new_rules.bonus_rule := fa_cache_pkg.fazccbd_record.bonus_rule;
505: l_new_rules.deprn_method := fa_cache_pkg.fazccbd_record.deprn_method;
506: l_new_rules.life_in_months := fa_cache_pkg.fazccbd_record.life_in_months;
507: l_new_rules.basic_rate := fa_cache_pkg.fazccbd_record.basic_rate;
508: l_new_rules.adjusted_rate := fa_cache_pkg.fazccbd_record.adjusted_rate;
509: l_new_rules.production_capacity := fa_cache_pkg.fazccbd_record.production_capacity;
510: l_new_rules.unit_of_measure := fa_cache_pkg.fazccbd_record.unit_of_measure;
511: if (px_asset_type_rec.asset_type <> 'GROUP') then
512: l_new_rules.bonus_rule := fa_cache_pkg.fazccbd_record.bonus_rule;
513: end if;
506: l_new_rules.life_in_months := fa_cache_pkg.fazccbd_record.life_in_months;
507: l_new_rules.basic_rate := fa_cache_pkg.fazccbd_record.basic_rate;
508: l_new_rules.adjusted_rate := fa_cache_pkg.fazccbd_record.adjusted_rate;
509: l_new_rules.production_capacity := fa_cache_pkg.fazccbd_record.production_capacity;
510: l_new_rules.unit_of_measure := fa_cache_pkg.fazccbd_record.unit_of_measure;
511: if (px_asset_type_rec.asset_type <> 'GROUP') then
512: l_new_rules.bonus_rule := fa_cache_pkg.fazccbd_record.bonus_rule;
513: end if;
514: l_new_rules.itc_amount := NULL;
508: l_new_rules.adjusted_rate := fa_cache_pkg.fazccbd_record.adjusted_rate;
509: l_new_rules.production_capacity := fa_cache_pkg.fazccbd_record.production_capacity;
510: l_new_rules.unit_of_measure := fa_cache_pkg.fazccbd_record.unit_of_measure;
511: if (px_asset_type_rec.asset_type <> 'GROUP') then
512: l_new_rules.bonus_rule := fa_cache_pkg.fazccbd_record.bonus_rule;
513: end if;
514: l_new_rules.itc_amount := NULL;
515: l_new_rules.ceiling_name := fa_cache_pkg.fazccbd_record.ceiling_name;
516: l_new_rules.depreciate_flag := fa_cache_pkg.fazccbd_record.depreciate_flag;
511: if (px_asset_type_rec.asset_type <> 'GROUP') then
512: l_new_rules.bonus_rule := fa_cache_pkg.fazccbd_record.bonus_rule;
513: end if;
514: l_new_rules.itc_amount := NULL;
515: l_new_rules.ceiling_name := fa_cache_pkg.fazccbd_record.ceiling_name;
516: l_new_rules.depreciate_flag := fa_cache_pkg.fazccbd_record.depreciate_flag;
517: l_new_rules.allow_deprn_limit := fa_cache_pkg.fazccbd_record.allowed_deprn_limit;
518: l_new_rules.deprn_limit_amount := fa_cache_pkg.fazccbd_record.special_deprn_limit_amount;
519: l_new_rules.percent_salvage_value := fa_cache_pkg.fazccbd_record.percent_salvage_value;
512: l_new_rules.bonus_rule := fa_cache_pkg.fazccbd_record.bonus_rule;
513: end if;
514: l_new_rules.itc_amount := NULL;
515: l_new_rules.ceiling_name := fa_cache_pkg.fazccbd_record.ceiling_name;
516: l_new_rules.depreciate_flag := fa_cache_pkg.fazccbd_record.depreciate_flag;
517: l_new_rules.allow_deprn_limit := fa_cache_pkg.fazccbd_record.allowed_deprn_limit;
518: l_new_rules.deprn_limit_amount := fa_cache_pkg.fazccbd_record.special_deprn_limit_amount;
519: l_new_rules.percent_salvage_value := fa_cache_pkg.fazccbd_record.percent_salvage_value;
520:
513: end if;
514: l_new_rules.itc_amount := NULL;
515: l_new_rules.ceiling_name := fa_cache_pkg.fazccbd_record.ceiling_name;
516: l_new_rules.depreciate_flag := fa_cache_pkg.fazccbd_record.depreciate_flag;
517: l_new_rules.allow_deprn_limit := fa_cache_pkg.fazccbd_record.allowed_deprn_limit;
518: l_new_rules.deprn_limit_amount := fa_cache_pkg.fazccbd_record.special_deprn_limit_amount;
519: l_new_rules.percent_salvage_value := fa_cache_pkg.fazccbd_record.percent_salvage_value;
520:
521: end if;
514: l_new_rules.itc_amount := NULL;
515: l_new_rules.ceiling_name := fa_cache_pkg.fazccbd_record.ceiling_name;
516: l_new_rules.depreciate_flag := fa_cache_pkg.fazccbd_record.depreciate_flag;
517: l_new_rules.allow_deprn_limit := fa_cache_pkg.fazccbd_record.allowed_deprn_limit;
518: l_new_rules.deprn_limit_amount := fa_cache_pkg.fazccbd_record.special_deprn_limit_amount;
519: l_new_rules.percent_salvage_value := fa_cache_pkg.fazccbd_record.percent_salvage_value;
520:
521: end if;
522:
515: l_new_rules.ceiling_name := fa_cache_pkg.fazccbd_record.ceiling_name;
516: l_new_rules.depreciate_flag := fa_cache_pkg.fazccbd_record.depreciate_flag;
517: l_new_rules.allow_deprn_limit := fa_cache_pkg.fazccbd_record.allowed_deprn_limit;
518: l_new_rules.deprn_limit_amount := fa_cache_pkg.fazccbd_record.special_deprn_limit_amount;
519: l_new_rules.percent_salvage_value := fa_cache_pkg.fazccbd_record.percent_salvage_value;
520:
521: end if;
522:
523: -- dbms_output.put_line('See if any rule change is needed');