[Home] [Help]
PACKAGE: APPS.CSD_COST_ANALYSIS_UTIL
Source
1 PACKAGE CSD_COST_ANALYSIS_UTIL AUTHID CURRENT_USER AS
2 /* $Header: csdvanus.pls 115.5 2003/10/29 00:39:56 sangigup noship $ */
3 /*----------------------------------------------------------------*/
4 /* record name: MLE_TOTALS_REC_TYPE */
5 /* description: Record used to hold totals */
6 /* */
7 /*----------------------------------------------------------------*/
8 TYPE MLE_TOTALS_REC_TYPE IS RECORD (
9 MATERIALS NUMBER,
10 LABOR NUMBER,
11 EXPENSES NUMBER,
12 MLE_TOTAL NUMBER,
13 CURRENCY_CODE VARCHAR2(15)
14 );
15 /*----------------------------------------------------------------*/
16 /* function name: Get_GLCurrencyCode */
17
18 /* description : Gets the currency from GL_SETS_OF_BOOKS for an */
19
20 /* organization */
21
22 /* */
23
24 /* p_organization_id Organization ID to get currency */
25
26 /* */
27
28 /*----------------------------------------------------------------*/
29
30 FUNCTION Get_GLCurrencyCode(p_organization_id IN NUMBER) RETURN VARCHAR2;
31 /*----------------------------------------------------------------*/
32
33 /* procedure name: Convert_CurrencyAmount */
34
35 /* description : Converts an amount from one currency to */
36
37 /* another currency */
38
39 /* */
40
41 /* p_api_version Standard IN param */
42
43 /* p_commit Standard IN param */
44
45 /* p_init_msg_list Standard IN param */
46
47 /* p_validation_level Standard IN param */
48
49 /* p_from_currency Required Currency code to convert from */
50
51 /* p_to_currency Required Currency code to convert to */
52
53 /* p_eff_date Required Conversion Date */
54
55 /* p_amount Required Amount to convert */
56
57 /* x_conv_amount Converted amount */
58
59 /* x_return_status Standard OUT param */
60
61 /* x_msg_count Standard OUT param */
62
63 /* x_msg_data Standard OUT param */
64
65 /* */
66
67 /*----------------------------------------------------------------*/
68
69 PROCEDURE Convert_CurrencyAmount(p_api_version IN NUMBER,
70 p_commit IN VARCHAR2,
71 p_init_msg_list IN VARCHAR2,
72 p_validation_level IN NUMBER,
73 x_return_status OUT NOCOPY VARCHAR2,
74 x_msg_count OUT NOCOPY NUMBER,
75 x_msg_data OUT NOCOPY VARCHAR2,
76 p_from_currency IN VARCHAR2,
77 p_to_currency IN VARCHAR2,
78 p_eff_date IN DATE,
79 p_amount IN NUMBER,
80 x_conv_amount OUT NOCOPY NUMBER);
81
82
83
84
85 /*----------------------------------------------------------------*/
86 /* procedure name: Compare_MLETotals */
87
88
89 /* description : Compares any two records of */
90
91 /* MLE_total_record_type by amount and percent. */
92
93 /* Difference is calculated by basis - compare. */
94
95 /* Percent is determined by dividing difference */
96
97 /* by the basis. If currencies are different, */
98
99 /* Difference will be in currency of compare amts */
100
101 /* */
102
103 /* p_api_version Standard IN param */
104
105 /* p_commit Standard IN param */
106
107 /* p_init_msg_list Standard IN param */
108
109 /* p_validation_level Standard IN param */
110
111 /* p_mle_totals_basis Required Totals to use as basis */
112
113 /* p_mle_totals_compare Required Totals to compare to basis */
114
115 /* x_diff Basis - Compare */
116
117 /* x_pct_diff (Basis - Compare)*100/Basis */
118
119 /* x_return_status Standard OUT param */
120
121 /* x_msg_count Standard OUT param */
122
123 /* x_msg_data Standard OUT param */
124
125 /* */
126
127 /*----------------------------------------------------------------*/
128
129 PROCEDURE Compare_MLETotals(p_api_version IN NUMBER, p_commit IN VARCHAR2,
130 p_init_msg_list IN VARCHAR2,
131 p_validation_level IN NUMBER,
132 x_return_status OUT NOCOPY VARCHAR2,
133 x_msg_count OUT NOCOPY NUMBER,
134 x_msg_data OUT NOCOPY VARCHAR2,
135 p_mle_totals_basis IN MLE_TOTALS_REC_TYPE,
136 p_mle_totals_compare IN MLE_TOTALS_REC_TYPE,
137 x_diff OUT NOCOPY MLE_TOTALS_REC_TYPE,
138 x_pct_diff OUT NOCOPY MLE_TOTALS_REC_TYPE);
139 /*----------------------------------------------------------------*/
140
141 /* function name: Validate_CostingEnabled */
142
143 /* description : Given an organization_id, returns TRUE if the */
144
145 /* Organization is costing enabled. */
146
147 /* p_organization_id IN NUMBER */
148
149 /* */
150
151 /*----------------------------------------------------------------*/
152
153 FUNCTION Validate_CostingEnabled(p_organization_id IN NUMBER) RETURN BOOLEAN;
154 END CSD_COST_ANALYSIS_UTIL;
155