DBA Data[Home] [Help]

PACKAGE: APPS.OZF_ACTBUDGETRULES_PVT

Source


1 PACKAGE OZF_ACTBUDGETRULES_PVT AS
2    /*$Header: ozfvarus.pls 120.1 2005/08/05 14:21:31 appldev ship $*/
3 
4    -- Start of Comments
5    --
6    -- NAME
7    --   OZF_ACTBUDGETRULES_PVT
8    --
9    -- PURPOSE
10    --   This package is a Private API for managing Activity Budget information for OZF_ACTBUDGETS_PVT.
11    --
12    --   Procedures:
13    --     check_cat_activity_match
14    --     check_transfer_amount_exists
15    --     check_market_elig_match
16    --     check_prod_elig_match
17    --     source_has_enough_money
18    --     budget_has_enough_money
19    --     check_approval_required
20    --     check_approval_required
21    --     can_plan_more_budget
22    --     create_note
23 
24    -- NOTES
25    -- Created by feliu  04/16/2002
26    --         separated from ozf_actbudgets_pvt.
27 
28 /*****************************************************************************************/
29 -- Start of Comments
30 --
31 -- NAME
32 --   check_cat_activity_match
33 --
34 -- PURPOSE
35 --   This procedure is to validate budget record
36 --
37 -- NOTES
38 -- HISTORY
39 -- 04/10/2001 mpande   CAtegory and activity  should match for the budget and the campaign or schedule
40 /*****************************************************************************************/
41    PROCEDURE check_cat_activity_match (
42       p_used_by_id         IN		NUMBER
43      ,p_used_by_type       IN		VARCHAR2
44      ,p_budget_source_id   IN		NUMBER
45      ,x_return_status      OUT NOCOPY	VARCHAR2
46    );
47 
48 
49 /*****************************************************************************************/
50 -- Start of Comments
51 --
52 -- NAME
53 --   check_transfer_amount_exists
54 -- PARAMETERS
55 --   p_object_id           IN       NUMBER -- in case of transfer it is the budget_source_id
56 --  ,p_object_type         IN       VARCHAR2
57 --  ,p_budget_source_id     IN       NUMBER
58 --  ,p_budget_source_type   IN       VARCHAR2
59 
60    -- PURPOSE
61    --   This procedure is to validate budget record
62    --
63    -- NOTES
64    -- HISTORY
65    -- 04/10/2001 mpande   Cannot tranfer to a budget if he does not have it from that particular budget
66    -- 08/05/2005 feliu    modified for R12.
67 /*****************************************************************************************/
68    PROCEDURE check_transfer_amount_exists (
69       p_object_id            IN		NUMBER
70      ,p_object_type          IN		VARCHAR2
71      ,p_budget_source_id     IN		NUMBER
72      ,p_budget_source_type   IN		VARCHAR2
73      ,p_transfer_amt         IN		NUMBER
74      ,p_transfer_type        IN		VARCHAR2
75      ,x_return_status        OUT NOCOPY VARCHAR2
76    ) ;
77 
78 /*****************************************************************************************/
79 -- Start of Comments
80 --
81 -- NAME
82 --   check_market_elig_match
83 --
84 -- PURPOSE
85 --   This procedure is to validate budget record
86 --
87 -- NOTES
88 -- HISTORY
89 -- 04/10/2001 mpande   MArket Eligibility  should match for the budget and the campaign or schedule or offer
90 -- 8/7/2002 mpande commeted
91 /*****************************************************************************************
92    PROCEDURE check_market_elig_match (
93       p_used_by_id         IN       NUMBER
94      ,p_used_by_type       IN       VARCHAR2
95      ,p_budget_source_id   IN       NUMBER
96      ,x_return_status      OUT      VARCHAR2
97    ) ;
98 
99 /*****************************************************************************************/
100 -- Start of Comments
101 --
102 -- NAME
103 --   check_product_elig_match
104 --
105 -- PURPOSE
106 --   This procedure is to validate budget record
107 --
108 -- NOTES
109 -- HISTORY
110 -- 04/10/2001 mpande   Product Eiligibility should match for the budget and the campaign or schedule
111 -- 8/7/2002 mpande commeted
112 /*****************************************************************************************
113    PROCEDURE check_prod_elig_match (
114       p_used_by_id         IN       NUMBER
115      ,p_used_by_type       IN       VARCHAR2
116      ,p_budget_source_id   IN       NUMBER
117      ,x_return_status      OUT      VARCHAR2
118    ) ;
119 /*****************************************************************************************/
120 -- Start of Comments
121 --
122    -- NAME
123    --    source_has_enough_money
124    -- PURPOSE
125    --    Return Y if the budget source has enough
126    --    money to fund the approved amount for a
127    --    budget request; return N, otherwise.
128 /*****************************************************************************************/
129    FUNCTION source_has_enough_money (
130       p_source_type       IN   VARCHAR2
131      ,p_source_id         IN   NUMBER
132      ,p_approved_amount   IN   NUMBER
133    )
134       RETURN VARCHAR2;
135 /*****************************************************************************************/
136 -- Start of Comments
137 --
138    --
139    -- NAME
140    --    budget_has_enough_money
141    -- PURPOSE
142    --    Return Y if the budget source has enough
143    --    money to fund the approved amount for a
144    --    budget request; return N, otherwise.
145    -- HISTORY
146    -- 20-Feb-2001 mpande   Created.
147 /*****************************************************************************************/
148    FUNCTION budget_has_enough_money (
149       p_source_id IN NUMBER
150       , p_approved_amount IN NUMBER
151     )
152       RETURN VARCHAR2;
153 /*****************************************************************************************/
154 -- Start of Comments
155 --
156    --
157    -- NAME
158    --    check_approval_required
159    -- PURPOSE
160    -- API to check budget approval requre or not
161    -- HISTORY
162    -- 04/27/2001 mpande   Created.
163 /*****************************************************************************************/
164    FUNCTION check_approval_required (
165       p_object          IN   VARCHAR2
166      ,p_object_id       IN   NUMBER
167      ,p_source_type     IN   VARCHAR2
168      ,p_source_id       IN   NUMBER
169      ,p_transfer_type   IN   VARCHAR2
170    )
171       RETURN VARCHAR2;
172 /*****************************************************************************************/
173 -- Start of Comments
174 --
175    --
176    -- NAME
177    --    can_plan_more_budget
178    -- PURPOSE
179    --    Return T if the object(CAMP, EVEH) planned amount is greater or less than the total request amount
180    -- HISTORY
181    -- 05/01/2001 mpande   Created.
182 /*****************************************************************************************/
183    FUNCTION can_plan_more_budget (
184       p_object_type      IN   VARCHAR2
185      ,p_object_id        IN   NUMBER
186      ,p_request_amount   IN   NUMBER
187      ,p_act_budget_id    IN   NUMBER
188    )
189       RETURN VARCHAR2;
190 
191 /*****************************************************************************************/
192 -- Start of Comments
193 --
194 -- NAME
195 --    Create Note
196 -- PURPOSE
197 --  Create Note fro justification and comments
198 -- HISTORY
199 -- 02/23/2001  mpande  CREATED
200 /*****************************************************************************************/
201 
202    PROCEDURE create_note (
203       p_activity_type   IN		VARCHAR2
204      ,p_activity_id     IN		NUMBER
205      ,p_note            IN		VARCHAR2
206      ,p_note_type       IN		VARCHAR2
207      ,p_user            IN		NUMBER
208      ,x_msg_count       OUT NOCOPY	NUMBER
209      ,x_msg_data        OUT NOCOPY	VARCHAR2
210      ,x_return_status   OUT NOCOPY	VARCHAR2
211    );
212 
213 
214 END OZF_ACTBUDGETRULES_PVT;