DBA Data[Home] [Help]

APPS.SSP_APAB_PKG dependencies on HR_UTILITY

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

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

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

162: end check_parameters;
163: --
164: begin
165: --
166: hr_utility.set_location (l_proc,1);
167: --
168: check_parameters;
169: --
170: open csr_APAB_element_details (p_effective_date,c_APAB_corr_element_name);

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

170: open csr_APAB_element_details (p_effective_date,c_APAB_corr_element_name);
171: fetch csr_APAB_element_details into g_APAB_Correction_element;
172: close csr_APAB_element_details;
173: --
174: hr_utility.set_location (l_proc,100);
175: --
176: end get_APAB_correction_element;
177: --------------------------------------------------------------------------------
178: procedure get_APAB_element (p_effective_date in date) is

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

181: --
182: procedure check_parameters is
183: begin
184: --
185: hr_utility.trace (l_proc||' p_effective_date = '
186: ||to_char (p_effective_date));
187: --
188: hr_api.mandatory_arg_error (
189: p_api_name => l_proc,

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

192: end check_parameters;
193: --
194: begin
195: --
196: hr_utility.set_location (l_proc,1);
197: --
198: check_parameters;
199: --
200: open csr_APAB_element_details (p_effective_date,c_APAB_element_name);

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

200: open csr_APAB_element_details (p_effective_date,c_APAB_element_name);
201: fetch csr_APAB_element_details into g_APAB_element;
202: close csr_APAB_element_details;
203: --
204: hr_utility.set_location (l_proc,100);
205: --
206: end get_APAB_element;
207: --------------------------------------------------------------------------------
208: function EARLIEST_ASPPP_START_DATE (p_birth_date in date) return date is

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

340: and effective_date = l_effective_date;
341: --
342: begin
343: --
344: hr_utility.set_location ('Entering '||l_proc,1);
345: --
346: l_effective_date := greatest(person.QW, person.date_start);
347: --
348: open csr_average_earnings;

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

361: end if;
362: --
363: close csr_average_earnings;
364: --
365: hr_utility.set_location ('Leaving '||l_proc,10);
366: --
367: return l_average_earnings;
368: --
369: end average_earnings;

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

448: procedure check_parameters is
449: --
450: begin
451: --
452: hr_utility.trace (l_proc||' p_reason = '||p_reason);
453: hr_utility.trace (l_proc||' withhold from '||to_char (p_withhold_from));
454: hr_utility.trace (l_proc||' withhold to '||to_char (p_withhold_to));
455: --
456: hr_api.mandatory_arg_error (

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

449: --
450: begin
451: --
452: hr_utility.trace (l_proc||' p_reason = '||p_reason);
453: hr_utility.trace (l_proc||' withhold from '||to_char (p_withhold_from));
454: hr_utility.trace (l_proc||' withhold to '||to_char (p_withhold_to));
455: --
456: hr_api.mandatory_arg_error (
457: p_api_name => l_proc,

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

450: begin
451: --
452: hr_utility.trace (l_proc||' p_reason = '||p_reason);
453: hr_utility.trace (l_proc||' withhold from '||to_char (p_withhold_from));
454: hr_utility.trace (l_proc||' withhold to '||to_char (p_withhold_to));
455: --
456: hr_api.mandatory_arg_error (
457: p_api_name => l_proc,
458: p_argument => 'reason',

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

466: end check_parameters;
467: --
468: begin
469: --
470: hr_utility.set_location (l_proc,1);
471: --
472: check_parameters;
473: --
474: l_reason_id := ssp_smp_support_pkg.withholding_reason_id (

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

491: p_maternity_id => p_maternity_id,
492: p_user_entered => 'N',
493: p_reason_id => l_reason_id);
494: else
495: hr_utility.trace (l_proc||' Stoppage is overridden');
496: end if;
497: --
498: hr_utility.set_location (l_proc,100);
499: --

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

494: else
495: hr_utility.trace (l_proc||' Stoppage is overridden');
496: end if;
497: --
498: hr_utility.set_location (l_proc,100);
499: --
500: end create_stoppage;
501: --
502: procedure remove_stoppages is

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

514: l_proc varchar2 (72) := g_package||'remove_stoppages';
515: --
516: begin
517: --
518: hr_utility.set_location (l_proc,1);
519: --
520: for each_stoppage in csr_stoppages LOOP
521: ssp_stp_del.del (p_stoppage_id => each_stoppage.stoppage_id,
522: p_object_version_number => l_dummy);

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

521: ssp_stp_del.del (p_stoppage_id => each_stoppage.stoppage_id,
522: p_object_version_number => l_dummy);
523: end loop;
524: --
525: hr_utility.set_location (l_proc,100);
526: --
527: end remove_stoppages;
528: --
529: procedure check_employment_end is

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

541: l_proc varchar2(72) := g_package||'check_employment_end';
542: --
543: begin
544: --
545: hr_utility.set_location (l_proc,1);
546: --
547: open csr_termination_date;
548: fetch csr_termination_date into l_termination_date;
549: close csr_termination_date;

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

556: create_stoppage (p_withhold_from => person.ASPP_start_date,
557: p_reason => 'Not employed on APL First week');
558: end if;
559: --
560: hr_utility.set_location (l_proc,100);
561: --
562: end check_employment_end;
563: --
564: procedure check_continuity_rule is

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

580: l_proc varchar2 (72) := g_package||'check_continuity_rule';
581: --
582: begin
583: --
584: hr_utility.set_location (l_proc,1);
585: --
586: open period_of_service;
587: fetch period_of_service into l_dummy;
588: --

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

596: end if;
597: --
598: close period_of_service;
599: --
600: hr_utility.set_location (l_proc,100);
601: --
602: end check_continuity_rule;
603: --
604: procedure check_partner_mpp_days is

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

609: l_APAB_element csr_APAB_element_details%rowtype;
610: --
611: begin
612: --
613: hr_utility.set_location (l_proc,1);
614: --
615: open csr_APAB_element_details (person.actual_birth_date,c_APAB_element_name);
616: fetch csr_APAB_element_details into l_APAB_element;
617: close csr_APAB_element_details;

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

623: create_stoppage (p_withhold_from => person.ASPP_start_date ,
624: p_reason => 'Partner MPP less than 2 weeks');
625: end if;
626: --
627: hr_utility.set_location (l_proc,100);
628: --
629: end check_partner_mpp_days;
630:
631: procedure check_start_date is

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

636: l_mother_death varchar2(2) := 'N';
637: --
638: begin
639: --
640: hr_utility.set_location (l_proc,1);
641: --
642: open csr_APAB_element_details (person.actual_birth_date,c_APAB_element_name);
643: fetch csr_APAB_element_details into l_APAB_element;
644: close csr_APAB_element_details;

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

641: --
642: open csr_APAB_element_details (person.actual_birth_date,c_APAB_element_name);
643: fetch csr_APAB_element_details into l_APAB_element;
644: close csr_APAB_element_details;
645: hr_utility.set_location (l_proc,2);
646: --
647: l_partner_mpp_end_date := partner_mpp_end_date(person.partner_stat_pay_start_date, null);
648: hr_utility.set_location (l_proc,3);
649:

Line 648: hr_utility.set_location (l_proc,3);

644: close csr_APAB_element_details;
645: hr_utility.set_location (l_proc,2);
646: --
647: l_partner_mpp_end_date := partner_mpp_end_date(person.partner_stat_pay_start_date, null);
648: hr_utility.set_location (l_proc,3);
649:
650: if person.partner_date_of_death is not null and
651: add_months(person.actual_birth_date, 12) > person.partner_date_of_death
652: then

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

649:
650: if person.partner_date_of_death is not null and
651: add_months(person.actual_birth_date, 12) > person.partner_date_of_death
652: then
653: hr_utility.set_location (l_proc,4);
654: l_mother_death := 'Y';
655: end if;
656:
657: hr_utility.set_location (l_proc,5);

Line 657: hr_utility.set_location (l_proc,5);

653: hr_utility.set_location (l_proc,4);
654: l_mother_death := 'Y';
655: end if;
656:
657: hr_utility.set_location (l_proc,5);
658: if person.ASPP_start_date > l_partner_mpp_end_date
659: then
660: hr_utility.set_location (l_proc,6);
661: create_stoppage (p_withhold_from => person.ASPP_start_date,

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

656:
657: hr_utility.set_location (l_proc,5);
658: if person.ASPP_start_date > l_partner_mpp_end_date
659: then
660: hr_utility.set_location (l_proc,6);
661: create_stoppage (p_withhold_from => person.ASPP_start_date,
662: p_reason => 'Partner Max MPP weeks over');
663: else
664: if ((person.ASPP_start_date + (l_APAB_element.MAX_APL_WEEKS*7) > l_partner_mpp_end_date ) and

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

663: else
664: if ((person.ASPP_start_date + (l_APAB_element.MAX_APL_WEEKS*7) > l_partner_mpp_end_date ) and
665: (l_mother_death = 'N'))
666: then
667: hr_utility.set_location (l_proc,7);
668: create_stoppage (p_withhold_from => l_partner_mpp_end_date,
669: p_reason => 'Max ASPP Period Exceeded');
670: end if;
671:

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

671:
672: if ((person.ASPP_start_date + (l_APAB_element.MAX_APL_MOM_DEATH_WEEKS*7) > l_partner_mpp_end_date ) and
673: (l_mother_death = 'Y'))
674: then
675: hr_utility.set_location (l_proc,8);
676: create_stoppage (p_withhold_from => l_partner_mpp_end_date,
677: p_reason => 'Max ASPP Period Exceeded');
678: end if;
679: end if;

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

678: end if;
679: end if;
680:
681: --
682: hr_utility.set_location (l_proc,100);
683: --
684: end check_start_date;
685:
686: --

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

699: l_death_date date;
700: --
701: begin
702: --
703: hr_utility.set_location (l_proc,1);
704: --
705: -- APAB ceases on the Saturday following death
706: --
707: l_death_date := null;

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

715: person.ASPP_start_date, l_death_date) +1,
716: p_reason => 'Employee died');
717: end if;
718: --
719: hr_utility.set_location (l_proc,100);
720: --
721: end check_death;
722: --
723: procedure check_child_death is

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

723: procedure check_child_death is
724: l_proc varchar2 (72) := g_package||'check_child_death';
725: l_stop_from date;
726: begin
727: hr_utility.set_location (l_proc,1);
728: if person.death_of_child is not null
729: then
730: if person.ASPP_start_date > person.death_of_child then
731: l_stop_from := person.ASPP_start_date;

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

735: end if;
736: create_stoppage (p_withhold_from => l_stop_from,
737: p_reason => 'Death of the child');
738: end if;
739: hr_utility.set_location (l_proc,100);
740: end check_child_death;
741: --
742: procedure check_average_earnings is
743: --

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

749: earnings_not_derived exception;
750: --
751: begin
752: --
753: hr_utility.set_location (l_proc,1);
754: --
755: if l_average_earnings = 0
756: then
757: --

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

780: create_stoppage (p_withhold_from => person.ASPP_start_date,
781: p_reason => 'Earnings too low');
782: end if;
783: --
784: hr_utility.set_location (l_proc,100);
785: --
786: exception
787: --
788: when earnings_not_derived then

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

788: when earnings_not_derived then
789: --
790: -- Exit silently from this procedure
791: --
792: hr_utility.trace (l_proc||' Earnings not derived');
793: null;
794: --
795: end check_average_earnings;
796: --

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

801: l_proc varchar2 (72) := g_package||'check_birth_confirmation';
802: --
803: begin
804: --
805: hr_utility.set_location (l_proc,1);
806: --
807: hr_utility.set_location (l_proc,100);
808: --
809: end check_birth_confirmation;

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

803: begin
804: --
805: hr_utility.set_location (l_proc,1);
806: --
807: hr_utility.set_location (l_proc,100);
808: --
809: end check_birth_confirmation;
810: --
811: procedure check_parameters is

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

811: procedure check_parameters is
812: --
813: begin
814: --
815: hr_utility.trace (l_proc||' p_maternity_id = '
816: ||to_char (p_maternity_id));
817: --
818: hr_api.mandatory_arg_error (
819: p_api_name => l_proc,

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

823: end check_parameters;
824: --
825: begin
826: --
827: hr_utility.set_location (l_proc,1);
828: --
829: check_parameters;
830: --
831: -- Get the details of the woman and her maternity.

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

839: -- If no maternity record exists then there can be no entitlement to ASPP
840: --
841: close csr_personal_details;
842: --
843: hr_utility.trace (l_proc||' Person has no maternity record - exiting');
844: --
845: raise no_prima_facia_entitlement;
846: end if;
847: --

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

850: if person.ASPP_start_date is null then
851: --
852: -- If the ASPPP has not started then there is no entitlement to ASPP.
853: --
854: hr_utility.trace (l_proc||' Person has no APP start date - exiting');
855: --
856: raise no_prima_facia_entitlement;
857: end if;
858: --

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

871: fetch csr_check_if_existing_entries into l_existing_entries;
872: --
873: if csr_check_if_existing_entries%NOTFOUND
874: then
875: hr_utility.trace (l_proc||' Person has not stopped work - exiting');
876: raise no_prima_facia_entitlement;
877: end if;
878: --
879: -- if entries are found then the absence has been deleted and entries remain

Line 893: hr_utility.set_location ('ssp_apab_pkg.entitled_to_APAB',2);

889: --
890: -- Having established a prima facia entitlement to ASPP, perform checks which
891: -- may lead to creation of stoppages for particular periods.
892: --
893: hr_utility.set_location ('ssp_apab_pkg.entitled_to_APAB',2);
894: --
895: -- Get the ASPPB Element legislative parameters.
896: --
897: get_APAB_element (person.due_date);

Line 929: hr_utility.set_location ('ssp_apab_pkg.entitled_to_apab',3);

925: -- p_withhold_to => ssp_smp_support_pkg.end_of_week (stoppage_end_date),
926: p_reason => 'Late absence notification');
927: end if;*/
928: --
929: hr_utility.set_location ('ssp_apab_pkg.entitled_to_apab',3);
930: --
931: -- Check for any work done during the ASPP.
932: --
933: if csr_absence_details%rowcount = 1

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

1133: l_proc varchar2 (72) := g_package||'.remove_stoppages';
1134: --
1135: begin
1136: --
1137: hr_utility.set_location (l_proc,1);
1138: --
1139: for each_stoppage in csr_stoppages LOOP
1140: ssp_stp_del.del (p_stoppage_id => each_stoppage.stoppage_id,
1141: p_object_version_number => l_dummy);

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

1141: p_object_version_number => l_dummy);
1142:
1143: end loop;
1144: --
1145: hr_utility.set_location (l_proc,100);
1146: --
1147: end remove_stoppages;
1148: --
1149: begin

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

1147: end remove_stoppages;
1148: --
1149: begin
1150: --
1151: hr_utility.set_location('Entering: '||l_proc,10);
1152: --
1153: get_APAB_correction_element (person.due_date);
1154: --
1155: -- Check each existing ASPP entry in turn against all the potential new ones.

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

1186: = hypothetical_entry.week_commencing (entry_number)
1187: and not hypothetical_entry.stopped (entry_number) = 'TRUE'
1188: and ssp_smp_pkg.g_smp_update = 'Y'));
1189: end loop;
1190: hr_utility.trace (l_proc||' Old entry / Hypo entry time Match with values:');
1191: hr_utility.trace (l_proc||' Rate: ' ||old_entry.rate||' / '
1192: ||hypothetical_entry.rate (Entry_number));
1193: hr_utility.trace (l_proc||' Amount: '
1194: ||old_entry.amount||' / '

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

1187: and not hypothetical_entry.stopped (entry_number) = 'TRUE'
1188: and ssp_smp_pkg.g_smp_update = 'Y'));
1189: end loop;
1190: hr_utility.trace (l_proc||' Old entry / Hypo entry time Match with values:');
1191: hr_utility.trace (l_proc||' Rate: ' ||old_entry.rate||' / '
1192: ||hypothetical_entry.rate (Entry_number));
1193: hr_utility.trace (l_proc||' Amount: '
1194: ||old_entry.amount||' / '
1195: ||hypothetical_entry.amount (entry_number));

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

