DBA Data[Home] [Help]

PACKAGE: APPS.PA_CURRENCY

Source


1 PACKAGE PA_CURRENCY AS
2 /* $Header: PAXGCURS.pls 120.1 2008/03/17 13:57:36 rvelusam ship $ */
3 
4   PROCEDURE Set_Currency_Info ; --to set global variables for currency Info.
5 
6 -- Global variables for currency information
7 
8   G_curr_code varchar2(15);   -- holds global currency code
9   G_mau       number;         -- holds global minimum accountable unit
10   G_sp        number(1);      -- holds global precision
11   G_ep        number(2);      -- holds global extended precision
12 
13   G_proj_curr_code  varchar2(15); -- holds proj currency code
14   G_mau_chr   varchar2(30);   -- minimum accountable unit
15 
16   G_org_id    number := NULL;  -- bug 6847113
17 
18   FUNCTION get_currency_code  RETURN VARCHAR2;
19   pragma RESTRICT_REFERENCES (get_currency_code, WNPS, WNDS);
20 
21 --  The get_currency_code gets the currency code for PA's Set of books
22 
23   FUNCTION round_currency_amt ( X_amount  IN NUMBER ) RETURN NUMBER;
24   pragma RESTRICT_REFERENCES (round_currency_amt, WNPS, WNDS);
25 
26 --  The round_currency_amt accepts amount as the parameter and returns the
27 --  round off amount based on the set of books currency
28 
29 -- The round_trans_currency_amt accepts amount and currency code as the
30 -- parameters and returns the round off amount based on the currency code
31 -- information in fnd_currencies table.
32 
33 FUNCTION round_trans_currency_amt ( X_amount  IN NUMBER,
34                                       X_Curr_Code IN VARCHAR2 ) RETURN NUMBER;
35 pragma   RESTRICT_REFERENCES (round_trans_currency_amt, WNPS, WNDS);
36 
37   FUNCTION currency_fmt_mask(X_length in NUMBER ) RETURN VARCHAR2;
38   pragma RESTRICT_REFERENCES (currency_fmt_mask, WNPS, WNDS);
39 
40 --  The currency_fmt_mask returns the format mask depending on the
41 --  standard precision of the currency to a maximum length of X_length
42 --  Cannot be used in rpt as Org_id has not been sent.
43 
44   FUNCTION rpt_currency_fmt_mask(X_org_id in NUMBER, x_length in NUMBER ) RETURN VARCHAR2;
45   pragma RESTRICT_REFERENCES (rpt_currency_fmt_mask, WNPS, WNDS);
46 
47 --  The currency_fmt_mask returns the format mask depending on the
48 --  standard precision of the currency to a maximum length of X_length
49 --  To Be used in rpt Only. Will be Obsolete in future when rpt are
50 --  converted to srw.
51 
52   FUNCTION trans_currency_fmt_mask(X_Curr_Code VARCHAR2,
53                                    X_length in NUMBER ) RETURN VARCHAR2;
54   pragma RESTRICT_REFERENCES (trans_currency_fmt_mask, WNPS, WNDS);
55 
56   FUNCTION get_mau(X_Curr_Code IN VARCHAR2) RETURN VARCHAR2;
57 --  pragma RESTRICT_REFERENCES (get_mau, WNPS, WNDS);
58 
59   /*
60     --Pa-K Changes: Transaction Import Enhancements
61     --Added for better performance as the existing Round_Currency_Amt that calls
62     --Get_Currency_Code does not use caching. Changing the existing functions
63     --will result in removing the PRAGMA constraint that has a lot of impact on
64     --other functions.
65     --Duplicated 4 functions, new ones are:
66     --Get_Currency_Info1, round_currency_amt1, Get_Trans_Currency_Info1 and
67     --round_currency_amt1
68     --These functions will be removed when the division wide the PRAGMA RESTRICT
69     --constraint will be removed from all functions.
70     --Till then any changes to the above functions will have to be made here also.
71   */
72 
73   G_CurrCode1 varchar2(15);   -- holds global currency code
74   G_mau1       number;         -- holds global minimum accountable unit
75   G_sp1        number(1);      -- holds global precision
76   G_ep1        number(2);      -- holds global extended precision
77 
78   FUNCTION round_currency_amt1 ( X_amount  IN NUMBER ) RETURN NUMBER;
79 
80   G_TransCurrCode varchar2(15);
81   G_Transmau       number;
82   G_Transsp        number(1);
83   G_Transep        number(2);
84 
85   FUNCTION round_trans_currency_amt1 ( X_amount  IN NUMBER,
86                                       X_Curr_Code IN VARCHAR2 ) RETURN NUMBER;
87   FUNCTION round_currency_amt_blk ( p_amount_tab   PA_PLSQL_DATATYPES.NumTabTyp
88 	                           ,p_currency_tab PA_PLSQL_DATATYPES.Char30TabTyp
89                                   ) RETURN PA_PLSQL_DATATYPES.NumTabTyp;
90   FUNCTION round_currency_amt_nested_blk ( p_amount_tbl   SYSTEM.pa_num_tbl_type         DEFAULT SYSTEM.pa_num_tbl_type()
91 	                                  ,p_currency_tbl SYSTEM.pa_varchar2_30_tbl_type DEFAULT SYSTEM.pa_varchar2_30_tbl_type()
92                                          ) RETURN SYSTEM.pa_num_tbl_type;
93 END PA_CURRENCY;