523: c_period_start_dt IN DATE,
524: c_period_end_dt IN DATE
525: ) IS
526: SELECT min(asg.effective_start_date) , max(asg.effective_end_date)
527: FROM per_assignments_f asg,per_assignment_status_types past
528: WHERE asg.assignment_status_type_id = past.assignment_status_type_id
529: AND past.per_system_status = 'ACTIVE_ASSIGN'
530: AND asg.effective_start_date <= c_period_end_dt
531: AND nvl(asg.effective_end_date, c_period_end_dt) >= c_period_start_dt
535: c_period_start_dt IN DATE
536: ) IS
537: SELECT
538: decode(asg.EFFECTIVE_END_DATE,to_date('31-12-4712','dd-mm-yyyy'),null,asg.EFFECTIVE_END_DATE)
539: FROM per_assignments_f asg,per_assignment_status_types past
540: WHERE asg.assignment_status_type_id = past.assignment_status_type_id
541: AND past.per_system_status = 'ACTIVE_ASSIGN'
542: AND trunc(c_period_start_dt) = asg.effective_start_date
543: AND asg.assignment_id = c_assign_id;
567:
568: CURSOR
569: c_get_max_si_values(c_assignment_id IN NUMBER,c_effective_date IN DATE) IS
570: SELECT SEGMENT26,segment27
571: FROM hr_soft_coding_keyflex hr_keyflex,per_assignments_f ASSIGN
572: WHERE ASSIGN.assignment_id = c_assignment_id
573: AND hr_keyflex.soft_coding_keyflex_id = ASSIGN.soft_coding_keyflex_id
574: AND hr_keyflex.enabled_flag = 'Y'
575: AND trunc(c_effective_date) BETWEEN ASSIGN.effective_start_date AND ASSIGN.effective_end_date;
2095: AND date_start <= p_date_earned;
2096:
2097: CURSOR c_pt_cur (c_effective_date IN DATE) IS
2098: SELECT fnd_number.canonical_to_number(NVL(target.SEGMENT29,'100')) pt_perc
2099: FROM per_assignments_f asg
2100: ,hr_soft_coding_keyflex target
2101: WHERE asg.assignment_id = p_assignment_id
2102: AND target.soft_coding_keyflex_id = asg.soft_coding_keyflex_id
2103: AND trunc(c_effective_date) between asg.effective_start_date
5210: -- Cursor to get the start date for the active asg
5211: --
5212: CURSOR c_get_assign_start_date IS
5213: SELECT min(asg.effective_start_date)
5214: FROM per_assignments_f asg
5215: ,per_assignment_status_types past
5216: WHERE asg.assignment_status_type_id = past.assignment_status_type_id
5217: AND past.per_system_status = 'ACTIVE_ASSIGN'
5218: AND asg.effective_start_date <= trunc(p_period_end_date)
5230: to_date ('31/12/4712','DD/MM/YYYY'),
5231: trunc(p_period_end_date),
5232: asg.effective_end_date) End_Dt
5233: ,fnd_number.canonical_to_number(NVL(target.SEGMENT29,'100')) pt_perc
5234: FROM per_assignments_f asg
5235: ,per_assignment_status_types past
5236: ,hr_soft_coding_keyflex target
5237: WHERE asg.assignment_status_type_id = past.assignment_status_type_id
5238: AND past.per_system_status = 'ACTIVE_ASSIGN'