1574: select pay_basis
1575: from per_pay_bases ppb
1576: where ppb.pay_basis_id = p_pay_basis_id;
1577:
1578: -- select pay_basis from per_pay_bases ppb, per_all_assignments_f paf
1579: -- where paf.pay_basis_id = ppb.pay_basis_id
1580: -- and paf.assignment_id = p_assignment_id
1581: --and p_commit_calculation_dt between paf.effective_start_date and paf.effective_end_date;
1582: -- and paf.effective_end_date >= p_commit_calculation_dt
2151: business_group_id,payroll_id,
2152: normal_hours,frequency,
2153: effective_start_date,
2154: effective_end_date
2155: From per_all_assignments_f
2156: Where position_id = p_position_id
2157: And p_commit_calculation_dt <= effective_end_date
2158: and p_commit_end_dt >= effective_start_date;
2159:
2163: business_group_id,payroll_id,
2164: normal_hours,frequency,
2165: effective_start_date,
2166: effective_end_date
2167: From per_all_assignments_f
2168: Where assignment_id = p_assignment_id
2169: And p_commit_calculation_dt <= effective_end_date
2170: and p_commit_end_dt >= effective_start_date;
2171: --
2177: business_group_id,payroll_id,
2178: normal_hours,frequency,
2179: effective_start_date,
2180: effective_end_date
2181: From per_all_assignments_f
2182: Where organization_id = p_organization_id
2183: And p_commit_calculation_dt <= effective_end_date
2184: and p_commit_end_dt >= effective_start_date;
2185: --
2190: business_group_id,payroll_id,
2191: normal_hours,frequency,
2192: effective_start_date,
2193: effective_end_date
2194: From per_all_assignments_f
2195: Where job_id = p_job_id
2196: And p_commit_calculation_dt <= effective_end_date
2197: and p_commit_end_dt >= effective_start_date;
2198:
2204: business_group_id,payroll_id,
2205: normal_hours,frequency,
2206: effective_start_date,
2207: effective_end_date
2208: From per_all_assignments_f
2209: Where grade_id = p_grade_id
2210: And p_commit_calculation_dt <= effective_end_date
2211: and p_commit_end_dt >= effective_start_date;
2212:
2215: -- DECLARE all local variables.
2216: --
2217: --define a record to store the details.
2218: type entity_assignment_rec is record (
2219: assignment_id per_all_assignments_f.assignment_id%type,
2220: pay_basis_id per_all_assignments_f.pay_basis_id%type,
2221: business_group_id per_all_assignments_f.business_group_id%type,
2222: payroll_id per_all_assignments_f.payroll_id%type,
2223: normal_hours per_all_assignments_f.normal_hours%type,
2216: --
2217: --define a record to store the details.
2218: type entity_assignment_rec is record (
2219: assignment_id per_all_assignments_f.assignment_id%type,
2220: pay_basis_id per_all_assignments_f.pay_basis_id%type,
2221: business_group_id per_all_assignments_f.business_group_id%type,
2222: payroll_id per_all_assignments_f.payroll_id%type,
2223: normal_hours per_all_assignments_f.normal_hours%type,
2224: frequency per_all_assignments_f.frequency%type,
2217: --define a record to store the details.
2218: type entity_assignment_rec is record (
2219: assignment_id per_all_assignments_f.assignment_id%type,
2220: pay_basis_id per_all_assignments_f.pay_basis_id%type,
2221: business_group_id per_all_assignments_f.business_group_id%type,
2222: payroll_id per_all_assignments_f.payroll_id%type,
2223: normal_hours per_all_assignments_f.normal_hours%type,
2224: frequency per_all_assignments_f.frequency%type,
2225: effective_start_date per_all_assignments_f.effective_start_date%type,
2218: type entity_assignment_rec is record (
2219: assignment_id per_all_assignments_f.assignment_id%type,
2220: pay_basis_id per_all_assignments_f.pay_basis_id%type,
2221: business_group_id per_all_assignments_f.business_group_id%type,
2222: payroll_id per_all_assignments_f.payroll_id%type,
2223: normal_hours per_all_assignments_f.normal_hours%type,
2224: frequency per_all_assignments_f.frequency%type,
2225: effective_start_date per_all_assignments_f.effective_start_date%type,
2226: effective_end_date per_all_assignments_f.effective_end_date%type
2219: assignment_id per_all_assignments_f.assignment_id%type,
2220: pay_basis_id per_all_assignments_f.pay_basis_id%type,
2221: business_group_id per_all_assignments_f.business_group_id%type,
2222: payroll_id per_all_assignments_f.payroll_id%type,
2223: normal_hours per_all_assignments_f.normal_hours%type,
2224: frequency per_all_assignments_f.frequency%type,
2225: effective_start_date per_all_assignments_f.effective_start_date%type,
2226: effective_end_date per_all_assignments_f.effective_end_date%type
2227: );
2220: pay_basis_id per_all_assignments_f.pay_basis_id%type,
2221: business_group_id per_all_assignments_f.business_group_id%type,
2222: payroll_id per_all_assignments_f.payroll_id%type,
2223: normal_hours per_all_assignments_f.normal_hours%type,
2224: frequency per_all_assignments_f.frequency%type,
2225: effective_start_date per_all_assignments_f.effective_start_date%type,
2226: effective_end_date per_all_assignments_f.effective_end_date%type
2227: );
2228:
2221: business_group_id per_all_assignments_f.business_group_id%type,
2222: payroll_id per_all_assignments_f.payroll_id%type,
2223: normal_hours per_all_assignments_f.normal_hours%type,
2224: frequency per_all_assignments_f.frequency%type,
2225: effective_start_date per_all_assignments_f.effective_start_date%type,
2226: effective_end_date per_all_assignments_f.effective_end_date%type
2227: );
2228:
2229: type element_commitment_rec is record (
2222: payroll_id per_all_assignments_f.payroll_id%type,
2223: normal_hours per_all_assignments_f.normal_hours%type,
2224: frequency per_all_assignments_f.frequency%type,
2225: effective_start_date per_all_assignments_f.effective_start_date%type,
2226: effective_end_date per_all_assignments_f.effective_end_date%type
2227: );
2228:
2229: type element_commitment_rec is record (
2230: assignment_id per_all_assignments_f.assignment_id%type,
2226: effective_end_date per_all_assignments_f.effective_end_date%type
2227: );
2228:
2229: type element_commitment_rec is record (
2230: assignment_id per_all_assignments_f.assignment_id%type,
2231: commitment number,
2232: element_type_id pqh_bdgt_cmmtmnt_elmnts.element_type_id%type
2233: );
2234:
3700: -- Get Position Id from the Current Assignment
3701: --
3702: Cursor csr_get_assignment IS
3703: Select position_id
3704: from per_all_assignments_f
3705: where assignment_id = p_assignment_id
3706: and p_effective_date between effective_start_date and effective_end_date;
3707: --
3708: -- Get the effective Budget version
3716: Cursor csr_get_period_frequency IS
3717: Select period_type
3718: from PAY_PAYROLLS_f
3719: where payroll_id = (Select payroll_id
3720: from per_all_assignments_f
3721: where assignment_id = p_assignment_id);
3722: ---
3723: Cursor csr_bdgt_commt_elmnt(p_budget_id number) IS
3724: Select Formula_id,
3734: Cursor csr_pos_single_assignment is
3735: Select pay_basis_id,
3736: business_group_id,payroll_id,
3737: normal_hours,frequency
3738: From per_all_assignments_f
3739: Where assignment_id = p_assignment_id
3740: And p_effective_date between effective_start_date
3741: AND effective_end_date;
3742: Cursor csr_salary_basis(p_pay_basis_id number) is
3769: l_cmmtmnt_end_dt date;
3770: l_dummy_tab cmmtmnt_elmnts_tab;
3771: l_status number(15);
3772: l_period_frequency PAY_PAYROLLS_f.period_type%type;
3773: l_pay_basis_id per_all_assignments_f.pay_basis_id%type;
3774: l_business_group_id per_all_assignments_f.business_group_id%type;
3775: l_payroll_id per_all_assignments_f.payroll_id%type;
3776: l_normal_hours per_all_assignments_f.normal_hours%type;
3777: l_frequency per_all_assignments_f.frequency%type;
3770: l_dummy_tab cmmtmnt_elmnts_tab;
3771: l_status number(15);
3772: l_period_frequency PAY_PAYROLLS_f.period_type%type;
3773: l_pay_basis_id per_all_assignments_f.pay_basis_id%type;
3774: l_business_group_id per_all_assignments_f.business_group_id%type;
3775: l_payroll_id per_all_assignments_f.payroll_id%type;
3776: l_normal_hours per_all_assignments_f.normal_hours%type;
3777: l_frequency per_all_assignments_f.frequency%type;
3778: l_overhead_percentage Number;
3771: l_status number(15);
3772: l_period_frequency PAY_PAYROLLS_f.period_type%type;
3773: l_pay_basis_id per_all_assignments_f.pay_basis_id%type;
3774: l_business_group_id per_all_assignments_f.business_group_id%type;
3775: l_payroll_id per_all_assignments_f.payroll_id%type;
3776: l_normal_hours per_all_assignments_f.normal_hours%type;
3777: l_frequency per_all_assignments_f.frequency%type;
3778: l_overhead_percentage Number;
3779: l_entry_commitment Number := 0;
3772: l_period_frequency PAY_PAYROLLS_f.period_type%type;
3773: l_pay_basis_id per_all_assignments_f.pay_basis_id%type;
3774: l_business_group_id per_all_assignments_f.business_group_id%type;
3775: l_payroll_id per_all_assignments_f.payroll_id%type;
3776: l_normal_hours per_all_assignments_f.normal_hours%type;
3777: l_frequency per_all_assignments_f.frequency%type;
3778: l_overhead_percentage Number;
3779: l_entry_commitment Number := 0;
3780: l_element_overhead Number(5,2) :=0;
3773: l_pay_basis_id per_all_assignments_f.pay_basis_id%type;
3774: l_business_group_id per_all_assignments_f.business_group_id%type;
3775: l_payroll_id per_all_assignments_f.payroll_id%type;
3776: l_normal_hours per_all_assignments_f.normal_hours%type;
3777: l_frequency per_all_assignments_f.frequency%type;
3778: l_overhead_percentage Number;
3779: l_entry_commitment Number := 0;
3780: l_element_overhead Number(5,2) :=0;
3781: l_input_value_id Number := p_input_value_id;