1 PACKAGE BODY gms_client_extn_budget AS
2 /* $Header: gmsbcecb.pls 120.1 2005/07/26 14:21:10 appldev ship $ */
3
4 PROCEDURE Calc_Raw_Cost(x_budget_version_id in number,
5 x_project_id in number,
6 x_task_id in number,
7 x_resource_list_member_id in number,
8 x_resource_list_id in number,
9 x_resource_id in number,
10 x_start_date in date,
11 x_end_date in date,
12 x_period_name in varchar2,
13 x_quantity in number,
14 x_raw_cost in out NOCOPY number,
15 x_pm_product_code in varchar2,
16 x_error_code out NOCOPY number,
17 x_error_message out NOCOPY varchar2)
18
19 IS
20
21 -- Define your local variables here
22
23 BEGIN
24 ---------------------------------------------------------------------
25 -- IMPORTANT: This procedure is for future enhancements and it is
26 -- NOT supported at this point in time.
27 ---------------------------------------------------------------------
28 -- Initialize the output parameters
29 x_error_code := 0;
30 -- Enter your business rules to calculate raw cost here
31
32 EXCEPTION
33 WHEN OTHERS THEN
34 -- Add your exception handler here.
35 -- To raise an ORACLE error, assign SQLCODE to x_error_code
36 null;
37 END Calc_Raw_Cost;
38
39 -- =================================================
40
41 PROCEDURE Calc_Burdened_Cost(x_budget_version_id in number,
42 x_project_id in number,
43 x_task_id in number,
44 x_resource_list_member_id in number,
45 x_resource_list_id in number,
46 x_resource_id in number,
47 x_start_date in date,
48 x_end_date in date,
49 x_period_name in varchar2,
50 x_quantity in number,
51 x_raw_cost in number,
52 x_burdened_cost in out NOCOPY number,
53 X_pm_product_code in varchar2,
54 x_error_code out NOCOPY number,
55 x_error_message out NOCOPY varchar2)
56 IS
57
58 -- Define your local variables here
59
60 BEGIN
61
62 ---------------------------------------------------------------------
63 -- IMPORTANT: This procedure is for future enhancements and it is
64 -- NOT supported at this point in time.
65 ---------------------------------------------------------------------
66 -- Initialize the output parameters
67
68 x_error_code := 0;
69
70 -- Add your business rules to calculate burdened cost here
71
72 EXCEPTION
73 WHEN OTHERS THEN
74 -- Add your exception handler here.
75 -- To raise an ORACLE error, assign SQLCODE to x_error_code
76 null;
77 END Calc_Burdened_Cost;
78
79 -- =================================================
80
81 --Name: Verify_Budget_Rules
82 --Type: Procedure
83 --Description:
84 --
85 --
86 --Called subprograms: none.
87 --
88 --
89 --
90 --History:
91 --
92 -- NOTES:
93 --
94 -- IN
95 -- p_workflow_started_by_id - identifies the user that initiated the workflow
96 -- p_event - indicates whether procedure called for
97 -- either a 'SUBMIT' or 'BASELINE'
98 -- event.
99 --
100 -- OUT NOCOPY
101 -- p_warnings_only_flag - RETURN 'Y' if ALL triggered edits are warnings. Otherwise,
102 -- if there is at least one hard error, then RETURN 'N'.
103 -- p_err_msg_count - Count of warning and error messages.
104 --
105 -- By using the commented code in the body of this procedure, you may
106 -- add error and warning messages to the message stack.
107 --
108 -- Moreover, error/warning processing in the calling procedure
109 -- will only occur if OUT NOCOPY p_err_msg_count
110 -- parameter is greater than zero.
111 --
112
113 PROCEDURE Verify_Budget_Rules
114 (p_draft_version_id IN NUMBER
115 , p_mark_as_original IN VARCHAR2
116 , p_event IN VARCHAR2
117 , p_project_id IN NUMBER
118 , p_budget_type_code IN VARCHAR2
119 , p_resource_list_id IN NUMBER
120 , p_project_type_class_code IN VARCHAR2
121 , p_created_by IN NUMBER
122 , p_calling_module IN VARCHAR2
123 , p_warnings_only_flag OUT NOCOPY VARCHAR2
124 , p_err_msg_count OUT NOCOPY NUMBER
125 , p_error_code OUT NOCOPY NUMBER
126 , p_error_message OUT NOCOPY VARCHAR2
127 )
128
129 IS
130 --Define Your Local Variables Here
131
132
133 BEGIN
134
135 ---------------------------------------------------------------------
136 -- IMPORTANT: This procedure is for future enhancements and it is
137 -- NOT supported at this point in time.
138 ---------------------------------------------------------------------
139
140 -- Initialize OUT-parameters Here
141 p_warnings_only_flag := 'Y';
142 p_err_msg_count := 0;
143 p_error_code := 0;
144 --
145 -- Put The Rules That You Want To Check For Here
146 --
147 -- Make sure to update the OUT NOCOPY variable for the
148 -- message count
149
150 p_err_msg_count := FND_MSG_PUB.Count_Msg;
151
152 EXCEPTION
153 WHEN OTHERS THEN
154 -- Add your exception handler here.
155 -- To raise an ORACLE error, assign SQLCODE to x_error_code
156 NULL;
157 END Verify_Budget_Rules;
158
159 -- =================================================
160 --Name: OVERRIDE_INST_DATE_VALIDATION
161 --Type: Procedure
162 --Purpose: This procedure can be customized at site to achieve the following:
163 -- 1. By default, Award budget validation will not allow budgeting outside of installment dates.
164 -- This procedure can be customized to override this functionality.
165 --
166 -- 2. By default, budget validation checks budget line amount against available funds in the
167 -- order of budget period. This default functionality can be overriden to check the funds availability
168 -- in the ascending order of budget line amounts so that negative amounts are compared first.
169 -- Customizing this procedure to return 'Y' will achieve the above two objectives. This client extension
170 -- is designed to accomodate the override the functionality selectively at award budget level.
171 --
172 --Called subprograms: none.
173 --
174 --History:
175 --
176 -- NOTES:
177 --
178 -- IN
179 -- p_award_id - identifies the award_id whose Budget-Installment validation to override.
180 -- p_project_id - identifies the project_id whose Budget-Installment validation to override.
181 --
182 -- OUT NOCOPY
183 -- p_override_validation - RETURN 'Y' to override validation or 'N' not to override validation
184 --
185 -- =================================================
186
187 PROCEDURE override_inst_date_validation
188 ( p_award_id IN NUMBER,
189 p_project_id IN NUMBER,
190 p_override_validation OUT NOCOPY VARCHAR2)
191 IS
192
193 begin
194
195 p_override_validation := 'N';
196
197 -- Add your business rules to override the Installment-Budget validation here.
198 -- Assigning 'Y' to p_override_validation will override the default budget validations
199 -- described in the purpose section above.
200
201 exception
202 when OTHERS then
203 -- Add your appropriate exception handler here.
204 NULL;
205 end;
206
207 END gms_client_extn_budget;