1 PACKAGE BODY FUN_SYSTEM_OPTIONS_PKG as
2 /* $Header: funsysutilb.pls 120.7 2004/01/07 00:26:48 aslai noship $ */
3
4 /*-----------------------------------------------------
5 * FUNCTION get_min_trx_amt
6 * ----------------------------------------------------
7 * Get the minimum transaction amount for a
8 * given currency. Returns T if the minimum
9 * amount can be retrieved.
10 * ---------------------------------------------------*/
11 function get_min_trx_amt(l_min_amt OUT NOCOPY NUMBER,
12 l_min_curr_code OUT NOCOPY VARCHAR2)
13 return boolean is
14 l_def_curr VARCHAR2(15);
15 BEGIN
16 SELECT min_trx_amt, min_trx_amt_currency, default_currency
17 INTO l_min_amt, l_min_curr_code, l_def_curr
18 FROM FUN_SYSTEM_OPTIONS
19 WHERE system_option_id = 0;
20 IF l_min_curr_code IS NULL THEN
21 l_min_curr_code := l_def_curr;
22 END IF;
23 return TRUE;
24 END;
25
26 /*-----------------------------------------------------
27 * FUNCTION is_apar_batch
28 * ----------------------------------------------------
29 * Test whether AP/AR transfer is batched.
30 * ---------------------------------------------------*/
31
32 function is_apar_batch return boolean
33 is
34 l_apar_batch FUN_SYSTEM_OPTIONS.apar_batch_flag%TYPE;
35 BEGIN
36 SELECT apar_batch_flag INTO l_apar_batch
37 FROM FUN_SYSTEM_OPTIONS
38 WHERE system_option_id = 0;
39 IF l_apar_batch = 'B' THEN
40 RETURN TRUE ;
41 END IF ;
42 return FALSE;
43 end is_apar_batch;
44
45 /*-----------------------------------------------------
46 * FUNCTION is_gl_batch
47 * ----------------------------------------------------
48 * Test whether GL transfer is batched.
49 * ---------------------------------------------------*/
50
51 function is_gl_batch return boolean
52 is
53 l_gl_batch FUN_SYSTEM_OPTIONS.gl_batch_flag%TYPE;
54 BEGIN
55 SELECT gl_batch_flag INTO l_gl_batch
56 FROM FUN_SYSTEM_OPTIONS
57 WHERE system_option_id = 0;
58 IF l_gl_batch = 'B' THEN
59 RETURN TRUE ;
60 END IF ;
61 return FALSE;
62 end is_gl_batch;
63
64
65
66
67 /*-----------------------------------------------------
68 * FUNCTION is_manual_numbering
69 * ----------------------------------------------------
70 * Test whether numbering is manual.
71 * ---------------------------------------------------*/
72
73 function is_manual_numbering return boolean
74 is
75 l_numbering_type FUN_SYSTEM_OPTIONS.numbering_type%TYPE;
76 BEGIN
77 SELECT numbering_type INTO l_numbering_type
78 FROM FUN_SYSTEM_OPTIONS
79 WHERE system_option_id = 0;
80 IF l_numbering_type = 'MAN' THEN
81 RETURN TRUE ;
82 END IF;
83 return FALSE;
84 end is_manual_numbering;
85
86
87
88
89 /*-----------------------------------------------------
90 * FUNCTION get_allow_reject
91 * ----------------------------------------------------
92 * Test whether the recipients can reject.
93 * ---------------------------------------------------*/
94
95 function get_allow_reject return boolean
96 is
97 l_allow_reject FUN_SYSTEM_OPTIONS.ALLOW_REJECT_FLAG%TYPE;
98 BEGIN
99 SELECT ALLOW_REJECT_FLAG INTO l_allow_reject
100 FROM FUN_SYSTEM_OPTIONS
101 WHERE system_option_id = 0;
102 IF l_allow_reject = 'Y' THEN
103 RETURN TRUE ;
104 END IF ;
105 return FALSE;
106 end get_allow_reject;
107
108
109
110
111 /*-----------------------------------------------------
112 * FUNCTION get_default_currency
113 * ----------------------------------------------------
114 * Get the default currency.
115 * Return the currency code.
116 * --------------------------------------------------- */
117
118 function get_default_currency return varchar2 IS
119 l_def_curr FUN_SYSTEM_OPTIONS.default_currency%TYPE DEFAULT null;
120 BEGIN
121 SELECT default_currency INTO l_def_curr
122 FROM FUN_SYSTEM_OPTIONS
123 WHERE system_option_id = 0;
124 RETURN l_def_curr ;
125 end get_default_currency;
126
127
128
129
130 /*-----------------------------------------------------
131 * FUNCTION get_exchg_rate_type
132 * ----------------------------------------------------
133 * Get the default exchange rate type.
134 * Return the conversion type.
135 * ---------------------------------------------------*/
136
137 function get_exchg_rate_type return varchar2
138 is
139 l_rate FUN_SYSTEM_OPTIONS.exchg_rate_type%TYPE DEFAULT null;
140 BEGIN
141 SELECT exchg_rate_type INTO l_rate
142 FROM FUN_SYSTEM_OPTIONS
143 WHERE system_option_id = 0;
144 RETURN l_rate ;
145 end get_exchg_rate_type;
146
147
148
149 END fun_system_options_pkg;
150 ----------------------------------------------------------------------
151 -- END OF PACKAGE BODY
152 ----------------------------------------------------------------------
153