137: -- do the Amortization Depreciation revaluation for the asset
138: -- -------------------------------------------------------------------
139: FUNCTION Do_Amort_Deprn_Reval(p_asset_iac_adj_info igi_iac_types.iac_adj_hist_asset_info,
140: p_asset_iac_dist_info igi_iac_types.iac_adj_dist_info_tab,
141: p_adj_hist igi_iac_adjustments_history%ROWTYPE,
142: p_event_id number) --R12 uptake
143: RETURN BOOLEAN
144: IS
145: -- cursors
238: WHERE book_type_code = cp_book_type_code
239: AND asset_id = cp_asset_id
240: AND period_counter = cp_period_counter;
241:
242: CURSOR c_get_period_first_adj(cp_asset_id igi_iac_adjustments_history.asset_id%TYPE,
243: cp_book_type_code igi_iac_adjustments_history.book_type_code%TYPE,
244: cp_period_counter igi_iac_adjustments_history.period_counter%TYPE)
245: IS
246: SELECT ah.pre_adjusted_cost, ah.pre_salvage_value
239: AND asset_id = cp_asset_id
240: AND period_counter = cp_period_counter;
241:
242: CURSOR c_get_period_first_adj(cp_asset_id igi_iac_adjustments_history.asset_id%TYPE,
243: cp_book_type_code igi_iac_adjustments_history.book_type_code%TYPE,
244: cp_period_counter igi_iac_adjustments_history.period_counter%TYPE)
245: IS
246: SELECT ah.pre_adjusted_cost, ah.pre_salvage_value
247: FROM igi_iac_adjustments_history ah
240: AND period_counter = cp_period_counter;
241:
242: CURSOR c_get_period_first_adj(cp_asset_id igi_iac_adjustments_history.asset_id%TYPE,
243: cp_book_type_code igi_iac_adjustments_history.book_type_code%TYPE,
244: cp_period_counter igi_iac_adjustments_history.period_counter%TYPE)
245: IS
246: SELECT ah.pre_adjusted_cost, ah.pre_salvage_value
247: FROM igi_iac_adjustments_history ah
248: WHERE ah.book_type_code = cp_book_type_code
243: cp_book_type_code igi_iac_adjustments_history.book_type_code%TYPE,
244: cp_period_counter igi_iac_adjustments_history.period_counter%TYPE)
245: IS
246: SELECT ah.pre_adjusted_cost, ah.pre_salvage_value
247: FROM igi_iac_adjustments_history ah
248: WHERE ah.book_type_code = cp_book_type_code
249: AND ah.asset_id = cp_asset_id
250: AND ah.transaction_header_id_in = (SELECT min(iah.transaction_header_id_in)
251: FROM igi_iac_adjustments_history iah
247: FROM igi_iac_adjustments_history ah
248: WHERE ah.book_type_code = cp_book_type_code
249: AND ah.asset_id = cp_asset_id
250: AND ah.transaction_header_id_in = (SELECT min(iah.transaction_header_id_in)
251: FROM igi_iac_adjustments_history iah
252: WHERE iah.book_type_code = cp_book_type_code
253: AND iah.asset_id = cp_asset_id
254: AND iah.period_counter = cp_period_counter);
255: