1 PACKAGE gl_euro_user_rate_api AS
2 /* $Header: glusteus.pls 120.3 2005/05/05 01:44:50 kvora ship $ */
3 --
4 -- Package
5 -- gl_euro_user_rate_api
6 --
7 -- Purpose
8 --
9 -- This package will provide PL/SQL APIs for the following purposes:
10 -- o Determine if the customer is allowed to directly enter EMU -> OTHER
11 -- and OTHER -> EMU rates
12 -- o Determine if the current conversion type is User, the customer is not
13 -- allowed to directly enter EMU -> OTHER and OTHER -> EMU rates, and this
14 -- is such a situation
15 -- o Get the prompts to be used from EURO -> OTHER (or OTHER -> EURO),
16 -- EURO -> EMU, and EMU -> OTHER (or OTHER -> EMU) and the rate
17 -- from EURO -> EMU
18 --
19 -- History
20 -- 20-MAY-99 D J Ogg Created
21 --
22
23 --
24 -- User defined exceptions for gl_euro_user_rate_api:
25 -- o INVALID_CURRENCY - One of the two currencies is invalid.
26 INVALID_CURRENCY EXCEPTION;
27 INVALID_RELATION EXCEPTION;
28
29 --
30 -- Function
31 -- allow_direct_entry
32 --
33 -- Purpose
34 -- Returns 'Y' if the customer is allowed to directly enter EMU -> OTHER
35 -- and OTHER -> EMU rates
36 -- 'N' otherwise.
37 --
38 -- History
39 -- 20-MAY-99 D J Ogg Created
40 --
41 -- Arguments
42 -- * None *
43 FUNCTION allow_direct_entry RETURN VARCHAR2;
44
45 --
46 -- Procedure
47 -- is_cross_rate
48 --
49 -- Purpose
50 -- Returns 'Y' if the current conversion type is User AND
51 -- they are converting from EMU -> OTHER or OTHER -> EMU AND
52 -- they are not allowed to enter EMU -> OTHER and
53 -- OTHER -> EMU rates directly
54 -- Returns 'N' Otherwise
55 --
56 -- History
57 -- 20-MAY-99 D J Ogg Created
58 --
59 -- Arguments
60 -- x_from_currency From currency
61 -- x_to_currency To currency
62 -- x_conversion_date Conversion date
63 -- x_conversion_type Conversion Type
64 --
65 FUNCTION is_cross_rate(
66 x_from_currency VARCHAR2,
67 x_to_currency VARCHAR2,
68 x_conversion_date DATE,
69 x_conversion_type VARCHAR2 ) RETURN VARCHAR2;
70
71 --
72 -- Procedure
73 -- get_prompts_and_rate
74 --
75 -- Purpose
76 -- Returns the prompts to use for EURO -> OTHER (or OTHER -> EURO),
77 -- EURO -> EMU, and EMU -> OTHER (or OTHER -> EMU) and the
78 -- rate from EURO -> EMU
79 --
80 -- History
81 -- 20-MAY-99 D J Ogg Created
82 --
83 -- Arguments
84 -- x_from_currency From currency
85 -- x_to_currency To currency
86 -- x_conversion_date Conversion date
87 -- x_euro_to_other_prompt EURO -> OTHER prompt
88 -- x_euro_to_emu_prompt EURO -> EMU prompt
89 -- x_emu_to_other_prompt EMU -> OTHER prompt
90 -- x_euro_to_emu_rate EURO -> EMU rate
91 --
92 PROCEDURE get_prompts_and_rate(
93 x_from_currency VARCHAR2,
94 x_to_currency VARCHAR2,
95 x_conversion_date DATE,
96 x_euro_to_other_prompt IN OUT NOCOPY VARCHAR2,
97 x_euro_to_emu_prompt IN OUT NOCOPY VARCHAR2,
98 x_emu_to_other_prompt IN OUT NOCOPY VARCHAR2,
99 x_euro_to_emu_rate IN OUT NOCOPY NUMBER );
100
101 --
102 -- Procedure
103 -- get_cross_rate
104 --
105 -- Purpose
106 -- Given the EURO -> OTHER or OTHER -> EURO rate the user has entered
107 -- and the EURO -> EMU rate, returns the EMU -> OTHER or OTHER -> EMU
108 -- rate
109 --
110 -- History
111 -- 20-MAY-99 D J Ogg Created
112 --
113 -- Arguments
114 -- x_from_currency From currency
115 -- x_to_currency To currency
116 -- x_conversion_date Conversion date
117 -- x_euro_to_other_rate EURO -> OTHER or OTHER -> EURO rate
118 -- x_euro_to_emu_rate EURO -> EMU rate
119 --
120 FUNCTION get_cross_rate(
121 x_from_currency VARCHAR2,
122 x_to_currency VARCHAR2,
123 x_conversion_date DATE,
124 x_euro_to_other_rate NUMBER,
125 x_euro_to_emu_rate NUMBER ) RETURN NUMBER;
126
127 END gl_euro_user_rate_api;