4: FUNCTION get_tc_hrs_total(p_tim_id IN NUMBER) RETURN NUMBER IS
5:
6: CURSOR tot_hrs IS
7: select sum(thw.hours)
8: from hxt_sum_hours_worked thw
9: where thw.tim_id = p_tim_id
10: and thw.element_type_id is null;
11:
12: CURSOR tot_hrs2 IS
10: and thw.element_type_id is null;
11:
12: CURSOR tot_hrs2 IS
13: select sum(thw.hours)
14: from hxt_sum_hours_worked thw
15: ,pay_element_types_f elt
16: ,hxt_pay_element_types_f_ddf_v eltv
17: where thw.tim_id = p_tim_id
18: and thw.element_type_id is not null