DBA Data[Home] [Help]

PACKAGE: APPS.CSD_COST_ANALYSIS_PVT

Source


1 PACKAGE CSD_COST_ANALYSIS_PVT AUTHID CURRENT_USER AS
2 /* $Header: csdvanas.pls 115.6 2004/02/06 22:16:27 sangigup noship $ */
3 
4 
5 
6  /*----------------------------------------------------------------*/
7 
8   /* procedure name: Get_TotalEstCharges                              */
9 
10   /* description   : procedure used to get total estimated costs    */
11 
12   /*                                                                */
13 
14   /* p_api_version                Standard IN param                 */
15 
16   /* p_commit                     Standard IN param                 */
17 
18   /* p_init_msg_list              Standard IN param                 */
19 
20   /* p_validation_level           Standard IN param                 */
21 
22   /* p_repair_estimate_id         Estimate ID to get est costs      */
23 
24   /* p_ro_currency_code           Repair Order Currency Code        */
25 
26   /* x_costs                      Total MLE costs for repair line   */
27 
28   /* x_return_status              Standard OUT param                */
29 
30   /* x_msg_count                  Standard OUT param                */
31 
32   /* x_msg_data                   Standard OUT param                */
33 
34   /*                                                                */
35 
36   /*----------------------------------------------------------------*/
37   PROCEDURE Get_TotalEstCharges(p_api_version IN NUMBER,
38                                 p_commit IN VARCHAR2,
39                                 p_init_msg_list IN VARCHAR2,
40                                 p_validation_level IN NUMBER,
41                                 x_return_status OUT NOCOPY VARCHAR2,
42                                 x_msg_count OUT NOCOPY NUMBER,
43                                 x_msg_data OUT NOCOPY VARCHAR2,
44                                 p_repair_estimate_id IN NUMBER,
45                                 p_ro_currency_code IN VARCHAR2,
46                                 x_charges OUT NOCOPY CSD_COST_ANALYSIS_UTIL.MLE_TOTALS_REC_TYPE);
47   /*----------------------------------------------------------------*/
48 
49 /* procedure name: Get_TotalEstCosts                              */
50 
51   /* description   : procedure used to get total estimated costs    */
52 
53   /*                                                                */
54 
55   /* p_api_version                Standard IN param                 */
56 
57   /* p_commit                     Standard IN param                 */
58 
59   /* p_init_msg_list              Standard IN param                 */
60 
61   /* p_validation_level           Standard IN param                 */
62 
63   /* p_repair_estimate_id         Estimate ID to get est costs      */
64 
65   /* p_organization_id            Organization Id                   */
66 
67   /* p_ro_currency_code           Repair Order Currency Code        */
68 
69   /* x_costs                      Total MLE costs for repair line   */
70 
71   /* x_return_status              Standard OUT param                */
72 
73   /* x_msg_count                  Standard OUT param                */
74 
75   /* x_msg_data                   Standard OUT param                */
76 
77   /*                                                                */
78 
79   /*----------------------------------------------------------------*/
80 
81   PROCEDURE Get_TotalEstCosts(p_api_version IN NUMBER, p_commit IN VARCHAR2,
82                               p_init_msg_list IN VARCHAR2,
83                               p_validation_level IN NUMBER,
84                               x_return_status OUT NOCOPY VARCHAR2,
85                               x_msg_count OUT NOCOPY NUMBER,
86                               x_msg_data OUT NOCOPY VARCHAR2,
87                               p_repair_estimate_id IN NUMBER,
88                               p_organization_id IN NUMBER,
89                               p_ro_currency_code IN VARCHAR2,
90                               x_costs OUT NOCOPY CSD_COST_ANALYSIS_UTIL.MLE_TOTALS_REC_TYPE);
91 
92   /*----------------------------------------------------------------*/
93 
94   /* procedure name: Compare_EstChargesAndCosts                     */
95 
96   /* description   : procedure used to compare estimated charges to */
97 
98   /*                 estimated costs                                */
99 
100   /*                                                                */
101 
102   /* p_api_version                Standard IN param                 */
103 
104   /* p_commit                     Standard IN param                 */
105 
106   /* p_init_msg_list              Standard IN param                 */
107 
108   /* p_validation_level           Standard IN param                 */
109 
110   /* p_repair_estimate_id         Estimate ID to get est charges    */
111 
112   /* p_organization_id           Organization Id                   */
113 
114   /* p_ro_currency_code           Repair Order Currency Code       */
115 
116   /* x_charges                    Total MLE charges for estimate    */
117 
118   /* x_costs                      MLE Costs for estimate            */
119 
120   /* x_profit                     MLE Profit                        */
121 
122   /* x_profit_margin              MLE Profit Margin (%)             */
123 
124   /* x_return_status              Standard OUT param                */
125 
126   /* x_msg_count                  Standard OUT param                */
127 
128   /* x_msg_data                   Standard OUT param                */
129 
130   /*                                                                */
131 
132   /*----------------------------------------------------------------*/
133 
134   PROCEDURE Compare_EstChargesAndCosts(p_api_version IN NUMBER,
135                                        p_commit IN VARCHAR2,
136                                        p_init_msg_list IN VARCHAR2,
137                                        p_validation_level IN NUMBER,
138                                        x_return_status OUT NOCOPY VARCHAR2,
139                                        x_msg_count OUT NOCOPY NUMBER,
140                                        x_msg_data OUT NOCOPY VARCHAR2,
141                                        p_repair_estimate_id IN NUMBER,
142                                        p_organization_id IN NUMBER,
143                                        p_ro_currency_code IN VARCHAR2,
144                                        x_charges OUT NOCOPY CSD_COST_ANALYSIS_UTIL.MLE_TOTALS_REC_TYPE,
145                                        x_costs OUT NOCOPY CSD_COST_ANALYSIS_UTIL.MLE_TOTALS_REC_TYPE,
146                                        x_profit OUT NOCOPY CSD_COST_ANALYSIS_UTIL.MLE_TOTALS_REC_TYPE,
147                                        x_profit_margin OUT NOCOPY CSD_COST_ANALYSIS_UTIL.MLE_TOTALS_REC_TYPE);
148 
149   /*----------------------------------------------------------------*/
150 
151   /* procedure name: Compare_ActChargesAndCosts                     */
152 
153   /* description   : procedure used to compare actual charges to    */
154 
155   /*                 actual costs                                   */
156 
157   /*                                                                */
158 
159   /* p_api_version                Standard IN param                 */
160 
161   /* p_commit                     Standard IN param                 */
162 
163   /* p_init_msg_list              Standard IN param                 */
164 
165   /* p_validation_level           Standard IN param                 */
166 
167   /* p_repair_line_id             Repair Line ID to get act charges */
168 
169   /* p_charges                    Total MLE charges for actuals     */
170 
171   /* x_costs                      MLE Costs for estimate            */
172 
173   /* x_profit                     MLE Profit                        */
174 
175   /* x_profit_margin              MLE Profit Margin (%)             */
176 
177   /* x_return_status              Standard OUT param                */
178 
179   /* x_msg_count                  Standard OUT param                */
180 
181   /* x_msg_data                   Standard OUT param                */
182 
183   /*                                                                */
184 
185   /*----------------------------------------------------------------*/
186 
187   /*
188      PROCEDURE Compare_ActChargesAndCosts
189      (
190      p_api_version           IN  NUMBER,
191      p_commit                IN  VARCHAR2,
192      p_init_msg_list         IN  VARCHAR2,
193      p_validation_level      IN  NUMBER,
194      p_repair_line_id        IN  NUMBER,
195      p_charges               IN  CSD_COST_ANALYSIS_UTIL.MLE_TOTALS_REC_TYPE,
196      x_costs                 OUT NOCOPY CSD_ANALYSIS_UTIL.MLE_TOTALS_REC_TYPE,
197      x_profit                OUT NOCOPY CSD_ANALYSIS_UTIL.MLE_TOTALS_REC_TYPE,
198      x_profit_margin         OUT NOCOPY CSD_ANALYSIS_UTIL.MLE_TOTALS_REC_TYPE,
199      x_return_status         OUT NOCOPY VARCHAR2,
200      x_msg_count             OUT NOCOPY NUMBER,
201      x_msg_data              OUT NOCOPY VARCHAR2
202      );
203      */
204 
205   /*----------------------------------------------------------------*/
206 
207   /* procedure name: Compare_ActChargesAndCosts                     */
208 
209   /* description   : procedure used to compare actual charges to    */
210 
211   /*                 actual costs                                   */
212 
213   /*                                                                */
214 
215   /* p_api_version                Standard IN param                 */
216 
217   /* p_commit                     Standard IN param                 */
218 
219   /* p_init_msg_list              Standard IN param                 */
220 
221   /* p_validation_level           Standard IN param                 */
222 
223   /* p_repair_line_id             Repair Line ID to get act charges */
224 
225   /* p_charges                    Total MLE charges for actuals     */
226 
227   /* x_costs                      MLE Costs for estimate            */
228 
229   /* x_profit                     MLE Profit                        */
230 
231   /* x_profit_margin              MLE Profit Margin (%)             */
232 
233   /* x_return_status              Standard OUT param                */
234 
235   /* x_msg_count                  Standard OUT param                */
236 
237   /* x_msg_data                   Standard OUT param                */
238 
239   /*                                                                */
240 
241   /*----------------------------------------------------------------*/
242 
243   /*
244      PROCEDURE Compare_EstAndActCharges
245      (
246      p_api_version           IN  NUMBER,
247      p_commit                IN  VARCHAR2,
248      p_init_msg_list         IN  VARCHAR2,
249      p_validation_level      IN  NUMBER,
250      p_estimate_header_id    IN  NUMBER,
251      p_repair_line_id        IN  NUMBER,
252      p_act_charges           IN  CSD_COST_ANALYSIS_UTIL.MLE_TOTALS_REC_TYPE,
253      x_est_charges           IN  CSD_COST_ANALYSIS_UTIL.MLE_TOTALS_REC_TYPE,
254      x_diff                  OUT NOCOPY CSD_COST_ANALYSIS_UTIL.MLE_TOTALS_REC_TYPE,
255      x_pct_diff              OUT NOCOPY CSD_COST_ANALYSIS_UTIL.MLE_TOTALS_REC_TYPE,
256      x_return_status         OUT NOCOPY VARCHAR2,
257      x_msg_count             OUT NOCOPY NUMBER,
258      x_msg_data              OUT NOCOPY VARCHAR2
259      );
260      */
261 
262   /*----------------------------------------------------------------*/
263 
264   /* procedure name: Get_InvItemCost                                */
265 
266   /* description   : procedure used get item cost, extended cost,   */
267 
268   /*                 profit, and profit margin (%)                  */
269 
270   /*                 for an inventory item                          */
271 
272   /*                                                                */
273 
274   /* p_api_version                Standard IN param                 */
275 
276   /* p_commit                     Standard IN param                 */
277 
278   /* p_init_msg_list              Standard IN param                 */
279 
280   /* p_validation_level           Standard IN param                 */
281 
282   /* p_inventory_item_id          Inventory Item ID                 */
283 
284   /* p_quantity                   Quantity of Inventory Items       */
285 
286   /* p_organization_id            Inventory Organization ID         */
287 
288   /* p_charge_amt                 Total Charge Amt to compare to    */
289 
290   /* p_currency_code              Currency of Charge Amt            */
291 
292   /* x_item_cost                  Item cost of Inv Item             */
293 
294   /* x_return_status              Standard OUT param                */
295 
296   /* x_msg_count                  Standard OUT param                */
297 
298   /* x_msg_data                   Standard OUT param                */
299 
300   /*                                                                */
301 
302   /*----------------------------------------------------------------*/
303 
304   PROCEDURE Get_InvItemCost(p_api_version IN NUMBER, p_commit IN VARCHAR2,
305                             p_init_msg_list IN VARCHAR2,
306                             p_validation_level IN NUMBER,
307 			    x_return_status OUT NOCOPY VARCHAR2,
308                             x_msg_count OUT NOCOPY NUMBER,
309                             x_msg_data OUT NOCOPY VARCHAR2,
310                             p_inventory_item_id IN NUMBER,
311                             p_organization_id IN NUMBER,
312                             p_charge_date IN DATE,
313                             p_currency_code IN VARCHAR2,
314 			    p_chg_line_uom_code IN VARCHAR2,
315                             x_item_cost OUT NOCOPY NUMBER
316                            );
317 /*----------------------------------------------------------------*/
318 
319 /* procedure name: Get_ResItemCost                                */
320 
321 /* description   : procedure used get resource item cost          */
322 
323 /*                 for a bom resource                             */
324 /* This will eb called to obtain labor item cost. If a resource id is */
325 /* passed, then resource cost will be returned in x_item_Cost     */
326 /* If resource_id is not passed then cost is obtained from the labor */
327 /* inventory item. */
328 
329 /* This is a new API. During code review it was suggested that    */
330 
331 /* since it will never be called independently, there is no need  */
332 /* to use standard input parameters. Hence I am removing them in  */
333 /* the new API.                                                   */
334 
335 /* x_return_status              Standard OUT param                */
336 
337 /* x_msg_count                  Standard OUT param                */
338 
339 /* x_msg_data                   Standard OUT param                */
340 
344 /* p_bom_resource_id            BOM Resource ID                   */
341 /* p_inventory_item_id		Inventory item id                 */
342 /* p_organization_id            Inventory Organization ID         */
343 
345 /*p_charge_date			Charge date                       */
346 
350 
347 /* p_currency_code              Currency of Charge Amt            */
348 
349 /* x_item_cost                  Resource rate of BOM resource     */
351 
352 /*                                                                */
353 
354 /*----------------------------------------------------------------*/
355 
356 
357    PROCEDURE Get_ResItemCost
358    (
359 		x_return_status OUT NOCOPY VARCHAR2,
360                 x_msg_count OUT NOCOPY NUMBER,
361                 x_msg_data OUT NOCOPY VARCHAR2,
362                 p_inventory_item_id IN NUMBER,
363                 p_organization_id IN NUMBER,
364 		p_bom_resource_id IN NUMBER,
365                 p_charge_date IN DATE,
366                 p_currency_code IN VARCHAR2,
367 		p_chg_line_uom_code IN VARCHAR2,
368                 x_item_cost OUT NOCOPY NUMBER
369    );
370 
371 END CSD_COST_ANALYSIS_PVT ;