DBA Data[Home] [Help]

PACKAGE: APPS.PA_AP_INTEGRATION

Source


1 PACKAGE pa_ap_integration AUTHID CURRENT_USER AS
2 --$Header: PAAPINTS.pls 120.4.12020000.4 2013/03/06 09:07:06 admarath ship $
3 
4 
5 PROCEDURE upd_pa_details_supplier_merge
6 			   ( p_old_vendor_id   IN po_vendors.vendor_id%type,
7 			     p_new_vendor_id   IN po_vendors.vendor_id%type,
8 			     p_paid_inv_flag   IN ap_invoices_all.PAYMENT_STATUS_FLAG%type,
9 			     p_invoice_id      IN ap_invoices_all.invoice_id%TYPE DEFAULT NULL, /* Bug# 8845025 */
10 			     x_stage          OUT NOCOPY VARCHAR2,
11 			     x_status         OUT NOCOPY VARCHAR2);
12 
13 
14 FUNCTION Allow_Supplier_Merge ( p_vendor_id         IN po_vendors.vendor_id%type)
15 RETURN varchar2;
16 
17 PROCEDURE get_asset_addition_flag
18              (p_project_id           IN  pa_projects_all.project_id%TYPE,
19               x_asset_addition_flag  OUT NOCOPY ap_invoice_distributions_all.assets_addition_flag%TYPE);
20 
21 FUNCTION Get_Project_Type ( p_project_id IN pa_projects_all.project_id%TYPE)
22 RETURN varchar2;
23 
24 -- ==========================================================================================================================================
25 -- Bug 5201382 R12.PJ:XB3:DEV:NEW API TO RETRIEVE THE DATES FOR PROFILE PA_AP_EI_DATE_DEFAULT
26 -- p_transaction_date : API would return transaction date when profile value was set to 'Transaction Date'
27 --                       a. For Invoice transaction invoice_date should be passed as parameter
28 --                       b. For PO or Receipt Matched Invoice  Transactions invoice_date should be passed as parameter
29 --                       c. For RCV Transactions transaction_date should be passed.
30 --                       d. For payments and discounts ap dist exp_item_date should be passed.
31 -- p_gl_date          : API would return transaction date when profile value was set to 'Transaction GL Date'
32 --                      a. For Invoice transactions gl_date should be passed b. For payments and discounts the accounting date must be passed
33 --                      c. for RCV transactions accounting date should be passed.
34 -- p_po_exp_item_date : API would return the purchase order expenditure item date for po matched cases when profile value was set to
35 --                      'PO Expenditure Item Date/Transaction Date'. This is used for PO matched cases. It may be NULL when
36 --                       p_po_distribution_id was passed to the API.
37 -- p_po_distribution_id: The parameter value is used to determine the purchase order expenditure item date for po matched cases when profile
38 --                        value was set to 'PO Expenditure Item Date/Transaction Date'. when p_po_exp_item_date was passed  then
39 --                        p_po_distribution_id is not used to derive the expenditure item date.
40 -- p_creation_date : API would return this date when profile value was set to 'Transaction System Date'
41 -- p_calling_program : a. when called during the PO Match case : PO-MATCH b. When called from Invoice form        : APXINWKB
42 --                     c. When called from supplier cost xface for discounts : DISCOUNT d. When called from supplier cost xface for Payment: PAYMENT
43 --                     e. When called from supplier cost xface for Receipts  : RECEIPT
44 -- ==========================================================================================================================================
45 FUNCTION Get_si_cost_exp_item_date ( p_transaction_date      IN pa_expenditure_items_all.expenditure_item_date%TYPE,
46                                      p_gl_date               IN pa_cost_distribution_lines_all.gl_date%TYPE,
47                                      p_po_exp_item_date      IN pa_expenditure_items_all.expenditure_item_date%TYPE,
48                                      p_creation_date         IN pa_expenditure_items_all.creation_date%TYPE,
49                                      p_po_distribution_id    IN pa_expenditure_items_all.document_distribution_id%TYPE,
50                                      p_calling_program       IN varchar2  )
51 RETURN date ;
52 
53 FUNCTION Get_si_default_exp_org RETURN varchar2 ;
54 
55 
56 /***************************************************************************
57    Procedure        :	Get_Po_Match_Si_Exp_Item_Date
58    Purpose           :	Bug#13706985 PO match action does not verify whether EI
59 				date falls in a closed PA period or not. During PO match AP invokes API
60 				PA_AP_INTEGRATION.Get_Si_Cost_Exp_Item_Date to retrieve the
61 				EI date and stamps the date returned by the API as the EI date.
62 				This procedure is an enhancement to the previous function
63 				which returns specific error messages to the calling
64 				program based on the validation of the expenditure item date
65    Arguments        :	     p_transaction_date		IN
66 				     p_gl_date				IN
67 				     p_po_exp_item_date		IN
68 				     p_creation_date			IN
69 				     p_po_distribution_id		IN
70 				     p_calling_program		IN
71 				     p_exp_item_date		OUT
72 				     p_date_valid_flag		OUT
73 				     p_pa_message_name	OUT
74 ****************************************************************************/
75 
76 PROCEDURE Get_Po_Match_Si_Exp_Item_Date
77              (	p_transaction_date			IN  DATE,
78 		p_gl_date					IN  DATE,
79 		p_po_exp_item_date		IN  DATE,
80 		p_creation_date			IN  DATE,
81 		p_po_distribution_id		IN  po_distributions_all.po_distribution_id%TYPE,
82 		p_calling_program			IN  VARCHAR2,
83 	  p_exp_item_date			OUT NOCOPY DATE,
84 		p_is_date_valid			OUT NOCOPY VARCHAR2,
85 		p_pa_message_name		OUT  NOCOPY varchar2,
86 		p_token_value1			OUT NOCOPY VARCHAR2,
87 		p_token_value2			OUT NOCOPY VARCHAR2);
88 
89 /***************************************************************************
90    Function	    :	Valid_Ei_Date
91    Purpose           :	Bug#13706985 A Generic function which validates
92 				the passed ei date against the award,project and
93 				task start dates and end dates and also if the date
94 				falls with in an open period
95    Arguments        :		p_ei_date		IN  NOT NULL
96    					p_award_id	IN
97 					p_project_id	IN
98 					p_task_id		IN
99 ****************************************************************************/
100 
101 PROCEDURE Validate_Ei_Date(
102 			gms_message	IN VARCHAR2  DEFAULT NULL,
103 			pa_message		IN VARCHAR2  DEFAULT NULL,
104 			profile_date		IN DATE  DEFAULT NULL,
105 			source_doc_date	IN DATE  DEFAULT NULL,
106 			profile			IN VARCHAR2  DEFAULT NULL,
107 			x_exp_item_date			OUT  NOCOPY DATE,
108 			x_pa_message_name		OUT NOCOPY VARCHAR2,
109 			x_is_date_valid			OUT NOCOPY VARCHAR2
110 			);
111 
112 END pa_ap_integration;