1 PACKAGE FA_WHATIF_DEPRN2_PKG AUTHID CURRENT_USER as
2 /* $Header: FAWDPR2S.pls 120.5 2009/03/26 23:45:11 bridgway ship $ */
3
4
5
6 -- function whatif_deprn
7
8 -- Perform whatif deprn on a set of assets given hypothetical properties.
9 -- Commit results to FA_WHATIF_DEP.
10 -- This should be only called from within a concurrent request.
11 --
12 -- X_exp_amt is either 'E' or 'A'.
13 -- If 'E', then for each asset:
14 -- Run whatif_deprn_asset in 'E' mode.
15 -- Run whatif_deprn_asset in 'N' mode.
16 -- Run whatif_insert_itf, and commit.
17 -- If 'A', then for each asset:
18 -- Run whatif_deprn_asset in 'A' mode.
19 -- Run whatif_deprn_asset in 'N' mode.
20 -- Run whatif_insert_itf, and commit.
21
22
23 function whatif_deprn (
24 X_assets in out nocopy fa_std_types.number_tbl_type,
25 X_num_assets in number,
26 X_method in varchar2,
27 X_life in number,
28 X_adjusted_rate in number,
29 X_prorate_conv in varchar2,
30 X_salvage_pct in number,
31 X_exp_amt in out nocopy varchar2,
32 X_book in varchar2,
33 X_start_per in varchar2,
34 X_num_per in number,
35 X_request_id in number,
36 X_user_id in number,
37 X_hypo in varchar2,
38 X_dpis in date,
39 X_cost in number,
40 X_deprn_rsv in number,
41 X_cat_id in number,
42 X_bonus_rule in varchar2,
43 x_return_status out nocopy number,
44 X_fullresv_flg in varchar2, -- ERnos 6612615 what-if start
45 X_extnd_deprn_flg in varchar2,
46 X_first_period in varchar2) --ERnos 6612615 what-if end
47 return boolean;
48
49
50 -- function whatif_get_assets
51
52 -- Get set of assets satisfying criteria:
53 -- Book
54 -- Asset number range
55 -- DPIS range
56 -- Description
57 -- Category
58 -- If any of these are null, this means it's not used as a criterion.
59 -- Also, assets not included if:
60 -- 1. non-expense adjustment already occurred for this asset.
61 -- 2. there exist transactions dated after sysdate.
62 -- 3. non-production <=> production method changes aren't legal
63 -- (X_method param is needed to check this)
64 -- Put asset_id's satisfying criteria AND don't have conditions 1,2,3
65 -- in X_good_assets array.
66
67 function whatif_get_assets (
68 X_book in varchar2,
69 X_begin_asset in varchar2,
70 X_end_asset in varchar2,
71 X_begin_dpis in date,
72 X_end_dpis in date,
73 X_description in varchar2,
74 X_category_id in number,
75 X_mode in varchar2,
76 X_rsv_flag in varchar2,
77 X_good_assets out nocopy fa_std_types.number_tbl_type,
78 X_num_good out nocopy number,
79 X_start_range in number,
80 X_end_range in number,
81 x_return_status out nocopy number)
82 return boolean;
83
84
85 END FA_WHATIF_DEPRN2_PKG;