DBA Data[Home] [Help]

PACKAGE: APPS.PA_INVOICE_ACTIONS

Source


1 Package PA_Invoice_Actions AUTHID CURRENT_USER as
2 /* $Header: PAXVIACS.pls 120.1 2005/08/19 17:22:45 mwasowic noship $ */
3 
4 /*----------------------------------------------------------------------------*/
5 -- Start of Comments
6 -- API Name      : Validate_Approval
7 -- Type          : Private
8 -- Pre-Reqs      : None
9 -- Function      : Perform Validation Checks for Approving Customer invoices
10 --                 Depending on the validation Level
11 -- Parameters    :
12 -- IN              P_Project_ID          IN   NUMBER     Required
13 --                          Project Identifier. Corresponds to the Column
14 --                          PROJECT_ID of PA_PROJECTS_ALL Table
15 --                 P_Draft_Invoice_Num   IN   NUMBER     Required
16 --                          Draft Invoice Number. Corresponds to the Column
17 --                          DRAFT_INVOICE_NUM of PA_DRAFT_INVOICES_ALL Table
18 --                 P_Validation_Level    IN   VARCHAR2   Required
19 --                          Validation Check that needs to be performed.
20 --                          Valid Values R - Record Level  C - Commit Level
21 -- OUT             X_Error_Message_Code  OUT   NUMBER    Optional
22 --                          Application Error Message Code. Value of Null
23 --                          Indicates no Application error encountered
24 --
25 -- End of Comments
26 /*----------------------------------------------------------------------------*/
27   Procedure Validate_Approval ( P_Project_ID         in  number,
28                                 P_Draft_Invoice_Num  in  number,
29                                 P_Validation_Level   in  varchar2,
30                                 X_Error_Message_Code out NOCOPY varchar2 ); --File.Sql.39 bug 4440895
31 
32 
33 
34 /*----------------------------------------------------------------------------*/
35 -- Start of Comments
36 -- API Name      : Validate_Release
37 -- Type          : Private
38 -- Pre-Reqs      : None
39 -- Function      : Perform Validation Checks for Releasing Customer invoices
40 --                 Depending on the validation Level. This Procedure will also
41 --                 get the next RA Invoice Number if Implementation option has
42 --                 been defined as 'AUTOMATIC'
43 -- Parameters    :
44 -- IN              P_Project_ID          IN   NUMBER     Required
45 --                          Project Identifier. Corresponds to the Column
46 --                          PROJECT_ID of PA_PROJECTS_ALL Table
47 --                 P_Draft_Invoice_Num   IN   NUMBER     Required
48 --                          Draft Invoice Number. Corresponds to the Column
49 --                          DRAFT_INVOICE_NUM of PA_DRAFT_INVOICES_ALL Table
50 --                 P_Validation_Level    IN   VARCHAR2   Required
51 --                          Validation Check that needs to be performed.
52 --                          Valid Values R - Record Level
53 --                                       C - Commit Level
54 --                                 P_INV_DT- Invoice Date Level
55 --                                P_INV_NUM- Invoice Number Level
56 --                 X_User_ID             IN   NUMBER     Required
57 --                          Logged in UserId.
58 --                 P_RA_Invoice_Date     IN   DATE       Optional
59 --                          AR's INvoice Date. Corresponds to the Column
60 --                          RA_INVOICE_DATE of PA_DRAFT_INVOICES_ALL Table
61 --                 P_RA_Invoice_Num      IN   VARCHAR2   Optional
62 --                          AR's Invoice Num. Corresponds to the Column
63 --                          RA_INVOICE_NUM of PA_DRAFT_INVOICES_ALL Table
64 --                 P_Credit_Memo_Reason_Code  IN OUT VARCHAR2 Optional
65 --                          P_Credit_Memo_Reason_Code Corresponds to the Column
66 --                          Credit_Memo_Reason_Code of PA_DRAFT_INVOICES_ALL Table
67 -- OUT             X_RA_Invoice_Num      OUT   VARCHAR2   Optional
68 --                          AR's Invoice Num. Corresponds to the Column
69 --                          RA_INVOICE_NUM of PA_DRAFT_INVOICES_ALL Table.
70 --                          Invoice Number will be the same as P_RA_INVOICE_NUM
71 --                          for Mannual entry Implementation Option. For
72 --                          AUTOMATIC Imp. Option this will be generated during
73 --                          Commit Level Validation.
74 --                 X_Error_Message_Code  OUT   NUMBER    Optional
75 --                          Application Error Message Code. Value of Null
76 --                          Indicates no Application error encountered
77 --
78 -- End of Comments
79 /*----------------------------------------------------------------------------*/
80   Procedure Validate_Release  ( P_Project_ID              in     number,
81                                 P_Draft_Invoice_Num       in     number,
82                                 P_Validation_Level        in     varchar2,
83                                 P_User_ID                 in     number,
84                                 P_RA_Invoice_Date         in     date,
85                                 P_RA_Invoice_Num          in     varchar2,
86 			        P_Credit_Memo_Reason_Code in out NOCOPY varchar2, --File.Sql.39 bug 4440895
87                                 X_RA_Invoice_Num          out    NOCOPY varchar2, --File.Sql.39 bug 4440895
88                                 X_Error_Message_Code      out    NOCOPY varchar2); --File.Sql.39 bug 4440895
89 
90   /* Overloaded Procedure validate_release for Credit Memo Reason ARU Compatibility*/
91   Procedure Validate_Release  ( P_Project_ID              in     number,
92                                 P_Draft_Invoice_Num       in     number,
93                                 P_Validation_Level        in     varchar2,
94                                 P_User_ID                 in     number,
95                                 P_RA_Invoice_Date         in     date,
96                                 P_RA_Invoice_Num          in     varchar2,
97                                 X_RA_Invoice_Num          out    NOCOPY varchar2, --File.Sql.39 bug 4440895
98                                 X_Error_Message_Code      out    NOCOPY varchar2); --File.Sql.39 bug 4440895
99 
100 
101 
102 /*----------------------------------------------------------------------------*/
103 -- Start of Comments
104 -- API Name      : Validate_Multi_Customer
105 -- Type          : Private
106 -- Pre-Reqs      : None
107 -- Function      : Validate Invoice Approval/Release Multi-Customer Check
108 -- Parameters    :
109 -- IN              P_Invoice_Set_ID      IN   NUMBER     Required
110 --                          Set Id for set of Project Invoices. Corresponds to
111 --                          INVOICE_SET_ID of PA_DRAFT_INVOICES_ALL Table
112 -- OUT             X_Error_Message_Code  OUT   VARCHAR2  Optional
113 --                          Application Error Message Code. Value of Null
114 --                          Indicates no Application error encountered
115 --
116 --
117 -- End of Comments
118 /*----------------------------------------------------------------------------*/
119   Procedure Validate_Multi_Customer( P_Invoice_Set_ID     in  number,
120                                      X_Error_Message_Code out NOCOPY varchar2);  --File.Sql.39 bug 4440895
121 
122 
123 
124 /*----------------------------------------------------------------------------*/
125 -- Start of Comments
126 -- API Name      : Post_Update_Release
127 -- Type          : Private
128 -- Pre-Reqs      : None
129 -- Function      : Post Update Invoice Release Steps
130 -- Parameters    :
131 -- IN              P_Project_ID          IN   NUMBER     Required
132 --                          Project Identifier. Corresponds to the Column
133 --                          PROJECT_ID of PA_PROJECTS_ALL Table
134 --                 P_Draft_Invoice_Num   IN   NUMBER     Required
135 --                          Draft Invoice Number. Corresponds to the Column
136 --                          DRAFT_INVOICE_NUM of PA_DRAFT_INVOICES_ALL Table
137 --                 X_User_ID             IN   NUMBER     Required
138 --                          Logged in UserId.
139 --                 X_Employee_ID         IN   NUMBER     Required
140 --                          Employee_ID attached to the userid.
141 -- End of Comments
142 /*----------------------------------------------------------------------------*/
143   Procedure Post_Update_Release ( P_Project_ID         in  number,
144                                   P_Draft_Invoice_Num  in  number,
145                                   P_User_ID            in  number,
146                                   P_Employee_ID        in  number);
147 
148 
149 
150 
151 /*----------------------------------------------------------------------------*/
152 -- Start of Comments
153 -- API Name      : Client_Extn_Driver
154 -- Type          : Private
155 -- Pre-Reqs      : None
156 -- Function      : Call Client billing extension for Automatic Approval/Release
157 --                 of on Invoice from Generate Draft Invoice
158 -- Parameters    :
159 -- IN              P_Request_ID          IN   NUMBER     Required
160 --                          Request ID of the Generate Draft Invoice Process.
161 --                          Corresponds to REQUEST_ID of PA_DRAFT_INVOICES_ALL
162 --                 X_User_ID             IN   NUMBER     Required
163 --                          Logged in UserId.
164 --                 X_Calling_Place       IN   varchar2   Required
165 --                          Calling Place from Generate Invoice (PAIGEN) i
166 --                          Program. Valid Values are
167 --                             INV_CR_MEMO  - Invoice/Credit Memo Processing
168 --                             WRITE_OFF    - Write Off Processing
169 --                             CANCEL       - Cancel Processing
170 --                 P_Project_ID          IN   NUMBER     Optional
171 --                          Project Identifier. Corresponds to the Column
172 --                          PROJECT_ID of PA_PROJECTS_ALL Table
173 --
174 -- End of Comments
175 /*----------------------------------------------------------------------------*/
176   Procedure Client_Extn_Driver( P_Request_ID         in  number,
177                                 P_User_ID            in  number,
178                                 P_Calling_Place      in  varchar2,
179                                 P_Project_ID         in  number    );
180 
181 
182   /* Begin Concession invoice modification */
183 
184   PROCEDURE init_draft_inv_lines(
185              p_project_id        IN     NUMBER,
186              p_draft_invoice_num IN     NUMBER,
187              x_return_status     OUT   NOCOPY VARCHAR2,
188              x_msg_count         OUT   NOCOPY NUMBER,
189              x_msg_data          OUT   NOCOPY VARCHAR2);
190 
191   Procedure update_credit_qual_lines (
192              p_project_id             IN NUMBER,
193              p_credit_action          IN VARCHAR2,
194              p_credit_action_type     IN VARCHAR2,
195              p_draft_invoice_num      IN NUMBER,
196              p_draft_invoice_line_num IN NUMBER,
197              p_line_credit_amount     IN NUMBER,
198              x_return_status          OUT   NOCOPY VARCHAR2,
199              x_msg_count              OUT   NOCOPY NUMBER,
200              x_msg_data               OUT   NOCOPY VARCHAR2);
201 
202   Procedure validate_line_credit_amount (
203              p_project_id             IN NUMBER,
204              p_credit_action          IN VARCHAR2,
205              p_credit_action_type     IN VARCHAR2,
206              p_draft_invoice_num      IN NUMBER,
207              p_draft_invoice_line_num IN NUMBER,
208              p_inv_amount             IN NUMBER,
209              p_credit_amount          IN NUMBER,
210              x_return_status          OUT   NOCOPY VARCHAR2,
211              x_msg_count              OUT   NOCOPY NUMBER,
212              x_msg_data               OUT   NOCOPY VARCHAR2);
213 
214   Procedure distribute_credit_amount (
215              p_project_id             IN NUMBER,
216              p_credit_action          IN VARCHAR2,
217              p_credit_action_type     IN VARCHAR2,
218              p_draft_invoice_num      IN NUMBER,
219              p_total_credit_amount    IN NUMBER,
220              x_return_status          OUT   NOCOPY VARCHAR2,
221              x_msg_count              OUT   NOCOPY NUMBER,
222              x_msg_data               OUT   NOCOPY VARCHAR2);
223 
224   Procedure distribute_credit_amount_retn (
225              p_project_id             IN NUMBER,
226              p_draft_invoice_num      IN NUMBER,
227              x_return_status          OUT   NOCOPY VARCHAR2,
228              x_msg_count              OUT   NOCOPY NUMBER,
229              x_msg_data               OUT   NOCOPY VARCHAR2)   ;
230 
231   Procedure compute_retn_credit_amount (
232              p_project_id             IN NUMBER,
233              p_draft_invoice_num      IN NUMBER,
234              p_retention_rule_id      IN NUMBER,
235              p_retention_line_num     IN NUMBER,
236              p_retained_amount        IN NUMBER,
237              p_amount                 IN NUMBER,
238              p_credit_amount          IN NUMBER,
239              x_return_status          OUT   NOCOPY VARCHAR2,
240              x_msg_count              OUT   NOCOPY NUMBER,
241              x_msg_data               OUT   NOCOPY VARCHAR2);
242 
243  Procedure check_concurrency_issue (
244              p_project_id             IN NUMBER,
245              p_draft_invoice_num      IN NUMBER,
246              p_rec_version_number     IN NUMBER,
247              x_return_status          OUT   NOCOPY VARCHAR2,
248              x_msg_count              OUT   NOCOPY NUMBER,
249              x_msg_data               OUT   NOCOPY VARCHAR2);
250 
251  Procedure validate_invoice_amount (
252              p_project_id             IN NUMBER,
253              p_credit_action          IN VARCHAR2,
254              p_credit_action_type     IN VARCHAR2,
255              p_draft_invoice_num      IN NUMBER,
256              p_invoice_amount         IN NUMBER,
257              p_net_inv_amount         IN NUMBER,
258              p_credit_amount          IN NUMBER,
259              p_balance_due            IN NUMBER,
260              x_tot_credited_amt       OUT   NOCOPY NUMBER,
261              x_return_status          OUT   NOCOPY VARCHAR2,
262              x_msg_count              OUT   NOCOPY NUMBER,
263              x_msg_data               OUT   NOCOPY VARCHAR2);
264 
265 end PA_Invoice_Actions;