1189: end loop;
1190: hr_utility.trace (l_proc||' Old entry / Hypo entry time Match with values:');
1191: hr_utility.trace (l_proc||' Rate: ' ||old_entry.rate||' / '
1192: ||hypothetical_entry.rate (Entry_number));
1193: hr_utility.trace (l_proc||' Amount: '
1194: ||old_entry.amount||' / '
1195: ||hypothetical_entry.amount (entry_number));
1196: hr_utility.trace (l_proc||' Recoverable: '
1197: ||old_entry.recoverable_amount||' / '

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

1192: ||hypothetical_entry.rate (Entry_number));
1193: hr_utility.trace (l_proc||' Amount: '
1194: ||old_entry.amount||' / '
1195: ||hypothetical_entry.amount (entry_number));
1196: hr_utility.trace (l_proc||' Recoverable: '
1197: ||old_entry.recoverable_amount||' / '
1198: ||hypothetical_entry.recoverable_amount (entry_number));
1199: hr_utility.trace (l_proc||' Week Comm: '
1200: ||hypothetical_entry.week_commencing (entry_number) );

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

1195: ||hypothetical_entry.amount (entry_number));
1196: hr_utility.trace (l_proc||' Recoverable: '
1197: ||old_entry.recoverable_amount||' / '
1198: ||hypothetical_entry.recoverable_amount (entry_number));
1199: hr_utility.trace (l_proc||' Week Comm: '
1200: ||hypothetical_entry.week_commencing (entry_number) );
1201: --A hypo entry covers the same week as the old one
1202: if old_entry.rate = hypothetical_entry.rate (entry_number)
1203: and old_entry.amount = hypothetical_entry.amount(entry_number)

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

