DBA Data[Home] [Help]

PACKAGE: APPS.PA_CLIENT_EXTN_INV_ACTIONS

Source


1 Package PA_Client_Extn_Inv_Actions AUTHID CURRENT_USER as
2 /* $Header: PAXPIACS.pls 120.5 2006/07/25 06:38:10 lveerubh noship $ */
3 /*#
4  * This extension contains procedures that you can use as the basis for automatic invoice approve
5  * or release extension procedures.
6  * @rep:scope public
7  * @rep:product PA
8  * @rep:lifecycle active
9  * @rep:displayname Automatic Invoice Approve/Release Extension
10  * @rep:compatibility S
11  * @rep:category BUSINESS_ENTITY PA_PROJECT
12  * @rep:category BUSINESS_ENTITY PA_INVOICE
13  * @rep:doccd 120pjapi.pdf See the Oracle Projects API's, Client Extensions, and Open Interfaces Reference
14 */
15 /*----------------------------------------------------------------------------*/
16 -- Start of Comments
17 -- API Name      : Approve_Invoice
18 -- Type          : Public
19 -- Pre-Reqs      : None
20 -- Function      : Oracle Projects Billing Client Extension for Approval of
21 --                 Draft Invoice.
22 -- Parameters    :
23 -- IN              P_Project_ID          IN   NUMBER     Required
24 --                          Project Identifier. Corresponds to the Column
25 --                          PROJECT_ID of PA_PROJECTS_ALL Table
26 --                 P_Draft_Invoice_Num   IN   NUMBER     Required
27 --                          Draft Invoice Number. Corresponds to the Column
28 --                          DRAFT_INVOICE_NUM of PA_DRAFT_INVOICES_ALL Table
29 --                 P_Invoice_Class       IN   VARCHAR2   Required
30 --                          Class of the Invoice. Valid Values are
31 --                               INVOICE        - Regular Invoice
32 --                               CREDIT_MEMO    - Crediting Invoice
33 --                               WRITE_OFF      - Write-Off Invoice
34 --                               CANCEL         - Canceling Invoice
35 --                 P_Project_Amount      IN   Number   Required
36 --                          Amount on the Draft Invoice in project currency.
37 --                 P_Project_Currency_Code   IN   Varchar2   Required
38 --                          project currency code on the draft invoice.
39 --                 P_Inv_Currency_Code   IN   Varchar2   Required
40 --                          invoice currency code on the draft invoice.
41 --                 P_Invoice_Amount      IN   Number   Required
42 --                          Amount on the Draft Invoice in invoice currency.
43 -- OUT             X_Approve_Flag        OUT   VARCHAR2  Optional
44 --                          Invoice Approval Flag. Valid values are
45 --                            Y             -  Approve Invoice
46 --                            Other Values  -  Do not Approve Invoice
47 --                 X_Status              OUT   VARCHAR2  Optional
48 --                          Return Status of the Procedure. Values are
49 --                               = 0    - Successfull Execution
50 --                               < 0    - Oracle Error
51 --                               > 0    - Application Error
52 --
53 -- End of Comments
54 /*----------------------------------------------------------------------------*/
55 /*#
56  * This procedure is used to approve the invoice extensions.
57  * @param P_Project_ID The identifier of the project to which the draft invoice number is attached
58  * @rep:paraminfo {@rep:required}
59  * @param P_Draft_Invoice_Num The draft invoice number
60  * @rep:paraminfo {@rep:required}
61  * @param P_Invoice_Class The class of the invoice
62  * @rep:paraminfo {@rep:required}
63  * @param P_Project_Amount Amount of the invoice in project currency
64  * @rep:paraminfo {@rep:required}
65  * @param P_Project_Currency_Code The project currency code
66  * @rep:paraminfo {@rep:required}
67  * @param P_Inv_Currency_Code The invoice currency code
68  * @rep:paraminfo {@rep:required}
69  * @param P_Invoice_Amount Amount of the invoice in invoice currency
70  * @rep:paraminfo {@rep:required}
71  * @param X_Approve_Flag Flag indicating the invoice approval. The valid values are: Y = Yes (approve invoice), Any other value = do not approve
72  * @rep:paraminfo {@rep:required}
73  * @param X_Status Status indicating whether an error occurred. The valid values are =0 (Success), <0 (SQL Error) OR >0 (Application Error)
74  * @rep:paraminfo {@rep:required}
75  * @rep:scope public
76  * @rep:lifecycle active
77  * @rep:displayname Approve Invoice
78  * @rep:compatibility S
79 */
80   Procedure Approve_Invoice ( P_Project_ID         in  number,
81                               P_Draft_Invoice_Num  in  number,
82                               P_Invoice_Class      in  varchar2,
83                               P_Project_Amount     in  number,
84                               P_Project_Currency_Code in  varchar2,
85                               P_Inv_Currency_Code  in  varchar2,
86                               P_Invoice_Amount     in  number,
87                               X_Approve_Flag       out NOCOPY varchar2, --File.Sql.39 bug 4440895
88                               X_Status             out NOCOPY number    ); --File.Sql.39 bug 4440895
89 
90 
91 
92 /*----------------------------------------------------------------------------*/
93 -- Start of Comments
94 -- API Name      : Release_Invoice
95 -- Type          : Public
96 -- Pre-Reqs      : None
97 -- Function      : Oracle Projects Billing Client Extension for Release of
98 --                 Draft Invoice.
99 -- Parameters    :
100 -- IN              P_Project_ID          IN   NUMBER     Required
101 --                          Project Identifier. Corresponds to the Column
102 --                          PROJECT_ID of PA_PROJECTS_ALL Table
103 --                 P_Draft_Invoice_Num   IN   NUMBER     Required
104 --                          Draft Invoice Number. Corresponds to the Column
105 --                          DRAFT_INVOICE_NUM of PA_DRAFT_INVOICES_ALL Table
106 --                 P_Invoice_Class       IN   VARCHAR2   Required
107 --                          Class of the Invoice. Valid Values are
108 --                               INVOICE        - Regular Invoice
109 --                               CREDIT_MEMO    - Crediting Invoice
110 --                               WRITE_OFF      - Write-Off Invoice
111 --                               CANCEL         - Canceling Invoice
112 --                 P_Project_Amount      IN   Number   Required
113 --                          Amount on the Draft Invoice in project currency.
114 --                 P_Project_Currency_Code   IN   Varchar2   Required
115 --                          project currency code on the draft invoice.
116 --                 P_Inv_Currency_Code   IN   Varchar2   Required
117 --                          invoice currency code on the draft invoice.
118 --                 P_Invoice_Amount      IN   Number   Required
119 --                          Amount on the Draft Invoice in invoice currency.
120 -- OUT             X_Release_Flag        OUT   VARCHAR2  Optional
121 --                          Invoice Release Flag. Valid values are
122 --                            Y             -  Release Invoice
123 --                            Other Values  -  Do not Release Invoice
124 --                 X_RA_Invoice_Date     IN   DATE       Required
125 --                          AR's INvoice Date. Corresponds to the Column
126 --                          RA_INVOICE_DATE of PA_DRAFT_INVOICES_ALL Table
127 --                 X_RA_Invoice_Num      IN   VARCHAR2   Optional
128 --                          AR's Invoice Num. Corresponds to the Column
129 --                          RA_INVOICE_NUM of PA_DRAFT_INVOICES_ALL Table
130 --                 X_Status              OUT   VARCHAR2  Optional
131 --                          Return Status of the Procedure. Values are
132 --                               = 0    - Successfull Execution
133 --                               < 0    - Oracle Error
134 --                               > 0    - Application Error
135 --                 X_Credit_Memo_Reason_Code      OUT   VARCHAR2   Optional
136 --                          x_Credit_Memo_Reason_Code. Corresponds to the Column
137 --                          Credit_Memo_Reason_Code of PA_DRAFT_INVOICES_ALL Table
138 --
139 -- End of Comments
140 /*----------------------------------------------------------------------------*/
141 /*#
142  * This procedure is used to release the invoice extensions.
143  * @param P_Project_ID The identifier of the project to which the draft invoice number is attached
144  * @rep:paraminfo {@rep:required}
145  * @param P_Draft_Invoice_Num The draft invoice number
146  * @rep:paraminfo {@rep:required}
147  * @param P_Invoice_Class The class of the invoice.
148  * @rep:paraminfo {@rep:required}
149  * @param P_Project_Amount Amount of the invoice in project currency
150  * @rep:paraminfo {@rep:required}
151  * @param P_Project_Currency_Code The project currency code
152  * @rep:paraminfo {@rep:required}
153  * @param P_Inv_Currency_Code The invoice currency code
154  * @rep:paraminfo {@rep:required}
155  * @param P_Invoice_Amount Amount of the invoice in invoice currency.
156  * @rep:paraminfo {@rep:required}
157  * @param X_Release_Flag Flag indicating the invoice release status. The valid values are: Y = Yes (release invoice), Any other value = do not release
158  * @rep:paraminfo {@rep:required}
159  * @param X_RA_Invoice_Date The receivable invoice date. This parameter is validated only when the X_RELEASE_FLAG = Y
160  * @rep:paraminfo {@rep:required}
161  * @param X_RA_Invoice_Num The receivable invoice number. If the automatic invoice
162  * numbering is active, then this parameter is not required. This parameter is validated only when the X_RELEASE_FLAG = Y
163  * @rep:paraminfo {@rep:required}
164  * @param X_Status Status indicating whether an error occurred. The valid values are =0 (Success), <0 (SQL Error) OR >0 (Application Error)
165  * @rep:paraminfo {@rep:required}
166  * @param X_Credit_Memo_Reason_Code The credit memo reason
167  * @rep:paraminfo {@rep:required}
168  * @rep:scope public
169  * @rep:lifecycle active
170  * @rep:displayname Release Invoice
171  * @rep:compatibility S
172 */
173   Procedure Release_Invoice ( P_Project_ID              in  number,
174                               P_Draft_Invoice_Num       in  number,
175                               P_Invoice_Class           in  varchar2,
176                               P_Project_Amount          in  number,
177                               P_Project_Currency_Code   in  varchar2,
178                               P_Inv_Currency_Code       in  varchar2,
179                               P_Invoice_Amount          in  number,
180                               X_Release_Flag            out NOCOPY varchar2, --File.Sql.39 bug 4440895
181                               X_RA_Invoice_Date         out NOCOPY date, --File.Sql.39 bug 4440895
182                               X_RA_Invoice_Num          out NOCOPY varchar2, --File.Sql.39 bug 4440895
183                               X_Status                  out NOCOPY number, --File.Sql.39 bug 4440895
184 			      X_Credit_Memo_Reason_Code out  NOCOPY varchar2); --File.Sql.39 bug 4440895
185 
186   /* Overloaded Procedure release_invoice for Credit Memo Reason ARU Compatibility*/
187 /*#
188  * This procedure is used to release the invoice extensions.
189  * @param P_Project_ID The Identifier of the project to which the draft invoice number is attached
190  * @rep:paraminfo {@rep:required}
191  * @param P_Draft_Invoice_Num The draft invoice number
192  * @rep:paraminfo {@rep:required}
193  * @param P_Invoice_Class The class of the invoice
194  * @rep:paraminfo {@rep:required}
195  * @param P_Project_Amount Amount of the invoice in project currency
196  * @rep:paraminfo {@rep:required}
197  * @param P_Project_Currency_Code The project currency code
198  * @rep:paraminfo {@rep:required}
199  * @param P_Inv_Currency_Code The invoice currency code
200  * @rep:paraminfo {@rep:required}
201  * @param P_Invoice_Amount Amount of the invoice in invoice currency
205  * @param X_RA_Invoice_Date The receivable invoice date. This parameter is validated only when the X_RELEASE_FLAG = Y
202  * @rep:paraminfo {@rep:required}
203  * @param X_Release_Flag Flag indicating the invoice release status. The valid values are: Y = Yes (release invoice), Any other value = do not release
204  * @rep:paraminfo {@rep:required}
206  * @rep:paraminfo {@rep:required}
207  * @param X_RA_Invoice_Num The receivable invoice number. If the automatic invoice
208  * numbering is active, then this parameter is not required. This parameter is validated only when the X_RELEASE_FLAG = Y
209  * @rep:paraminfo {@rep:required}
210  * @param X_Status Status indicating whether an error occurred. The valid values are =0 (Success), <0 (SQL Error) OR >0 (Application Error)
211  * @rep:paraminfo {@rep:required}
212  * @rep:scope public
213  * @rep:lifecycle active
214  * @rep:displayname Release Invoice
215  * @rep:compatibility S
216 */
217 Procedure Release_Invoice ( P_Project_ID              in  number,
218                               P_Draft_Invoice_Num       in  number,
219                               P_Invoice_Class           in  varchar2,
220                               P_Project_Amount          in  number,
221                               P_Project_Currency_Code   in  varchar2,
222                               P_Inv_Currency_Code       in  varchar2,
223                               P_Invoice_Amount          in  number,
224                               X_Release_Flag            out NOCOPY varchar2, --File.Sql.39 bug 4440895
228 
225                               X_RA_Invoice_Date         out NOCOPY date, --File.Sql.39 bug 4440895
226                               X_RA_Invoice_Num          out NOCOPY varchar2, --File.Sql.39 bug 4440895
227                               X_Status                  out NOCOPY number); --File.Sql.39 bug 4440895
229 
230 
231 END PA_Client_Extn_Inv_Actions;