1 package pa_purge_validate_billing AUTHID CURRENT_USER as
2 /* $Header: PAXBIVTS.pls 120.1 2005/08/19 17:09:28 mwasowic noship $ */
3
4 -- Start of comments
5 -- API name : Validate_Billing
6 -- Type : Public
7 -- Pre-reqs : None
8 -- Function : Validates the data in billing tables before purge for a project
9 -- and reports the invalid data conditions
10 -- The following validations are performed
11 --
12 -- 1.All the expenditure items should be revenue distributed.
13 -- 2.All the draft revenues are transferred and accepted in GL.
14 -- 3.All the draft invoices are transferred and accepted in AR.
15 -- 4.All revenue are summarized.
16 -- 5.Unbilled Recievables and Unearned Revenue should be zero.
17 -- 6.Events having completion date should be processed
18 --
19 --
20 -- Parameters p_batch_id IN NUMBER
21 -- The purge batch id for which rows have
22 -- to be purged/archived.
23 -- p_project_Id IN NUMBER,
24 -- The project id for which records have
25 -- to be purged/archived.
26 -- p_Active_Flag IN VARCHAR2,
27 -- Indicates if batch contains ACTIVE or CLOSED projects
28 -- ( 'A' - Active , 'C' - Closed)
29 -- p_Txn_To_Date IN DATE,
30 -- Date on or before which all transactions are to be purged
31 -- (Will be used by Costing only)
32 -- X_Err_Stack IN OUT VARCHAR2,
33 -- Error stack
34 -- X_Err_Stage IN OUT VARCHAR2,
35 -- Stage in the procedure where error occurred
36 -- X_Err_Code IN OUT NUMBER
37 -- Error code returned from the procedure
38 -- = 0 SUCCESS
39 -- > 0 Application error
40 -- < 0 Oracle error
41 -- End of comments
42 procedure validate_billing ( p_project_id in NUMBER,
43 p_txn_to_date in DATE,
44 p_active_flag in VARCHAR2,
45 x_err_code in OUT NOCOPY NUMBER, --File.Sql.39 bug 4440895
46 x_err_stack in OUT NOCOPY VARCHAR2, --File.Sql.39 bug 4440895
47 x_err_stage in OUT NOCOPY VARCHAR2 ) ; --File.Sql.39 bug 4440895
48
49 END pa_purge_validate_billing;