218: l_status number :=0;
219:
220: BEGIN
221: /*-- Bug#4942114 starts -- */
222: /* hr_utility.trace('view name = '|| l_ded_view_name);
223:
224: OPEN cv FOR
225: 'select classification_name,
226: decode(classification_name,'||'''Pre-Tax Deductions'''||','||'''1'''||','||'''Involuntary Deductions'''||','||'''2'''||','||'''Voluntary Deductions'''||','||'''3'''||','||'''9'''||')subclass,
231: ' and classification_name in ('||'''Pre-Tax Deductions'''||','
232: ||'''Involuntary Deductions'''||','||
233: '''Voluntary Deductions'''||')';
234:
235: hr_utility.trace('statement build success');
236: */
237: hr_utility.trace('Balance Status1 = '|| p_ded_bal_status1);
238: hr_utility.trace('Balance Status2 = '|| p_ded_bal_status2);
239:
233: '''Voluntary Deductions'''||')';
234:
235: hr_utility.trace('statement build success');
236: */
237: hr_utility.trace('Balance Status1 = '|| p_ded_bal_status1);
238: hr_utility.trace('Balance Status2 = '|| p_ded_bal_status2);
239:
240: if p_ded_bal_status1 = 'Y' AND p_ded_bal_status2 = 'Y' THEN
241: open csr_ded_rbr;
234:
235: hr_utility.trace('statement build success');
236: */
237: hr_utility.trace('Balance Status1 = '|| p_ded_bal_status1);
238: hr_utility.trace('Balance Status2 = '|| p_ded_bal_status2);
239:
240: if p_ded_bal_status1 = 'Y' AND p_ded_bal_status2 = 'Y' THEN
241: open csr_ded_rbr;
242: else
251: else
252: FETCH csr_ded INTO l_classification_name,l_subclass,l_element_name,l_cash_value;
253: EXIT WHEN csr_ded%NOTFOUND;
254: end if;
255: hr_utility.trace('-'||l_classification_name||'+'||l_subclass||'+'||l_element_name||'+'||l_cash_value||'-');
256:
257: /* FETCH cv INTO l_classification_name,l_subclass,l_element_name,l_cash_value;
258: hr_utility.trace('-'||l_classification_name||'+'||l_subclass||'+'||l_element_name||'+'||l_cash_value||'-');
259: EXIT WHEN cv%NOTFOUND;
254: end if;
255: hr_utility.trace('-'||l_classification_name||'+'||l_subclass||'+'||l_element_name||'+'||l_cash_value||'-');
256:
257: /* FETCH cv INTO l_classification_name,l_subclass,l_element_name,l_cash_value;
258: hr_utility.trace('-'||l_classification_name||'+'||l_subclass||'+'||l_element_name||'+'||l_cash_value||'-');
259: EXIT WHEN cv%NOTFOUND;
260: */
261: /*-- Bug#4942114 ends -- */
262: if l_asg_flag <> 'Y' THEN
266: if g_totals_table(l_temp_index).attribute5 = l_element_name
267: and g_totals_table(l_temp_index).gre_name = l_gre_name
268: and g_totals_table(l_temp_index).organization_name = l_org_name
269: and g_totals_table(l_temp_index).location_name = l_location_code then
270: hr_utility.trace('testing 1');
271: g_totals_table(l_temp_index).value2 := g_totals_table(l_temp_index).value2 +
272: to_number(l_cash_value);
273: hr_utility.trace('for deductions...l_index ='||l_index);
274: hr_utility.trace('element name ='||l_element_name);
269: and g_totals_table(l_temp_index).location_name = l_location_code then
270: hr_utility.trace('testing 1');
271: g_totals_table(l_temp_index).value2 := g_totals_table(l_temp_index).value2 +
272: to_number(l_cash_value);
273: hr_utility.trace('for deductions...l_index ='||l_index);
274: hr_utility.trace('element name ='||l_element_name);
275: hr_utility.trace('payroll action='||to_char(g_totals_table(l_index).tax_unit_id));
276: hr_utility.trace('gre_name='||l_gre_name);
277: hr_utility.trace('org name='||l_org_name);
270: hr_utility.trace('testing 1');
271: g_totals_table(l_temp_index).value2 := g_totals_table(l_temp_index).value2 +
272: to_number(l_cash_value);
273: hr_utility.trace('for deductions...l_index ='||l_index);
274: hr_utility.trace('element name ='||l_element_name);
275: hr_utility.trace('payroll action='||to_char(g_totals_table(l_index).tax_unit_id));
276: hr_utility.trace('gre_name='||l_gre_name);
277: hr_utility.trace('org name='||l_org_name);
278: hr_utility.trace('location='||l_location_code);
271: g_totals_table(l_temp_index).value2 := g_totals_table(l_temp_index).value2 +
272: to_number(l_cash_value);
273: hr_utility.trace('for deductions...l_index ='||l_index);
274: hr_utility.trace('element name ='||l_element_name);
275: hr_utility.trace('payroll action='||to_char(g_totals_table(l_index).tax_unit_id));
276: hr_utility.trace('gre_name='||l_gre_name);
277: hr_utility.trace('org name='||l_org_name);
278: hr_utility.trace('location='||l_location_code);
279: hr_utility.trace('Toal Cash value ='||to_char(g_totals_table(l_temp_index).value2));
272: to_number(l_cash_value);
273: hr_utility.trace('for deductions...l_index ='||l_index);
274: hr_utility.trace('element name ='||l_element_name);
275: hr_utility.trace('payroll action='||to_char(g_totals_table(l_index).tax_unit_id));
276: hr_utility.trace('gre_name='||l_gre_name);
277: hr_utility.trace('org name='||l_org_name);
278: hr_utility.trace('location='||l_location_code);
279: hr_utility.trace('Toal Cash value ='||to_char(g_totals_table(l_temp_index).value2));
280: hr_utility.trace('Cash Value ='||l_cash_value);
273: hr_utility.trace('for deductions...l_index ='||l_index);
274: hr_utility.trace('element name ='||l_element_name);
275: hr_utility.trace('payroll action='||to_char(g_totals_table(l_index).tax_unit_id));
276: hr_utility.trace('gre_name='||l_gre_name);
277: hr_utility.trace('org name='||l_org_name);
278: hr_utility.trace('location='||l_location_code);
279: hr_utility.trace('Toal Cash value ='||to_char(g_totals_table(l_temp_index).value2));
280: hr_utility.trace('Cash Value ='||l_cash_value);
281: l_status := 1;
274: hr_utility.trace('element name ='||l_element_name);
275: hr_utility.trace('payroll action='||to_char(g_totals_table(l_index).tax_unit_id));
276: hr_utility.trace('gre_name='||l_gre_name);
277: hr_utility.trace('org name='||l_org_name);
278: hr_utility.trace('location='||l_location_code);
279: hr_utility.trace('Toal Cash value ='||to_char(g_totals_table(l_temp_index).value2));
280: hr_utility.trace('Cash Value ='||l_cash_value);
281: l_status := 1;
282: end if;
275: hr_utility.trace('payroll action='||to_char(g_totals_table(l_index).tax_unit_id));
276: hr_utility.trace('gre_name='||l_gre_name);
277: hr_utility.trace('org name='||l_org_name);
278: hr_utility.trace('location='||l_location_code);
279: hr_utility.trace('Toal Cash value ='||to_char(g_totals_table(l_temp_index).value2));
280: hr_utility.trace('Cash Value ='||l_cash_value);
281: l_status := 1;
282: end if;
283: end loop;
276: hr_utility.trace('gre_name='||l_gre_name);
277: hr_utility.trace('org name='||l_org_name);
278: hr_utility.trace('location='||l_location_code);
279: hr_utility.trace('Toal Cash value ='||to_char(g_totals_table(l_temp_index).value2));
280: hr_utility.trace('Cash Value ='||l_cash_value);
281: l_status := 1;
282: end if;
283: end loop;
284: end if;
294: g_totals_table(l_index).value2 := to_number(l_cash_value);
295: g_totals_table(l_index).value3 := NULL;
296: g_totals_table(l_index).attribute1 := 'DEDUCTIONS';
297: g_totals_table(l_index).attribute2 := '4';
298: hr_utility.trace('for deductions...l_index ='||l_index);
299: hr_utility.trace('element name ='||l_element_name);
300: hr_utility.trace('payroll action='||to_char(l_payroll_action_id));
301: hr_utility.trace('gre_name='||l_gre_name);
302: hr_utility.trace('org name='||l_org_name);
295: g_totals_table(l_index).value3 := NULL;
296: g_totals_table(l_index).attribute1 := 'DEDUCTIONS';
297: g_totals_table(l_index).attribute2 := '4';
298: hr_utility.trace('for deductions...l_index ='||l_index);
299: hr_utility.trace('element name ='||l_element_name);
300: hr_utility.trace('payroll action='||to_char(l_payroll_action_id));
301: hr_utility.trace('gre_name='||l_gre_name);
302: hr_utility.trace('org name='||l_org_name);
303: hr_utility.trace('location='||l_location_code);
296: g_totals_table(l_index).attribute1 := 'DEDUCTIONS';
297: g_totals_table(l_index).attribute2 := '4';
298: hr_utility.trace('for deductions...l_index ='||l_index);
299: hr_utility.trace('element name ='||l_element_name);
300: hr_utility.trace('payroll action='||to_char(l_payroll_action_id));
301: hr_utility.trace('gre_name='||l_gre_name);
302: hr_utility.trace('org name='||l_org_name);
303: hr_utility.trace('location='||l_location_code);
304: hr_utility.trace('Cash Value ='||l_cash_value);
297: g_totals_table(l_index).attribute2 := '4';
298: hr_utility.trace('for deductions...l_index ='||l_index);
299: hr_utility.trace('element name ='||l_element_name);
300: hr_utility.trace('payroll action='||to_char(l_payroll_action_id));
301: hr_utility.trace('gre_name='||l_gre_name);
302: hr_utility.trace('org name='||l_org_name);
303: hr_utility.trace('location='||l_location_code);
304: hr_utility.trace('Cash Value ='||l_cash_value);
305: end if;
298: hr_utility.trace('for deductions...l_index ='||l_index);
299: hr_utility.trace('element name ='||l_element_name);
300: hr_utility.trace('payroll action='||to_char(l_payroll_action_id));
301: hr_utility.trace('gre_name='||l_gre_name);
302: hr_utility.trace('org name='||l_org_name);
303: hr_utility.trace('location='||l_location_code);
304: hr_utility.trace('Cash Value ='||l_cash_value);
305: end if;
306: else
299: hr_utility.trace('element name ='||l_element_name);
300: hr_utility.trace('payroll action='||to_char(l_payroll_action_id));
301: hr_utility.trace('gre_name='||l_gre_name);
302: hr_utility.trace('org name='||l_org_name);
303: hr_utility.trace('location='||l_location_code);
304: hr_utility.trace('Cash Value ='||l_cash_value);
305: end if;
306: else
307: insert into pay_us_rpt_totals
300: hr_utility.trace('payroll action='||to_char(l_payroll_action_id));
301: hr_utility.trace('gre_name='||l_gre_name);
302: hr_utility.trace('org name='||l_org_name);
303: hr_utility.trace('location='||l_location_code);
304: hr_utility.trace('Cash Value ='||l_cash_value);
305: end if;
306: else
307: insert into pay_us_rpt_totals
308: (tax_unit_id,
343: else
344: close csr_ded;
345: end if;
346: -- close cv;
347: hr_utility.trace('l_index ='||to_char(l_index));
348: exception
349: when others then
350: hr_utility.trace('Error occurred load_deductions ...' ||SQLERRM);
351: raise;
346: -- close cv;
347: hr_utility.trace('l_index ='||to_char(l_index));
348: exception
349: when others then
350: hr_utility.trace('Error occurred load_deductions ...' ||SQLERRM);
351: raise;
352: end load_deductions;
353:
354:
413: l_status number :=0;
414: BEGIN
415:
416: /*-- Bug#4942114 starts -- */
417: -- hr_utility.trace('l_earn_view_name = '|| l_earn_view_name);
418:
419:
420: -- OPEN cv FOR
421: -- 'select /*+ index(pay_us_gtn_earnings_v.ernv.pec , pay_element_classification_pk)
432: -- ' and classification_name in ('||'''Earnings'''||','
433: -- ||'''Imputed Earnings'''||','||
434: -- '''Supplemental Earnings'''||','
435: -- ||'''Non-payroll Payments'''||')';
436: -- hr_utility.trace('statement build success');
437:
438: if p_earn_bal_status = 'Y' THEN
439: open csr_earn_rbr;
440: else
469: to_number(l_cash_value);
470: g_totals_table(l_temp_index).value3 := g_totals_table(l_temp_index).value3 +
471: to_number(l_hours_value);
472: l_status := 1;
473: hr_utility.trace('for earnings...l_index ='||l_index);
474: hr_utility.trace('element name ='||l_element_name);
475: hr_utility.trace('payroll action='||to_char(g_totals_table(l_index).tax_unit_id));
476: hr_utility.trace('gre_name='||l_gre_name);
477: hr_utility.trace('org name='||l_org_name);
470: g_totals_table(l_temp_index).value3 := g_totals_table(l_temp_index).value3 +
471: to_number(l_hours_value);
472: l_status := 1;
473: hr_utility.trace('for earnings...l_index ='||l_index);
474: hr_utility.trace('element name ='||l_element_name);
475: hr_utility.trace('payroll action='||to_char(g_totals_table(l_index).tax_unit_id));
476: hr_utility.trace('gre_name='||l_gre_name);
477: hr_utility.trace('org name='||l_org_name);
478: hr_utility.trace('location='||l_location_code);
471: to_number(l_hours_value);
472: l_status := 1;
473: hr_utility.trace('for earnings...l_index ='||l_index);
474: hr_utility.trace('element name ='||l_element_name);
475: hr_utility.trace('payroll action='||to_char(g_totals_table(l_index).tax_unit_id));
476: hr_utility.trace('gre_name='||l_gre_name);
477: hr_utility.trace('org name='||l_org_name);
478: hr_utility.trace('location='||l_location_code);
479: hr_utility.trace('Toal Cash value ='||to_char(g_totals_table(l_temp_index).value2));
472: l_status := 1;
473: hr_utility.trace('for earnings...l_index ='||l_index);
474: hr_utility.trace('element name ='||l_element_name);
475: hr_utility.trace('payroll action='||to_char(g_totals_table(l_index).tax_unit_id));
476: hr_utility.trace('gre_name='||l_gre_name);
477: hr_utility.trace('org name='||l_org_name);
478: hr_utility.trace('location='||l_location_code);
479: hr_utility.trace('Toal Cash value ='||to_char(g_totals_table(l_temp_index).value2));
480: hr_utility.trace('Cash Value ='||l_cash_value);
473: hr_utility.trace('for earnings...l_index ='||l_index);
474: hr_utility.trace('element name ='||l_element_name);
475: hr_utility.trace('payroll action='||to_char(g_totals_table(l_index).tax_unit_id));
476: hr_utility.trace('gre_name='||l_gre_name);
477: hr_utility.trace('org name='||l_org_name);
478: hr_utility.trace('location='||l_location_code);
479: hr_utility.trace('Toal Cash value ='||to_char(g_totals_table(l_temp_index).value2));
480: hr_utility.trace('Cash Value ='||l_cash_value);
481:
474: hr_utility.trace('element name ='||l_element_name);
475: hr_utility.trace('payroll action='||to_char(g_totals_table(l_index).tax_unit_id));
476: hr_utility.trace('gre_name='||l_gre_name);
477: hr_utility.trace('org name='||l_org_name);
478: hr_utility.trace('location='||l_location_code);
479: hr_utility.trace('Toal Cash value ='||to_char(g_totals_table(l_temp_index).value2));
480: hr_utility.trace('Cash Value ='||l_cash_value);
481:
482: end if;
475: hr_utility.trace('payroll action='||to_char(g_totals_table(l_index).tax_unit_id));
476: hr_utility.trace('gre_name='||l_gre_name);
477: hr_utility.trace('org name='||l_org_name);
478: hr_utility.trace('location='||l_location_code);
479: hr_utility.trace('Toal Cash value ='||to_char(g_totals_table(l_temp_index).value2));
480: hr_utility.trace('Cash Value ='||l_cash_value);
481:
482: end if;
483: end loop;
476: hr_utility.trace('gre_name='||l_gre_name);
477: hr_utility.trace('org name='||l_org_name);
478: hr_utility.trace('location='||l_location_code);
479: hr_utility.trace('Toal Cash value ='||to_char(g_totals_table(l_temp_index).value2));
480: hr_utility.trace('Cash Value ='||l_cash_value);
481:
482: end if;
483: end loop;
484: end if;
482: end if;
483: end loop;
484: end if;
485: if l_status <> 1 or l_index = 0 then
486: hr_utility.trace('l_status ='||l_status||' l_index ='||l_index);
487: l_index := l_index + 1;
488: g_totals_table(l_index).gre_name := l_gre_name;
489: g_totals_table(l_index).organization_name := l_org_name;
490: g_totals_table(l_index).location_name := l_location_code;
495: g_totals_table(l_index).value2 := to_number(l_cash_value);
496: g_totals_table(l_index).value3 := to_number(l_hours_value);
497: g_totals_table(l_index).attribute1 := 'EARNINGS';
498: g_totals_table(l_index).attribute2 := '1';
499: hr_utility.trace('for earnings...l_index ='||l_index);
500: hr_utility.trace('element name ='||l_element_name);
501: hr_utility.trace('payroll action='||to_char(l_payroll_action_id));
502: hr_utility.trace('gre_name='||l_gre_name);
503: hr_utility.trace('org name='||l_org_name);
496: g_totals_table(l_index).value3 := to_number(l_hours_value);
497: g_totals_table(l_index).attribute1 := 'EARNINGS';
498: g_totals_table(l_index).attribute2 := '1';
499: hr_utility.trace('for earnings...l_index ='||l_index);
500: hr_utility.trace('element name ='||l_element_name);
501: hr_utility.trace('payroll action='||to_char(l_payroll_action_id));
502: hr_utility.trace('gre_name='||l_gre_name);
503: hr_utility.trace('org name='||l_org_name);
504: hr_utility.trace('location='||l_location_code);
497: g_totals_table(l_index).attribute1 := 'EARNINGS';
498: g_totals_table(l_index).attribute2 := '1';
499: hr_utility.trace('for earnings...l_index ='||l_index);
500: hr_utility.trace('element name ='||l_element_name);
501: hr_utility.trace('payroll action='||to_char(l_payroll_action_id));
502: hr_utility.trace('gre_name='||l_gre_name);
503: hr_utility.trace('org name='||l_org_name);
504: hr_utility.trace('location='||l_location_code);
505: hr_utility.trace('Cash Value ='||l_cash_value);
498: g_totals_table(l_index).attribute2 := '1';
499: hr_utility.trace('for earnings...l_index ='||l_index);
500: hr_utility.trace('element name ='||l_element_name);
501: hr_utility.trace('payroll action='||to_char(l_payroll_action_id));
502: hr_utility.trace('gre_name='||l_gre_name);
503: hr_utility.trace('org name='||l_org_name);
504: hr_utility.trace('location='||l_location_code);
505: hr_utility.trace('Cash Value ='||l_cash_value);
506: end if;
499: hr_utility.trace('for earnings...l_index ='||l_index);
500: hr_utility.trace('element name ='||l_element_name);
501: hr_utility.trace('payroll action='||to_char(l_payroll_action_id));
502: hr_utility.trace('gre_name='||l_gre_name);
503: hr_utility.trace('org name='||l_org_name);
504: hr_utility.trace('location='||l_location_code);
505: hr_utility.trace('Cash Value ='||l_cash_value);
506: end if;
507: else
500: hr_utility.trace('element name ='||l_element_name);
501: hr_utility.trace('payroll action='||to_char(l_payroll_action_id));
502: hr_utility.trace('gre_name='||l_gre_name);
503: hr_utility.trace('org name='||l_org_name);
504: hr_utility.trace('location='||l_location_code);
505: hr_utility.trace('Cash Value ='||l_cash_value);
506: end if;
507: else
508: insert into pay_us_rpt_totals
501: hr_utility.trace('payroll action='||to_char(l_payroll_action_id));
502: hr_utility.trace('gre_name='||l_gre_name);
503: hr_utility.trace('org name='||l_org_name);
504: hr_utility.trace('location='||l_location_code);
505: hr_utility.trace('Cash Value ='||l_cash_value);
506: end if;
507: else
508: insert into pay_us_rpt_totals
509: (tax_unit_id,
550: /*-- Bug#4942114 ends -- */
551:
552: exception
553: when others then
554: hr_utility.trace('Error occurred load_earnings ...' ||SQLERRM);
555: raise;
556: end load_earnings;
557: --------------------------------------------------------------
558: -- Following procedure has been added by tmehra on 02-JAN-2001
577: begin
578: open ee_earn ;
579: loop
580: fetch ee_earn into ee_earn_rec;
581: hr_utility.trace('Number of Earnings Records fetched = '||to_char(ee_earn%ROWCOUNT));
582: exit when ee_earn%notfound;
583: insert into pay_us_rpt_totals
584: (tax_unit_id, gre_name, organization_name, location_name,
585: attribute1,
606: end loop;
607: close ee_earn;
608: exception
609: when others then
610: hr_utility.trace('Error occurred load_earnings ...' ||SQLERRM);
611: raise;
612: end load_alien_earnings;
613:
614: FUNCTION get_state_name(p_tax_type_code IN VARCHAR2, p_jurisdiction_code IN VARCHAR2)
614: FUNCTION get_state_name(p_tax_type_code IN VARCHAR2, p_jurisdiction_code IN VARCHAR2)
615: RETURN VARCHAR2 IS
616: ls_state_name pay_us_states.state_name%TYPE := NULL;
617: BEGIN
618: hr_utility.trace('GET_STATE_NAME called');
619: hr_utility.trace('p_tax_type_code : ' || p_tax_type_code || ' p_jurisdiction_code : ' || p_jurisdiction_code);
620: SELECT state_abbrev INTO ls_state_name
621: FROM pay_us_states
622: WHERE state_code = substr(p_jurisdiction_code,1,2);
615: RETURN VARCHAR2 IS
616: ls_state_name pay_us_states.state_name%TYPE := NULL;
617: BEGIN
618: hr_utility.trace('GET_STATE_NAME called');
619: hr_utility.trace('p_tax_type_code : ' || p_tax_type_code || ' p_jurisdiction_code : ' || p_jurisdiction_code);
620: SELECT state_abbrev INTO ls_state_name
621: FROM pay_us_states
622: WHERE state_code = substr(p_jurisdiction_code,1,2);
623:
620: SELECT state_abbrev INTO ls_state_name
621: FROM pay_us_states
622: WHERE state_code = substr(p_jurisdiction_code,1,2);
623:
624: hr_utility.trace('GET_STATE_NAME returns ' || ls_state_name);
625: RETURN ls_state_name;
626:
627: EXCEPTION
628: WHEN OTHERS THEN
632: FUNCTION get_county_name(p_tax_type_code IN VARCHAR2, p_jurisdiction_code IN VARCHAR2)
633: RETURN VARCHAR2 IS
634: ls_county_name pay_us_counties.county_name%TYPE := NULL;
635: BEGIN
636: hr_utility.trace('GET_COUNTY_NAME called');
637: hr_utility.trace('p_tax_type_code : ' || p_tax_type_code || ' p_jurisdiction_code : ' || p_jurisdiction_code);
638: IF p_tax_type_code = 'COUNTY' THEN
639: SELECT county_name INTO ls_county_name
640: FROM pay_us_counties
633: RETURN VARCHAR2 IS
634: ls_county_name pay_us_counties.county_name%TYPE := NULL;
635: BEGIN
636: hr_utility.trace('GET_COUNTY_NAME called');
637: hr_utility.trace('p_tax_type_code : ' || p_tax_type_code || ' p_jurisdiction_code : ' || p_jurisdiction_code);
638: IF p_tax_type_code = 'COUNTY' THEN
639: SELECT county_name INTO ls_county_name
640: FROM pay_us_counties
641: WHERE state_code = substr(p_jurisdiction_code,1,2)
641: WHERE state_code = substr(p_jurisdiction_code,1,2)
642: AND county_code = substr(p_jurisdiction_code,4,3);
643:
644: END IF;
645: hr_utility.trace('GET_COUNTY_NAME returns ' || ls_county_name);
646: RETURN ls_county_name;
647: EXCEPTION
648: WHEN OTHERS THEN
649: RETURN NULL;
659: AND city_code = substr(p_jurisdiction_code,8,4)
660: AND upper(primary_flag) = 'Y';
661:
662: BEGIN
663: hr_utility.trace('GET_CITY_NAME called');
664: hr_utility.trace('p_tax_type_code : ' || p_tax_type_code || ' p_jurisdiction_code : ' || p_jurisdiction_code);
665: IF p_tax_type_code IN ('CITY','HT') THEN
666: OPEN c_get_city;
667: FETCH c_get_city INTO ls_city_name;
660: AND upper(primary_flag) = 'Y';
661:
662: BEGIN
663: hr_utility.trace('GET_CITY_NAME called');
664: hr_utility.trace('p_tax_type_code : ' || p_tax_type_code || ' p_jurisdiction_code : ' || p_jurisdiction_code);
665: IF p_tax_type_code IN ('CITY','HT') THEN
666: OPEN c_get_city;
667: FETCH c_get_city INTO ls_city_name;
668: CLOSE c_get_city;
666: OPEN c_get_city;
667: FETCH c_get_city INTO ls_city_name;
668: CLOSE c_get_city;
669: END IF;
670: hr_utility.trace('GET_CITY_NAME returns ' || ls_city_name);
671: RETURN ls_city_name;
672: EXCEPTION
673: WHEN OTHERS THEN
674: RETURN NULL;
835: where DS.STATE_CODE = p_state_code
836: and DS.SCHOOL_DST_CODE = p_sd_code
837: and ST.state_code = DS.state_code;
838: BEGIN
839: hr_utility.trace('Inside LOAD_EE_TAX');
840: /*-- Bug#4942114 starts -- */
841: /* hr_utility.trace('view names = '|| l_fed_view_name || l_state_view_name || l_local_view_name);
842:
843: OPEN cv FOR
837: and ST.state_code = DS.state_code;
838: BEGIN
839: hr_utility.trace('Inside LOAD_EE_TAX');
840: /*-- Bug#4942114 starts -- */
841: /* hr_utility.trace('view names = '|| l_fed_view_name || l_state_view_name || l_local_view_name);
842:
843: OPEN cv FOR
844: 'select user_reporting_name,''1'' sub_class,run_val,null,null
845: from '||l_fed_view_name||
882: AND state.assignment_id = paa.assignment_id
883: AND ppa.payroll_action_id = paa.payroll_action_id
884: AND paa.assignment_action_id ='|| l_assignment_action_id||
885: ' AND ppa.effective_date BETWEEN state.effective_start_date AND state.effective_end_date';
886: hr_utility.trace('statement build success');
887: LOOP
888: FETCH cv INTO l_user_reporting_name,l_sub_class,l_run_val
889: , l_tax_type_code, l_jurisdiction_code; */
890:
889: , l_tax_type_code, l_jurisdiction_code; */
890:
891: if p_fed_bal_status = 'Y' and p_state_bal_status = 'Y' and p_local_bal_status = 'Y' then
892: open csr_ee_tax_rbr;
893: hr_utility.trace('Cursor CSR_EE_TAX_RBR Opened');
894: else
895: open csr_ee_tax;
896: hr_utility.trace('Cursor CSR_EE_TAX Opened');
897: end if;
892: open csr_ee_tax_rbr;
893: hr_utility.trace('Cursor CSR_EE_TAX_RBR Opened');
894: else
895: open csr_ee_tax;
896: hr_utility.trace('Cursor CSR_EE_TAX Opened');
897: end if;
898:
899: loop
900:
901: if p_fed_bal_status = 'Y' and p_state_bal_status = 'Y' and p_local_bal_status = 'Y' then
902: FETCH csr_ee_tax_rbr INTO l_user_reporting_name,l_sub_class,l_run_val
903: , l_tax_type_code, l_jurisdiction_code;
904: IF csr_ee_tax_rbr%FOUND THEN
905: hr_utility.trace('Cursor Record No : ');
906: hr_utility.trace(csr_ee_tax_rbr%ROWCOUNT);
907: END IF;
908: exit when csr_ee_tax_rbr%NOTFOUND;
909: else
902: FETCH csr_ee_tax_rbr INTO l_user_reporting_name,l_sub_class,l_run_val
903: , l_tax_type_code, l_jurisdiction_code;
904: IF csr_ee_tax_rbr%FOUND THEN
905: hr_utility.trace('Cursor Record No : ');
906: hr_utility.trace(csr_ee_tax_rbr%ROWCOUNT);
907: END IF;
908: exit when csr_ee_tax_rbr%NOTFOUND;
909: else
910: FETCH csr_ee_tax INTO l_user_reporting_name,l_sub_class,l_run_val
909: else
910: FETCH csr_ee_tax INTO l_user_reporting_name,l_sub_class,l_run_val
911: , l_tax_type_code, l_jurisdiction_code;
912: IF csr_ee_tax%FOUND THEN
913: hr_utility.trace('Cursor Record No : ');
914: hr_utility.trace(csr_ee_tax%ROWCOUNT);
915: END IF;
916: exit when csr_ee_tax%NOTFOUND;
917: end if;
910: FETCH csr_ee_tax INTO l_user_reporting_name,l_sub_class,l_run_val
911: , l_tax_type_code, l_jurisdiction_code;
912: IF csr_ee_tax%FOUND THEN
913: hr_utility.trace('Cursor Record No : ');
914: hr_utility.trace(csr_ee_tax%ROWCOUNT);
915: END IF;
916: exit when csr_ee_tax%NOTFOUND;
917: end if;
918:
915: END IF;
916: exit when csr_ee_tax%NOTFOUND;
917: end if;
918:
919: hr_utility.trace('l_user_reporting_name : ' || l_user_reporting_name || ', l_sub_class : '
920: || l_sub_class || ', l_run_val : ' || l_run_val || ', l_tax_type_code : ' || l_tax_type_code ||
921: ', l_jurisdiction_code : ' || l_jurisdiction_code);
922:
923: /*-- Bug#4942114 ends -- */
957: g_totals_table(l_temp_index).gre_name = l_gre_name and
958: g_totals_table(l_temp_index).organization_name = l_org_name and
959: g_totals_table(l_temp_index).location_name = l_location_code then
960:
961: hr_utility.trace('testing 1');
962: g_totals_table(l_temp_index).value2 := g_totals_table(l_temp_index).value2 +
963: to_number(l_run_val);
964: l_status := 1;
965: hr_utility.trace('for ee tax...l_index ='||l_index);
961: hr_utility.trace('testing 1');
962: g_totals_table(l_temp_index).value2 := g_totals_table(l_temp_index).value2 +
963: to_number(l_run_val);
964: l_status := 1;
965: hr_utility.trace('for ee tax...l_index ='||l_index);
966: hr_utility.trace('element name ='||l_user_reporting_name);
967: hr_utility.trace('payroll action='||to_char(g_totals_table(l_index).tax_unit_id));
968: hr_utility.trace('gre_name='||l_gre_name);
969: hr_utility.trace('org name='||l_org_name);
962: g_totals_table(l_temp_index).value2 := g_totals_table(l_temp_index).value2 +
963: to_number(l_run_val);
964: l_status := 1;
965: hr_utility.trace('for ee tax...l_index ='||l_index);
966: hr_utility.trace('element name ='||l_user_reporting_name);
967: hr_utility.trace('payroll action='||to_char(g_totals_table(l_index).tax_unit_id));
968: hr_utility.trace('gre_name='||l_gre_name);
969: hr_utility.trace('org name='||l_org_name);
970: hr_utility.trace('location='||l_location_code);
963: to_number(l_run_val);
964: l_status := 1;
965: hr_utility.trace('for ee tax...l_index ='||l_index);
966: hr_utility.trace('element name ='||l_user_reporting_name);
967: hr_utility.trace('payroll action='||to_char(g_totals_table(l_index).tax_unit_id));
968: hr_utility.trace('gre_name='||l_gre_name);
969: hr_utility.trace('org name='||l_org_name);
970: hr_utility.trace('location='||l_location_code);
971: hr_utility.trace('Toal Cash value ='||to_char(g_totals_table(l_temp_index).value2));
964: l_status := 1;
965: hr_utility.trace('for ee tax...l_index ='||l_index);
966: hr_utility.trace('element name ='||l_user_reporting_name);
967: hr_utility.trace('payroll action='||to_char(g_totals_table(l_index).tax_unit_id));
968: hr_utility.trace('gre_name='||l_gre_name);
969: hr_utility.trace('org name='||l_org_name);
970: hr_utility.trace('location='||l_location_code);
971: hr_utility.trace('Toal Cash value ='||to_char(g_totals_table(l_temp_index).value2));
972: hr_utility.trace('Cash Value ='||l_run_val);
965: hr_utility.trace('for ee tax...l_index ='||l_index);
966: hr_utility.trace('element name ='||l_user_reporting_name);
967: hr_utility.trace('payroll action='||to_char(g_totals_table(l_index).tax_unit_id));
968: hr_utility.trace('gre_name='||l_gre_name);
969: hr_utility.trace('org name='||l_org_name);
970: hr_utility.trace('location='||l_location_code);
971: hr_utility.trace('Toal Cash value ='||to_char(g_totals_table(l_temp_index).value2));
972: hr_utility.trace('Cash Value ='||l_run_val);
973: end if;
966: hr_utility.trace('element name ='||l_user_reporting_name);
967: hr_utility.trace('payroll action='||to_char(g_totals_table(l_index).tax_unit_id));
968: hr_utility.trace('gre_name='||l_gre_name);
969: hr_utility.trace('org name='||l_org_name);
970: hr_utility.trace('location='||l_location_code);
971: hr_utility.trace('Toal Cash value ='||to_char(g_totals_table(l_temp_index).value2));
972: hr_utility.trace('Cash Value ='||l_run_val);
973: end if;
974: end loop;
967: hr_utility.trace('payroll action='||to_char(g_totals_table(l_index).tax_unit_id));
968: hr_utility.trace('gre_name='||l_gre_name);
969: hr_utility.trace('org name='||l_org_name);
970: hr_utility.trace('location='||l_location_code);
971: hr_utility.trace('Toal Cash value ='||to_char(g_totals_table(l_temp_index).value2));
972: hr_utility.trace('Cash Value ='||l_run_val);
973: end if;
974: end loop;
975: end if;
968: hr_utility.trace('gre_name='||l_gre_name);
969: hr_utility.trace('org name='||l_org_name);
970: hr_utility.trace('location='||l_location_code);
971: hr_utility.trace('Toal Cash value ='||to_char(g_totals_table(l_temp_index).value2));
972: hr_utility.trace('Cash Value ='||l_run_val);
973: end if;
974: end loop;
975: end if;
976: if l_status <> 1 or l_index = 0 then
973: end if;
974: end loop;
975: end if;
976: if l_status <> 1 or l_index = 0 then
977: hr_utility.trace('testing 6');
978: l_index := l_index + 1;
979: g_totals_table(l_index).gre_name := l_gre_name;
980: g_totals_table(l_index).organization_name := l_org_name;
981: g_totals_table(l_index).location_name := l_location_code;
987: g_totals_table(l_index).value3 := NULL;
988: g_totals_table(l_index).attribute1 := 'EE-TAX';
989: g_totals_table(l_index).attribute2 := '2';
990: end if;
991: hr_utility.trace('for ee tax...l_index ='||l_index);
992: hr_utility.trace('element name ='||l_user_reporting_name);
993: hr_utility.trace('payroll action='||to_char(l_payroll_action_id));
994: hr_utility.trace('gre_name='||l_gre_name);
995: hr_utility.trace('org name='||l_org_name);
988: g_totals_table(l_index).attribute1 := 'EE-TAX';
989: g_totals_table(l_index).attribute2 := '2';
990: end if;
991: hr_utility.trace('for ee tax...l_index ='||l_index);
992: hr_utility.trace('element name ='||l_user_reporting_name);
993: hr_utility.trace('payroll action='||to_char(l_payroll_action_id));
994: hr_utility.trace('gre_name='||l_gre_name);
995: hr_utility.trace('org name='||l_org_name);
996: hr_utility.trace('location='||l_location_code);
989: g_totals_table(l_index).attribute2 := '2';
990: end if;
991: hr_utility.trace('for ee tax...l_index ='||l_index);
992: hr_utility.trace('element name ='||l_user_reporting_name);
993: hr_utility.trace('payroll action='||to_char(l_payroll_action_id));
994: hr_utility.trace('gre_name='||l_gre_name);
995: hr_utility.trace('org name='||l_org_name);
996: hr_utility.trace('location='||l_location_code);
997: hr_utility.trace('Cash Value ='||l_run_val);
990: end if;
991: hr_utility.trace('for ee tax...l_index ='||l_index);
992: hr_utility.trace('element name ='||l_user_reporting_name);
993: hr_utility.trace('payroll action='||to_char(l_payroll_action_id));
994: hr_utility.trace('gre_name='||l_gre_name);
995: hr_utility.trace('org name='||l_org_name);
996: hr_utility.trace('location='||l_location_code);
997: hr_utility.trace('Cash Value ='||l_run_val);
998: else
991: hr_utility.trace('for ee tax...l_index ='||l_index);
992: hr_utility.trace('element name ='||l_user_reporting_name);
993: hr_utility.trace('payroll action='||to_char(l_payroll_action_id));
994: hr_utility.trace('gre_name='||l_gre_name);
995: hr_utility.trace('org name='||l_org_name);
996: hr_utility.trace('location='||l_location_code);
997: hr_utility.trace('Cash Value ='||l_run_val);
998: else
999: hr_utility.trace('Direct Insert into pay_us_rpt_totals');
992: hr_utility.trace('element name ='||l_user_reporting_name);
993: hr_utility.trace('payroll action='||to_char(l_payroll_action_id));
994: hr_utility.trace('gre_name='||l_gre_name);
995: hr_utility.trace('org name='||l_org_name);
996: hr_utility.trace('location='||l_location_code);
997: hr_utility.trace('Cash Value ='||l_run_val);
998: else
999: hr_utility.trace('Direct Insert into pay_us_rpt_totals');
1000: insert into pay_us_rpt_totals
993: hr_utility.trace('payroll action='||to_char(l_payroll_action_id));
994: hr_utility.trace('gre_name='||l_gre_name);
995: hr_utility.trace('org name='||l_org_name);
996: hr_utility.trace('location='||l_location_code);
997: hr_utility.trace('Cash Value ='||l_run_val);
998: else
999: hr_utility.trace('Direct Insert into pay_us_rpt_totals');
1000: insert into pay_us_rpt_totals
1001: (tax_unit_id, gre_name, organization_name, location_name,
995: hr_utility.trace('org name='||l_org_name);
996: hr_utility.trace('location='||l_location_code);
997: hr_utility.trace('Cash Value ='||l_run_val);
998: else
999: hr_utility.trace('Direct Insert into pay_us_rpt_totals');
1000: insert into pay_us_rpt_totals
1001: (tax_unit_id, gre_name, organization_name, location_name,
1002: attribute1,
1003: value1,
1031: end if;
1032: /*-- Bug#4942114 ends -- */
1033: exception
1034: when others then
1035: hr_utility.trace('Error occurred load_ee_tax ...' ||SQLERRM);
1036: raise;
1037: end load_ee_tax;
1038:
1039: /*-- Bug#4942114 starts -- */
1101: l_status number :=0;
1102: -- lv_sql_query varchar2(3000); -- Bug#4942114
1103: BEGIN
1104: /*-- Bug#4942114 ends -- */
1105: /* hr_utility.trace('view names = '|| l_fed_liab_view_name || l_state_liab_view_name || l_local_liab_view_name);
1106:
1107: lv_sql_query := 'select user_reporting_name,''1'' sub_class,run_val
1108: from ' || l_fed_liab_view_name ||
1109: ' where assignment_action_id ='|| l_assignment_action_id||
1136: ' and ee_or_er_code = ''ER''';
1137:
1138: OPEN cv FOR lv_sql_query;
1139:
1140: hr_utility.trace('statement build success');
1141: LOOP
1142: fetch cv into l_user_reporting_name, l_sub_class, l_run_val;
1143: hr_utility.trace('assignment_Action_id in load_er_tax ='||to_char(l_assignment_action_id));
1144: EXIT WHEN cv%NOTFOUND; */
1139:
1140: hr_utility.trace('statement build success');
1141: LOOP
1142: fetch cv into l_user_reporting_name, l_sub_class, l_run_val;
1143: hr_utility.trace('assignment_Action_id in load_er_tax ='||to_char(l_assignment_action_id));
1144: EXIT WHEN cv%NOTFOUND; */
1145:
1146: if p_fed_liab_bal_status = 'Y' and p_state_liab_bal_status = 'Y' and p_local_bal_status = 'Y' then
1147: open csr_er_tax_rbr;
1157: else
1158: fetch csr_er_tax into l_user_reporting_name, l_sub_class, l_run_val;
1159: EXIT WHEN csr_er_tax%NOTFOUND;
1160: end if;
1161: hr_utility.trace('assignment_Action_id in load_er_tax ='||to_char(l_assignment_action_id));
1162: /*-- Bug#4942114 ends -- */
1163:
1164:
1165: if l_asg_flag <> 'Y' THEN
1170: g_totals_table(l_temp_index).gre_name = l_gre_name and
1171: g_totals_table(l_temp_index).organization_name = l_org_name and
1172: g_totals_table(l_temp_index).location_name = l_location_code then
1173:
1174: hr_utility.trace('testing 1');
1175: g_totals_table(l_temp_index).value2 := g_totals_table(l_temp_index).value2 +
1176: to_number(l_run_val);
1177: l_status := 1;
1178: hr_utility.trace('for er tax...l_index ='||l_index);
1174: hr_utility.trace('testing 1');
1175: g_totals_table(l_temp_index).value2 := g_totals_table(l_temp_index).value2 +
1176: to_number(l_run_val);
1177: l_status := 1;
1178: hr_utility.trace('for er tax...l_index ='||l_index);
1179: hr_utility.trace('element name ='||l_user_reporting_name);
1180: hr_utility.trace('payroll action='||to_char(g_totals_table(l_index).tax_unit_id));
1181: hr_utility.trace('gre_name='||l_gre_name);
1182: hr_utility.trace('org name='||l_org_name);
1175: g_totals_table(l_temp_index).value2 := g_totals_table(l_temp_index).value2 +
1176: to_number(l_run_val);
1177: l_status := 1;
1178: hr_utility.trace('for er tax...l_index ='||l_index);
1179: hr_utility.trace('element name ='||l_user_reporting_name);
1180: hr_utility.trace('payroll action='||to_char(g_totals_table(l_index).tax_unit_id));
1181: hr_utility.trace('gre_name='||l_gre_name);
1182: hr_utility.trace('org name='||l_org_name);
1183: hr_utility.trace('location='||l_location_code);
1176: to_number(l_run_val);
1177: l_status := 1;
1178: hr_utility.trace('for er tax...l_index ='||l_index);
1179: hr_utility.trace('element name ='||l_user_reporting_name);
1180: hr_utility.trace('payroll action='||to_char(g_totals_table(l_index).tax_unit_id));
1181: hr_utility.trace('gre_name='||l_gre_name);
1182: hr_utility.trace('org name='||l_org_name);
1183: hr_utility.trace('location='||l_location_code);
1184: hr_utility.trace('Toal Cash value ='||to_char(g_totals_table(l_temp_index).value2));
1177: l_status := 1;
1178: hr_utility.trace('for er tax...l_index ='||l_index);
1179: hr_utility.trace('element name ='||l_user_reporting_name);
1180: hr_utility.trace('payroll action='||to_char(g_totals_table(l_index).tax_unit_id));
1181: hr_utility.trace('gre_name='||l_gre_name);
1182: hr_utility.trace('org name='||l_org_name);
1183: hr_utility.trace('location='||l_location_code);
1184: hr_utility.trace('Toal Cash value ='||to_char(g_totals_table(l_temp_index).value2));
1185: hr_utility.trace('Cash Value ='||l_run_val);
1178: hr_utility.trace('for er tax...l_index ='||l_index);
1179: hr_utility.trace('element name ='||l_user_reporting_name);
1180: hr_utility.trace('payroll action='||to_char(g_totals_table(l_index).tax_unit_id));
1181: hr_utility.trace('gre_name='||l_gre_name);
1182: hr_utility.trace('org name='||l_org_name);
1183: hr_utility.trace('location='||l_location_code);
1184: hr_utility.trace('Toal Cash value ='||to_char(g_totals_table(l_temp_index).value2));
1185: hr_utility.trace('Cash Value ='||l_run_val);
1186:
1179: hr_utility.trace('element name ='||l_user_reporting_name);
1180: hr_utility.trace('payroll action='||to_char(g_totals_table(l_index).tax_unit_id));
1181: hr_utility.trace('gre_name='||l_gre_name);
1182: hr_utility.trace('org name='||l_org_name);
1183: hr_utility.trace('location='||l_location_code);
1184: hr_utility.trace('Toal Cash value ='||to_char(g_totals_table(l_temp_index).value2));
1185: hr_utility.trace('Cash Value ='||l_run_val);
1186:
1187: end if;
1180: hr_utility.trace('payroll action='||to_char(g_totals_table(l_index).tax_unit_id));
1181: hr_utility.trace('gre_name='||l_gre_name);
1182: hr_utility.trace('org name='||l_org_name);
1183: hr_utility.trace('location='||l_location_code);
1184: hr_utility.trace('Toal Cash value ='||to_char(g_totals_table(l_temp_index).value2));
1185: hr_utility.trace('Cash Value ='||l_run_val);
1186:
1187: end if;
1188: end loop;
1181: hr_utility.trace('gre_name='||l_gre_name);
1182: hr_utility.trace('org name='||l_org_name);
1183: hr_utility.trace('location='||l_location_code);
1184: hr_utility.trace('Toal Cash value ='||to_char(g_totals_table(l_temp_index).value2));
1185: hr_utility.trace('Cash Value ='||l_run_val);
1186:
1187: end if;
1188: end loop;
1189: end if;
1187: end if;
1188: end loop;
1189: end if;
1190: if l_status <> 1 or l_index = 0 then
1191: hr_utility.trace('testing 6');
1192: l_index := l_index + 1;
1193: g_totals_table(l_index).gre_name := l_gre_name;
1194: g_totals_table(l_index).organization_name := l_org_name;
1195: g_totals_table(l_index).location_name := l_location_code;
1200: g_totals_table(l_index).value2 := to_number(l_run_val);
1201: g_totals_table(l_index).value3 := NULL;
1202: g_totals_table(l_index).attribute1 := 'ER-TAX';
1203: g_totals_table(l_index).attribute2 := '6';
1204: hr_utility.trace('for er tax...l_index ='||l_index);
1205: hr_utility.trace('element name ='||l_user_reporting_name);
1206: hr_utility.trace('payroll action='||to_char(l_payroll_action_id));
1207: hr_utility.trace('gre_name='||l_gre_name);
1208: hr_utility.trace('org name='||l_org_name);
1201: g_totals_table(l_index).value3 := NULL;
1202: g_totals_table(l_index).attribute1 := 'ER-TAX';
1203: g_totals_table(l_index).attribute2 := '6';
1204: hr_utility.trace('for er tax...l_index ='||l_index);
1205: hr_utility.trace('element name ='||l_user_reporting_name);
1206: hr_utility.trace('payroll action='||to_char(l_payroll_action_id));
1207: hr_utility.trace('gre_name='||l_gre_name);
1208: hr_utility.trace('org name='||l_org_name);
1209: hr_utility.trace('location='||l_location_code);
1202: g_totals_table(l_index).attribute1 := 'ER-TAX';
1203: g_totals_table(l_index).attribute2 := '6';
1204: hr_utility.trace('for er tax...l_index ='||l_index);
1205: hr_utility.trace('element name ='||l_user_reporting_name);
1206: hr_utility.trace('payroll action='||to_char(l_payroll_action_id));
1207: hr_utility.trace('gre_name='||l_gre_name);
1208: hr_utility.trace('org name='||l_org_name);
1209: hr_utility.trace('location='||l_location_code);
1210: hr_utility.trace('Cash Value ='||l_run_val);
1203: g_totals_table(l_index).attribute2 := '6';
1204: hr_utility.trace('for er tax...l_index ='||l_index);
1205: hr_utility.trace('element name ='||l_user_reporting_name);
1206: hr_utility.trace('payroll action='||to_char(l_payroll_action_id));
1207: hr_utility.trace('gre_name='||l_gre_name);
1208: hr_utility.trace('org name='||l_org_name);
1209: hr_utility.trace('location='||l_location_code);
1210: hr_utility.trace('Cash Value ='||l_run_val);
1211: end if;
1204: hr_utility.trace('for er tax...l_index ='||l_index);
1205: hr_utility.trace('element name ='||l_user_reporting_name);
1206: hr_utility.trace('payroll action='||to_char(l_payroll_action_id));
1207: hr_utility.trace('gre_name='||l_gre_name);
1208: hr_utility.trace('org name='||l_org_name);
1209: hr_utility.trace('location='||l_location_code);
1210: hr_utility.trace('Cash Value ='||l_run_val);
1211: end if;
1212: else
1205: hr_utility.trace('element name ='||l_user_reporting_name);
1206: hr_utility.trace('payroll action='||to_char(l_payroll_action_id));
1207: hr_utility.trace('gre_name='||l_gre_name);
1208: hr_utility.trace('org name='||l_org_name);
1209: hr_utility.trace('location='||l_location_code);
1210: hr_utility.trace('Cash Value ='||l_run_val);
1211: end if;
1212: else
1213: insert into pay_us_rpt_totals
1206: hr_utility.trace('payroll action='||to_char(l_payroll_action_id));
1207: hr_utility.trace('gre_name='||l_gre_name);
1208: hr_utility.trace('org name='||l_org_name);
1209: hr_utility.trace('location='||l_location_code);
1210: hr_utility.trace('Cash Value ='||l_run_val);
1211: end if;
1212: else
1213: insert into pay_us_rpt_totals
1214: ( tax_unit_id, gre_name, organization_name, location_name,
1243: close csr_er_tax;
1244: end if;
1245:
1246: /*-- Bug#4942114 ends -- */
1247: hr_utility.trace('Leaving load_er_tax');
1248: exception
1249: when others then
1250: hr_utility.trace('Error occurred load_er_tax ...' ||SQLERRM);
1251: raise;
1246: /*-- Bug#4942114 ends -- */
1247: hr_utility.trace('Leaving load_er_tax');
1248: exception
1249: when others then
1250: hr_utility.trace('Error occurred load_er_tax ...' ||SQLERRM);
1251: raise;
1252: end load_er_tax;
1253: --------------------------------------------------------------------------------
1254: /*-- Bug#4942114 starts -- */
1291: l_run_val number(20,2);
1292: l_status number :=0;
1293: BEGIN
1294: /*-- Bug#4942114 starts -- */
1295: /* hr_utility.trace('view names = '|| l_fed_view_name || l_state_view_name);
1296: OPEN cv FOR
1297: 'select user_reporting_name,run_val
1298: from '||l_fed_view_name||
1299: ' where assignment_action_id ='|| l_assignment_action_id||
1303: from '||l_state_view_name||
1304: ' where assignment_action_id ='||l_assignment_action_id||
1305: ' and ee_or_er_code = ''EE''
1306: and tax_type_code = ''STEIC''';
1307: hr_utility.trace('statement build success');
1308: loop
1309: fetch cv into l_user_reporting_name, l_run_val;
1310: exit when cv%notfound; */
1311:
1338:
1339: g_totals_table(l_temp_index).value2 := g_totals_table(l_temp_index).value2 -
1340: to_number(l_run_val);
1341: l_status := 1;
1342: hr_utility.trace('for er credit...l_index ='||l_index);
1343: hr_utility.trace('element name ='||l_user_reporting_name);
1344: hr_utility.trace('payroll action='||to_char(g_totals_table(l_index).tax_unit_id));
1345: hr_utility.trace('gre_name='||l_gre_name);
1346: hr_utility.trace('org name='||l_org_name);
1339: g_totals_table(l_temp_index).value2 := g_totals_table(l_temp_index).value2 -
1340: to_number(l_run_val);
1341: l_status := 1;
1342: hr_utility.trace('for er credit...l_index ='||l_index);
1343: hr_utility.trace('element name ='||l_user_reporting_name);
1344: hr_utility.trace('payroll action='||to_char(g_totals_table(l_index).tax_unit_id));
1345: hr_utility.trace('gre_name='||l_gre_name);
1346: hr_utility.trace('org name='||l_org_name);
1347: hr_utility.trace('location='||l_location_code);
1340: to_number(l_run_val);
1341: l_status := 1;
1342: hr_utility.trace('for er credit...l_index ='||l_index);
1343: hr_utility.trace('element name ='||l_user_reporting_name);
1344: hr_utility.trace('payroll action='||to_char(g_totals_table(l_index).tax_unit_id));
1345: hr_utility.trace('gre_name='||l_gre_name);
1346: hr_utility.trace('org name='||l_org_name);
1347: hr_utility.trace('location='||l_location_code);
1348: hr_utility.trace('Toal Cash value ='||to_char(g_totals_table(l_temp_index).value2));
1341: l_status := 1;
1342: hr_utility.trace('for er credit...l_index ='||l_index);
1343: hr_utility.trace('element name ='||l_user_reporting_name);
1344: hr_utility.trace('payroll action='||to_char(g_totals_table(l_index).tax_unit_id));
1345: hr_utility.trace('gre_name='||l_gre_name);
1346: hr_utility.trace('org name='||l_org_name);
1347: hr_utility.trace('location='||l_location_code);
1348: hr_utility.trace('Toal Cash value ='||to_char(g_totals_table(l_temp_index).value2));
1349: hr_utility.trace('Cash Value ='||l_run_val);
1342: hr_utility.trace('for er credit...l_index ='||l_index);
1343: hr_utility.trace('element name ='||l_user_reporting_name);
1344: hr_utility.trace('payroll action='||to_char(g_totals_table(l_index).tax_unit_id));
1345: hr_utility.trace('gre_name='||l_gre_name);
1346: hr_utility.trace('org name='||l_org_name);
1347: hr_utility.trace('location='||l_location_code);
1348: hr_utility.trace('Toal Cash value ='||to_char(g_totals_table(l_temp_index).value2));
1349: hr_utility.trace('Cash Value ='||l_run_val);
1350:
1343: hr_utility.trace('element name ='||l_user_reporting_name);
1344: hr_utility.trace('payroll action='||to_char(g_totals_table(l_index).tax_unit_id));
1345: hr_utility.trace('gre_name='||l_gre_name);
1346: hr_utility.trace('org name='||l_org_name);
1347: hr_utility.trace('location='||l_location_code);
1348: hr_utility.trace('Toal Cash value ='||to_char(g_totals_table(l_temp_index).value2));
1349: hr_utility.trace('Cash Value ='||l_run_val);
1350:
1351: end if;
1344: hr_utility.trace('payroll action='||to_char(g_totals_table(l_index).tax_unit_id));
1345: hr_utility.trace('gre_name='||l_gre_name);
1346: hr_utility.trace('org name='||l_org_name);
1347: hr_utility.trace('location='||l_location_code);
1348: hr_utility.trace('Toal Cash value ='||to_char(g_totals_table(l_temp_index).value2));
1349: hr_utility.trace('Cash Value ='||l_run_val);
1350:
1351: end if;
1352: end loop;
1345: hr_utility.trace('gre_name='||l_gre_name);
1346: hr_utility.trace('org name='||l_org_name);
1347: hr_utility.trace('location='||l_location_code);
1348: hr_utility.trace('Toal Cash value ='||to_char(g_totals_table(l_temp_index).value2));
1349: hr_utility.trace('Cash Value ='||l_run_val);
1350:
1351: end if;
1352: end loop;
1353: end if;
1351: end if;
1352: end loop;
1353: end if;
1354: if l_status <> 1 or l_index = 0 then
1355: hr_utility.trace('testing 6');
1356: l_index := l_index + 1;
1357: g_totals_table(l_index).gre_name := l_gre_name;
1358: g_totals_table(l_index).organization_name := l_org_name;
1359: g_totals_table(l_index).location_name := l_location_code;
1365: g_totals_table(l_index).value3 := NULL;
1366: g_totals_table(l_index).attribute1 := 'EE-CREDIT';
1367: g_totals_table(l_index).attribute2 := '3';
1368: end if;
1369: hr_utility.trace('for er credit...l_index ='||l_index);
1370: hr_utility.trace('element name ='||l_user_reporting_name);
1371: hr_utility.trace('payroll action='||to_char(l_payroll_action_id));
1372: hr_utility.trace('gre_name='||l_gre_name);
1373: hr_utility.trace('org name='||l_org_name);
1366: g_totals_table(l_index).attribute1 := 'EE-CREDIT';
1367: g_totals_table(l_index).attribute2 := '3';
1368: end if;
1369: hr_utility.trace('for er credit...l_index ='||l_index);
1370: hr_utility.trace('element name ='||l_user_reporting_name);
1371: hr_utility.trace('payroll action='||to_char(l_payroll_action_id));
1372: hr_utility.trace('gre_name='||l_gre_name);
1373: hr_utility.trace('org name='||l_org_name);
1374: hr_utility.trace('location='||l_location_code);
1367: g_totals_table(l_index).attribute2 := '3';
1368: end if;
1369: hr_utility.trace('for er credit...l_index ='||l_index);
1370: hr_utility.trace('element name ='||l_user_reporting_name);
1371: hr_utility.trace('payroll action='||to_char(l_payroll_action_id));
1372: hr_utility.trace('gre_name='||l_gre_name);
1373: hr_utility.trace('org name='||l_org_name);
1374: hr_utility.trace('location='||l_location_code);
1375: hr_utility.trace('Cash Value ='||l_run_val);
1368: end if;
1369: hr_utility.trace('for er credit...l_index ='||l_index);
1370: hr_utility.trace('element name ='||l_user_reporting_name);
1371: hr_utility.trace('payroll action='||to_char(l_payroll_action_id));
1372: hr_utility.trace('gre_name='||l_gre_name);
1373: hr_utility.trace('org name='||l_org_name);
1374: hr_utility.trace('location='||l_location_code);
1375: hr_utility.trace('Cash Value ='||l_run_val);
1376: else
1369: hr_utility.trace('for er credit...l_index ='||l_index);
1370: hr_utility.trace('element name ='||l_user_reporting_name);
1371: hr_utility.trace('payroll action='||to_char(l_payroll_action_id));
1372: hr_utility.trace('gre_name='||l_gre_name);
1373: hr_utility.trace('org name='||l_org_name);
1374: hr_utility.trace('location='||l_location_code);
1375: hr_utility.trace('Cash Value ='||l_run_val);
1376: else
1377: insert into pay_us_rpt_totals
1370: hr_utility.trace('element name ='||l_user_reporting_name);
1371: hr_utility.trace('payroll action='||to_char(l_payroll_action_id));
1372: hr_utility.trace('gre_name='||l_gre_name);
1373: hr_utility.trace('org name='||l_org_name);
1374: hr_utility.trace('location='||l_location_code);
1375: hr_utility.trace('Cash Value ='||l_run_val);
1376: else
1377: insert into pay_us_rpt_totals
1378: (tax_unit_id, gre_name, organization_name, location_name,
1371: hr_utility.trace('payroll action='||to_char(l_payroll_action_id));
1372: hr_utility.trace('gre_name='||l_gre_name);
1373: hr_utility.trace('org name='||l_org_name);
1374: hr_utility.trace('location='||l_location_code);
1375: hr_utility.trace('Cash Value ='||l_run_val);
1376: else
1377: insert into pay_us_rpt_totals
1378: (tax_unit_id, gre_name, organization_name, location_name,
1379: attribute1,
1410: end if;
1411: /*-- Bug#4942114 ends -- */
1412: exception
1413: when others then
1414: hr_utility.trace('Error occurred load_ee_credit ...' ||SQLERRM);
1415: raise;
1416: end load_ee_credit;
1417: ---------------------------------------------------------------------------------------------
1418: /*-- Bug#4942114 starts -- */
1458: l_jurisdiction_code varchar2(15); -- Bug 4443935
1459: l_tname varchar2(60);
1460: begin
1461:
1462: hr_utility.trace('Entered load_csr_er_credit');
1463:
1464: /*-- Bug#4942114 starts -- */
1465: /* if (instr(l_futa_from,'prb') > 0) then
1466: l_tname := 'prb';
1469: end if;
1470:
1471: -- ||l_tname||'.jurisdiction_code jurisdiction_code
1472:
1473: --hr_utility.trace('l_futa_where ='||l_futa_where);
1474: --hr_utility.trace('l_futa_from ='||l_futa_from);
1475: --hr_utility.trace('l_tname ='||l_tname);
1476: -- Bug 5409416 : Removed prr.jurisdiction_code with
1477: OPEN cv FOR
1470:
1471: -- ||l_tname||'.jurisdiction_code jurisdiction_code
1472:
1473: --hr_utility.trace('l_futa_where ='||l_futa_where);
1474: --hr_utility.trace('l_futa_from ='||l_futa_from);
1475: --hr_utility.trace('l_tname ='||l_tname);
1476: -- Bug 5409416 : Removed prr.jurisdiction_code with
1477: OPEN cv FOR
1478: ' select distinct'||'''ER Tax Credits'''||' classification_name ,'||'''FUTA CREDIT'''||' balance_name ,
1471: -- ||l_tname||'.jurisdiction_code jurisdiction_code
1472:
1473: --hr_utility.trace('l_futa_where ='||l_futa_where);
1474: --hr_utility.trace('l_futa_from ='||l_futa_from);
1475: --hr_utility.trace('l_tname ='||l_tname);
1476: -- Bug 5409416 : Removed prr.jurisdiction_code with
1477: OPEN cv FOR
1478: ' select distinct'||'''ER Tax Credits'''||' classification_name ,'||'''FUTA CREDIT'''||' balance_name ,
1479: pet.element_name element_name,'|| l_tname||'.jurisdiction_code jurisdiction_code
1482: ' where '''||l_effective_date||''' between pet.effective_start_date and pet.effective_end_date
1483: and pet.element_name ='||'''FUTA CREDIT'''||
1484: ' and '||l_futa_where;
1485:
1486: hr_utility.trace('statement build success');
1487: loop
1488: fetch cv into l_classification_name,
1489: l_balance_name,
1490: l_element_name,
1489: l_balance_name,
1490: l_element_name,
1491: l_jurisdiction_code;
1492:
1493: hr_utility.trace('assignment_Action_id in load_er_credit ='||to_char(l_assignment_action_id));
1494: hr_utility.trace('Number of ER CREDIT Records fetched = '||to_char(cv%ROWCOUNT));
1495: exit when cv%notfound; */
1496:
1497: if p_futa_status_count = 1 then
1490: l_element_name,
1491: l_jurisdiction_code;
1492:
1493: hr_utility.trace('assignment_Action_id in load_er_credit ='||to_char(l_assignment_action_id));
1494: hr_utility.trace('Number of ER CREDIT Records fetched = '||to_char(cv%ROWCOUNT));
1495: exit when cv%notfound; */
1496:
1497: if p_futa_status_count = 1 then
1498: open csr_er_credit_rbr;
1505: fetch csr_er_credit_rbr into l_classification_name,
1506: l_balance_name,
1507: l_element_name,
1508: l_jurisdiction_code;
1509: hr_utility.trace('assignment_Action_id in load_er_credit ='||to_char(l_assignment_action_id));
1510: hr_utility.trace('Number of ER CREDIT Records fetched = '||to_char(csr_er_credit_rbr%ROWCOUNT));
1511: exit when csr_er_credit_rbr%notfound;
1512: else
1513: fetch csr_er_credit into l_classification_name,
1506: l_balance_name,
1507: l_element_name,
1508: l_jurisdiction_code;
1509: hr_utility.trace('assignment_Action_id in load_er_credit ='||to_char(l_assignment_action_id));
1510: hr_utility.trace('Number of ER CREDIT Records fetched = '||to_char(csr_er_credit_rbr%ROWCOUNT));
1511: exit when csr_er_credit_rbr%notfound;
1512: else
1513: fetch csr_er_credit into l_classification_name,
1514: l_balance_name,
1513: fetch csr_er_credit into l_classification_name,
1514: l_balance_name,
1515: l_element_name,
1516: l_jurisdiction_code;
1517: hr_utility.trace('assignment_Action_id in load_er_credit ='||to_char(l_assignment_action_id));
1518: hr_utility.trace('Number of ER CREDIT Records fetched = '||to_char(csr_er_credit%ROWCOUNT));
1519: exit when csr_er_credit%notfound;
1520: end if;
1521:
1514: l_balance_name,
1515: l_element_name,
1516: l_jurisdiction_code;
1517: hr_utility.trace('assignment_Action_id in load_er_credit ='||to_char(l_assignment_action_id));
1518: hr_utility.trace('Number of ER CREDIT Records fetched = '||to_char(csr_er_credit%ROWCOUNT));
1519: exit when csr_er_credit%notfound;
1520: end if;
1521:
1522: /*-- Bug#4942114 ends -- */
1528: 'GRE',
1529: l_tax_unit_id,
1530: l_business_group_id,
1531: l_jurisdiction_code); -- 4443935
1532: hr_utility.trace('l_bal_value : '|| l_bal_value );
1533: if l_asg_flag <> 'Y' THEN
1534: if l_index <>0 then
1535: l_status :=0;
1536: for l_temp_index in g_totals_table.first..g_totals_table.last LOOP
1538: g_totals_table(l_temp_index).gre_name = l_gre_name and
1539: g_totals_table(l_temp_index).organization_name = l_org_name and
1540: g_totals_table(l_temp_index).location_name = l_location_code then
1541:
1542: hr_utility.trace('testing 1');
1543: g_totals_table(l_temp_index).value2 := g_totals_table(l_temp_index).value2 +
1544: to_number(l_bal_value);
1545: l_status := 1;
1546: hr_utility.trace('bulk elename ='|| l_element_name);
1542: hr_utility.trace('testing 1');
1543: g_totals_table(l_temp_index).value2 := g_totals_table(l_temp_index).value2 +
1544: to_number(l_bal_value);
1545: l_status := 1;
1546: hr_utility.trace('bulk elename ='|| l_element_name);
1547: hr_utility.trace('bulk cashval='|| l_bal_value);
1548: hr_utility.trace('bulk totalcashval='|| g_totals_table(l_temp_index).value2);
1549: end if;
1550: end loop;
1543: g_totals_table(l_temp_index).value2 := g_totals_table(l_temp_index).value2 +
1544: to_number(l_bal_value);
1545: l_status := 1;
1546: hr_utility.trace('bulk elename ='|| l_element_name);
1547: hr_utility.trace('bulk cashval='|| l_bal_value);
1548: hr_utility.trace('bulk totalcashval='|| g_totals_table(l_temp_index).value2);
1549: end if;
1550: end loop;
1551: end if;
1544: to_number(l_bal_value);
1545: l_status := 1;
1546: hr_utility.trace('bulk elename ='|| l_element_name);
1547: hr_utility.trace('bulk cashval='|| l_bal_value);
1548: hr_utility.trace('bulk totalcashval='|| g_totals_table(l_temp_index).value2);
1549: end if;
1550: end loop;
1551: end if;
1552: if l_status <> 1 or l_index = 0 then
1549: end if;
1550: end loop;
1551: end if;
1552: if l_status <> 1 or l_index = 0 then
1553: hr_utility.trace('testing 6');
1554: l_index := l_index + 1;
1555: g_totals_table(l_index).gre_name := l_gre_name;
1556: g_totals_table(l_index).organization_name := l_org_name;
1557: g_totals_table(l_index).location_name := l_location_code;
1563: g_totals_table(l_index).value3 := NULL;
1564: g_totals_table(l_index).attribute1 := 'ER-CREDIT';
1565: g_totals_table(l_index).attribute2 := '7';
1566: end if;
1567: hr_utility.trace('bulk elename ='|| l_element_name);
1568: hr_utility.trace('bulk cashval='|| l_bal_value);
1569: hr_utility.trace('gre name='||l_gre_name);
1570: hr_utility.trace('org name='||l_org_name);
1571: hr_utility.trace('loc name='||l_location_code);
1564: g_totals_table(l_index).attribute1 := 'ER-CREDIT';
1565: g_totals_table(l_index).attribute2 := '7';
1566: end if;
1567: hr_utility.trace('bulk elename ='|| l_element_name);
1568: hr_utility.trace('bulk cashval='|| l_bal_value);
1569: hr_utility.trace('gre name='||l_gre_name);
1570: hr_utility.trace('org name='||l_org_name);
1571: hr_utility.trace('loc name='||l_location_code);
1572: else
1565: g_totals_table(l_index).attribute2 := '7';
1566: end if;
1567: hr_utility.trace('bulk elename ='|| l_element_name);
1568: hr_utility.trace('bulk cashval='|| l_bal_value);
1569: hr_utility.trace('gre name='||l_gre_name);
1570: hr_utility.trace('org name='||l_org_name);
1571: hr_utility.trace('loc name='||l_location_code);
1572: else
1573: insert into pay_us_rpt_totals
1566: end if;
1567: hr_utility.trace('bulk elename ='|| l_element_name);
1568: hr_utility.trace('bulk cashval='|| l_bal_value);
1569: hr_utility.trace('gre name='||l_gre_name);
1570: hr_utility.trace('org name='||l_org_name);
1571: hr_utility.trace('loc name='||l_location_code);
1572: else
1573: insert into pay_us_rpt_totals
1574: (tax_unit_id, gre_name, organization_name, location_name,
1567: hr_utility.trace('bulk elename ='|| l_element_name);
1568: hr_utility.trace('bulk cashval='|| l_bal_value);
1569: hr_utility.trace('gre name='||l_gre_name);
1570: hr_utility.trace('org name='||l_org_name);
1571: hr_utility.trace('loc name='||l_location_code);
1572: else
1573: insert into pay_us_rpt_totals
1574: (tax_unit_id, gre_name, organization_name, location_name,
1575: attribute1,
1674: l_element_name PAY_ELEMENT_TYPES_F.ELEMENT_NAME%TYPE; --#Bug 13351417 Modified the declaration from varchar2(60) to pay_element_types_f.element_name%type
1675: l_run_val number(20,2);
1676: l_status number :=0;
1677: BEGIN
1678: hr_utility.trace('entered er_liab');
1679:
1680: /*-- Bug#4942114 starts -- */
1681: /*open cv FOR
1682: 'select distinct pec.classification_name classification_name,
1700: loop
1701: fetch cv into l_classification_name,
1702: l_balance_name,
1703: l_element_name;
1704: hr_utility.trace('assignment_Action_id in load_er_liab ='||to_char(l_assignment_action_id));
1705: hr_utility.trace('Number of ER LIAB Records fetched = '||to_char(cv%ROWCOUNT));
1706: exit when cv%notfound; */
1707:
1708: if p_er_liab_status = 'Y' then
1701: fetch cv into l_classification_name,
1702: l_balance_name,
1703: l_element_name;
1704: hr_utility.trace('assignment_Action_id in load_er_liab ='||to_char(l_assignment_action_id));
1705: hr_utility.trace('Number of ER LIAB Records fetched = '||to_char(cv%ROWCOUNT));
1706: exit when cv%notfound; */
1707:
1708: if p_er_liab_status = 'Y' then
1709: open csr_er_liab_rbr;
1716: if p_er_liab_status = 'Y' then
1717: fetch csr_er_liab_rbr into l_classification_name,
1718: l_balance_name,
1719: l_element_name;
1720: hr_utility.trace('assignment_Action_id in load_er_liab ='||to_char(l_assignment_action_id));
1721: hr_utility.trace('Number of ER LIAB Records fetched = '||to_char(csr_er_liab_rbr%ROWCOUNT));
1722: exit when csr_er_liab_rbr%notfound;
1723: else
1724: fetch csr_er_liab into l_classification_name,
1717: fetch csr_er_liab_rbr into l_classification_name,
1718: l_balance_name,
1719: l_element_name;
1720: hr_utility.trace('assignment_Action_id in load_er_liab ='||to_char(l_assignment_action_id));
1721: hr_utility.trace('Number of ER LIAB Records fetched = '||to_char(csr_er_liab_rbr%ROWCOUNT));
1722: exit when csr_er_liab_rbr%notfound;
1723: else
1724: fetch csr_er_liab into l_classification_name,
1725: l_balance_name,
1723: else
1724: fetch csr_er_liab into l_classification_name,
1725: l_balance_name,
1726: l_element_name;
1727: hr_utility.trace('assignment_Action_id in load_er_liab ='||to_char(l_assignment_action_id));
1728: hr_utility.trace('Number of ER LIAB Records fetched = '||to_char(csr_er_liab%ROWCOUNT));
1729: exit when csr_er_liab%notfound;
1730: end if;
1731: /*-- Bug#4942114 ends -- */
1724: fetch csr_er_liab into l_classification_name,
1725: l_balance_name,
1726: l_element_name;
1727: hr_utility.trace('assignment_Action_id in load_er_liab ='||to_char(l_assignment_action_id));
1728: hr_utility.trace('Number of ER LIAB Records fetched = '||to_char(csr_er_liab%ROWCOUNT));
1729: exit when csr_er_liab%notfound;
1730: end if;
1731: /*-- Bug#4942114 ends -- */
1732: l_bal_value := pay_us_taxbal_view_pkg.us_named_balance(upper(l_balance_name),
1746: g_totals_table(l_temp_index).gre_name = l_gre_name and
1747: g_totals_table(l_temp_index).organization_name = l_org_name and
1748: g_totals_table(l_temp_index).location_name = l_location_code then
1749:
1750: hr_utility.trace('testing 1');
1751: g_totals_table(l_temp_index).value2 := g_totals_table(l_temp_index).value2 +
1752: to_number(l_bal_value);
1753: l_status := 1;
1754: hr_utility.trace('for er liab...l_index ='||l_index);
1750: hr_utility.trace('testing 1');
1751: g_totals_table(l_temp_index).value2 := g_totals_table(l_temp_index).value2 +
1752: to_number(l_bal_value);
1753: l_status := 1;
1754: hr_utility.trace('for er liab...l_index ='||l_index);
1755: hr_utility.trace('element name ='||l_element_name);
1756: hr_utility.trace('payroll action='||to_char(g_totals_table(l_index).tax_unit_id));
1757: hr_utility.trace('gre_name='||l_gre_name);
1758: hr_utility.trace('org name='||l_org_name);
1751: g_totals_table(l_temp_index).value2 := g_totals_table(l_temp_index).value2 +
1752: to_number(l_bal_value);
1753: l_status := 1;
1754: hr_utility.trace('for er liab...l_index ='||l_index);
1755: hr_utility.trace('element name ='||l_element_name);
1756: hr_utility.trace('payroll action='||to_char(g_totals_table(l_index).tax_unit_id));
1757: hr_utility.trace('gre_name='||l_gre_name);
1758: hr_utility.trace('org name='||l_org_name);
1759: hr_utility.trace('location='||l_location_code);
1752: to_number(l_bal_value);
1753: l_status := 1;
1754: hr_utility.trace('for er liab...l_index ='||l_index);
1755: hr_utility.trace('element name ='||l_element_name);
1756: hr_utility.trace('payroll action='||to_char(g_totals_table(l_index).tax_unit_id));
1757: hr_utility.trace('gre_name='||l_gre_name);
1758: hr_utility.trace('org name='||l_org_name);
1759: hr_utility.trace('location='||l_location_code);
1760: hr_utility.trace('Toal Cash value ='||to_char(g_totals_table(l_temp_index).value2));
1753: l_status := 1;
1754: hr_utility.trace('for er liab...l_index ='||l_index);
1755: hr_utility.trace('element name ='||l_element_name);
1756: hr_utility.trace('payroll action='||to_char(g_totals_table(l_index).tax_unit_id));
1757: hr_utility.trace('gre_name='||l_gre_name);
1758: hr_utility.trace('org name='||l_org_name);
1759: hr_utility.trace('location='||l_location_code);
1760: hr_utility.trace('Toal Cash value ='||to_char(g_totals_table(l_temp_index).value2));
1761: hr_utility.trace('Cash Value ='||l_bal_value);
1754: hr_utility.trace('for er liab...l_index ='||l_index);
1755: hr_utility.trace('element name ='||l_element_name);
1756: hr_utility.trace('payroll action='||to_char(g_totals_table(l_index).tax_unit_id));
1757: hr_utility.trace('gre_name='||l_gre_name);
1758: hr_utility.trace('org name='||l_org_name);
1759: hr_utility.trace('location='||l_location_code);
1760: hr_utility.trace('Toal Cash value ='||to_char(g_totals_table(l_temp_index).value2));
1761: hr_utility.trace('Cash Value ='||l_bal_value);
1762: end if;
1755: hr_utility.trace('element name ='||l_element_name);
1756: hr_utility.trace('payroll action='||to_char(g_totals_table(l_index).tax_unit_id));
1757: hr_utility.trace('gre_name='||l_gre_name);
1758: hr_utility.trace('org name='||l_org_name);
1759: hr_utility.trace('location='||l_location_code);
1760: hr_utility.trace('Toal Cash value ='||to_char(g_totals_table(l_temp_index).value2));
1761: hr_utility.trace('Cash Value ='||l_bal_value);
1762: end if;
1763: end loop;
1756: hr_utility.trace('payroll action='||to_char(g_totals_table(l_index).tax_unit_id));
1757: hr_utility.trace('gre_name='||l_gre_name);
1758: hr_utility.trace('org name='||l_org_name);
1759: hr_utility.trace('location='||l_location_code);
1760: hr_utility.trace('Toal Cash value ='||to_char(g_totals_table(l_temp_index).value2));
1761: hr_utility.trace('Cash Value ='||l_bal_value);
1762: end if;
1763: end loop;
1764: end if;
1757: hr_utility.trace('gre_name='||l_gre_name);
1758: hr_utility.trace('org name='||l_org_name);
1759: hr_utility.trace('location='||l_location_code);
1760: hr_utility.trace('Toal Cash value ='||to_char(g_totals_table(l_temp_index).value2));
1761: hr_utility.trace('Cash Value ='||l_bal_value);
1762: end if;
1763: end loop;
1764: end if;
1765: if l_status <> 1 or l_index = 0 then
1762: end if;
1763: end loop;
1764: end if;
1765: if l_status <> 1 or l_index = 0 then
1766: hr_utility.trace('testing 6');
1767: l_index := l_index + 1;
1768: g_totals_table(l_index).gre_name := l_gre_name;
1769: g_totals_table(l_index).organization_name := l_org_name;
1770: g_totals_table(l_index).location_name := l_location_code;
1776: g_totals_table(l_index).value3 := NULL;
1777: g_totals_table(l_index).attribute1 := 'ER-LIAB';
1778: g_totals_table(l_index).attribute2 := '5';
1779: end if;
1780: hr_utility.trace('for er liab...l_index ='||l_index);
1781: hr_utility.trace('element name ='||l_element_name);
1782: hr_utility.trace('payroll action='||to_char(g_totals_table(l_index).tax_unit_id));
1783: hr_utility.trace('gre_name='||l_gre_name);
1784: hr_utility.trace('org name='||l_org_name);
1777: g_totals_table(l_index).attribute1 := 'ER-LIAB';
1778: g_totals_table(l_index).attribute2 := '5';
1779: end if;
1780: hr_utility.trace('for er liab...l_index ='||l_index);
1781: hr_utility.trace('element name ='||l_element_name);
1782: hr_utility.trace('payroll action='||to_char(g_totals_table(l_index).tax_unit_id));
1783: hr_utility.trace('gre_name='||l_gre_name);
1784: hr_utility.trace('org name='||l_org_name);
1785: hr_utility.trace('location='||l_location_code);
1778: g_totals_table(l_index).attribute2 := '5';
1779: end if;
1780: hr_utility.trace('for er liab...l_index ='||l_index);
1781: hr_utility.trace('element name ='||l_element_name);
1782: hr_utility.trace('payroll action='||to_char(g_totals_table(l_index).tax_unit_id));
1783: hr_utility.trace('gre_name='||l_gre_name);
1784: hr_utility.trace('org name='||l_org_name);
1785: hr_utility.trace('location='||l_location_code);
1786: hr_utility.trace('Cash Value ='||l_bal_value);
1779: end if;
1780: hr_utility.trace('for er liab...l_index ='||l_index);
1781: hr_utility.trace('element name ='||l_element_name);
1782: hr_utility.trace('payroll action='||to_char(g_totals_table(l_index).tax_unit_id));
1783: hr_utility.trace('gre_name='||l_gre_name);
1784: hr_utility.trace('org name='||l_org_name);
1785: hr_utility.trace('location='||l_location_code);
1786: hr_utility.trace('Cash Value ='||l_bal_value);
1787: else
1780: hr_utility.trace('for er liab...l_index ='||l_index);
1781: hr_utility.trace('element name ='||l_element_name);
1782: hr_utility.trace('payroll action='||to_char(g_totals_table(l_index).tax_unit_id));
1783: hr_utility.trace('gre_name='||l_gre_name);
1784: hr_utility.trace('org name='||l_org_name);
1785: hr_utility.trace('location='||l_location_code);
1786: hr_utility.trace('Cash Value ='||l_bal_value);
1787: else
1788: insert into pay_us_rpt_totals
1781: hr_utility.trace('element name ='||l_element_name);
1782: hr_utility.trace('payroll action='||to_char(g_totals_table(l_index).tax_unit_id));
1783: hr_utility.trace('gre_name='||l_gre_name);
1784: hr_utility.trace('org name='||l_org_name);
1785: hr_utility.trace('location='||l_location_code);
1786: hr_utility.trace('Cash Value ='||l_bal_value);
1787: else
1788: insert into pay_us_rpt_totals
1789: (tax_unit_id, gre_name, organization_name, location_name,
1782: hr_utility.trace('payroll action='||to_char(g_totals_table(l_index).tax_unit_id));
1783: hr_utility.trace('gre_name='||l_gre_name);
1784: hr_utility.trace('org name='||l_org_name);
1785: hr_utility.trace('location='||l_location_code);
1786: hr_utility.trace('Cash Value ='||l_bal_value);
1787: else
1788: insert into pay_us_rpt_totals
1789: (tax_unit_id, gre_name, organization_name, location_name,
1790: attribute1,
1819: end if;
1820: /*-- Bug#4942114 ends -- */
1821: exception
1822: when others then
1823: hr_utility.trace('Error occurred load_er_liab ...' ||SQLERRM);
1824: raise;
1825: end load_er_liab;
1826:
1827:
1918:
1919: open ppp_action ;
1920: loop
1921: fetch ppp_action into l_ppp_pre_payment_id;
1922: hr_utility.trace('Number of PPP_ACTION Records fetched = '||to_char(ppp_action%ROWCOUNT));
1923: exit when ppp_action%notfound;
1924: /* ppp_action found */
1925:
1926: open chk_ppp(l_ppp_pre_payment_id);
1924: /* ppp_action found */
1925:
1926: open chk_ppp(l_ppp_pre_payment_id);
1927: fetch chk_ppp into l_found;
1928: hr_utility.trace('Number of CHK_PPP Records fetched = '||to_char(chk_ppp%ROWCOUNT));
1929: if chk_ppp%notfound then
1930:
1931: open nacha_details;
1932: fetch nacha_details into l_payment_method_name, l_account_type,
2039: close ppp_action;
2040:
2041: exception
2042: when others then
2043: hr_utility.trace('Error occurred load_mesg_line ...' ||SQLERRM);
2044: raise;
2045: end load_mesg_line;
2046:
2047:
2099:
2100: l_pmt_name varchar2(60);
2101: l_pmt_value number(20,2);
2102: begin
2103: hr_utility.trace('Payroll_id = '||to_char(t_payroll_id));
2104: hr_utility.trace('CONC_id = '||to_char(t_consolidation_set_id));
2105: hr_utility.trace('GRE_id = '||to_char(t_gre_id));
2106: hr_utility.trace('Start DT = '||to_char(l_leg_start_date));
2107: hr_utility.trace('END DT = '||to_char(l_leg_end_date));
2100: l_pmt_name varchar2(60);
2101: l_pmt_value number(20,2);
2102: begin
2103: hr_utility.trace('Payroll_id = '||to_char(t_payroll_id));
2104: hr_utility.trace('CONC_id = '||to_char(t_consolidation_set_id));
2105: hr_utility.trace('GRE_id = '||to_char(t_gre_id));
2106: hr_utility.trace('Start DT = '||to_char(l_leg_start_date));
2107: hr_utility.trace('END DT = '||to_char(l_leg_end_date));
2108:
2101: l_pmt_value number(20,2);
2102: begin
2103: hr_utility.trace('Payroll_id = '||to_char(t_payroll_id));
2104: hr_utility.trace('CONC_id = '||to_char(t_consolidation_set_id));
2105: hr_utility.trace('GRE_id = '||to_char(t_gre_id));
2106: hr_utility.trace('Start DT = '||to_char(l_leg_start_date));
2107: hr_utility.trace('END DT = '||to_char(l_leg_end_date));
2108:
2109: -- Determine is this assignment_action is the max action sequence.
2102: begin
2103: hr_utility.trace('Payroll_id = '||to_char(t_payroll_id));
2104: hr_utility.trace('CONC_id = '||to_char(t_consolidation_set_id));
2105: hr_utility.trace('GRE_id = '||to_char(t_gre_id));
2106: hr_utility.trace('Start DT = '||to_char(l_leg_start_date));
2107: hr_utility.trace('END DT = '||to_char(l_leg_end_date));
2108:
2109: -- Determine is this assignment_action is the max action sequence.
2110:
2103: hr_utility.trace('Payroll_id = '||to_char(t_payroll_id));
2104: hr_utility.trace('CONC_id = '||to_char(t_consolidation_set_id));
2105: hr_utility.trace('GRE_id = '||to_char(t_gre_id));
2106: hr_utility.trace('Start DT = '||to_char(l_leg_start_date));
2107: hr_utility.trace('END DT = '||to_char(l_leg_end_date));
2108:
2109: -- Determine is this assignment_action is the max action sequence.
2110:
2111: select paa_outer.assignment_action_id
2142: fetch prepay into l_pre_pay_aaid,
2143: l_pmt_name,
2144: l_pmt_value,
2145: l_pre_pay_id;
2146: hr_utility.trace('Number of prepay Records fetched = '||to_char(prepay%ROWCOUNT));
2147: exit when prepay%notfound;
2148:
2149: BEGIN
2150:
2188:
2189: END IF;
2190: exception
2191: when others then
2192: hr_utility.trace('Error occurred load_prepay ...' ||SQLERRM);
2193: raise;
2194: end load_prepay;
2195:
2196:
2200:
2201: l_reverse_amt number(12,2);
2202:
2203: begin
2204: hr_utility.trace('Entered Reversals...');
2205: pay_balance_pkg.set_context('TAX_UNIT_ID',l_tax_unit_id);
2206: l_reverse_amt := nvl(pay_balance_pkg.get_value(
2207: p_defined_balance_id => l_defined_balance_id,
2208: p_assignment_action_id => l_assignment_action_id),0);
2224: '1',
2225: 'Reversals',
2226: 'Reversals',
2227: l_reverse_amt, l_assignment_action_id);
2228: hr_utility.trace('Exited Reversals...');
2229: exception
2230: when others then
2231: hr_utility.trace('Error occurred load_reversals ...' ||SQLERRM);
2232: raise;
2227: l_reverse_amt, l_assignment_action_id);
2228: hr_utility.trace('Exited Reversals...');
2229: exception
2230: when others then
2231: hr_utility.trace('Error occurred load_reversals ...' ||SQLERRM);
2232: raise;
2233: end load_reversals;
2234:
2235: -------------------------------------------------------------------------------------------
2338: l_run_val number(20,2);
2339: l_state_name varchar2(60);
2340: l_status number;
2341: BEGIN
2342: hr_utility.trace('entered load_wc_er_liab');
2343:
2344: /*-- Bug#4942114 starts -- */
2345: /* hr_utility.trace('l_wc_er_liab_where ='|| l_wc_er_liab_where);
2346: OPEN cv FOR
2341: BEGIN
2342: hr_utility.trace('entered load_wc_er_liab');
2343:
2344: /*-- Bug#4942114 starts -- */
2345: /* hr_utility.trace('l_wc_er_liab_where ='|| l_wc_er_liab_where);
2346: OPEN cv FOR
2347: 'select pec.classification_name classification_name,
2348: pbt.balance_name balance_name,
2349: pet.element_name element_name,
2382: l_balance_name,
2383: l_element_name,
2384: l_jurisdiction_code,
2385: l_state_name ;
2386: hr_utility.trace('Number of WC ER LIAB Records fetched = '||to_char(cv%ROWCOUNT));
2387: exit when cv%notfound; */
2388:
2389: if p_wc_er_liab_status_count = 3 then
2390: open csr_wc_er_liab_rbr;
2399: l_balance_name,
2400: l_element_name,
2401: l_jurisdiction_code,
2402: l_state_name ;
2403: hr_utility.trace('Number of WC ER LIAB Records fetched = '||to_char(csr_wc_er_liab_rbr%ROWCOUNT));
2404: exit when csr_wc_er_liab_rbr%notfound;
2405: else
2406: fetch csr_wc_er_liab into l_classification_name,
2407: l_balance_name,
2407: l_balance_name,
2408: l_element_name,
2409: l_jurisdiction_code,
2410: l_state_name ;
2411: hr_utility.trace('Number of WC ER LIAB Records fetched = '||to_char(csr_wc_er_liab%ROWCOUNT));
2412: exit when csr_wc_er_liab%notfound;
2413:
2414: end if;
2415:
2432: g_totals_table(l_temp_index).gre_name = l_gre_name and
2433: g_totals_table(l_temp_index).organization_name = l_org_name and
2434: g_totals_table(l_temp_index).location_name = l_location_code then
2435:
2436: hr_utility.trace('testing 1');
2437: g_totals_table(l_temp_index).value2 := g_totals_table(l_temp_index).value2 +
2438: to_number(l_bal_value);
2439: l_status := 1;
2440: hr_utility.trace('for wc er liab...l_index ='||l_index);
2436: hr_utility.trace('testing 1');
2437: g_totals_table(l_temp_index).value2 := g_totals_table(l_temp_index).value2 +
2438: to_number(l_bal_value);
2439: l_status := 1;
2440: hr_utility.trace('for wc er liab...l_index ='||l_index);
2441: hr_utility.trace('element name ='||l_element_name||' '||l_state_name);
2442: hr_utility.trace('payroll action='||to_char(g_totals_table(l_index).tax_unit_id));
2443: hr_utility.trace('gre_name='||l_gre_name);
2444: hr_utility.trace('org name='||l_org_name);
2437: g_totals_table(l_temp_index).value2 := g_totals_table(l_temp_index).value2 +
2438: to_number(l_bal_value);
2439: l_status := 1;
2440: hr_utility.trace('for wc er liab...l_index ='||l_index);
2441: hr_utility.trace('element name ='||l_element_name||' '||l_state_name);
2442: hr_utility.trace('payroll action='||to_char(g_totals_table(l_index).tax_unit_id));
2443: hr_utility.trace('gre_name='||l_gre_name);
2444: hr_utility.trace('org name='||l_org_name);
2445: hr_utility.trace('location='||l_location_code);
2438: to_number(l_bal_value);
2439: l_status := 1;
2440: hr_utility.trace('for wc er liab...l_index ='||l_index);
2441: hr_utility.trace('element name ='||l_element_name||' '||l_state_name);
2442: hr_utility.trace('payroll action='||to_char(g_totals_table(l_index).tax_unit_id));
2443: hr_utility.trace('gre_name='||l_gre_name);
2444: hr_utility.trace('org name='||l_org_name);
2445: hr_utility.trace('location='||l_location_code);
2446: hr_utility.trace('Toal Cash value ='||to_char(g_totals_table(l_temp_index).value2));
2439: l_status := 1;
2440: hr_utility.trace('for wc er liab...l_index ='||l_index);
2441: hr_utility.trace('element name ='||l_element_name||' '||l_state_name);
2442: hr_utility.trace('payroll action='||to_char(g_totals_table(l_index).tax_unit_id));
2443: hr_utility.trace('gre_name='||l_gre_name);
2444: hr_utility.trace('org name='||l_org_name);
2445: hr_utility.trace('location='||l_location_code);
2446: hr_utility.trace('Toal Cash value ='||to_char(g_totals_table(l_temp_index).value2));
2447: hr_utility.trace('Cash Value ='||l_bal_value);
2440: hr_utility.trace('for wc er liab...l_index ='||l_index);
2441: hr_utility.trace('element name ='||l_element_name||' '||l_state_name);
2442: hr_utility.trace('payroll action='||to_char(g_totals_table(l_index).tax_unit_id));
2443: hr_utility.trace('gre_name='||l_gre_name);
2444: hr_utility.trace('org name='||l_org_name);
2445: hr_utility.trace('location='||l_location_code);
2446: hr_utility.trace('Toal Cash value ='||to_char(g_totals_table(l_temp_index).value2));
2447: hr_utility.trace('Cash Value ='||l_bal_value);
2448: end if;
2441: hr_utility.trace('element name ='||l_element_name||' '||l_state_name);
2442: hr_utility.trace('payroll action='||to_char(g_totals_table(l_index).tax_unit_id));
2443: hr_utility.trace('gre_name='||l_gre_name);
2444: hr_utility.trace('org name='||l_org_name);
2445: hr_utility.trace('location='||l_location_code);
2446: hr_utility.trace('Toal Cash value ='||to_char(g_totals_table(l_temp_index).value2));
2447: hr_utility.trace('Cash Value ='||l_bal_value);
2448: end if;
2449: end loop;
2442: hr_utility.trace('payroll action='||to_char(g_totals_table(l_index).tax_unit_id));
2443: hr_utility.trace('gre_name='||l_gre_name);
2444: hr_utility.trace('org name='||l_org_name);
2445: hr_utility.trace('location='||l_location_code);
2446: hr_utility.trace('Toal Cash value ='||to_char(g_totals_table(l_temp_index).value2));
2447: hr_utility.trace('Cash Value ='||l_bal_value);
2448: end if;
2449: end loop;
2450: end if;
2443: hr_utility.trace('gre_name='||l_gre_name);
2444: hr_utility.trace('org name='||l_org_name);
2445: hr_utility.trace('location='||l_location_code);
2446: hr_utility.trace('Toal Cash value ='||to_char(g_totals_table(l_temp_index).value2));
2447: hr_utility.trace('Cash Value ='||l_bal_value);
2448: end if;
2449: end loop;
2450: end if;
2451: if l_status <> 1 or l_index = 0 then
2448: end if;
2449: end loop;
2450: end if;
2451: if l_status <> 1 or l_index = 0 then
2452: hr_utility.trace('testing 6');
2453: l_index := l_index + 1;
2454: g_totals_table(l_index).gre_name := l_gre_name;
2455: g_totals_table(l_index).organization_name := l_org_name;
2456: g_totals_table(l_index).location_name := l_location_code;
2462: g_totals_table(l_index).value3 := NULL;
2463: g_totals_table(l_index).attribute1 := 'ER-TAX';
2464: g_totals_table(l_index).attribute2 := '6';
2465: end if;
2466: hr_utility.trace('for wc er liab...l_index ='||l_index);
2467: hr_utility.trace('element name ='||l_element_name||' '||l_state_name);
2468: hr_utility.trace('payroll action='||to_char(g_totals_table(l_index).tax_unit_id));
2469: hr_utility.trace('gre_name='||l_gre_name);
2470: hr_utility.trace('org name='||l_org_name);
2463: g_totals_table(l_index).attribute1 := 'ER-TAX';
2464: g_totals_table(l_index).attribute2 := '6';
2465: end if;
2466: hr_utility.trace('for wc er liab...l_index ='||l_index);
2467: hr_utility.trace('element name ='||l_element_name||' '||l_state_name);
2468: hr_utility.trace('payroll action='||to_char(g_totals_table(l_index).tax_unit_id));
2469: hr_utility.trace('gre_name='||l_gre_name);
2470: hr_utility.trace('org name='||l_org_name);
2471: hr_utility.trace('location='||l_location_code);
2464: g_totals_table(l_index).attribute2 := '6';
2465: end if;
2466: hr_utility.trace('for wc er liab...l_index ='||l_index);
2467: hr_utility.trace('element name ='||l_element_name||' '||l_state_name);
2468: hr_utility.trace('payroll action='||to_char(g_totals_table(l_index).tax_unit_id));
2469: hr_utility.trace('gre_name='||l_gre_name);
2470: hr_utility.trace('org name='||l_org_name);
2471: hr_utility.trace('location='||l_location_code);
2472: hr_utility.trace('Cash Value ='||l_bal_value);
2465: end if;
2466: hr_utility.trace('for wc er liab...l_index ='||l_index);
2467: hr_utility.trace('element name ='||l_element_name||' '||l_state_name);
2468: hr_utility.trace('payroll action='||to_char(g_totals_table(l_index).tax_unit_id));
2469: hr_utility.trace('gre_name='||l_gre_name);
2470: hr_utility.trace('org name='||l_org_name);
2471: hr_utility.trace('location='||l_location_code);
2472: hr_utility.trace('Cash Value ='||l_bal_value);
2473: else
2466: hr_utility.trace('for wc er liab...l_index ='||l_index);
2467: hr_utility.trace('element name ='||l_element_name||' '||l_state_name);
2468: hr_utility.trace('payroll action='||to_char(g_totals_table(l_index).tax_unit_id));
2469: hr_utility.trace('gre_name='||l_gre_name);
2470: hr_utility.trace('org name='||l_org_name);
2471: hr_utility.trace('location='||l_location_code);
2472: hr_utility.trace('Cash Value ='||l_bal_value);
2473: else
2474: insert into pay_us_rpt_totals
2467: hr_utility.trace('element name ='||l_element_name||' '||l_state_name);
2468: hr_utility.trace('payroll action='||to_char(g_totals_table(l_index).tax_unit_id));
2469: hr_utility.trace('gre_name='||l_gre_name);
2470: hr_utility.trace('org name='||l_org_name);
2471: hr_utility.trace('location='||l_location_code);
2472: hr_utility.trace('Cash Value ='||l_bal_value);
2473: else
2474: insert into pay_us_rpt_totals
2475: (tax_unit_id, gre_name, organization_name, location_name,
2468: hr_utility.trace('payroll action='||to_char(g_totals_table(l_index).tax_unit_id));
2469: hr_utility.trace('gre_name='||l_gre_name);
2470: hr_utility.trace('org name='||l_org_name);
2471: hr_utility.trace('location='||l_location_code);
2472: hr_utility.trace('Cash Value ='||l_bal_value);
2473: else
2474: insert into pay_us_rpt_totals
2475: (tax_unit_id, gre_name, organization_name, location_name,
2476: attribute1,
2505: end if;
2506: /*-- Bug#4942114 ends -- */
2507: exception
2508: when others then
2509: hr_utility.trace('Error occurred load_wc_er_liab ...' ||SQLERRM);
2510: raise;
2511: end load_wc_er_liab;
2512: -----------------------------------------------------------------------------------
2513: procedure load_data
2584: l_er_liab_from varchar2(2000);
2585: l_wc_er_liab_where varchar2(2000);
2586: l_wc_er_liab_from varchar2(2000);
2587: begin
2588: -- hr_utility.trace_on('Y','GTN');
2589: l_row_count := 0;
2590: hr_utility.trace('PACTID = '||pactid);
2591: hr_utility.trace('CHNKNO = '||to_char(chnkno));
2592: hr_utility.trace('PPA_FINDER = '||ppa_finder);
2586: l_wc_er_liab_from varchar2(2000);
2587: begin
2588: -- hr_utility.trace_on('Y','GTN');
2589: l_row_count := 0;
2590: hr_utility.trace('PACTID = '||pactid);
2591: hr_utility.trace('CHNKNO = '||to_char(chnkno));
2592: hr_utility.trace('PPA_FINDER = '||ppa_finder);
2593: begin
2594: select ppa.legislative_parameters,
2587: begin
2588: -- hr_utility.trace_on('Y','GTN');
2589: l_row_count := 0;
2590: hr_utility.trace('PACTID = '||pactid);
2591: hr_utility.trace('CHNKNO = '||to_char(chnkno));
2592: hr_utility.trace('PPA_FINDER = '||ppa_finder);
2593: begin
2594: select ppa.legislative_parameters,
2595: ppa.business_group_id,
2588: -- hr_utility.trace_on('Y','GTN');
2589: l_row_count := 0;
2590: hr_utility.trace('PACTID = '||pactid);
2591: hr_utility.trace('CHNKNO = '||to_char(chnkno));
2592: hr_utility.trace('PPA_FINDER = '||ppa_finder);
2593: begin
2594: select ppa.legislative_parameters,
2595: ppa.business_group_id,
2596: ppa.start_date,
2609: t_payroll_action_id
2610: from pay_payroll_actions ppa
2611: where ppa.payroll_action_id = pactid;
2612: exception when no_data_found then
2613: hr_utility.trace('Legislative Details not found...');
2614: raise;
2615: end;
2616:
2617: begin
2623: and ue.user_entity_id = di.user_entity_id
2624: and ue.creator_type = 'B'
2625: and nvl(ue.legislation_code,'US') = 'US';
2626: exception when others then
2627: hr_utility.trace('Error getting defined balance id');
2628: raise;
2629: end;
2630:
2631: -- #3270485: moved to range_cursor procedure.
2688: l_location_code,
2689: l_assignment_number,
2690: l_person_id;
2691:
2692: hr_utility.trace('Number of Records fetched = '||to_char(sel_aaid%ROWCOUNT));
2693: exit when sel_aaid%notfound;
2694:
2695: hr_utility.trace('Chunk No = '||to_char(chnkno));
2696: hr_utility.trace('Start Date = '||to_char(l_start_date));
2691:
2692: hr_utility.trace('Number of Records fetched = '||to_char(sel_aaid%ROWCOUNT));
2693: exit when sel_aaid%notfound;
2694:
2695: hr_utility.trace('Chunk No = '||to_char(chnkno));
2696: hr_utility.trace('Start Date = '||to_char(l_start_date));
2697: hr_utility.trace('End Date = '||to_char(l_end_date));
2698: hr_utility.trace('BG ID = '||to_char(l_business_group_id));
2699: hr_utility.trace('Payroll Action ID = '||to_char(l_payroll_action_id));
2692: hr_utility.trace('Number of Records fetched = '||to_char(sel_aaid%ROWCOUNT));
2693: exit when sel_aaid%notfound;
2694:
2695: hr_utility.trace('Chunk No = '||to_char(chnkno));
2696: hr_utility.trace('Start Date = '||to_char(l_start_date));
2697: hr_utility.trace('End Date = '||to_char(l_end_date));
2698: hr_utility.trace('BG ID = '||to_char(l_business_group_id));
2699: hr_utility.trace('Payroll Action ID = '||to_char(l_payroll_action_id));
2700: hr_utility.trace('Effective Date = '||to_char(l_effective_date));
2693: exit when sel_aaid%notfound;
2694:
2695: hr_utility.trace('Chunk No = '||to_char(chnkno));
2696: hr_utility.trace('Start Date = '||to_char(l_start_date));
2697: hr_utility.trace('End Date = '||to_char(l_end_date));
2698: hr_utility.trace('BG ID = '||to_char(l_business_group_id));
2699: hr_utility.trace('Payroll Action ID = '||to_char(l_payroll_action_id));
2700: hr_utility.trace('Effective Date = '||to_char(l_effective_date));
2701: hr_utility.trace('Action Type = '||l_action_type);
2694:
2695: hr_utility.trace('Chunk No = '||to_char(chnkno));
2696: hr_utility.trace('Start Date = '||to_char(l_start_date));
2697: hr_utility.trace('End Date = '||to_char(l_end_date));
2698: hr_utility.trace('BG ID = '||to_char(l_business_group_id));
2699: hr_utility.trace('Payroll Action ID = '||to_char(l_payroll_action_id));
2700: hr_utility.trace('Effective Date = '||to_char(l_effective_date));
2701: hr_utility.trace('Action Type = '||l_action_type);
2702: hr_utility.trace('Asg Act ID = '||to_char(l_assignment_action_id));
2695: hr_utility.trace('Chunk No = '||to_char(chnkno));
2696: hr_utility.trace('Start Date = '||to_char(l_start_date));
2697: hr_utility.trace('End Date = '||to_char(l_end_date));
2698: hr_utility.trace('BG ID = '||to_char(l_business_group_id));
2699: hr_utility.trace('Payroll Action ID = '||to_char(l_payroll_action_id));
2700: hr_utility.trace('Effective Date = '||to_char(l_effective_date));
2701: hr_utility.trace('Action Type = '||l_action_type);
2702: hr_utility.trace('Asg Act ID = '||to_char(l_assignment_action_id));
2703: hr_utility.trace('Asg ID = '||to_char(l_assignment_id));
2696: hr_utility.trace('Start Date = '||to_char(l_start_date));
2697: hr_utility.trace('End Date = '||to_char(l_end_date));
2698: hr_utility.trace('BG ID = '||to_char(l_business_group_id));
2699: hr_utility.trace('Payroll Action ID = '||to_char(l_payroll_action_id));
2700: hr_utility.trace('Effective Date = '||to_char(l_effective_date));
2701: hr_utility.trace('Action Type = '||l_action_type);
2702: hr_utility.trace('Asg Act ID = '||to_char(l_assignment_action_id));
2703: hr_utility.trace('Asg ID = '||to_char(l_assignment_id));
2704: hr_utility.trace('Tax Unit ID = '||to_char(l_tax_unit_id));
2697: hr_utility.trace('End Date = '||to_char(l_end_date));
2698: hr_utility.trace('BG ID = '||to_char(l_business_group_id));
2699: hr_utility.trace('Payroll Action ID = '||to_char(l_payroll_action_id));
2700: hr_utility.trace('Effective Date = '||to_char(l_effective_date));
2701: hr_utility.trace('Action Type = '||l_action_type);
2702: hr_utility.trace('Asg Act ID = '||to_char(l_assignment_action_id));
2703: hr_utility.trace('Asg ID = '||to_char(l_assignment_id));
2704: hr_utility.trace('Tax Unit ID = '||to_char(l_tax_unit_id));
2705: hr_utility.trace('GRE Name = '||l_gre_name);
2698: hr_utility.trace('BG ID = '||to_char(l_business_group_id));
2699: hr_utility.trace('Payroll Action ID = '||to_char(l_payroll_action_id));
2700: hr_utility.trace('Effective Date = '||to_char(l_effective_date));
2701: hr_utility.trace('Action Type = '||l_action_type);
2702: hr_utility.trace('Asg Act ID = '||to_char(l_assignment_action_id));
2703: hr_utility.trace('Asg ID = '||to_char(l_assignment_id));
2704: hr_utility.trace('Tax Unit ID = '||to_char(l_tax_unit_id));
2705: hr_utility.trace('GRE Name = '||l_gre_name);
2706: hr_utility.trace('ORG ID = '||to_char(l_organization_id));
2699: hr_utility.trace('Payroll Action ID = '||to_char(l_payroll_action_id));
2700: hr_utility.trace('Effective Date = '||to_char(l_effective_date));
2701: hr_utility.trace('Action Type = '||l_action_type);
2702: hr_utility.trace('Asg Act ID = '||to_char(l_assignment_action_id));
2703: hr_utility.trace('Asg ID = '||to_char(l_assignment_id));
2704: hr_utility.trace('Tax Unit ID = '||to_char(l_tax_unit_id));
2705: hr_utility.trace('GRE Name = '||l_gre_name);
2706: hr_utility.trace('ORG ID = '||to_char(l_organization_id));
2707: hr_utility.trace('ORG Name = '||l_org_name);
2700: hr_utility.trace('Effective Date = '||to_char(l_effective_date));
2701: hr_utility.trace('Action Type = '||l_action_type);
2702: hr_utility.trace('Asg Act ID = '||to_char(l_assignment_action_id));
2703: hr_utility.trace('Asg ID = '||to_char(l_assignment_id));
2704: hr_utility.trace('Tax Unit ID = '||to_char(l_tax_unit_id));
2705: hr_utility.trace('GRE Name = '||l_gre_name);
2706: hr_utility.trace('ORG ID = '||to_char(l_organization_id));
2707: hr_utility.trace('ORG Name = '||l_org_name);
2708: hr_utility.trace('Loc ID = '||to_char(l_location_id));
2701: hr_utility.trace('Action Type = '||l_action_type);
2702: hr_utility.trace('Asg Act ID = '||to_char(l_assignment_action_id));
2703: hr_utility.trace('Asg ID = '||to_char(l_assignment_id));
2704: hr_utility.trace('Tax Unit ID = '||to_char(l_tax_unit_id));
2705: hr_utility.trace('GRE Name = '||l_gre_name);
2706: hr_utility.trace('ORG ID = '||to_char(l_organization_id));
2707: hr_utility.trace('ORG Name = '||l_org_name);
2708: hr_utility.trace('Loc ID = '||to_char(l_location_id));
2709: hr_utility.trace('Loc Code = '||l_location_code);
2702: hr_utility.trace('Asg Act ID = '||to_char(l_assignment_action_id));
2703: hr_utility.trace('Asg ID = '||to_char(l_assignment_id));
2704: hr_utility.trace('Tax Unit ID = '||to_char(l_tax_unit_id));
2705: hr_utility.trace('GRE Name = '||l_gre_name);
2706: hr_utility.trace('ORG ID = '||to_char(l_organization_id));
2707: hr_utility.trace('ORG Name = '||l_org_name);
2708: hr_utility.trace('Loc ID = '||to_char(l_location_id));
2709: hr_utility.trace('Loc Code = '||l_location_code);
2710: /*--Bug#4942114 starts --*/
2703: hr_utility.trace('Asg ID = '||to_char(l_assignment_id));
2704: hr_utility.trace('Tax Unit ID = '||to_char(l_tax_unit_id));
2705: hr_utility.trace('GRE Name = '||l_gre_name);
2706: hr_utility.trace('ORG ID = '||to_char(l_organization_id));
2707: hr_utility.trace('ORG Name = '||l_org_name);
2708: hr_utility.trace('Loc ID = '||to_char(l_location_id));
2709: hr_utility.trace('Loc Code = '||l_location_code);
2710: /*--Bug#4942114 starts --*/
2711: /*load_deductions(l_assignment_action_id,l_ded_view_name);
2704: hr_utility.trace('Tax Unit ID = '||to_char(l_tax_unit_id));
2705: hr_utility.trace('GRE Name = '||l_gre_name);
2706: hr_utility.trace('ORG ID = '||to_char(l_organization_id));
2707: hr_utility.trace('ORG Name = '||l_org_name);
2708: hr_utility.trace('Loc ID = '||to_char(l_location_id));
2709: hr_utility.trace('Loc Code = '||l_location_code);
2710: /*--Bug#4942114 starts --*/
2711: /*load_deductions(l_assignment_action_id,l_ded_view_name);
2712: load_earnings (l_assignment_action_id,l_earn_view_name);
2705: hr_utility.trace('GRE Name = '||l_gre_name);
2706: hr_utility.trace('ORG ID = '||to_char(l_organization_id));
2707: hr_utility.trace('ORG Name = '||l_org_name);
2708: hr_utility.trace('Loc ID = '||to_char(l_location_id));
2709: hr_utility.trace('Loc Code = '||l_location_code);
2710: /*--Bug#4942114 starts --*/
2711: /*load_deductions(l_assignment_action_id,l_ded_view_name);
2712: load_earnings (l_assignment_action_id,l_earn_view_name);
2713: -- load_alien_earnings (l_assignment_action_id);
2747: l_row_count := 0;
2748: commit;
2749: end if;
2750: end loop;
2751: hr_utility.trace('End of LOAD DATA');
2752: close sel_aaid;
2753: if (l_index <>0) then
2754: for x in g_totals_table.first..g_totals_table.last LOOP
2755: INSERT INTO pay_us_rpt_totals(tax_unit_id, gre_name,
2782: end if;
2783: commit;
2784: exception
2785: when others then
2786: hr_utility.trace('Error occurred load_data ...' ||SQLERRM);
2787: raise;
2788: end load_data;
2789:
2790: procedure load_data
2885:
2886: l_future_process_mode VARCHAR2(2) := 'N';
2887:
2888: begin
2889: -- hr_utility.trace_on('Y','GTN');
2890: l_row_count := 0;
2891: hr_utility.trace('PPCTID = '||p_payroll_action_id);
2892: hr_utility.trace('PPA_FINDER = '||ppa_finder);
2893: hr_utility.trace('p_asg_flag ='||p_asg_flag);
2887:
2888: begin
2889: -- hr_utility.trace_on('Y','GTN');
2890: l_row_count := 0;
2891: hr_utility.trace('PPCTID = '||p_payroll_action_id);
2892: hr_utility.trace('PPA_FINDER = '||ppa_finder);
2893: hr_utility.trace('p_asg_flag ='||p_asg_flag);
2894:
2895: begin
2888: begin
2889: -- hr_utility.trace_on('Y','GTN');
2890: l_row_count := 0;
2891: hr_utility.trace('PPCTID = '||p_payroll_action_id);
2892: hr_utility.trace('PPA_FINDER = '||ppa_finder);
2893: hr_utility.trace('p_asg_flag ='||p_asg_flag);
2894:
2895: begin
2896: select to_number(ue.creator_id)
2889: -- hr_utility.trace_on('Y','GTN');
2890: l_row_count := 0;
2891: hr_utility.trace('PPCTID = '||p_payroll_action_id);
2892: hr_utility.trace('PPA_FINDER = '||ppa_finder);
2893: hr_utility.trace('p_asg_flag ='||p_asg_flag);
2894:
2895: begin
2896: select to_number(ue.creator_id)
2897: into l_defined_balance_id
2901: and ue.user_entity_id = di.user_entity_id
2902: and ue.creator_type = 'B'
2903: and nvl(ue.legislation_code,'US') = 'US';
2904: exception when others then
2905: hr_utility.trace('Error getting defined balance id');
2906: raise;
2907: end;
2908:
2909: -- #3270485: moved to range_cursor procedure.
2918: -- commit;
2919: -- end if;
2920:
2921: l_asg_flag := nvl(p_asg_flag,'N');
2922: hr_utility.trace('l_asg_flag ='||l_asg_flag);
2923: pay_us_balance_view_pkg.set_view_mode('ASG');
2924: pay_us_balance_view_pkg.set_calc_all_timetypes_flag(0);
2925: pay_us_balance_view_pkg.set_session_var('PTD', 'FALSE');
2926: pay_us_balance_view_pkg.set_session_var('PYDATE', 'FALSE');
2951: l_assignment_number,
2952: l_person_id,
2953: l_chnk_number;
2954:
2955: hr_utility.trace('Number of Records fetched = '||to_char(sel_aaid%ROWCOUNT));
2956:
2957: exit when sel_aaid%notfound;
2958: open sel_empname(l_person_id,l_effective_date);
2959: fetch sel_empname into l_full_name;
2975: t_payroll_action_id
2976: from pay_payroll_actions ppa
2977: where ppa.payroll_action_id = l_payroll_action_id;
2978: exception when no_data_found then
2979: hr_utility.trace('Legislative Details not found...');
2980: raise;
2981: end;
2982: hr_utility.trace('Start Date = '||to_char(l_start_date));
2983: hr_utility.trace('End Date = '||to_char(l_end_date));
2978: exception when no_data_found then
2979: hr_utility.trace('Legislative Details not found...');
2980: raise;
2981: end;
2982: hr_utility.trace('Start Date = '||to_char(l_start_date));
2983: hr_utility.trace('End Date = '||to_char(l_end_date));
2984: hr_utility.trace('BG ID = '||to_char(l_business_group_id));
2985: hr_utility.trace('Payroll Action ID = '||to_char(l_payroll_action_id));
2986: hr_utility.trace('Effective Date = '||to_char(l_effective_date));
2979: hr_utility.trace('Legislative Details not found...');
2980: raise;
2981: end;
2982: hr_utility.trace('Start Date = '||to_char(l_start_date));
2983: hr_utility.trace('End Date = '||to_char(l_end_date));
2984: hr_utility.trace('BG ID = '||to_char(l_business_group_id));
2985: hr_utility.trace('Payroll Action ID = '||to_char(l_payroll_action_id));
2986: hr_utility.trace('Effective Date = '||to_char(l_effective_date));
2987: hr_utility.trace('Action Type = '||l_action_type);
2980: raise;
2981: end;
2982: hr_utility.trace('Start Date = '||to_char(l_start_date));
2983: hr_utility.trace('End Date = '||to_char(l_end_date));
2984: hr_utility.trace('BG ID = '||to_char(l_business_group_id));
2985: hr_utility.trace('Payroll Action ID = '||to_char(l_payroll_action_id));
2986: hr_utility.trace('Effective Date = '||to_char(l_effective_date));
2987: hr_utility.trace('Action Type = '||l_action_type);
2988: hr_utility.trace('Asg Act ID = '||to_char(l_assignment_action_id));
2981: end;
2982: hr_utility.trace('Start Date = '||to_char(l_start_date));
2983: hr_utility.trace('End Date = '||to_char(l_end_date));
2984: hr_utility.trace('BG ID = '||to_char(l_business_group_id));
2985: hr_utility.trace('Payroll Action ID = '||to_char(l_payroll_action_id));
2986: hr_utility.trace('Effective Date = '||to_char(l_effective_date));
2987: hr_utility.trace('Action Type = '||l_action_type);
2988: hr_utility.trace('Asg Act ID = '||to_char(l_assignment_action_id));
2989: hr_utility.trace('Asg ID = '||to_char(l_assignment_id));
2982: hr_utility.trace('Start Date = '||to_char(l_start_date));
2983: hr_utility.trace('End Date = '||to_char(l_end_date));
2984: hr_utility.trace('BG ID = '||to_char(l_business_group_id));
2985: hr_utility.trace('Payroll Action ID = '||to_char(l_payroll_action_id));
2986: hr_utility.trace('Effective Date = '||to_char(l_effective_date));
2987: hr_utility.trace('Action Type = '||l_action_type);
2988: hr_utility.trace('Asg Act ID = '||to_char(l_assignment_action_id));
2989: hr_utility.trace('Asg ID = '||to_char(l_assignment_id));
2990: hr_utility.trace('Tax Unit ID = '||to_char(l_tax_unit_id));
2983: hr_utility.trace('End Date = '||to_char(l_end_date));
2984: hr_utility.trace('BG ID = '||to_char(l_business_group_id));
2985: hr_utility.trace('Payroll Action ID = '||to_char(l_payroll_action_id));
2986: hr_utility.trace('Effective Date = '||to_char(l_effective_date));
2987: hr_utility.trace('Action Type = '||l_action_type);
2988: hr_utility.trace('Asg Act ID = '||to_char(l_assignment_action_id));
2989: hr_utility.trace('Asg ID = '||to_char(l_assignment_id));
2990: hr_utility.trace('Tax Unit ID = '||to_char(l_tax_unit_id));
2991: hr_utility.trace('GRE Name = '||l_gre_name);
2984: hr_utility.trace('BG ID = '||to_char(l_business_group_id));
2985: hr_utility.trace('Payroll Action ID = '||to_char(l_payroll_action_id));
2986: hr_utility.trace('Effective Date = '||to_char(l_effective_date));
2987: hr_utility.trace('Action Type = '||l_action_type);
2988: hr_utility.trace('Asg Act ID = '||to_char(l_assignment_action_id));
2989: hr_utility.trace('Asg ID = '||to_char(l_assignment_id));
2990: hr_utility.trace('Tax Unit ID = '||to_char(l_tax_unit_id));
2991: hr_utility.trace('GRE Name = '||l_gre_name);
2992: hr_utility.trace('ORG ID = '||to_char(l_organization_id));
2985: hr_utility.trace('Payroll Action ID = '||to_char(l_payroll_action_id));
2986: hr_utility.trace('Effective Date = '||to_char(l_effective_date));
2987: hr_utility.trace('Action Type = '||l_action_type);
2988: hr_utility.trace('Asg Act ID = '||to_char(l_assignment_action_id));
2989: hr_utility.trace('Asg ID = '||to_char(l_assignment_id));
2990: hr_utility.trace('Tax Unit ID = '||to_char(l_tax_unit_id));
2991: hr_utility.trace('GRE Name = '||l_gre_name);
2992: hr_utility.trace('ORG ID = '||to_char(l_organization_id));
2993: hr_utility.trace('ORG Name = '||l_org_name);
2986: hr_utility.trace('Effective Date = '||to_char(l_effective_date));
2987: hr_utility.trace('Action Type = '||l_action_type);
2988: hr_utility.trace('Asg Act ID = '||to_char(l_assignment_action_id));
2989: hr_utility.trace('Asg ID = '||to_char(l_assignment_id));
2990: hr_utility.trace('Tax Unit ID = '||to_char(l_tax_unit_id));
2991: hr_utility.trace('GRE Name = '||l_gre_name);
2992: hr_utility.trace('ORG ID = '||to_char(l_organization_id));
2993: hr_utility.trace('ORG Name = '||l_org_name);
2994: hr_utility.trace('Loc ID = '||to_char(l_location_id));
2987: hr_utility.trace('Action Type = '||l_action_type);
2988: hr_utility.trace('Asg Act ID = '||to_char(l_assignment_action_id));
2989: hr_utility.trace('Asg ID = '||to_char(l_assignment_id));
2990: hr_utility.trace('Tax Unit ID = '||to_char(l_tax_unit_id));
2991: hr_utility.trace('GRE Name = '||l_gre_name);
2992: hr_utility.trace('ORG ID = '||to_char(l_organization_id));
2993: hr_utility.trace('ORG Name = '||l_org_name);
2994: hr_utility.trace('Loc ID = '||to_char(l_location_id));
2995: hr_utility.trace('Loc Code = '||l_location_code);
2988: hr_utility.trace('Asg Act ID = '||to_char(l_assignment_action_id));
2989: hr_utility.trace('Asg ID = '||to_char(l_assignment_id));
2990: hr_utility.trace('Tax Unit ID = '||to_char(l_tax_unit_id));
2991: hr_utility.trace('GRE Name = '||l_gre_name);
2992: hr_utility.trace('ORG ID = '||to_char(l_organization_id));
2993: hr_utility.trace('ORG Name = '||l_org_name);
2994: hr_utility.trace('Loc ID = '||to_char(l_location_id));
2995: hr_utility.trace('Loc Code = '||l_location_code);
2996: hr_utility.trace('Chunk Number = '||l_chnk_number);
2989: hr_utility.trace('Asg ID = '||to_char(l_assignment_id));
2990: hr_utility.trace('Tax Unit ID = '||to_char(l_tax_unit_id));
2991: hr_utility.trace('GRE Name = '||l_gre_name);
2992: hr_utility.trace('ORG ID = '||to_char(l_organization_id));
2993: hr_utility.trace('ORG Name = '||l_org_name);
2994: hr_utility.trace('Loc ID = '||to_char(l_location_id));
2995: hr_utility.trace('Loc Code = '||l_location_code);
2996: hr_utility.trace('Chunk Number = '||l_chnk_number);
2997:
2990: hr_utility.trace('Tax Unit ID = '||to_char(l_tax_unit_id));
2991: hr_utility.trace('GRE Name = '||l_gre_name);
2992: hr_utility.trace('ORG ID = '||to_char(l_organization_id));
2993: hr_utility.trace('ORG Name = '||l_org_name);
2994: hr_utility.trace('Loc ID = '||to_char(l_location_id));
2995: hr_utility.trace('Loc Code = '||l_location_code);
2996: hr_utility.trace('Chunk Number = '||l_chnk_number);
2997:
2998: -- Bug#4942114 starts
2991: hr_utility.trace('GRE Name = '||l_gre_name);
2992: hr_utility.trace('ORG ID = '||to_char(l_organization_id));
2993: hr_utility.trace('ORG Name = '||l_org_name);
2994: hr_utility.trace('Loc ID = '||to_char(l_location_id));
2995: hr_utility.trace('Loc Code = '||l_location_code);
2996: hr_utility.trace('Chunk Number = '||l_chnk_number);
2997:
2998: -- Bug#4942114 starts
2999: /*
2992: hr_utility.trace('ORG ID = '||to_char(l_organization_id));
2993: hr_utility.trace('ORG Name = '||l_org_name);
2994: hr_utility.trace('Loc ID = '||to_char(l_location_id));
2995: hr_utility.trace('Loc Code = '||l_location_code);
2996: hr_utility.trace('Chunk Number = '||l_chnk_number);
2997:
2998: -- Bug#4942114 starts
2999: /*
3000: hr_utility.trace('p_futa_where = '||p_futa_where);
2996: hr_utility.trace('Chunk Number = '||l_chnk_number);
2997:
2998: -- Bug#4942114 starts
2999: /*
3000: hr_utility.trace('p_futa_where = '||p_futa_where);
3001: hr_utility.trace('p_futa_from = '||p_futa_from);
3002: load_deductions(l_assignment_action_id,p_ded_view_name);
3003: load_earnings (l_assignment_action_id,p_earn_view_name);
3004: -- load_alien_earnings (l_assignment_action_id);
2997:
2998: -- Bug#4942114 starts
2999: /*
3000: hr_utility.trace('p_futa_where = '||p_futa_where);
3001: hr_utility.trace('p_futa_from = '||p_futa_from);
3002: load_deductions(l_assignment_action_id,p_ded_view_name);
3003: load_earnings (l_assignment_action_id,p_earn_view_name);
3004: -- load_alien_earnings (l_assignment_action_id);
3005: load_ee_tax (l_assignment_action_id,p_fed_view_name,p_state_view_name,p_local_view_name);
3047: l_row_count := 0;
3048: commit;
3049: end if;*/
3050: end loop;
3051: hr_utility.trace('End of LOAD DATA');
3052: close sel_aaid;
3053: if (l_index <>0) then
3054: for x in g_totals_table.first..g_totals_table.last LOOP
3055: INSERT INTO pay_us_rpt_totals(tax_unit_id, gre_name,
3083: end if;
3084: -- commit;
3085: exception
3086: when others then
3087: hr_utility.trace('Error occurred load_data ...' ||SQLERRM);
3088: raise;
3089: end load_data;
3090: --
3091: ------------------------------ end load data -------------------------------