1 PACKAGE CSD_ANALYSIS_PVT AUTHID CURRENT_USER AS
2 /* $Header: csdvanas.pls 115.3 2002/11/08 23:39:15 swai noship $ */
3
4
5 /*----------------------------------------------------------------*/
6 /* procedure name: Get_TotalActCharges */
7 /* description : procedure used to get total actual charges */
8 /* */
9 /* p_api_version Standard IN param */
10 /* p_commit Standard IN param */
11 /* p_init_msg_list Standard IN param */
12 /* p_validation_level Standard IN param */
13 /* p_repair_line_id Repair Line ID to get act charges */
14 /* x_charges Total MLE charges for repair line */
15 /* x_return_status Standard OUT param */
16 /* x_msg_count Standard OUT param */
17 /* x_msg_data Standard OUT param */
18 /* */
19 /*----------------------------------------------------------------*/
20 PROCEDURE Get_TotalActCharges
21 (
22 p_api_version IN NUMBER,
23 p_commit IN VARCHAR2,
24 p_init_msg_list IN VARCHAR2,
25 p_validation_level IN NUMBER,
26 p_repair_line_id IN NUMBER,
27 x_charges OUT NOCOPY CSD_ANALYSIS_UTIL.MLE_TOTALS_REC_TYPE,
28 x_return_status OUT NOCOPY VARCHAR2,
29 x_msg_count OUT NOCOPY NUMBER,
30 x_msg_data OUT NOCOPY VARCHAR2
31 );
32
33 /*----------------------------------------------------------------*/
34 /* procedure name: Get_TotalEstCharges */
35 /* description : procedure used to get total estimated charges */
36 /* */
37 /* p_api_version Standard IN param */
38 /* p_commit Standard IN param */
39 /* p_init_msg_list Standard IN param */
40 /* p_validation_level Standard IN param */
41 /* p_estimate_header_id Est Header ID to get est charges */
42 /* x_charges Total MLE charges for repair line */
43 /* x_return_status Standard OUT param */
44 /* x_msg_count Standard OUT param */
45 /* x_msg_data Standard OUT param */
46 /* */
47 /*----------------------------------------------------------------*/
48 PROCEDURE Get_TotalEstCharges
49 (
50 p_api_version IN NUMBER,
51 p_commit IN VARCHAR2,
52 p_init_msg_list IN VARCHAR2,
53 p_validation_level IN NUMBER,
54 p_estimate_header_id IN NUMBER,
55 x_charges OUT NOCOPY CSD_ANALYSIS_UTIL.MLE_TOTALS_REC_TYPE,
56 x_return_status OUT NOCOPY VARCHAR2,
57 x_msg_count OUT NOCOPY NUMBER,
58 x_msg_data OUT NOCOPY VARCHAR2
59 );
60
61 /*----------------------------------------------------------------*/
62 /* procedure name: Compare_EstChargesAndCosts */
63 /* description : procedure used to compare estimated charges to */
64 /* estimated costs */
65 /* */
66 /* p_api_version Standard IN param */
67 /* p_commit Standard IN param */
68 /* p_init_msg_list Standard IN param */
69 /* p_validation_level Standard IN param */
70 /* p_estimate_header_id Est Header ID to get est charges */
71 /* p_charges Total MLE charges for estimate */
72 /* x_costs MLE Costs for estimate */
73 /* x_profit MLE Profit */
74 /* x_profit_margin MLE Profit Margin (%) */
75 /* x_return_status Standard OUT param */
76 /* x_msg_count Standard OUT param */
77 /* x_msg_data Standard OUT param */
78 /* */
79 /*----------------------------------------------------------------*/
80 PROCEDURE Compare_EstChargesAndCosts
81 (
82 p_api_version IN NUMBER,
83 p_commit IN VARCHAR2,
84 p_init_msg_list IN VARCHAR2,
85 p_validation_level IN NUMBER,
86 p_estimate_header_id IN NUMBER,
87 p_charges IN CSD_ANALYSIS_UTIL.MLE_TOTALS_REC_TYPE,
88 x_costs OUT NOCOPY CSD_ANALYSIS_UTIL.MLE_TOTALS_REC_TYPE,
89 x_profit OUT NOCOPY CSD_ANALYSIS_UTIL.MLE_TOTALS_REC_TYPE,
90 x_profit_margin OUT NOCOPY CSD_ANALYSIS_UTIL.MLE_TOTALS_REC_TYPE,
91 x_return_status OUT NOCOPY VARCHAR2,
92 x_msg_count OUT NOCOPY NUMBER,
93 x_msg_data OUT NOCOPY VARCHAR2
94 );
95
96 /*----------------------------------------------------------------*/
97 /* procedure name: Compare_ActChargesAndCosts */
98 /* description : procedure used to compare actual charges to */
99 /* actual costs */
100 /* */
101 /* p_api_version Standard IN param */
102 /* p_commit Standard IN param */
103 /* p_init_msg_list Standard IN param */
104 /* p_validation_level Standard IN param */
105 /* p_repair_line_id Repair Line ID to get act charges */
106 /* p_charges Total MLE charges for actuals */
107 /* x_costs MLE Costs for estimate */
108 /* x_profit MLE Profit */
109 /* x_profit_margin MLE Profit Margin (%) */
110 /* x_return_status Standard OUT param */
111 /* x_msg_count Standard OUT param */
112 /* x_msg_data Standard OUT param */
113 /* */
114 /*----------------------------------------------------------------*/
115 PROCEDURE Compare_ActChargesAndCosts
116 (
117 p_api_version IN NUMBER,
118 p_commit IN VARCHAR2,
119 p_init_msg_list IN VARCHAR2,
120 p_validation_level IN NUMBER,
121 p_repair_line_id IN NUMBER,
122 p_charges IN CSD_ANALYSIS_UTIL.MLE_TOTALS_REC_TYPE,
123 x_costs OUT NOCOPY CSD_ANALYSIS_UTIL.MLE_TOTALS_REC_TYPE,
124 x_profit OUT NOCOPY CSD_ANALYSIS_UTIL.MLE_TOTALS_REC_TYPE,
125 x_profit_margin OUT NOCOPY CSD_ANALYSIS_UTIL.MLE_TOTALS_REC_TYPE,
126 x_return_status OUT NOCOPY VARCHAR2,
127 x_msg_count OUT NOCOPY NUMBER,
128 x_msg_data OUT NOCOPY VARCHAR2
129 );
130
131 /*----------------------------------------------------------------*/
132 /* procedure name: Compare_ActChargesAndCosts */
133 /* description : procedure used to compare actual charges to */
134 /* actual costs */
135 /* */
136 /* p_api_version Standard IN param */
137 /* p_commit Standard IN param */
138 /* p_init_msg_list Standard IN param */
139 /* p_validation_level Standard IN param */
140 /* p_repair_line_id Repair Line ID to get act charges */
141 /* p_charges Total MLE charges for actuals */
142 /* x_costs MLE Costs for estimate */
143 /* x_profit MLE Profit */
144 /* x_profit_margin MLE Profit Margin (%) */
145 /* x_return_status Standard OUT param */
146 /* x_msg_count Standard OUT param */
147 /* x_msg_data Standard OUT param */
148 /* */
149 /*----------------------------------------------------------------*/
150 PROCEDURE Compare_EstAndActCharges
151 (
152 p_api_version IN NUMBER,
153 p_commit IN VARCHAR2,
154 p_init_msg_list IN VARCHAR2,
155 p_validation_level IN NUMBER,
156 p_estimate_header_id IN NUMBER,
157 p_repair_line_id IN NUMBER,
158 p_act_charges IN CSD_ANALYSIS_UTIL.MLE_TOTALS_REC_TYPE,
159 x_est_charges IN CSD_ANALYSIS_UTIL.MLE_TOTALS_REC_TYPE,
160 x_diff OUT NOCOPY CSD_ANALYSIS_UTIL.MLE_TOTALS_REC_TYPE,
161 x_pct_diff OUT NOCOPY CSD_ANALYSIS_UTIL.MLE_TOTALS_REC_TYPE,
162 x_return_status OUT NOCOPY VARCHAR2,
163 x_msg_count OUT NOCOPY NUMBER,
164 x_msg_data OUT NOCOPY VARCHAR2
165 );
166
167 /*----------------------------------------------------------------*/
168 /* procedure name: Get_InvItemCostAnalysis */
169 /* description : procedure used get item cost, extended cost, */
170 /* profit, and profit margin (%) */
171 /* for an inventory item */
172 /* */
173 /* p_api_version Standard IN param */
174 /* p_commit Standard IN param */
175 /* p_init_msg_list Standard IN param */
176 /* p_validation_level Standard IN param */
177 /* p_inventory_item_id Inventory Item ID */
178 /* p_quantity Quantity of Inventory Items */
179 /* p_organization_id Inventory Organization ID */
180 /* p_charge_amt Total Charge Amt to compare to */
181 /* p_currency_code Currency of Charge Amt */
182 /* x_item_cost Item cost of Inv Item */
183 /* x_total_cost Extended cost of Inv Item */
184 /* x_profit x_total_cost - p_charge_amt */
185 /* x_profit_margin x_profit*100/x_item_cost */
186 /* x_return_status Standard OUT param */
187 /* x_msg_count Standard OUT param */
188 /* x_msg_data Standard OUT param */
189 /* */
190 /*----------------------------------------------------------------*/
191 PROCEDURE Get_InvItemCostAnalysis
192 (
193 p_api_version IN NUMBER,
194 p_commit IN VARCHAR2,
195 p_init_msg_list IN VARCHAR2,
196 p_validation_level IN NUMBER,
197 p_inventory_item_id IN NUMBER,
198 p_quantity IN NUMBER,
199 p_organization_id IN NUMBER,
200 p_charge_amt IN NUMBER,
201 p_currency_code IN VARCHAR2,
202 x_item_cost OUT NOCOPY NUMBER,
203 x_total_cost OUT NOCOPY NUMBER,
204 x_profit OUT NOCOPY NUMBER,
205 x_profit_margin OUT NOCOPY NUMBER,
206 x_return_status OUT NOCOPY VARCHAR2,
207 x_msg_count OUT NOCOPY NUMBER,
208 x_msg_data OUT NOCOPY VARCHAR2
209 );
210
211 /*----------------------------------------------------------------*/
212 /* procedure name: Get_ResItemCostAnalysis */
213 /* description : procedure used get item cost, extended cost, */
214 /* profit, and profit margin (%) */
215 /* for a bom resource */
216 /* */
217 /* p_api_version Standard IN param */
218 /* p_commit Standard IN param */
219 /* p_init_msg_list Standard IN param */
220 /* p_validation_level Standard IN param */
221 /* p_bom_resource_id BOM Resource ID */
222 /* p_quantity Quantity of resource */
223 /* p_organization_id Inventory Organization ID */
224 /* p_charge_amt Total Charge Amt to compare to */
225 /* p_currency_code Currency of Charge Amt */
226 /* x_item_cost Resource rate of BOM resource */
227 /* x_total_cost Extended cost of Resource */
228 /* x_profit x_total_cost - p_charge_amt */
229 /* x_profit_margin x_profit*100/x_item_cost */
230 /* x_return_status Standard OUT param */
231 /* x_msg_count Standard OUT param */
232 /* x_msg_data Standard OUT param */
233 /* */
234 /*----------------------------------------------------------------*/
235 PROCEDURE Get_ResItemCostAnalysis
236 (
237 p_api_version IN NUMBER,
238 p_commit IN VARCHAR2,
239 p_init_msg_list IN VARCHAR2,
240 p_validation_level IN NUMBER,
241 p_bom_resource_id IN NUMBER,
242 p_quantity IN NUMBER,
243 p_organization_id IN NUMBER,
244 p_charge_amt IN NUMBER,
245 p_currency_code IN VARCHAR2,
246 x_item_cost OUT NOCOPY NUMBER,
247 x_total_cost OUT NOCOPY NUMBER,
248 x_profit OUT NOCOPY NUMBER,
249 x_profit_margin OUT NOCOPY NUMBER,
250 x_return_status OUT NOCOPY VARCHAR2,
251 x_msg_count OUT NOCOPY NUMBER,
252 x_msg_data OUT NOCOPY VARCHAR2
253 );
254
255 END CSD_ANALYSIS_PVT ;