1 PACKAGE BODY HXT_CLOCK_USER_EDITS AS
2 /* $Header: hxtclked.pkb 120.0 2005/05/29 06:01:29 appldev noship $ */
3
4 /********************************************************
5 Because customers will have different definitions
6 of what an Employee Number is, get_person_id exists
7 as a user exit.
8 For base system, this call will return
9 a valid person_id, last_name, and first_name from
10 the per_people_f using the input value employee_number
11 passed in as a parameter.
12 *********************************************************/
13 FUNCTION get_person_id(i_employee_number IN VARCHAR2,
14 i_business_group_id IN NUMBER,
15 i_date_worked IN DATE,
16 o_person_id OUT NOCOPY NUMBER,
17 o_last_name OUT NOCOPY VARCHAR2,
18 o_first_name OUT NOCOPY VARCHAR2)RETURN NUMBER IS
19 BEGIN
20 SELECT person_id,
21 last_name,
22 first_name
23 INTO o_person_id,
24 o_last_name,
25 o_first_name
26 FROM per_people_f
27 WHERE employee_number = i_employee_number
28 AND i_date_worked BETWEEN effective_start_date
29 AND effective_end_date
30 AND business_group_id = i_business_group_id;
31
32 RETURN 0;
33
34 EXCEPTION
35 WHEN NO_DATA_FOUND THEN
36 RETURN 1;
37 WHEN OTHERS THEN
38 RETURN 2;
39
40 END get_person_id;
41 /***********************************************
42 determine_pay_date()
43 Rules to define what day an employee is paid
44 based upon the time punch will vary. We will
45 pass in start_time, end_time, and the person_id
46 as arguments to this function.
47 Phase I merely sets the date worked = to the
48 start time. Future releases will need to determine
49 the date worked based upon the employee's
50 work schedule.
51 ************************************************/
52 FUNCTION determine_pay_date( i_start_time IN DATE,
53 i_end_time IN DATE,
54 i_person_id IN NUMBER,
55 o_date_worked OUT NOCOPY DATE) RETURN NUMBER IS
56 BEGIN
57 o_date_worked := trunc(i_start_time); -- SIR268
58 RETURN 0;
59 END determine_pay_date;
60 END HXT_CLOCK_USER_EDITS;