1 PACKAGE OKL_SUBSIDY_POOL_PVT AUTHID CURRENT_USER AS
2 /* $Header: OKLRSIPS.pls 120.1 2005/10/30 03:17:12 appldev noship $ */
3 ---------------------------------------------------------------------------
4 -- GLOBAL VARIABLES
5 ---------------------------------------------------------------------------
6
7 G_APP_NAME CONSTANT VARCHAR2(3) := OKL_API.G_APP_NAME;
8 G_PKG_NAME CONSTANT VARCHAR2(200) := 'OKL_SUBSIDY_POOL_PVT';
9 G_API_TYPE CONSTANT VARCHAR2(4) := '_PVT';
10 G_EXCEPTION_HALT_VALIDATION EXCEPTION;
11
12
13 SUBTYPE subsidy_pool_rec IS okl_sip_pvt.sipv_rec_type ;
14 ---------------------------------------------------------------------------
15 -- Procedures and Functions
16 ---------------------------------------------------------------------------
17 ---------------------------------------------------------------------------
18 -- PROCEDURE create_sub_pool
19 ---------------------------------------------------------------------------
20 -- Start of comments
21 --
22 -- Procedure Name : create_sub_pool
23 -- Description : procedure for inserting the records in
24 -- table OKL_SUBSIDY_POOLS_B AND OKL_SUBSIDY_POOLS_TL
25 -- Business Rules : This procedure creates a subsidy pool with the status "new"
26 -- in the table OKL_SUBSIDY_POOLS_B.
27 -- Parameters : p_api_version, p_init_msg_list, x_return_status, x_msg_count,
28 -- x_msg_data, p_sub_pool_rec, x_sub_pool_rec.
29 -- Version : 1.0
30 -- End of comments
31 ---------------------------------------------------------------------------
32
33 PROCEDURE create_sub_pool ( p_api_version IN NUMBER
34 ,p_init_msg_list IN VARCHAR2
35 ,x_return_status OUT NOCOPY VARCHAR2
36 ,x_msg_count OUT NOCOPY NUMBER
37 ,x_msg_data OUT NOCOPY VARCHAR2
38 ,p_sub_pool_rec IN subsidy_pool_rec
39 ,x_sub_pool_rec OUT NOCOPY subsidy_pool_rec
40 );
41
42 ---------------------------------------------------------------------------
43 -- PROCEDURE update_sub_pool
44 ---------------------------------------------------------------------------
45 -- Start of comments
46 --
47 -- Procedure Name : update_sub_pool
48 -- Description : procedure for updating the records in
49 -- table OKL_SUBSIDY_POOLS_B AND OKL_SUBSIDY_POOLS_TL
50 -- Business Rules : Procedure to update the subsidy pool.
51 -- Parameters : p_api_version, p_init_msg_list, x_return_status, x_msg_count,
52 -- x_msg_data, p_sub_pool_rec, x_sub_pool_rec.
53 -- Version : 1.0
54 -- End of comments
55 ---------------------------------------------------------------------------
56
57 PROCEDURE update_sub_pool ( p_api_version IN NUMBER
58 ,p_init_msg_list IN VARCHAR2
59 ,x_return_status OUT NOCOPY VARCHAR2
60 ,x_msg_count OUT NOCOPY NUMBER
61 ,x_msg_data OUT NOCOPY VARCHAR2
62 ,p_sub_pool_rec IN subsidy_pool_rec
63 ,x_sub_pool_rec OUT NOCOPY subsidy_pool_rec
64 );
65 ---------------------------------------------------------------------------
66 -- PROCEDURE expire_sub_pool
67 ---------------------------------------------------------------------------
68 -- Start of comments
69 --
70 -- Procedure Name : expire_sub_pool
71 -- Description : procedure for validating that if the records exist in the
72 -- table OKL_SUBSIDY_POOLS_B then set its status to expire.
73 -- Business Rules : This procedure sets the pool status to "expire"and this is
74 -- an autonomous transaction.
75 -- Parameters : p_api_version, p_init_msg_list, x_return_status, x_msg_count,
76 -- x_msg_data, p_subsidy_pool_id.
77 -- Version : 1.0
78 -- End of comments
79 ---------------------------------------------------------------------------
80
81 PROCEDURE expire_sub_pool ( p_api_version IN NUMBER,
82 p_init_msg_list IN VARCHAR2,
83 x_return_status OUT NOCOPY VARCHAR2,
84 x_msg_count OUT NOCOPY NUMBER,
85 x_msg_data OUT NOCOPY VARCHAR2,
86 p_subsidy_pool_id IN okl_subsidy_pools_b.id%TYPE);
87
88 ---------------------------------------------------------------------------
89 -- PROCEDURE update_total_budget
90 ---------------------------------------------------------------------------
91 -- Start of comments
92 --
93 -- Procedure Name : update_total_budget
94 -- Description : procedure for updating the total budget amount
95 -- table OKL_SUBSIDY_POOLS_B.
96 -- Business Rules : As soon as any of the budget line attached to a subsisy pool gets
97 -- approved this procedure is called to update the total budgets of the pool
98 -- Parameters : p_api_version, p_init_msg_list, x_return_status, x_msg_count,
99 -- x_msg_data, p_subsidy_pool_id,p_total_budget_amt.
100 -- Version : 1.0
101 -- End of comments
102 ---------------------------------------------------------------------------
103
104 PROCEDURE update_total_budget ( p_api_version IN NUMBER,
105 p_init_msg_list IN VARCHAR2,
106 x_return_status OUT NOCOPY VARCHAR2,
107 x_msg_count OUT NOCOPY NUMBER,
108 x_msg_data OUT NOCOPY VARCHAR2,
109 p_subsidy_pool_id IN okl_subsidy_pools_b.id%TYPE,
110 p_total_budget_amt IN okl_subsidy_pools_b.total_budgets%TYPE );
111
112 ---------------------------------------------------------------------------
113 -- PROCEDURE update_subsidy_amount
114 ---------------------------------------------------------------------------
115 -- Start of comments
116 --
117 -- Procedure Name : update_subsidy_amount
118 -- Description : procedure for updating the total subsidy amount
119 -- table OKL_SUBSIDY_POOLS_B.
120 -- Business Rules : subsidy amount is updated when the contract is booked, rebooked or a
121 -- quote is created, or a contract is reversed.
122 -- Parameters : p_api_version, p_init_msg_list, x_return_status, x_msg_count,
123 -- x_msg_data, p_subsidy_pool_id, p_total_subsidy_amt.
124 -- Version : 1.0
125 -- End of comments
126 ---------------------------------------------------------------------------
127
128 PROCEDURE update_subsidy_amount ( p_api_version IN NUMBER,
129 p_init_msg_list IN VARCHAR2,
130 x_return_status OUT NOCOPY VARCHAR2,
131 x_msg_count OUT NOCOPY NUMBER,
132 x_msg_data OUT NOCOPY VARCHAR2,
133 p_subsidy_pool_id IN okl_subsidy_pools_b.id%TYPE,
134 p_total_subsidy_amt IN okl_subsidy_pools_b.total_subsidy_amount%TYPE);
135
136 ---------------------------------------------------------------------------
137 -- PROCEDURE set_decision_status_code
138 ---------------------------------------------------------------------------
139 -- Start of comments
140 --
141 -- Procedure Name : set_decision_status_code
142 -- Description : procedure for updating the decision status code
143 -- table OKL_SUBSIDY_POOLS_B.
144 -- Business Rules : Procedure sets the decision_status_code to the value passed to this procedure.
145 -- this is a status of a pool.
146 -- Parameters : p_api_version, p_init_msg_list, x_return_status, x_msg_count,
147 -- x_msg_data, p_subsidy_pool_id,p_decision_status_code.
148 -- Version : 1.0
149 -- End of comments
150 ---------------------------------------------------------------------------
151
152 PROCEDURE set_decision_status_code ( p_api_version IN NUMBER,
153 p_init_msg_list IN VARCHAR2,
154 x_return_status OUT NOCOPY VARCHAR2,
155 x_msg_count OUT NOCOPY NUMBER,
156 x_msg_data OUT NOCOPY VARCHAR2,
157 p_subsidy_pool_id IN okl_subsidy_pools_b.id%TYPE,
158 p_decision_status_code IN OUT NOCOPY okl_subsidy_pools_b.decision_status_code%TYPE);
159
160 ---------------------------------------------------------------------------
161 -- PROCEDURE validate_sub_pool
162 ---------------------------------------------------------------------------
163 -- Start of comments
164 --
165 -- Procedure Name : validate_sub_pool
166 -- Description : procedure for validating the records in
167 -- table OKL_SUBSIDY_POOLS_B AND OKL_SUBSIDY_POOLS_TL
168 -- Business Rules : Validates the record passed to it.
169 -- Parameters : p_api_version, p_init_msg_list, x_return_status, x_msg_count,
170 -- x_msg_data, p_sub_pool_rec.
171 -- Version : 1.0
172 -- End of comments
173 ---------------------------------------------------------------------------
174
175 PROCEDURE validate_sub_pool( p_api_version IN NUMBER,
176 p_init_msg_list IN VARCHAR2,
177 x_return_status OUT NOCOPY VARCHAR2,
178 x_msg_count OUT NOCOPY NUMBER,
179 x_msg_data OUT NOCOPY VARCHAR2,
180 p_sub_pool_rec IN subsidy_pool_rec);
181
182 END OKL_SUBSIDY_POOL_PVT;