1207: -- the hypo entry has the same values as the old one
1208: -- don't create a correction element.
1209: -- don't create a new entry
1210: hypothetical_entry.dealt_with (entry_number) := 'TRUE';
1211: hr_utility.trace (l_proc||' leave unchanged');
1212: else
1213: if ssp_smp_support_pkg.entry_already_processed
1214: (old_entry.element_entry_id)
1215: then

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

1213: if ssp_smp_support_pkg.entry_already_processed
1214: (old_entry.element_entry_id)
1215: then
1216: l_ins_corr_ele := TRUE;
1217: hr_utility.trace (l_proc||' processed - correct it');
1218: else
1219: -- update old entry
1220: hr_utility.trace (l_proc||' unprocessed - update it');
1221: hr_entry_api.update_element_entry (

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

1216: l_ins_corr_ele := TRUE;
1217: hr_utility.trace (l_proc||' processed - correct it');
1218: else
1219: -- update old entry
1220: hr_utility.trace (l_proc||' unprocessed - update it');
1221: hr_entry_api.update_element_entry (
1222: p_dt_update_mode => 'CORRECTION',
1223: p_session_date => old_entry.effective_start_date,
1224: p_element_entry_id => old_entry.element_entry_id,

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

1239: when no_data_found then
1240: -- There was no new entry which exactly matched the old entry.
1241: -- or we are deleting.
1242: entry_number := null;
1243: hr_utility.trace (l_proc||' No Old entry - Hypo entry time Match');
1244: hr_utility.trace (l_proc||' or p_deleting is true');
1245: hr_utility.trace (l_proc||' Old entry values:');
1246: hr_utility.trace (l_proc||' Rate: '||old_entry.rate);
1247: hr_utility.trace (l_proc||' Amount: '||old_entry.amount);

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

1240: -- There was no new entry which exactly matched the old entry.
1241: -- or we are deleting.
1242: entry_number := null;
1243: hr_utility.trace (l_proc||' No Old entry - Hypo entry time Match');
1244: hr_utility.trace (l_proc||' or p_deleting is true');
1245: hr_utility.trace (l_proc||' Old entry values:');
1246: hr_utility.trace (l_proc||' Rate: '||old_entry.rate);
1247: hr_utility.trace (l_proc||' Amount: '||old_entry.amount);
1248: hr_utility.trace (l_proc||' Recoverable: '

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

1241: -- or we are deleting.
1242: entry_number := null;
1243: hr_utility.trace (l_proc||' No Old entry - Hypo entry time Match');
1244: hr_utility.trace (l_proc||' or p_deleting is true');
1245: hr_utility.trace (l_proc||' Old entry values:');
1246: hr_utility.trace (l_proc||' Rate: '||old_entry.rate);
1247: hr_utility.trace (l_proc||' Amount: '||old_entry.amount);
1248: hr_utility.trace (l_proc||' Recoverable: '
1249: ||old_entry.recoverable_amount);

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

1242: entry_number := null;
1243: hr_utility.trace (l_proc||' No Old entry - Hypo entry time Match');
1244: hr_utility.trace (l_proc||' or p_deleting is true');
1245: hr_utility.trace (l_proc||' Old entry values:');
1246: hr_utility.trace (l_proc||' Rate: '||old_entry.rate);
1247: hr_utility.trace (l_proc||' Amount: '||old_entry.amount);
1248: hr_utility.trace (l_proc||' Recoverable: '
1249: ||old_entry.recoverable_amount);
1250: if ssp_smp_support_pkg.entry_already_processed

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

1243: hr_utility.trace (l_proc||' No Old entry - Hypo entry time Match');
1244: hr_utility.trace (l_proc||' or p_deleting is true');
1245: hr_utility.trace (l_proc||' Old entry values:');
1246: hr_utility.trace (l_proc||' Rate: '||old_entry.rate);
1247: hr_utility.trace (l_proc||' Amount: '||old_entry.amount);
1248: hr_utility.trace (l_proc||' Recoverable: '
1249: ||old_entry.recoverable_amount);
1250: if ssp_smp_support_pkg.entry_already_processed
1251: (old_entry.element_entry_id)

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

1244: hr_utility.trace (l_proc||' or p_deleting is true');
1245: hr_utility.trace (l_proc||' Old entry values:');
1246: hr_utility.trace (l_proc||' Rate: '||old_entry.rate);
1247: hr_utility.trace (l_proc||' Amount: '||old_entry.amount);
1248: hr_utility.trace (l_proc||' Recoverable: '
1249: ||old_entry.recoverable_amount);
1250: if ssp_smp_support_pkg.entry_already_processed
1251: (old_entry.element_entry_id)
1252: then l_ins_corr_ele := TRUE;

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

1249: ||old_entry.recoverable_amount);
1250: if ssp_smp_support_pkg.entry_already_processed
1251: (old_entry.element_entry_id)
1252: then l_ins_corr_ele := TRUE;
1253: hr_utility.trace (l_proc||' Old entry already processed');
1254: else
1255: hr_utility.trace (l_proc||' Old entry NOT already processed');
1256: --Old entry not already processed so delete it
1257: hr_entry_api.delete_element_entry (

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

1251: (old_entry.element_entry_id)
1252: then l_ins_corr_ele := TRUE;
1253: hr_utility.trace (l_proc||' Old entry already processed');
1254: else
1255: hr_utility.trace (l_proc||' Old entry NOT already processed');
1256: --Old entry not already processed so delete it
1257: hr_entry_api.delete_element_entry (
1258: p_dt_delete_mode => 'ZAP',
1259: p_session_date => old_entry.effective_start_date,

Line 1268: hr_utility.trace (l_proc ||

1264: then
1265: -- Create a correction element to reverse the old entry. Then create a
1266: -- brand new entry with the correct values.
1267: --
1268: hr_utility.trace (l_proc ||
1269: ' Inserting CORRECTION entry for week commencing ' ||
1270: to_char (old_entry.week_commencing));
1271: hr_utility.trace (l_proc||' Old value / New value:');
1272: if entry_number is null then

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

1267: --
1268: hr_utility.trace (l_proc ||
1269: ' Inserting CORRECTION entry for week commencing ' ||
1270: to_char (old_entry.week_commencing));
1271: hr_utility.trace (l_proc||' Old value / New value:');
1272: if entry_number is null then
1273: hr_utility.trace (l_proc||' Rate: '
1274: ||old_entry.rate||' / NA');
1275: hr_utility.trace (l_proc||' Amount: '

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

1269: ' Inserting CORRECTION entry for week commencing ' ||
1270: to_char (old_entry.week_commencing));
1271: hr_utility.trace (l_proc||' Old value / New value:');
1272: if entry_number is null then
1273: hr_utility.trace (l_proc||' Rate: '
1274: ||old_entry.rate||' / NA');
1275: hr_utility.trace (l_proc||' Amount: '
1276: ||old_entry.amount||' / NA');
1277: hr_utility.trace (l_proc||' Recoverable: '

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

1271: hr_utility.trace (l_proc||' Old value / New value:');
1272: if entry_number is null then
1273: hr_utility.trace (l_proc||' Rate: '
1274: ||old_entry.rate||' / NA');
1275: hr_utility.trace (l_proc||' Amount: '
1276: ||old_entry.amount||' / NA');
1277: hr_utility.trace (l_proc||' Recoverable: '
1278: ||old_entry.recoverable_amount||' / NA');
1279: else

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

1273: hr_utility.trace (l_proc||' Rate: '
1274: ||old_entry.rate||' / NA');
1275: hr_utility.trace (l_proc||' Amount: '
1276: ||old_entry.amount||' / NA');
1277: hr_utility.trace (l_proc||' Recoverable: '
1278: ||old_entry.recoverable_amount||' / NA');
1279: else
1280: hr_utility.trace (l_proc||' Rate: '
1281: ||old_entry.rate||' / '

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

1276: ||old_entry.amount||' / NA');
1277: hr_utility.trace (l_proc||' Recoverable: '
1278: ||old_entry.recoverable_amount||' / NA');
1279: else
1280: hr_utility.trace (l_proc||' Rate: '
1281: ||old_entry.rate||' / '
1282: ||hypothetical_entry.rate (Entry_number));
1283: hr_utility.trace (l_proc||' Amount: '
1284: ||old_entry.amount||' / '

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

1279: else
1280: hr_utility.trace (l_proc||' Rate: '
1281: ||old_entry.rate||' / '
1282: ||hypothetical_entry.rate (Entry_number));
1283: hr_utility.trace (l_proc||' Amount: '
1284: ||old_entry.amount||' / '
1285: ||hypothetical_entry.amount (entry_number));
1286: hr_utility.trace (l_proc||' Recoverable: '
1287: ||old_entry.recoverable_amount||' /'

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

1282: ||hypothetical_entry.rate (Entry_number));
1283: hr_utility.trace (l_proc||' Amount: '
1284: ||old_entry.amount||' / '
1285: ||hypothetical_entry.amount (entry_number));
1286: hr_utility.trace (l_proc||' Recoverable: '
1287: ||old_entry.recoverable_amount||' /'
1288: ||hypothetical_entry.recoverable_amount (entry_number));
1289: end if;
1290: --

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

1335: -- Having been through all the existing entries, we now check that we
1336: -- have dealt with all the newly derived entries by inserting any which
1337: -- were not flagged as dealt with during the above actions.
1338: --
1339: hr_utility.set_location (l_proc,20);
1340: --
1341: <>
1342: begin
1343: if p_deleting then

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

1340: --
1341: <>
1342: begin
1343: if p_deleting then
1344: hr_utility.trace('Deleting an absence so don''t insert entries');
1345: else
1346: for new_entry in 1..l_max_asppp_weeks LOOP
1347:
1348: if (not hypothetical_entry.dealt_with (new_entry) = 'TRUE')

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

1391: if l_no_of_absence_periods = 0 then
1392: remove_stoppages;
1393: end if;
1394: --
1395: hr_utility.set_location(' Leaving: '||l_proc,100);
1396: --
1397: end save_hypothetical_entries;
1398: --
1399: procedure derive_APAB_week (p_week_number in integer) is

Line 1407: hr_utility.set_location ('Entering: ssp_apab_pkg.derive_APAB_week',1);

1403: -- we are and finding the offset from the start date.
1404: --
1405: begin
1406: --
1407: hr_utility.set_location ('Entering: ssp_apab_pkg.derive_APAB_week',1);
1408: hr_utility.trace ('Entry number = '||to_char (p_week_number));
1409: --
1410: hypothetical_entry.week_commencing (p_week_number)
1411: := (person.ASPP_start_date + ((p_week_number -1) * 7));

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

1404: --
1405: begin
1406: --
1407: hr_utility.set_location ('Entering: ssp_apab_pkg.derive_APAB_week',1);
1408: hr_utility.trace ('Entry number = '||to_char (p_week_number));
1409: --
1410: hypothetical_entry.week_commencing (p_week_number)
1411: := (person.ASPP_start_date + ((p_week_number -1) * 7));
1412: --

Line 1418: hr_utility.trace ('week_commencing = '

1414: hypothetical_entry.stopped (p_week_number) := 'FALSE';
1415: hypothetical_entry.element_link_id (p_week_number) := null;
1416: hypothetical_entry.assignment_id (p_week_number) := null;
1417: --
1418: hr_utility.trace ('week_commencing = '
1419: ||to_char (hypothetical_entry.week_commencing (p_week_number)));
1420: --
1421: hr_utility.set_location ('Leaving : ssp_apab_pkg.derive_APAB_week',100);
1422: --

Line 1421: hr_utility.set_location ('Leaving : ssp_apab_pkg.derive_APAB_week',100);

1417: --
1418: hr_utility.trace ('week_commencing = '
1419: ||to_char (hypothetical_entry.week_commencing (p_week_number)));
1420: --
1421: hr_utility.set_location ('Leaving : ssp_apab_pkg.derive_APAB_week',100);
1422: --
1423: end derive_APAB_week;
1424: --
1425: procedure Check_APAB_stoppages (p_week_number in integer) is

Line 1460: hr_utility.set_location ('ssp_apab_pkg.Check_APAB_stoppages',1);

1456: l_dummy csr_stoppages%rowtype;
1457: --
1458: begin
1459: --
1460: hr_utility.set_location ('ssp_apab_pkg.Check_APAB_stoppages',1);
1461: --
1462: hypothetical_entry.stopped (p_week_number) := 'FALSE';
1463: --
1464: --

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

1475: -- is payable.
1476: --
1477: hypothetical_entry.stopped (p_week_number) := 'TRUE';
1478: --
1479: hr_utility.trace ('Entry is STOPPED');
1480: --
1481: if l_dummy.reason=max_aspp
1482: and hypothetical_entry.week_commencing (p_week_number) < l_dummy.withhold_from
1483: then

Line 1485: hr_utility.trace('ssp_apab_pkg.Check_APAB_stoppages Partial Week Payment');

1481: if l_dummy.reason=max_aspp
1482: and hypothetical_entry.week_commencing (p_week_number) < l_dummy.withhold_from
1483: then
1484: hypothetical_entry.stopped (p_week_number) := 'PARTIAL';
1485: hr_utility.trace('ssp_apab_pkg.Check_APAB_stoppages Partial Week Payment');
1486: end if;
1487: -- Keep a tally of the number of stopped weeks
1488: --
1489: l_stopped_weeks := l_stopped_weeks +1;

Line 1503: hr_utility.set_location ('ssp_apab_pkg.Check_APAB_stoppages',10);

1499: end if;
1500: --
1501: close csr_stoppages;
1502: --
1503: hr_utility.set_location ('ssp_apab_pkg.Check_APAB_stoppages',10);
1504: --
1505: end Check_APAB_stoppages;
1506: --
1507: procedure Calculate_correct_APAB_rate (p_week_number in number) is

Line 1521: hr_utility.set_location ('ssp_apab_pkg.Calculate_correct_APAB_rate',1);

1517: and lookup_code = p_rate_band;
1518: --
1519: begin
1520: --
1521: hr_utility.set_location ('ssp_apab_pkg.Calculate_correct_APAB_rate',1);
1522: --
1523: if l_high_rate is null then
1524: --
1525: -- Get the meanings for the rate bands

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

1535: /*
1536: if (p_week_number - l_stopped_weeks)
1537: <= g_SMP_element.period_at_higher_rate
1538: then
1539: hr_utility.set_location ('ssp_smp_pkg.Calculate_correct_SMP_rate',1);
1540: --
1541: -- We have not yet given the employee all their higher rate weeks
1542: --
1543: */

Line 1551: hr_utility.trace ('APAB Rate = '

1547: hypothetical_entry.rate (p_week_number) := l_low_rate;
1548: end if;
1549: */
1550: --
1551: hr_utility.trace ('APAB Rate = '
1552: ||hypothetical_entry.rate (p_week_number));
1553: --
1554: hr_utility.set_location ('ssp_apab_pkg.Calculate_correct_APAB_rate',10);
1555: --

Line 1554: hr_utility.set_location ('ssp_apab_pkg.Calculate_correct_APAB_rate',10);

1550: --
1551: hr_utility.trace ('APAB Rate = '
1552: ||hypothetical_entry.rate (p_week_number));
1553: --
1554: hr_utility.set_location ('ssp_apab_pkg.Calculate_correct_APAB_rate',10);
1555: --
1556: end Calculate_correct_APAB_rate;
1557: --
1558: procedure Calculate_APAB_amounts (p_week_number in integer, p_ASPP_start_date in date) is

Line 1563: hr_utility.set_location('Entering: ssp_apab_pkg.Calculate_apab_amounts',1);

1559: --
1560: l_days_in_week number := 0;
1561: begin
1562: --
1563: hr_utility.set_location('Entering: ssp_apab_pkg.Calculate_apab_amounts',1);
1564: --
1565: -- Get the ASPP element for each week in case the ASPP rate has changed
1566: --
1567: get_APAB_element (hypothetical_entry.week_commencing (p_week_number));

Line 1599: hr_utility.trace ('APAB amount = '

1595: ,2);
1596: end if;
1597: end if;
1598: --
1599: hr_utility.trace ('APAB amount = '
1600: ||to_char (hypothetical_entry.amount (p_week_number)));
1601: hr_utility.trace ('Recoverable amount = '
1602: ||to_char (hypothetical_entry.recoverable_amount (p_week_number)));
1603: --

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

1597: end if;
1598: --
1599: hr_utility.trace ('APAB amount = '
1600: ||to_char (hypothetical_entry.amount (p_week_number)));
1601: hr_utility.trace ('Recoverable amount = '
1602: ||to_char (hypothetical_entry.recoverable_amount (p_week_number)));
1603: --
1604: hr_utility.set_location('Leaving : ssp_apab_pkg.Calculate_APAB_amounts',100);
1605: --

Line 1604: hr_utility.set_location('Leaving : ssp_apab_pkg.Calculate_APAB_amounts',100);

1600: ||to_char (hypothetical_entry.amount (p_week_number)));
1601: hr_utility.trace ('Recoverable amount = '
1602: ||to_char (hypothetical_entry.recoverable_amount (p_week_number)));
1603: --
1604: hr_utility.set_location('Leaving : ssp_apab_pkg.Calculate_APAB_amounts',100);
1605: --
1606: end calculate_APAB_amounts;
1607: --
1608: procedure check_parameters is

Line 1619: hr_utility.set_location ('ssp_apab_pkg.generate_payments',1);

1615: end check_parameters;
1616: --
1617: begin
1618: --
1619: hr_utility.set_location ('ssp_apab_pkg.generate_payments',1);
1620: --
1621: check_parameters;
1622: --
1623: <>

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

1720: l_proc varchar2 (72) := g_package||'APAB_control';
1721: --
1722: begin
1723: --
1724: hr_utility.set_location (l_proc,1);
1725: --
1726: open csr_maternity;
1727: fetch csr_maternity into l_dummy;
1728: --

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

1748: -- The maternity may have been deleted. Remove any element entries associated
1749: -- with it (the absences, stoppages and medicals are handled by constraints).
1750: --
1751: for obsolete in csr_entries LOOP
1752: hr_utility.trace (l_proc||' Deleting element entry_id '||
1753: to_char (obsolete.element_entry_id));
1754: hr_utility.trace (l_proc||'-------------------------------------------');
1755: --
1756: hr_entry_api.delete_element_entry (

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

1750: --
1751: for obsolete in csr_entries LOOP
1752: hr_utility.trace (l_proc||' Deleting element entry_id '||
1753: to_char (obsolete.element_entry_id));
1754: hr_utility.trace (l_proc||'-------------------------------------------');
1755: --
1756: hr_entry_api.delete_element_entry (
1757: p_dt_delete_mode => 'ZAP',
1758: p_session_date => obsolete.effective_start_date,

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

1759: p_element_entry_id => obsolete.element_entry_id);
1760: end loop;
1761: end if;
1762: --
1763: hr_utility.set_location (l_proc,100);
1764: --
1765: end APAB_control;
1766: --------------------------------------------------------------------------------
1767: end ssp_APAB_pkg;