DBA Data[Home] [Help]

APPS.SSP_APAD_PKG dependencies on HR_UTILITY

Line 127: hr_utility.trace (l_proc||' p_effective_date = '

123: --
124: procedure check_parameters is
125: begin
126: --
127: hr_utility.trace (l_proc||' p_effective_date = '
128: ||to_char (p_effective_date));
129: --
130: hr_api.mandatory_arg_error (
131: p_api_name => l_proc,

Line 138: hr_utility.set_location (l_proc,1);

134: end check_parameters;
135: --
136: begin
137: --
138: hr_utility.set_location (l_proc,1);
139: --
140: check_parameters;
141: --
142: open csr_APAD_element_details (p_effective_date,c_APAD_Corr_element_name);

Line 146: hr_utility.set_location (l_proc,100);

142: open csr_APAD_element_details (p_effective_date,c_APAD_Corr_element_name);
143: fetch csr_APAD_element_details into g_APAD_Correction_element;
144: close csr_APAD_element_details;
145: --
146: hr_utility.set_location (l_proc,100);
147: --
148: end get_APAD_correction_element;
149: --------------------------------------------------------------------------------
150: procedure get_APAD_element (p_effective_date in date) is

Line 157: hr_utility.trace (l_proc||' p_effective_date = '

153: --
154: procedure check_parameters is
155: begin
156: --
157: hr_utility.trace (l_proc||' p_effective_date = '
158: ||to_char (p_effective_date));
159: --
160: hr_api.mandatory_arg_error (
161: p_api_name => l_proc,

Line 169: hr_utility.set_location (l_proc,1);

165: end check_parameters;
166: --
167: begin
168: --
169: hr_utility.set_location (l_proc,1);
170: --
171: check_parameters;
172: --
173: open csr_APAD_element_details (p_effective_date,c_APAD_element_name);

Line 177: hr_utility.set_location (l_proc,100);

173: open csr_APAD_element_details (p_effective_date,c_APAD_element_name);
174: fetch csr_APAD_element_details into g_APAD_element;
175: close csr_APAD_element_details;
176: --
177: hr_utility.set_location (l_proc,100);
178: --
179: end get_APAD_element;
180: --------------------------------------------------------------------------------
181: function EARLIEST_ASPPP_START_DATE (p_placement_date in date) return date is

Line 301: hr_utility.set_location ('Entering '||l_proc,1);

297: and effective_date = l_effective_date;
298: --
299: begin
300: --
301: hr_utility.set_location ('Entering '||l_proc,1);
302: --
303: l_effective_date := greatest(person.MW, person.date_start);
304: --
305: open csr_average_earnings;

Line 322: hr_utility.set_location ('Leaving '||l_proc,10);

318: end if;
319: --
320: close csr_average_earnings;
321: --
322: hr_utility.set_location ('Leaving '||l_proc,10);
323: --
324: return l_average_earnings;
325: --
326: end average_earnings;

Line 407: hr_utility.trace (l_proc||' p_reason = '||p_reason);

403: procedure check_parameters is
404: --
405: begin
406: --
407: hr_utility.trace (l_proc||' p_reason = '||p_reason);
408: hr_utility.trace (l_proc||' withhold from '||to_char (p_withhold_from));
409: hr_utility.trace (l_proc||' withhold to '||to_char (p_withhold_to));
410: --
411: hr_api.mandatory_arg_error (

Line 408: hr_utility.trace (l_proc||' withhold from '||to_char (p_withhold_from));

404: --
405: begin
406: --
407: hr_utility.trace (l_proc||' p_reason = '||p_reason);
408: hr_utility.trace (l_proc||' withhold from '||to_char (p_withhold_from));
409: hr_utility.trace (l_proc||' withhold to '||to_char (p_withhold_to));
410: --
411: hr_api.mandatory_arg_error (
412: p_api_name => l_proc,

Line 409: hr_utility.trace (l_proc||' withhold to '||to_char (p_withhold_to));

405: begin
406: --
407: hr_utility.trace (l_proc||' p_reason = '||p_reason);
408: hr_utility.trace (l_proc||' withhold from '||to_char (p_withhold_from));
409: hr_utility.trace (l_proc||' withhold to '||to_char (p_withhold_to));
410: --
411: hr_api.mandatory_arg_error (
412: p_api_name => l_proc,
413: p_argument => 'reason',

Line 425: hr_utility.set_location (l_proc,1);

421: end check_parameters;
422: --
423: begin
424: --
425: hr_utility.set_location (l_proc,1);
426: --
427: check_parameters;
428: --
429: l_reason_id := ssp_smp_support_pkg.withholding_reason_id (

Line 450: hr_utility.trace (l_proc||' Stoppage is overridden');

446: p_maternity_id => p_maternity_id,
447: p_user_entered => 'N',
448: p_reason_id => l_reason_id);
449: else
450: hr_utility.trace (l_proc||' Stoppage is overridden');
451: end if;
452: --
453: hr_utility.set_location (l_proc,100);
454: --

Line 453: hr_utility.set_location (l_proc,100);

449: else
450: hr_utility.trace (l_proc||' Stoppage is overridden');
451: end if;
452: --
453: hr_utility.set_location (l_proc,100);
454: --
455: end create_stoppage;
456: --
457: procedure remove_stoppages is

Line 473: hr_utility.set_location (l_proc,1);

469: l_proc varchar2 (72) := g_package||'remove_stoppages';
470: --
471: begin
472: --
473: hr_utility.set_location (l_proc,1);
474: --
475: for each_stoppage in csr_stoppages LOOP
476: ssp_stp_del.del (p_stoppage_id => each_stoppage.stoppage_id,
477: p_object_version_number => l_dummy);

Line 480: hr_utility.set_location (l_proc,100);

476: ssp_stp_del.del (p_stoppage_id => each_stoppage.stoppage_id,
477: p_object_version_number => l_dummy);
478: end loop;
479: --
480: hr_utility.set_location (l_proc,100);
481: --
482: end remove_stoppages;
483: --
484: procedure check_employment_end is

Line 500: hr_utility.set_location (l_proc,1);

496: l_proc varchar2 (72) := g_package||'check_employment_end';
497: --
498: begin
499: --
500: hr_utility.set_location (l_proc,1);
501: --
502: open csr_termination_date;
503: fetch csr_termination_date into l_termination_date;
504: close csr_termination_date;

Line 515: hr_utility.set_location (l_proc,100);

511: create_stoppage (p_withhold_from => person.placement_date,
512: p_reason => 'Not employed on APL First week');
513: end if;
514: --
515: hr_utility.set_location (l_proc,100);
516: --
517: end check_employment_end;
518: --
519: procedure check_continuity_rule is

Line 541: hr_utility.set_location (l_proc,1);

537: l_proc varchar2 (72) := g_package||'check_continuity_rule';
538: --
539: begin
540: --
541: hr_utility.set_location (l_proc,1);
542: --
543: open period_of_service;
544: fetch period_of_service into l_dummy;
545: --

Line 557: hr_utility.set_location (l_proc,100);

553: end if;
554: --
555: close period_of_service;
556: --
557: hr_utility.set_location (l_proc,100);
558: --
559: end check_continuity_rule;
560: --
561: procedure check_partner_app_days is

Line 570: hr_utility.set_location (l_proc,1);

566: l_APAD_element csr_APAD_element_details%rowtype;
567: --
568: begin
569: --
570: hr_utility.set_location (l_proc,1);
571: --
572: open csr_APAD_element_details (person.placement_date,c_APAD_element_name);
573: fetch csr_APAD_element_details into l_APAD_element;
574: close csr_APAD_element_details;

Line 584: hr_utility.set_location (l_proc,100);

580: create_stoppage (p_withhold_from => person.ASPP_start_date ,
581: p_reason => 'Partner APP less than 2 weeks');
582: end if;
583: --
584: hr_utility.set_location (l_proc,100);
585: --
586: end check_partner_app_days;
587:
588: procedure check_start_date is

Line 598: hr_utility.set_location (l_proc,1);

594: l_mother_death varchar2(2) := 'N';
595: --
596: begin
597: --
598: hr_utility.set_location (l_proc,1);
599: --
600: open csr_APAD_element_details (person.placement_date,c_APAD_element_name);
601: fetch csr_APAD_element_details into l_APAD_element;
602: close csr_APAD_element_details;

Line 605: hr_utility.set_location (l_proc,2);

601: fetch csr_APAD_element_details into l_APAD_element;
602: close csr_APAD_element_details;
603: --
604: l_partner_app_end_date := partner_app_end_date(person.partner_stat_pay_start_date, null);
605: hr_utility.set_location (l_proc,2);
606:
607: if person.partner_date_of_death is not null and
608: add_months(person.placement_date, 12) > person.partner_date_of_death
609: then

Line 610: hr_utility.set_location (l_proc,4);

606:
607: if person.partner_date_of_death is not null and
608: add_months(person.placement_date, 12) > person.partner_date_of_death
609: then
610: hr_utility.set_location (l_proc,4);
611: l_mother_death := 'Y';
612: end if;
613:
614: /* If employee APL is after partner APP end date, then ASPP payment should stop from ASPP Start date */

Line 617: hr_utility.set_location (l_proc,6);

613:
614: /* If employee APL is after partner APP end date, then ASPP payment should stop from ASPP Start date */
615: if person.ASPP_start_date > l_partner_app_end_date
616: then
617: hr_utility.set_location (l_proc,6);
618: create_stoppage (p_withhold_from => person.ASPP_start_date,
619: p_reason => 'Partner Max APP weeks over');
620: else
621:

Line 626: hr_utility.set_location (l_proc,7);

622: /* If employee APL goes beyond partner APP end date, then ASPP payment should stop on partners APP end date */
623: if ((person.ASPP_start_date + (l_APAD_element.MAX_APL_WEEKS*7) > l_partner_app_end_date ) and
624: (l_mother_death = 'N'))
625: then
626: hr_utility.set_location (l_proc,7);
627: create_stoppage (p_withhold_from => l_partner_app_end_date,
628: p_reason => 'Max ASPP Period Exceeded');
629: end if;
630:

Line 634: hr_utility.set_location (l_proc,8);

630:
631: if ((person.ASPP_start_date + (l_APAD_element.MAX_APL_MOM_DEATH_WEEKS*7) > l_partner_app_end_date ) and
632: (l_mother_death = 'Y'))
633: then
634: hr_utility.set_location (l_proc,8);
635: create_stoppage (p_withhold_from => l_partner_app_end_date,
636: p_reason => 'Max ASPP Period Exceeded');
637: end if;
638: end if;

Line 641: hr_utility.set_location (l_proc,100);

637: end if;
638: end if;
639:
640: --
641: hr_utility.set_location (l_proc,100);
642: --
643: end check_start_date;
644: --
645: procedure check_death is

Line 661: hr_utility.set_location (l_proc,1);

657: l_death_date date;
658:
659: begin
660: --
661: hr_utility.set_location (l_proc,1);
662: --
663: -- APAD ceases on the Saturday following death
664: --
665: l_death_date := null;

Line 677: hr_utility.set_location (l_proc,100);

673: person.ASPP_start_date, l_death_date) +1,
674: p_reason => 'Employee died');
675: end if;
676: --
677: hr_utility.set_location (l_proc,100);
678: --
679: end check_death;
680: --
681: procedure check_disruption_date is

Line 702: hr_utility.set_location (l_proc,1);

698: earnings_not_derived exception;
699: --
700: begin
701: --
702: hr_utility.set_location (l_proc,1);
703: --
704: -- If the average earnings figure returned is zero then check that
705: -- no error message was set. Error messages will be set for system-
706: -- generated average earnings when the earnings could not be derived

Line 731: hr_utility.set_location (l_proc,100);

727: create_stoppage (p_withhold_from => person.ASPP_start_date,
728: p_reason => 'Earnings too low');
729: end if;
730: --
731: hr_utility.set_location (l_proc,100);
732: --
733: exception
734: --
735: when earnings_not_derived then

Line 739: hr_utility.trace (l_proc||' Earnings not derived');

735: when earnings_not_derived then
736: --
737: -- Exit silently from this procedure
738: --
739: hr_utility.trace (l_proc||' Earnings not derived');
740: null;
741: --
742: end check_average_earnings;
743: --

Line 748: hr_utility.trace (l_proc||' p_maternity_id = '

744: procedure check_parameters is
745: --
746: begin
747: --
748: hr_utility.trace (l_proc||' p_maternity_id = '
749: ||to_char (p_maternity_id));
750: --
751: hr_api.mandatory_arg_error (
752: p_api_name => l_proc,

Line 761: hr_utility.set_location (l_proc,1);

757: --
758: begin
759: --
760:
761: hr_utility.set_location (l_proc,1);
762: --
763: check_parameters;
764: --
765: -- Get the details of the person.

Line 776: hr_utility.trace (l_proc||' Person has no maternity record - exiting');

772: if csr_personal_details%notfound
773: then
774: close csr_personal_details;
775: --
776: hr_utility.trace (l_proc||' Person has no maternity record - exiting');
777: --
778: raise no_prima_facia_entitlement;
779: end if;
780: --

Line 786: hr_utility.trace (l_proc||' Person has no APP start date - exiting');

782: --
783: -- If the APP has not started then there is no entitlement to APAD.
784: --
785: if person.ASPP_start_date is null then
786: hr_utility.trace (l_proc||' Person has no APP start date - exiting');
787: --
788: raise no_prima_facia_entitlement;
789: end if;
790: --

Line 806: hr_utility.trace (l_proc||' Person has not stopped work - exiting');

802: fetch csr_check_if_existing_entries into l_existing_entries;
803: --
804: if csr_check_if_existing_entries%NOTFOUND
805: then
806: hr_utility.trace (l_proc||' Person has not stopped work - exiting');
807: raise no_prima_facia_entitlement;
808: end if;
809: --
810: -- if entries are found then the absence has been deleted and entries remain

Line 824: hr_utility.set_location ('ssp_apad_pkg.entitled_to_APAD',2);

820: --
821: -- Having established a prima facia entitlement to APAD, perform checks which
822: -- may lead to creation of stoppages for particular periods.
823: --
824: hr_utility.set_location ('ssp_apad_pkg.entitled_to_APAD',2);
825: --
826: -- Get the APAD legislative parameters.
827: --
828: get_APAD_element (person.due_date);

Line 856: hr_utility.set_location ('ssp_apad_pkg.entitled_to_apad',3);

852: -- p_withhold_to => ssp_smp_support_pkg.end_of_week (stoppage_end_date),
853: p_reason => 'Late absence notification');
854: end if;*/
855: --
856: hr_utility.set_location ('ssp_apad_pkg.entitled_to_apad',3);
857: --
858: -- Check for any work done during the ASPP.
859: --
860: if csr_absence_details%rowcount = 1

Line 1057: hr_utility.set_location (l_proc,1);

1053: l_proc varchar2 (72) := g_package||'.remove_stoppages';
1054: --
1055: begin
1056: --
1057: hr_utility.set_location (l_proc,1);
1058: --
1059: for each_stoppage in csr_stoppages LOOP
1060: ssp_stp_del.del (p_stoppage_id => each_stoppage.stoppage_id,
1061: p_object_version_number => l_dummy);

Line 1064: hr_utility.set_location (l_proc,100);

1060: ssp_stp_del.del (p_stoppage_id => each_stoppage.stoppage_id,
1061: p_object_version_number => l_dummy);
1062: end loop;
1063: --
1064: hr_utility.set_location (l_proc,100);
1065: --
1066: end remove_stoppages;
1067: --
1068: begin

Line 1070: hr_utility.set_location('Entering: '||l_proc,10);

1066: end remove_stoppages;
1067: --
1068: begin
1069: --
1070: hr_utility.set_location('Entering: '||l_proc,10);
1071: --
1072: get_APAD_correction_element (person.due_date);
1073: --
1074: -- Check each existing apad entry in turn against all the potential new ones.

Line 1109: hr_utility.trace (l_proc||' Old entry / Hypo entry time Match with values:');

1105: = hypothetical_entry.week_commencing (entry_number)
1106: and not hypothetical_entry.stopped (entry_number) = 'TRUE'
1107: and ssp_smp_pkg.g_smp_update = 'Y'));
1108: end loop;
1109: hr_utility.trace (l_proc||' Old entry / Hypo entry time Match with values:');
1110: hr_utility.trace (l_proc||' Rate: ' ||old_entry.rate||' / '
1111: ||hypothetical_entry.rate (Entry_number));
1112: hr_utility.trace (l_proc||' Amount: '
1113: ||old_entry.amount||' / '

Line 1110: hr_utility.trace (l_proc||' Rate: ' ||old_entry.rate||' / '

1106: and not hypothetical_entry.stopped (entry_number) = 'TRUE'
1107: and ssp_smp_pkg.g_smp_update = 'Y'));
1108: end loop;
1109: hr_utility.trace (l_proc||' Old entry / Hypo entry time Match with values:');
1110: hr_utility.trace (l_proc||' Rate: ' ||old_entry.rate||' / '
1111: ||hypothetical_entry.rate (Entry_number));
1112: hr_utility.trace (l_proc||' Amount: '
1113: ||old_entry.amount||' / '
1114: ||hypothetical_entry.amount (entry_number));

Line 1112: hr_utility.trace (l_proc||' Amount: '

1108: end loop;
1109: hr_utility.trace (l_proc||' Old entry / Hypo entry time Match with values:');
1110: hr_utility.trace (l_proc||' Rate: ' ||old_entry.rate||' / '
1111: ||hypothetical_entry.rate (Entry_number));
1112: hr_utility.trace (l_proc||' Amount: '
1113: ||old_entry.amount||' / '
1114: ||hypothetical_entry.amount (entry_number));
1115: hr_utility.trace (l_proc||' Recoverable: '
1116: ||old_entry.recoverable_amount||' / '

Line 1115: hr_utility.trace (l_proc||' Recoverable: '

1111: ||hypothetical_entry.rate (Entry_number));
1112: hr_utility.trace (l_proc||' Amount: '
1113: ||old_entry.amount||' / '
1114: ||hypothetical_entry.amount (entry_number));
1115: hr_utility.trace (l_proc||' Recoverable: '
1116: ||old_entry.recoverable_amount||' / '
1117: ||hypothetical_entry.recoverable_amount (entry_number));
1118: hr_utility.trace (l_proc||' Week Comm: '
1119: ||hypothetical_entry.week_commencing (entry_number) );

Line 1118: hr_utility.trace (l_proc||' Week Comm: '

1114: ||hypothetical_entry.amount (entry_number));
1115: hr_utility.trace (l_proc||' Recoverable: '
1116: ||old_entry.recoverable_amount||' / '
1117: ||hypothetical_entry.recoverable_amount (entry_number));
1118: hr_utility.trace (l_proc||' Week Comm: '
1119: ||hypothetical_entry.week_commencing (entry_number) );
1120: --A hypo entry covers the same week as the old one
1121: if old_entry.rate = hypothetical_entry.rate (entry_number)
1122: and old_entry.amount = hypothetical_entry.amount(entry_number)

Line 1130: hr_utility.trace (l_proc||' leave unchanged');

1126: -- the hypo entry has the same values as the old one
1127: -- don't create a correction element.
1128: -- don't create a new entry
1129: hypothetical_entry.dealt_with (entry_number) := 'TRUE';
1130: hr_utility.trace (l_proc||' leave unchanged');
1131: else
1132: if ssp_smp_support_pkg.entry_already_processed
1133: (old_entry.element_entry_id)
1134: then l_ins_corr_ele := TRUE;

Line 1135: hr_utility.trace (l_proc||' processed - correct it');

1131: else
1132: if ssp_smp_support_pkg.entry_already_processed
1133: (old_entry.element_entry_id)
1134: then l_ins_corr_ele := TRUE;
1135: hr_utility.trace (l_proc||' processed - correct it');
1136: else
1137: -- update old entry
1138: hr_utility.trace (l_proc||' unprocessed - update it');
1139: hr_entry_api.update_element_entry (

Line 1138: hr_utility.trace (l_proc||' unprocessed - update it');

1134: then l_ins_corr_ele := TRUE;
1135: hr_utility.trace (l_proc||' processed - correct it');
1136: else
1137: -- update old entry
1138: hr_utility.trace (l_proc||' unprocessed - update it');
1139: hr_entry_api.update_element_entry (
1140: p_dt_update_mode => 'CORRECTION',
1141: p_session_date => old_entry.effective_start_date,
1142: p_element_entry_id => old_entry.element_entry_id,

Line 1161: hr_utility.trace (l_proc||' No Old entry - Hypo entry time Match');

1157: when no_data_found then
1158: -- There was no new entry which exactly matched the old entry.
1159: -- or we are deleting.
1160: entry_number := null;
1161: hr_utility.trace (l_proc||' No Old entry - Hypo entry time Match');
1162: hr_utility.trace (l_proc||' or p_deleting is true');
1163: hr_utility.trace (l_proc||' Old entry values:');
1164: hr_utility.trace (l_proc||' Rate: '||old_entry.rate);
1165: hr_utility.trace (l_proc||' Amount: '||old_entry.amount);

Line 1162: hr_utility.trace (l_proc||' or p_deleting is true');

1158: -- There was no new entry which exactly matched the old entry.
1159: -- or we are deleting.
1160: entry_number := null;
1161: hr_utility.trace (l_proc||' No Old entry - Hypo entry time Match');
1162: hr_utility.trace (l_proc||' or p_deleting is true');
1163: hr_utility.trace (l_proc||' Old entry values:');
1164: hr_utility.trace (l_proc||' Rate: '||old_entry.rate);
1165: hr_utility.trace (l_proc||' Amount: '||old_entry.amount);
1166: hr_utility.trace (l_proc||' Recoverable: '

Line 1163: hr_utility.trace (l_proc||' Old entry values:');

1159: -- or we are deleting.
1160: entry_number := null;
1161: hr_utility.trace (l_proc||' No Old entry - Hypo entry time Match');
1162: hr_utility.trace (l_proc||' or p_deleting is true');
1163: hr_utility.trace (l_proc||' Old entry values:');
1164: hr_utility.trace (l_proc||' Rate: '||old_entry.rate);
1165: hr_utility.trace (l_proc||' Amount: '||old_entry.amount);
1166: hr_utility.trace (l_proc||' Recoverable: '
1167: ||old_entry.recoverable_amount);

Line 1164: hr_utility.trace (l_proc||' Rate: '||old_entry.rate);

1160: entry_number := null;
1161: hr_utility.trace (l_proc||' No Old entry - Hypo entry time Match');
1162: hr_utility.trace (l_proc||' or p_deleting is true');
1163: hr_utility.trace (l_proc||' Old entry values:');
1164: hr_utility.trace (l_proc||' Rate: '||old_entry.rate);
1165: hr_utility.trace (l_proc||' Amount: '||old_entry.amount);
1166: hr_utility.trace (l_proc||' Recoverable: '
1167: ||old_entry.recoverable_amount);
1168: if ssp_smp_support_pkg.entry_already_processed

Line 1165: hr_utility.trace (l_proc||' Amount: '||old_entry.amount);

1161: hr_utility.trace (l_proc||' No Old entry - Hypo entry time Match');
1162: hr_utility.trace (l_proc||' or p_deleting is true');
1163: hr_utility.trace (l_proc||' Old entry values:');
1164: hr_utility.trace (l_proc||' Rate: '||old_entry.rate);
1165: hr_utility.trace (l_proc||' Amount: '||old_entry.amount);
1166: hr_utility.trace (l_proc||' Recoverable: '
1167: ||old_entry.recoverable_amount);
1168: if ssp_smp_support_pkg.entry_already_processed
1169: (old_entry.element_entry_id)

Line 1166: hr_utility.trace (l_proc||' Recoverable: '

1162: hr_utility.trace (l_proc||' or p_deleting is true');
1163: hr_utility.trace (l_proc||' Old entry values:');
1164: hr_utility.trace (l_proc||' Rate: '||old_entry.rate);
1165: hr_utility.trace (l_proc||' Amount: '||old_entry.amount);
1166: hr_utility.trace (l_proc||' Recoverable: '
1167: ||old_entry.recoverable_amount);
1168: if ssp_smp_support_pkg.entry_already_processed
1169: (old_entry.element_entry_id)
1170: then l_ins_corr_ele := TRUE;

Line 1171: hr_utility.trace (l_proc||' Old entry already processed');

1167: ||old_entry.recoverable_amount);
1168: if ssp_smp_support_pkg.entry_already_processed
1169: (old_entry.element_entry_id)
1170: then l_ins_corr_ele := TRUE;
1171: hr_utility.trace (l_proc||' Old entry already processed');
1172: else
1173: hr_utility.trace (l_proc||' Old entry NOT already processed');
1174: --Old entry not already processed so delete it
1175: hr_entry_api.delete_element_entry (

Line 1173: hr_utility.trace (l_proc||' Old entry NOT already processed');

1169: (old_entry.element_entry_id)
1170: then l_ins_corr_ele := TRUE;
1171: hr_utility.trace (l_proc||' Old entry already processed');
1172: else
1173: hr_utility.trace (l_proc||' Old entry NOT already processed');
1174: --Old entry not already processed so delete it
1175: hr_entry_api.delete_element_entry (
1176: p_dt_delete_mode => 'ZAP',
1177: p_session_date => old_entry.effective_start_date,

Line 1186: hr_utility.trace (l_proc ||

1182: then
1183: -- Create a correction element to reverse the old entry. Then create a
1184: -- brand new entry with the correct values.
1185: --
1186: hr_utility.trace (l_proc ||
1187: ' Inserting CORRECTION entry for week commencing ' ||
1188: to_char (old_entry.week_commencing));
1189: hr_utility.trace (l_proc||' Old value / New value:');
1190: if entry_number is null then

Line 1189: hr_utility.trace (l_proc||' Old value / New value:');

1185: --
1186: hr_utility.trace (l_proc ||
1187: ' Inserting CORRECTION entry for week commencing ' ||
1188: to_char (old_entry.week_commencing));
1189: hr_utility.trace (l_proc||' Old value / New value:');
1190: if entry_number is null then
1191: hr_utility.trace (l_proc||' Rate: '
1192: ||old_entry.rate||' / NA');
1193: hr_utility.trace (l_proc||' Amount: '

Line 1191: hr_utility.trace (l_proc||' Rate: '

1187: ' Inserting CORRECTION entry for week commencing ' ||
1188: to_char (old_entry.week_commencing));
1189: hr_utility.trace (l_proc||' Old value / New value:');
1190: if entry_number is null then
1191: hr_utility.trace (l_proc||' Rate: '
1192: ||old_entry.rate||' / NA');
1193: hr_utility.trace (l_proc||' Amount: '
1194: ||old_entry.amount||' / NA');
1195: hr_utility.trace (l_proc||' Recoverable: '

Line 1193: hr_utility.trace (l_proc||' Amount: '

1189: hr_utility.trace (l_proc||' Old value / New value:');
1190: if entry_number is null then
1191: hr_utility.trace (l_proc||' Rate: '
1192: ||old_entry.rate||' / NA');
1193: hr_utility.trace (l_proc||' Amount: '
1194: ||old_entry.amount||' / NA');
1195: hr_utility.trace (l_proc||' Recoverable: '
1196: ||old_entry.recoverable_amount||' / NA');
1197: else

Line 1195: hr_utility.trace (l_proc||' Recoverable: '

1191: hr_utility.trace (l_proc||' Rate: '
1192: ||old_entry.rate||' / NA');
1193: hr_utility.trace (l_proc||' Amount: '
1194: ||old_entry.amount||' / NA');
1195: hr_utility.trace (l_proc||' Recoverable: '
1196: ||old_entry.recoverable_amount||' / NA');
1197: else
1198: hr_utility.trace (l_proc||' Rate: '
1199: ||old_entry.rate||' / '

Line 1198: hr_utility.trace (l_proc||' Rate: '

1194: ||old_entry.amount||' / NA');
1195: hr_utility.trace (l_proc||' Recoverable: '
1196: ||old_entry.recoverable_amount||' / NA');
1197: else
1198: hr_utility.trace (l_proc||' Rate: '
1199: ||old_entry.rate||' / '
1200: ||hypothetical_entry.rate (Entry_number));
1201: hr_utility.trace (l_proc||' Amount: '
1202: ||old_entry.amount||' / '

Line 1201: hr_utility.trace (l_proc||' Amount: '

1197: else
1198: hr_utility.trace (l_proc||' Rate: '
1199: ||old_entry.rate||' / '
1200: ||hypothetical_entry.rate (Entry_number));
1201: hr_utility.trace (l_proc||' Amount: '
1202: ||old_entry.amount||' / '
1203: ||hypothetical_entry.amount (entry_number));
1204: hr_utility.trace (l_proc||' Recoverable: '
1205: ||old_entry.recoverable_amount||' /'

Line 1204: hr_utility.trace (l_proc||' Recoverable: '

1200: ||hypothetical_entry.rate (Entry_number));
1201: hr_utility.trace (l_proc||' Amount: '
1202: ||old_entry.amount||' / '
1203: ||hypothetical_entry.amount (entry_number));
1204: hr_utility.trace (l_proc||' Recoverable: '
1205: ||old_entry.recoverable_amount||' /'
1206: ||hypothetical_entry.recoverable_amount (entry_number));
1207: end if;
1208: --

Line 1258: hr_utility.set_location (l_proc,20);

1254: -- Having been through all the existing entries, we now check that we
1255: -- have dealt with all the newly derived entries by inserting any which
1256: -- were not flagged as dealt with during the above actions.
1257: --
1258: hr_utility.set_location (l_proc,20);
1259: --
1260: <>
1261: begin
1262: if p_deleting then

Line 1263: hr_utility.trace('Deleting an absence so don''t insert entries');

1259: --
1260: <>
1261: begin
1262: if p_deleting then
1263: hr_utility.trace('Deleting an absence so don''t insert entries');
1264: else
1265: for new_entry in 1..l_max_asppp_weeks LOOP
1266: if (not hypothetical_entry.dealt_with (new_entry) = 'TRUE')
1267: and (not hypothetical_entry.stopped (new_entry) = 'TRUE')

Line 1313: hr_utility.set_location(' Leaving: '||l_proc,100);

1309: if l_no_of_absence_periods = 0 then
1310: remove_stoppages;
1311: end if;
1312: --
1313: hr_utility.set_location(' Leaving: '||l_proc,100);
1314: --
1315: end save_hypothetical_entries;
1316: --
1317: procedure derive_APAD_week (p_week_number in integer) is

Line 1325: hr_utility.set_location ('Entering: ssp_APAD_pkg.derive_APAD_week',1);

1321: -- we are and finding the offset from the start date.
1322: --
1323: begin
1324: --
1325: hr_utility.set_location ('Entering: ssp_APAD_pkg.derive_APAD_week',1);
1326: hr_utility.trace ('Entry number = '||to_char (p_week_number));
1327: --
1328: hypothetical_entry.week_commencing (p_week_number)
1329: := (person.ASPP_start_date + ((p_week_number -1) * 7));

Line 1326: hr_utility.trace ('Entry number = '||to_char (p_week_number));

1322: --
1323: begin
1324: --
1325: hr_utility.set_location ('Entering: ssp_APAD_pkg.derive_APAD_week',1);
1326: hr_utility.trace ('Entry number = '||to_char (p_week_number));
1327: --
1328: hypothetical_entry.week_commencing (p_week_number)
1329: := (person.ASPP_start_date + ((p_week_number -1) * 7));
1330: --

Line 1336: hr_utility.trace ('week_commencing = '

1332: hypothetical_entry.stopped (p_week_number) := 'FALSE';
1333: hypothetical_entry.element_link_id (p_week_number) := null;
1334: hypothetical_entry.assignment_id (p_week_number) := null;
1335: --
1336: hr_utility.trace ('week_commencing = '
1337: ||to_char (hypothetical_entry.week_commencing (p_week_number)));
1338: --
1339: hr_utility.set_location ('Leaving : ssp_APAD_pkg.derive_APAD_week',100);
1340: --

Line 1339: hr_utility.set_location ('Leaving : ssp_APAD_pkg.derive_APAD_week',100);

1335: --
1336: hr_utility.trace ('week_commencing = '
1337: ||to_char (hypothetical_entry.week_commencing (p_week_number)));
1338: --
1339: hr_utility.set_location ('Leaving : ssp_APAD_pkg.derive_APAD_week',100);
1340: --
1341: end derive_APAD_week;
1342: --
1343: procedure Check_APAD_stoppages (p_week_number in integer) is

Line 1378: hr_utility.set_location ('ssp_APAD_pkg.Check_APAD_stoppages',1);

1374: l_dummy csr_stoppages%rowtype;
1375: --
1376: begin
1377: --
1378: hr_utility.set_location ('ssp_APAD_pkg.Check_APAD_stoppages',1);
1379: --
1380: hypothetical_entry.stopped (p_week_number) := 'FALSE';
1381: --
1382: open csr_stoppages (

Line 1396: hr_utility.trace ('Entry is STOPPED');

1392: -- is payable.
1393: --
1394: hypothetical_entry.stopped (p_week_number) := 'TRUE';
1395: --
1396: hr_utility.trace ('Entry is STOPPED');
1397: --
1398: if l_dummy.reason=max_aspp
1399: and hypothetical_entry.week_commencing (p_week_number) < l_dummy.withhold_from
1400: then

Line 1402: hr_utility.trace('ssp_apad_pkg.Check_APAB_stoppages Partial Week Payment');

1398: if l_dummy.reason=max_aspp
1399: and hypothetical_entry.week_commencing (p_week_number) < l_dummy.withhold_from
1400: then
1401: hypothetical_entry.stopped (p_week_number) := 'PARTIAL';
1402: hr_utility.trace('ssp_apad_pkg.Check_APAB_stoppages Partial Week Payment');
1403: end if;
1404: -- Keep a tally of the number of stopped weeks
1405: --
1406: l_stopped_weeks := l_stopped_weeks +1;

Line 1420: hr_utility.set_location ('ssp_APAD_pkg.Check_APAD_stoppages',10);

1416: end if;
1417: --
1418: close csr_stoppages;
1419: --
1420: hr_utility.set_location ('ssp_APAD_pkg.Check_APAD_stoppages',10);
1421: --
1422: end Check_APAD_stoppages;
1423: --
1424: procedure Calculate_correct_APAD_rate (p_week_number in number) is

Line 1438: hr_utility.set_location ('ssp_APAD_pkg.Calculate_correct_APAD_rate',1);

1434: and lookup_code = p_rate_band;
1435: --
1436: begin
1437: --
1438: hr_utility.set_location ('ssp_APAD_pkg.Calculate_correct_APAD_rate',1);
1439: --
1440: if l_high_rate is null then
1441: --
1442: -- Get the meanings for the rate bands

Line 1456: hr_utility.set_location ('ssp_smp_pkg.Calculate_correct_SMP_rate',1);

1452: /*
1453: if (p_week_number - l_stopped_weeks)
1454: <= g_SMP_element.period_at_higher_rate
1455: then
1456: hr_utility.set_location ('ssp_smp_pkg.Calculate_correct_SMP_rate',1);
1457: --
1458: -- We have not yet given the employee all their higher rate weeks
1459: --
1460: */

Line 1468: hr_utility.trace ('APAD Rate = '

1464: hypothetical_entry.rate (p_week_number) := l_low_rate;
1465: end if;
1466: */
1467: --
1468: hr_utility.trace ('APAD Rate = '
1469: ||hypothetical_entry.rate (p_week_number));
1470: --
1471: hr_utility.set_location ('ssp_APAD_pkg.Calculate_correct_APAD_rate',10);
1472: --

Line 1471: hr_utility.set_location ('ssp_APAD_pkg.Calculate_correct_APAD_rate',10);

1467: --
1468: hr_utility.trace ('APAD Rate = '
1469: ||hypothetical_entry.rate (p_week_number));
1470: --
1471: hr_utility.set_location ('ssp_APAD_pkg.Calculate_correct_APAD_rate',10);
1472: --
1473: end Calculate_correct_APAD_rate;
1474: --
1475: procedure Calculate_APAD_amounts (p_week_number in integer, p_ASPP_start_date in date) is

Line 1480: hr_utility.set_location('Entering: ssp_apad_pkg.Calculate_apad_amounts',1);

1476: --
1477: l_days_in_week number := 0;
1478: begin
1479: --
1480: hr_utility.set_location('Entering: ssp_apad_pkg.Calculate_apad_amounts',1);
1481: --
1482: -- Get the APAD element for each week in case the APAD rate has changed
1483: --
1484: get_APAD_element (hypothetical_entry.week_commencing (p_week_number));

Line 1516: hr_utility.trace ('APAD amount = '

1512: ,2);
1513: end if;
1514: end if;
1515: --
1516: hr_utility.trace ('APAD amount = '
1517: ||to_char (hypothetical_entry.amount (p_week_number)));
1518: hr_utility.trace ('Recoverable amount = '
1519: ||to_char (hypothetical_entry.recoverable_amount (p_week_number)));
1520: --

Line 1518: hr_utility.trace ('Recoverable amount = '

1514: end if;
1515: --
1516: hr_utility.trace ('APAD amount = '
1517: ||to_char (hypothetical_entry.amount (p_week_number)));
1518: hr_utility.trace ('Recoverable amount = '
1519: ||to_char (hypothetical_entry.recoverable_amount (p_week_number)));
1520: --
1521: hr_utility.set_location('Leaving : ssp_APAD_pkg.Calculate_APAD_amounts',100);
1522: --

Line 1521: hr_utility.set_location('Leaving : ssp_APAD_pkg.Calculate_APAD_amounts',100);

1517: ||to_char (hypothetical_entry.amount (p_week_number)));
1518: hr_utility.trace ('Recoverable amount = '
1519: ||to_char (hypothetical_entry.recoverable_amount (p_week_number)));
1520: --
1521: hr_utility.set_location('Leaving : ssp_APAD_pkg.Calculate_APAD_amounts',100);
1522: --
1523: end calculate_APAD_amounts;
1524: --
1525: procedure check_parameters is

Line 1536: hr_utility.set_location ('ssp_APAD_pkg.generate_payments',1);

1532: end check_parameters;
1533: --
1534: begin
1535: --
1536: hr_utility.set_location ('ssp_APAD_pkg.generate_payments',1);
1537: --
1538: check_parameters;
1539: --
1540: <>

Line 1640: hr_utility.set_location (l_proc,1);

1636: l_proc varchar2 (72) := g_package||'APAD_control';
1637: --
1638: begin
1639: --
1640: hr_utility.set_location (l_proc,1);
1641: --
1642: open csr_maternity;
1643: fetch csr_maternity into l_dummy;
1644:

Line 1668: hr_utility.trace (l_proc||' Deleting element entry_id '||

1664: -- The maternity may have been deleted. Remove any element entries associated
1665: -- with it (the absences, stoppages and medicals are handled by constraints).
1666: --
1667: for obsolete in csr_entries LOOP
1668: hr_utility.trace (l_proc||' Deleting element entry_id '||
1669: to_char (obsolete.element_entry_id));
1670: hr_utility.trace (l_proc||'-------------------------------------------');
1671: --
1672: hr_entry_api.delete_element_entry (

Line 1670: hr_utility.trace (l_proc||'-------------------------------------------');

1666: --
1667: for obsolete in csr_entries LOOP
1668: hr_utility.trace (l_proc||' Deleting element entry_id '||
1669: to_char (obsolete.element_entry_id));
1670: hr_utility.trace (l_proc||'-------------------------------------------');
1671: --
1672: hr_entry_api.delete_element_entry (
1673: p_dt_delete_mode => 'ZAP',
1674: p_session_date => obsolete.effective_start_date,

Line 1679: hr_utility.set_location (l_proc,100);

1675: p_element_entry_id => obsolete.element_entry_id);
1676: end loop;
1677: end if;
1678: --
1679: hr_utility.set_location (l_proc,100);
1680: --
1681: end APAD_control;
1682: --------------------------------------------------------------------------------
1683: end ssp_APAD_pkg;