1 PACKAGE pay_us_balance_view_pkg AUTHID CURRENT_USER AS
2 /* $Header: pybaluev.pkh 115.7 2004/02/17 03:44:27 sdahiya ship $ */
3 /* Copyright (c) Oracle Corporation 1998. All rights reserved. */
4 /*
5 --
6 Name : pybaluev.pkh
7 Author : A Rashid
8 Date Created : 29th October 1997
9 Description : US Balance Code
10 Date BugNo Author Comment
11 -----------+---------+---------+--------------------------------------
12 06-NOV-1997 A Rashid Created.
13 06-DEC-1997 B Homan updated for US 10.7
14 11-MAY-1998 T Battoo modified so GRE PYDATE routes work over a range
15 14-MAY-1998 B Homan modified debug_dump_to_trace to support p_trace_id
16 26-MAY-1998 B Homan addedd set_session_var and get_session_var
17
18 Version Date Author Bugno Comment
19 --------|------------|---------|-------|---------------------------------------
20 110.3 06-JUN-1999 JARTHURT Added new SOURCE_ID context
21 115.4 06-11-2001 TCLEWIS added new structure(s) gre_record_type,
22 gre_table_type and session gre_table.
23 115.5 04-OCT-2002 Tclewis Removed pragma definitions for the
24 get_value functions.
25 115.7 17-FEB-2004 SDAHIYA 3331035 Deleted following sub-program declarations: -
26 - goto_per_latest_balances
27 - goto_asg_latest_balances
28 - goto_route
29 - run_route
30 */
31 --------------------------------
32 -- DATA STRUCTURE DEFINITIONS --
33 --------------------------------
34
35 --------------------
36 -- Latest Balance --
37 --------------------
38 type LatBal is record
39 (
40 -- latest_balance_id
41 --
42 lat_balid pay_assignment_latest_balances.latest_balance_id%type,
43 --
44 -- latest balance
45 --
46 assactid pay_assignment_latest_balances.assignment_action_id%type,
47 value pay_assignment_latest_balances.value%type,
48 actseq pay_assignment_actions.action_sequence%type,
49 effdate date,
50 --
51 -- previous latest balance
52 --
53 -- prv_assactid pay_assignment_latest_balances.prev_assignment_action_id%type,
54 -- prv_value pay_assignment_latest_balances.prev_balance_value%type,
55 -- prv_actseq pay_assignment_actions.action_sequence%type,
56 -- prv_effdate date,
57 --
58 -- expired balance
59 --
60 exp_assactid pay_assignment_latest_balances.expired_assignment_action_id%type,
61 exp_value pay_assignment_latest_balances.expired_value%type,
62 exp_actseq pay_assignment_actions.action_sequence%type,
63 exp_effdate date
64 );
65
66 -----------------------------
67 -- List of Latest Balances --
68 -----------------------------
69 -- BHOMAN - can't PLSQL tables of records, so replace LatBalList
70 -- with individual tables for each element
71 -- type LatBalList is table of LatBal index by binary_integer;
72 type ListLatBalId is table of
73 pay_assignment_latest_balances.latest_balance_id%type
74 index by binary_integer;
75 type ListAssActId is table of
76 pay_assignment_latest_balances.assignment_action_id%type
77 index by binary_integer;
78 type ListValue is table of
79 pay_assignment_latest_balances.value%type
80 index by binary_integer;
81 type ListActSeq is table of
82 pay_assignment_actions.action_sequence%type
83 index by binary_integer;
84 type ListEffDate is table of
85 date
86 index by binary_integer;
87 type ListExpAssActID is table of
88 pay_assignment_latest_balances.expired_assignment_action_id%type
89 index by binary_integer;
90 type ListExpValue is table of
91 pay_assignment_latest_balances.expired_value%type
92 index by binary_integer;
93 type ListExpActSeq is table of
94 pay_assignment_actions.action_sequence%type
95 index by binary_integer;
96 type ListExpEffDate is table of
97 date
98 index by binary_integer;
99 ------------------------------------------------------------------------------
100 -- Index for ranges of values in Latest Balance, and Context Values caches. --
101 ------------------------------------------------------------------------------
102 type CacheIndex is record
103 (
104 index1 number,
105 index2 number
106 );
107
108 ---------------------
109 -- List of Indexes --
110 ---------------------
111 -- type CacheIndexList is table of CacheIndex index by binary_integer;
112
113 type SublistBounds is table of number index by binary_integer;
114
115 -------------
116 -- Context --
117 -------------
118 type Ctx is record
119 (
120 ctxid ff_contexts.context_id%type,
121 ctxnam ff_contexts.context_name%type,
122 ctxval pay_balance_context_values.value%type
123 );
124
125 ----------------------
126 -- List of Contexts --
127 ----------------------
128 -- BHOMAN - can't PLSQL tables of records, so replace CtxList
129 -- with individual tables for each element
130 -- type CtxList is table of Ctx index by binary_integer;
131 type ListCtxId is table of
132 ff_contexts.context_id%type
133 index by binary_integer;
134 type ListCtxName is table of
135 ff_contexts.context_name%type
136 index by binary_integer;
137 type ListCtxValue is table of
138 pay_balance_context_values.value%type
139 index by binary_integer;
140
141
142 ---------------------
143 -- Defined Balance --
144 ---------------------
145 type DefBal is record
146 (
147 bal_typid pay_balance_types.balance_type_id%type,
148 juris_lvl pay_balance_types.jurisdiction_level%type,
149 dbi_suffix pay_balance_dimensions.database_item_suffix%type,
150 dim_type pay_balance_dimensions.dimension_type%type,
151 dim_name pay_balance_dimensions.dimension_name%type
152 );
153
154 ------------------------------
155 -- List of Defined Balances --
156 ------------------------------
157 -- BHOMAN - can't PLSQL tables of records, so replace DefBalList
158 -- with individual tables for each element
159 -- type DefBalList is table of DefBal index by binary_integer;
160 type ListBalTypeId is table of
161 pay_balance_types.balance_type_id%type
162 index by binary_integer;
163 type ListJurisLvl is table of
164 pay_balance_types.jurisdiction_level%type
165 index by binary_integer;
166 type ListDbiSuffix is table of
167 pay_balance_dimensions.database_item_suffix%type
168 index by binary_integer;
169 type ListDimType is table of
170 pay_balance_dimensions.dimension_type%type
171 index by binary_integer;
172 type ListDimName is table of
173 pay_balance_dimensions.dimension_name%type
174 index by binary_integer;
175
176 -- each PLSQL table type needs a NULL table with which
177 -- we can reset it, since we cannot use delete operator
178 -- in earlier versions of PLSQL
179 ZeroBounds SublistBounds;
180 ZeroLatBalId ListLatBalId;
181 ZeroAssActId ListAssActId;
182 ZeroValue ListValue;
183 ZeroActSeq ListActSeq;
184 ZeroEffDate ListEffDate;
185 ZeroExpAssActId ListExpAssActID;
186 ZeroExpValue ListExpValue;
187 ZeroExpActSeq ListExpActSeq;
188 ZeroExpEffDate ListExpEffDate;
189 ZeroCtxId ListCtxId;
190 ZeroCtxName ListCtxName;
191 ZeroCtxValue ListCtxValue;
192
193 --------------------------------
194 -- GRE RECORD AND TABLE TYPES --
195 --------------------------------
196
197 TYPE gre_record_type IS RECORD
198 (tax_unit_id number,
199 tax_group_name varchar2(150));
200
201 TYPE gre_table_type is table of gre_record_type
202 index by binary_integer;
203 --
204 -- this table contains the list of tax_units / tax_groups
205 session_gre_table gre_table_type;
206 --
207
208 ------------------------------------------------------------------
209 -- Positions of context values in input context list. Supported --
210 -- contexts are ASSIGNMENT_ACTION_ID, TAX_UNIT_ID, TAX_GROUP, --
211 -- JURISDICTION_CODE, DATE_EARNED, BUSINESS_GROUP_ID, --
212 -- BALANCE_DATE and SOURCE_ID. --
213 ------------------------------------------------------------------
214
215 pos_invalid constant number := -1;
216 pos_assignment_action_id constant number := 1;
217 pos_jurisdiction_code constant number := 2;
218 pos_tax_unit_id constant number := 3;
219 pos_tax_group constant number := 4;
220 pos_date_earned constant number := 5;
221 pos_business_group_id constant number := 6;
222 pos_balance_date constant number := 7;
223 pos_source_id constant number := 8;
224
225 ------------------
226 -- GLOBAL STATE --
227 ------------------
228
229 --------------------------------------------------------
230 -- assignment_id for which latest balances are cached --
231 --------------------------------------------------------
232 cached_assignment_id number := -1;
233
234 ----------------------------------------------------
235 -- person_id for which latest balances are cached --
236 ----------------------------------------------------
237 cached_person_id number := -1;
238
239 ----------------------------------------------------
240 -- Mode string used by high level functions called
241 -- called in views. Set this to 'ASG', 'GRE', or
242 -- and value willbe passed as param to balance
243 -- functions like us_tax_balance and us_named_balance
244 ----------------------------------------------------
245 balance_view_mode varchar(3) := 'ASG';
246
247 ----------------------------------------------------
248 -- BOOLEAN flag used by high level functions called
249 -- called in views. Set this to TRUE and balances
250 -- are calculated or retrieved by us_tax_balance_vm
251 -- and us_named_balance for p_time_types of
252 -- PYDATE and MONTH. Set this to FALSE, and these
253 -- functions return NULL for these time types.
254 ----------------------------------------------------
255 CalcAllTimeTypes number := 0;
256
257 -----------------------------------------------------------------------------
258 -- Assignment Latest Balance Cache --
259 -- ------------------------------- --
260 -- ALBValues is a list of Latest Balance values for cached_assignment_id. --
261 -- --
262 -- ALBIndex is indexed by defined_balance_id. ALBIndex.index1 and --
263 -- ALBIndex.index2, respectively, point to the start and end of the --
264 -- ALBValues corresponding to a given defined_balance_id. MaxALBIndex is --
265 -- the next free slot in ALBValues. --
266 -- --
267 -- ALB2CIndex is indexed by latest_balance_id. ALB2CIndex.index1 and --
268 -- ALB2CIndex.index2, respectively, point to the start and end of the --
269 -- ALB2CValues corresponding the a given latest_balance_id. MaxALB2CIndex --
270 -- is the next free slot in ALB2CValues. --
271 -----------------------------------------------------------------------------
272
273 MaxALBIndex number := 0;
274 -- BHOMAN - can't PLSQL tables of records...
275 -- ALBIndex CacheIndexList;
276 -- ALBValues LatBalList;
277 ALBStart SublistBounds;
278 ALBEnd SublistBounds;
279 ALBLatBalId ListLatBalId;
280 ALBAssActId ListAssActId;
281 ALBValue ListValue;
282 ALBActSeq ListActSeq;
283 ALBEffDate ListEffDate;
284 ALBExpAssActId ListExpAssActID;
285 ALBExpValue ListExpValue;
286 ALBExpActSeq ListExpActSeq;
287 ALBExpEffDate ListExpEffDate;
288
289 MaxALB2CIndex number := 0;
290 -- BHOMAN - can't PLSQL tables of records...
291 -- ALB2CIndex CacheIndexList;
292 -- ALB2CValues CtxList;
293 ALB2CStart SublistBounds;
294 ALB2CEnd SublistBounds;
295 ALB2CtxId ListCtxId;
296 ALB2CtxName ListCtxName;
297 ALB2CtxValue ListCtxValue;
298
299 ---------------------------------------------------------------------------
300 -- Person Latest Balance Cache --
301 -- --------------------------- --
302 -- Same as the Assignment Latest Balance Cache except that it caches --
303 -- Latest Person Balance values for cached_person_id. --
304 -- There are two caches to simplify clearing out the cache when there is --
305 -- a change in person_id or assignment_id. --
306 ---------------------------------------------------------------------------
307
308 MaxPLBIndex number := 0;
309 -- BHOMAN - can't PLSQL tables of records...
310 -- PLBIndex CacheIndexList;
311 -- PLBValues LatBalList;
312 PLBStart SublistBounds;
313 PLBEnd SublistBounds;
314 PLBLatBalId ListLatBalId;
315 PLBAssActId ListAssActId;
316 PLBValue ListValue;
317 PLBActSeq ListActSeq;
318 PLBEffDate ListEffDate;
319 PLBExpAssActId ListExpAssActID;
320 PLBExpValue ListExpValue;
321 PLBExpActSeq ListExpActSeq;
322 PLBExpEffDate ListExpEffDate;
323
324 MaxPLB2CIndex number := 0;
325 -- BHOMAN - can't PLSQL tables of records...
326 -- PLB2CIndex CacheIndexList;
327 -- PLB2CValues CtxList;
328 PLB2CStart SublistBounds;
329 PLB2CEnd SublistBounds;
330 PLB2CtxId ListCtxId;
331 PLB2CtxName ListCtxName;
332 PLB2CtxValue ListCtxValue;
333
334 -----------------------------------------------------------------------
335 -- Defined Balance Cache --
336 -- --------------------- --
337 -- DBC is indexed by defined_balance_id. This cache is never cleared --
338 -- during a session. --
339 -----------------------------------------------------------------------
340 -- BHOMAN - can't PLSQL tables of records...
341 -- DBC DefBalList;
342 DBCBalTypeId ListBalTypeId;
343 DBCJurisLvl ListJurisLvl;
344 DBCDbiSuffix ListDbiSuffix;
345 DBCDimType ListDimType;
346 DBCDimName ListDimName;
347
348 ------------------------------------------------------
349 -- input context value list (indexed by context_id) --
350 ------------------------------------------------------
351 -- BHOMAN - can't PLSQL tables of records...
352 -- CtxValsCtxId CtxList;
353 CtxIdById ListCtxId;
354 CtxNameById ListCtxName;
355 CtxValueById ListCtxValue;
356
357 ----------------------------------------------------------
358 -- input context value list (indexed by pos_ constants) --
359 ----------------------------------------------------------
360 -- BHOMAN - can't PLSQL tables of records...
361 -- CtxValsPos CtxList;
362 CtxIdByPos ListCtxId;
363 CtxNameByPos ListCtxName;
364 CtxValueByPos ListCtxValue;
365
366
367 -------------------------
368 -- Debug Message State --
369 -------------------------
370 DebugOn BOOLEAN;
371 DebugLineCount NUMBER;
372 DebugLineMax NUMBER;
373 type ListLines is table of
374 VARCHAR2(120)
375 index by binary_integer;
376 DebugList ListLines;
377
378 --------------------------------
379 -- SESSION VARIABLES --
380 --------------------------------
381 -- The following code declares table type for storage of var names
382 -- and values; and function to set and retrieve values from those
383 -- tables.. We use two separate tables to store names and values
384 -- because the PLSQL provided with 10.7 apps does not support storing
385 -- records in PLSQL index by tables. So, for the var named "COLOR"
386 -- with value "BLUE", we would store 'COLOR' at index x of table
387 -- SessionVarNames, and 'BLUE' at index x of SessionVarValues.
388 --
389 -- Names and values are limited to 64 characters.
390 --
391 -- The get and set functions force the name parameter to upper case
392 -- before storing in, or searching the table. The value parameter
393 -- is not converted.
394 --
395 -- The set function does not store NULL names, but it will store
396 -- NULL values. NOTE this level of PLSQL does not support the
400 -- unfortunate implications for performance if we store a large
397 -- NEXT .. LAST attributes on PLSQL index by tables in WNDS pure
398 -- functions. So we just store a NULL value when p_value is NULL
399 -- (or tracking table count would be too messy). This has
401 -- number of variables.
402 --
403 type VarTable is table of VARCHAR2(150)
404 index by binary_integer;
405 --
406 -- this table contains the session var names
407 SessionVarNames VarTable;
408 --
409 -- this table contains the session var values
410 SessionVarValues VarTable;
411
412 -- The EmptyTable var is used to NULL other tables. (PLSQL
413 -- that is certified with 10.7 APPS does not support
414 -- using delete on a PLSQL table.) This table does
415 -- not get populated.
416 --
417 EmptyTable VarTable;
418
419 -- NOTE the level of PLSQL certified for 10.7 Apps does not support
420 -- the use of the NEXT or LAST attributes on PLSQL index by tables
421 -- in WNDS pure code. So we must manually track the count of
422 -- table entries.
423 SessionVarCount NUMBER;
424
425 -------------------------------------
426 -- PROCEDURE/FUNCTION DECLARATIONS --
427 -------------------------------------
428 --------------------------------------------------------------------------------
429 --
430 -- get_session_var - main function
431 FUNCTION get_session_var(p_name VARCHAR2) return VARCHAR2;
432 PRAGMA RESTRICT_REFERENCES(get_session_var, WNDS);
433 --
434 -- get_session_var with default parameter; if value not set, returns default.
435 FUNCTION get_session_var(p_name VARCHAR2, p_default VARCHAR) return VARCHAR2;
436 PRAGMA RESTRICT_REFERENCES(get_session_var, WNDS);
437 --------------------------------------------------------------------------------
438 PROCEDURE set_session_var (p_name IN VARCHAR2, p_value IN VARCHAR2);
439 PRAGMA RESTRICT_REFERENCES(set_session_var, WNDS);
440 --------------------------------------------------------------------------------
441 PROCEDURE clear_session_vars;
442 PRAGMA RESTRICT_REFERENCES(clear_session_vars, WNDS);
443 --------------------------------------------------------------------------------
444 --------------------------------------------------------------------------------
445 PROCEDURE debug_init;
446 PROCEDURE debug_wrap;
447 PRAGMA RESTRICT_REFERENCES(debug_init, WNDS);
448 PRAGMA RESTRICT_REFERENCES(debug_wrap, WNDS);
449 --
450 -- following debug funcs not WNDS-pure, not called from this pkg
451 --
452 PROCEDURE debug_set_max( p_max IN NUMBER);
453 PROCEDURE debug_on;
454 PROCEDURE debug_off;
455 PROCEDURE debug_reset;
456 PROCEDURE debug_dump;
457 PROCEDURE debug_dump_to_trace(p_trace_id IN VARCHAR2 DEFAULT NULL);
458 PROCEDURE debug_dump_err;
459 PROCEDURE debug_dump_like(p_string_like IN VARCHAR2);
460 PROCEDURE debug_dump(p_start_line IN NUMBER,
461 p_end_line IN NUMBER);
462 FUNCTION debug_get_line(p_line_number IN NUMBER) return VARCHAR2;
463 FUNCTION debug_get_count return NUMBER;
464 --------------------------------------------------------------------------------
465 -- BHOMAN - moved debug_msg decl above debug_toggle decl
466 PROCEDURE debug_msg ( p_debug_message IN VARCHAR2);
467 PRAGMA RESTRICT_REFERENCES(debug_msg, WNDS);
468 --------------------------------------------------------------------------------
469 PROCEDURE debug_err ( p_debug_message IN VARCHAR2);
470 PRAGMA RESTRICT_REFERENCES(debug_err, WNDS);
471 --------------------------------------------------------------------------------
472 PROCEDURE debug_toggle;
473 PRAGMA RESTRICT_REFERENCES(debug_toggle, WNDS);
474 --------------------------------------------------------------------------------
475 -- view mode set and retrieve functions
476 --------------------------------------------------------------------------------
477 FUNCTION get_view_mode return VARCHAR2;
478 PRAGMA RESTRICT_REFERENCES(get_view_mode, WNDS);
479 --------------------------------------------------------------------------------
480 PROCEDURE set_view_mode ( p_view_mode IN VARCHAR2);
481 PRAGMA RESTRICT_REFERENCES(set_view_mode, WNDS);
482
483 --------------------------------------------------------------------------------
484 -- CalcAllTimeTypes flag set and retrieve functions
485 --------------------------------------------------------------------------------
486 FUNCTION get_calc_all_timetypes_flag return NUMBER;
487 PRAGMA RESTRICT_REFERENCES(get_calc_all_timetypes_flag, WNDS);
488 --------------------------------------------------------------------------------
489 PROCEDURE set_calc_all_timetypes_flag ( p_calc_all IN NUMBER);
490 PRAGMA RESTRICT_REFERENCES(set_calc_all_timetypes_flag, WNDS);
491 --------------------------------------------------------------------------------
492 -- balance functions
493 --------------------------------------------------------------------------------
494 FUNCTION get_value ( p_assignment_action_id IN NUMBER,
495 p_defined_balance_id IN NUMBER,
496 p_dont_cache IN NUMBER,
497 p_always_get_dbi IN NUMBER,
498 p_date_mode IN NUMBER,
499 p_effective_date IN DATE )
500 RETURN NUMBER;
501 --PRAGMA RESTRICT_REFERENCES(get_value, WNDS);
502 --------------------------------------------------------------------------------
503 FUNCTION get_value( p_assignment_action_id IN NUMBER,
504 p_defined_balance_id IN NUMBER,
505 p_dont_cache IN NUMBER,
506 p_always_get_dbi IN NUMBER )
510 FUNCTION get_value( p_assignment_action_id IN NUMBER,
507 RETURN NUMBER;
508 --PRAGMA RESTRICT_REFERENCES(get_value, WNDS);
509 --------------------------------------------------------------------------------
511 p_defined_balance_id IN NUMBER )
512 RETURN NUMBER;
513 --PRAGMA RESTRICT_REFERENCES(get_value, WNDS);
514 --------------------------------------------------------------------------------
515 FUNCTION get_value( p_assignment_id IN NUMBER,
516 p_defined_balance_id IN NUMBER,
517 p_effective_date IN DATE )
518 RETURN NUMBER;
519 --PRAGMA RESTRICT_REFERENCES(get_value, WNDS);
520 --------------------------------------------------------------------------------
521 FUNCTION get_value( p_assignment_id IN NUMBER,
522 p_defined_balance_id IN NUMBER,
523 p_effective_date IN DATE,
524 p_dont_cache IN NUMBER )
525 RETURN NUMBER;
526 --PRAGMA RESTRICT_REFERENCES(get_value, WNDS);
527 --------------------------------------------------------------------------------
528 PROCEDURE clear_asgbal_cache;
529 PRAGMA RESTRICT_REFERENCES(clear_asgbal_cache, WNDS);
530 --------------------------------------------------------------------------------
531 PROCEDURE clear_perbal_cache;
532 PRAGMA RESTRICT_REFERENCES(clear_perbal_cache, WNDS);
533 --------------------------------------------------------------------------------
534 PROCEDURE set_context( p_context_name IN VARCHAR2,
535 p_context_value IN VARCHAR2 );
536 PRAGMA RESTRICT_REFERENCES(set_context, WNDS);
537
538 --------------------------------------------------------------------------------
539 FUNCTION get_context ( p_context_name IN VARCHAR2)
540 return VARCHAR2;
541 PRAGMA RESTRICT_REFERENCES(get_context, WNDS);
542
543 --------------------------------------------------------------------------------
544 -- BHOMAN
545 PROCEDURE dump_context;
546 PROCEDURE dump_context( p_known_name IN VARCHAR2,
547 p_pos IN NUMBER );
548 --------------------------------------------------------------------------------
549 PROCEDURE clear_contexts;
550 PRAGMA RESTRICT_REFERENCES(clear_contexts, WNDS);
551 --------------------------------------------------------------------------------
552 -- Expiry Checking Code (mostly taken from pyusexc.pkh)
553 --------------------------------------------------------------------------------
554 FUNCTION date_expired( p_owner_assignment_action_id IN NUMBER,
555 p_user_assignment_action_id IN NUMBER,
556 p_owner_effective_date IN DATE,
557 p_user_effective_date IN DATE,
558 p_dimension_name IN VARCHAR2,
559 p_date_mode IN NUMBER )
560 RETURN BOOLEAN;
561 PRAGMA RESTRICT_REFERENCES(date_expired, WNDS);
562 --------------------------------------------------------------------------------
563 FUNCTION next_period( p_assactid IN NUMBER,
564 p_date IN DATE )
565 RETURN DATE;
566 PRAGMA RESTRICT_REFERENCES(next_period, WNDS);
567 --------------------------------------------------------------------------------
568 FUNCTION next_month( p_date IN DATE )
569 RETURN DATE;
570 PRAGMA RESTRICT_REFERENCES(next_month, WNDS);
571 --------------------------------------------------------------------------------
572 FUNCTION next_quarter( p_date IN DATE )
573 RETURN DATE;
574 PRAGMA RESTRICT_REFERENCES(next_quarter, WNDS);
575 --------------------------------------------------------------------------------
576 FUNCTION next_year( p_date IN DATE )
577 RETURN DATE;
578 PRAGMA RESTRICT_REFERENCES(next_year, WNDS);
579 --------------------------------------------------------------------------------
580 FUNCTION next_fiscal_year( p_beg_of_fiscal_year IN DATE,
581 p_date IN DATE )
582 RETURN DATE;
583 PRAGMA RESTRICT_REFERENCES(next_fiscal_year, WNDS);
584 --------------------------------------------------------------------------------
585 FUNCTION next_fiscal_quarter( p_beg_of_fiscal_year IN DATE,
586 p_date IN DATE )
587 RETURN DATE;
588 PRAGMA RESTRICT_REFERENCES(next_fiscal_quarter, WNDS);
589 --------------------------------------------------------------------------------
590 FUNCTION CurrentTime
591 RETURN INTEGER;
592 --------------------------------------------------------------------------------
593 END pay_us_balance_view_pkg;