DBA Data[Home] [Help]

PACKAGE BODY: APPS.JL_ZZ_SYS_OPTIONS_PKG

Source


1 PACKAGE BODY JL_ZZ_SYS_OPTIONS_PKG AS
2 /* $Header: jlzzsopb.pls 120.11 2006/12/21 19:22:57 appradha ship $ */
3 
4 
5 /* ==========================================================*
6  | Fetches the value of Bank Transfer Currency               |
7  * ==========================================================*/
8 
9         FUNCTION get_bank_transfer_currency
10         (
11 	p_org_id IN NUMBER DEFAULT NULL
12 	) RETURN    VARCHAR2 IS
13 
14         x_btf_currency   varchar2(3);
15 
16         BEGIN
17 
18           x_btf_currency := 'BRL';
19 
20           return(x_btf_currency);
21 
22         END get_bank_transfer_currency;
23 
24 /* ==============================================================*
25  | Fetches the value of Copy Taxpayer ID Flag                    |
26  * ==============================================================*/
27 
28         FUNCTION get_copy_cus_sup_name
29         (
30 	p_org_id IN NUMBER DEFAULT NULL
31 	) RETURN    VARCHAR2 IS
32 
33         x_copy_taxpayer_id_flag   varchar2(30);
34 
35         BEGIN
36 
37           x_copy_taxpayer_id_flag := FND_PROFILE.VALUE('JLZZ_COPY_CUS_SUP_NUM');
38 
39           return(x_copy_taxpayer_id_flag);
40 
41          END get_copy_cus_sup_name;
42 
43 /* ==========================================================*
44  | Fetches the value of Payment Action                       |
45  * ==========================================================*/
46 
47         FUNCTION get_payment_action
48         (
49 	p_org_id IN NUMBER
50 	) RETURN    VARCHAR2 IS
51 
52         x_payment_action   ap_system_parameters_all.global_attribute6%type;
53 
54         BEGIN
55 
56           BEGIN
57 
58             /* 1-Anticipate; 2-Postpone; 3-Change Manually (previously Keep) */
59             Select global_attribute6
60               Into   x_payment_action
61               From   ap_system_parameters_all
62               Where  nvl(org_id,-99) = nvl(p_org_id,-99);
63           Exception
64             when others THEN
65               x_payment_action := NULL;
66 
67           END;
68 
69           return(x_payment_action);
70 
71         END get_payment_action;
72 
73 /* ==========================================================*
74  | Fetches the value of Payment Action for AR                |
75  * ==========================================================*/
76 
77         FUNCTION get_payment_action_AR
78         (
79 	p_org_id IN NUMBER
80 	) RETURN    VARCHAR2 IS
81 
82         x_payment_action   ar_system_parameters_all.global_attribute20%type;
83 
84         BEGIN
85 
86           BEGIN
87 
88             /* 1-Anticipate; 2-Postpone; 3-Change Manually (previously Keep) */
89             Select global_attribute3
90               Into   x_payment_action
91               From   ar_system_parameters_all
92               Where  nvl(org_id,-99) = nvl(p_org_id,-99);
93           Exception
94             when others THEN
95               x_payment_action := NULL;
96 
97           END;
98 
99           return(x_payment_action);
100 
101         END get_payment_action_AR;
102 
103 /* ==========================================================*
104  | Fetches the value of Payment Location                     |
105  * ==========================================================*/
106 
107         FUNCTION get_payment_location
108         (
109 	p_org_id IN NUMBER
110 	) RETURN    VARCHAR2 IS
111 
112         x_payment_location   ap_system_parameters_all.global_attribute7%type;
113 
114         BEGIN
115 
116           BEGIN
117 
118             /* 1-Company; 2-Supplier; 3-Customer */
119             Select global_attribute7
120               Into   x_payment_location
121               From   ap_system_parameters_all
122               Where  nvl(org_id,-99) = nvl(p_org_id,-99);
123           Exception
124             when others THEN
125               x_payment_location := NULL;
126 
127           END;
128 
129           return(x_payment_location);
130 
131          END get_payment_location;
132 
133 /* ===============================================================*
134  | Fetches the value of Taxpayer ID Error Flag                    |
135  * ===============================================================*/
136 
137         FUNCTION get_taxid_raise_error
138         (
139 	p_org_id IN NUMBER DEFAULT NULL
140 	) RETURN    VARCHAR2 IS
141 
142         x_require_taxpayer_id_flag   varchar2(30);
143 
144         BEGIN
145 
146           x_require_taxpayer_id_flag := FND_PROFILE.VALUE('JLZZ_TAXID_RAISE_ERROR');
147 
148           return(x_require_taxpayer_id_flag);
149 
150         END get_taxid_raise_error;
151 
152 /* =======================================================================*
153  | Fetches value of 'Use Related Transactions for Threshold Checking' flag|
154  * =======================================================================*/
155 
156         FUNCTION get_ar_tx_use_whole_operation
157         (
158 	p_org_id IN NUMBER
159 	) RETURN    VARCHAR2 IS
160 
161         x_tx_use_wh_oper ar_system_parameters_all.global_attribute19%type;
162 
163         BEGIN
164 
165           BEGIN
166 
167               Select global_attribute19
168               Into   x_tx_use_wh_oper
169               From   ar_system_parameters_all
170               Where  nvl(org_id,-99) = nvl(p_org_id,-99);
171           Exception
172             when others THEN
173               x_tx_use_wh_oper := NULL;
174           END;
175 
176           return(x_tx_use_wh_oper);
177 
178         END get_ar_tx_use_whole_operation;
179 
180 
181 /* ==========================================================*
182  | Fetches the value of Change Date Automatically            |
183  * ==========================================================*/
184 
185         FUNCTION get_change_date_automatically
186         (
187 	p_org_id IN NUMBER
188 	) RETURN    VARCHAR2 IS
189 
190         x_change_date_automatically   ap_system_parameters_all.global_attribute8%type;
191 
192         BEGIN
193 
194           BEGIN
195 
196             /* Y-Yes; N-No */
197             Select global_attribute8
198               Into   x_change_date_automatically
199               From   ap_system_parameters_all
200               Where  nvl(org_id,-99) = nvl(p_org_id,-99);
201           Exception
202             when others THEN
203               x_change_date_automatically := NULL;
204 
205           END;
206 
207           return(x_change_date_automatically);
208 
209          END get_change_date_automatically;
210 
211 /* ==============================================================*
212  | Fetches the value of Calendar                                 |
213  * ==============================================================*/
214 
215         FUNCTION get_calendar
216         (
217 	p_org_id IN NUMBER DEFAULT NULL
218 	) RETURN    VARCHAR2 IS
219 
220         x_calendar   varchar2(30);
221 
222         BEGIN
223 
224           x_calendar := FND_PROFILE.VALUE('JLBR_CALENDAR');
225 
226           return(x_calendar);
227 
228          END get_calendar;
229 
230 END JL_ZZ_SYS_OPTIONS_PKG;