DBA Data[Home] [Help]

PACKAGE: APPS.OZF_FUNDRULES_PVT

Source


1 PACKAGE OZF_FundRules_PVT AUTHID CURRENT_USER AS
2 /* $Header: ozfvfrus.pls 120.1 2005/08/17 17:29:32 appldev ship $*/
3 
4 -----------------------------------------------------------------------
5 -- PROCEDURE
6 --    check_fund_calendar
7 --
8 -- PURPOSE
9 --    Check fund_calendar, start_period_name, end_period_name.
10 -- HISTORY
11 --    01/15/2001  Mumu Pande  Create.
12 --
13 -- NOTES
14 --    1. The start date of the start period should be no later than
15 --       the end date of the end period.
16 -----------------------------------------------------------------------
17 PROCEDURE check_fund_calendar(
18    p_fund_calendar       IN  VARCHAR2,
19    p_start_period_name   IN  VARCHAR2,
20    p_end_period_name     IN  VARCHAR2,
21    p_start_date          IN  DATE,
22    p_end_date            IN  DATE,
23    p_fund_type           IN  VARCHAR2,
24    x_return_status       OUT NOCOPY VARCHAR2
25 );
26 
27 
28 ---------------------------------------------------------------------
29 -- PROCEDURE
30 --    check_fund_dates_vs_parent
31 --
32 -- PURPOSE
33 --    Check fund dates against its parent.
34 --
35 -- HISTORY
36 --    01/15/2001  Mumu Pande  Create.
37 
38 ---------------------------------------------------------------------
39 PROCEDURE check_fund_dates_vs_parent(
40    p_parent_id      IN  NUMBER,
41    p_start_date_active IN DATE,
42    p_end_date_active IN DATE,
43    x_return_status  OUT NOCOPY VARCHAR2
44 );
45 
46 ---------------------------------------------------------------------
47 -- PROCEDURE
48 --    check_fund_amount_vs_parent
49 --
50 -- PURPOSE
51 --    Check fund dates against its parent.
52 --
53 -- HISTORY
54 --    01/15/2001  Mumu Pande  Create.
55 --    09/04/2001  Mumu Pande  Updated for different currency child
56 ---------------------------------------------------------------------
57 PROCEDURE check_fund_amount_vs_parent(
58    p_parent_id      IN  NUMBER,
59    p_child_curr     IN VARCHAR2,
60    p_original_budget IN NUMBER,
61    x_return_status  OUT NOCOPY VARCHAR2
62 );
63 
64 ---------------------------------------------------------------------
65 -- PROCEDURE
66 --    check_fund_type_vs_parent
67 --
68 -- PURPOSE
69 --    Check fund type against its parent.
70 --
71 -- HISTORY
72 --    01/15/2001  Mumu Pande  Create.
73 
74 ---------------------------------------------------------------------
75 PROCEDURE check_fund_type_vs_parent(
76    p_parent_id      IN  NUMBER,
77    p_fund_type       IN VARCHAR2,
78    x_return_status  OUT NOCOPY VARCHAR2
79 );
80 ---------------------------------------------------------------------
81 -- PROCEDURE
82 --    check_fund_curr_vs_parent
83 --
84 -- PURPOSE
85 --    Check fund curr against its parent.
86 --
87 -- HISTORY
88 --    01/15/2001  Mumu Pande  Create.
89 
90 ---------------------------------------------------------------------
91 PROCEDURE check_fund_curr_vs_parent(
92    p_parent_id      IN  NUMBER,
93    p_fund_curr       IN VARCHAR2,
94    x_return_status  OUT NOCOPY VARCHAR2
95 );
96 
97 ---------------------------------------------------------------------
98 -- PROCEDURE
99 --    check_fund_status_vs_parent
100 --
101 -- PURPOSE
102 --    Check fund status(active,draft) against its parent.
103 --
104 -- HISTORY
105 --    01/15/2001  Mumu Pande  Create.
106 ---------------------------------------------------------------------
107 PROCEDURE check_fund_status_vs_parent(
108    p_parent_id      IN  NUMBER,
109    p_status_code    IN VARCHAR2,
110    x_return_status  OUT NOCOPY VARCHAR2
111 );
112 
113 ---------------------------------------------------------------------
114 -- PROCEDURE
115 --    check_fund_dates_vs_child
116 --
117 -- HISTORY
118 --    01/15/2001  Mumu Pande  Create.
119 
120 ---------------------------------------------------------------------
121 PROCEDURE check_fund_dates_vs_child(
122    p_fund_id        IN  NUMBER,
123    p_start_date     IN  DATE,
124    p_end_date       IN  DATE,
125    x_return_status  OUT NOCOPY VARCHAR2
126 );
127 ---------------------------------------------------------------------
128 -- PROCEDURE
129 --    check_fund_types_vs_child
130 --
131 
132 -- HISTORY
133 --    01/15/2001  Mumu Pande  Create.
134 
135 ---------------------------------------------------------------------
136 PROCEDURE check_fund_type_vs_child(
137    p_fund_id        IN  NUMBER,
138    p_fund_type      IN  VARCHAR2,
139    x_return_status  OUT NOCOPY VARCHAR2
140 );
141 ---------------------------------------------------------------------
142 -- PROCEDURE
143 --    check_fund_curr_vs_child
144 --
145 
146 -- HISTORY
147 --    01/15/2001  Mumu Pande  Create.
148 
149 ---------------------------------------------------------------------
150 PROCEDURE check_fund_curr_vs_child(
151    p_fund_id        IN  NUMBER,
152    p_fund_curr      IN  VARCHAR2,
153    x_return_status  OUT NOCOPY VARCHAR2
154 );
155 
156 
157 ---------------------------------------------------------------------
158 -- PROCEDURE
159 --    check_fund_amount_vs_child
160 --
161 -- HISTORY
162 --    01/15/2001  Mumu Pande  Create.
163 --    09/04/2001  Mumu Pande  Updated for different currency child
164 ---------------------------------------------------------------------
165 PROCEDURE check_fund_amount_vs_child(
166    p_fund_id        IN  NUMBER,
167    p_fund_org_amount    IN  NUMBER,
168    p_fund_tran_in_amount    IN  NUMBER,
169    p_fund_tran_out_amount    IN  NUMBER,
170    p_parent_currency        IN       VARCHAR2,
171    x_return_status  OUT NOCOPY VARCHAR2
172 );
173 
174 ---------------------------------------------------------------------
175 -- PROCEDURE
176 --    check_product_elig_exists
177 --
178 -- PURPOSE
179 --    check product eligibility exists for the fund
180 
181 -- HISTORY
182 --    01/15/2001  Mumu Pande  Create.
183 
184 -- NOTES
185 ---------------------------------------------------------------------
186 PROCEDURE check_product_elig_exists(
187       p_fund_id      IN  NUMBER,
188       x_return_status  OUT NOCOPY VARCHAR2
189 );
190 
191 
192 -----------------------------------------------------------------------
193 -- PROCEDURE
194 --    udpate_fund_status
195 --
196 -- PURPOSE
197 -- This API does all the status related validation of funds  during updation
198 -- This is a private API to be used by funds module only
199 --DESCRIPTION
200 --    Update fund status
201 --p_fund_rec            IN  ozf_funds_pvt.fund_rec_type,
202 --x_new_status_code       OUT NOCOPY VARCHAR2, -- new status code of the fund
203 --x_new_status_id       OUT NOCOPY NUMBER,-- new user status id of the fund
204 --x_return_status           OUT NOCOPY VARCHAR2,-- standard API parameter
205 --x_msg_count         OUT NOCOPY NUMBER, -- standard API parameter
206 --x_msg_data         OUT NOCOPY VARCHAR2, -- standard API parameter
207 --p_api_version         IN  NUMBER  -- standard API parameter
208 -- HISTORY
209 --    01/15/2001  Mumu Pande  Create.
210 
211 -----------------------------------------------------------------------
212 PROCEDURE Update_Fund_Status
213       (p_fund_rec            IN  ozf_funds_pvt.fund_rec_type,
214        x_new_status_code       OUT NOCOPY VARCHAR2,
215        x_new_status_id       OUT NOCOPY NUMBER,
216        x_submit_budget_approval  OUT NOCOPY VARCHAR2,
217        x_submit_child_approval   OUT NOCOPY VARCHAR2,
218        x_return_status           OUT NOCOPY VARCHAR2,
219        x_msg_count         OUT NOCOPY NUMBER,
220        x_msg_data         OUT NOCOPY VARCHAR2,
221        p_api_version         IN  NUMBER
222       );
223 ---------------------------------------------------------------------
224 -- PROCEDURE
225 --    process_approval
226 --
227 -- PURPOSE
228 --    This API is called when  fund is approved from a workflow.
229 --    This API does the following transactions for a Active fund.
230 --    1) Record for  holdback amount
231 --    2) Handle  transactions for a  Accrual type fund
232 
233 -- HISTORY
234 --    01/15/2001  Mumu Pande  Create.
235 
236 -- NOTES
237 ---------------------------------------------------------------------
238 
239 PROCEDURE process_approval(
240    p_fund_rec        IN       ozf_funds_pvt.fund_rec_type
241   ,p_mode            IN       VARCHAR2
242   ,p_old_fund_status IN       VARCHAR2 := NULL
243   ,x_return_status   OUT NOCOPY      VARCHAR2
244   ,x_msg_count       OUT NOCOPY      NUMBER
245   ,x_msg_data        OUT NOCOPY      VARCHAR2
246   ,p_api_version     IN       NUMBER);
247 ---------------------------------------------------------------------
248 -- PROCEDURE
249 --    process_accrual
250 --
251 -- PURPOSE
252 --    This API is called for Acrrual to either Customer or Sales depending upon fund type.
253 --    This API does the following transactions for a Active fund.
254 --    1) If Accrual basis if 'Customer' then it accrues to customer.
255 --    2) If Accrual basis if 'Sales' then it accrues to sales.
256 -- HISTORY
257 --    10/08/2002 Srinivasa Rudravarapu Create.
258 -- NOTES
259 ---------------------------------------------------------------------
260 PROCEDURE process_accrual(
261    p_fund_rec          IN       ozf_funds_pvt.fund_rec_type,
262    p_api_version       IN       NUMBER,
263    p_mode              IN       VARCHAR2,
264    p_old_fund_status   IN       VARCHAR2 := NULL,
265    x_return_status     OUT NOCOPY      VARCHAR2,
266    x_msg_count         OUT NOCOPY      NUMBER,
267    x_msg_data          OUT NOCOPY      VARCHAR2) ;
268 END OZF_FundRules_Pvt;