DBA Data[Home] [Help]

PACKAGE: APPS.PA_GMS_API

Source


1 PACKAGE PA_GMS_API AUTHID CURRENT_USER AS
2 /* $Header: PAXGMS1S.pls 120.3 2006/08/26 11:22:30 asubrama noship $ */
3 
4      -- -------------------------------------------------------------------
5      -- Function to verify whether GRANTS is installed or not
6      -- ------------------------------------------------------------------
7       FUNCTION VERT_INSTALL return BOOLEAN ;
8 
9     -- ---------------------------------------------------------------
10     -- Function to validate adjustments  on an expenditure item
11     -- this function may be used for additional validation for
12     -- for testing eligibility for expenditure item adjustment.
13     --  Parameters :
14     -- ---------------------------------------------------------------
15 	FUNCTION VERT_ALLOW_ADJUSTMENTS( X_EXPENDITURE_ITEM_ID IN  NUMBER )
16 	return BOOLEAN ;
17     -- -----------------------------------------------------------------
18     -- Procedure to validate Transfer on an expenditure item .
19     -- Additional validation will be done to validate expenditure item for
20     -- Transfer
21     -- ------------------------------------------------------------------
22     FUNCTION VERT_TRANSFER( X_EXP_ITEM_ID IN NUMBER  , X_ERROR IN OUT NOCOPY VARCHAR2 )
23     RETURN BOOLEAN ;
24 
25     PROCEDURE VERT_ADJUST_ITEMS( X_CALLING_PROCESS 	IN   VARCHAR2 ,
26                                  X_ROWS             IN   NUMBER,
27 								 X_status		IN OUT NOCOPY   NUMBER );
28 
29     -- ------------------------------------------------------
30     -- API to allow vertical application to compare awards
31     -- X_ADJUST_ACTION = 'MASADJUST'
32     -- -------------------------------------------------------
33     FUNCTION  VERT_ALLOW_ACTION(X_ADJUST_ACTION IN VARCHAR2) RETURN VARCHAR2 ;
34 
35    -- ----------------------------------------------------------
36    -- Supplier Invoice Interface logic of creating ADLS.
37    -- LD PA Interface  logic of creating ADLS.
38    -- trx_interface - Creates ADLS for the new expenditure items
39    --               created for PA  Interface from payables/LD.
40    --               This is called after PA_TRX_IMPORT.NEWexpend.
41    -- -----------------------------------------------------------
42   PROCEDURE  VERT_TRX_INTERFACE( X_USER              IN NUMBER
43                           , X_LOGIN             IN NUMBER
44                           , X_MODULE            IN VARCHAR2
45                           , X_CALLING_PROCESS   IN VARCHAR2
46                           , ROWS                IN BINARY_INTEGER
47                           , X_STATUS            IN OUT NOCOPY NUMBER
48                           , X_GL_FLAG           IN VARCHAR2 ) ;
49 
50   -- ----------------------------------------------------------------
51   -- API to allow vertical applications to take actions following the
52   -- creation of AP distribution lines.
53   -- This is called from PA_XFER_ADJ.
54   -- -----------------------------------------------------------------
55   PROCEDURE VERT_PAAP_SI_ADJUSTMENTS( x_expenditure_item_id      IN NUMBER,
56 							     x_invoice_id               IN NUMBER,
57 								 x_distribution_line_number IN NUMBER,
58 								 x_cdl_line_num				IN NUMBER,
59 								 x_project_id               IN NUMBER,
60 								 x_task_id                  IN NUMBER,
61 								 status                 IN OUT NOCOPY NUMBER ) ;
62 
63   -- ----------------------------------------------------------------
64   -- API to allow vertical applications to validate transaction
65   -- interface. This is called from PA_TRX_IMPORTS just after ValidateItem
66   -- -----------------------------------------------------------------
67   PROCEDURE VERT_APP_VALIDATE(  X_transaction_source    IN VARCHAR2,
68                                 X_CURRENT_BATCH         IN VARCHAR2,
69                                 X_txn_interface_id      IN NUMBER ,
70 								X_Org_id		IN NUMBER,
71                                 X_status            IN OUT NOCOPY Varchar2 ) ;
72 
73 
74 
75   PROCEDURE VERT_SI_ADJ ( x_expenditure_item_id			IN 	NUMBER,
76 						  x_invoice_id					IN  NUMBER,
77 						  x_distribution_line_number	IN  NUMBER,
78 						  x_project_id					IN  NUMBER,
79 						  x_task_id						IN  NUMBER,
80 						  status				    IN OUT NOCOPY  NUMBER ) ;
81 
82   FUNCTION IS_SPONSORED_PROJECT ( X_project_id	IN NUMBER ) return BOOLEAN ;
83 
84   -- ----------------------------------------------------------------------------------------
85   -- This function is called from PAAPIMP_PKG. OGM needs to consider award_id in the GROUP BY
86   -- clause used for NET_ZERO_ADJUSTMENTS. SO OGM returns award_ID for operating unit having
87   -- grants installation.
88   -- -----------------------------------------------------------------------------------------
89   FUNCTION VERT_GET_AWARD_ID ( x_award_set_id   		  IN NUMBER,
90 							   x_invoice_id   			  IN NUMBER,
91 							   x_distribution_line_number IN NUMBER ) return NUMBER ;
92 
93 /* R12 Changes Start */
94   PROCEDURE VERT_SET_ADJUST_ACTION(p_adjust_action IN VARCHAR2);
95 
96   PROCEDURE VERT_SET_PROJECT_ID( p_source_project_id IN VARCHAR2
97 			       , p_dest_project_id IN VARCHAR2);
98 
99   PROCEDURE VERT_SET_AWARD_ID( p_source_award_id IN VARCHAR2
100 			     , p_dest_award_id IN VARCHAR2);
101 
102   PROCEDURE VERT_GET_SRC_DEST_AWARD_ID( X_source_award_id OUT NOCOPY VARCHAR2
103 			              , X_dest_award_id OUT NOCOPY VARCHAR2);
104 
105   FUNCTION VERT_EI_AWD_EQUALS_SRC_AWD(p_expenditure_item_id NUMBER)
106   RETURN VARCHAR2;
107 
108   FUNCTION VERT_GET_EI_AWARD_ID(p_expenditure_item_id NUMBER)
109   RETURN NUMBER;
110 /* R12 Changes End */
111 
112 
113 /* Added for Bug 5490120
114    This function accepts the expenditure_item_id as the input and returns the award associated with
115    this expenditure item.
116    The function returns NULL if no award is associated with the expenditure item.
117 */
118   FUNCTION VERT_GET_AWARD_NUMBER(
119     p_expenditure_item_id IN PA_EXPENDITURE_ITEMS_ALL.EXPENDITURE_ITEM_ID%TYPE
120    ) RETURN VARCHAR2;
121 
122 /* Added for Bug 5490120
123    This function accepts the expenditure_item_id as the input.
124    If grants is not installed then the function returns 'Y'.
125    Else if the exenditure item belongs to a sponsored project:
126      The function determines the Award Number and verifies if the Award Number falls in the specified range.
127        If yes, then the function returns 'Y'.
128        If no, then the funciton returns 'N'.
129   If the expenditure item belongs to a non-sponsored project:
130     If award range is not specified then the function returns 'Y'
131     If award range is specified then the function returns 'N'
132 */
133   FUNCTION VERT_IS_AWARD_WITHIN_RANGE(
134     p_expenditure_item_id IN PA_EXPENDITURE_ITEMS_ALL.EXPENDITURE_ITEM_ID%TYPE
135    ,p_from_award_number IN GMS_AWARDS_ALL.AWARD_NUMBER%TYPE DEFAULT NULL
136    ,p_to_award_number IN GMS_AWARDS_ALL.AWARD_NUMBER%TYPE DEFAULT NULL
137    ) RETURN VARCHAR2;
138 
139 END PA_GMS_API;