DBA Data[Home] [Help]

PACKAGE: APPS.AR_REVENUEADJUST_PUB

Source


4  * Revenue Adjustment APIs allow users to recognize event-based revenue
1 PACKAGE AR_RevenueAdjust_PUB AUTHID CURRENT_USER AS
2 /*$Header: ARXPRADS.pls 120.6 2006/06/29 17:34:03 mraymond ship $*/
3 /*#
5  * such as unearning revenue, earning revenue, transferring sales
6  * credits between salesreps, and adding non-revenue sales credits.
7  * Users can defer revenue recognition and earn the revenue at a later
8  * date using the API. Throughout the process, the API uses
9  * AutoAccounting to determine the accounts to be debited/credited with * each operation.
10  * @rep:scope public
11  * @rep:metalink 236938.1 See OracleMetaLink note 236938.1
12  * @rep:product AR
13  * @rep:lifecycle active
14  * @rep:displayname Revenue Adjustment API
15  * @rep:category BUSINESS_ENTITY AR_REVENUE
16  */
17 
18 -----------------------------------------------------------------------
19 --	API name 	: Unearn_Revenue
20 --	Type		: Public
21 --	Function	: Transfers a specified amount of revenue from
22 --                        earned to unearned revenue account
23 --	Pre-reqs	: Sufficient earned revenue must exist.
24 --	Parameters	:
25 --	IN		: p_api_version        	  NUMBER       Required
26 --		 	  p_init_msg_list         VARCHAR2     Optional
27 --				Default = FND_API.G_FALSE
28 --			  p_commit                VARCHAR2     Optional
29 --				Default = FND_API.G_FALSE
30 --                        p_rev_adj_rec           Rev_Adj_Rec_Type  Required
31 --	OUT NOCOPY		: x_return_status         VARCHAR2(1)
32 --                        x_msg_count             NUMBER
33 --                        x_msg_data              VARCHAR2(2000)
34 --                        x_adjustment_id         NUMBER
35 --                        x_adjustment_number     VARCHAR2
36 --				.
37 --				.
38 --	Version	: Current version	2.0
39 --				Initial version created 31-MAY-2000
40 --			  Initial version 	1.0
41 --
42 --	Notes		: AutoAccounting used for both debits and credits
43 --
44 
45 -----------------------------------------------------------------------
46  /*#
47  * Use this procedure to transfer a specified amount of revenue from
48  * earned to unearned revenue account.
49  * @rep:scope public
50  * @rep:lifecycle active
51  * @rep:displayname Transfer Earned Revenue to Unearned Revenue
52  */
53 
54 
55   PROCEDURE Unearn_Revenue
56   (   p_api_version           IN   NUMBER
57      ,p_init_msg_list         IN   VARCHAR2 DEFAULT FND_API.G_FALSE
58      ,p_commit	              IN   VARCHAR2 DEFAULT FND_API.G_FALSE
59      ,x_return_status         OUT NOCOPY  VARCHAR2
60      ,x_msg_count             OUT NOCOPY  NUMBER
61      ,x_msg_data              OUT NOCOPY  VARCHAR2
62      ,p_rev_adj_rec           IN   AR_Revenue_Adjustment_PVT.Rev_Adj_Rec_Type
63      ,p_org_id                IN  NUMBER DEFAULT NULL
64      ,x_adjustment_id         OUT NOCOPY  NUMBER
65      ,x_adjustment_number     OUT NOCOPY  VARCHAR2);
66 
67 -----------------------------------------------------------------------
68 --	API name 	: Earn_Revenue
69 --	Type		: Public
70 --	Function	: Transfers a specified amount of revenue from
71 --                        unearned to earned revenue account
72 --	Pre-reqs	: Sufficient unearned revenue must exist.
73 --	Parameters	:
74 --	IN		: p_api_version        	  NUMBER       Required
75 --		 	  p_init_msg_list         VARCHAR2     Optional
76 --				Default = FND_API.G_FALSE
77 --			  p_commit                VARCHAR2     Optional
78 --				Default = FND_API.G_FALSE
79 --                        p_rev_adj_rec           Rev_Adj_Rec_Type Required
80 --	OUT NOCOPY		: x_return_status         VARCHAR2(1)
81 --                        x_msg_count             NUMBER
82 --                        x_msg_data              VARCHAR2(2000)
83 --                        x_adjustment_id         NUMBER
84 --                        x_adjustment_number     VARCHAR2
85 --				.
86 --				.
87 --	Version	: Current version	2.0
88 --				Initial version created 31-MAY-2000
89 --			  Initial version 	1.0
90 --
91 --	Notes		: AutoAccounting used for both debits and credits
92 --
93 -----------------------------------------------------------------------
94  /*#
95  * Use this procedure to transfer a specified amount of revenue from
96  * unearned to earned revenue account.
97  * @rep:scope public
98  * @rep:lifecycle active
99  * @rep:displayname Transfer Unearned Revenue to Earned Revenue.
100  */
101 
102 
103  PROCEDURE Earn_Revenue
104   (   p_api_version           IN   NUMBER
105      ,p_init_msg_list         IN   VARCHAR2 DEFAULT FND_API.G_FALSE
106      ,p_commit	              IN   VARCHAR2 DEFAULT FND_API.G_FALSE
107      ,x_return_status         OUT NOCOPY  VARCHAR2
108      ,x_msg_count             OUT NOCOPY  NUMBER
109      ,x_msg_data              OUT NOCOPY  VARCHAR2
110      ,p_rev_adj_rec           IN   AR_Revenue_Adjustment_PVT.Rev_Adj_Rec_Type
111      ,p_org_id                IN  NUMBER DEFAULT NULL
112      ,x_adjustment_id         OUT NOCOPY  NUMBER
113      ,x_adjustment_number     OUT NOCOPY  VARCHAR2);
114 
115 -----------------------------------------------------------------------
116 --	API name 	: Transfer_Sales_Credits
117 --	Type		: Public
118 --	Function	: Transfers revenue and/or non revenue sales credits
119 --                        between the specified salesreps. The associated
120 --                        earned revenue is transferred with revenue sales
121 --                        credits
122 --	Pre-reqs	: Sufficient earned revenue must exist for the salesrep
126 --		 	  p_init_msg_list         VARCHAR2     Optional
123 --                        from whom sales credits are being transferred.
124 --	Parameters	:
125 --	IN		: p_api_version        	  NUMBER       Required
127 --				Default = FND_API.G_FALSE
128 --			  p_commit                VARCHAR2     Optional
129 --				Default = FND_API.G_FALSE
130 --                        p_rev_adj_rec           Rev_Adj_Rec_Type Required
131 --	OUT NOCOPY		: x_return_status         VARCHAR2(1)
132 --                        x_msg_count             NUMBER
133 --                        x_msg_data              VARCHAR2(2000)
134 --                        x_adjustment_id         NUMBER
135 --                        x_adjustment_number     VARCHAR2
136 --
137 --	Version	: Current version	2.0
138 --				Initial version created 31-MAY-2000
139 --			  Initial version 	1.0
140 --
141 --	Notes		: AutoAccounting used for both debits and credits
142 --
143 -----------------------------------------------------------------------
144  /*#
145  * Use this procedure to transfer revenue and/or nonrevenue sales credits
146  * between the specified salesreps. The associated  earned revenue is
147  * transferred with revenue sales credits.
148  * @rep:scope public
149  * @rep:lifecycle active
150  * @rep:displayname Transfer Sales Credits.
151  */
152 
153 
154   PROCEDURE Transfer_Sales_Credits
155   (   p_api_version           IN   NUMBER
156      ,p_init_msg_list         IN   VARCHAR2 DEFAULT FND_API.G_FALSE
157      ,p_commit	              IN   VARCHAR2 DEFAULT FND_API.G_FALSE
158      ,x_return_status         OUT NOCOPY  VARCHAR2
159      ,x_msg_count             OUT NOCOPY  NUMBER
160      ,x_msg_data              OUT NOCOPY  VARCHAR2
161      ,p_rev_adj_rec           IN   AR_Revenue_Adjustment_PVT.Rev_Adj_Rec_Type
162      ,p_org_id                IN  NUMBER DEFAULT NULL
163      ,x_adjustment_id         OUT NOCOPY  NUMBER
164      ,x_adjustment_number     OUT NOCOPY  VARCHAR2);
165 
166 -----------------------------------------------------------------------
167 --	API name 	: Add_Non_Revenue_Sales_Credits
168 --	Type		: Public
169 --	Function	: Adds non revenue sales credits to the specified
170 --                        salesrep subject to any maximum limit of revenue
171 --                        and non revenue salsescredit per salesrep per line
172 --                        as defined in the sales credit percent limit in
173 --                        system options.
174 --	Pre-reqs	: None
175 --
176 --	Parameters	:
177 --	IN		: p_api_version        	  NUMBER       Required
178 --		 	  p_init_msg_list         VARCHAR2     Optional
179 --				Default = FND_API.G_FALSE
180 --			  p_commit                VARCHAR2     Optional
181 --				Default = FND_API.G_FALSE
182 --                        p_rev_adj_rec           Rev_Adj_Rec_Type Required
183 --	OUT NOCOPY		: x_return_status         VARCHAR2(1)
184 --                        x_msg_count             NUMBER
185 --                        x_msg_data              VARCHAR2(2000)
186 --                        x_adjustment_id         NUMBER
187 --                        x_adjustment_number     VARCHAR2
188 --
189 --	Version	: Current version	2.0
190 --				Initial version created 31-MAY-2000
191 --			  Initial version 	1.0
192 --
193 --	Notes		:
194 --
195 
196  /*#
197  * Use this procedure to add non-revenue sales credits for salesrep to a transaction.
198  * @rep:scope public
199  * @rep:lifecycle active
200  * @rep:displayname Add Non-Revenue Sales Credits.
201  */
202 
203  PROCEDURE Add_Non_Revenue_Sales_Credits
204   (   p_api_version           IN   NUMBER
205      ,p_init_msg_list         IN   VARCHAR2 DEFAULT FND_API.G_FALSE
206      ,p_commit	              IN   VARCHAR2 DEFAULT FND_API.G_FALSE
207      ,x_return_status         OUT NOCOPY  VARCHAR2
208      ,x_msg_count             OUT NOCOPY  NUMBER
209      ,x_msg_data              OUT NOCOPY  VARCHAR2
210      ,p_rev_adj_rec           IN   AR_Revenue_Adjustment_PVT.Rev_Adj_Rec_Type
211      ,p_org_id                IN  NUMBER DEFAULT NULL
212      ,x_adjustment_id         OUT NOCOPY  NUMBER
213      ,x_adjustment_number     OUT NOCOPY  VARCHAR2);
214 
215 -----------------------------------------------------------------------
216 --	API name 	: Record_Customer_Acceptance
217 --	Type		: Public
218 --	Function	: Records acceptance of customer_acceptance
219 --                        type contingencies for the specified
220 --                        transaction, line, or contingency.
221 --	Pre-reqs	: None
222 --
223 --	Parameters	:
224 --	IN		: p_api_version        	  NUMBER       Required
225 --		 	  p_init_msg_list         VARCHAR2     Optional
226 --				Default = FND_API.G_FALSE
227 --			  p_commit                VARCHAR2     Optional
228 --				Default = FND_API.G_FALSE
229 --                        p_rev_adj_rec           Rev_Adj_Rec_Type Required
230 --	OUT NOCOPY		: x_return_status         VARCHAR2(1)
231 --                        x_msg_count             NUMBER
232 --                        x_msg_data              VARCHAR2(2000)
233 --
234 --	Version	: Current version	2.0
235 --	          Initial version created 29-JUN-2006
236 --		  Initial version 	2.0
237 --
238 --	Notes		:
239 --
240 
241  /*#
242  * Use this API to record acceptance for customer_acceptance type
243  * contingencies on a transaction or line.
244  * @rep:scope public
245  * @rep:lifecycle active
246  * @rep:displayname Record Customer Acceptance.
247  */
248 
249  PROCEDURE Record_Customer_Acceptance
250   (   p_api_version           IN   NUMBER
251      ,p_init_msg_list         IN   VARCHAR2 DEFAULT FND_API.G_FALSE
252      ,p_commit	              IN   VARCHAR2 DEFAULT FND_API.G_FALSE
253      ,x_return_status         OUT NOCOPY  VARCHAR2
257      ,p_org_id                IN  NUMBER DEFAULT NULL);
254      ,x_msg_count             OUT NOCOPY  NUMBER
255      ,x_msg_data              OUT NOCOPY  VARCHAR2
256      ,p_rev_adj_rec           IN   AR_Revenue_Adjustment_PVT.Rev_Adj_Rec_Type
258 
259 -----------------------------------------------------------------------
260 --	API name 	: Update_Contingency_Expirations
261 --	Type		: Public
262 --	Function	: Allows update of exiration_date on
263 --                        contingencies for a transaction or line.
264 --	Pre-reqs	: None
265 --
266 --	Parameters	:
267 --	IN		: p_api_version        	  NUMBER       Required
268 --		 	  p_init_msg_list         VARCHAR2     Optional
269 --				Default = FND_API.G_FALSE
270 --			  p_commit                VARCHAR2     Optional
271 --				Default = FND_API.G_FALSE
272 --                        p_rev_adj_rec           Rev_Adj_Rec_Type Required
273 --	OUT NOCOPY		: x_return_status         VARCHAR2(1)
274 --                        x_msg_count             NUMBER
275 --                        x_msg_data              VARCHAR2(2000)
276 --
277 --	Version	: Current version	2.0
278 --	          Initial version created 29-JUN-2006
279 --		  Initial version 	2.0
280 --
281 --	Notes		:
282 --
283 
284  /*#
285  * Use this API to update the expiration date or days for
286  * contingencies on a transaction or line.
287  * @rep:scope public
288  * @rep:lifecycle active
289  * @rep:displayname Update Contingency Expirations.
290  */
291 
292  PROCEDURE Update_Contingency_Expirations
293   (   p_api_version           IN   NUMBER
294      ,p_init_msg_list         IN   VARCHAR2 DEFAULT FND_API.G_FALSE
295      ,p_commit	              IN   VARCHAR2 DEFAULT FND_API.G_FALSE
296      ,x_return_status         OUT NOCOPY  VARCHAR2
297      ,x_msg_count             OUT NOCOPY  NUMBER
298      ,x_msg_data              OUT NOCOPY  VARCHAR2
299      ,p_org_id                IN  NUMBER DEFAULT NULL
300      ,p_customer_trx_id       IN  ra_customer_trx.customer_trx_id%type
301      ,p_customer_trx_line_id  IN  ra_customer_trx_lines.customer_trx_line_id%type DEFAULT NULL
302      ,p_contingency_id        IN  ar_line_conts.contingency_id%type DEFAULT NULL
303      ,p_expiration_date       IN  ar_line_conts.expiration_date%type DEFAULT NULL
304      ,p_expiration_days       IN  ar_line_conts.expiration_days%type DEFAULT NULL);
305 END AR_RevenueAdjust_PUB;