512: */
513:
514: l_jdpis := to_number(to_char(l_old_rules.start_dpis, 'J'));
515:
516: if not fa_cache_pkg.fazccbd
517: (X_book => book_rec.book_type_code,
518: X_cat_id => px_asset_cat_rec_new.category_id,
519: X_jdpis => l_jdpis
520: ,p_log_level_rec => p_log_level_rec) then
525: l_new_rules := l_old_rules;
526: else
527: -- now load cached values into the new rules table
528: l_new_rules.book_type_code := book_rec.book_type_code;
529: l_new_rules.start_dpis := fa_cache_pkg.fazccbd_record.start_dpis;
530: l_new_rules.end_dpis := fa_cache_pkg.fazccbd_record.end_dpis;
531: l_new_rules.prorate_conv_code := fa_cache_pkg.fazccbd_record.prorate_convention_code;
532: l_new_rules.deprn_method := fa_cache_pkg.fazccbd_record.deprn_method;
533: l_new_rules.life_in_months := fa_cache_pkg.fazccbd_record.life_in_months;
526: else
527: -- now load cached values into the new rules table
528: l_new_rules.book_type_code := book_rec.book_type_code;
529: l_new_rules.start_dpis := fa_cache_pkg.fazccbd_record.start_dpis;
530: l_new_rules.end_dpis := fa_cache_pkg.fazccbd_record.end_dpis;
531: l_new_rules.prorate_conv_code := fa_cache_pkg.fazccbd_record.prorate_convention_code;
532: l_new_rules.deprn_method := fa_cache_pkg.fazccbd_record.deprn_method;
533: l_new_rules.life_in_months := fa_cache_pkg.fazccbd_record.life_in_months;
534: l_new_rules.basic_rate := fa_cache_pkg.fazccbd_record.basic_rate;
527: -- now load cached values into the new rules table
528: l_new_rules.book_type_code := book_rec.book_type_code;
529: l_new_rules.start_dpis := fa_cache_pkg.fazccbd_record.start_dpis;
530: l_new_rules.end_dpis := fa_cache_pkg.fazccbd_record.end_dpis;
531: l_new_rules.prorate_conv_code := fa_cache_pkg.fazccbd_record.prorate_convention_code;
532: l_new_rules.deprn_method := fa_cache_pkg.fazccbd_record.deprn_method;
533: l_new_rules.life_in_months := fa_cache_pkg.fazccbd_record.life_in_months;
534: l_new_rules.basic_rate := fa_cache_pkg.fazccbd_record.basic_rate;
535: l_new_rules.adjusted_rate := fa_cache_pkg.fazccbd_record.adjusted_rate;
528: l_new_rules.book_type_code := book_rec.book_type_code;
529: l_new_rules.start_dpis := fa_cache_pkg.fazccbd_record.start_dpis;
530: l_new_rules.end_dpis := fa_cache_pkg.fazccbd_record.end_dpis;
531: l_new_rules.prorate_conv_code := fa_cache_pkg.fazccbd_record.prorate_convention_code;
532: l_new_rules.deprn_method := fa_cache_pkg.fazccbd_record.deprn_method;
533: l_new_rules.life_in_months := fa_cache_pkg.fazccbd_record.life_in_months;
534: l_new_rules.basic_rate := fa_cache_pkg.fazccbd_record.basic_rate;
535: l_new_rules.adjusted_rate := fa_cache_pkg.fazccbd_record.adjusted_rate;
536: l_new_rules.production_capacity := fa_cache_pkg.fazccbd_record.production_capacity;
529: l_new_rules.start_dpis := fa_cache_pkg.fazccbd_record.start_dpis;
530: l_new_rules.end_dpis := fa_cache_pkg.fazccbd_record.end_dpis;
531: l_new_rules.prorate_conv_code := fa_cache_pkg.fazccbd_record.prorate_convention_code;
532: l_new_rules.deprn_method := fa_cache_pkg.fazccbd_record.deprn_method;
533: l_new_rules.life_in_months := fa_cache_pkg.fazccbd_record.life_in_months;
534: l_new_rules.basic_rate := fa_cache_pkg.fazccbd_record.basic_rate;
535: l_new_rules.adjusted_rate := fa_cache_pkg.fazccbd_record.adjusted_rate;
536: l_new_rules.production_capacity := fa_cache_pkg.fazccbd_record.production_capacity;
537: l_new_rules.unit_of_measure := fa_cache_pkg.fazccbd_record.unit_of_measure;
530: l_new_rules.end_dpis := fa_cache_pkg.fazccbd_record.end_dpis;
531: l_new_rules.prorate_conv_code := fa_cache_pkg.fazccbd_record.prorate_convention_code;
532: l_new_rules.deprn_method := fa_cache_pkg.fazccbd_record.deprn_method;
533: l_new_rules.life_in_months := fa_cache_pkg.fazccbd_record.life_in_months;
534: l_new_rules.basic_rate := fa_cache_pkg.fazccbd_record.basic_rate;
535: l_new_rules.adjusted_rate := fa_cache_pkg.fazccbd_record.adjusted_rate;
536: l_new_rules.production_capacity := fa_cache_pkg.fazccbd_record.production_capacity;
537: l_new_rules.unit_of_measure := fa_cache_pkg.fazccbd_record.unit_of_measure;
538: l_new_rules.bonus_rule := fa_cache_pkg.fazccbd_record.bonus_rule;
531: l_new_rules.prorate_conv_code := fa_cache_pkg.fazccbd_record.prorate_convention_code;
532: l_new_rules.deprn_method := fa_cache_pkg.fazccbd_record.deprn_method;
533: l_new_rules.life_in_months := fa_cache_pkg.fazccbd_record.life_in_months;
534: l_new_rules.basic_rate := fa_cache_pkg.fazccbd_record.basic_rate;
535: l_new_rules.adjusted_rate := fa_cache_pkg.fazccbd_record.adjusted_rate;
536: l_new_rules.production_capacity := fa_cache_pkg.fazccbd_record.production_capacity;
537: l_new_rules.unit_of_measure := fa_cache_pkg.fazccbd_record.unit_of_measure;
538: l_new_rules.bonus_rule := fa_cache_pkg.fazccbd_record.bonus_rule;
539: l_new_rules.itc_amount := NULL;
532: l_new_rules.deprn_method := fa_cache_pkg.fazccbd_record.deprn_method;
533: l_new_rules.life_in_months := fa_cache_pkg.fazccbd_record.life_in_months;
534: l_new_rules.basic_rate := fa_cache_pkg.fazccbd_record.basic_rate;
535: l_new_rules.adjusted_rate := fa_cache_pkg.fazccbd_record.adjusted_rate;
536: l_new_rules.production_capacity := fa_cache_pkg.fazccbd_record.production_capacity;
537: l_new_rules.unit_of_measure := fa_cache_pkg.fazccbd_record.unit_of_measure;
538: l_new_rules.bonus_rule := fa_cache_pkg.fazccbd_record.bonus_rule;
539: l_new_rules.itc_amount := NULL;
540: l_new_rules.ceiling_name := fa_cache_pkg.fazccbd_record.ceiling_name;
533: l_new_rules.life_in_months := fa_cache_pkg.fazccbd_record.life_in_months;
534: l_new_rules.basic_rate := fa_cache_pkg.fazccbd_record.basic_rate;
535: l_new_rules.adjusted_rate := fa_cache_pkg.fazccbd_record.adjusted_rate;
536: l_new_rules.production_capacity := fa_cache_pkg.fazccbd_record.production_capacity;
537: l_new_rules.unit_of_measure := fa_cache_pkg.fazccbd_record.unit_of_measure;
538: l_new_rules.bonus_rule := fa_cache_pkg.fazccbd_record.bonus_rule;
539: l_new_rules.itc_amount := NULL;
540: l_new_rules.ceiling_name := fa_cache_pkg.fazccbd_record.ceiling_name;
541: l_new_rules.depreciate_flag := fa_cache_pkg.fazccbd_record.depreciate_flag;
534: l_new_rules.basic_rate := fa_cache_pkg.fazccbd_record.basic_rate;
535: l_new_rules.adjusted_rate := fa_cache_pkg.fazccbd_record.adjusted_rate;
536: l_new_rules.production_capacity := fa_cache_pkg.fazccbd_record.production_capacity;
537: l_new_rules.unit_of_measure := fa_cache_pkg.fazccbd_record.unit_of_measure;
538: l_new_rules.bonus_rule := fa_cache_pkg.fazccbd_record.bonus_rule;
539: l_new_rules.itc_amount := NULL;
540: l_new_rules.ceiling_name := fa_cache_pkg.fazccbd_record.ceiling_name;
541: l_new_rules.depreciate_flag := fa_cache_pkg.fazccbd_record.depreciate_flag;
542: l_new_rules.allow_deprn_limit := fa_cache_pkg.fazccbd_record.allowed_deprn_limit;
536: l_new_rules.production_capacity := fa_cache_pkg.fazccbd_record.production_capacity;
537: l_new_rules.unit_of_measure := fa_cache_pkg.fazccbd_record.unit_of_measure;
538: l_new_rules.bonus_rule := fa_cache_pkg.fazccbd_record.bonus_rule;
539: l_new_rules.itc_amount := NULL;
540: l_new_rules.ceiling_name := fa_cache_pkg.fazccbd_record.ceiling_name;
541: l_new_rules.depreciate_flag := fa_cache_pkg.fazccbd_record.depreciate_flag;
542: l_new_rules.allow_deprn_limit := fa_cache_pkg.fazccbd_record.allowed_deprn_limit;
543: l_new_rules.deprn_limit_amount := fa_cache_pkg.fazccbd_record.special_deprn_limit_amount;
544: l_new_rules.percent_salvage_value := fa_cache_pkg.fazccbd_record.percent_salvage_value;
537: l_new_rules.unit_of_measure := fa_cache_pkg.fazccbd_record.unit_of_measure;
538: l_new_rules.bonus_rule := fa_cache_pkg.fazccbd_record.bonus_rule;
539: l_new_rules.itc_amount := NULL;
540: l_new_rules.ceiling_name := fa_cache_pkg.fazccbd_record.ceiling_name;
541: l_new_rules.depreciate_flag := fa_cache_pkg.fazccbd_record.depreciate_flag;
542: l_new_rules.allow_deprn_limit := fa_cache_pkg.fazccbd_record.allowed_deprn_limit;
543: l_new_rules.deprn_limit_amount := fa_cache_pkg.fazccbd_record.special_deprn_limit_amount;
544: l_new_rules.percent_salvage_value := fa_cache_pkg.fazccbd_record.percent_salvage_value;
545: end if;
538: l_new_rules.bonus_rule := fa_cache_pkg.fazccbd_record.bonus_rule;
539: l_new_rules.itc_amount := NULL;
540: l_new_rules.ceiling_name := fa_cache_pkg.fazccbd_record.ceiling_name;
541: l_new_rules.depreciate_flag := fa_cache_pkg.fazccbd_record.depreciate_flag;
542: l_new_rules.allow_deprn_limit := fa_cache_pkg.fazccbd_record.allowed_deprn_limit;
543: l_new_rules.deprn_limit_amount := fa_cache_pkg.fazccbd_record.special_deprn_limit_amount;
544: l_new_rules.percent_salvage_value := fa_cache_pkg.fazccbd_record.percent_salvage_value;
545: end if;
546:
539: l_new_rules.itc_amount := NULL;
540: l_new_rules.ceiling_name := fa_cache_pkg.fazccbd_record.ceiling_name;
541: l_new_rules.depreciate_flag := fa_cache_pkg.fazccbd_record.depreciate_flag;
542: l_new_rules.allow_deprn_limit := fa_cache_pkg.fazccbd_record.allowed_deprn_limit;
543: l_new_rules.deprn_limit_amount := fa_cache_pkg.fazccbd_record.special_deprn_limit_amount;
544: l_new_rules.percent_salvage_value := fa_cache_pkg.fazccbd_record.percent_salvage_value;
545: end if;
546:
547: -- dbms_output.put_line('See if any rule change is needed');
540: l_new_rules.ceiling_name := fa_cache_pkg.fazccbd_record.ceiling_name;
541: l_new_rules.depreciate_flag := fa_cache_pkg.fazccbd_record.depreciate_flag;
542: l_new_rules.allow_deprn_limit := fa_cache_pkg.fazccbd_record.allowed_deprn_limit;
543: l_new_rules.deprn_limit_amount := fa_cache_pkg.fazccbd_record.special_deprn_limit_amount;
544: l_new_rules.percent_salvage_value := fa_cache_pkg.fazccbd_record.percent_salvage_value;
545: end if;
546:
547: -- dbms_output.put_line('See if any rule change is needed');
548: -- See if any rule change is needed.