96:
97:
98: begin
99:
100: l_payroll_installed := hr_utility.chk_product_install(p_product =>'Oracle Payroll',
101: p_legislation => 'US');
102: if l_payroll_installed then
103:
104: hr_utility.set_location('pay_us_emp_dt_tax_rules.maintain_element_entry'
100: l_payroll_installed := hr_utility.chk_product_install(p_product =>'Oracle Payroll',
101: p_legislation => 'US');
102: if l_payroll_installed then
103:
104: hr_utility.set_location('pay_us_emp_dt_tax_rules.maintain_element_entry'
105: ,1);
106:
107: open csr_tax_element;
108:
127: end loop;
128:
129: close csr_tax_element;
130:
131: hr_utility.set_location('pay_us_emp_dt_tax_rules.maintain_element_entry'
132: ,2);
133:
134: /* Check that all of the input value id for vertex, exists */
135:
144: end if;
145:
146: end loop;
147:
148: hr_utility.set_location('pay_us_emp_dt_tax_rules.maintain_element_entry'
149: ,3);
150:
151: /* Get element link */
152: l_element_link_id := hr_entry_api.get_link(
160: fnd_message.set_token('1','VERTEX');
161: fnd_message.raise_error;
162: end if;
163:
164: hr_utility.set_location('pay_us_emp_dt_tax_rules.maintain_element_entry'
165: ,4);
166:
167: /* Store screen entry value in the table */
168:
180: if p_mode = 'INSERT' then
181:
182: /* Create the vertex element entry */
183:
184: hr_utility.set_location('pay_us_emp_dt_tax_rules.maintain_element_entry' ,5);
185:
186: hr_entry_api.insert_element_entry( P_effective_start_date => l_effective_start_date,
187: P_effective_end_date => l_effective_end_date,
188: P_element_entry_id => l_element_entry_id,
193: P_num_entry_values => 3,
194: P_input_value_id_tbl => l_inp_value_id_table,
195: P_entry_value_tbl => l_scr_value_table);
196:
197: hr_utility.set_location('pay_us_emp_dt_tax_rules.maintain_element_entry' ,6);
198:
199: elsif p_mode in ('CORRECTION','UPDATE', 'UPDATE_CHANGE_INSERT','UPDATE_OVERRIDE','ZAP','DELETE_NEXT_CHANGE','FUTURE_CHANGE','INSERT_OLD') then
200:
201: /* Get the element entry of the vertex element entry that is to be updated
200:
201: /* Get the element entry of the vertex element entry that is to be updated
202: or deleted */
203:
204: hr_utility.set_location('pay_us_emp_dt_tax_rules.maintain_element_entry' ,7);
205:
206:
207: open csr_ele_entry(l_element_link_id, l_inp_value_id_table(2));
208:
366: and pee.assignment_id = p_assignment_id;
367:
368: begin
369:
370: l_payroll_installed := hr_utility.chk_product_install(p_product =>'Oracle Payroll',
371: p_legislation => 'US');
372: if l_payroll_installed then
373:
374: hr_utility.set_location('pay_us_emp_dt_tax_rules.maintain_wc_ele_entry'
370: l_payroll_installed := hr_utility.chk_product_install(p_product =>'Oracle Payroll',
371: p_legislation => 'US');
372: if l_payroll_installed then
373:
374: hr_utility.set_location('pay_us_emp_dt_tax_rules.maintain_wc_ele_entry'
375: ,1);
376:
377: open csr_wc_tax_element;
378:
397: end loop;
398:
399: close csr_wc_tax_element;
400:
401: hr_utility.set_location('pay_us_emp_dt_tax_rules.maintain_wc_ele_entry'
402: ,2);
403:
404: /* Check that all of the input value id for vertex, exists */
405:
414: end if;
415:
416: end loop;
417:
418: hr_utility.set_location('pay_us_emp_dt_tax_rules.maintain_wc_ele_entry'
419: ,3);
420:
421: /* Get element link */
422: l_element_link_id := hr_entry_api.get_link(
431: fnd_message.raise_error;
432:
433: end if;
434:
435: hr_utility.set_location('pay_us_emp_dt_tax_rules.maintain_wc_ele_entry'
436: ,4);
437:
438: /* Store screen entry value in the table */
439:
451: then
452:
453: /* Insert the worker's compensation element entry */
454:
455: hr_utility.set_location(
456: 'pay_us_emp_dt_tax_rules.maintain_wc_ele_entry' ,5);
457: hr_entry_api.insert_element_entry(
458: P_effective_start_date => l_effective_start_date,
459: P_effective_end_date => l_effective_end_date,
465: P_num_entry_values => 2,
466: P_input_value_id_tbl => l_inp_value_id_table,
467: P_entry_value_tbl => l_scr_value_table);
468:
469: hr_utility.set_location(
470: 'pay_us_emp_dt_tax_rules.maintain_wc_ele_entry' ,8);
471:
472: elsif p_mode in ('CORRECTION', 'UPDATE', 'UPDATE_CHANGE_INSERT','UPDATE_OVERRIDE','ZAP')then
473:
887:
888: begin
889:
890:
891: hr_utility.set_location('pay_us_emp_dt_tax_rules.insert_fed_tax_row'||
892: ' - Opening cursor', 1);
893:
894: if p_mode = 'INSERT' then
895:
894: if p_mode = 'INSERT' then
895:
896: open csr_fed_tax_rule_id;
897:
898: hr_utility.set_location('pay_us_emp_dt_tax_rules.insert_fed_tax_row'||
899: ' - Fetching cursor', 2);
900:
901: fetch csr_fed_tax_rule_id into p_emp_fed_tax_rule_id;
902:
899: ' - Fetching cursor', 2);
900:
901: fetch csr_fed_tax_rule_id into p_emp_fed_tax_rule_id;
902:
903: hr_utility.set_location('pay_us_emp_dt_tax_rules.insert_fed_tax_row'||
904: ' - Closing cursor', 3);
905:
906: close csr_fed_tax_rule_id;
907:
905:
906: close csr_fed_tax_rule_id;
907:
908:
909: hr_utility.set_location('pay_us_emp_dt_tax_rules.insert_fed_tax_row'||
910: ' - inserting row', 4);
911:
912: end if;
913:
1112:
1113: /* create workers compensation element entry for the sui state in
1114: the federal record */
1115:
1116: hr_utility.set_location('pay_us_emp_dt_tax_rules.insert_fed_tax_row'||
1117: ' - inserting row', 5);
1118: l_step := 4;
1119:
1120: if hr_utility.chk_product_install(p_product =>'Oracle Payroll',
1116: hr_utility.set_location('pay_us_emp_dt_tax_rules.insert_fed_tax_row'||
1117: ' - inserting row', 5);
1118: l_step := 4;
1119:
1120: if hr_utility.chk_product_install(p_product =>'Oracle Payroll',
1121: p_legislation => 'US') then
1122:
1123: maintain_wc_ele_entry (p_assignment_id => p_assignment_id,
1124: p_effective_start_date => p_effective_start_date,
1266:
1267: begin
1268:
1269:
1270: hr_utility.set_location('pay_us_emp_dt_tax_rules.ins_st_tax_row'||
1271: ' - Opening cursor', 1);
1272:
1273: open csr_state_tax_rule_id;
1274:
1271: ' - Opening cursor', 1);
1272:
1273: open csr_state_tax_rule_id;
1274:
1275: hr_utility.set_location('pay_us_emp_dt_tax_rules.ins_st_tax_row'||
1276: ' - Fetching cursor', 2);
1277:
1278: fetch csr_state_tax_rule_id into p_emp_state_tax_rule_id;
1279:
1276: ' - Fetching cursor', 2);
1277:
1278: fetch csr_state_tax_rule_id into p_emp_state_tax_rule_id;
1279:
1280: hr_utility.set_location('pay_us_emp_dt_tax_rules.ins_st_tax_row'||
1281: ' - Closing cursor', 3);
1282:
1283: close csr_state_tax_rule_id;
1284:
1282:
1283: close csr_state_tax_rule_id;
1284:
1285:
1286: hr_utility.set_location('pay_us_emp_dt_tax_rules.ins_st_tax_row'||
1287: ' - inserting row', 4);
1288:
1289: --Bug 13872151 :Check if the State Tax rule already exists
1290: open csr_state_tax_rule;
1293: close csr_state_tax_rule;
1294: --
1295: -- This state tax rule already exists
1296: --
1297: hr_utility.set_message(801, 'HR_7719_TAX_ONE_RULE_ONLY');
1298: hr_utility.raise_error;
1299: end if;
1300: close csr_state_tax_rule;
1301: --End of changes for bug 13872151
1294: --
1295: -- This state tax rule already exists
1296: --
1297: hr_utility.set_message(801, 'HR_7719_TAX_ONE_RULE_ONLY');
1298: hr_utility.raise_error;
1299: end if;
1300: close csr_state_tax_rule;
1301: --End of changes for bug 13872151
1302:
1497: end if;
1498:
1499: close csr_get_row_id;
1500:
1501: hr_utility.set_location('pay_us_emp_dt_tax_rules.ins_st_tax_row'||
1502: ' - creating %age record ', 5);
1503:
1504: /* Get the changes in location of an assignment.
1505: For each change in location, create vertex element entry with
1504: /* Get the changes in location of an assignment.
1505: For each change in location, create vertex element entry with
1506: time in state as 0% - if Payroll is installed */
1507:
1508: if hr_utility.chk_product_install(p_product =>'Oracle Payroll',
1509: p_legislation => 'US') then
1510:
1511: create_tax_percentage (p_assignment_id => p_assignment_id,
1512: p_state_code => p_state_code,
1652: p_mode => 'I',
1653: p_rowid => null);
1654: end if;
1655:
1656: hr_utility.set_location('pay_us_emp_dt_tax_rules.insert_county_tax_row'||
1657: ' - Opening cursor', 1);
1658:
1659: open csr_county_tax_rule_id;
1660:
1657: ' - Opening cursor', 1);
1658:
1659: open csr_county_tax_rule_id;
1660:
1661: hr_utility.set_location('pay_us_emp_dt_tax_rules.insert_county_tax_row'||
1662: ' - Fetching cursor', 2);
1663:
1664: fetch csr_county_tax_rule_id into p_emp_county_tax_rule_id;
1665:
1662: ' - Fetching cursor', 2);
1663:
1664: fetch csr_county_tax_rule_id into p_emp_county_tax_rule_id;
1665:
1666: hr_utility.set_location('pay_us_emp_dt_tax_rules.insert_county_tax_row'||
1667: ' - Closing cursor', 3);
1668:
1669: close csr_county_tax_rule_id;
1670:
1668:
1669: close csr_county_tax_rule_id;
1670:
1671:
1672: hr_utility.set_location('pay_us_emp_dt_tax_rules.insert_county_tax_row'||
1673: ' - inserting row', 4);
1674:
1675: /** added for bug 13872151 - Check if the same state and county combination rule already exists**/
1676: open csr_county_tax_rule;
1679: close csr_county_tax_rule;
1680: --
1681: -- This county tax rule already exists
1682: --
1683: hr_utility.set_message(801, 'PAY_75275_COUNTY_TAX_ONE_RULE');
1684: hr_utility.raise_error;
1685: end if;
1686: close csr_county_tax_rule;
1687: --End of changes for bug 13872151
1680: --
1681: -- This county tax rule already exists
1682: --
1683: hr_utility.set_message(801, 'PAY_75275_COUNTY_TAX_ONE_RULE');
1684: hr_utility.raise_error;
1685: end if;
1686: close csr_county_tax_rule;
1687: --End of changes for bug 13872151
1688:
1871: end if;
1872:
1873: close csr_get_row_id;
1874:
1875: hr_utility.set_location('pay_us_emp_dt_tax_rules.insert_county_tax_row'||
1876: ' - creating %age record ', 5);
1877:
1878: /* Get the changes in location of an assignment.
1879: For each change in location, create vertex element entry with
1878: /* Get the changes in location of an assignment.
1879: For each change in location, create vertex element entry with
1880: time in county as 0% */
1881:
1882: if hr_utility.chk_product_install(p_product =>'Oracle Payroll',
1883: p_legislation => 'US') then
1884:
1885: create_tax_percentage (p_assignment_id => p_assignment_id,
1886: p_state_code => p_state_code,
2037: p_mode => 'I',
2038: p_rowid => null);
2039: end if;
2040:
2041: hr_utility.set_location('pay_us_emp_dt_tax_rules.insert_city_tax_row'||
2042: ' - Opening cursor', 1);
2043:
2044: open csr_city_tax_rule_id;
2045:
2042: ' - Opening cursor', 1);
2043:
2044: open csr_city_tax_rule_id;
2045:
2046: hr_utility.set_location('pay_us_emp_dt_tax_rules.insert_city_tax_row'||
2047: ' - Fetching cursor', 2);
2048:
2049: fetch csr_city_tax_rule_id into p_emp_city_tax_rule_id;
2050:
2047: ' - Fetching cursor', 2);
2048:
2049: fetch csr_city_tax_rule_id into p_emp_city_tax_rule_id;
2050:
2051: hr_utility.set_location('pay_us_emp_dt_tax_rules.insert_city_tax_row'||
2052: ' - Closing cursor', 3);
2053:
2054: close csr_city_tax_rule_id;
2055:
2053:
2054: close csr_city_tax_rule_id;
2055:
2056:
2057: hr_utility.set_location('pay_us_emp_dt_tax_rules.insert_city_tax_row'||
2058: ' - inserting row', 4);
2059:
2060: -- Bug 13872151:Check if the same state, county and city combination tax rule already exists.
2061: open csr_city_tax_rule;
2064: close csr_city_tax_rule;
2065: --
2066: -- This city tax rule already exists
2067: --
2068: hr_utility.set_message(801, 'PAY_75276_CITY_TAX_ONE_RULE');
2069: hr_utility.raise_error;
2070: end if;
2071: close csr_city_tax_rule;
2072: -- End of changes for bug 13872151
2065: --
2066: -- This city tax rule already exists
2067: --
2068: hr_utility.set_message(801, 'PAY_75276_CITY_TAX_ONE_RULE');
2069: hr_utility.raise_error;
2070: end if;
2071: close csr_city_tax_rule;
2072: -- End of changes for bug 13872151
2073:
2261:
2262: close csr_get_row_id;
2263:
2264:
2265: hr_utility.set_location('pay_us_emp_dt_tax_rules.insert_city_tax_row'||
2266: ' - creating %age record ', 5);
2267:
2268: /* Get the changes in location of an assignment.
2269: For each change in location, create vertex element entry with
2273: thus resulting in only one city tax record with 100% - makes sense??
2274: In most of the cases the defaulting routine will create tax records
2275: from begin of time till end of time */
2276:
2277: if hr_utility.chk_product_install(p_product =>'Oracle Payroll',
2278: p_legislation => 'US') then
2279:
2280: create_tax_percentage (p_assignment_id => p_assignment_id,
2281: p_state_code => p_state_code,
2402:
2403: begin
2404:
2405:
2406: hr_utility.set_location('pay_us_emp_dt_tax_rules.update_fed_tax_row'||
2407: ' - updating row', 1);
2408: ----added by vaprakas Bug 5607135
2409: check_nra_status(p_assignment_id
2410: , p_withholding_allowances
2617: p_sta_information29 in varchar2,
2618: p_sta_information30 in varchar2) is
2619: begin
2620:
2621: hr_utility.set_location('pay_us_emp_dt_tax_rules.ins_st_tax_row'||
2622: ' - updating row', 1);
2623:
2624: update PAY_US_EMP_STATE_TAX_RULES_F
2625: set emp_state_tax_rule_id = p_emp_state_tax_rule_id,
2718: fnd_message.set_token('STEP','1');
2719: fnd_message.raise_error;
2720: end if;
2721:
2722: hr_utility.set_location('pay_us_emp_dt_tax_rules.ins_st_tax_row'||
2723: ' - updated row', 2);
2724:
2725: end update_state_tax_row;
2726:
2815:
2816: if p_school_district_code is not null
2817: then
2818:
2819: hr_utility.set_location('pay_us_emp_dt_tax_rules.update_county_tax_row'||
2820: ' - checking sd', 1);
2821: /* Check that the school district is assigned to only one county/city
2822: at a given point in time */
2823:
2828: p_mode => 'U',
2829: p_rowid => p_row_id);
2830: end if;
2831:
2832: hr_utility.set_location('pay_us_emp_dt_tax_rules.update_county_tax_row'||
2833: ' - updating row', 2);
2834:
2835: update PAY_US_EMP_COUNTY_TAX_RULES_F
2836: set emp_county_tax_rule_id = p_emp_county_tax_rule_id,
2927: if p_school_district_code is not null then
2928:
2929: /* Insert row into the pay_us_asg_reporting table */
2930:
2931: hr_utility.set_location('pay_us_emp_dt_tax_rules.update_county_tax_row'||
2932: ' - asg_geo row', 3);
2933:
2934: pay_asg_geo_pkg.create_asg_geo_row(P_assignment_id => p_assignment_id,
2935: P_jurisdiction => p_state_code || '-'||
3032: if p_school_district_code is not null
3033: and p_state_code <> '39'
3034: then
3035:
3036: hr_utility.set_location('pay_us_emp_dt_tax_rules.update_city_tax_row'||
3037: ' - checking sd', 1);
3038:
3039: /* Check that the school district is assigned to only one county/city
3040: at a given point in time */
3046: p_mode => 'U',
3047: p_rowid => p_row_id);
3048: end if;
3049:
3050: hr_utility.set_location('pay_us_emp_dt_tax_rules.update_city_tax_row'||
3051: ' - updating row', 2);
3052:
3053: update PAY_US_EMP_CITY_TAX_RULES_F
3054: set emp_city_tax_rule_id = p_emp_city_tax_rule_id,
3148: if p_school_district_code is not null then
3149:
3150: /* Insert row into the pay_us_asg_reporting table */
3151:
3152: hr_utility.set_location('pay_us_emp_dt_tax_rules.update_city_tax_row'||
3153: ' - asg_geo row', 3);
3154:
3155: pay_asg_geo_pkg.create_asg_geo_row(P_assignment_id => p_assignment_id,
3156: P_jurisdiction => p_state_code || '-' ||
3222: begin
3223:
3224: /* Check if payroll has been installed or not */
3225:
3226: l_payroll_installed := hr_utility.chk_product_install(p_product =>'Oracle Payroll',
3227: p_legislation => 'US');
3228:
3229: /* Now all validations done. Go ahead and delete the element entries.
3230: Once the element entries are deleted, delete the tax rules records */
5371:
5372: begin
5373:
5374: /* Get Filing Status */
5375: hr_utility.set_location('pay_us_emp_dt_tax_rules.insert_def_fed_rec',1);
5376: --dbms_output.put_line('asg** '||to_char(p_assignment_id));
5377: --dbms_output.put_line('sd** '||to_char(p_effective_start_date));
5378: --dbms_output.put_line('ed** '||to_char(p_effective_end_date));
5379: --dbms_output.put_line('sui** '||p_sui_state_code);
5377: --dbms_output.put_line('sd** '||to_char(p_effective_start_date));
5378: --dbms_output.put_line('ed** '||to_char(p_effective_end_date));
5379: --dbms_output.put_line('sui** '||p_sui_state_code);
5380: --dbms_output.put_line('bg** ' || to_char(p_business_group_id));
5381: hr_utility.trace('insert_def_fed_rec** ' || to_char(p_assignment_id));
5382: hr_utility.trace('insert_def_fed_rec** ' || to_char(p_effective_start_date));
5383: hr_utility.trace('insert_def_fed_rec** ' || to_char(p_effective_end_date));
5384: hr_utility.trace('insert_def_fed_rec** ' || p_sui_state_code);
5385: hr_utility.trace('insert_def_fed_rec** ' || to_char(p_business_group_id));
5378: --dbms_output.put_line('ed** '||to_char(p_effective_end_date));
5379: --dbms_output.put_line('sui** '||p_sui_state_code);
5380: --dbms_output.put_line('bg** ' || to_char(p_business_group_id));
5381: hr_utility.trace('insert_def_fed_rec** ' || to_char(p_assignment_id));
5382: hr_utility.trace('insert_def_fed_rec** ' || to_char(p_effective_start_date));
5383: hr_utility.trace('insert_def_fed_rec** ' || to_char(p_effective_end_date));
5384: hr_utility.trace('insert_def_fed_rec** ' || p_sui_state_code);
5385: hr_utility.trace('insert_def_fed_rec** ' || to_char(p_business_group_id));
5386:
5379: --dbms_output.put_line('sui** '||p_sui_state_code);
5380: --dbms_output.put_line('bg** ' || to_char(p_business_group_id));
5381: hr_utility.trace('insert_def_fed_rec** ' || to_char(p_assignment_id));
5382: hr_utility.trace('insert_def_fed_rec** ' || to_char(p_effective_start_date));
5383: hr_utility.trace('insert_def_fed_rec** ' || to_char(p_effective_end_date));
5384: hr_utility.trace('insert_def_fed_rec** ' || p_sui_state_code);
5385: hr_utility.trace('insert_def_fed_rec** ' || to_char(p_business_group_id));
5386:
5387: open csr_filing_status;
5380: --dbms_output.put_line('bg** ' || to_char(p_business_group_id));
5381: hr_utility.trace('insert_def_fed_rec** ' || to_char(p_assignment_id));
5382: hr_utility.trace('insert_def_fed_rec** ' || to_char(p_effective_start_date));
5383: hr_utility.trace('insert_def_fed_rec** ' || to_char(p_effective_end_date));
5384: hr_utility.trace('insert_def_fed_rec** ' || p_sui_state_code);
5385: hr_utility.trace('insert_def_fed_rec** ' || to_char(p_business_group_id));
5386:
5387: open csr_filing_status;
5388:
5381: hr_utility.trace('insert_def_fed_rec** ' || to_char(p_assignment_id));
5382: hr_utility.trace('insert_def_fed_rec** ' || to_char(p_effective_start_date));
5383: hr_utility.trace('insert_def_fed_rec** ' || to_char(p_effective_end_date));
5384: hr_utility.trace('insert_def_fed_rec** ' || p_sui_state_code);
5385: hr_utility.trace('insert_def_fed_rec** ' || to_char(p_business_group_id));
5386:
5387: open csr_filing_status;
5388:
5389: fetch csr_filing_status into l_filing_status_code;
5396:
5397: close csr_filing_status;
5398:
5399: /* Get EIC Filing Status */
5400: hr_utility.set_location('pay_us_emp_dt_tax_rules.insert_def_fed_rec',2);
5401:
5402: open csr_eic_fstatus;
5403:
5404: fetch csr_eic_fstatus into l_eic_fstatus_code;
5414: close csr_eic_fstatus;
5415:
5416: /* Insert Federal Tax Record */
5417:
5418: hr_utility.set_location('pay_us_emp_dt_tax_rules.insert_def_fed_rec',3);
5419:
5420: l_mode := 'INSERT';
5421:
5422: insert_fed_tax_row(p_emp_fed_tax_rule_id => l_emp_fed_tax_rule_id,
5506: p_fed_information29 => null,
5507: p_fed_information30 => null,
5508: p_mode => 'INSERT');
5509:
5510: hr_utility.set_location('pay_us_emp_dt_tax_rules.insert_def_fed_rec',5);
5511:
5512: return l_emp_fed_tax_rule_id;
5513:
5514: end insert_def_fed_rec;
5593: l_flag varchar2(1) := 'N';
5594:
5595: begin
5596:
5597: hr_utility.set_location('pay_us_emp_dt_tax_rules.ins_def_state',1);
5598:
5599: open chk_state_exists;
5600: fetch chk_state_exists into l_flag;
5601: if chk_state_exists%NOTFOUND then
5602: l_flag := 'N';
5603: end if;
5604: close chk_state_exists;
5605:
5606: hr_utility.set_location('pay_us_emp_dt_tax_rules.ins_def_state',91);
5607: if l_flag = 'N'then
5608: open csr_get_asg_gre(p_assignment_id);
5609: fetch csr_get_asg_gre into ln_asg_tax_unit_id;
5610: close csr_get_asg_gre;
5611:
5612: open csr_fed_or_def(ln_asg_tax_unit_id, p_state_code);
5613: fetch csr_fed_or_def into l_def_pref;
5614:
5615: hr_utility.set_location('pay_us_emp_dt_tax_rules.ins_def_state',2);
5616:
5617: if csr_fed_or_def%NOTFOUND then
5618: l_filing_status_code := '01';
5619: l_allowances := 0;
5619: l_allowances := 0;
5620: end if;
5621: close csr_fed_or_def;
5622:
5623: hr_utility.set_location('pay_us_emp_dt_tax_rules.ins_def_state',3);
5624:
5625:
5626: /* Bug 864068 - Added check for Connecticut (p_state_code = 07) to default
5627: the filing status for new Connecticut State Tax records to '07' instead
5632: the highest rate.
5633: */
5634:
5635: if p_state_code = '07' then
5636: hr_utility.set_location('pay_us_emp_dt_tax_rules.ins_def_state',4);
5637: l_filing_status_code := '07';
5638: l_allowances := 0;
5639: elsif p_state_code = '22' then -- Bug No 4325326
5640: hr_utility.set_location('pay_us_emp_dt_tax_rules.ins_def_state',4.4);
5636: hr_utility.set_location('pay_us_emp_dt_tax_rules.ins_def_state',4);
5637: l_filing_status_code := '07';
5638: l_allowances := 0;
5639: elsif p_state_code = '22' then -- Bug No 4325326
5640: hr_utility.set_location('pay_us_emp_dt_tax_rules.ins_def_state',4.4);
5641: l_filing_status_code := '04';
5642: l_allowances := 0;
5643: elsif l_def_pref = 'SINGLE_ZERO' or l_def_pref is null then
5644: hr_utility.set_location('pay_us_emp_dt_tax_rules.ins_def_state',5);
5640: hr_utility.set_location('pay_us_emp_dt_tax_rules.ins_def_state',4.4);
5641: l_filing_status_code := '04';
5642: l_allowances := 0;
5643: elsif l_def_pref = 'SINGLE_ZERO' or l_def_pref is null then
5644: hr_utility.set_location('pay_us_emp_dt_tax_rules.ins_def_state',5);
5645: l_filing_status_code := '01';
5646: l_allowances := 0;
5647: elsif l_def_pref = 'FED_DEF' then
5648: hr_utility.set_location('pay_us_emp_dt_tax_rules.ins_def_state',6);
5644: hr_utility.set_location('pay_us_emp_dt_tax_rules.ins_def_state',5);
5645: l_filing_status_code := '01';
5646: l_allowances := 0;
5647: elsif l_def_pref = 'FED_DEF' then
5648: hr_utility.set_location('pay_us_emp_dt_tax_rules.ins_def_state',6);
5649: open csr_filing_status(p_assignment_id, p_state_code);
5650: fetch csr_filing_status into l_filing_status_code, l_allowances;
5651: if csr_filing_status%NOTFOUND then
5652: hr_utility.set_location('pay_us_emp_dt_tax_rules.ins_def_state',7);
5648: hr_utility.set_location('pay_us_emp_dt_tax_rules.ins_def_state',6);
5649: open csr_filing_status(p_assignment_id, p_state_code);
5650: fetch csr_filing_status into l_filing_status_code, l_allowances;
5651: if csr_filing_status%NOTFOUND then
5652: hr_utility.set_location('pay_us_emp_dt_tax_rules.ins_def_state',7);
5653: l_filing_status_code := '01';
5654: l_allowances := 0;
5655: end if;
5656: close csr_filing_status;
5658: end if;
5659:
5660: /* Insert State Tax record */
5661:
5662: hr_utility.set_location('pay_us_emp_dt_tax_rules.ins_def_state',8);
5663:
5664: insert_state_tax_row ( p_row_id => l_row_id,
5665: p_emp_state_tax_rule_id => l_emp_state_tax_rule_id,
5666: p_effective_start_date => p_effective_start_date,
5750: p_sta_information28 => null,
5751: p_sta_information29 => null,
5752: p_sta_information30 => null );
5753:
5754: hr_utility.set_location('pay_us_emp_dt_tax_rules.ins_def_state',9);
5755:
5756: end if;
5757:
5758: hr_utility.set_location('pay_us_emp_dt_tax_rules.ins_def_state',10);
5754: hr_utility.set_location('pay_us_emp_dt_tax_rules.ins_def_state',9);
5755:
5756: end if;
5757:
5758: hr_utility.set_location('pay_us_emp_dt_tax_rules.ins_def_state',10);
5759:
5760: return l_emp_state_tax_rule_id;
5761:
5762: end insert_def_state_rec;
5803: l_flag varchar2(1) := 'N';
5804:
5805: begin
5806:
5807: hr_utility.set_location('pay_us_emp_dt_tax_rules.insert_def_county_rec',1);
5808:
5809: open chk_county_exists;
5810: fetch chk_county_exists into l_flag;
5811: if chk_county_exists%NOTFOUND then
5812: l_flag := 'N';
5813: end if;
5814: close chk_county_exists;
5815:
5816: hr_utility.set_location('pay_us_emp_dt_tax_rules.insert_def_county_rec',91);
5817:
5818: if l_flag = 'N' then
5819:
5820: open csr_filing_status;
5820: open csr_filing_status;
5821:
5822: fetch csr_filing_status into l_filing_status_code;
5823:
5824: hr_utility.set_location('pay_us_emp_dt_tax_rules.insert_def_county_rec',2);
5825:
5826: if csr_filing_status%NOTFOUND then
5827:
5828: fnd_message.set_name('PAY','HR_6091_DEF_MISSING_LOOKUPS');
5834: close csr_filing_status;
5835:
5836: /* Insert County Tax record */
5837:
5838: hr_utility.set_location('pay_us_emp_dt_tax_rules.insert_def_county_rec',3);
5839:
5840:
5841: insert_county_tax_row(p_row_id => l_row_id,
5842: p_emp_county_tax_rule_id => l_emp_county_tax_rule_id,
5922: p_cnt_information28 => null,
5923: p_cnt_information29 => null,
5924: p_cnt_information30 => null );
5925:
5926: hr_utility.set_location('pay_us_emp_dt_tax_rules.insert_def_county_rec',4);
5927: end if;
5928: hr_utility.set_location('pay_us_emp_dt_tax_rules.insert_def_county_rec',5);
5929:
5930: return l_emp_county_tax_rule_id;
5924: p_cnt_information30 => null );
5925:
5926: hr_utility.set_location('pay_us_emp_dt_tax_rules.insert_def_county_rec',4);
5927: end if;
5928: hr_utility.set_location('pay_us_emp_dt_tax_rules.insert_def_county_rec',5);
5929:
5930: return l_emp_county_tax_rule_id;
5931:
5932: end insert_def_county_rec;
5976:
5977:
5978: begin
5979:
5980: hr_utility.set_location('pay_us_emp_dt_tax_rules.insert_def_city_rec',1);
5981:
5982: open chk_city_exists;
5983: fetch chk_city_exists into l_flag;
5984: if chk_city_exists%NOTFOUND then
5985: l_flag := 'N';
5986: end if;
5987: close chk_city_exists;
5988:
5989: hr_utility.set_location('pay_us_emp_dt_tax_rules.insert_def_city_rec',91);
5990:
5991: if l_flag = 'N' then
5992:
5993: open csr_filing_status;
5993: open csr_filing_status;
5994:
5995: fetch csr_filing_status into l_filing_status_code;
5996:
5997: hr_utility.set_location('pay_us_emp_dt_tax_rules.insert_def_city_rec',2);
5998:
5999: if csr_filing_status%NOTFOUND then
6000:
6001: fnd_message.set_name('PAY','HR_6091_DEF_MISSING_LOOKUPS');
6007: close csr_filing_status;
6008:
6009: /* Insert City Tax record */
6010:
6011: hr_utility.set_location('pay_us_emp_dt_tax_rules.insert_def_city_rec',3);
6012:
6013:
6014: insert_city_tax_row(p_row_id => l_row_id,
6015: p_emp_city_tax_rule_id => l_emp_city_tax_rule_id,
6096: p_cty_information28 => null,
6097: p_cty_information29 => null,
6098: p_cty_information30 => null );
6099:
6100: hr_utility.set_location('pay_us_emp_dt_tax_rules.insert_def_city_rec',4);
6101: end if;
6102:
6103: hr_utility.set_location('pay_us_emp_dt_tax_rules.insert_def_city_rec',5);
6104:
6099:
6100: hr_utility.set_location('pay_us_emp_dt_tax_rules.insert_def_city_rec',4);
6101: end if;
6102:
6103: hr_utility.set_location('pay_us_emp_dt_tax_rules.insert_def_city_rec',5);
6104:
6105: return l_emp_city_tax_rule_id;
6106:
6107: end insert_def_city_rec;
6145: -- PAY_ELEMENT_ENTRIES_F
6146:
6147: begin
6148:
6149: hr_utility.set_location('pay_us_emp_dt_tax_rules.zero_out_time',1);
6150:
6151: open csr_get_jurisdiction;
6152:
6153: /* Now loop through all VERTEX element entries
6175: end loop;
6176:
6177: close csr_get_jurisdiction;
6178:
6179: hr_utility.set_location('pay_us_emp_dt_tax_rules.zero_out_time',2);
6180:
6181: end zero_out_time;
6182:
6183: /* Name : set_sui_wage_base_override
6327: state_code_tab state_code_typ ;
6328: type balance_typ is table of number index by BINARY_INTEGER ;
6329: balance_tab balance_typ ;
6330: begin
6331: --hr_utility.trace_on(null,'pyusdtw4') ;
6332:
6333: hr_utility.trace('Entering pay_us_emp_dt_tax_rules.set_sui_wage_base_override.') ;
6334: hr_utility.trace('p_assignment_id := ' || to_char(p_assignment_id)) ;
6335: hr_utility.trace('p_state_code := ' || p_state_code) ;
6329: balance_tab balance_typ ;
6330: begin
6331: --hr_utility.trace_on(null,'pyusdtw4') ;
6332:
6333: hr_utility.trace('Entering pay_us_emp_dt_tax_rules.set_sui_wage_base_override.') ;
6334: hr_utility.trace('p_assignment_id := ' || to_char(p_assignment_id)) ;
6335: hr_utility.trace('p_state_code := ' || p_state_code) ;
6336: hr_utility.trace('p_session_date := ' || to_char(p_session_date)) ;
6337:
6330: begin
6331: --hr_utility.trace_on(null,'pyusdtw4') ;
6332:
6333: hr_utility.trace('Entering pay_us_emp_dt_tax_rules.set_sui_wage_base_override.') ;
6334: hr_utility.trace('p_assignment_id := ' || to_char(p_assignment_id)) ;
6335: hr_utility.trace('p_state_code := ' || p_state_code) ;
6336: hr_utility.trace('p_session_date := ' || to_char(p_session_date)) ;
6337:
6338: l_balance_value := 0 ;
6331: --hr_utility.trace_on(null,'pyusdtw4') ;
6332:
6333: hr_utility.trace('Entering pay_us_emp_dt_tax_rules.set_sui_wage_base_override.') ;
6334: hr_utility.trace('p_assignment_id := ' || to_char(p_assignment_id)) ;
6335: hr_utility.trace('p_state_code := ' || p_state_code) ;
6336: hr_utility.trace('p_session_date := ' || to_char(p_session_date)) ;
6337:
6338: l_balance_value := 0 ;
6339: l_combined_balance_value := 0 ;
6332:
6333: hr_utility.trace('Entering pay_us_emp_dt_tax_rules.set_sui_wage_base_override.') ;
6334: hr_utility.trace('p_assignment_id := ' || to_char(p_assignment_id)) ;
6335: hr_utility.trace('p_state_code := ' || p_state_code) ;
6336: hr_utility.trace('p_session_date := ' || to_char(p_session_date)) ;
6337:
6338: l_balance_value := 0 ;
6339: l_combined_balance_value := 0 ;
6340: l_sui_wg_base := 0 ;
6340: l_sui_wg_base := 0 ;
6341: l_actual_balance_value := 0 ;
6342: l_oth_combined_balance := 0 ;
6343:
6344: hr_utility.trace('Getting Effective Start Date of Latest Active Assignment.') ;
6345: open c_max_asg_eff_st_date(p_assignment_id) ;
6346: fetch c_max_asg_eff_st_date into l_max_asg_eff_st_dt ;
6347: if c_max_asg_eff_st_date%notfound then
6348: close c_max_asg_eff_st_date ;
6345: open c_max_asg_eff_st_date(p_assignment_id) ;
6346: fetch c_max_asg_eff_st_date into l_max_asg_eff_st_dt ;
6347: if c_max_asg_eff_st_date%notfound then
6348: close c_max_asg_eff_st_date ;
6349: raise hr_utility.hr_error ;
6350: end if ;
6351: hr_utility.trace('Effective Start Date of Latest Active Assignment: '|| to_char(l_max_asg_eff_st_dt)) ;
6352:
6353: hr_utility.trace('Getting Effective Date of Latest Payroll Action ID.') ;
6347: if c_max_asg_eff_st_date%notfound then
6348: close c_max_asg_eff_st_date ;
6349: raise hr_utility.hr_error ;
6350: end if ;
6351: hr_utility.trace('Effective Start Date of Latest Active Assignment: '|| to_char(l_max_asg_eff_st_dt)) ;
6352:
6353: hr_utility.trace('Getting Effective Date of Latest Payroll Action ID.') ;
6354: open c_max_pact_dt(p_assignment_id, p_session_date) ;
6355: fetch c_max_pact_dt into l_max_pact_dt ;
6349: raise hr_utility.hr_error ;
6350: end if ;
6351: hr_utility.trace('Effective Start Date of Latest Active Assignment: '|| to_char(l_max_asg_eff_st_dt)) ;
6352:
6353: hr_utility.trace('Getting Effective Date of Latest Payroll Action ID.') ;
6354: open c_max_pact_dt(p_assignment_id, p_session_date) ;
6355: fetch c_max_pact_dt into l_max_pact_dt ;
6356: if c_max_pact_dt%notfound then
6357: close c_max_pact_dt ;
6354: open c_max_pact_dt(p_assignment_id, p_session_date) ;
6355: fetch c_max_pact_dt into l_max_pact_dt ;
6356: if c_max_pact_dt%notfound then
6357: close c_max_pact_dt ;
6358: raise hr_utility.hr_error ;
6359: end if ;
6360: hr_utility.trace('Effective Date of Latest Payroll Action ID: '|| to_char(l_max_pact_dt)) ;
6361:
6362: hr_utility.trace('Getting Defined Balance ID for SUI_ER_TAXABLE_PER_JD_GRE_YTD.') ;
6356: if c_max_pact_dt%notfound then
6357: close c_max_pact_dt ;
6358: raise hr_utility.hr_error ;
6359: end if ;
6360: hr_utility.trace('Effective Date of Latest Payroll Action ID: '|| to_char(l_max_pact_dt)) ;
6361:
6362: hr_utility.trace('Getting Defined Balance ID for SUI_ER_TAXABLE_PER_JD_GRE_YTD.') ;
6363: open c_defined_balance_id('SUI_ER_TAXABLE_PER_JD_GRE_YTD') ;
6364: fetch c_defined_balance_id into l_defined_balance_id ;
6358: raise hr_utility.hr_error ;
6359: end if ;
6360: hr_utility.trace('Effective Date of Latest Payroll Action ID: '|| to_char(l_max_pact_dt)) ;
6361:
6362: hr_utility.trace('Getting Defined Balance ID for SUI_ER_TAXABLE_PER_JD_GRE_YTD.') ;
6363: open c_defined_balance_id('SUI_ER_TAXABLE_PER_JD_GRE_YTD') ;
6364: fetch c_defined_balance_id into l_defined_balance_id ;
6365: if c_defined_balance_id%notfound then
6366: close c_defined_balance_id ;
6363: open c_defined_balance_id('SUI_ER_TAXABLE_PER_JD_GRE_YTD') ;
6364: fetch c_defined_balance_id into l_defined_balance_id ;
6365: if c_defined_balance_id%notfound then
6366: close c_defined_balance_id ;
6367: raise hr_utility.hr_error ;
6368: end if ;
6369: hr_utility.trace('Defined Balance ID for SUI_ER_TAXABLE_PER_JD_GRE_YTD: '|| to_char(l_defined_balance_id)) ;
6370:
6371: hr_utility.trace('Getting Tax Unit ID.') ;
6365: if c_defined_balance_id%notfound then
6366: close c_defined_balance_id ;
6367: raise hr_utility.hr_error ;
6368: end if ;
6369: hr_utility.trace('Defined Balance ID for SUI_ER_TAXABLE_PER_JD_GRE_YTD: '|| to_char(l_defined_balance_id)) ;
6370:
6371: hr_utility.trace('Getting Tax Unit ID.') ;
6372: open c_tax_unit_id(p_assignment_id, p_session_date ) ;
6373: fetch c_tax_unit_id into l_tax_unit_id ;
6367: raise hr_utility.hr_error ;
6368: end if ;
6369: hr_utility.trace('Defined Balance ID for SUI_ER_TAXABLE_PER_JD_GRE_YTD: '|| to_char(l_defined_balance_id)) ;
6370:
6371: hr_utility.trace('Getting Tax Unit ID.') ;
6372: open c_tax_unit_id(p_assignment_id, p_session_date ) ;
6373: fetch c_tax_unit_id into l_tax_unit_id ;
6374: if c_tax_unit_id%notfound then
6375: close c_tax_unit_id ;
6372: open c_tax_unit_id(p_assignment_id, p_session_date ) ;
6373: fetch c_tax_unit_id into l_tax_unit_id ;
6374: if c_tax_unit_id%notfound then
6375: close c_tax_unit_id ;
6376: raise hr_utility.hr_error ;
6377: end if ;
6378: hr_utility.trace('Tax Unit ID: '|| to_char(l_tax_unit_id)) ;
6379:
6380: hr_utility.trace('Getting Person ID.') ;
6374: if c_tax_unit_id%notfound then
6375: close c_tax_unit_id ;
6376: raise hr_utility.hr_error ;
6377: end if ;
6378: hr_utility.trace('Tax Unit ID: '|| to_char(l_tax_unit_id)) ;
6379:
6380: hr_utility.trace('Getting Person ID.') ;
6381: open c_get_person_id(p_assignment_id) ;
6382: fetch c_get_person_id into l_person_id ;
6376: raise hr_utility.hr_error ;
6377: end if ;
6378: hr_utility.trace('Tax Unit ID: '|| to_char(l_tax_unit_id)) ;
6379:
6380: hr_utility.trace('Getting Person ID.') ;
6381: open c_get_person_id(p_assignment_id) ;
6382: fetch c_get_person_id into l_person_id ;
6383: if c_get_person_id%notfound then
6384: close c_get_person_id ;
6381: open c_get_person_id(p_assignment_id) ;
6382: fetch c_get_person_id into l_person_id ;
6383: if c_get_person_id%notfound then
6384: close c_get_person_id ;
6385: raise hr_utility.hr_error ;
6386: end if ;
6387: hr_utility.trace('Person ID: '|| to_char(l_person_id)) ;
6388:
6389: hr_utility.trace('p_state_code := '||p_state_code) ;
6383: if c_get_person_id%notfound then
6384: close c_get_person_id ;
6385: raise hr_utility.hr_error ;
6386: end if ;
6387: hr_utility.trace('Person ID: '|| to_char(l_person_id)) ;
6388:
6389: hr_utility.trace('p_state_code := '||p_state_code) ;
6390: hr_utility.trace('p_assignment_id..Original := '||to_char(p_assignment_id)) ;
6391:
6385: raise hr_utility.hr_error ;
6386: end if ;
6387: hr_utility.trace('Person ID: '|| to_char(l_person_id)) ;
6388:
6389: hr_utility.trace('p_state_code := '||p_state_code) ;
6390: hr_utility.trace('p_assignment_id..Original := '||to_char(p_assignment_id)) ;
6391:
6392: hr_utility.trace('Getting Rehire Y or N Flag.') ;
6393: open c_ckeck_rehire(p_assignment_id, p_session_date) ;
6386: end if ;
6387: hr_utility.trace('Person ID: '|| to_char(l_person_id)) ;
6388:
6389: hr_utility.trace('p_state_code := '||p_state_code) ;
6390: hr_utility.trace('p_assignment_id..Original := '||to_char(p_assignment_id)) ;
6391:
6392: hr_utility.trace('Getting Rehire Y or N Flag.') ;
6393: open c_ckeck_rehire(p_assignment_id, p_session_date) ;
6394: fetch c_ckeck_rehire into l_rehired ;
6388:
6389: hr_utility.trace('p_state_code := '||p_state_code) ;
6390: hr_utility.trace('p_assignment_id..Original := '||to_char(p_assignment_id)) ;
6391:
6392: hr_utility.trace('Getting Rehire Y or N Flag.') ;
6393: open c_ckeck_rehire(p_assignment_id, p_session_date) ;
6394: fetch c_ckeck_rehire into l_rehired ;
6395: if c_ckeck_rehire%notfound then
6396: l_rehired := 'N' ;
6395: if c_ckeck_rehire%notfound then
6396: l_rehired := 'N' ;
6397: close c_ckeck_rehire ;
6398: end if ;
6399: hr_utility.trace('Rehire Flag Value: '|| l_rehired) ;
6400:
6401: IF nvl(l_rehired,'N') = 'Y' THEN
6402: l_count := 1 ;
6403: /* For Rehired Condition, iterating through all the assignments for the concerned person
6403: /* For Rehired Condition, iterating through all the assignments for the concerned person
6404: either active for the current year or was effective from earlier and terminated within the current year */
6405: for i_get_all_assignments in c_get_all_assignments(l_person_id,p_session_date)
6406: loop
6407: hr_utility.trace('l_person_id := '||to_char(l_person_id)) ;
6408: /* For each of the above-mentioned assignment iterating through all the states the employee worked on
6409: and populating PL/SQL table with the SUI ER Taxable Balance value and corresponding State Code */
6410: for i_all_states in c_all_states(i_get_all_assignments.assignment_id,p_session_date)
6411: loop
6413:
6414: state_code_tab(l_count) := i_all_states.state_code ;
6415: l_jurisdiction_code := i_all_states.state_code || '-000-0000' ;
6416:
6417: hr_utility.trace('l_count := '||to_char(l_count)) ;
6418: hr_utility.trace('i_get_all_assignments.assignment_id:= '||to_char(i_get_all_assignments.assignment_id)) ;
6419: hr_utility.trace('l_tax_unit_id := '||to_char(l_tax_unit_id)) ;
6420: hr_utility.trace('l_jurisdiction_code := '||l_jurisdiction_code) ;
6421:
6414: state_code_tab(l_count) := i_all_states.state_code ;
6415: l_jurisdiction_code := i_all_states.state_code || '-000-0000' ;
6416:
6417: hr_utility.trace('l_count := '||to_char(l_count)) ;
6418: hr_utility.trace('i_get_all_assignments.assignment_id:= '||to_char(i_get_all_assignments.assignment_id)) ;
6419: hr_utility.trace('l_tax_unit_id := '||to_char(l_tax_unit_id)) ;
6420: hr_utility.trace('l_jurisdiction_code := '||l_jurisdiction_code) ;
6421:
6422: pay_balance_pkg.set_context('TAX_UNIT_ID',l_tax_unit_id) ;
6415: l_jurisdiction_code := i_all_states.state_code || '-000-0000' ;
6416:
6417: hr_utility.trace('l_count := '||to_char(l_count)) ;
6418: hr_utility.trace('i_get_all_assignments.assignment_id:= '||to_char(i_get_all_assignments.assignment_id)) ;
6419: hr_utility.trace('l_tax_unit_id := '||to_char(l_tax_unit_id)) ;
6420: hr_utility.trace('l_jurisdiction_code := '||l_jurisdiction_code) ;
6421:
6422: pay_balance_pkg.set_context('TAX_UNIT_ID',l_tax_unit_id) ;
6423: pay_balance_pkg.set_context('JURISDICTION_CODE',l_jurisdiction_code) ;
6416:
6417: hr_utility.trace('l_count := '||to_char(l_count)) ;
6418: hr_utility.trace('i_get_all_assignments.assignment_id:= '||to_char(i_get_all_assignments.assignment_id)) ;
6419: hr_utility.trace('l_tax_unit_id := '||to_char(l_tax_unit_id)) ;
6420: hr_utility.trace('l_jurisdiction_code := '||l_jurisdiction_code) ;
6421:
6422: pay_balance_pkg.set_context('TAX_UNIT_ID',l_tax_unit_id) ;
6423: pay_balance_pkg.set_context('JURISDICTION_CODE',l_jurisdiction_code) ;
6424:
6428: nvl(l_max_pact_dt,GREATEST(l_max_asg_eff_st_dt,trunc(p_session_date,'Y')))) ;
6429:
6430: balance_tab(l_count) := l_balance_value ;
6431:
6432: hr_utility.trace('l_balance_value := '||to_char(l_balance_value)) ;
6433: /* Summing up the balance value */
6434: l_combined_balance_value := l_combined_balance_value + l_balance_value ;
6435:
6436: hr_utility.trace('l_combined_balance_value := '||to_char(l_combined_balance_value)) ;
6432: hr_utility.trace('l_balance_value := '||to_char(l_balance_value)) ;
6433: /* Summing up the balance value */
6434: l_combined_balance_value := l_combined_balance_value + l_balance_value ;
6435:
6436: hr_utility.trace('l_combined_balance_value := '||to_char(l_combined_balance_value)) ;
6437:
6438: l_count := l_count + 1 ;
6439: END IF ;
6440: end loop ;
6452: end if ;
6453: end loop ;
6454: end loop ;
6455: END IF ;
6456: hr_utility.trace('l_combined_balance_value B4 Subtracting Actual := '||to_char(l_combined_balance_value)) ;
6457: /* Looping through the current States under the Current Active Assignment
6458: and doing a balance call wrt to current jurisdiction and calculating
6459: eligible SUI Wage Base Override for the State */
6460: for i_all_curr_states in c_all_states(p_assignment_id,p_session_date)
6473: nvl(l_max_pact_dt,GREATEST(l_max_asg_eff_st_dt,trunc(p_session_date,'Y')))) ;
6474:
6475: l_oth_combined_balance := l_combined_balance_value - l_actual_balance_value ;
6476:
6477: hr_utility.trace('Actual States := '||i_all_curr_states.state_code) ;
6478: hr_utility.trace('l_actual_balance_value := '||to_char(l_actual_balance_value)) ;
6479: hr_utility.trace('l_oth_combined_balance A4 Subtracting Actual := '||to_char(l_oth_combined_balance)) ;
6480:
6481: open c_sui_wage_limit(i_all_curr_states.state_code, p_session_date) ;
6474:
6475: l_oth_combined_balance := l_combined_balance_value - l_actual_balance_value ;
6476:
6477: hr_utility.trace('Actual States := '||i_all_curr_states.state_code) ;
6478: hr_utility.trace('l_actual_balance_value := '||to_char(l_actual_balance_value)) ;
6479: hr_utility.trace('l_oth_combined_balance A4 Subtracting Actual := '||to_char(l_oth_combined_balance)) ;
6480:
6481: open c_sui_wage_limit(i_all_curr_states.state_code, p_session_date) ;
6482: fetch c_sui_wage_limit into l_sui_er_wg_lt_curr_state ;
6475: l_oth_combined_balance := l_combined_balance_value - l_actual_balance_value ;
6476:
6477: hr_utility.trace('Actual States := '||i_all_curr_states.state_code) ;
6478: hr_utility.trace('l_actual_balance_value := '||to_char(l_actual_balance_value)) ;
6479: hr_utility.trace('l_oth_combined_balance A4 Subtracting Actual := '||to_char(l_oth_combined_balance)) ;
6480:
6481: open c_sui_wage_limit(i_all_curr_states.state_code, p_session_date) ;
6482: fetch c_sui_wage_limit into l_sui_er_wg_lt_curr_state ;
6483: close c_sui_wage_limit ;
6480:
6481: open c_sui_wage_limit(i_all_curr_states.state_code, p_session_date) ;
6482: fetch c_sui_wage_limit into l_sui_er_wg_lt_curr_state ;
6483: close c_sui_wage_limit ;
6484: hr_utility.trace('SUI Wage Limit for the current State: '|| to_char(l_sui_er_wg_lt_curr_state)) ;
6485:
6486: IF l_oth_combined_balance < l_sui_er_wg_lt_curr_state THEN
6487: l_sui_wg_base := l_sui_er_wg_lt_curr_state - l_oth_combined_balance ;
6488: ELSIF l_oth_combined_balance >= l_sui_er_wg_lt_curr_state THEN
6487: l_sui_wg_base := l_sui_er_wg_lt_curr_state - l_oth_combined_balance ;
6488: ELSIF l_oth_combined_balance >= l_sui_er_wg_lt_curr_state THEN
6489: l_sui_wg_base := 0 ;
6490: END IF ;
6491: hr_utility.trace('l_sui_wg_base := '||to_char(l_sui_wg_base)) ;
6492:
6493: IF l_oth_combined_balance > 0 OR l_actual_balance_value > 0 THEN
6494: update pay_us_emp_state_tax_rules_f
6495: set sui_wage_base_override_amount = l_sui_wg_base
6500: set sui_wage_base_override_amount = null
6501: where assignment_id = p_assignment_id
6502: and state_code = i_all_curr_states.state_code ;
6503: END IF ;
6504: hr_utility.trace('SUI Wage Base Updated...') ;
6505: END IF ;
6506: end loop ;
6507: ELSE -- Not Rehired Condition
6508: hr_utility.trace('Not Rehired Condition... ') ;
6504: hr_utility.trace('SUI Wage Base Updated...') ;
6505: END IF ;
6506: end loop ;
6507: ELSE -- Not Rehired Condition
6508: hr_utility.trace('Not Rehired Condition... ') ;
6509: l_count := 1 ;
6510: /* Iterating through all the states where the employee worked for the Current Assignment
6511: and populating PL/SQL table with the State Code and SUI ER Taxable Balance value */
6512: for i_all_states in c_all_states(p_assignment_id,p_session_date)
6511: and populating PL/SQL table with the State Code and SUI ER Taxable Balance value */
6512: for i_all_states in c_all_states(p_assignment_id,p_session_date)
6513: loop
6514: IF i_all_states.state_code <> '24' THEN
6515: hr_utility.trace('l_count := '||to_char(l_count)) ;
6516: state_code_tab(l_count) := i_all_states.state_code ;
6517: l_jurisdiction_code := i_all_states.state_code || '-000-0000' ;
6518:
6519: hr_utility.trace('l_tax_unit_id := '||to_char(l_tax_unit_id)) ;
6515: hr_utility.trace('l_count := '||to_char(l_count)) ;
6516: state_code_tab(l_count) := i_all_states.state_code ;
6517: l_jurisdiction_code := i_all_states.state_code || '-000-0000' ;
6518:
6519: hr_utility.trace('l_tax_unit_id := '||to_char(l_tax_unit_id)) ;
6520: hr_utility.trace('l_jurisdiction_code := '||l_jurisdiction_code) ;
6521:
6522: pay_balance_pkg.set_context('TAX_UNIT_ID',l_tax_unit_id) ;
6523: pay_balance_pkg.set_context('JURISDICTION_CODE',l_jurisdiction_code) ;
6516: state_code_tab(l_count) := i_all_states.state_code ;
6517: l_jurisdiction_code := i_all_states.state_code || '-000-0000' ;
6518:
6519: hr_utility.trace('l_tax_unit_id := '||to_char(l_tax_unit_id)) ;
6520: hr_utility.trace('l_jurisdiction_code := '||l_jurisdiction_code) ;
6521:
6522: pay_balance_pkg.set_context('TAX_UNIT_ID',l_tax_unit_id) ;
6523: pay_balance_pkg.set_context('JURISDICTION_CODE',l_jurisdiction_code) ;
6524:
6527: p_assignment_id,
6528: nvl(l_max_pact_dt,GREATEST(l_max_asg_eff_st_dt,trunc(p_session_date,'Y')))) ;
6529:
6530: balance_tab(l_count) := l_balance_value ;
6531: hr_utility.trace('l_balance_value := '||to_char(l_balance_value)) ;
6532: /* Summing up the Total Balance Value */
6533: l_combined_balance_value := l_combined_balance_value + l_balance_value ;
6534: hr_utility.trace('l_combined_balance_value := '||to_char(l_combined_balance_value)) ;
6535: l_count := l_count + 1 ;
6530: balance_tab(l_count) := l_balance_value ;
6531: hr_utility.trace('l_balance_value := '||to_char(l_balance_value)) ;
6532: /* Summing up the Total Balance Value */
6533: l_combined_balance_value := l_combined_balance_value + l_balance_value ;
6534: hr_utility.trace('l_combined_balance_value := '||to_char(l_combined_balance_value)) ;
6535: l_count := l_count + 1 ;
6536:
6537: END IF ;
6538: end loop ;
6545:
6546: open c_sui_wage_limit(state_code_tab(i), p_session_date) ;
6547: fetch c_sui_wage_limit into l_sui_er_wg_lt_curr_state ;
6548: close c_sui_wage_limit ;
6549: hr_utility.trace('SUI Wage Limit for the current State: '|| to_char(l_sui_er_wg_lt_curr_state)) ;
6550:
6551: IF l_oth_combined_balance < l_sui_er_wg_lt_curr_state THEN
6552: l_sui_wg_base := l_sui_er_wg_lt_curr_state - l_oth_combined_balance ;
6553: ELSIF l_oth_combined_balance >= l_sui_er_wg_lt_curr_state THEN
6552: l_sui_wg_base := l_sui_er_wg_lt_curr_state - l_oth_combined_balance ;
6553: ELSIF l_oth_combined_balance >= l_sui_er_wg_lt_curr_state THEN
6554: l_sui_wg_base := 0 ;
6555: END IF ;
6556: hr_utility.trace('State_code := '||state_code_tab(i)) ;
6557: hr_utility.trace('l_oth_combined_balance := '||to_char(l_oth_combined_balance)) ;
6558: hr_utility.trace('l_sui_wg_base := '||to_char(l_sui_wg_base)) ;
6559:
6560: IF l_oth_combined_balance > 0 OR l_combined_balance_value > 0 THEN
6553: ELSIF l_oth_combined_balance >= l_sui_er_wg_lt_curr_state THEN
6554: l_sui_wg_base := 0 ;
6555: END IF ;
6556: hr_utility.trace('State_code := '||state_code_tab(i)) ;
6557: hr_utility.trace('l_oth_combined_balance := '||to_char(l_oth_combined_balance)) ;
6558: hr_utility.trace('l_sui_wg_base := '||to_char(l_sui_wg_base)) ;
6559:
6560: IF l_oth_combined_balance > 0 OR l_combined_balance_value > 0 THEN
6561: update pay_us_emp_state_tax_rules_f
6554: l_sui_wg_base := 0 ;
6555: END IF ;
6556: hr_utility.trace('State_code := '||state_code_tab(i)) ;
6557: hr_utility.trace('l_oth_combined_balance := '||to_char(l_oth_combined_balance)) ;
6558: hr_utility.trace('l_sui_wg_base := '||to_char(l_sui_wg_base)) ;
6559:
6560: IF l_oth_combined_balance > 0 OR l_combined_balance_value > 0 THEN
6561: update pay_us_emp_state_tax_rules_f
6562: set sui_wage_base_override_amount = l_sui_wg_base
6567: set sui_wage_base_override_amount = null
6568: where assignment_id = p_assignment_id
6569: and state_code = state_code_tab(i) ;
6570: END IF ;
6571: hr_utility.trace('SUI Wage Base Updated...') ;
6572: end loop ;
6573: END IF ;
6574: END IF ;
6575: /* Exception for the State of Minnesota - No SUI Wage Transfer allowed */
6683:
6684: begin
6685:
6686:
6687: hr_utility.set_location('pay_us_emp_dt_tax_rules.create_new_location_rec',1);
6688: if (p_new_location_id is null) and (p_res_state_code is not null
6689: and p_res_county_code is not null
6690: and p_res_city_code is not null )then
6691:
6698:
6699: /* Get the state code, county code and the city code for the
6700: new location */
6701:
6702: hr_utility.set_location('pay_us_emp_dt_tax_rules.create_new_location_rec',2);
6703: open csr_get_codes(p_new_location_id);
6704: fetch csr_get_codes into l_state_code, l_county_code,l_city_code,
6705: l_ovrd_state_code, l_ovrd_county_code,
6706: l_ovrd_city_code;
6714: close csr_get_codes;
6715:
6716: end if;
6717:
6718: hr_utility.set_location('pay_us_emp_dt_tax_rules.create_new_location_rec',3);
6719: /* Get the default date from the federal tax rules record */
6720:
6721: open csr_get_eff_date;
6722:
6734:
6735: /* Create the new location records */
6736:
6737:
6738: hr_utility.set_location('pay_us_emp_dt_tax_rules.create_new_location_rec',4);
6739: l_ret_code := 0;
6740: l_ret_text := null;
6741: l_jurisdiction_code := l_state_code ||'-000-0000';
6742:
6739: l_ret_code := 0;
6740: l_ret_text := null;
6741: l_jurisdiction_code := l_state_code ||'-000-0000';
6742:
6743: hr_utility.set_location('pay_us_emp_dt_tax_rules.create_new_location_rec',5);
6744: pay_us_emp_dt_tax_val.check_jurisdiction_exists(p_assignment_id => p_assignment_id,
6745: p_jurisdiction_code => l_jurisdiction_code,
6746: p_ret_code => l_ret_code,
6747: p_ret_text => l_ret_text);
6744: pay_us_emp_dt_tax_val.check_jurisdiction_exists(p_assignment_id => p_assignment_id,
6745: p_jurisdiction_code => l_jurisdiction_code,
6746: p_ret_code => l_ret_code,
6747: p_ret_text => l_ret_text);
6748: hr_utility.set_location('pay_us_emp_dt_tax_rules.create_new_location_rec',6);
6749:
6750: /* Bug 2535501 */
6751:
6752: open csr_get_max_assign_end_dt;
6774: and also the state percentage record for every change in
6775: location */
6776:
6777: if l_ret_code = 1 then
6778: hr_utility.set_location('pay_us_emp_dt_tax_rules.create_new_location_rec',7);
6779: l_emp_state_tax_rule_id :=
6780: insert_def_state_rec(p_assignment_id => p_assignment_id,
6781: p_effective_start_date => l_default_date,
6782: p_effective_end_date => l_max_assign_end_dt, -- Bug 2535501
6789: for state. The ins_def_county_rec routine will create the
6790: county tax rule record from begin of time till end of time
6791: and also the county percentage record for every change in
6792: location */
6793: hr_utility.set_location('pay_us_emp_dt_tax_rules.create_new_location_rec',8);
6794:
6795: l_emp_county_tax_rule_id :=
6796: insert_def_county_rec(p_assignment_id => p_assignment_id,
6797: p_effective_start_date => l_default_date,
6806: for state. The ins_def_city_rec routine will create the
6807: city tax rule record from begin of time till end of time
6808: and also the city percentage record for every change in
6809: location */
6810: hr_utility.set_location('pay_us_emp_dt_tax_rules.create_new_location_rec',9);
6811:
6812: l_emp_city_tax_rule_id :=
6813: insert_def_city_rec(p_assignment_id => p_assignment_id,
6814: p_effective_start_date => l_default_date,
6819: p_city_code => l_city_code,
6820: p_business_group_id => p_business_group,
6821: p_percent_time => 0);
6822:
6823: hr_utility.set_location('pay_us_emp_dt_tax_rules.create_new_location_rec',10);
6824:
6825: elsif l_ret_code = 0 then
6826: hr_utility.set_location('pay_us_emp_dt_tax_rules.create_new_location_rec',101);
6827: /* State record exists. Now check if county record exists */
6822:
6823: hr_utility.set_location('pay_us_emp_dt_tax_rules.create_new_location_rec',10);
6824:
6825: elsif l_ret_code = 0 then
6826: hr_utility.set_location('pay_us_emp_dt_tax_rules.create_new_location_rec',101);
6827: /* State record exists. Now check if county record exists */
6828: -- Update SUI Wage Base Override Amount
6829: -- Update SUI WAGE BASE Overide amount if payroll is installed otherwise don't
6830: -- call the procedure which does the update
6829: -- Update SUI WAGE BASE Overide amount if payroll is installed otherwise don't
6830: -- call the procedure which does the update
6831: -- Turning Off SUI Wage Base Override Functionality due to Bug# 5486281
6832: /*
6833: IF hr_utility.chk_product_install(p_product =>'Oracle Payroll',
6834: p_legislation => 'US')
6835: then
6836: hr_utility.set_location('pay_us_emp_dt_tax_rules.create_new_location_rec',102);
6837: if p_assignment_id is not null and p_session_date is not null
6832: /*
6833: IF hr_utility.chk_product_install(p_product =>'Oracle Payroll',
6834: p_legislation => 'US')
6835: then
6836: hr_utility.set_location('pay_us_emp_dt_tax_rules.create_new_location_rec',102);
6837: if p_assignment_id is not null and p_session_date is not null
6838: then
6839: hr_utility.set_location('pay_us_emp_dt_tax_rules.create_new_location_rec',103);
6840: set_sui_wage_base_override(p_assignment_id,l_state_code,p_session_date) ;
6835: then
6836: hr_utility.set_location('pay_us_emp_dt_tax_rules.create_new_location_rec',102);
6837: if p_assignment_id is not null and p_session_date is not null
6838: then
6839: hr_utility.set_location('pay_us_emp_dt_tax_rules.create_new_location_rec',103);
6840: set_sui_wage_base_override(p_assignment_id,l_state_code,p_session_date) ;
6841: end if ;
6842: end if;
6843: -- End Change
6846: l_ret_code := 0;
6847: l_ret_text := null;
6848: l_jurisdiction_code := l_state_code ||'-' || l_county_code ||'-0000';
6849:
6850: hr_utility.set_location('pay_us_emp_dt_tax_rules.create_new_location_rec',11);
6851: pay_us_emp_dt_tax_val.check_jurisdiction_exists(p_assignment_id => p_assignment_id,
6852: p_jurisdiction_code => l_jurisdiction_code,
6853: p_ret_code => l_ret_code,
6854: p_ret_text => l_ret_text);
6851: pay_us_emp_dt_tax_val.check_jurisdiction_exists(p_assignment_id => p_assignment_id,
6852: p_jurisdiction_code => l_jurisdiction_code,
6853: p_ret_code => l_ret_code,
6854: p_ret_text => l_ret_text);
6855: hr_utility.set_location('pay_us_emp_dt_tax_rules.create_new_location_rec',12);
6856: /* If county record does not exist then city will also not exist */
6857: if l_ret_code = 1 then
6858:
6859: /* Create the county tax rule record and then create %age record
6861: county tax rule record from begin of time till end of time
6862: and also the county percentage record for every change in
6863: location */
6864:
6865: hr_utility.set_location('pay_us_emp_dt_tax_rules.create_new_location_rec',13);
6866: l_emp_county_tax_rule_id :=
6867: insert_def_county_rec(p_assignment_id => p_assignment_id,
6868: p_effective_start_date => l_default_date,
6869: p_effective_end_date => l_max_assign_end_dt, -- Bug 2535501
6878: city tax rule record from begin of time till end of time
6879: and also the city percentage record for every change in
6880: location */
6881:
6882: hr_utility.set_location('pay_us_emp_dt_tax_rules.create_new_location_rec',14);
6883: l_emp_city_tax_rule_id :=
6884: insert_def_city_rec(p_assignment_id => p_assignment_id,
6885: p_effective_start_date => l_default_date,
6886: p_effective_end_date => l_max_assign_end_dt, -- Bug 2535501
6889: p_county_code => l_county_code,
6890: p_city_code => l_city_code,
6891: p_business_group_id => p_business_group,
6892: p_percent_time => 0);
6893: hr_utility.set_location('pay_us_emp_dt_tax_rules.create_new_location_rec',15);
6894:
6895: elsif l_ret_code = 0 then
6896: /* State and county records exist. Check if the city record exists */
6897:
6899: l_ret_text := null;
6900: l_jurisdiction_code := l_state_code ||'-' || l_county_code ||'-'||
6901: l_city_code;
6902:
6903: hr_utility.set_location('pay_us_emp_dt_tax_rules.create_new_location_rec',16);
6904: pay_us_emp_dt_tax_val.check_jurisdiction_exists(p_assignment_id => p_assignment_id,
6905: p_jurisdiction_code => l_jurisdiction_code,
6906: p_ret_code => l_ret_code,
6907: p_ret_text => l_ret_text);
6904: pay_us_emp_dt_tax_val.check_jurisdiction_exists(p_assignment_id => p_assignment_id,
6905: p_jurisdiction_code => l_jurisdiction_code,
6906: p_ret_code => l_ret_code,
6907: p_ret_text => l_ret_text);
6908: hr_utility.set_location('pay_us_emp_dt_tax_rules.create_new_location_rec',17);
6909:
6910: /* If city record does not exist then create one */
6911:
6912: if l_ret_code = 1 then
6915: for state. The ins_def_city_rec routine will create the
6916: city tax rule record from begin of time till end of time
6917: and also the city percentage record for every change in
6918: location */
6919: hr_utility.set_location('pay_us_emp_dt_tax_rules.create_new_location_rec',18);
6920:
6921: l_emp_city_tax_rule_id :=
6922: insert_def_city_rec(p_assignment_id => p_assignment_id,
6923: p_effective_start_date => l_default_date,
6927: p_county_code => l_county_code,
6928: p_city_code => l_city_code,
6929: p_business_group_id => p_business_group,
6930: p_percent_time => 0);
6931: hr_utility.set_location('pay_us_emp_dt_tax_rules.create_new_location_rec',19);
6932:
6933: end if;
6934:
6935: end if;
6937: end if;
6938:
6939: if l_ovrd_state_code <> l_state_code then
6940:
6941: hr_utility.set_location('pay_us_emp_dt_tax_rules.create_new_location_rec',20);
6942: l_emp_state_tax_rule_id :=
6943: insert_def_state_rec(p_assignment_id => p_assignment_id,
6944: p_effective_start_date => l_default_date,
6945: p_effective_end_date => l_end_of_time,
6945: p_effective_end_date => l_end_of_time,
6946: p_state_code => l_ovrd_state_code,
6947: p_business_group_id => p_business_group,
6948: p_percent_time => 0);
6949: hr_utility.set_location('pay_us_emp_dt_tax_rules.create_new_location_rec',21);
6950:
6951: end if;
6952:
6953: if (l_ovrd_state_code <> l_state_code
6951: end if;
6952:
6953: if (l_ovrd_state_code <> l_state_code
6954: or l_ovrd_county_code <> l_county_code) then
6955: hr_utility.set_location('pay_us_emp_dt_tax_rules.create_new_location_rec',22);
6956: l_emp_county_tax_rule_id :=
6957: insert_def_county_rec(p_assignment_id => p_assignment_id,
6958: p_effective_start_date => l_default_date,
6959: p_effective_end_date => l_end_of_time,
6960: p_state_code => l_ovrd_state_code,
6961: p_county_code => l_ovrd_county_code,
6962: p_business_group_id => p_business_group,
6963: p_percent_time => 0);
6964: hr_utility.set_location('pay_us_emp_dt_tax_rules.create_new_location_rec',23);
6965: end if;
6966:
6967: if (l_ovrd_state_code <> l_state_code
6968: or l_ovrd_county_code <> l_county_code
6966:
6967: if (l_ovrd_state_code <> l_state_code
6968: or l_ovrd_county_code <> l_county_code
6969: or l_ovrd_city_code <> l_city_code) then
6970: hr_utility.set_location('pay_us_emp_dt_tax_rules.create_new_location_rec',24);
6971: l_emp_city_tax_rule_id :=
6972: insert_def_city_rec(p_assignment_id => p_assignment_id,
6973: p_effective_start_date => l_default_date,
6974: p_effective_end_date => l_end_of_time,
6976: p_county_code => l_ovrd_county_code,
6977: p_city_code => l_ovrd_city_code,
6978: p_business_group_id => p_business_group,
6979: p_percent_time => 0);
6980: hr_utility.set_location('pay_us_emp_dt_tax_rules.create_new_location_rec',25);
6981: end if;
6982:
6983: /* if called for change in location then set the city to 100% */
6984:
6986: p_percent = 100 and
6987: (p_res_state_code is null
6988: and p_res_county_code is null and p_res_city_code is null) then
6989:
6990: hr_utility.set_location('pay_us_emp_dt_tax_rules.create_new_location_rec',26);
6991: /* Now update the city record and set it to 100% */
6992:
6993: if l_state_code = l_ovrd_state_code and l_county_code = l_ovrd_county_code
6994: and l_city_code = l_ovrd_city_code then
6992:
6993: if l_state_code = l_ovrd_state_code and l_county_code = l_ovrd_county_code
6994: and l_city_code = l_ovrd_city_code then
6995: l_jurisdiction_code := l_state_code ||'-' || l_county_code ||'-'|| l_city_code;
6996: hr_utility.set_location('pay_us_emp_dt_tax_rules.create_new_location_rec',27);
6997: else
6998: l_jurisdiction_code := l_ovrd_state_code ||'-' || l_ovrd_county_code ||'-'||l_ovrd_city_code;
6999: hr_utility.set_location('pay_us_emp_dt_tax_rules.create_new_location_rec',28);
7000: end if;
6995: l_jurisdiction_code := l_state_code ||'-' || l_county_code ||'-'|| l_city_code;
6996: hr_utility.set_location('pay_us_emp_dt_tax_rules.create_new_location_rec',27);
6997: else
6998: l_jurisdiction_code := l_ovrd_state_code ||'-' || l_ovrd_county_code ||'-'||l_ovrd_city_code;
6999: hr_utility.set_location('pay_us_emp_dt_tax_rules.create_new_location_rec',28);
7000: end if;
7001:
7002: hr_utility.set_location('pay_us_emp_dt_tax_rules.create_new_location_rec',29);
7003: maintain_element_entry (p_assignment_id => p_assignment_id,
6998: l_jurisdiction_code := l_ovrd_state_code ||'-' || l_ovrd_county_code ||'-'||l_ovrd_city_code;
6999: hr_utility.set_location('pay_us_emp_dt_tax_rules.create_new_location_rec',28);
7000: end if;
7001:
7002: hr_utility.set_location('pay_us_emp_dt_tax_rules.create_new_location_rec',29);
7003: maintain_element_entry (p_assignment_id => p_assignment_id,
7004: p_effective_start_date => p_validation_start_date,
7005: p_effective_end_date => p_validation_end_date,
7006: p_session_date => p_session_date,
7006: p_session_date => p_session_date,
7007: p_jurisdiction_code => l_jurisdiction_code,
7008: p_percentage_time => 100,
7009: p_mode => 'CORRECTION');
7010: hr_utility.set_location('pay_us_emp_dt_tax_rules.create_new_location_rec',30);
7011: end if;
7012:
7013: end create_new_location_rec;
7014:
7083: and pee.assignment_id = p_assignment_id;
7084:
7085: begin
7086:
7087: hr_utility.set_location('pay_emp_dt_tax_rules.del_updt_entries_for_dates' ,1);
7088:
7089: l_step := 1;
7090: open csr_tax_element;
7091:
7110: end loop;
7111:
7112: close csr_tax_element;
7113:
7114: hr_utility.set_location('pay_us_emp_dt_tax_rules.del_updt_entries_for_dates'
7115: ,2);
7116:
7117: /* Check that all of the input value id for vertex, exists */
7118:
7127: end if;
7128:
7129: end loop;
7130:
7131: hr_utility.set_location('pay_us_emp_dt_tax_rules.del_updt_entries_for_dates'
7132: ,3);
7133:
7134: /* Get element link */
7135: l_step := 2;
7144: fnd_message.set_token('1','ELEMENT LINK');
7145: fnd_message.raise_error;
7146: end if;
7147:
7148: hr_utility.set_location('pay_us_emp_dt_tax_rules.del_updt_entries_for_dates'
7149: ,4);
7150:
7151: /* Get the Element Entry Id */
7152: l_step := 3;
7454: and pee.element_link_id = p_element_link;
7455:
7456: begin
7457:
7458: hr_utility.set_location('pay_emp_tax_dt_tax_rules.del_updt_wc_entry_for_dates' ,1);
7459:
7460: l_step := 1;
7461: open csr_tax_element;
7462:
7470: end if;
7471:
7472: close csr_tax_element;
7473:
7474: hr_utility.set_location('pay_us_emp_dt_tax_rules.del_updt_wc_entry_for_dates' ,2);
7475:
7476: /* Get element link */
7477: l_step := 2;
7478: l_element_link_id := hr_entry_api.get_link(
7486: fnd_message.set_token('1','ELEMENT LINK');
7487: fnd_message.raise_error;
7488: end if;
7489:
7490: hr_utility.set_location('pay_us_emp_dt_tax_rules.del_updt_wc_entry_for_dates' ,3);
7491:
7492: /* Get the Element Entry Id */
7493: l_step := 3;
7494: open csr_wc_ele_entry(l_element_link_id);
8181: end backward_processing;
8182:
8183: begin
8184:
8185: hr_utility.set_location('pay_us_emp_dt_tax_rules.correct_percentage',1);
8186: l_payroll_installed := hr_utility.chk_product_install(p_product => 'Oracle Payroll',
8187: p_legislation => 'US');
8188:
8189: /* Get effective Start date of the Federal Tax Rules record */
8182:
8183: begin
8184:
8185: hr_utility.set_location('pay_us_emp_dt_tax_rules.correct_percentage',1);
8186: l_payroll_installed := hr_utility.chk_product_install(p_product => 'Oracle Payroll',
8187: p_legislation => 'US');
8188:
8189: /* Get effective Start date of the Federal Tax Rules record */
8190:
8187: p_legislation => 'US');
8188:
8189: /* Get effective Start date of the Federal Tax Rules record */
8190:
8191: hr_utility.set_location('pay_us_emp_dt_tax_rules.correct_percentage',2);
8192: open csr_get_eff_date(p_assignment_id);
8193:
8194: fetch csr_get_eff_date into l_default_date;
8195:
8203: end if;
8204:
8205: close csr_get_eff_date;
8206:
8207: hr_utility.set_location('pay_us_emp_dt_tax_rules.correct_percentage',3);
8208: open csr_tax_element;
8209: fetch csr_tax_element into l_element_type_id;
8210: if csr_tax_element%NOTFOUND then
8211: close csr_tax_element;
8216: fnd_message.raise_error;
8217: end if;
8218: close csr_tax_element;
8219:
8220: hr_utility.set_location('pay_us_emp_dt_tax_rules.correct_percentage',4);
8221: /* Get element link */
8222: l_element_link_id := hr_entry_api.get_link(
8223: P_assignment_id => p_assignment_id,
8224: P_element_type_id => l_element_type_id,
8259: as of date T2 */
8260:
8261: if (p_effective_start_date <= l_default_date and
8262: p_effective_end_date = l_end_of_time) then
8263: hr_utility.set_location('pay_us_emp_dt_tax_rules.correct_percentage',5);
8264:
8265: if l_payroll_installed then
8266: /* Get all of the percentage records and set the percentage to zero */
8267:
8264:
8265: if l_payroll_installed then
8266: /* Get all of the percentage records and set the percentage to zero */
8267:
8268: hr_utility.set_location('pay_us_emp_dt_tax_rules.correct_percentage',6);
8269: zero_out_time(p_assignment_id => p_assignment_id,
8270: p_effective_start_date => p_effective_start_date,
8271: p_effective_end_date => p_effective_end_date);
8272: end if;
8273:
8274: /* Create the tax rules records and the %age records for the
8275: new location - if required and set the city %age to 100 */
8276:
8277: hr_utility.set_location('pay_us_emp_dt_tax_rules.correct_percentage',7);
8278:
8279: l_ovrd_percent := 0;
8280: l_percent := 100;
8281: open csr_get_ovrd_loc(p_assignment_id, p_session_date);
8287: end if;
8288: end if;
8289: close csr_get_ovrd_loc;
8290:
8291: hr_utility.set_location('pay_us_emp_dt_tax_rules.correct_percentage',8);
8292: create_new_location_rec(p_assignment_id => p_assignment_id,
8293: p_validation_start_date => p_effective_start_date,
8294: p_validation_end_date => p_effective_end_date,
8295: p_session_date => p_session_date,
8298: p_res_county_code => null,
8299: p_res_city_code => null,
8300: p_business_group => p_business_group_id,
8301: p_percent => l_percent);
8302: hr_utility.set_location('pay_us_emp_dt_tax_rules.correct_percentage',9);
8303: if l_ovrd_percent = 100 then
8304: hr_utility.set_location('pay_us_emp_dt_tax_rules.correct_percentage',10);
8305: create_new_location_rec(p_assignment_id => p_assignment_id,
8306: p_validation_start_date => p_effective_start_date,
8300: p_business_group => p_business_group_id,
8301: p_percent => l_percent);
8302: hr_utility.set_location('pay_us_emp_dt_tax_rules.correct_percentage',9);
8303: if l_ovrd_percent = 100 then
8304: hr_utility.set_location('pay_us_emp_dt_tax_rules.correct_percentage',10);
8305: create_new_location_rec(p_assignment_id => p_assignment_id,
8306: p_validation_start_date => p_effective_start_date,
8307: p_validation_end_date => p_effective_end_date,
8308: p_session_date => p_session_date,
8311: p_res_county_code => null,
8312: p_res_city_code => null,
8313: p_business_group => p_business_group_id,
8314: p_percent => l_ovrd_percent);
8315: hr_utility.set_location('pay_us_emp_dt_tax_rules.correct_percentage',11);
8316: end if;
8317:
8318:
8319: else /* multiple locations */
10520: l_validation_start_date := p_session_date;
10521: l_validation_end_date := l_end_of_time;
10522: end if;
10523:
10524: hr_utility.set_location('pay_us_emp_dt_tax_rules.change_wc_entry',1);
10525: correct_wc_entry (p_assignment_id => p_assignment_id,
10526: p_effective_start_date => l_validation_start_date,
10527: p_effective_end_date => l_validation_end_date,
10528: p_session_date => p_session_date,
10528: p_session_date => p_session_date,
10529: p_new_location_id => p_new_location_id,
10530: p_ret_code => l_ret_code,
10531: p_ret_text => l_ret_text);
10532: hr_utility.set_location('pay_us_emp_dt_tax_rules.change_wc_entry',2);
10533:
10534: end change_wc_entry;
10535:
10536: procedure pull_tax_records( p_assignment_id in number,
10539: l_ef_date DATE;
10540: l_proc VARCHAR2(50) := 'pay_us_emp_dt_tax_rules.pull_tax_records';
10541:
10542: begin
10543: hr_utility.set_location('Entering: ' || l_proc, 5);
10544: /* dscully - modified to handle case where tax record changes
10545: have occured between old hire date and new hire date */
10546:
10547: if p_new_start_date < p_default_date then
10603: end if;
10604:
10605: /* Next delete any orphaned rows */
10606: if p_new_start_date > p_default_date then
10607: hr_utility.set_location(l_proc, 10);
10608: delete PAY_US_EMP_FED_TAX_RULES_F
10609: where assignment_id = p_assignment_id
10610: and p_new_start_date > effective_start_date;
10611:
10622: and p_new_start_date > effective_start_date;
10623:
10624: end if;
10625:
10626: hr_utility.set_location('Leaving: ' || l_proc, 20);
10627:
10628: end pull_tax_records;
10629:
10630: procedure check_hiring_date( p_assignment_id in number,
10648: /* the HR only customers do not run into an error when this code is */
10649:
10650:
10651: l_payroll_installed :=
10652: hr_utility.chk_product_install(p_product =>'Oracle Payroll',
10653: p_legislation => 'US');
10654:
10655:
10656:
10779: begin
10780:
10781: /* Get the resident and the work state, county and city codes */
10782:
10783: hr_utility.set_location('pay_us_emp_dt_tax_rules.default_tax',1);
10784: pay_us_emp_dt_tax_val.get_orig_res_codes (p_assignment_id => p_assignment_id,
10785:
10786: p_session_date => p_effective_start_date,
10787: p_res_state_code => l_res_state_code,
10790: p_res_state_name => l_res_state_name,
10791: p_res_county_name => l_res_county_name,
10792: p_res_city_name => l_res_city_name);
10793:
10794: hr_utility.set_location('pay_us_emp_dt_tax_rules.default_tax',2);
10795: if l_res_state_code is null then
10796: fnd_message.set_name('PER', 'PER_52985_ADD_NO_STATE_SET');
10797: fnd_message.raise_error;
10798: end if;
10811: an override for the address then get the non override address for
10812: the assignment and assign it to the additional state, county
10813: and city codes */
10814:
10815: hr_utility.set_location('pay_us_emp_dt_tax_rules.default_tax',3);
10816: open csr_chk_addr_ovrd;
10817: fetch csr_chk_addr_ovrd into l_add_state_code,
10818: l_add_county_code,
10819: l_add_city_code;
10823: l_add_city_code := null;
10824: end if;
10825: close csr_chk_addr_ovrd;
10826:
10827: hr_utility.set_location('pay_us_emp_dt_tax_rules.default_tax',4);
10828: pay_us_emp_dt_tax_val.get_all_work_codes (p_assignment_id => p_assignment_id,
10829: p_session_date => p_effective_start_date,
10830: p_work_state_code => l_work_state_code,
10831: p_work_county_code => l_work_county_code,
11479: l_loc_id hr_locations.location_id%TYPE;
11480:
11481: begin
11482:
11483: -- hr_utility.trace_on(null,'AMITA');
11484: hr_utility.set_location('pay_us_emp_dt_tax_rules.validate_default',1);
11485:
11486: hr_utility.trace('validate_default-asg ** ' || to_char(p_assignment_id));
11487: hr_utility.trace('validate_default-person id ** ' || to_char(p_person_id));
11480:
11481: begin
11482:
11483: -- hr_utility.trace_on(null,'AMITA');
11484: hr_utility.set_location('pay_us_emp_dt_tax_rules.validate_default',1);
11485:
11486: hr_utility.trace('validate_default-asg ** ' || to_char(p_assignment_id));
11487: hr_utility.trace('validate_default-person id ** ' || to_char(p_person_id));
11488: hr_utility.trace('validate_default-eff start dt ** ' || to_char(p_effective_start_date,'dd-mon-yyyy'));
11482:
11483: -- hr_utility.trace_on(null,'AMITA');
11484: hr_utility.set_location('pay_us_emp_dt_tax_rules.validate_default',1);
11485:
11486: hr_utility.trace('validate_default-asg ** ' || to_char(p_assignment_id));
11487: hr_utility.trace('validate_default-person id ** ' || to_char(p_person_id));
11488: hr_utility.trace('validate_default-eff start dt ** ' || to_char(p_effective_start_date,'dd-mon-yyyy'));
11489: hr_utility.trace('validate_defaulteff end dt ** ' || to_char(p_effective_end_date,'dd-mon-yyyy'));
11490: hr_utility.trace('validate_default - session dt ** ' || to_char(p_session_date,'dd-mon-yyyy'));
11483: -- hr_utility.trace_on(null,'AMITA');
11484: hr_utility.set_location('pay_us_emp_dt_tax_rules.validate_default',1);
11485:
11486: hr_utility.trace('validate_default-asg ** ' || to_char(p_assignment_id));
11487: hr_utility.trace('validate_default-person id ** ' || to_char(p_person_id));
11488: hr_utility.trace('validate_default-eff start dt ** ' || to_char(p_effective_start_date,'dd-mon-yyyy'));
11489: hr_utility.trace('validate_defaulteff end dt ** ' || to_char(p_effective_end_date,'dd-mon-yyyy'));
11490: hr_utility.trace('validate_default - session dt ** ' || to_char(p_session_date,'dd-mon-yyyy'));
11491: hr_utility.trace('validate_default- bg ** ' || to_char(p_business_group_id));
11484: hr_utility.set_location('pay_us_emp_dt_tax_rules.validate_default',1);
11485:
11486: hr_utility.trace('validate_default-asg ** ' || to_char(p_assignment_id));
11487: hr_utility.trace('validate_default-person id ** ' || to_char(p_person_id));
11488: hr_utility.trace('validate_default-eff start dt ** ' || to_char(p_effective_start_date,'dd-mon-yyyy'));
11489: hr_utility.trace('validate_defaulteff end dt ** ' || to_char(p_effective_end_date,'dd-mon-yyyy'));
11490: hr_utility.trace('validate_default - session dt ** ' || to_char(p_session_date,'dd-mon-yyyy'));
11491: hr_utility.trace('validate_default- bg ** ' || to_char(p_business_group_id));
11492: hr_utility.trace('validate_default - form name ** ' || p_from_form);
11485:
11486: hr_utility.trace('validate_default-asg ** ' || to_char(p_assignment_id));
11487: hr_utility.trace('validate_default-person id ** ' || to_char(p_person_id));
11488: hr_utility.trace('validate_default-eff start dt ** ' || to_char(p_effective_start_date,'dd-mon-yyyy'));
11489: hr_utility.trace('validate_defaulteff end dt ** ' || to_char(p_effective_end_date,'dd-mon-yyyy'));
11490: hr_utility.trace('validate_default - session dt ** ' || to_char(p_session_date,'dd-mon-yyyy'));
11491: hr_utility.trace('validate_default- bg ** ' || to_char(p_business_group_id));
11492: hr_utility.trace('validate_default - form name ** ' || p_from_form);
11493: hr_utility.trace('validate_default - mode ** ' || p_mode);
11486: hr_utility.trace('validate_default-asg ** ' || to_char(p_assignment_id));
11487: hr_utility.trace('validate_default-person id ** ' || to_char(p_person_id));
11488: hr_utility.trace('validate_default-eff start dt ** ' || to_char(p_effective_start_date,'dd-mon-yyyy'));
11489: hr_utility.trace('validate_defaulteff end dt ** ' || to_char(p_effective_end_date,'dd-mon-yyyy'));
11490: hr_utility.trace('validate_default - session dt ** ' || to_char(p_session_date,'dd-mon-yyyy'));
11491: hr_utility.trace('validate_default- bg ** ' || to_char(p_business_group_id));
11492: hr_utility.trace('validate_default - form name ** ' || p_from_form);
11493: hr_utility.trace('validate_default - mode ** ' || p_mode);
11494: hr_utility.trace('validate_default - location id ** ' || to_char(p_location_id));
11487: hr_utility.trace('validate_default-person id ** ' || to_char(p_person_id));
11488: hr_utility.trace('validate_default-eff start dt ** ' || to_char(p_effective_start_date,'dd-mon-yyyy'));
11489: hr_utility.trace('validate_defaulteff end dt ** ' || to_char(p_effective_end_date,'dd-mon-yyyy'));
11490: hr_utility.trace('validate_default - session dt ** ' || to_char(p_session_date,'dd-mon-yyyy'));
11491: hr_utility.trace('validate_default- bg ** ' || to_char(p_business_group_id));
11492: hr_utility.trace('validate_default - form name ** ' || p_from_form);
11493: hr_utility.trace('validate_default - mode ** ' || p_mode);
11494: hr_utility.trace('validate_default - location id ** ' || to_char(p_location_id));
11495: --dbms_output.put_line('asg** '||to_char(p_assignment_id));
11488: hr_utility.trace('validate_default-eff start dt ** ' || to_char(p_effective_start_date,'dd-mon-yyyy'));
11489: hr_utility.trace('validate_defaulteff end dt ** ' || to_char(p_effective_end_date,'dd-mon-yyyy'));
11490: hr_utility.trace('validate_default - session dt ** ' || to_char(p_session_date,'dd-mon-yyyy'));
11491: hr_utility.trace('validate_default- bg ** ' || to_char(p_business_group_id));
11492: hr_utility.trace('validate_default - form name ** ' || p_from_form);
11493: hr_utility.trace('validate_default - mode ** ' || p_mode);
11494: hr_utility.trace('validate_default - location id ** ' || to_char(p_location_id));
11495: --dbms_output.put_line('asg** '||to_char(p_assignment_id));
11496: --dbms_output.put_line('asg** '||to_char(p_person_id));
11489: hr_utility.trace('validate_defaulteff end dt ** ' || to_char(p_effective_end_date,'dd-mon-yyyy'));
11490: hr_utility.trace('validate_default - session dt ** ' || to_char(p_session_date,'dd-mon-yyyy'));
11491: hr_utility.trace('validate_default- bg ** ' || to_char(p_business_group_id));
11492: hr_utility.trace('validate_default - form name ** ' || p_from_form);
11493: hr_utility.trace('validate_default - mode ** ' || p_mode);
11494: hr_utility.trace('validate_default - location id ** ' || to_char(p_location_id));
11495: --dbms_output.put_line('asg** '||to_char(p_assignment_id));
11496: --dbms_output.put_line('asg** '||to_char(p_person_id));
11497: --dbms_output.put_line('sd** '||to_char(p_effective_start_date));
11490: hr_utility.trace('validate_default - session dt ** ' || to_char(p_session_date,'dd-mon-yyyy'));
11491: hr_utility.trace('validate_default- bg ** ' || to_char(p_business_group_id));
11492: hr_utility.trace('validate_default - form name ** ' || p_from_form);
11493: hr_utility.trace('validate_default - mode ** ' || p_mode);
11494: hr_utility.trace('validate_default - location id ** ' || to_char(p_location_id));
11495: --dbms_output.put_line('asg** '||to_char(p_assignment_id));
11496: --dbms_output.put_line('asg** '||to_char(p_person_id));
11497: --dbms_output.put_line('sd** '||to_char(p_effective_start_date));
11498: --dbms_output.put_line('ed** '||to_char(p_effective_end_date));
11511: end if;
11512:
11513: /* Check if payroll has been installed or not */
11514:
11515: l_payroll_installed := hr_utility.chk_product_install(p_product =>'Oracle Payroll', p_legislation => 'US');
11516:
11517: /* Set up the validation start date */
11518:
11519: if p_from_form = 'Assignment' then
11527: end if;
11528:
11529: if p_from_form = 'Address' then
11530:
11531: hr_utility.set_location('pay_us_emp_dt_tax_rules.validate_default',2);
11532:
11533: /* Get all of the assignments */
11534:
11535: open csr_addr_get_assignment(p_person_id);
11542:
11543:
11544: exit when csr_addr_get_assignment%NOTFOUND;
11545:
11546: hr_utility.set_location('pay_us_emp_dt_tax_rules.validate_default',3);
11547:
11548: /* Check whether the defaulting of tax rules has been done or not.
11549: If not then do the defaulting of tax rules else return 'Y' in
11550: l_fed_exists to indicate that the defaulting of tax rules has
11649: fetch csr_get_assignment into l_assignment_id, l_validation_start_date;
11650:
11651: exit when csr_get_assignment%NOTFOUND;
11652:
11653: hr_utility.set_location('pay_us_emp_dt_tax_rules.validate_default',3);
11654:
11655: /* Check whether the defaulting of tax rules has been done or not.
11656: If not then do the defaulting of tax rules else return 'Y' in
11657: l_fed_exists to indicate that the defaulting of tax rules has
11705: end if; /* End of Person form processing */
11706:
11707: if p_from_form = 'Assignment' or p_from_form = 'Tax Rules' then
11708:
11709: hr_utility.set_location('pay_us_emp_dt_tax_rules.validate_default',5);
11710:
11711: if p_from_form = 'Tax Rules' then
11712:
11713: /* Get the min effective start date of the assignment for which the
11718: fetch csr_get_min_eff_date into l_validation_start_date;
11719:
11720: if l_validation_start_date is null then
11721:
11722: hr_utility.set_location('pay_us_emp_dt_tax_rules.validate_default',6);
11723:
11724: p_return_code := 1;
11725: p_return_text := 'Default rules not satisfied';
11726: close csr_get_min_eff_date;
11737: fetch csr_chk_assignment into l_code;
11738:
11739: if csr_chk_assignment%NOTFOUND then
11740:
11741: hr_utility.set_location('pay_us_emp_dt_tax_rules.validate_default',7);
11742:
11743: p_return_code := 1;
11744: p_return_text := 'Default rules not satisfied';
11745: close csr_chk_assignment;
11809: end if;
11810:
11811: end if; /* This marks the end of processing when called by the 'Tax Rules */
11812:
11813: hr_utility.set_location('pay_us_emp_dt_tax_rules.validate_default',8);
11814:
11815:
11816: /* begin modifications - dscully 21-JUN-2000 */
11817: /* added default creation of tax records for taxation location */
11857: -- Update SUI WAGE BASE Overide amount you have payroll installed otherwise don't
11858: -- call the procedure which does the update
11859:
11860:
11861: IF hr_utility.chk_product_install(p_product =>'Oracle Payroll',
11862: p_legislation => 'US')
11863: then
11864: if p_assignment_id is not null and p_session_date is not null
11865: then
12119: /* the assignment record itself(which might be a better way of doing it!). */
12120:
12121: /* first lets make sure the record exists */
12122:
12123: hr_utility.set_location('pay_us_emp_dt_tax_rules.validate_default',100);
12124:
12125: create_new_location_rec(p_assignment_id => p_assignment_id,
12126: p_validation_start_date => null,
12127: p_validation_end_date => null,
12136:
12137: /* next we get the begin and end dates for the new location being effective
12138: along with the state code of the jurisdiction */
12139:
12140: hr_utility.set_location('pay_us_emp_dt_tax_rules.validate_default',105);
12141:
12142: open csr_max_loc_date(p_assignment_id,p_location_id,l_validation_start_date);
12143: fetch csr_max_loc_date into l_loc_max_date;
12144: close csr_max_loc_date;
12148: end if;
12149:
12150: --
12151:
12152: hr_utility.set_location('pay_us_emp_dt_tax_rules.validate_default',110);
12153:
12154: open csr_min_loc_date(p_assignment_id,p_location_id,l_validation_start_date);
12155: fetch csr_min_loc_date into l_loc_min_date;
12156: close csr_min_loc_date;
12159: l_loc_min_date := hr_api.g_sot;
12160: end if;
12161:
12162: --
12163: hr_utility.set_location('pay_us_emp_dt_tax_rules.validate_default',115);
12164:
12165: open csr_loc_state_code(p_location_id);
12166: fetch csr_loc_state_code into l_loc_state_code;
12167:
12190: to:
12191: ASG --------------|-------L1-----------------
12192: TAX ----------|---|--------------------------
12193: */
12194: hr_utility.set_location('pay_us_emp_dt_tax_rules.validate_default',120);
12195:
12196: /* insert the middle record */
12197: insert_fed_tax_row(
12198: tax_rec.emp_fed_tax_rule_id,
12285: else
12286:
12287: /* here we simply update the sui codes */
12288:
12289: hr_utility.set_location('pay_us_emp_dt_tax_rules.validate_default',125);
12290:
12291: update pay_us_emp_fed_tax_rules_f
12292: set sui_state_code = l_loc_state_code,
12293: sui_jurisdiction_code = l_loc_state_code || '-000-0000'
12304: ASG -------L1-----------------|--------------
12305: TAX --------------------------|-----|--------
12306: */
12307:
12308: hr_utility.set_location('pay_us_emp_dt_tax_rules.validate_default',130);
12309:
12310: insert_fed_tax_row(
12311: tax_rec.emp_fed_tax_rule_id,
12312: l_loc_max_date + 1,
12398: end if;
12399: end loop;
12400:
12401: /* end modifications - dscully 20-jul-2000 */
12402: hr_utility.set_location('pay_us_emp_dt_tax_rules.validate_default',140);
12403: end if; /* for payroll installed/not installed */
12404: end if; /* for location id is not null */
12405:
12406: end if; /* call from assignment form */