DBA Data[Home] [Help]

PACKAGE: APPS.ASO_MULTI_CURRENCY_INT

Source


1 PACKAGE ASO_multi_currency_INT AUTHID CURRENT_USER as
2 /* $Header: asoimcxs.pls 120.1 2005/06/29 12:33:50 appldev ship $ */
3 -- Start of Comments
4 -- Package name     : ASO_multi_currency_INT
5 -- Purpose          :
6 -- History          :
7 -- NOTE             :
8 -- End of Comments
9 
10 
11 
12 G_NEG_MAX  CONSTANT NUMBER := -9.99E125;
13 
14 -- Start of Comments
15 --
16 -- API name	: convert_amount_daily
17 -- Type		:
18 -- Pre-reqs	:
19 -- Function	:
20 -- This api takes from and to currencies, conversion date, amount and Max Roll
21 --days. It returns the amount converted into the appropriate currency. The
22 --converted amount is calculated in compliance with the triangulation tule.
23 --
24 -- Parameters	:
25 -- IN		:
26 --    p_from_currency	IN VARCHAR2 -- From currency
27 --    p_to_currency     IN VARCHAR2 -- To currency
28 --    p_conversion_date	IN DATE     -- Conversion date
29 --    p_amount		IN NUMBER   -- Amount to be converted
30 --    p_max_roll_days	IN NUMBER   -- Maximum days to roll back for a rate
31 --
32 -- Version	:
33 -- History	:
34 --	22-Sep-98	J. Shang	Created
35 -- Note     :
36 --      Using of p_max_roll_days in daily conversion:
37 --When a rate for the conversion date is undefined, p_max_roll_days will be
38 --used to find an alternitive rate to do the conversion.
39 --1. If it is a positive number, the function will look backward from the
40 -- conversion date for the most recent date on which a rate is defined.
41 --2. If it is a negative number, the function will look backward without any
42 --   date limit to find the most recent date on which a rate is defined.
43 --3. If it is zero,the funtion doesn't look backward. This is the default value
44 --	The above definition follows rules defined in GL_CURRENCY_API.
45 
46 -- End of Comments
47 
48 
49 FUNCTION convert_amount_daily (
50             p_from_currency	IN	VARCHAR2,
51             p_to_currency	IN	VARCHAR2,
52             p_conversion_date	IN	DATE,
53             p_amount		IN	NUMBER,
54             p_max_roll_days	IN	NUMBER DEFAULT 0) RETURN NUMBER ;
55 
56 
57 
58 -- Start of Comments
59 -- API name	: get_euro_info
60 -- Type		:
61 -- Pre-reqs	:
62 -- Function	:
63 --	This api takes currency code and the effective date,
64 -- it will get the currency
65 
66 -- Parameters	:
67 -- IN		:
68 --    p_currency_code	IN VARCHAR2 -- Currency to be checked
69 --    p_effective_date	IN DATE	    -- Effective date
70 --    x_currency_type   OUT NOCOPY /* file.sql.39 change */ VARCHAR2 -- Type of the currency.
71 --     Euro currency, set to 'EURO'
72 --     Emu currency, set to 'EMU'
73 --    Other currencies,set to 'OTHER'
74 
75 --    Invalid currency, set to NULL
76 --    x_conversion_rate OUT NOCOPY /* file.sql.39 change */ NUMBER -- Fixed rate for conversion
77 -- Version 	:
78 --
79 -- History	:
80 --	03-Nov-98	J. Shang	Created
81 -- Note		:
82 --    This is temporary solution for OSM, and the procedure follows
83 -- the similar  privatre  procedure defined in GL.
84 
85 -- End of Comments
86 --
87 
88 PROCEDURE get_euro_info(p_currency_code	IN VARCHAR2,
89 		   p_effective_date	IN DATE,
90 		   x_currency_type OUT NOCOPY /* file.sql.39 change */   VARCHAR2,
91 		   x_conversion_rate OUT NOCOPY /* file.sql.39 change */   NUMBER) ;
92 
93 
94 END ASO_multi_currency_INT;
95