1 PACKAGE FA_AMORT_PKG AUTHID CURRENT_USER as
2 /* $Header: FAAMRT1S.pls 120.4 2009/04/15 14:19:49 bridgway ship $ */
3
4 /*
5 ---------------------------------------------------------------------
6 *
7 * Name faxiat
8 *
9 *
10 * Description
11 * This function is an entry point for calling FA_ADJUSTMENTS function
12 * This is called from the EXPENSE and AMORTIZE user exits and calls
13 * the INSERT INTO FA_ADJUSTMENTS function 3 times-for adjustment type
14 * COST, COST CLEARING and DEPRECIATION.
15 *
16 * Parameters
17 * X_fin_ptr FA_STD_TYPES.fin_info_struct
18 * X_deprn_exp number
19 * X_bonus_deprn_exp number
20 * X_ann_adj number
21 * X_ccid number,
22 * X_last_update_date date
23 * X_updated_by number
24 * X_update_login number
25 *
26 * Modifies
27 * None. Calls FA_INS_ADJUST_PKG.faxinaj 3 times.
28 * Returns
29 * True on successful retrieval. Otherwise False.
30 *
31 * Notes
32 *
33 * History
34 * 03/06/97 tpershad Created
35 *--------------------------------------------------------------------
36 */
37
38 FUNCTION faxiat (X_fin_ptr FA_STD_TYPES.fin_info_struct,
39 X_deprn_exp number,
40 X_bonus_deprn_exp number,
41 X_ann_adj_amt number,
42 X_ccid number,
43 X_last_update_date date default sysdate,
44 X_last_updated_by number default -1,
45 X_last_update_login number default -1,
46 X_mrc_sob_type_code varchar2, p_log_level_rec IN FA_API_TYPES.log_level_rec_type)
47 return boolean;
48
49 /*
50 ---------------------------------------------------------------------
51 *
52 * Name faxraf
53 *
54 *
55 * Description
56 * This function calculates the new rate adjustment factor and the
57 * new adjusted cost.
58 *
59 * Parameters
60 * X_fin_info_ptr FA_STD_TYPES.fin_info_struct
61 * X_new_raf number
62 * X_adj_cost number
63 * X_adj_capacity number
64 * X_new_reval_amo_basis number
65 * X_new_salvage_value number
66 * X_reval_deprn_rsv_adj number
67 *
68 * Modifies
69 * X_new_raf,X_new_reval_amo_basis,X_new_salvage_value
70 * Returns
71 * True on successful retrieval. Otherwise False.
72 *
73 * Notes
74 *
75 * History
76 * 03/24/97 tpershad Created
77 *--------------------------------------------------------------------
78 */
79
80 FUNCTION faxraf (X_fin_info_ptr in out nocopy FA_STD_TYPES.fin_info_struct,
81 X_new_raf in out nocopy number,
82 X_new_adj_cost in out nocopy number,
83 X_new_adj_capacity in out nocopy number,
84 X_new_reval_amo_basis in out nocopy number,
85 X_new_salvage_value in out nocopy number,
86 X_reval_deprn_rsv_adj in out nocopy number,
87 X_new_formula_factor in out nocopy number,
88 X_bonus_deprn_exp in out nocopy number,
89 X_mrc_sob_type_code in varchar2,
90 X_set_of_books_id in number,
91 p_log_level_rec IN FA_API_TYPES.log_level_rec_type)
92 return boolean;
93
94 /*
95 ---------------------------------------------------------------------
96 *
97 * Name faxama
98 *
99 *
100 * Description
101 * Calls faxraf to calculate the new raf. This is the main
102 * routine for Amortized user exit function.
103 * This function calls faxraf to calculate the new rate adjustment
104 * factor and the new adjusted cost.
105 *
106 * Parameters
107 * X_fin_info_ptr FA_STD_TYPES.fin_info_struct
108 * X_new_raf number
109 * X_adj_cost number
110 * X_adj_capacity number
111 * X_new_reval_amo_basis number
112 * X_new_salvage_value number
113 * X_ccid number
114 * X_ins_adjust_flag boolean - This is to indicate
115 * whether to call faxiat
116 * or not. If called from
117 * whatif deprn then it is
118 * FALSE and we do not insert
119 * rows in fa_adjustments.
120 * X_deprn_exp number - deprn expense inserted into
121 * fa_adjustment
122 *
123 * Modifies
124 * X_new_raf,X_new_reval_amo_basis,X_new_salvage_value
125 * Returns
126 * True on successful retrieval. Otherwise False.
127 *
128 * Notes
129 *
130 * History
131 * 03/24/97 tpershad Created
132 *--------------------------------------------------------------------
133 */
134
135 FUNCTION faxama(X_fin_info_ptr in out nocopy FA_STD_TYPES.fin_info_struct,
136 X_new_raf in out nocopy number,
137 X_new_adj_cost in out nocopy number,
138 X_new_adj_capacity in out nocopy number,
139 X_new_reval_amo_basis in out nocopy number,
140 X_new_salvage_value in out nocopy number,
141 X_new_formula_factor in out nocopy number,
142 X_ccid in number,
143 X_ins_adjust_flag in boolean,
144 X_mrc_sob_type_code in varchar2,
145 X_set_of_books_id in number,
146 X_deprn_exp out nocopy number,
147 X_bonus_deprn_exp out nocopy number,
148 X_last_update_date date default sysdate,
149 X_last_updated_by number default -1,
150 X_last_update_login number default -1, p_log_level_rec IN FA_API_TYPES.log_level_rec_type)
151 return boolean;
152
153 /*
154 ---------------------------------------------------------------------
155 *
156 * Name get_reserve
157 *
158 *
159 * Description
160 * This function is called when user tries to do amoritization
161 * and specified amortization start date is eariler than the
162 * addition for those assets that are added with reserve
163 * or added with prior period dpis.
164 * It will return reserve accumulated for up to the period right before the
165 * amortization period.
166 *
167 * Parameters
168 * X_fin_info_ptr in out fa_std_types.fin_info_struct,
169 * x_add_txn_id in number -- transaction id of addition txn
170 * x_amortize_fy in integer
171 * x_amortize_per_num in integer
172 * x_pers_per_yr in integer
173 * x_deprn_rsv out number -- reserve upto the period prior to amort period
174 * x_bonus_deprn_rsv out number
175 *
176 *
177 * Modifies
178 * X_deprn_rsv, X_bonus_deprn_rsv
179 * Returns
180 * True on successful retrieval. Otherwise False.
181 *
182 * Notes
183 * History
184 * 06/23/00 lson Created
185 *--------------------------------------------------------------------
186 */
187
188
189 FUNCTION get_reserve(X_fin_info_ptr in out nocopy fa_std_types.fin_info_struct,
190 x_add_txn_id in number,
191 x_amortize_fy in integer,
192 x_amortize_per_num in integer,
193 x_pers_per_yr in integer,
194 x_mrc_sob_type_code in varchar2,
195 x_set_of_books_id in number,
196 x_deprn_rsv out nocopy number,
197 x_bonus_deprn_rsv out nocopy number, p_log_level_rec IN FA_API_TYPES.log_level_rec_type)
198 return boolean;
199
200
201 /*
202 ---------------------------------------------------------------------
203 *
204 * Name faxnac
205 *
206 *
207 * Description
208 * Calls faxnac to check if the calculation method of depreciation
209 * is "Strict Calculation Basis". If so, it will either return the
210 * recoverable cost(for cost based methods), or return the NBV as of
211 * the beginning of the fiscal year
212 *
213 * Parameters
214 * X_method_code FA_STD_TYPES.fin_info_struct
215 * X_life FA_STD_TYPES.fin_info_struct
216 * X_rec_cost FA_STD_TYPES.dpr_struct
217 * X_prior_fy_exp FA_STD_TYPES.dprn_out_struct
218 * X_deprn_rsv null
219 * X_ytd_deprn null
220 * X_new_adj_cost new adjusted cost -- in out
221 *
222 * Modifies
223 * X_new_adj_cost
224 * Returns
225 * True on successful retrieval. Otherwise False.
226 *
227 * Notes
228 * History
229 * 05/11/00 astakaha Created
230 *--------------------------------------------------------------------
231 */
232
233 FUNCTION faxnac(X_method_code in varchar2,
234 X_life in number,
235 X_rec_cost in number,
236 X_prior_fy_exp in number,
237 X_deprn_rsv in number,
238 X_ytd_deprn in number,
239 X_adj_cost in out nocopy number, p_log_level_rec IN FA_API_TYPES.log_level_rec_type)
240 return boolean;
241
242 END FA_AMORT_PKG;