1 PACKAGE FA_UTILS_PKG as
2 /* $Header: FAXUTILS.pls 120.2 2005/06/24 17:01:17 snarayan ship $ */
3
4 TYPE faxcurr_type IS RECORD(
5 set_of_books_id number,
6 currency_code varchar2(15),
7 precision number);
8
9 TYPE faxcurr_tab IS TABLE OF faxcurr_type
10 index by binary_integer;
11
12 TYPE faxlookups_tab IS TABLE OF VARCHAR2(80)
13 INDEX BY BINARY_INTEGER;
14
15 -- variables for cache
16 --
17 faxcurr_record faxcurr_type;
18 faxcurr_table faxcurr_tab;
19
20 faxlkpmg_table faxlookups_tab;
21 faxlkpcd_table faxlookups_tab;
22
23 /******************************************************************************
24 *
25 * Name : faxrnd
26 *
27 * Description: Round function to round off amount based on the precision
28 * of currency and book
29 *
30 * Parameters: X_amount - amount to be rounded off.
31 * X_book - book_type_code to get associated currency and
32 * precision
33 *
34 * Returns: True if successful, False otherwise
35 *
36 * *****************************************************************************/
37
38 FUNCTION faxrnd(X_amount IN OUT NOCOPY NUMBER,
39 X_book IN VARCHAR2,
40 p_log_level_rec in fa_api_types.log_level_rec_type default null)
41
42 RETURN BOOLEAN;
43
44
45 /*****************************************************************************
46 *
47 * Name : faxtru
48 *
49 * Description: Truncate function to truncate X_in_num based on the
50 * precision of currency and book
51 *
52 * Parameters: X_in_num - amount to be truncated
53 * X_book_type_code - book_type_code to get associated
54 * currency and precision
55 * X_out_num - truncated value (OUT)
56 *
57 * Returns: True if successful, False otherwise
58 *
59 ******************************************************************************/
60 FUNCTION faxtru (X_num IN OUT NOCOPY number,
61 X_book_type_code IN VARCHAR2,
62 p_log_level_rec in fa_api_types.log_level_rec_type default null)
63 RETURN BOOLEAN;
64
65
66 /******************************************************************************
67 *
68 * Name : faxceil
69 *
70 * Description: Round function to round up amount based on the precision
71 * of currency and book
72 *
73 * Parameters: X_amount - amount to be rounded up.
74 * X_book - book_type_code to get associated currency and
75 * precision
76 *
77 * Returns: True if successful, False otherwise
78 *
79 * *****************************************************************************/
80
81 FUNCTION faxceil(X_amount IN OUT NOCOPY NUMBER,
82 X_book IN VARCHAR2,
83 p_log_level_rec in fa_api_types.log_level_rec_type default null)
84
85 RETURN BOOLEAN;
86
87
88 /******************************************************************************
89 *
90 * Name : faxfloor
91 *
92 * Description: Round function to round off amount based on the precision
93 * of currency and book
94 *
95 * Parameters: X_amount - amount to be rounded off.
96 * X_book - book_type_code to get associated currency and
97 * precision
98 *
99 * Returns: True if successful, False otherwise
100 *
101 * *****************************************************************************/
102
103 FUNCTION faxfloor(X_amount IN OUT NOCOPY NUMBER,
104 X_book IN VARCHAR2,
105 p_log_level_rec in fa_api_types.log_level_rec_type default null)
106
107 RETURN BOOLEAN;
108
109 /******************************************************************************
110 *
111 * Name : faxlkp_meaning
112 *
113 * Description: Gets the meaning for given lookup_type and lookup_code
114 *
115 * Parameters: X_lookup_type - Lookup_type to get associated meaning.
116 * X_lookup_code - Lookup_code to get associated meaning.
117 *
118 * Returns: The Meaning for the given Lookup_type and Lookup_code
119 *
120 * *****************************************************************************/
121
122 FUNCTION faxlkp_meaning(X_lookup_type IN VARCHAR2,
123 X_lookup_code IN VARCHAR2,
124 p_log_level_rec in fa_api_types.log_level_rec_type default null)
125
126 RETURN VARCHAR2;
127
128 /******************************************************************************
129 *
130 * Name : faxlkp_code
131 *
132 * Description: Gets the lookup_code for given Lookup_type and meaning
133 *
134 *
135 * Parameters: X_lookup_type - Lookup_type to get associated Lookup_code.
136 * X_meaning - Meaning to get associated Lookup_code.
137 *
138 * Returns: The Lookup_code for the give Lookup_type and Meaning.
139 *
140 * *****************************************************************************/
141
142 FUNCTION faxlkp_code(X_lookup_type IN VARCHAR2,
143 X_meaning IN VARCHAR2,
144 p_log_level_rec in fa_api_types.log_level_rec_type default null)
145
146 RETURN VARCHAR2;
147
148 END FA_UTILS_PKG;