213: -- Bug #1942971 -- Start
214:
215: l_initialise_type := 'Leave Accrual Initialise' ;
216:
217: l_accrual_init_pre78 := (hr_au_holidays.get_leave_initialise
218: (p_assignment_id => p_assignment_id
219: ,p_accrual_plan_id => l_plan_id
220: ,p_calc_end_date => l_pre_16_aug_1978 - 1
221: ,p_initialise_type => l_initialise_type
224: ));
225:
226: l_initialise_type := 'Leave Entitlement Initialise' ;
227:
228: l_entitlement_init_pre78 := (hr_au_holidays.get_leave_initialise
229: (p_assignment_id => p_assignment_id
230: ,p_accrual_plan_id => l_plan_id
231: ,p_calc_end_date => l_pre_16_aug_1978 - 1
232: ,p_initialise_type => l_initialise_type
303:
304: -- Bug #1942971 -- Start
305: l_initialise_type := 'Leave Accrual Initialise' ;
306:
307: l_accrual_init_post78 := (hr_au_holidays.get_leave_initialise
308: (p_assignment_id => p_assignment_id
309: ,p_accrual_plan_id => l_plan_id
310: ,p_calc_end_date => l_post_17_aug_1993
311: ,p_initialise_type => l_initialise_type
314: ));
315:
316: l_initialise_type := 'Leave Entitlement Initialise' ;
317:
318: l_entitlement_init_post78 := (hr_au_holidays.get_leave_initialise
319: (p_assignment_id => p_assignment_id
320: ,p_accrual_plan_id => l_plan_id
321: ,p_calc_end_date => l_post_17_aug_1993
322: ,p_initialise_type => l_initialise_type
386: (C) l_post93_absence = Absence (Standard Plan) + Other Contrib (Foreign Plan)
387:
388: */
389:
390: hr_au_holidays.set_accrual_ids(l_plan_id);
391:
392: IF (hr_au_holidays.g_fw_exists AND hr_au_holidays.g_fw_plan_id IS NOT NULL
393: AND hr_au_holidays.g_fw_plan_id <> l_plan_id)
394: THEN
388: */
389:
390: hr_au_holidays.set_accrual_ids(l_plan_id);
391:
392: IF (hr_au_holidays.g_fw_exists AND hr_au_holidays.g_fw_plan_id IS NOT NULL
393: AND hr_au_holidays.g_fw_plan_id <> l_plan_id)
394: THEN
395:
396: l_fw_others_ent_post93 := per_accrual_calc_functions.get_other_net_contribution
389:
390: hr_au_holidays.set_accrual_ids(l_plan_id);
391:
392: IF (hr_au_holidays.g_fw_exists AND hr_au_holidays.g_fw_plan_id IS NOT NULL
393: AND hr_au_holidays.g_fw_plan_id <> l_plan_id)
394: THEN
395:
396: l_fw_others_ent_post93 := per_accrual_calc_functions.get_other_net_contribution
397: (p_assignment_id => p_assignment_id
394: THEN
395:
396: l_fw_others_ent_post93 := per_accrual_calc_functions.get_other_net_contribution
397: (p_assignment_id => p_assignment_id
398: ,p_plan_id => hr_au_holidays.g_fw_plan_id
399: ,p_start_date => l_start_date
400: ,p_calculation_date => p_effective_date);
401:
402: l_fw_post93_absence := per_accrual_calc_functions.get_absence
400: ,p_calculation_date => p_effective_date);
401:
402: l_fw_post93_absence := per_accrual_calc_functions.get_absence
403: (p_assignment_id => p_assignment_id
404: ,p_plan_id => hr_au_holidays.g_fw_plan_id
405: ,p_calculation_date => p_effective_date
406: ,p_start_date => greatest(l_post_17_aug_1993 + 1, l_start_date));
407: ELSE
408: l_fw_others_ent_post93 := 0;
428:
429: -- Bug #1942971 -- Start
430: l_initialise_type := 'Leave Accrual Initialise' ;
431:
432: l_accrual_init_post93 := (hr_au_holidays.get_leave_initialise
433: (p_assignment_id => p_assignment_id
434: ,p_accrual_plan_id => l_plan_id
435: ,p_calc_end_date => p_effective_date
436: ,p_initialise_type => l_initialise_type
439: ));
440:
441: l_initialise_type := 'Leave Entitlement Initialise' ;
442:
443: l_entitlement_init_post93 := (hr_au_holidays.get_leave_initialise
444: (p_assignment_id => p_assignment_id
445: ,p_accrual_plan_id => l_plan_id
446: ,p_calc_end_date => p_effective_date
447: ,p_initialise_type => l_initialise_type
663: --
664: -- RETURNS: accrual_plan_id if successful, 0 otherwise
665: --
666: -- PURPOSE: To retrieve accrual plan id for designated category, copy
667: -- of hr_au_holidays equivalent except that when no accrual
668: -- plan is found return 0, this is to allow for casual employees
669: -- who do not have accrual plans and are not supposed to be paid
670: -- for such on termination.
671: --
675: -- OUT:
676: --
677: --
678: -- USES: hr_utility
679: -- hr_au_holidays
680: --
681: function get_accrual_plan_by_category
682: (p_assignment_id in number
683: ,p_effective_date in date
761: -- OUT:
762: --
763: --
764: -- USES: hr_utility
765: -- hr_au_holidays
766: --
767: function calculate_marginal_tax
768: ( p_date_earned in date
769: , p_tax_variation_type in varchar2
1005: -- p_post30jun1983_ratio - ratio to use when calculating the post 30 June 1983 portion of ETP
1006: --
1007: -- USES: hr_utility
1008: -- fffunc
1009: -- hr_au_holidays
1010: --
1011: function etp_prepost_ratios
1012: (p_assignment_id in number
1013: ,p_hire_date in date
1179: p_pre01jul1983_days := 0;
1180: p_pre01jul1983_ratio := 0;
1181: p_post30jun1983_ratio := 1;
1182: l_days_worked_post := fffunc.days_between(p_termination_date, l_calculation_date);
1183: l_days_suspended_post := hr_au_holidays.days_suspended(p_assignment_id, l_calculation_date, p_termination_date);
1184: p_post30jun1983_days := l_days_worked_post - l_days_suspended_post;
1185: p_etp_service_date := l_calculation_date; /* Bug# 2984390 */
1186: /* Bug 4177679 Only if the calculation date is entered then the p_le_etp_service_date will be passed*/
1187: if l_calc_date_entered = 'Y' then
1199: p_post30jun1983_days := 0;
1200: p_post30jun1983_ratio := 0;
1201: p_pre01jul1983_ratio := 1;
1202: l_days_worked_pre := fffunc.days_between(p_termination_date, l_calculation_date);
1203: l_days_suspended_pre := hr_au_holidays.days_suspended(p_assignment_id, l_calculation_date, p_termination_date);
1204: p_pre01jul1983_days := l_days_worked_pre - l_days_suspended_pre;
1205: p_etp_service_date := l_calculation_date; /* Bug# 2984390 */
1206: /* Bug 4177679 Only if the calculation date is entered then the p_le_etp_service_date will be passed*/
1207: if l_calc_date_entered = 'Y' then
1220: l_days_worked_total := fffunc.days_between(p_termination_date, l_calculation_date) + 1;
1221: --
1222: -- How many of these days were suspended without pay for pre, post and total
1223: --
1224: l_days_suspended_pre := hr_au_holidays.days_suspended(p_assignment_id, l_calculation_date, l_pre_date);
1225: l_days_suspended_post := hr_au_holidays.days_suspended(p_assignment_id, l_post_date, p_termination_date);
1226: l_days_suspended_total := hr_au_holidays.days_suspended(p_assignment_id, l_calculation_date, p_termination_date);
1227: --
1228: l_actual_pre := l_days_worked_pre - l_days_suspended_pre;
1221: --
1222: -- How many of these days were suspended without pay for pre, post and total
1223: --
1224: l_days_suspended_pre := hr_au_holidays.days_suspended(p_assignment_id, l_calculation_date, l_pre_date);
1225: l_days_suspended_post := hr_au_holidays.days_suspended(p_assignment_id, l_post_date, p_termination_date);
1226: l_days_suspended_total := hr_au_holidays.days_suspended(p_assignment_id, l_calculation_date, p_termination_date);
1227: --
1228: l_actual_pre := l_days_worked_pre - l_days_suspended_pre;
1229: l_actual_post := l_days_worked_post - l_days_suspended_post;
1222: -- How many of these days were suspended without pay for pre, post and total
1223: --
1224: l_days_suspended_pre := hr_au_holidays.days_suspended(p_assignment_id, l_calculation_date, l_pre_date);
1225: l_days_suspended_post := hr_au_holidays.days_suspended(p_assignment_id, l_post_date, p_termination_date);
1226: l_days_suspended_total := hr_au_holidays.days_suspended(p_assignment_id, l_calculation_date, p_termination_date);
1227: --
1228: l_actual_pre := l_days_worked_pre - l_days_suspended_pre;
1229: l_actual_post := l_days_worked_post - l_days_suspended_post;
1230: l_actual_total := l_days_worked_total - l_days_suspended_total;
1852: if csr1.accrual_units_of_measure = 'D' and l_days_flag='N' then
1853: l_days_flag := 'Y';
1854: end if;
1855:
1856: l_hours := l_hours + hr_au_holidays.get_net_accrual(p_assignment_id,p_payroll_id,
1857: p_business_group_id, csr1.accrual_plan_id,p_effective_date);
1858: end loop;
1859:
1860: IF l_error = 'Y'
3166: THEN
3167: l_days_flag := 'Y';
3168: END IF;
3169:
3170: l_std_hours := l_std_hours + hr_au_holidays.get_net_accrual(p_assignment_id,p_payroll_id,
3171: p_business_group_id, csr1.accrual_plan_id,p_effective_date);
3172: END LOOP;
3173:
3174: /* Count the Foreign Accrual */
3179: l_error := 'Y';
3180: EXIT;
3181: END IF;
3182:
3183: l_fw_hours := l_fw_hours + hr_au_holidays.get_net_accrual(p_assignment_id,p_payroll_id,
3184: p_business_group_id, csr1.accrual_plan_id,p_effective_date);
3185: END LOOP;
3186:
3187: END LOOP;