[Home] [Help]
1200: -- pre-defined earnings, REGULAR_WAGES_RATE) pay period earnings.
1201: --
1202: -- In either case, need to find the payroll period type, let's do it upfront:
1203: -- Assignment.payroll_id --> Payroll.period_type
1204: -- --> Per_time_period_types.number_per_fiscal_year.
1205: -- Actually, the number per fiscal year could be found in more than one way:
1206: -- Could also go to per_time_period_rules, but would mean decoding the
1207: -- payroll period type to an appropriate proc_period_type code.
1208: --
1217:
1218: SELECT TPT.number_per_fiscal_year
1219: INTO v_pay_periods_per_year
1220: FROM pay_payrolls_f PRL,
1221: per_time_period_types TPT
1222: WHERE TPT.period_type = PRL.period_type
1223: AND p_period_end between PRL.effective_start_date
1224: and PRL.effective_end_date
1225: AND PRL.payroll_id = p_payroll_id
2485:
2486: select TPT.number_per_fiscal_year
2487: into v_periods_per_fiscal_yr
2488: from pay_payrolls_f PPF,
2489: per_time_period_types TPT,
2490: fnd_sessions fs
2491: where PPF.payroll_id = p_payroll
2492: and fs.session_id = USERENV('SESSIONID')
2493: and fs.effective_date between PPF.effective_start_date and PPF.effective_end_date
2507:
2508: SELECT TPT.number_per_fiscal_year
2509: INTO v_annualizing_factor
2510: FROM pay_payrolls_f PRL,
2511: per_time_period_types TPT,
2512: fnd_sessions fs
2513: WHERE TPT.period_type = PRL.period_type
2514: and fs.session_id = USERENV('SESSIONID')
2515: and fs.effective_date BETWEEN PRL.effective_start_date
2561:
2562: SELECT TPT.number_per_fiscal_year
2563: INTO v_annualizing_factor
2564: FROM pay_payrolls_f PRL,
2565: per_time_period_types TPT,
2566: fnd_sessions fs
2567: WHERE TPT.period_type = PRL.period_type
2568: and fs.session_id = USERENV('SESSIONID')
2569: and fs.effective_date BETWEEN PRL.effective_start_date
2579: hr_utility.trace('Not hourly - an actual time period type');
2580:
2581: BEGIN
2582:
2583: hr_utility.trace(' selecting from per_time_period_types');
2584:
2585: SELECT PT.number_per_fiscal_year
2586: INTO v_annualizing_factor
2587: FROM per_time_period_types PT
2583: hr_utility.trace(' selecting from per_time_period_types');
2584:
2585: SELECT PT.number_per_fiscal_year
2586: INTO v_annualizing_factor
2587: FROM per_time_period_types PT
2588: WHERE UPPER(PT.period_type) = UPPER(p_freq);
2589:
2590: hr_utility.trace('v_annualizing_factor ='||to_number(v_annualizing_factor));
2591:
2659:
2660: select TPT.number_per_fiscal_year
2661: into v_periods_per_fiscal_yr
2662: from pay_payrolls_f PPF,
2663: per_time_period_types TPT,
2664: fnd_sessions fs
2665: where PPF.payroll_id = p_payroll
2666: and fs.session_id = USERENV('SESSIONID')
2667: and fs.effective_date between PPF.effective_start_date and PPF.effective_end_date
4252: hr_utility.set_location('Dedn_Freq_Factor', 15);
4253: SELECT TPT.number_per_fiscal_year
4254: INTO v_pay_period_num_per_fy
4255: FROM pay_payrolls_f PPF,
4256: per_time_period_types TPT
4257: WHERE TPT.period_type = PPF.period_type
4258: AND p_date_earned BETWEEN PPF.effective_start_date
4259: AND PPF.effective_end_date
4260: AND PPF.payroll_id = p_payroll_id;
4324: --
4325: hr_utility.set_location('Dedn_Freq_Factor', 40);
4326: SELECT number_per_fiscal_year
4327: INTO v_ele_period_num_per_fy
4328: FROM per_time_period_types TPT
4329: WHERE UPPER(period_type) = UPPER(p_ele_period_type);
4330: --
4331: hr_utility.set_location('Dedn_Freq_Factor', 45);
4332: SELECT TPT.number_per_fiscal_year
4330: --
4331: hr_utility.set_location('Dedn_Freq_Factor', 45);
4332: SELECT TPT.number_per_fiscal_year
4333: INTO v_pay_period_num_per_fy
4334: FROM per_time_period_types TPT,
4335: pay_payrolls_f PPF
4336: WHERE TPT.period_type = PPF.period_type
4337: AND p_date_earned BETWEEN PPF.effective_start_date
4338: AND PPF.effective_end_date
4344: --
4345: hr_utility.set_location('Dedn_Freq_Factor', 50);
4346: SELECT number_per_fiscal_year
4347: INTO v_ele_period_num_per_fy
4348: FROM per_time_period_types TPT
4349: WHERE UPPER(period_type) = UPPER(p_ele_period_type);
4350: --
4351: hr_utility.set_location('Dedn_Freq_Factor', 55);
4352: SELECT TPT.number_per_fiscal_year
4351: hr_utility.set_location('Dedn_Freq_Factor', 55);
4352: SELECT TPT.number_per_fiscal_year
4353: INTO v_pay_period_num_per_fy
4354: FROM pay_payrolls_f PPF,
4355: per_time_period_types TPT
4356: WHERE TPT.period_type = PPF.period_type
4357: AND PPF.payroll_id = p_payroll_id
4358: AND p_date_earned BETWEEN PPF.effective_start_date
4359: AND PPF.effective_end_date;