1 PACKAGE ARP_DEDUCTION_COVER AS
2 /* $Header: ARXDECVS.pls 120.6 2005/10/30 03:59:33 appldev noship $ */
3
4 /*=======================================================================+
5 | Declare PUBLIC Data Types and Variables
6 +=======================================================================*/
7
8 /*=======================================================================+
9 | Declare PUBLIC Exceptions
10 +=======================================================================*/
11
12 /*========================================================================
13 | PUBLIC PROCEDURE update_amount_in_dispute
14 |
15 | DESCRIPTION
16 | ----------------------------------------
17 | This procedure calls entity handlers to update the amount_in_dispute
18 | on the given transaction's payment schedule and inserts a note
19 | on the transaction
20 |
21 | CALLED FROM PROCEDURES/FUNCTIONS (local to this package body)
22 |
23 | CALLS PROCEDURES/FUNCTIONS (local to this package body)
24 |
25 | PARAMETERS
26 | p_customer_trx_id IN Transaction whose dispute amount is changed
27 | p_claim_number IN Number of claim
28 | p_amount IN Amount of adjustment to dispute amount
29 | p_init_msg_list IN
30 | x_return_status OUT NOCOPY
31 | x_msg_count OUT NOCOPY
32 | x_msg_data OUT NOCOPY
33 |
34 | KNOWN ISSUES |
35 | NOTES
36 |
37 | MODIFICATION HISTORY
38 | Date Author Description of Changes
39 | 12-OCT-2001 jbeckett Created
40 |
41 *=======================================================================*/
42 PROCEDURE update_amount_in_dispute(
43 p_customer_trx_id IN NUMBER,
44 p_claim_number IN VARCHAR2,
45 p_amount IN NUMBER,
46 p_init_msg_list IN VARCHAR2 DEFAULT FND_API.G_FALSE,
47 x_return_status OUT NOCOPY VARCHAR2,
48 x_msg_count OUT NOCOPY NUMBER,
49 x_msg_data OUT NOCOPY VARCHAR2);
50
51 /*========================================================================
52 | PUBLIC PROCEDURE create_receipt_writeoff
53 |
54 | DESCRIPTION
55 | ----------------------------------------
56 | This procedure calls entity handlers to unapply the claim investigation
57 | application associated with the given claim, then to apply the same to
58 | receipt write off activity
59 |
60 | CALLED FROM PROCEDURES/FUNCTIONS (local to this package body)
61 |
62 | CALLS PROCEDURES/FUNCTIONS (local to this package body)
63 |
64 | PARAMETERS
65 | p_claim_id IN ID of claim being written off
66 | p_amount IN Amount to be written off
67 | p_init_msg_list IN API message stack initialize flag
68 | p_new_claim_id IN ID of claim to apply balance to
69 | p_cash_receipt_id IN ID of receipt for which claim originally
70 | created
71 | p_receivables_trx_id IN ID of write off activity
72 | p_ussgl_transaction_code IN Default value for USSGL trx code flexfield
73 | x_return_status OUT NOCOPY
74 | x_msg_count OUT NOCOPY
75 | x_msg_data OUT NOCOPY
76 |
77 | KNOWN ISSUES
78 |
79 | NOTES
80 |
81 | MODIFICATION HISTORY
82 | Date Author Description of Changes
83 | 12-OCT-2001 jbeckett Created
84 | 04-MAR-2003 jbeckett Added secondary_application_reference_id,
85 | application_ref_num and customer reference
86 | Bug 2751910.
87 |
88 *=======================================================================*/
89 PROCEDURE create_receipt_writeoff
90 (p_claim_id IN NUMBER,
91 p_amount IN NUMBER,
92 p_new_claim_id IN NUMBER DEFAULT NULL,
93 p_init_msg_list IN VARCHAR2 DEFAULT FND_API.G_FALSE,
94 p_cash_receipt_id IN NUMBER,
95 p_receivables_trx_id IN NUMBER,
96 p_ussgl_transaction_code IN NUMBER DEFAULT NULL,
97 p_application_ref_num IN
98 ar_receivable_applications.application_ref_num%TYPE DEFAULT NULL,
99 p_secondary_application_ref_id IN
100 ar_receivable_applications.secondary_application_ref_id%TYPE DEFAULT NULL,
101 p_customer_reference IN
102 ar_receivable_applications.customer_reference%TYPE DEFAULT NULL,
103 x_return_status OUT NOCOPY VARCHAR2,
104 x_msg_count OUT NOCOPY NUMBER,
105 x_msg_data OUT NOCOPY VARCHAR2);
106
107 /*========================================================================
108 | PUBLIC PROCEDURE split_claim_reapplication
109 |
110 | DESCRIPTION
111 | ----------------------------------------
112 | This procedure calls entity handlers to unapply the current application
113 | for a given claim ID and to create a claim investigation
114 | application while bypassing the usual validation on existing claims.
115 | Amount and status are not checked, as in the case of a partial
116 | settlement the requirement is to reapply the balance to the original
117 | claim
118 |
119 | CALLED FROM PROCEDURES/FUNCTIONS (local to this package body)
120 |
121 | CALLS PROCEDURES/FUNCTIONS (local to this package body)
122 |
123 | PARAMETERS
124 | p_claim_id IN ID of claim
125 | p_amount IN Amount to be applied
126 | p_init_msg_list IN API message stack initialize flag
127 | p_cash_receipt_id IN ID of receipt for which claim originally
128 | created
129 | p_ussgl_transaction_code IN Default value for USSGL trx code flexfield
130 | x_return_status OUT NOCOPY
131 | x_msg_count OUT NOCOPY
132 | x_msg_data OUT NOCOPY
133 |
134 | KNOWN ISSUES
135 |
136 | NOTES
137 |
138 | MODIFICATION HISTORY
139 | Date Author Description of Changes
140 | 20-MAR-2002 jbeckett Created
141 |
142 *=======================================================================*/
143 PROCEDURE split_claim_reapplication
144 (p_claim_id IN NUMBER,
145 p_customer_trx_id IN NUMBER,
146 p_amount IN NUMBER,
147 p_init_msg_list IN VARCHAR2 DEFAULT FND_API.G_FALSE,
148 p_cash_receipt_id IN NUMBER,
149 p_ussgl_transaction_code IN NUMBER DEFAULT NULL,
150 x_return_status OUT NOCOPY VARCHAR2,
151 x_msg_count OUT NOCOPY NUMBER,
152 x_msg_data OUT NOCOPY VARCHAR2);
153
154 /*========================================================================
155 | PUBLIC FUNCTION receipt_valid
156 |
157 | DESCRIPTION
158 | ----------------------------------------
159 | This function checks if the passed cash receipt ID is valid
160 | It returns boolean TRUE or FALSE accordingly.
161 | Addition receipt information is passed back if valid.
162 |
163 | CALLED FROM PROCEDURES/FUNCTIONS (local to this package body)
164 |
165 | CALLS PROCEDURES/FUNCTIONS (local to this package body)
166 |
167 | PARAMETERS
168 | p_cash_receipt_id IN ID of cash receipt
169 | x_receipt_number OUT NOCOPY
170 | x_receipt_date OUT NOCOPY
171 | x_cr_gl_date OUT NOCOPY
172 | x_customer_id OUT NOCOPY
173 | x_currency_code OUT NOCOPY
174 | x_cr_payment_schedule_id OUT NOCOPY
175 |
176 | KNOWN ISSUES
177 |
178 | NOTES
179 |
180 | MODIFICATION HISTORY
181 | Date Author Description of Changes
182 | 20-MAR-2002 jbeckett Created
183 |
184 *=======================================================================*/
185 FUNCTION receipt_valid
186 (p_cash_receipt_id IN NUMBER,
187 x_receipt_number OUT NOCOPY VARCHAR2,
188 x_receipt_date OUT NOCOPY DATE,
189 x_cr_gl_date OUT NOCOPY DATE,
190 x_customer_id OUT NOCOPY NUMBER,
191 x_currency_code OUT NOCOPY VARCHAR2,
192 x_cr_payment_schedule_id OUT NOCOPY NUMBER)
193 RETURN BOOLEAN;
194
195 /*========================================================================
196 | PUBLIC FUNCTION claim_on_receipt
197 |
198 | DESCRIPTION
199 | ----------------------------------------
200 | This function checks if a current claim investigation application
201 | exists with the passed claim ID
202 | It returns boolean TRUE or FALSE accordingly.
203 | Additional application information is passed back if valid.
204 |
205 | CALLED FROM PROCEDURES/FUNCTIONS (local to this package body)
206 |
207 | CALLS PROCEDURES/FUNCTIONS (local to this package body)
208 |
209 | PARAMETERS
210 | p_claim_id IN
211 | p_cash_receipt_id IN
212 | x_application_id OUT NOCOPY
213 | x_apply_date OUT NOCOPY
214 | x_app_gl_date OUT NOCOPY
215 | x_amount_applied OUT NOCOPY
216 | x_application_ref_num OUT NOCOPY
217 | x_application_ref_reason OUT NOCOPY
218 | x_receivables_trx_id OUT NOCOPY
219 | x_comments OUT NOCOPY
220 | x_customer_reference OUT NOCOPY
221 | x_attribute_rec OUT NOCOPY
222 | x_global_attribute_rec OUT NOCOPY
223 | x_claim_applied OUT NOCOPY
224 |
225 | KNOWN ISSUES
226 |
227 | NOTES
228 |
229 | MODIFICATION HISTORY
230 | Date Author Description of Changes
231 | 20-MAR-2002 jbeckett Created
232 |
233 *=======================================================================*/
234 FUNCTION claim_on_receipt (
235 p_claim_id IN NUMBER
236 , p_cash_receipt_id IN NUMBER
237 , p_applied_ps_id IN NUMBER
238 , x_application_id OUT NOCOPY NUMBER
239 , x_apply_date OUT NOCOPY DATE
240 , x_app_gl_date OUT NOCOPY DATE
241 , x_amount_applied OUT NOCOPY NUMBER
242 , x_trans_to_receipt_rate OUT NOCOPY NUMBER
243 , x_discount_earned OUT NOCOPY NUMBER
244 , x_discount_unearned OUT NOCOPY NUMBER
245 , x_application_ref_num OUT NOCOPY VARCHAR2
246 , x_application_ref_reason OUT NOCOPY VARCHAR2
247 , x_receivables_trx_id OUT NOCOPY NUMBER
248 , x_comments OUT NOCOPY VARCHAR2
249 , x_customer_reference OUT NOCOPY VARCHAR2
250 , x_attribute_rec OUT NOCOPY AR_Receipt_API_PUB.attribute_rec_type
251 , x_global_attribute_rec OUT NOCOPY AR_Receipt_API_PUB.global_attribute_rec_type
252 , x_claim_applied OUT NOCOPY VARCHAR2)
253 RETURN BOOLEAN;
254
255 /*========================================================================
256 | PUBLIC FUNCTION claim_valid
257 |
258 | DESCRIPTION
259 | ----------------------------------------
260 | This function checks if the passed claim ID is valid for this receipt
261 | It returns boolean TRUE or FALSE accordingly.
262 | Claim number is passed back if valid.
263 |
264 | CALLED FROM PROCEDURES/FUNCTIONS (local to this package body)
265 |
266 | CALLS PROCEDURES/FUNCTIONS (local to this package body)
267 |
268 | PARAMETERS
269 | p_claim_id IN
270 | p_receipt_id IN
271 | p_curr_code IN
272 | p_amount IN
273 | x_claim_num OUT NOCOPY
274 |
275 | KNOWN ISSUES
276 |
277 | NOTES
278 |
279 | MODIFICATION HISTORY
280 | Date Author Description of Changes
281 | 20-MAR-2002 jbeckett Created
282 |
283 *=======================================================================*/
284 FUNCTION claim_valid (
285 p_claim_id IN NUMBER,
286 p_receipt_id IN NUMBER,
287 p_curr_code IN VARCHAR2,
288 p_amount IN NUMBER,
289 x_claim_num OUT NOCOPY VARCHAR2)
290 RETURN BOOLEAN;
291
292 /*========================================================================
293 | PUBLIC FUNCTION negative_rct_writeoffs_allowed
294 |
295 | DESCRIPTION
296 | ----------------------------------------
297 | This function returns TRUE or FALSE depending on whether
298 | negative receipt writeoffs are allowed. It returns TRUE
299 | post 11.5.10 and FALSE for pre 11.5.10 versions.
300 |
301 | CALLED FROM PROCEDURES/FUNCTIONS (local to this package body)
302 |
303 | CALLS PROCEDURES/FUNCTIONS (local to this package body)
304 |
305 | PARAMETERS
306 |
307 | KNOWN ISSUES
308 |
309 | NOTES
310 |
311 | MODIFICATION HISTORY
312 | Date Author Description of Changes
313 | 12-JUN-2003 jbeckett Created
314 |
315 *=======================================================================*/
316
317 FUNCTION negative_rct_writeoffs_allowed
318 RETURN BOOLEAN;
319
320 /*========================================================================
321 | PUBLIC PROCEDURE validate_amount_applied
322 |
323 | DESCRIPTION
324 | ----------------------------------------
325 | This procedure checks if the amended amount applied for the invoice
326 | or claim investigation will still leave the receipt positive.
327 |
328 | CALLED FROM PROCEDURES/FUNCTIONS (local to this package body)
329 |
330 | CALLS PROCEDURES/FUNCTIONS (local to this package body)
331 |
332 | PARAMETERS
333 | p_amount_applied IN NUMBER
334 | p_new_amount_applied IN NUMBER
335 | p_cash_receipt_id IN NUMBER
336 | x_return_status OUT VARCHAR2
337 |
338 | KNOWN ISSUES
339 |
340 | NOTES
341 |
342 | MODIFICATION HISTORY
343 | Date Author Description of Changes
344 | 04-AUG-2004 jbeckett bug 3809272 - Created.
345 |
346 *=======================================================================*/
347 PROCEDURE validate_amount_applied (
348 p_amount_applied IN NUMBER,
349 p_new_amount_applied IN NUMBER,
350 p_cash_receipt_id IN NUMBER,
351 x_return_status OUT NOCOPY VARCHAR2);
352
353 END ARP_DEDUCTION_COVER;