1 PACKAGE CS_Service_Billing_Engine_PVT AUTHID CURRENT_USER as
2 /*$Header: csxvsbes.pls 120.1.12020000.2 2013/01/31 04:37:51 bkanimoz ship $*/
3
4 -- Service Billing Engine Record Type
5 TYPE SBE_Rec_Type IS RECORD
6 (incident_id NUMBER,
7 business_process_id NUMBER,
8 transaction_type_id NUMBER,
9 txn_billing_type_id NUMBER,
10 line_category_code VARCHAR2(6),
11 contract_id NUMBER,
12 contract_line_id NUMBER,
13 price_list_id NUMBER,
14 currency_code VARCHAR2(15),
15 service_date DATE,
16 labor_start_date_time DATE,
17 labor_end_date_time DATE,
18 inventory_item_id NUMBER,
19 serial_number VARCHAR2(50),
20 item_revision VARCHAR2(3),
21 unit_of_measure_code VARCHAR2(3),
22 quantity NUMBER,
23 after_warranty_cost NUMBER,
24 return_reason_code VARCHAR2(30),
25 installed_cp_return_by_date DATE,
26 customer_product_id NUMBER,
27 transaction_inventory_org_id NUMBER,
28 transaction_sub_inventory VARCHAR2(10),
29 original_source_id NUMBER,
30 original_source_code VARCHAR2(10),
31 source_id NUMBER,
32 source_code VARCHAR2(10),
33 --12.2.2 Service Projects Integration
34 project_id NUMBER := FND_API.G_MISS_NUM,
35 project_task_id NUMBER := FND_API.G_MISS_NUM,
36 expenditure_org_id NUMBER := FND_API.G_MISS_NUM
37 );
38
39 G_MISS_SBE_REC SBE_Rec_Type;
40
41
42 -- Get the inventory item's primary unit of measurement.
43 Procedure Get_Primary_UOM(
44 p_inventory_item_id IN NUMBER,
45 x_unit_of_measure_code OUT NOCOPY VARCHAR2
46 );
47
48
49 -------------------------------------------------------------------------
50 -- Procedure: create_charges
51 -- Purpose : This create_charges api can only be evoked from:
52 -- - Service Debrief
53 -- Generate either in progress charges or final charges for a service debrief line.
54 -- Service Debrief should pass in debrief_line_id, p_commit set to false, and p_final_charge_flag
55 -- set to TRUE or FALSE based on the task assignment status.
56 -- p_commit set to FALSE is because SD can roll back all changes in case of failure occurs
57 -- so it can roll back.
58 --
59 -- p_api_version_number: Standard Version of API : Required
60 -- p_init_msg_list: Optional
61 -- p_commit: Indicates whether API should commit : Optional
62 -- p_sbe_record: record type parameter
63 -- p_final_charge_flag: indicating either 'in progress' charges or 'actual' charges will be generated.
64 -- x_return_status: Return Status of API : Required OUT Param
65 -- Status in 'S','U','E'.
66 -- 'S' is Success
67 -- 'U' is Unexpected Error
68 -- 'E' is Expected Error
69 -- x_msg_count: Number OUT Param
70 -- x_msg_data: Varchar2(2000) OUT Param : Contains the msg_data generated by API
71
72 PROCEDURE Create_Charges(
73 P_Api_Version_Number IN NUMBER,
74 P_Init_Msg_List IN VARCHAR2 := FND_API.G_FALSE,
75 P_Commit IN VARCHAR2 := FND_API.G_FALSE,
76 p_sbe_record IN SBE_Rec_Type,
77 p_final_charge_flag IN VARCHAR2,
78 x_return_status OUT NOCOPY VARCHAR2,
79 x_msg_count OUT NOCOPY NUMBER,
80 x_msg_data OUT NOCOPY VARCHAR2
81 );
82
83 PROCEDURE Delete_In_Progress_Charges(
84 P_Api_Version_Number IN NUMBER,
85 P_Init_Msg_List IN VARCHAR2 := FND_API.G_FALSE,
86 P_Commit IN VARCHAR2 := FND_API.G_FALSE,
87 p_incident_id IN NUMBER,
88 p_debrief_header_id IN NUMBER := NULL,
89 p_debrief_line_id IN NUMBER := NULL,
90 x_return_status OUT NOCOPY VARCHAR2,
91 x_msg_count OUT NOCOPY NUMBER,
92 x_msg_data OUT NOCOPY VARCHAR2
93 );
94
95 END CS_Service_Billing_Engine_PVT;
96