[Home] [Help]
115: cursor csr_future_state_rule( p_state_code number,
116: p_assignment_id number,
117: l_csr_date date default hr_api.g_sot) is
118: select null
119: from pay_us_emp_state_tax_rules_f sta
120: where sta.assignment_id = p_assignment_id
121: and sta.state_code = p_state_code
122: and sta.effective_start_date > l_csr_date;
123: --
2426: -- Declare cursors and local variables
2427: --
2428: l_proc varchar2(72) := g_package||'delete_fed_tax_rule';
2429: l_effective_date date;
2430: l_state_code pay_us_emp_state_tax_rules_f.state_code%TYPE;
2431: l_emp_fed_tax_rule_id pay_us_emp_fed_tax_rules_f.emp_fed_tax_rule_id%TYPE;
2432: l_effective_start_date pay_us_emp_fed_tax_rules_f.effective_start_date%TYPE;
2433: l_effective_end_date pay_us_emp_fed_tax_rules_f.effective_end_date%TYPE;
2434: l_object_version_number pay_us_emp_fed_tax_rules_f.object_version_number%TYPE;
2446: and fed.effective_end_date;
2447: --
2448: cursor csr_state_rules is
2449: select sta.state_code, sta.object_version_number
2450: from pay_us_emp_state_tax_rules_f sta
2451: where sta.assignment_id = p_assignment_id
2452: and l_effective_date between sta.effective_start_date
2453: and sta.effective_end_date;
2454: --
4056: ,sta_information27
4057: ,sta_information28
4058: ,sta_information29
4059: ,sta_information30
4060: from pay_us_emp_state_tax_rules_f
4061: where assignment_id = l_csr_assignment_id
4062: and effective_end_date >= l_csr_start_date
4063: and effective_start_date <= l_csr_end_date;
4064: --
4244: and effective_start_date <= l_csr_end_date;
4245: --
4246: cursor csr_asg_state_code is
4247: select sta.state_code
4248: from pay_us_emp_state_tax_rules_f sta
4249: where sta.assignment_id = p_assignment_id;
4250: --
4251: cursor csr_asg_county_code is
4252: select cnt.state_code, cnt.county_code
5321: l_loc_city_code pay_us_city_names.city_code%TYPE;
5322: l_loc_ovrd_state_code pay_us_states.state_code%TYPE;
5323: l_loc_ovrd_county_code pay_us_counties.county_code%TYPE;
5324: l_loc_ovrd_city_code pay_us_city_names.city_code%TYPE;
5325: l_state_code pay_us_emp_state_tax_rules_f.state_code%TYPE;
5326: l_county_code pay_us_emp_county_tax_rules_f.county_code%TYPE;
5327: l_city_code pay_us_emp_city_tax_rules_f.city_code%TYPE;
5328: l_city_pct number;
5329: --
5667: ,sta_information27
5668: ,sta_information28
5669: ,sta_information29
5670: ,sta_information30
5671: from pay_us_emp_state_tax_rules_f
5672: where assignment_id = l_csr_assignment_id
5673: and l_csr_effective_date between effective_start_date
5674: and effective_end_date;
5675: --
5881: --
5882: for l_state_rec in csr_state_rec(p_assignment_id, p_defaulting_date)
5883: loop
5884: --
5885: update pay_us_emp_state_tax_rules_f
5886: set effective_start_date = p_new_default_date
5887: where effective_start_date = p_defaulting_date
5888: and assignment_id = p_assignment_id
5889: and state_code = l_state_rec.state_code;
6235: );
6236: --
6237: end loop; -- l_state_rec
6238: --
6239: delete from pay_us_emp_state_tax_rules_f
6240: where assignment_id = p_assignment_id
6241: and effective_start_date < p_new_default_date;
6242: --
6243: for l_county_rec in csr_county_rec(p_assignment_id, p_new_default_date)
6664: --
6665: for l_state_rec in csr_state_rec(p_assignment_id, l_defaulting_date)
6666: loop
6667: --
6668: update pay_us_emp_state_tax_rules_f
6669: set effective_start_date = l_new_default_date
6670: where effective_start_date = l_defaulting_date
6671: and assignment_id = p_assignment_id
6672: and state_code = l_state_rec.state_code;
7042: --
7043: for l_state_rec in csr_state_rec(p_assignment_id, l_defaulting_date)
7044: loop
7045: --
7046: update pay_us_emp_state_tax_rules_f
7047: set effective_start_date = l_new_default_date
7048: where effective_start_date = l_defaulting_date
7049: and assignment_id = p_assignment_id
7050: and state_code = l_state_rec.state_code;