1 PACKAGE OKI_DISCO_UTIL_PVT AUTHID CURRENT_USER AS
2 /* $Header: OKIRDULS.pls 115.2 2002/12/02 22:17:36 rpotnuru noship $ */
3 ---------------------------------------------------------------------------
4 -- Procedures and Functions
5 ---------------------------------------------------------------------------
6 ----------------------------------------------------------------------------
7 -- The following function derives the number of periods based
8 -- on sob_id, start and end date.
9 ----------------------------------------------------------------------------
10
11 FUNCTION get_num_periods(
12 p_sob_id IN NUMBER,
13 p_start_date in date,
14 p_end_date in date)
15 return number;
16 ----------------------------------------------------------------------------
17 -- The following function returns the original license order number
18 -- based on the chr_id
19 ----------------------------------------------------------------------------
20
21 FUNCTION get_order_number(
22 p_chr_id IN NUMBER)
23 RETURN VARCHAR2;
24
25 ----------------------------------------------------------------------------
26 -- The following function derives the most suitable period based
27 -- on a start and end date.
28 -- This function should be used in conjunction with get_duration function
29 ----------------------------------------------------------------------------
30 FUNCTION get_period(
31 p_start_date IN DATE ,
32 p_end_date IN DATE )
33 RETURN VARCHAR2;
34 ----------------------------------------------------------------------------
35 -- The following function derives the most suitable duration based
36 -- on a start and end date.
37 -- This function should be used in conjunction with get_period function
38 ----------------------------------------------------------------------------
39
40 FUNCTION get_duration(
41 p_start_date IN DATE ,
42 p_end_date IN DATE )
43 RETURN NUMBER;
44
45 ----------------------------------------------------------------------------
46 -- The following function derives the aanualized amount based
47 -- on amount, start and end date.
48 ----------------------------------------------------------------------------
49 FUNCTION get_annualized_amount(
50 p_amount IN NUMBER,
51 p_start_date IN DATE,
52 p_end_date IN DATE)
53 RETURN NUMBER;
54
55 ----------------------------------------------------------------------------
56 -- The following function derives current month revenue for the given
57 -- chr_id, sob_id, End date.
58 ----------------------------------------------------------------------------
59 FUNCTION get_cur_month_rev(
60 p_chr_id IN NUMBER,
61 p_sob_id IN NUMBER,
62 p_end_date IN DATE)
63 RETURN NUMBER;
64
65 ----------------------------------------------------------------------------
66 -- The following function derives backdated revenue for the given
67 -- chr_id, sob_id, End date.
68 ----------------------------------------------------------------------------
69 FUNCTION get_backdated_rev(
70 p_chr_id IN NUMBER,
71 p_sob_id IN NUMBER,
72 p_end_date IN DATE)
73 RETURN NUMBER;
74
75
76 END OKI_DISCO_UTIL_PVT;