DBA Data[Home] [Help]

PACKAGE: APPS.PAY_CA_BALANCE_VIEW_PKG

Source


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