5 last_divide_evenly_flag boolean;
1 PACKAGE FA_CDE_PKG AUTHID CURRENT_USER as
2 /* $Header: FACDES.pls 120.20.12020000.3 2012/11/07 10:38:51 deemitta ship $ */
3
4 last_book varchar2(16);
6 last_pro_cal varchar2(16);
7 p_pers_per_yr number;
8
9 /*
10 --------------------------------------------------------------------------
11 *
12 * Name
13 * faxgpr
14 *
15 * Description
16 *
17 * Parameters
18 * X_dpr_ptr - Depreciation structure
19 * X_period - Structure containing period information
20 * X_projecting_flag - Flag indicating depreciation projection
21 * X_prodn - production (OUT)
22 *
23 * Modifies
24 * X_prodn
25 * fa_periodic_production.used_flag
26 *
27 * Returns
28 * True on successful retrieval. Otherwise False.
29 *
30 * Notes
31 *
32 * History
33 *
34 *--------------------------------------------------------------------------
35 */
36 FUNCTION faxgpr (X_dpr_ptr fa_std_types.dpr_struct,
37 X_period fa_std_types.fa_cp_struct,
38 X_projecting_flag BOOLEAN, X_prodn in out nocopy NUMBER, p_log_level_rec IN FA_API_TYPES.log_level_rec_type default null)
39 return boolean;
40
41
42 /*
43 --------------------------------------------------------------------------
44 *
45 * Name
46 * faxgtr
47 *
48 * Description
49 * Get table-based depreciation rate
50 *
51 * Parameters
52 * X_method_id - Depreciation method id
53 * X_year_of_life - Year
54 * X_prorate_period - Prorate period
55 * X_rate out - Depreciation rate (OUT)
56 *
57 * Modifies
58 * X_rate
59 *
60 * Returns
61 * True on successful retrieval. Otherwise False.
62 *
63 * Notes
64 *
65 * History
66 *
67 *--------------------------------------------------------------------------
68 */
69 FUNCTION faxgtr (X_method_id number, X_year_of_life number,
70 X_prorate_period number, X_rate out nocopy number, p_log_level_rec IN FA_API_TYPES.log_level_rec_type)
71 return boolean;
72
73
74
75 /*
76 --------------------------------------------------------------------------
80 *
77 *
78 * Name
79 * faxcfyf
81 * Description
82 * Returns the fraction of depreciation to be taken during
83 * the first fiscal year of an asset's life and the year
84 * retired for use under Straight-Line and Flat-Rate methods
85 *
86 * Parameters
87 * X_dpr - Depreciation structure (IN OUT)
88 * X_d_pers_per_yr - # of periods/year in deprn calendar
89 * X_rate_source_rule - Rate source rule
90 * X_y_begin - Year to begin calculation
91 * X_y_dead - Year in which the asset will be fully reserved
92 * X_y_ret - Year in which the asset will be retired
93 * X_dp_begin - Depreciation start period
94 * X_dpp_begin - Depreciation start prorate period
95 * X_dp_d_ptr - Deprn Period in which the asset will be
96 * fully reserved (IN OUT)
97 * X_dp_r_ptr - Deprn Period in which the asset will be
98 * fully retired
99 * X_dpp_r_ptr - Deprn prorate period in which the asset will be
100 * fully retired
101 * X_pp_begin - Prorate period to begin calculation
102 * X_pp_dead - Prorate period in which asset will be fully
103 * reserved
104 * X_pp_ret - Prorate period in which asset will be fully
105 * retired
106 * X_by_factor - Factor used to calc first year deprn without
107 * considering deprn ceilings (IN OUT)
108 * X_bp_frac - fraction of annual deprn to be allocated to
109 * first period of life (IN OUT)
110 * X_dp_frac - fraction of annual deprn to be allocated to
111 * last period of life (IN OUT)
112 * X_rp_frac - fraction of annual deprn to be allocated to
113 * retirement period (IN OUT)
114 * X_by_frac - fraction of annual deprn to be allocated to
115 * first year (IN OUT)
116 * X_dy_frac - fraction of annual deprn to be allocated to
117 * last year of life (IN OUT)
118 * X_ry_frac - fraction of annual deprn to be allocated to
119 * retirement year (IN OUT)
120 *
121 * Modifies
122 * X_dpr
123 * X_dp_d_ptr
124 * X_by_factor
125 * X_bp_frac
126 * X_dp_frac
127 * X_rp_frac
128 * X_by_frac
129 * X_dy_frac
130 * X_ry_frac
131 * Returns
132 * True on successful retrieval. Otherwise False.
133 *
134 * Notes
135 *
136 * History
137 *
138 *--------------------------------------------------------------------------
139 */
140 --Bug8620551
141 --Added additional parameter x_prd_flag to check for retirement in period of addition
142 FUNCTION faxcfyf (X_dpr in out nocopy fa_std_types.dpr_struct, X_d_pers_per_yr number,
143 X_rate_source_rule varchar2, X_y_begin number,
144 X_y_dead number, X_y_ret number, X_dp_begin number,
145 X_dpp_begin number, X_dp_d_ptr in out nocopy number,
146 X_dp_r_ptr number, X_dpp_r_ptr number, X_pp_begin number,
147 X_pp_dead number, X_pp_ret number, X_by_factor in out nocopy number,
148 X_bp_frac in out nocopy number, X_dp_frac in out number,
149 X_rp_frac in out nocopy number, X_by_frac in out number,
150 X_by_frac_num IN OUT NOCOPY NUMBER, X_by_frac_den IN OUT NOCOPY NUMBER,
151 X_dy_frac in out nocopy number, X_ry_frac in out number,
152 x_prd_flag varchar2,
153 p_log_level_rec IN FA_API_TYPES.log_level_rec_type)
154 return boolean;
155
156 /*
157 --------------------------------------------------------------------------
158 *
159 * Name
160 * faxcde
161 *
162 * Description
163 * Calculate Depreciation Expense
164 *
165 * Parameters
166 * dpr_in - Depreciation "in" structure
167 * dpr_arr - (IN OUT)
168 * dpr_out - Depreciation "out" structure (OUT)
169 * fmode
170 *
171 * Modifies
172 * dpr_out
173 * dpr_arr
174 *
175 * Returns
176 * True on successful retrieval. Otherwise False.
177 *
178 * Notes
179 * Variable names have been changed from the C version
180 * See table in body code that maps new names to old
181 * names.
182 *
183 * History
184 *
185 *--------------------------------------------------------------------------
186 */
187 FUNCTION faxcde ( dpr_in in out nocopy fa_std_types.dpr_struct
188 , dpr_arr in out nocopy fa_std_types.dpr_arr_type
189 , dpr_out in out nocopy fa_std_types.dpr_out_struct
190 , fmode number
191 , p_ind binary_integer default 0, p_log_level_rec IN FA_API_TYPES.log_level_rec_type default null)
192 return boolean;
193
194 /*
195 --------------------------------------------------------------------------
196 *
197 * Name
198 * faprds
199 *
200 * Description
201 * Print depreciation IN structure
202 *
203 * Parameters
204 * X_dpr - Depreciation "in" structure
205 *
206 * Modifies
207 *
208 * Returns
209 * True on successful completion. Otherwise False.
210 *
214 *
211 * Notes
212 *
213 * History
215 *--------------------------------------------------------------------------
216 */
217 FUNCTION faprds (X_dpr fa_std_types.dpr_struct, p_log_level_rec IN FA_API_TYPES.log_level_rec_type)
218 return boolean;
219
220 /*
221 --------------------------------------------------------------------------
222 *
223 * Name
224 * faprdos
225 *
226 * Description
227 * Print depreciation OUT structure
228 *
229 * Parameters
230 * X_dpr - Depreciation "out" structure
231 *
232 * Modifies
233 *
234 * Returns
235 * True on successful completion. Otherwise False.
236 *
237 * Notes
238 *
239 * History
240 *
241 *--------------------------------------------------------------------------
242 */
243 FUNCTION faprdos (X_dpr fa_std_types.dpr_out_struct, p_log_level_rec IN FA_API_TYPES.log_level_rec_type)
244 return boolean;
245
246 procedure faxgfr (X_Book_Type_Code IN VARCHAR2,
247 X_Asset_Id IN NUMBER,
248 X_Short_Fiscal_Year_Flag IN VARCHAR2,
249 X_Conversion_Date IN DATE := NULL,
250 X_Prorate_Date IN DATE := NULL,
251 X_Orig_Deprn_Start_Date IN DATE := NULL,
252 C_Prorate_Date IN VARCHAR2 := NULL,
253 C_Conversion_Date IN VARCHAR2 := NULL,
254 C_Orig_Deprn_Start_Date IN VARCHAR2 := NULL,
255 X_Method_Code IN VARCHAR2,
256 X_Life_In_Months IN INTEGER,
257 X_Fiscal_Year IN NUMBER,
258 X_Current_Period IN NUMBER,
259
260 -- Bug:5930979:Japan Tax Reform Project
261 X_calling_interface IN VARCHAR2 DEFAULT NULL,
262 X_new_cost IN NUMBER DEFAULT NULL,
263 X_adjusted_cost IN NUMBER DEFAULT NULL,
264
265 X_Rate OUT NOCOPY NUMBER,
266 X_Method_Type OUT NOCOPY NUMBER,
267 X_Success OUT NOCOPY INTEGER, p_log_level_rec IN FA_API_TYPES.log_level_rec_type default null);
268
269 FUNCTION faxgrl(
270 X_Asset_Id IN NUMBER,
271 X_Book_Type_Code IN VARCHAR2,
272 X_Short_Fiscal_Year_Flag IN VARCHAR2,
273 X_Prorate_Date IN DATE,
274 X_Conversion_Date IN DATE,
275 X_Orig_Deprn_Start_Date IN DATE,
276 X_Fiscal_Year IN NUMBER,
277 X_Life_In_Months IN NUMBER,
278 X_Method_Code IN VARCHAR2,
279 X_Current_Period IN NUMBER,
280 X_rem_life1 OUT NOCOPY NUMBER,
281 X_rem_life2 OUT NOCOPY NUMBER, p_log_level_rec IN FA_API_TYPES.log_level_rec_type)
282 return boolean;
283
284 /*
285 --------------------------------------------------------------------------
286 *
287 * Name
288 * fadgpoar()
289 *
290 * Description
291 * Get the Profile Option of Annual Rounding
292 * Parameters
293 *
294 * Modifies
295 *
296 * Returns
297 * returns integer. (1-always round 0-round with restrictions)
298 *
299 * Notes
300 *
301 * History
302 * Mar 1, 2001 astakaha created
303 *--------------------------------------------------------------------------
304 */
305 FUNCTION fadgpoar
306 return integer;
307
308 /*
309 --------------------------------------------------------------------------
310 *
311 * Name
312 * faodda()
313 *
314 * Description
315 * Override the Default Depreciation Amounts
316 * Parameters
317 *
318 * Modifies
319 *
320 * Returns
321 * True on successful completion. Otherwise False.
322 *
323 * Notes
324 * p_recoverable_cost and p_salvage_value are used
325 * only when used_by_adjustment is true.
326 *
327 * History
328 * SEP 1, 2001 astakaha created
329 * OCT 2, 2002 ynatsui added parameters
330 * DEC 5, 2002 ynatsui added ytd parameters
331 * DEC 19, 2002 ynatsui added p_update_override_status
332 *--------------------------------------------------------------------------
333 */
334 FUNCTION faodda(Book IN VARCHAR2,
335 Deprn_Override_Used_By IN VARCHAR2, -- Bug11886090 replaced with Used_By_Adjustment IN BOOLEAN,
336 Asset_ID IN NUMBER,
337 Bonus_Rule IN VARCHAR2,
338 Fyctr IN NUMBER,
339 Perd_Ctr IN NUMBER,
340 Prod_Rate_Src_Flag IN BOOLEAN,
341 Deprn_Projecting_Flag IN BOOLEAN,
342 p_ytd_deprn IN NUMBER,
343 p_bonus_ytd_deprn IN NUMBER,
344 Override_Depr_Amt OUT NOCOPY NUMBER,
345 Override_Bonus_Amt OUT NOCOPY NUMBER,
346 Deprn_Override_Flag OUT NOCOPY VARCHAR2,
347 Return_Code OUT NOCOPY NUMBER,
348 p_mrc_sob_type_code IN VARCHAR2 DEFAULT NULL,
349 p_set_of_books_id IN NUMBER,
350 p_recoverable_cost IN NUMBER DEFAULT NULL,
351 p_salvage_value IN NUMBER DEFAULT NULL,
352 p_update_override_status IN BOOLEAN DEFAULT TRUE,
353 p_over_depreciate_option IN NUMBER DEFAULT NULL, --Bug 8487934
354 p_asset_type IN VARCHAR2 DEFAULT NULL, --Bug 8487934
355 p_deprn_rsv IN NUMBER DEFAULT NULL, --Bug 8487934
356 p_cur_adj_cost IN NUMBER DEFAULT NULL, --Bug 8487934
357 p_override_period_counter IN NUMBER DEFAULT NULL -- Bug 8211842
358 , p_log_level_rec IN FA_API_TYPES.log_level_rec_type) return boolean;
359
360 ------------------------------------------------------------------
361 -- Function:
362 -- FATRKM
363 --
364 -- Description:
365 -- Main entry to call Tracking feature
366 -- This function will call TRACK_MEMBER function
367 --
368 ------------------------------------------------------------------
369 FUNCTION fatrkm(p_dpr in fa_std_types.dpr_struct,
370 p_perd_deprn_exp in number,
371 p_perd_bonus_deprn_amount in number,
372 p_perd_ctr in number,
373 p_fyctr in number,
374 p_loop_end_year in number default null,
375 p_loop_end_period in number default null,
376 p_exclude_salvage_value_flag in boolean,
377 p_deprn_basis_rule in varchar2,
378 p_deprn_override_flag in out nocopy varchar2,
379 p_subtract_ytd_flag in varchar2,
380 p_life_complete_flag in boolean,
381 p_fully_reserved_flag in boolean,
382 p_year_deprn_exp in number,
383 p_recoverable_cost in number,
384 p_adj_rec_cost in number,
385 p_current_deprn_reserve in number,
386 p_nbv_threshold in number,
387 p_nbv_thresh_amount in number,
388 p_rec_cost_abs_value in number,
389 p_mode in varchar2 default NULL,
390 x_new_perd_exp out nocopy number,
391 x_new_perd_bonus_deprn_amount out nocopy number,
392 x_life_complete_flag out nocopy boolean,
393 x_fully_reserved_flag out nocopy boolean
394 , p_log_level_rec IN FA_API_TYPES.log_level_rec_type) return boolean;
395
396 procedure faxgpolr (X_Book_Type_Code IN VARCHAR2,
397 X_Asset_Id IN NUMBER,
398 X_Polish_Rule IN NUMBER,
399 X_Deprn_Factor IN NUMBER,
400 X_Alternate_Deprn_Factor IN NUMBER,
401 X_Polish_Adj_Calc_Basis_Flag
402 IN VARCHAR2,
403 X_Recoverable_Cost IN NUMBER,
404 X_Fiscal_Year IN NUMBER,
405 X_Current_Period IN NUMBER,
406 X_Periods_Per_Year IN NUMBER,
407 X_Year_Retired IN BOOLEAN,
408 X_Projecting_Flag IN BOOLEAN,
409 X_MRC_Sob_Type_Code IN VARCHAR2,
410 X_set_of_books_id IN NUMBER,
411 X_Rate IN OUT NOCOPY NUMBER,
412 X_Depreciate_Flag IN OUT NOCOPY BOOLEAN,
413 X_Current_Adjusted_Cost IN OUT NOCOPY NUMBER,
414 X_Adjusted_Recoverable_Cost
415 IN OUT NOCOPY NUMBER,
416 X_Success OUT NOCOPY INTEGER,
417 X_Calling_Fn IN VARCHAR2, p_log_level_rec IN FA_API_TYPES.log_level_rec_type);
418
419 END FA_CDE_PKG;