DBA Data[Home] [Help]

PACKAGE: APPS.WIP_WS_TIME_ENTRY

Source


1 PACKAGE WIP_WS_TIME_ENTRY AS
2 /* $Header: wipwstes.pls 120.9.12010000.1 2008/07/24 05:27:41 appldev ship $ */
3 
4 -- Insert a record into the wip_resource_actual_times table.
5 PROCEDURE record_insert(
6  p_time_entry_id	                   in number,
7  p_organization_id  	             in number,
8  p_wip_entity_id     	             in number,
9  p_operation_seq_num    	       in number,
10  p_resource_id                       in number,
11  p_resource_seq_num    	             in number,
12  p_instance_id  	                   in number,
13  p_serial_number          	       in varchar2,
14  p_last_update_date     	       in date,
15  p_last_updated_by                   in number,
16  p_creation_date                     in date,
17  p_created_by                        in number,
18  p_last_update_login                 in number,
19  p_object_version_num                in number,
20  p_time_entry_mode                   in number,
21  p_cost_flag                         in varchar2,
22  p_add_to_rtg                        in varchar2,
23  p_status_type                       in number,
24  p_start_date                        in date,
25  p_end_date                          in date,
26  p_projected_completion_date         in date,
27  p_duration                          in number,
28  p_uom_code                          in varchar2,
29  p_employee_id                       in number,
30  x_time_entry_id                     out NOCOPY number,
31  x_return_status                     out NOCOPY varchar2);
32 
33 -- Update a record in the wip_resource_actual_times table.
34 PROCEDURE record_update(
35  p_time_entry_id	                   in number,
36  p_organization_id  	             in number,
37  p_wip_entity_id     	             in number,
38  p_operation_seq_num    	       in number,
39  p_resource_id                       in number,
40  p_resource_seq_num    	             in number,
41  p_instance_id  	                   in number,
42  p_serial_number          	       in varchar2,
43  p_last_update_date     	       in date,
44  p_last_updated_by                   in number,
45  p_creation_date                     in date,
46  p_created_by                        in number,
47  p_last_update_login                 in number,
48  p_object_version_num                in number,
49  p_time_entry_mode                   in number,
50  p_cost_flag                         in varchar2,
51  p_add_to_rtg                        in varchar2,
52  p_status_type                       in number,
53  p_start_date                        in date,
54  p_end_date                          in date,
55  p_projected_completion_date         in date,
56  p_duration                          in number,
57  p_uom_code                          in varchar2,
58  p_employee_id                       in number,
59  x_return_status                     out NOCOPY varchar2);
60 
61 -- Delete a record from the wip_resource_actual_times table.
62 PROCEDURE record_delete(
63  p_time_entry_id	                   in number,
64  p_object_version_num                      in number,
65  x_return_status                     out NOCOPY varchar2);
66 
67 -- Delete a record from the wip_resource_actual_times table.
68 PROCEDURE record_delete(
69  p_wip_entity_id	                   in number,
70  p_operation_seq_num                 in number,
71  p_employee_id                       in number,
72  x_return_status                     out NOCOPY varchar2);
73 
74 -- Process records on report resource usages page.
75 PROCEDURE process_time_records_resource(p_organization_id in number);
76 
77 -- Process records on report my time page.
78 PROCEDURE process_time_records_my_time(p_organization_id in number,
79                                        p_instance_id IN NUMBER);
80 
81 -- Process records on move page.
82 PROCEDURE process_time_records_move(p_wip_entity_id IN NUMBER,
83                                     p_from_op IN NUMBER,
84                                     p_to_op IN NUMBER);
85 
86 -- Process records on report job operation page.
87 PROCEDURE process_time_records_job_op(p_wip_entity_id IN NUMBER,
88                                       p_operation_seq_num IN NUMBER,
89                                       p_instance_id IN NUMBER);
90 
91 PROCEDURE process_time_records(p_wip_entity_id IN NUMBER,
92                                p_completed_op IN NUMBER,
93                                p_instance_id IN NUMBER,
94                                p_time_entry_source IN VARCHAR2);
95 
96 -- Is UOM time based?
97 FUNCTION is_time_uom(p_uom_code IN VARCHAR2) return VARCHAR2;
98 
99 -- Get the value for time entry mode.
100 FUNCTION get_time_entry_mode(p_wip_entity_id IN NUMBER,
101                         p_operation_seq_num IN NUMBER) return NUMBER;
102 
103 -- Get the value for cost_flag.
104 FUNCTION get_cost_flag(p_wip_entity_id IN NUMBER,
105                        p_operation_seq_num IN NUMBER,
106                        p_resource_seq_num IN NUMBER,
107                        p_time_entry_source IN VARCHAR2) return VARCHAR2;
108 
109 -- Get the value for add_to_rtg.
110 FUNCTION get_add_to_rtg_flag(p_wip_entity_id IN NUMBER,
111                              p_operation_seq_num IN NUMBER,
112                              p_resource_seq_num IN NUMBER,
113                              p_cost_flag IN VARCHAR2,
114                              p_time_entry_source IN VARCHAR2) return VARCHAR2;
115 
116 -- Get Organization Id and Department Id.
117 PROCEDURE get_org_dept_ids(p_wip_entity_id IN NUMBER,
118                  p_operation_seq_num IN NUMBER,
119                  x_organization_id out NOCOPY NUMBER,
120                  x_department_id out NOCOPY NUMBER);
121 
122 -- Update the value of actual start date in wdj, wo and wor tables
123 PROCEDURE update_actual_start_dates(p_wip_entity_id IN NUMBER,
124                                     p_operation_seq_num IN NUMBER,
125                                     p_resource_seq_num IN NUMBER);
126 
127 -- Update the value of actual completion date in wo and wor tables
128 PROCEDURE update_actual_completion_dates(p_wip_entity_id IN NUMBER,
129                                          p_operation_seq_num IN NUMBER,
130                                          p_resource_seq_num IN NUMBER);
131 
132 -- Update the value of projected completion date in wo and wor tables.
133 PROCEDURE update_proj_completion_dates(p_organization_id IN NUMBER,
134                                        p_wip_entity_id IN NUMBER,
135                                        p_operation_seq_num IN NUMBER,
136                                        p_resource_seq_num IN NUMBER,
137                                        p_resource_id IN NUMBER,
138                                        p_start_date IN DATE);
139 
140 -- Get the on/off status of the job.
141 FUNCTION get_job_on_off_status(p_wip_entity_id IN NUMBER,
142                                p_operation_seq_num IN NUMBER) return VARCHAR2;
143 
144 -- Set job on.
145 PROCEDURE job_on(p_wip_entity_id IN NUMBER,
146                  p_operation_seq_num IN NUMBER,
147                  p_employee_id IN NUMBER,
148                  x_status out NOCOPY VARCHAR2,
149                  x_msg_count out NOCOPY NUMBER,
150                  x_msg out NOCOPY VARCHAR2);
151 
152 -- Set job off.
153 PROCEDURE job_off(p_wip_entity_id IN NUMBER,
154                   p_operation_seq_num IN NUMBER,
155                   x_status out NOCOPY VARCHAR2,
156                   x_msg_count out NOCOPY NUMBER,
157                   x_msg out NOCOPY VARCHAR2);
158 
159 -- Set clock in.
160 PROCEDURE clock_in(p_wip_entity_id IN NUMBER,
161                   p_operation_seq_num IN NUMBER,
162                   p_responsibility_key IN VARCHAR2,
163                   p_dept_id IN NUMBER,
164                   p_employee_id IN NUMBER,
165                   p_instance_id IN NUMBER,
166                   p_resource_id IN NUMBER,
167                   p_resource_seq_num IN NUMBER,
168                   x_status out NOCOPY VARCHAR2,
169                   x_msg_count out NOCOPY NUMBER,
170                   x_msg out NOCOPY VARCHAR2);
171 
172 -- Set clock out.
173 PROCEDURE clock_out(p_wip_entity_id IN NUMBER,
174                   p_operation_seq_num IN NUMBER,
175                   p_responsibility_key IN VARCHAR2,
176                   p_dept_id IN NUMBER,
177                   p_employee_id IN NUMBER,
178                   p_instance_id IN NUMBER,
179                   p_resource_id IN NUMBER,
180                   p_resource_seq_num IN NUMBER,
181                   x_status out NOCOPY VARCHAR2,
182                   x_msg_count out NOCOPY NUMBER,
183                   x_msg out NOCOPY VARCHAR2);
184 
185 -- Set undo clock in.
186 PROCEDURE undo_clock_in(p_wip_entity_id IN NUMBER,
187                   p_operation_seq_num IN NUMBER,
188                   p_responsibility_key IN VARCHAR2,
189                   p_dept_id IN NUMBER,
190                   p_employee_id IN NUMBER,
191                   p_instance_id IN NUMBER,
192                   p_resource_id IN NUMBER,
193                   p_resource_seq_num IN NUMBER,
194                   x_status out NOCOPY VARCHAR2,
195                   x_msg_count out NOCOPY NUMBER,
196                   x_msg out NOCOPY VARCHAR2);
197 --Set Shift In
198 PROCEDURE shift_in(p_wip_employee_id IN NUMBER,
199                                      p_org_id IN NUMBER,
200                                      x_status OUT nocopy VARCHAR2
201 				    );
202 --Set Shift Out
203 PROCEDURE shift_out(p_wip_employee_id IN NUMBER,
204                      p_org_id IN NUMBER,
205                      x_status out NOCOPY VARCHAR2
206                     );
207 
208 --Set Undo Shift In
209 PROCEDURE undo_shift_in(p_wip_employee_id IN NUMBER,
210                      p_org_id IN NUMBER,
211                      x_status out NOCOPY VARCHAR2
212                     );
213 --User Mode Shift functionality
214 
215 --Set Shift In
216 PROCEDURE shift_in_UM(p_wip_employee_id IN NUMBER,
217                                      p_org_id IN NUMBER,
218                                      x_status OUT nocopy VARCHAR2
219 				    );
220 --Set Shift Out
221 PROCEDURE shift_out_UM(p_wip_employee_id IN NUMBER,
222                      p_org_id IN NUMBER,
223                      x_status out NOCOPY VARCHAR2
224                     );
225 
226 --Set Undo Shift In
227 PROCEDURE undo_shift_in_UM(p_wip_employee_id IN NUMBER,
228                      p_org_id IN NUMBER,
229                      x_status out NOCOPY VARCHAR2
230                     );
231 
232 
233 
234 -- Get last operation quantity.
235 FUNCTION get_last_op_qty(p_wip_entity_id IN NUMBER,
236                          p_operation_seq_num IN NUMBER) return NUMBER;
237 
238 -- Get last job quantity.
239 FUNCTION get_last_job_qty(p_wip_entity_id IN NUMBER,
240                           p_operation_seq_num IN NUMBER) return NUMBER;
241 
242 -- Get the instance id.
243 FUNCTION get_instance_id(p_org_id IN NUMBER,
244                          p_employee_id IN NUMBER) return NUMBER;
245 
246 -- Check pending clockouts.
247 FUNCTION is_clock_pending(p_wip_entity_id IN NUMBER,
248                              p_operation_seq_num IN NUMBER) return VARCHAR2;
249 
253 
250 FUNCTION is_emp_clock_out_pending(p_employee_number IN NUMBER,
251                                   p_organization_id IN NUMBER,
252                                   p_user_mode IN VARCHAR2) return NUMBER;
254 END WIP_WS_TIME_ENTRY;