DBA Data[Home] [Help]

PACKAGE: APPS.HXT_TIME_COLLECTION

Source


1 PACKAGE hxt_time_collection AUTHID CURRENT_USER AS
2 /* $Header: hxttcol.pkh 120.4 2005/11/23 09:09:47 sgadipal noship $ */
3 /*#
4  * This package contains record time API
5  * @rep:scope public
6  * @rep:product hxt
7  * @rep:displayname Record Time
8 */
9    /*----------------------------------------------
10     || Global variables, constants, cursors  and exceptions
11     ----------------------------------------------*/
12    g_user_id                        fnd_user.user_id%TYPE
13                                                         := fnd_global.user_id;
14    g_login_id                       fnd_user.user_id%TYPE
15                                                        := fnd_global.login_id;
16    g_user_name                      fnd_user.user_name%TYPE
17                                                            := 'TimeCollection';
18    g_sysdate                        DATE                      := TRUNC (
19                                                                     SYSDATE
20                                                                  );
21    g_sysdatetime                    DATE                              := SYSDATE;
22    g_sess_date                      DATE;
23    g_bus_group_id                   hr_organization_units.business_group_id%TYPE
24                                := fnd_profile.VALUE ('PER_BUSINESS_GROUP_ID');
25    g_batch_err_id                   hxt_errors.ppb_id%TYPE          DEFAULT NULL;
26    g_timecard_err_id                hxt_errors.tim_id%TYPE          DEFAULT NULL;
27    g_hours_worked_err_id            hxt_errors.hrw_id%TYPE          DEFAULT NULL;
28    g_time_period_err_id             hxt_errors.ptp_id%TYPE          DEFAULT NULL;
29    g_batch_ref                      pay_batch_headers.batch_reference%TYPE
30                                                                  DEFAULT NULL;
31    g_batch_name                     pay_batch_headers.batch_name%TYPE
32                                                                  DEFAULT NULL;
33    g_orcl_tm_app_id_cons   CONSTANT hr_lookups.application_id%TYPE                 := 808;
34    g_orcl_hr_app_id_cons   CONSTANT hr_lookups.application_id%TYPE                 := 800;
35 
36    CURSOR g_employee_cur (c_person_id NUMBER, c_date_worked DATE)
37    IS
38       SELECT asm.payroll_id, asm.assignment_id, asm.effective_start_date,
39              asm.effective_end_date, asmv.hxt_rotation_plan, egp.hcl_id
40         FROM hxt_earning_policies egp,
41              hxt_per_aei_ddf_v asmv,
42              per_assignment_status_types ast,
43              per_all_assignments_f asm
44        WHERE c_person_id = asm.person_id
45          AND asm.primary_flag = 'Y'
46          AND TRUNC (c_date_worked) BETWEEN TRUNC (asm.effective_start_date)
47                                        AND TRUNC (asm.effective_end_date)
48          AND ast.assignment_status_type_id = asm.assignment_status_type_id
49          AND ast.pay_system_status = 'P' -- Check payroll status
50          AND asmv.assignment_id = asm.assignment_id
51          AND TRUNC (c_date_worked) BETWEEN TRUNC (asmv.effective_start_date)
52                                        AND TRUNC (asmv.effective_end_date)
56 -- RM Why not use assignment id here (above) too?
53          AND egp.id(+) = asmv.hxt_earning_policy;
54 
55 
57 
58    CURSOR g_details_cur (c_assignment_id NUMBER, c_date_worked DATE)
59    IS
60       SELECT asmv.hxt_earning_policy, asmv.hxt_shift_differential_policy,
61              asmv.hxt_hour_deduction_policy, wsh.off_shift_prem_id,
62              wsh.shift_diff_ovrrd_id
63         FROM hxt_per_aei_ddf_v asmv,
64              per_assignment_status_types ast,
65              per_assignments_f asm,
66              hxt_shifts sht,
67              hxt_weekly_work_schedules wws,
68              hxt_work_shifts wsh,
69              hxt_rotation_schedules rts
70        WHERE c_assignment_id = asm.assignment_id
71          AND TRUNC (c_date_worked) BETWEEN TRUNC (asm.effective_start_date)
72                                        AND TRUNC (asm.effective_end_date)
73          AND ast.assignment_status_type_id = asm.assignment_status_type_id
74          AND ast.pay_system_status = 'P' -- Check payroll status
75          AND asmv.assignment_id = asm.assignment_id
76          AND TRUNC (c_date_worked) BETWEEN TRUNC (asmv.effective_start_date)
77                                        AND TRUNC (asmv.effective_end_date)
78          AND asmv.hxt_rotation_plan = rts.rtp_id -- SIR 336
79          --  AND c_date_worked  >=  rts.start_date
80          AND wsh.week_day = hxt_util.get_week_day (c_date_worked)
81          AND wws.id = wsh.tws_id
82          AND c_date_worked BETWEEN wws.date_from
83                                AND NVL (wws.date_to, c_date_worked)
84          AND wws.id = rts.tws_id
85          AND sht.id = wsh.sht_id
86          AND rts.start_date = (SELECT MAX (start_date)
87                                  FROM hxt_rotation_schedules
88                                 WHERE rtp_id = asmv.hxt_rotation_plan
89                                   AND start_date <= c_date_worked);
90 
91    CURSOR g_earn_pol_details_cur (c_earn_pol_id NUMBER, c_date_worked DATE)
92    IS
93       SELECT fcl_earn_type, egt_id, pep_id, pip_id, hcl_id
94         FROM hxt_earning_policies
95        WHERE id = c_earn_pol_id
96          AND c_date_worked BETWEEN effective_start_date
97                                AND effective_end_date;
98 
99    CURSOR g_hol_cur (c_start_date DATE, c_end_date DATE, c_hcl_id NUMBER)
100    IS
101       SELECT hcl.element_type_id, hdy.hours, hdy.holiday_date
102         FROM hxt_holiday_calendars hcl, hxt_holiday_days hdy
103        WHERE TRUNC (hdy.holiday_date, 'DD') BETWEEN TRUNC (c_start_date, 'DD')
104                                                 AND TRUNC (c_end_date, 'DD')
105          AND hcl.id = hdy.hcl_id
106          AND hdy.holiday_date BETWEEN hcl.effective_start_date
107                                   AND hcl.effective_end_date
108          AND hcl.id = c_hcl_id;
109 
110    /* -------------------
111     || Error variables
112     --------------------*/
113    e_timecard_source                VARCHAR2 (80);
114    e_approver_number                VARCHAR2 (30);
115    e_employee_number                VARCHAR2 (30);
116    e_date_worked                    VARCHAR2 (30);
117    e_start_time                     DATE;
118    e_end_time                       DATE;
119    e_hours                          NUMBER (7, 3);
120    e_work_type                      VARCHAR2 (30);
121    e_hours_type                     VARCHAR2 (80);
122    e_earn_reason_code               VARCHAR2 (30);
123    e_project                        VARCHAR2 (25);
124    e_task_number                    VARCHAR2 (30);
125    e_location_code                  VARCHAR2 (20);
126    e_comment                        VARCHAR2 (255);
127    e_rate_multiple                  NUMBER (15, 5);
128    e_hourly_rate                    NUMBER (15, 5);
129    e_amount                         NUMBER (15, 5);
130    e_separate_check_flag            VARCHAR2 (30);
131    e_business_group_id              NUMBER (15);
132    e_concat_cost_segments           VARCHAR2 (240);
133    e_cost_segment1                  VARCHAR2 (60);
134    e_cost_segment2                  VARCHAR2 (60);
135    e_cost_segment3                  VARCHAR2 (60);
136    e_cost_segment4                  VARCHAR2 (60);
137    e_cost_segment5                  VARCHAR2 (60);
138    e_cost_segment6                  VARCHAR2 (60);
139    e_cost_segment7                  VARCHAR2 (60);
140    e_cost_segment8                  VARCHAR2 (60);
141    e_cost_segment9                  VARCHAR2 (60);
142    e_cost_segment10                 VARCHAR2 (60);
143    e_cost_segment11                 VARCHAR2 (60);
144    e_cost_segment12                 VARCHAR2 (60);
145    e_cost_segment13                 VARCHAR2 (60);
146    e_cost_segment14                 VARCHAR2 (60);
147    e_cost_segment15                 VARCHAR2 (60);
148    e_cost_segment16                 VARCHAR2 (60);
149    e_cost_segment17                 VARCHAR2 (60);
150    e_cost_segment18                 VARCHAR2 (60);
151    e_cost_segment19                 VARCHAR2 (60);
152    e_cost_segment20                 VARCHAR2 (60);
153    e_cost_segment21                 VARCHAR2 (60);
154    e_cost_segment22                 VARCHAR2 (60);
155    e_cost_segment23                 VARCHAR2 (60);
156    e_cost_segment24                 VARCHAR2 (60);
157    e_cost_segment25                 VARCHAR2 (60);
158    e_cost_segment26                 VARCHAR2 (60);
159    e_cost_segment27                 VARCHAR2 (60);
160    e_cost_segment28                 VARCHAR2 (60);
161    e_cost_segment29                 VARCHAR2 (60);
162    e_cost_segment30                 VARCHAR2 (60);
163    e_STATE_NAME                     hxt_sum_hours_worked_f.state_name%type;
164    e_COUNTY_NAME                    hxt_sum_hours_worked_f.county_name%type;
165    e_CITY_NAME                      hxt_sum_hours_worked_f.city_name%type;
166    e_ZIP_CODE                       hxt_sum_hours_worked_f.zip_code%type;
167    /*------------------------------
168    || Base Anchored Declarations
169    ------------------------------*/
170    project_id                       hxt_projects_v.project_id%TYPE;
171    earn_pol_id                      hxt_earning_policies.id%TYPE;
172 
173 
174 /*------------------------------------
175  || Public Module Declarations
176  ------------------------------------*/
177    FUNCTION CACHE
178       RETURN BOOLEAN;
179 
180    PROCEDURE set_cache (p_cache IN BOOLEAN);
181 
182 
183 --
184 -- ----------------------------------------------------------------------------
185 -- |-------------------------------< record_time >----------------------------|
186 -- ----------------------------------------------------------------------------
187 --
188 -- {Start Of Comments}
189 /*#
190  * This API provides a means for importing time entry data into the OTM
191  * system.
192  *
193  * It will create a new OTM Timecard for a given employee/time
194  * period if one does not already exist, or else adds time to an employee's
195  * existing OTM Timecard (only if the Timecard was not automatically
196  * generated).  The API is intended to log blocks of time worked by an
197  * employee and should be called repetitively to log separate blocks of
198  * time.  For example, if this API were being interfaced with a mechanical
199  * time clock, it would be called on each employee's PUNCH-OUT activity
200  * with both the PUNCH-IN and PUNCH-OUT times being passed as parameters.
201  *
202  * <p><b>Licensing</b><br>
203  * This API is licensed for use with Time and Labor.
204  *
205  * <p><b>Prerequisites</b><br>
206  * <P>employee_number must identify a unique (considering date effectivity)
207  * person in the PER_PEOPLE_F table.
208  * <P>assignment_id is currently NOT USED. Value passed may be NULL.
209  * Assignment to be used for employee will be the first applicable
210  * assignment to be queried from the PER_ASSIGNMENTS_F table.
211  * <P>start_time will be used as the date worked for the block of time
212  * being logged.  No consideration will be given to the possibility
213  * that a block of time worked may span into another day.
214  * <P>If adding time data to an already existing OTM Timecard, the
215  * Timecard must NOT have been generated automatically by OTM (ie,
216  * HXT_TIMECARDS.AUTO_GEN_FLAG must NOT equal 'A').
217  * <P>The system profile, HXT_BATCH_SIZE, defines the number of OTM
218  * Timecards that will be created with like BATCH_ID.  If no BATCH_ID
219  * is found with fewer than HXT_BATCH_SIZE Timecards, a new BATCH_ID
220  * will be created.
221  *
222  * <p><b>Post Success</b><br>
223  * If an OTM Timecard did not previously exist for the given employee
224  * during the time period covering the start time provided, one is created.
225  * Otherwise, the time data is added to the appropriate existing OTM
226  * Timecard, provided that Timecard was not automatically generated. The
227  * OUT parameters created_tim_sum_id, otm_error, oracle_error will be set.
228  *
229  * <p><b>Post Failure</b><br>
230  * An OTM Timecard may or may not be created or updated depending on the
231  * failure circumstance.  Errors will be logged in the table
232  * hxt_timeclock_errors and will be viewable on the OTM Timecard Errors
233  * form regardless of whether the Timecard was created or previously
234  * existed. The OUT parameters otm_error, oracle_error will be set to indicate the
235  * cause of the failure.
236  *
237  * @param timecard_source Identifies the source of time: Autogen,
238  * Autogen (changed), Manual, Time Clock, Manual (changed).
239  * @param batch_ref Batch Reference used in creating
240  * the batch.  If null, default name and reference generation are used.
241  * @param batch_name Batch Name used in creating the batch.  If null,
242  * default name and reference generation are used.
243  * @param approver_number Identifies the approver, if there
244  * is one, for this time information.
245  * @param employee_number Identifies the employee for whom
246  * time data is being logged. Verified via query of PER_PEOPLE_F table.
247  * @param date_worked The day for the time information.
248  * If null, date_worked is taken from start_time.  If date_worked,
249  * start_time and end_time are all NULL, an exception is raised.
250  * @param start_time Identifies the start date and time
251  * for the time data being logged. This value will become the date worked
252  * for the time data being logged.
253  * @param end_time Identifies the stop date and time
254  * for the time data being logged. Either date_worked is specified OR
255  * start_time and end_time are specified.  start_time and end_time
256  * are either both null or both not null
257  * @param hours The number of hours worked.  If null,
258  * it is calulated from start_time and end_time.
259  * @param wage_code Wage code for employee.
260  * @param earning_policy Earning Policy of employee.  If null,
261  * it is derived from employee's assignment information.
262  * @param hours_type The element which will be used in
263  * payroll; if null, derived from earning policy.
264  * @param earn_reason_code Earning reason code.
265  * @param project Project for this time information.
266  * @param task_number Task (should be related to specified project).  If
267  * task is specified, project has to be specified.
268  * @param location_code  Location.
269  * @param comment Comments.
270  * @param rate_multiple Rate multiple.
271  * @param hourly_rate Hourly rate.
272  * @param amount  Amount.
273  * @param separate_check_flag Separate Check (Y/N) - if the element
274  * allows for payment on separate check (i.e. the element has a separate
275  * check input value).
276  * @param business_group_id This is actually required, although
277  * the API defaults it to null.  It is used to derive the person_id
278  * from the specified employee_number, and it is required for that.
279  * @param concat_cost_segments Costing information.
280  * @param cost_segment1 Costing information.
281  * @param cost_segment2 Costing information.
282  * @param cost_segment3 Costing information.
283  * @param cost_segment4 Costing information.
284  * @param cost_segment5 Costing information.
285  * @param cost_segment6 Costing information.
289  * @param cost_segment10 Costing information.
286  * @param cost_segment7 Costing information.
287  * @param cost_segment8 Costing information.
288  * @param cost_segment9 Costing information.
290  * @param cost_segment11 Costing information.
291  * @param cost_segment12 Costing information.
292  * @param cost_segment13 Costing information.
293  * @param cost_segment14 Costing information.
294  * @param cost_segment15 Costing information.
295  * @param cost_segment16 Costing information.
296  * @param cost_segment17 Costing information.
297  * @param cost_segment18 Costing information.
298  * @param cost_segment19 Costing information.
299  * @param cost_segment20 Costing information.
300  * @param cost_segment21 Costing information.
301  * @param cost_segment22 Costing information.
302  * @param cost_segment23 Costing information.
303  * @param cost_segment24 Costing information.
304  * @param cost_segment25 Costing information.
305  * @param cost_segment26 Costing information.
306  * @param cost_segment27 Costing information.
307  * @param cost_segment28 Costing information.
308  * @param cost_segment29 Costing information.
309  * @param cost_segment30 Costing information.
310  * @param time_summary_id Time summary ID of existing time
311  * information - used for updating.
312  * @param tim_sum_eff_start_date Start date.
313  * @param tim_sum_eff_end_date End date.
314  * @param created_by Used for populating WHO column. Can
315  * be anything, no validation is done.
316  * @param last_updated_by Used for populating WHO column. Can
317  * be anything, no validation is done.
318  * @param last_update_login Used for populating WHO column. Can
319  * be anything, no validation is done.
320  * @param writesum_yn Y/N.  Insert the time summary
321  * information - default is 'Y'.
322  * @param explode_yn Y/N.  Explode the time information.
323  * into details - default is 'Y'.
324  * @param delete_yn Y/N.  If 'Y', if time_summary_id is
325  * not null, delete the associated time summary information - default is 'N'.
326  * @param dt_update_mode Date Track update Mode - CORRECTION
327  * or UPDATE.  If time_summary_id is specified, this parameter CANNOT
328  * be NULL.  Used for updating existing time information.
329  * @param created_tim_sum_id Created time summary ID.
330  * @param otm_error OTM error, if any.
331  * @param oracle_error Oracle error, if any.
332  * @param p_time_building_block_id Time building block id
333  * @param p_time_building_block_ovn Time building block OVN
334  * @param p_validate If true, then validation alone will be performed and
335  * the database will remain unchanged. If false and all validation checks pass,
336  * then the database will be modified.
337  * @param p_state_name State name
338  * @param p_county_name County name
339  * @param p_city_name City name
340  * @param p_zip_code Zip code
341  * @rep:displayname Record Time
342  * @rep:category BUSINESS_ENTITY HXC_TIMECARD
343  * @rep:lifecycle active
344  * @rep:scope public
345  */
346 --
347 -- {End Of Comments}
348 --
349 --
350 PROCEDURE record_time (
351       timecard_source             IN              VARCHAR2,
352       batch_ref                   IN              VARCHAR2 DEFAULT NULL,
353       batch_name                  IN              VARCHAR2 DEFAULT NULL,
354       approver_number             IN              VARCHAR2 DEFAULT NULL,
355       employee_number             IN              VARCHAR2,
356       date_worked                 IN              DATE DEFAULT NULL,
357       start_time                  IN              DATE DEFAULT NULL,
358       end_time                    IN              DATE DEFAULT NULL,
359       hours                       IN              NUMBER DEFAULT NULL,
360       wage_code                   IN              VARCHAR2 DEFAULT NULL,
361       earning_policy              IN              VARCHAR2 DEFAULT NULL,
362       hours_type                  IN              VARCHAR2 DEFAULT NULL,
363       earn_reason_code            IN              VARCHAR2 DEFAULT NULL,
364       project                     IN              VARCHAR2 DEFAULT NULL,
365       task_number                 IN              VARCHAR2 DEFAULT NULL,
366       location_code               IN              VARCHAR2 DEFAULT NULL,
367       COMMENT                     IN              VARCHAR2 DEFAULT NULL,
368       rate_multiple               IN              NUMBER DEFAULT NULL,
369       hourly_rate                 IN              NUMBER DEFAULT NULL,
370       amount                      IN              NUMBER DEFAULT NULL,
371       separate_check_flag         IN              VARCHAR2 DEFAULT NULL,
372       business_group_id           IN              NUMBER DEFAULT NULL,
373       concat_cost_segments        IN              VARCHAR2 DEFAULT NULL,
374       cost_segment1               IN              VARCHAR2 DEFAULT NULL,
375       cost_segment2               IN              VARCHAR2 DEFAULT NULL,
376       cost_segment3               IN              VARCHAR2 DEFAULT NULL,
377       cost_segment4               IN              VARCHAR2 DEFAULT NULL,
378       cost_segment5               IN              VARCHAR2 DEFAULT NULL,
379       cost_segment6               IN              VARCHAR2 DEFAULT NULL,
380       cost_segment7               IN              VARCHAR2 DEFAULT NULL,
381       cost_segment8               IN              VARCHAR2 DEFAULT NULL,
382       cost_segment9               IN              VARCHAR2 DEFAULT NULL,
383       cost_segment10              IN              VARCHAR2 DEFAULT NULL,
384       cost_segment11              IN              VARCHAR2 DEFAULT NULL,
385       cost_segment12              IN              VARCHAR2 DEFAULT NULL,
386       cost_segment13              IN              VARCHAR2 DEFAULT NULL,
387       cost_segment14              IN              VARCHAR2 DEFAULT NULL,
388       cost_segment15              IN              VARCHAR2 DEFAULT NULL,
389       cost_segment16              IN              VARCHAR2 DEFAULT NULL,
390       cost_segment17              IN              VARCHAR2 DEFAULT NULL,
391       cost_segment18              IN              VARCHAR2 DEFAULT NULL,
392       cost_segment19              IN              VARCHAR2 DEFAULT NULL,
393       cost_segment20              IN              VARCHAR2 DEFAULT NULL,
394       cost_segment21              IN              VARCHAR2 DEFAULT NULL,
395       cost_segment22              IN              VARCHAR2 DEFAULT NULL,
396       cost_segment23              IN              VARCHAR2 DEFAULT NULL,
397       cost_segment24              IN              VARCHAR2 DEFAULT NULL,
398       cost_segment25              IN              VARCHAR2 DEFAULT NULL,
399       cost_segment26              IN              VARCHAR2 DEFAULT NULL,
400       cost_segment27              IN              VARCHAR2 DEFAULT NULL,
401       cost_segment28              IN              VARCHAR2 DEFAULT NULL,
402       cost_segment29              IN              VARCHAR2 DEFAULT NULL,
403       cost_segment30              IN              VARCHAR2 DEFAULT NULL,
404       time_summary_id             IN              NUMBER DEFAULT NULL,
405       tim_sum_eff_start_date      IN              DATE DEFAULT NULL,
406       tim_sum_eff_end_date        IN              DATE DEFAULT NULL,
407       created_by                  IN              NUMBER,
408       last_updated_by             IN              NUMBER,
409       last_update_login           IN              NUMBER,
410       writesum_yn                 IN              VARCHAR2 DEFAULT 'Y',
411       explode_yn                  IN              VARCHAR2 DEFAULT 'Y',
412       delete_yn                   IN              VARCHAR2 DEFAULT 'N', -- AM 001
413       dt_update_mode              IN              VARCHAR2 DEFAULT NULL, --SIR290, SIR293
414       created_tim_sum_id          OUT NOCOPY      NUMBER,
415       otm_error                   OUT NOCOPY      VARCHAR2,
416       oracle_error                OUT NOCOPY      VARCHAR2,
417       p_time_building_block_id    IN              NUMBER DEFAULT NULL,
418       p_time_building_block_ovn   IN              NUMBER DEFAULT NULL,
419       p_validate                  IN              BOOLEAN DEFAULT FALSE,
420       p_STATE_NAME                IN              VARCHAR2 DEFAULT NULL,
421       p_COUNTY_NAME               IN              VARCHAR2 DEFAULT NULL,
422       p_CITY_NAME                 IN              VARCHAR2 DEFAULT NULL,
423       p_ZIP_CODE                  IN              VARCHAR2 DEFAULT NULL
424    );
425 
426    PROCEDURE log_timeclock_errors (
427       otm_msg                  IN              VARCHAR2,
428       created_by               IN              NUMBER,
429       ora_message              IN              VARCHAR2,
430       timecard_source          IN              VARCHAR2,
431       approver_number          IN              VARCHAR2 DEFAULT NULL,
432       employee_number          IN              VARCHAR2,
433       date_worked              IN              DATE DEFAULT NULL,
434       start_time               IN              DATE DEFAULT NULL,
435       end_time                 IN              DATE DEFAULT NULL,
436       hours                    IN              NUMBER DEFAULT NULL,
437       wage_code                IN              VARCHAR2 DEFAULT NULL,
438       earning_policy           IN              VARCHAR2 DEFAULT NULL,
439       hours_type               IN              VARCHAR2 DEFAULT NULL,
440       earn_reason_code         IN              VARCHAR2 DEFAULT NULL,
441       cost_center_id           IN              NUMBER DEFAULT NULL,
442       project                  IN              VARCHAR2 DEFAULT NULL,
443       task_number              IN              VARCHAR2 DEFAULT NULL,
444       location_code            IN              VARCHAR2 DEFAULT NULL,
445       hrw_comment              IN              VARCHAR2 DEFAULT NULL,
446       rate_multiple            IN              NUMBER DEFAULT NULL,
447       hourly_rate              IN              NUMBER DEFAULT NULL,
448       amount                   IN              NUMBER DEFAULT NULL,
449       separate_check_flag      IN              VARCHAR2 DEFAULT NULL,
450       business_group_id        IN              NUMBER DEFAULT NULL,
451       concat_cost_segments     IN              VARCHAR2 DEFAULT NULL,
452       cost_segment1            IN              VARCHAR2 DEFAULT NULL,
453       cost_segment2            IN              VARCHAR2 DEFAULT NULL,
454       cost_segment3            IN              VARCHAR2 DEFAULT NULL,
455       cost_segment4            IN              VARCHAR2 DEFAULT NULL,
456       cost_segment5            IN              VARCHAR2 DEFAULT NULL,
457       cost_segment6            IN              VARCHAR2 DEFAULT NULL,
458       cost_segment7            IN              VARCHAR2 DEFAULT NULL,
459       cost_segment8            IN              VARCHAR2 DEFAULT NULL,
460       cost_segment9            IN              VARCHAR2 DEFAULT NULL,
461       cost_segment10           IN              VARCHAR2 DEFAULT NULL,
462       cost_segment11           IN              VARCHAR2 DEFAULT NULL,
463       cost_segment12           IN              VARCHAR2 DEFAULT NULL,
464       cost_segment13           IN              VARCHAR2 DEFAULT NULL,
465       cost_segment14           IN              VARCHAR2 DEFAULT NULL,
466       cost_segment15           IN              VARCHAR2 DEFAULT NULL,
467       cost_segment16           IN              VARCHAR2 DEFAULT NULL,
468       cost_segment17           IN              VARCHAR2 DEFAULT NULL,
469       cost_segment18           IN              VARCHAR2 DEFAULT NULL,
470       cost_segment19           IN              VARCHAR2 DEFAULT NULL,
471       cost_segment20           IN              VARCHAR2 DEFAULT NULL,
472       cost_segment21           IN              VARCHAR2 DEFAULT NULL,
473       cost_segment22           IN              VARCHAR2 DEFAULT NULL,
474       cost_segment23           IN              VARCHAR2 DEFAULT NULL,
475       cost_segment24           IN              VARCHAR2 DEFAULT NULL,
476       cost_segment25           IN              VARCHAR2 DEFAULT NULL,
477       cost_segment26           IN              VARCHAR2 DEFAULT NULL,
478       cost_segment27           IN              VARCHAR2 DEFAULT NULL,
479       cost_segment28           IN              VARCHAR2 DEFAULT NULL,
480       cost_segment29           IN              VARCHAR2 DEFAULT NULL,
481       cost_segment30           IN              VARCHAR2 DEFAULT NULL,
482       time_summary_id          IN              NUMBER DEFAULT NULL,
483       tim_sum_eff_start_date   IN              DATE DEFAULT NULL,
484       tim_sum_eff_end_date     IN              DATE DEFAULT NULL,
485       oracle_error             OUT NOCOPY      VARCHAR2
486    );
487 
488    PROCEDURE re_explode_timecard (
489       timecard_id          IN              NUMBER,
490       tim_eff_start_date   IN              DATE,
491       tim_eff_end_date     IN              DATE,
492       dt_update_mode       IN              VARCHAR2,
493       otm_error            OUT NOCOPY      VARCHAR2,
494       oracle_error         OUT NOCOPY      VARCHAR2
495    );
496 
497 
498 --  p_mode IN VARCHAR2 default 'INSERT');
499 
500    PROCEDURE delete_details (
501       p_tim_id                 IN              NUMBER,
502       p_dt_update_mode         IN              VARCHAR2,
503       p_effective_start_date   IN              DATE,
504       o_error_message          OUT NOCOPY      NUMBER
505    );
506 
507       PROCEDURE adjust_timings (
508       p_timecard_source IN              VARCHAR2,
509       p_assignment_id   IN              NUMBER,
510       p_person_id       IN              NUMBER,
511       p_date_worked     IN              DATE,
512       p_tim_id          IN              NUMBER,
513       p_hours_id        IN              NUMBER,
514       p_earn_pol_id     IN              NUMBER,
515       p_time_in         IN OUT NOCOPY   DATE,
516       p_time_out        IN OUT NOCOPY   DATE,
517       p_hours           IN OUT NOCOPY   NUMBER,
518       p_code               OUT NOCOPY   NUMBER,
519       p_error              OUT NOCOPY   VARCHAR2,
520       p_org_in          IN              DATE DEFAULT NULL,
521       p_org_out         IN              DATE DEFAULT NULL,
522       p_actual_time_in  IN OUT NOCOPY   DATE,
523       p_actual_time_out IN OUT NOCOPY   DATE
524    );
525 
526 END hxt_time_collection;