DBA Data[Home] [Help]

PACKAGE: APPS.ARP_DEDUCTION

Source


1 PACKAGE ARP_DEDUCTION AUTHID CURRENT_USER AS
2 /* $Header: ARXLDEDS.pls 115.5 2003/06/03 21:45:27 djancis noship $ */
3 
4 /*=======================================================================+
5  |  Declare PUBLIC Data Types and Variables
6  +=======================================================================*/
7 
8 /*=======================================================================+
9  |  Declare PUBLIC Exceptions
10  +=======================================================================*/
11 
12 /*========================================================================
13  | PUBLIC FUNCTION CHECK_TM
14  |
15  | DESCRIPTION
16  |      This function checks whether Trade Management is installed or not.
17  |      If TM is installed, it returns the boolean value TRUE, otherwise
18  |      it returns false.
19  |      ----------------------------------------
20  |      This procedure does the following ......
21  |
22  | PSEUDO CODE/LOGIC
23  |
24  | PARAMETERS
25  |
26  | KNOWN ISSUES
27  |
28  |
29  | NOTES
30  |
31  |
32  |
33  | MODIFICATION HISTORY
34  | Date                  Author            Description of Changes
35  | 27-NOV-2002           AMateen              Created
36  | DD-MON-YYYY           Name              Bug #####, modified amount ..
37  |
38  *=======================================================================*/
39 FUNCTION CHECK_TM RETURN BOOLEAN;
40 
41 
42 /*========================================================================
43  | PUBLIC FUNCTION CHECK_TM_DEFAULT_SETUP
44  |
45  | DESCRIPTION
46  |      This function returns true if Trade Management Default setup is
47  |      available otherwise it returns false.
48  |
49  | CALLED FROM PROCEDURES/FUNCTIONS
50  |      Called by post batch process
51  |
52  |
53  | CALLS PROCEDURES/FUNCTIONS
54  |      OZF_CLAIM_INSTALL.CHECK_DEFAULT_SETUP
55  |
56  | PARAMETERS
57  |
58  | KNOWN ISSUES
59  |
60  | NOTES
61  |
62  | MODIFICATION HISTORY
63  | Date                  Author            Description of Changes
64  | 10-FEB-2003           cthangai          Created
65  | DD-MON-YYYY           Name              Bug #####, modified amount ..
66  |
67  *=======================================================================*/
68 FUNCTION CHECK_TM_DEFAULT_SETUP RETURN BOOLEAN;
69 
70 
71 /*========================================================================
72  | PUBLIC PROCEDURE claim_creation
73  |
74  | DESCRIPTION
75  |     Procedure to create a deduction claim in Trade Management ,updates
76  |     receivable applications (i.e. Deduction ID, deduction
77  |     number and customer reason code), updates amount in dispute and
78  |     and inserts trx notes. Handles Non Trx realted claims
79  |     and On Transaction related claims (short pays) for claim creation.
80  |     In the cases of subsequent receipt application, it initiates the TM API
81  |     API to update the claim, update amount_in_dispute and insert TRX Notes.
82  |     This procedure is initiated by the Post Batch process.
83  |
84  | CALLED FROM PROCEDURES/FUNCTIONS
85  |
86  |
87  | CALLS PROCEDURES/FUNCTIONS
88  |     arp_process_application.create_claim
89  |     app_exception.invalid_argument
90  |
91  | PARAMETERS
92  |
93  | KNOWN ISSUES
94  |
95  | NOTES
96  |
97  | MODIFICATION HISTORY
98  | Date         Author       Description of Changes
99  | 19-DEC-2002  cthangai     Created
100  | 14-FEB-2003  cthangai     ar_system_parameter column name changes specific to
101  |                           claim processing
102  | 27-MAR-2003  cthangai     Added OUT parameter x_return_status
103  *=======================================================================*/
104 PROCEDURE CLAIM_CREATION
105   (p_request_id IN ar_receivable_applications.request_id%TYPE DEFAULT NULL
106   ,p_matched_claim_creation_flag IN ar_system_parameters.matched_claim_creation_flag%TYPE
107   ,p_matched_claim_excl_cm_flag IN ar_system_parameters.matched_claim_excl_cm_flag%TYPE
108   ,x_return_status OUT NOCOPY VARCHAR2
109   );
110 
111 
112 /*===========================================================================+
113  | PUBLIC PROCEDURE                                                          |
114  |    update_claim                                                           |
115  |                                                                           |
116  | DESCRIPTION                                                               |
117  |    Calls iClaim group API to update a deduction claim.                    |
118  |                                                                           |
119  | SCOPE - PUBLIC                                                            |
120  |                                                                           |
121  | EXETERNAL PROCEDURES/FUNCTIONS ACCESSED -                                 |
122  |      OZF_Claim_GRP.Update_Deduction - Group API to update a claim from AR |
123  |                                                                           |
124  | ARGUMENTS  : IN:                                                          |
125  |              OUT:                                                         |
126  |                                                                           |
127  | RETURNS    : NONE                                                         |
128  |                                                                           |
129  |                                                                           |
130  | MODIFICATION HISTORY                                                      |
131  |   CTHANGAI    03-FEB-2003  Created                                        |
132  |   CTHANGAI    27-FEB-2003  Added OUT paramters x_claim_id,x_claim_number  |
133  +===========================================================================*/
134 PROCEDURE update_claim
135             ( p_claim_id               IN NUMBER
136             , p_claim_number           IN VARCHAR2
137             , p_amount                 IN  NUMBER
138             , p_currency_code          IN  VARCHAR2
139             , p_exchange_rate_type     IN  VARCHAR2
140             , p_exchange_rate_date     IN  DATE
141             , p_exchange_rate          IN  NUMBER
142             , p_customer_trx_id        IN  NUMBER
143             , p_invoice_ps_id          IN  NUMBER
144             , p_cust_trx_type_id       IN  NUMBER
145             , p_trx_number             IN  VARCHAR2
146             , p_cust_account_id        IN  NUMBER
147             , p_bill_to_site_id        IN  NUMBER
148             , p_ship_to_site_id        IN  NUMBER
149             , p_salesrep_id            IN  NUMBER
150             , p_customer_ref_date      IN  DATE
151             , p_customer_ref_number    IN  VARCHAR2
152             , p_cash_receipt_id        IN  NUMBER
153             , p_receipt_number         IN  VARCHAR2
154             , p_reason_id              IN  NUMBER
155             , p_comments               IN  VARCHAR2
156             , p_attribute_category     IN  VARCHAR2
157             , p_attribute1             IN  VARCHAR2
158             , p_attribute2             IN  VARCHAR2
159             , p_attribute3             IN  VARCHAR2
160             , p_attribute4             IN  VARCHAR2
161             , p_attribute5             IN  VARCHAR2
162             , p_attribute6             IN  VARCHAR2
163             , p_attribute7             IN  VARCHAR2
164             , p_attribute8             IN  VARCHAR2
165             , p_attribute9             IN  VARCHAR2
166             , p_attribute10            IN  VARCHAR2
167             , p_attribute11            IN  VARCHAR2
168             , p_attribute12            IN  VARCHAR2
169             , p_attribute13            IN  VARCHAR2
170             , p_attribute14            IN  VARCHAR2
171             , p_attribute15            IN  VARCHAR2
172             , p_applied_date           IN  DATE
173             , p_applied_action_type    IN  VARCHAR2
174             , p_amount_applied         IN  NUMBER
175             , p_applied_receipt_id     IN  NUMBER
176             , p_applied_receipt_number IN  VARCHAR2
177             , x_return_status          OUT NOCOPY VARCHAR2
178             , x_msg_count              OUT NOCOPY NUMBER
179             , x_msg_data               OUT NOCOPY VARCHAR2
180             , x_object_version_number  OUT NOCOPY NUMBER
181             , x_claim_reason_code_id   OUT NOCOPY NUMBER
182             , x_claim_reason_name      OUT NOCOPY VARCHAR2
183             , x_claim_id               OUT NOCOPY NUMBER
184             , x_claim_number           OUT NOCOPY VARCHAR2
185             );
186 
187 
188 /*===========================================================================+
189  | PUBLIC PROCEDURE                                                          |
190  |    create_claims_rapp_dist                                                |
191  |                                                                           |
192  | DESCRIPTION                                                               |
193  |    Procedure for creating claims related RA and associated Distributions  |
194  |    Insert 2 RA rows - One as -ve UNAPP row and the second as 'OTHER ACC'  |
195  |    The on-account ACC row is similar to the 'OTHER ACC'.                  |
196  |    This new procedure is introduced for creating special applications like|
197  |    claim.The RA records for 'ACC' or 'OTHER ACC' are created first along  |
198  |    with thier corresponding distributions records. After which the        |
199  |    negative UNAPP record is created along with its PAIRED distribution    |
200  |    record.                                                                |
201  |                                                                           |
202  | SCOPE - PUBLIC                                                            |
203  |                                                                           |
204  | EXETERNAL PROCEDURES/FUNCTIONS ACCESSED -                                 |
205  |   arp_app_pkg.insert_p - Insert a row into RA table                       |
206  |   arp_acct_main.Create_Acct_Entry - Insert a row into Distributions table |
207  |                                                                           |
208  | ARGUMENTS  : IN:                                                          |
209  |                                                                           |
210  |              OUT:                                                         |
211  |				                                                     |
212  | RETURNS    : NONE                                                         |
213  |                                                                           |
214  | NOTES  -                                                                  |
215  |                                                                           |
216  | MODIFICATION HISTORY                                                      |
217  | 13-JAN-03    CTHANGAI	Created                                        |
218  | 21-JAN-03    CTHANGAI	Added receivables_trx_id paramter              |
219  | 05-FEB-03    CTHANGAI	Removed application_ref_reason paramter        |
220  | 13-FEB-03    CTHANGAI	Removed paramter applied_payment_schedule_id   |
221  +===========================================================================*/
222  PROCEDURE create_claims_rapp_dist
223  (p_cash_receipt_id        IN  ar_receivable_applications.cash_receipt_id%TYPE
224  ,p_unapp_ccid             IN  ar_receivable_applications.code_combination_id%TYPE
225  ,p_other_acc_ccid         IN  ar_receivable_applications.code_combination_id%TYPE
226  ,p_acc_ccid               IN  ar_receivable_applications.code_combination_id%TYPE
227  ,p_gl_date                IN  ar_receivable_applications.gl_date%TYPE
228  ,p_status                 IN  ar_receivable_applications.status%TYPE
229  ,p_amount_applied         IN  ar_receivable_applications.amount_applied%TYPE
230  ,p_created_by             IN  ar_receivable_applications.created_by%TYPE
231  ,p_creation_date          IN  ar_receivable_applications.creation_date%TYPE
232  ,p_last_updated_by        IN  ar_receivable_applications.last_updated_by%TYPE
233  ,p_program_application_id IN  ar_receivable_applications.program_application_id%TYPE
234  ,p_program_id             IN  ar_receivable_applications.program_id%TYPE
235  ,p_request_id             IN  ar_receivable_applications.request_id%TYPE
236  ,p_sob_id                 IN  ar_receivable_applications.set_of_books_id%TYPE
237  ,p_apply_date             IN  ar_receivable_applications.apply_date%TYPE
238  ,p_ussgl_transaction_code IN  ar_receivable_applications.ussgl_transaction_code%TYPE
239  ,p_receipt_ps_id          IN  ar_receivable_applications.payment_schedule_id%TYPE
240  ,p_unapp_application_rule IN  ar_receivable_applications.application_rule%TYPE
241  ,p_other_application_rule IN  ar_receivable_applications.application_rule%TYPE
242  ,p_acc_application_rule   IN  ar_receivable_applications.application_rule%TYPE
243  ,p_on_account_customer    IN  ar_receivable_applications.on_account_customer%TYPE
244  ,p_receivables_trx_id     IN  ar_receivable_applications.receivables_trx_id%TYPE
245  ,p_customer_reference     IN  ar_receivable_applications.customer_reference%TYPE
246  ,p_customer_reason        IN  ar_receivable_applications.customer_reason%TYPE
247  ,p_attribute_category     IN  ar_receivable_applications.attribute_category%TYPE
248  ,p_attribute1             IN  ar_receivable_applications.attribute1%TYPE
249  ,p_attribute2             IN  ar_receivable_applications.attribute2%TYPE
250  ,p_attribute3             IN  ar_receivable_applications.attribute3%TYPE
251  ,p_attribute4             IN  ar_receivable_applications.attribute4%TYPE
252  ,p_attribute5             IN  ar_receivable_applications.attribute5%TYPE
253  ,p_attribute6             IN  ar_receivable_applications.attribute6%TYPE
254  ,p_attribute7             IN  ar_receivable_applications.attribute7%TYPE
255  ,p_attribute8             IN  ar_receivable_applications.attribute8%TYPE
256  ,p_attribute9             IN  ar_receivable_applications.attribute9%TYPE
257  ,p_attribute10            IN  ar_receivable_applications.attribute10%TYPE
258  ,p_attribute11            IN  ar_receivable_applications.attribute11%TYPE
259  ,p_attribute12            IN  ar_receivable_applications.attribute12%TYPE
260  ,p_attribute13            IN  ar_receivable_applications.attribute13%TYPE
261  ,p_attribute14            IN  ar_receivable_applications.attribute14%TYPE
262  ,p_attribute15            IN  ar_receivable_applications.attribute15%TYPE
263  ,x_return_status          OUT NOCOPY VARCHAR2
264  );
265 
266 
267 /*========================================================================
268  | PUBLIC PROCEDURE claim_create_fail_recover
269  |
270  | DESCRIPTION
271  |     Procedure to recover from claim creation failure.
272  |     The receivable application records and thier corresponding distribution
273  |     records for the claim are deleted. The payment schedule amounts are
274  |     updated appropriately.
275  |
276  | CALLED FROM PROCEDURES/FUNCTIONS
277  |     claim_creation
278  |
279  | CALLS PROCEDURES/FUNCTIONS
280  |     arp_process_application2.delete_selected_transaction
281  |     app_exception.invalid_argument
282  |
283  |
284  | PARAMETERS
285  |         IN  :
286  |               p_rapp_id
287  |               p_cr_id
288  |
289  |         OUT :
290  |
291  | KNOWN ISSUES
292  |
293  | NOTES
294  |
295  | MODIFICATION HISTORY
296  | Date         Author            Description of Changes
297  | 17-JAN-2003  cthangai          Created
298  | 05-MAR-2003  cthangai          Removed In parameter - payment_schedule_id
299  *=======================================================================*/
300 PROCEDURE claim_create_fail_recover
301   (p_rapp_id IN ar_receivable_applications.receivable_application_id%TYPE
302   ,p_cr_id   IN ar_receivable_applications.cash_receipt_id%TYPE
303   );
304 
305 
306 /*========================================================================
307  | PUBLIC FUNCTION GET_FUNCTIONAL_CURRENCY
308  |
309  | DESCRIPTION
310  |      This function is called in the view associated with the LOV in the
311  |      multiple Quickcash screen for the receipt to receipt feature to
312  |      derive the functional currency code
313  |
314  | SCOPE - PUBLIC
315  |
316  | EXTERNAL PROCEDURE/FUNCTIONS ACCESSED - NONE
317  |
318  | ARGUMENTS  :
322  |
319  |         IN :    NONE
320  |
321  |         OUT:    NONE
323  | RETURNS    : VARCHAR2 (Functional Currency Code by Set Of Books)
324  |
325  |
326  | NOTES      : This should be eventually rellocated into the arp_util package
327  |
328  | MODIFICATION HISTORY
329  | Date		Author		Description of Changes
330  | 21-JAN-2003	cthangai        Created
331  | DD-MON-YYYY           Name              Bug #####, modified amount ..
332  |
333  *=======================================================================*/
334 FUNCTION GET_FUNCTIONAL_CURRENCY RETURN VARCHAR2;
335 
336 
337 /*========================================================================
338  | PUBLIC FUNCTION GET_RECEIVABLES_TRX_ID
339  |
340  | DESCRIPTION
341  |      This function is called to retreive the receivables_trx_id
342  |
343  | SCOPE - PUBLIC
344  |
345  | EXTERNAL PROCEDURE/FUNCTIONS ACCESSED - NONE
346  |
347  | ARGUMENTS  :
348  |         IN :    p_cash_receipt_id
349  |
350  |         OUT:    NONE
351  |
352  | RETURNS    : NUMBER (receivable_trx_id associated with the cash_receipt_id)
353  |
354  |
355  | NOTES      :
356  |
357  | MODIFICATION HISTORY
358  | Date		Author		Description of Changes
359  | 23-JAN-2003	cthangai        Created
360  | DD-MON-YYYY           Name              Bug #####, modified amount ..
361  |
362  *=======================================================================*/
363 FUNCTION GET_RECEIVABLES_TRX_ID
364  (  p_cash_receipt_id IN  ar_cash_receipts.cash_receipt_id%TYPE
365  )  RETURN NUMBER;
366 
367 
368 /*========================================================================
369  | PUBLIC PROCEDURE UPDATE_CLAIM_CREATE_STATUS
370  |
371  | DESCRIPTION
372  |      This function is called to update ar_payment_schedules table
373  |      active_claim_flag with the appropriate claim status returned from TM
374  |
375  | SCOPE - PUBLIC
376  |
377  | EXTERNAL PROCEDURE/FUNCTIONS ACCESSED - NONE
378  |
379  | ARGUMENTS  :
380  |         IN :    Payment Schedule ID
381  |                 Claim Status
382  |
383  |         OUT:    NONE
384  |
385  |
386  | NOTES      :
387  |
388  | MODIFICATION HISTORY
389  | Date		Author	    Description of Changes
390  | 21-JAN-2003	cthangai    Update ar_payment_schdeules.active_claim_flag
391  |                            based on the claim status in TM
392  | DD-MON-YYYY    Name        Bug #####, modified amount ..
393  |
394  *=======================================================================*/
395 PROCEDURE UPDATE_CLAIM_CREATE_STATUS
396  (p_ps_id        IN ar_payment_schedules.payment_schedule_id%type
397  ,p_claim_status IN ar_payment_schedules.active_claim_flag%type
398  );
399 
400 
401 /*========================================================================
402  | PUBLIC PROCEDURE conc_req_log_msg
403  |
404  | DESCRIPTION
405  |      This function writes messages to the concurrent request log file
406  |
407  | SCOPE - PUBLIC
408  |
409  | EXTERNAL PROCEDURE/FUNCTIONS ACCESSED - NONE
410  |
411  | ARGUMENTS  :
412  |         IN :    message
413  |
414  |         OUT:    NONE
415  |
416  |
417  | NOTES      :
418  |
419  | MODIFICATION HISTORY
420  | Date		Author	Description of Changes
421  | 13-FEB-2003	cthangai    Created
422  | DD-MON-YYYY    Name        Bug #####
423  |
424  *=======================================================================*/
425 PROCEDURE conc_req_log_msg (p_message IN VARCHAR2);
426 
427 
428 /*========================================================================
429  | PUBLIC PROCEDURE conc_req_out_msg
430  |
431  | DESCRIPTION
432  |      This function writes messages to the concurrent request output file
433  |
434  | SCOPE - PUBLIC
435  |
436  | EXTERNAL PROCEDURE/FUNCTIONS ACCESSED - NONE
437  |
438  | ARGUMENTS  :
439  |         IN :    message
440  |
441  |         OUT:    NONE
442  |
443  |
444  | NOTES      :
445  |
446  | MODIFICATION HISTORY
447  | Date		Author	Description of Changes
448  | 13-FEB-2003	cthangai    Created
449  | DD-MON-YYYY    Name        Bug #####
450  |
451  *=======================================================================*/
452 PROCEDURE conc_req_out_msg (p_message IN VARCHAR2);
453 
454 
455 /*========================================================================
456  | PUBLIC FUNCTION OVERAPPLICATION_INDICATOR
457  |
458  | DESCRIPTION
459  |     Function to determine whether amount applied will cause an
460  |     overapplication given the current amount due remaining and
461  |     amount due original.
462  |     A=sign(amount_due_remaining - amount_applied)
463  |     B=sign(amount_due_original)
464  |     If A=-1 and B=+1 or A=+1 and B=-1 then overapplication
465  |     Returns Y else Return N
466  |
467  | CALLED FROM PROCEDURES/FUNCTIONS
468  |      Called from AR_INTERIM_CASH_RECEIPTS_V ,AR_INTERIM_CR_LINES_V
469  |      and Quick Cash Form (ARXRWQRC.fmb)
470  | CALLS PROCEDURES/FUNCTIONS
471  |
472  |
473  |
474  | PARAMETERS
475  |  IN:
476  |    P_AMOUNT_DUE_ORIGINAL IN  NUMBER
477  |    P_AMOUNT_DUE_REMAININIG  IN NUMBER
478  |    P_AMOUNT_APPLIED  IN NUMBER
479  |  OUT:
480  |      RETURN Y/N
481  | KNOWN ISSUES
482  |
483  | NOTES
484  |
485  | MODIFICATION HISTORY
486  | Date         Author            Description of Changes
487  | 21-JAN-2003  KDhaliwal         Created
488  |
489  *=======================================================================*/
493 ,P_AMOUNT_APPLIED  IN NUMBER
490 FUNCTION OVERAPPLICATION_INDICATOR
491 (P_AMOUNT_DUE_ORIGINAL IN  NUMBER
492 ,P_AMOUNT_DUE_REMAINING  IN NUMBER
494 )
495  RETURN VARCHAR2;
496 
497 
498 /*========================================================================
499  | PUBLIC FUNCTION CHECK_APP_VIOLATE
500  |
501  | DESCRIPTION
502  |    Function to determine whether amount entered in the screen
503  |    is violating Natural Applicatioon OR violating Over Application OR
504  |    is a valid Natural Application
505  |
506  | CALLED FROM PROCEDURES/FUNCTIONS
507  |     Called from WHEN-VALIDATE-ITEM trigger of the AMOUNT field in the
508  |     Multiple QuickCash window as well as the Receipt Application window
509  |
510  | CALLS PROCEDURES/FUNCTIONS
511  |
512  | PARAMETERS
513  |  IN:
514  |    P_AMOUNT_DUE_ORIGINAL IN  NUMBER
515  |    P_AMOUNT_DUE_REMAININIG  IN NUMBER
516  |    P_AMOUNT_APPLIED  IN NUMBER
517  |  OUT:
518  |      RETURN ('NATURAL','OVER','NO')
519  |         NATURAL -> Natural Application Violation
520  |         OVER    -> Over Application Violation
521  |         NO      -> No Violation
522  |
523  | KNOWN ISSUES
524  |
525  | NOTES
526  |
527  | MODIFICATION HISTORY
528  | Date         Author  	Description of Changes
529  | 23-JAN-2003  CTHANGAI      Created
530  |
531  *=======================================================================*/
532 FUNCTION CHECK_APP_VIOLATE
533  (p_amount   IN ar_receivable_applications.amount_applied%TYPE
534  ,p_rapp_id  IN ar_receivable_applications.receivable_application_id%TYPE DEFAULT NULL
535  ,p_cr_id    IN ar_receivable_applications.cash_receipt_id%TYPE
536  )  RETURN VARCHAR2;
537 
538 
539 /*========================================================================
540  | PUBLIC FUNCTION GET_TM_ORACLE_REASON
541  |
542  | DESCRIPTION
543  |      This function is called to retrieve the Oracle reason description
544  |      from TM
545  |
546  | SCOPE - PUBLIC
547  |
548  | EXTERNAL PROCEDURE/FUNCTIONS ACCESSED - NONE
549  |
550  | ARGUMENTS  :
551  |         IN :    TM Claim ID
552  |
553  |         OUT:    NONE
554  |
555  | RETURNS    : VARCHAR (Oracle Reason From TM)
556  |
557  |
558  | NOTES      :
559  |
560  | MODIFICATION HISTORY
561  | Date		Author		Description of Changes
562  | 12-FEB-2003	cthangai        Created
563  | DD-MON-YYYY  Name            Bug #####, modified amount ..
564  |
565  *=======================================================================*/
566 FUNCTION GET_TM_ORACLE_REASON
567  (p_claim_id   IN ar_receivable_applications.secondary_application_ref_id%TYPE
568  ) RETURN VARCHAR2;
569 
570 /*========================================================================
571  | PUBLIC PROCEDURE apply_open_receipt_cover
572  |
573  | DESCRIPTION
574  |      This procedure is a wrapper to initiate calls to receipts API.
575  |      Performs validation and initiates the API on success
576  |
577  | SCOPE - PUBLIC
578  |
579  | EXTERNAL PROCEDURE/FUNCTIONS ACCESSED - NONE
580  |
581  | ARGUMENTS  :
582  |         IN :    NONE
583  |
584  |         OUT:    X_RETURN_STAUS ('S' for success, 'E' or 'U' for Error)
585  |
586  |
587  | NOTES      :
588  |
589  | MODIFICATION HISTORY
590  | Date		Author	    Description of Changes
591  | 19-FEB-2003	cthangai    Created
592  | 25-FEB-2003	cthangai    Add OUT parameters x_return_status, x_apply_type
593  | DD-MON-YYYY  Name        Bug #####
594  |
595  *=======================================================================*/
596 PROCEDURE apply_open_receipt_cover
597   (p_cash_receipt_id             IN  ar_cash_receipts.cash_receipt_id%TYPE
598   ,p_applied_payment_schedule_id IN  ar_payment_schedules.payment_schedule_id%TYPE
599   ,p_open_rec_app_id             IN  ar_receivable_applications.receivable_application_id%TYPE
600   ,p_amount_applied              IN  ar_receivable_applications.amount_applied%TYPE
601   ,p_attribute_category          IN  ar_receivable_applications.attribute_category%TYPE
602   ,p_attribute1                  IN  ar_receivable_applications.attribute1%TYPE
603   ,p_attribute2                  IN  ar_receivable_applications.attribute2%TYPE
604   ,p_attribute3                  IN  ar_receivable_applications.attribute3%TYPE
605   ,p_attribute4                  IN  ar_receivable_applications.attribute4%TYPE
606   ,p_attribute5                  IN  ar_receivable_applications.attribute5%TYPE
607   ,p_attribute6                  IN  ar_receivable_applications.attribute6%TYPE
608   ,p_attribute7                  IN  ar_receivable_applications.attribute7%TYPE
609   ,p_attribute8                  IN  ar_receivable_applications.attribute8%TYPE
610   ,p_attribute9                  IN  ar_receivable_applications.attribute9%TYPE
611   ,p_attribute10                 IN  ar_receivable_applications.attribute10%TYPE
612   ,p_attribute11                 IN  ar_receivable_applications.attribute11%TYPE
613   ,p_attribute12                 IN  ar_receivable_applications.attribute12%TYPE
614   ,p_attribute13                 IN  ar_receivable_applications.attribute13%TYPE
615   ,p_attribute14                 IN  ar_receivable_applications.attribute14%TYPE
616   ,p_attribute15                 IN  ar_receivable_applications.attribute15%TYPE
617   ,x_return_status               OUT NOCOPY VARCHAR2
618   ,x_receipt_number              OUT NOCOPY ar_cash_receipts.receipt_number%TYPE
619   ,x_apply_type                  OUT NOCOPY VARCHAR2
620   );
621 
622 /*========================================================================
623  | PUBLIC FUNCTION GET_ACTIVE_CLAIM_FLAG
624  |
625  | DESCRIPTION
626  |      This function returns the value of the active claim flag which is
630  | SCOPE - PUBLIC
627  |      stored on the Payment Schedule of a transaction.   This flag indicates
628  |      whether or not an active claim exists in trade management.
629  |
631  |
632  | EXTERNAL PROCEDURE/FUNCTIONS ACCESSED - NONE
633  |
634  | ARGUMENTS  :
635  |         IN     :    payment_schedule_id
636  |
637  |         RETURNS:    ACTIVE_CLAIM_FLAG (for that payment schedule id)
638  |
639  | KNOWN ISSUES
640  |
641  | NOTES      :
642  |
643  | MODIFICATION HISTORY
644  | Date         Author		Description of Changes
645  | 03-JUN-2003  Debbie Jancis 	Created
646  |
647  *=======================================================================*/
648 FUNCTION GET_ACTIVE_CLAIM_FLAG(
649     p_payment_schedule_id  IN ar_payment_schedules.payment_schedule_id%TYPE)
650  RETURN VARCHAR2;
651 
652 
653 END ARP_DEDUCTION;