1 PACKAGE GL_DATE_HANDLER_PKG as
2 /* $Header: glustdts.pls 120.5 2005/05/05 01:44:37 kvora ship $ */
3
4 --
5 -- Package
6 -- GL_DATE_HANDLER_PKG
7 -- Purpose
8 -- To implement a variety of routines related to dates
9 -- History
10 -- 10-DEC-96 D J Ogg Created
11 --
12
13 --
14 -- Procedure
15 -- find_active_period
16 -- Purpose
17 -- Finds the open or future enterable period associated with this
18 -- date.
19 -- History
20 -- 27-DEC-96 D. J. Ogg Created
21 -- Arguments
22 -- lgr_id Current ledger
23 -- calendar Calendar used by current ledger
24 -- per_type Accounting Period Type of current ledger
25 -- active_date Date of interest
26 -- active_period The desired period
27 -- per_start_date The desired period's start date
28 -- per_end_date The desired period's end date
29 -- per_number The desired period's number
30 -- per_year The desired period's year
31 -- Notes
32 --
33 PROCEDURE find_active_period( lgr_id NUMBER,
34 calendar VARCHAR2,
35 per_type VARCHAR2,
36 active_date DATE,
37 active_period IN OUT NOCOPY VARCHAR2,
38 per_start_date IN OUT NOCOPY DATE,
39 per_end_date IN OUT NOCOPY DATE,
40 per_number IN OUT NOCOPY NUMBER,
41 per_year IN OUT NOCOPY NUMBER
42 );
43
44 --
45 -- Procedure
46 -- find_enc_period
47 -- Purpose
48 -- Finds the period in an open encumbrance year associated with this date
49 -- History
50 -- 27-DEC-96 D. J. Ogg Created
51 -- Arguments
52 -- lgr_id Current ledger
53 -- calendar Calendar used by current ledger
54 -- per_type Accounting Period Type of current ledger
55 -- active_date Date of interest
56 -- active_period The desired period
57 -- per_start_date The desired period's start date
58 -- per_end_date The desired period's end date
59 -- per_number The desired period's number
60 -- per_year The desired period's year
61 -- Notes
62 --
63 PROCEDURE find_enc_period( lgr_id NUMBER,
64 calendar VARCHAR2,
65 per_type VARCHAR2,
66 active_date DATE,
67 active_period IN OUT NOCOPY VARCHAR2,
68 per_start_date IN OUT NOCOPY DATE,
69 per_end_date IN OUT NOCOPY DATE,
70 per_number IN OUT NOCOPY NUMBER,
71 per_year IN OUT NOCOPY NUMBER
72 );
73
74 --
75 -- Procedure
76 -- find_enc_period_batch
77 -- Purpose
78 -- Finds the period associated with this date which is in an open
79 -- encumbrance year for all the ledgers in the journal
80 -- History
81 -- 14-JUN-01 D. J. Ogg Created
82 -- Arguments
83 -- batch_id Batch whose ledgers are to be checked
84 -- calendar Calendar used by current ledger
85 -- per_type Accounting Period Type of current ledger
86 -- active_date Date of interest
87 -- active_period The desired period
88 -- per_start_date The desired period's start date
89 -- per_end_date The desired period's end date
90 -- per_number The desired period's number
91 -- per_year The desired period's year
92 -- Notes
93 --
94 PROCEDURE find_enc_period_batch(
95 batch_id NUMBER,
96 calendar VARCHAR2,
97 per_type VARCHAR2,
98 active_date DATE,
99 active_period IN OUT NOCOPY VARCHAR2,
100 per_start_date IN OUT NOCOPY DATE,
101 per_end_date IN OUT NOCOPY DATE,
102 per_number IN OUT NOCOPY NUMBER,
103 per_year IN OUT NOCOPY NUMBER
104 );
105
106 --
107 -- Procedure
108 -- validate_date
109 -- Purpose
110 -- Takes the accounting date, checks that it is in an open or future
111 -- enterable period, and finds the corresponding working date
112 -- History
113 -- 27-DEC-96 D. J. Ogg Copied from glfjeenb_pkg
114 -- Arguments
115 -- lgr_id The current ledger
116 -- roll_date If this is 'Y', then validate_date
117 -- will try to roll the date to a
118 -- working date, if it isn't one
119 -- initial_accounting_date The accounting date to be checked
120 -- minimum_date The date, when rolled, must be after
121 -- or equal to this date. This date
122 -- must be less than or equal to the
123 -- initial_accounting_date
124 -- minimum_period Period must be equal to or after
125 -- this period
126 -- period_name The period containing the date
127 -- start_date Start date of period
128 -- end_date End date of period
129 -- period_num Number of period
130 -- period_year Period year of period
131 -- rolled_accounted_date The business date corresponding to
132 -- the minimum date
133 -- Notes
134 --
135 PROCEDURE validate_date(lgr_id NUMBER,
136 roll_date VARCHAR2,
137 initial_accounting_date DATE,
138 minimum_date DATE,
139 minimum_period VARCHAR2,
140 period_name IN OUT NOCOPY VARCHAR2,
141 start_date IN OUT NOCOPY DATE,
142 end_date IN OUT NOCOPY DATE,
143 period_num IN OUT NOCOPY NUMBER,
144 period_year IN OUT NOCOPY NUMBER,
145 rolled_accounting_date IN OUT NOCOPY DATE);
146
147
148 --
149 -- Procedure
150 -- validate_date_batch
151 -- Purpose
152 -- Takes the accounting date, checks that it is in an open or future
153 -- enterable period, and finds the corresponding working date.
154 -- Checks this for all of the ledgers in the given batch
155 -- History
156 -- 14-JUN-01 D. J. Ogg Copied from validate_date
157 -- Arguments
158 -- batch_id The batch whose ledgers are to be
159 -- checked
160 -- roll_date If this is 'Y', then validate_date
161 -- will try to roll the date to a
162 -- working date, if it isn't one
163 -- initial_accounting_date The accounting date to be checked
164 -- minimum_date The date, when rolled, must be after
165 -- or equal to this date. This date
166 -- must be less than or equal to the
167 -- initial_accounting_date
168 -- minimum_period Period must be equal to or after
169 -- this period
170 -- period_name The period containing the date
171 -- start_date Start date of period
172 -- end_date End date of period
173 -- period_num Number of period
174 -- period_year Period year of period
175 -- rolled_accounted_date The business date corresponding to
176 -- the minimum date
177 -- Notes
178 --
179 PROCEDURE validate_date_batch(
180 batch_id NUMBER,
181 roll_date VARCHAR2,
182 initial_accounting_date DATE,
183 minimum_date DATE,
184 minimum_period VARCHAR2,
185 period_name IN OUT NOCOPY VARCHAR2,
186 start_date IN OUT NOCOPY DATE,
187 end_date IN OUT NOCOPY DATE,
188 period_num IN OUT NOCOPY NUMBER,
189 period_year IN OUT NOCOPY NUMBER,
190 rolled_accounting_date IN OUT NOCOPY DATE);
191
192
193 --
194 -- Procedure
195 -- find_from_period
196 -- Purpose
197 -- Finds the closed, open or permanently closed period associated with this
198 -- date.
199 -- History
200 -- 21-FEB-97 R Goyal Created
201 -- Arguments
202 -- lgr_id Current ledger
203 -- calendar Calendar used by current ledger
204 -- per_type Accounting Period Type of current ledger
205 -- active_date Date of interest
206 -- from_period The desired period
207 -- per_start_date The desired period's start date
208 -- per_end_date The desired period's end date
209 -- per_number The desired period's number
210 -- per_year The desired period's year
211 -- Notes
212 --
213 PROCEDURE find_from_period( lgr_id NUMBER,
214 calendar VARCHAR2,
215 per_type VARCHAR2,
216 active_date DATE,
217 from_period IN OUT NOCOPY VARCHAR2,
218 per_start_date IN OUT NOCOPY DATE,
219 per_end_date IN OUT NOCOPY DATE,
220 per_number IN OUT NOCOPY NUMBER,
221 per_year IN OUT NOCOPY NUMBER
222 );
223
224
225 END GL_DATE_HANDLER_PKG;