62:
63:
64: -- to get fa_books previous entry before current adjustment
65: CURSOR c_get_fa_book_info(p_book_type_code
66: fa_transaction_headers.book_type_code%TYPE,
67: p_asset_id fa_transaction_headers.asset_id%TYPE,
68: p_transaction_header_id
69: fa_transaction_headers.transaction_header_id%TYPE ) IS
70: SELECT *
63:
64: -- to get fa_books previous entry before current adjustment
65: CURSOR c_get_fa_book_info(p_book_type_code
66: fa_transaction_headers.book_type_code%TYPE,
67: p_asset_id fa_transaction_headers.asset_id%TYPE,
68: p_transaction_header_id
69: fa_transaction_headers.transaction_header_id%TYPE ) IS
70: SELECT *
71: FROM fa_books
65: CURSOR c_get_fa_book_info(p_book_type_code
66: fa_transaction_headers.book_type_code%TYPE,
67: p_asset_id fa_transaction_headers.asset_id%TYPE,
68: p_transaction_header_id
69: fa_transaction_headers.transaction_header_id%TYPE ) IS
70: SELECT *
71: FROM fa_books
72: WHERE book_type_code = p_book_type_code
73: AND asset_id = p_asset_id
74: AND transaction_header_id_out = p_transaction_header_id;
75:
76:
77: -- to verify adjustments for an asset in the same period
78: CURSOR c_get_asset_adj (p_book_type_code fa_transaction_headers.book_type_code%TYPE,
79: p_asset_id fa_transaction_headers.asset_id%TYPE,
80: p_period_counter number) IS
81: SELECT *
82: FROM igi_iac_adjustments_history
75:
76:
77: -- to verify adjustments for an asset in the same period
78: CURSOR c_get_asset_adj (p_book_type_code fa_transaction_headers.book_type_code%TYPE,
79: p_asset_id fa_transaction_headers.asset_id%TYPE,
80: p_period_counter number) IS
81: SELECT *
82: FROM igi_iac_adjustments_history
83: WHERE book_type_code = p_book_type_code
871: ,p_asset_adj_hist_info igi_iac_adjustments_history%ROWTYPE)
872:
873: RETURN boolean IS
874:
875: CURSOR c_get_fa_book_info(p_book_type_code fa_transaction_headers.book_type_code%TYPE,
876: p_asset_id fa_transaction_headers.asset_id%TYPE
877: ) IS
878: SELECT *
879: FROM fa_books
872:
873: RETURN boolean IS
874:
875: CURSOR c_get_fa_book_info(p_book_type_code fa_transaction_headers.book_type_code%TYPE,
876: p_asset_id fa_transaction_headers.asset_id%TYPE
877: ) IS
878: SELECT *
879: FROM fa_books
880: WHERE book_type_code = p_book_type_code
880: WHERE book_type_code = p_book_type_code
881: AND asset_id = p_asset_id
882: AND transaction_header_id_out IS NULL;
883:
884: CURSOR c_get_fa_headers_info(p_book_type_code fa_transaction_headers.book_type_code%TYPE,
885: p_asset_id fa_transaction_headers.asset_id%TYPE,
886: p_transaction_header_id fa_transaction_headers.transaction_header_id%TYPE
887: ) IS
888: SELECT *
881: AND asset_id = p_asset_id
882: AND transaction_header_id_out IS NULL;
883:
884: CURSOR c_get_fa_headers_info(p_book_type_code fa_transaction_headers.book_type_code%TYPE,
885: p_asset_id fa_transaction_headers.asset_id%TYPE,
886: p_transaction_header_id fa_transaction_headers.transaction_header_id%TYPE
887: ) IS
888: SELECT *
889: FROM fa_transaction_headers
882: AND transaction_header_id_out IS NULL;
883:
884: CURSOR c_get_fa_headers_info(p_book_type_code fa_transaction_headers.book_type_code%TYPE,
885: p_asset_id fa_transaction_headers.asset_id%TYPE,
886: p_transaction_header_id fa_transaction_headers.transaction_header_id%TYPE
887: ) IS
888: SELECT *
889: FROM fa_transaction_headers
890: WHERE book_type_code = p_book_type_code
885: p_asset_id fa_transaction_headers.asset_id%TYPE,
886: p_transaction_header_id fa_transaction_headers.transaction_header_id%TYPE
887: ) IS
888: SELECT *
889: FROM fa_transaction_headers
890: WHERE book_type_code = p_book_type_code
891: AND asset_id = p_asset_id
892: AND transaction_header_id = p_transaction_header_id;
893:
890: WHERE book_type_code = p_book_type_code
891: AND asset_id = p_asset_id
892: AND transaction_header_id = p_transaction_header_id;
893:
894: CURSOR c_get_fa_deprn_summary(p_book_type_code fa_transaction_headers.book_type_code%TYPE,
895: p_asset_id fa_transaction_headers.asset_id%TYPE,
896: p_period_counter fa_deprn_summary.period_counter%TYPE
897: ) IS
898: SELECT *
891: AND asset_id = p_asset_id
892: AND transaction_header_id = p_transaction_header_id;
893:
894: CURSOR c_get_fa_deprn_summary(p_book_type_code fa_transaction_headers.book_type_code%TYPE,
895: p_asset_id fa_transaction_headers.asset_id%TYPE,
896: p_period_counter fa_deprn_summary.period_counter%TYPE
897: ) IS
898: SELECT *
899: FROM fa_deprn_summary
900: WHERE book_type_code = p_book_type_code
901: AND asset_id = p_asset_id
902: AND period_counter = p_period_counter;
903:
904: CURSOR c_get_sum_fa_deprn(p_book_type_code fa_transaction_headers.book_type_code%TYPE,
905: p_asset_id fa_transaction_headers.asset_id%TYPE,
906: p_period_counter fa_deprn_summary.period_counter%TYPE
907: ) IS
908: SELECT SUM(nvl(deprn_amount,0)) depreciation_amount,
901: AND asset_id = p_asset_id
902: AND period_counter = p_period_counter;
903:
904: CURSOR c_get_sum_fa_deprn(p_book_type_code fa_transaction_headers.book_type_code%TYPE,
905: p_asset_id fa_transaction_headers.asset_id%TYPE,
906: p_period_counter fa_deprn_summary.period_counter%TYPE
907: ) IS
908: SELECT SUM(nvl(deprn_amount,0)) depreciation_amount,
909: SUM(nvl(deprn_adjustment_amount,0)) depreciation_adjustment_amount,