1 package FND_CURRENCY AUTHID CURRENT_USER as
2 /* $Header: AFMLCURS.pls 115.6 2003/01/06 19:28:53 pdeluna ship $ */
3
4
5 /* GET_FORMAT_MASK- get the format mask for a particular currency.
6 **
7 ** Returns a currency format mask to be used with the forms
8 ** SET_ITEM_PROPERTY(item_name, FORMAT_MASK,
9 ** FND_CURRENCY.GET_FORMAT_MASK(...)) built-in call,
10 ** or the PLSQL to_char() routine, based on the currency code passed in.
11 **
12 */
13 function GET_FORMAT_MASK( currency_code IN VARCHAR2,
14 field_length IN NUMBER)
15 return VARCHAR2;
16 pragma restrict_references(GET_FORMAT_MASK, WNDS);
17
18
19 /* SAFE_GET_FORMAT_MASK- slower version of GET_FORMAT_MASK
20 ** without WNPS pragma restrictions.
21 **
22 ** This version of GET_FORMAT_MASK uses slower,
23 ** non-caching profiles functions to do its defaulting. It runs
24 ** about half the speed of GET_FORMAT_MASK, but it can
25 ** be used in situations, like where clauses, in views, that
26 ** GET_FORMAT_MASK cannot be used due to pragma restrictions.
27 */
28 function SAFE_GET_FORMAT_MASK( currency_code IN VARCHAR2,
29 field_length IN NUMBER)
30 return VARCHAR2;
31 pragma restrict_references(SAFE_GET_FORMAT_MASK, WNDS, WNPS);
32
33 /*
34 ** GET_INFO- get the precision information for a currency code
35 **
36 ** returns information about a currency code, based on the
37 ** cache of currency information from the FND db table.
38 **
39 */
40 procedure GET_INFO(
41 currency_code IN VARCHAR2, /* currency code */
42 precision OUT NOCOPY NUMBER, /* number of digits to right of decimal*/
43 ext_precision OUT NOCOPY NUMBER, /* precision if more precision needed*/
44 min_acct_unit OUT NOCOPY NUMBER /* min value by which amt can vary */
45 );
46 pragma restrict_references(GET_INFO, WNDS, WNPS, RNPS);
47
48
49 /* BUILD_FORMAT_MASK- create a format mask for a currency value
50 **
51 ** Creates a currency format mask to be used with forms
52 ** SET_ITEM_PROPERTY(item_name, FORMAT_MASK, new_format_mask)
53 ** built-in call, or the PLSQL to_char() routine,
54 ** based on the currency parameters passed in.
55 **
56 ** Note that if neg_format is '-XXX', then pos_format must
57 ** be '+XXX' or 'XXX'.
58 **
59 ** If the last three parameters are left off, their values will
60 ** default from the profile value system.
61 */
62 procedure BUILD_FORMAT_MASK(
63 format_mask OUT NOCOPY VARCHAR2,
64 field_length IN NUMBER, /* maximum number of char in dest field */
65 precision IN NUMBER, /* number of digits to right of decimal*/
66 min_acct_unit IN NUMBER, /* minimum value by which amt can vary */
67 disp_grp_sep IN BOOLEAN default NULL,
68 /* NULL=from profile CURRENCY:THOUSANDS_SEPARATOR */
69 neg_format IN VARCHAR2 default NULL,
70 /* '-XXX', 'XXX-', '<XXX>', */
71 /* NULL=from profile CURRENCY:NEGATVE_FORMAT */
72 pos_format IN VARCHAR2 default NULL
73 /* 'XXX', '+XXX', 'XXX-', */
74 /* NULL=from profile CURRENCY:POSITIVE_FORMAT*/
75 );
76 pragma restrict_references(BUILD_FORMAT_MASK, WNDS);
77
78
79 /* SAFE_BUILD_FORMAT_MASK- slower version of BUILD_FORMAT_MASK
80 ** without WNPS pragma restrictions.
81 **
82 ** This version of BUILD_FORMAT_MASK uses slower,
83 ** non-caching profiles functions to do its defaulting. It runs
84 ** about half the speed of BUILD_FORMAT_MASK, but it can
85 ** be used in situations, like views, that BUILD_FORMAT_MASK
86 ** cannot be used due to pragma restrictions.
87 ** Note, however, that if you pass values for the
88 ** disp_grp_sep, neg_format, and pos_format parameters instead
89 ** of letting them default to NULL, then this routine will
90 ** not be any slower than BUILD_FORMAT_MASK
91 */
92 procedure SAFE_BUILD_FORMAT_MASK(
93 format_mask OUT NOCOPY VARCHAR2,
94 field_length IN NUMBER, /* maximum number of char in dest field */
95 precision IN NUMBER, /* number of digits to right of decimal*/
96 min_acct_unit IN NUMBER, /* minimum value by which amt can vary */
97 disp_grp_sep IN BOOLEAN default NULL,
98 /* NULL=from profile CURRENCY:THOUSANDS_SEPARATOR */
99 neg_format IN VARCHAR2 default NULL,
100 /* '-XXX', 'XXX-', '<XXX>', */
101 /* NULL=from profile CURRENCY:NEGATVE_FORMAT */
102 pos_format IN VARCHAR2 default NULL
103 /* 'XXX', '+XXX', 'XXX-', */
104 /* NULL=from profile CURRENCY:POSITIVE_FORMAT*/
105 );
106 pragma restrict_references(SAFE_BUILD_FORMAT_MASK, WNDS, WNPS);
107
108 END FND_CURRENCY;
109