DBA Data[Home] [Help]

APPS.SSP_PAB_PKG dependencies on HR_UTILITY

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

164: --
165: procedure check_parameters is
166: begin
167: --
168: hr_utility.trace (l_proc||' p_effective_date = '
169: ||to_char (p_effective_date));
170: --
171: hr_api.mandatory_arg_error (
172: p_api_name => l_proc,

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

175: end check_parameters;
176: --
177: begin
178: --
179: hr_utility.set_location (l_proc,1);
180: --
181: check_parameters;
182: --
183: open csr_PAB_element_details (p_effective_date,c_PAB_corr_element_name);

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

183: open csr_PAB_element_details (p_effective_date,c_PAB_corr_element_name);
184: fetch csr_PAB_element_details into g_PAB_Correction_element;
185: close csr_PAB_element_details;
186: --
187: hr_utility.set_location (l_proc,100);
188: --
189: end get_PAB_correction_element;
190: --------------------------------------------------------------------------------
191: procedure get_PAB_element (p_effective_date in date) is

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

194: --
195: procedure check_parameters is
196: begin
197: --
198: hr_utility.trace (l_proc||' p_effective_date = '
199: ||to_char (p_effective_date));
200: --
201: hr_api.mandatory_arg_error (
202: p_api_name => l_proc,

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

205: end check_parameters;
206: --
207: begin
208: --
209: hr_utility.set_location (l_proc,1);
210: --
211: check_parameters;
212: --
213: open csr_PAB_element_details (p_effective_date,c_PAB_element_name);

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

213: open csr_PAB_element_details (p_effective_date,c_PAB_element_name);
214: fetch csr_PAB_element_details into g_PAB_element;
215: close csr_PAB_element_details;
216: --
217: hr_utility.set_location (l_proc,100);
218: --
219: end get_PAB_element;
220: --------------------------------------------------------------------------------
221: function EARLIEST_PPP_START_DATE (p_birth_date in date) return date is

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

315: and effective_date = l_effective_date;
316: --
317: begin
318: --
319: hr_utility.set_location ('Entering '||l_proc,1);
320: --
321: l_effective_date := greatest(person.QW, person.date_start);
322: --
323: open csr_average_earnings;

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

336: end if;
337: --
338: close csr_average_earnings;
339: --
340: hr_utility.set_location ('Leaving '||l_proc,10);
341: --
342: return l_average_earnings;
343: --
344: end average_earnings;

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

422: procedure check_parameters is
423: --
424: begin
425: --
426: hr_utility.trace (l_proc||' p_reason = '||p_reason);
427: hr_utility.trace (l_proc||' withhold from '||to_char (p_withhold_from));
428: hr_utility.trace (l_proc||' withhold to '||to_char (p_withhold_to));
429: --
430: hr_api.mandatory_arg_error (

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

423: --
424: begin
425: --
426: hr_utility.trace (l_proc||' p_reason = '||p_reason);
427: hr_utility.trace (l_proc||' withhold from '||to_char (p_withhold_from));
428: hr_utility.trace (l_proc||' withhold to '||to_char (p_withhold_to));
429: --
430: hr_api.mandatory_arg_error (
431: p_api_name => l_proc,

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

424: begin
425: --
426: hr_utility.trace (l_proc||' p_reason = '||p_reason);
427: hr_utility.trace (l_proc||' withhold from '||to_char (p_withhold_from));
428: hr_utility.trace (l_proc||' withhold to '||to_char (p_withhold_to));
429: --
430: hr_api.mandatory_arg_error (
431: p_api_name => l_proc,
432: p_argument => 'reason',

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

440: end check_parameters;
441: --
442: begin
443: --
444: hr_utility.set_location (l_proc,1);
445: --
446: check_parameters;
447: --
448: l_reason_id := ssp_smp_support_pkg.withholding_reason_id (

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

465: p_maternity_id => p_maternity_id,
466: p_user_entered => 'N',
467: p_reason_id => l_reason_id);
468: else
469: hr_utility.trace (l_proc||' Stoppage is overridden');
470: end if;
471: --
472: hr_utility.set_location (l_proc,100);
473: --

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

468: else
469: hr_utility.trace (l_proc||' Stoppage is overridden');
470: end if;
471: --
472: hr_utility.set_location (l_proc,100);
473: --
474: end create_stoppage;
475: --
476: procedure remove_stoppages is

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

488: l_proc varchar2 (72) := g_package||'remove_stoppages';
489: --
490: begin
491: --
492: hr_utility.set_location (l_proc,1);
493: --
494: for each_stoppage in csr_stoppages LOOP
495: ssp_stp_del.del (p_stoppage_id => each_stoppage.stoppage_id,
496: p_object_version_number => l_dummy);

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

495: ssp_stp_del.del (p_stoppage_id => each_stoppage.stoppage_id,
496: p_object_version_number => l_dummy);
497: end loop;
498: --
499: hr_utility.set_location (l_proc,100);
500: --
501: end remove_stoppages;
502: --
503: procedure check_employment_end is

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

515: l_proc varchar2(72) := g_package||'check_employment_end';
516: --
517: begin
518: --
519: hr_utility.set_location (l_proc,1);
520: --
521: open csr_termination_date;
522: fetch csr_termination_date into l_termination_date;
523: close csr_termination_date;

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

530: create_stoppage (p_withhold_from => person.actual_birth_date,
531: p_reason => 'Not employed on Birth Date');
532: end if;
533: --
534: hr_utility.set_location (l_proc,100);
535: --
536: end check_employment_end;
537: --
538: procedure check_continuity_rule is

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

554: l_proc varchar2 (72) := g_package||'check_continuity_rule';
555: --
556: begin
557: --
558: hr_utility.set_location (l_proc,1);
559: --
560: open period_of_service;
561: fetch period_of_service into l_dummy;
562: --

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

570: end if;
571: --
572: close period_of_service;
573: --
574: hr_utility.set_location (l_proc,100);
575: --
576: end check_continuity_rule;
577: --
578: procedure check_start_date is

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

583: l_PAB_element csr_PAB_element_details%rowtype;
584: --
585: begin
586: --
587: hr_utility.set_location (l_proc,1);
588: --
589: open csr_PAB_element_details (person.actual_birth_date,c_PAB_element_name);
590: fetch csr_PAB_element_details into l_PAB_element;
591: close csr_PAB_element_details;

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

598: p_reason => 'Max PPP Period Exceeded');
599:
600: end if;
601: --
602: hr_utility.set_location (l_proc,100);
603: --
604: end check_start_date;
605:
606: procedure check_stillbirth is

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

610: l_proc varchar2 (72) := g_package||'check_stillbirth';
611: --
612: begin
613: --
614: hr_utility.set_location (l_proc,1);
615: --
616: -- Woman must be still pregnant, have had a live birth, or have had a
617: -- stillbirth after the threshhold week to be eligible for PAB
618: --

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

628: create_stoppage (p_withhold_from => person.APP_start_date,
629: p_reason => 'Stillbirth');
630: end if;
631: --
632: hr_utility.set_location (l_proc,100);
633: --
634: end check_stillbirth;
635: --
636: procedure check_new_employer is

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

641: l_proc varchar2 (72) := g_package||'check_new_employer';
642: --
643: begin
644: --
645: hr_utility.set_location (l_proc,1);
646: --
647: if person.start_date_with_new_employer >= person.actual_birth_date then
648: --
649: -- Stop SAP payment from the start of the week in which the person

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

653: (person.start_date_with_new_employer),
654: p_reason => 'Worked for another employer');
655: end if;
656: --
657: hr_utility.set_location (l_proc,100);
658: --
659: end check_new_employer;
660: --
661: procedure check_maternity_allowance is

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

665: l_proc varchar2 (72) := g_package||'check_maternity_allowance';
666: --
667: begin
668: --
669: hr_utility.set_location (l_proc,1);
670: --
671: if person.start_date_maternity_allowance is not null then
672: --
673: -- Stop SAP payment from the start of the week in which SMA was first

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

677: (person.start_date_maternity_allowance),
678: p_reason => 'Employee is receiving SMA');
679: end if;
680: --
681: hr_utility.set_location (l_proc,100);
682: --
683: end check_maternity_allowance;
684: --
685: procedure check_death is

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

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

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

713: l_sunday),
714: p_reason => 'Employee died');
715: end if;
716: --
717: hr_utility.set_location (l_proc,100);
718: --
719: end check_death;
720: --
721: procedure check_average_earnings is

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

728: earnings_not_derived exception;
729: --
730: begin
731: --
732: hr_utility.set_location (l_proc,1);
733: --
734: if l_average_earnings = 0
735: then
736: --

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

759: create_stoppage (p_withhold_from => person.APP_start_date,
760: p_reason => 'Earnings too low');
761: end if;
762: --
763: hr_utility.set_location (l_proc,100);
764: --
765: exception
766: --
767: when earnings_not_derived then

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

767: when earnings_not_derived then
768: --
769: -- Exit silently from this procedure
770: --
771: hr_utility.trace (l_proc||' Earnings not derived');
772: null;
773: --
774: end check_average_earnings;
775: --

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

780: l_proc varchar2 (72) := g_package||'check_birth_confirmation';
781: --
782: begin
783: --
784: hr_utility.set_location (l_proc,1);
785: --
786: hr_utility.set_location (l_proc,100);
787: --
788: end check_birth_confirmation;

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

782: begin
783: --
784: hr_utility.set_location (l_proc,1);
785: --
786: hr_utility.set_location (l_proc,100);
787: --
788: end check_birth_confirmation;
789: --
790: procedure check_parameters is

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

790: procedure check_parameters is
791: --
792: begin
793: --
794: hr_utility.trace (l_proc||' p_maternity_id = '
795: ||to_char (p_maternity_id));
796: --
797: hr_api.mandatory_arg_error (
798: p_api_name => l_proc,

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

802: end check_parameters;
803: --
804: begin
805: --
806: hr_utility.set_location (l_proc,1);
807: --
808: check_parameters;
809: --
810: -- Get the details of the woman and her maternity.

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

818: -- If no maternity record exists then there can be no entitlement to SAP
819: --
820: close csr_personal_details;
821: --
822: hr_utility.trace (l_proc||' Person has no maternity record - exiting');
823: --
824: raise no_prima_facia_entitlement;
825: end if;
826: --

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

829: if person.APP_start_date is null then
830: --
831: -- If the APP has not started then there is no entitlement to SAP.
832: --
833: hr_utility.trace (l_proc||' Person has no APP start date - exiting');
834: --
835: raise no_prima_facia_entitlement;
836: end if;
837: --

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

850: fetch csr_check_if_existing_entries into l_existing_entries;
851: --
852: if csr_check_if_existing_entries%NOTFOUND
853: then
854: hr_utility.trace (l_proc||' Person has not stopped work - exiting');
855: raise no_prima_facia_entitlement;
856: end if;
857: --
858: -- if entries are found then the absence has been deleted and entries remain

Line 872: hr_utility.set_location ('ssp_smp_pkg.entitled_to_PAB',2);

868: --
869: -- Having established a prima facia entitlement to SAP, perform checks which
870: -- may lead to creation of stoppages for particular periods.
871: --
872: hr_utility.set_location ('ssp_smp_pkg.entitled_to_PAB',2);
873: --
874: -- Get the SAP legislative parameters.
875: --
876: get_PAB_element (person.due_date);

Line 917: hr_utility.set_location ('ssp_sap_pkg.entitled_to_SaP',3);

913: p_reason => 'Late absence notification');
914: */
915: end if;
916: --
917: hr_utility.set_location ('ssp_sap_pkg.entitled_to_SaP',3);
918: --
919: -- Check for any work done during the APP.
920: --
921: -- Check if this is the first absence period in the APP

Line 991: hr_utility.trace (l_proc||' ERROR: Invalid null absence end date');

987: else
988: --
989: -- This is not the last absence in the maternity but it has no end date.
990: --
991: hr_utility.trace (l_proc||' ERROR: Invalid null absence end date');
992: --
993: raise invalid_absence_date;
994: end if;
995: end if;

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

1175: l_proc varchar2 (72) := g_package||'.remove_stoppages';
1176: --
1177: begin
1178: --
1179: hr_utility.set_location (l_proc,1);
1180: --
1181: for each_stoppage in csr_stoppages LOOP
1182: ssp_stp_del.del (p_stoppage_id => each_stoppage.stoppage_id,
1183: p_object_version_number => l_dummy);

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

1183: p_object_version_number => l_dummy);
1184:
1185: end loop;
1186: --
1187: hr_utility.set_location (l_proc,100);
1188: --
1189: end remove_stoppages;
1190: --
1191: begin

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

1189: end remove_stoppages;
1190: --
1191: begin
1192: --
1193: hr_utility.set_location('Entering: '||l_proc,10);
1194: --
1195: get_PAB_correction_element (person.due_date);
1196: --
1197: -- Check each existing SaP entry in turn against all the potential new ones.

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

1228: = hypothetical_entry.week_commencing (entry_number)
1229: and not hypothetical_entry.stopped (entry_number) = 'TRUE'
1230: and ssp_smp_pkg.g_smp_update = 'Y'));
1231: end loop;
1232: hr_utility.trace (l_proc||' Old entry / Hypo entry time Match with values:');
1233: hr_utility.trace (l_proc||' Rate: ' ||old_entry.rate||' / '
1234: ||hypothetical_entry.rate (Entry_number));
1235: hr_utility.trace (l_proc||' Amount: '
1236: ||old_entry.amount||' / '

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

1229: and not hypothetical_entry.stopped (entry_number) = 'TRUE'
1230: and ssp_smp_pkg.g_smp_update = 'Y'));
1231: end loop;
1232: hr_utility.trace (l_proc||' Old entry / Hypo entry time Match with values:');
1233: hr_utility.trace (l_proc||' Rate: ' ||old_entry.rate||' / '
1234: ||hypothetical_entry.rate (Entry_number));
1235: hr_utility.trace (l_proc||' Amount: '
1236: ||old_entry.amount||' / '
1237: ||hypothetical_entry.amount (entry_number));

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

1231: end loop;
1232: hr_utility.trace (l_proc||' Old entry / Hypo entry time Match with values:');
1233: hr_utility.trace (l_proc||' Rate: ' ||old_entry.rate||' / '
1234: ||hypothetical_entry.rate (Entry_number));
1235: hr_utility.trace (l_proc||' Amount: '
1236: ||old_entry.amount||' / '
1237: ||hypothetical_entry.amount (entry_number));
1238: hr_utility.trace (l_proc||' Recoverable: '
1239: ||old_entry.recoverable_amount||' / '

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

1234: ||hypothetical_entry.rate (Entry_number));
1235: hr_utility.trace (l_proc||' Amount: '
1236: ||old_entry.amount||' / '
1237: ||hypothetical_entry.amount (entry_number));
1238: hr_utility.trace (l_proc||' Recoverable: '
1239: ||old_entry.recoverable_amount||' / '
1240: ||hypothetical_entry.recoverable_amount (entry_number));
1241: hr_utility.trace (l_proc||' Week Comm: '
1242: ||hypothetical_entry.week_commencing (entry_number) );

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

1237: ||hypothetical_entry.amount (entry_number));
1238: hr_utility.trace (l_proc||' Recoverable: '
1239: ||old_entry.recoverable_amount||' / '
1240: ||hypothetical_entry.recoverable_amount (entry_number));
1241: hr_utility.trace (l_proc||' Week Comm: '
1242: ||hypothetical_entry.week_commencing (entry_number) );
1243: --A hypo entry covers the same week as the old one
1244: if old_entry.rate = hypothetical_entry.rate (entry_number)
1245: and old_entry.amount = hypothetical_entry.amount(entry_number)

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

1249: -- the hypo entry has the same values as the old one
1250: -- don't create a correction element.
1251: -- don't create a new entry
1252: hypothetical_entry.dealt_with (entry_number) := 'TRUE';
1253: hr_utility.trace (l_proc||' leave unchanged');
1254: else
1255: if ssp_smp_support_pkg.entry_already_processed
1256: (old_entry.element_entry_id)
1257: then

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

1255: if ssp_smp_support_pkg.entry_already_processed
1256: (old_entry.element_entry_id)
1257: then
1258: l_ins_corr_ele := TRUE;
1259: hr_utility.trace (l_proc||' processed - correct it');
1260: else
1261: -- update old entry
1262: hr_utility.trace (l_proc||' unprocessed - update it');
1263: hr_entry_api.update_element_entry (

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

1258: l_ins_corr_ele := TRUE;
1259: hr_utility.trace (l_proc||' processed - correct it');
1260: else
1261: -- update old entry
1262: hr_utility.trace (l_proc||' unprocessed - update it');
1263: hr_entry_api.update_element_entry (
1264: p_dt_update_mode => 'CORRECTION',
1265: p_session_date => old_entry.effective_start_date,
1266: p_element_entry_id => old_entry.element_entry_id,

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

1281: when no_data_found then
1282: -- There was no new entry which exactly matched the old entry.
1283: -- or we are deleting.
1284: entry_number := null;
1285: hr_utility.trace (l_proc||' No Old entry - Hypo entry time Match');
1286: hr_utility.trace (l_proc||' or p_deleting is true');
1287: hr_utility.trace (l_proc||' Old entry values:');
1288: hr_utility.trace (l_proc||' Rate: '||old_entry.rate);
1289: hr_utility.trace (l_proc||' Amount: '||old_entry.amount);

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

1282: -- There was no new entry which exactly matched the old entry.
1283: -- or we are deleting.
1284: entry_number := null;
1285: hr_utility.trace (l_proc||' No Old entry - Hypo entry time Match');
1286: hr_utility.trace (l_proc||' or p_deleting is true');
1287: hr_utility.trace (l_proc||' Old entry values:');
1288: hr_utility.trace (l_proc||' Rate: '||old_entry.rate);
1289: hr_utility.trace (l_proc||' Amount: '||old_entry.amount);
1290: hr_utility.trace (l_proc||' Recoverable: '

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

1283: -- or we are deleting.
1284: entry_number := null;
1285: hr_utility.trace (l_proc||' No Old entry - Hypo entry time Match');
1286: hr_utility.trace (l_proc||' or p_deleting is true');
1287: hr_utility.trace (l_proc||' Old entry values:');
1288: hr_utility.trace (l_proc||' Rate: '||old_entry.rate);
1289: hr_utility.trace (l_proc||' Amount: '||old_entry.amount);
1290: hr_utility.trace (l_proc||' Recoverable: '
1291: ||old_entry.recoverable_amount);

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

1284: entry_number := null;
1285: hr_utility.trace (l_proc||' No Old entry - Hypo entry time Match');
1286: hr_utility.trace (l_proc||' or p_deleting is true');
1287: hr_utility.trace (l_proc||' Old entry values:');
1288: hr_utility.trace (l_proc||' Rate: '||old_entry.rate);
1289: hr_utility.trace (l_proc||' Amount: '||old_entry.amount);
1290: hr_utility.trace (l_proc||' Recoverable: '
1291: ||old_entry.recoverable_amount);
1292: if ssp_smp_support_pkg.entry_already_processed

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

1285: hr_utility.trace (l_proc||' No Old entry - Hypo entry time Match');
1286: hr_utility.trace (l_proc||' or p_deleting is true');
1287: hr_utility.trace (l_proc||' Old entry values:');
1288: hr_utility.trace (l_proc||' Rate: '||old_entry.rate);
1289: hr_utility.trace (l_proc||' Amount: '||old_entry.amount);
1290: hr_utility.trace (l_proc||' Recoverable: '
1291: ||old_entry.recoverable_amount);
1292: if ssp_smp_support_pkg.entry_already_processed
1293: (old_entry.element_entry_id)

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

1286: hr_utility.trace (l_proc||' or p_deleting is true');
1287: hr_utility.trace (l_proc||' Old entry values:');
1288: hr_utility.trace (l_proc||' Rate: '||old_entry.rate);
1289: hr_utility.trace (l_proc||' Amount: '||old_entry.amount);
1290: hr_utility.trace (l_proc||' Recoverable: '
1291: ||old_entry.recoverable_amount);
1292: if ssp_smp_support_pkg.entry_already_processed
1293: (old_entry.element_entry_id)
1294: then l_ins_corr_ele := TRUE;

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

1291: ||old_entry.recoverable_amount);
1292: if ssp_smp_support_pkg.entry_already_processed
1293: (old_entry.element_entry_id)
1294: then l_ins_corr_ele := TRUE;
1295: hr_utility.trace (l_proc||' Old entry already processed');
1296: else
1297: hr_utility.trace (l_proc||' Old entry NOT already processed');
1298: --Old entry not already processed so delete it
1299: hr_entry_api.delete_element_entry (

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

1293: (old_entry.element_entry_id)
1294: then l_ins_corr_ele := TRUE;
1295: hr_utility.trace (l_proc||' Old entry already processed');
1296: else
1297: hr_utility.trace (l_proc||' Old entry NOT already processed');
1298: --Old entry not already processed so delete it
1299: hr_entry_api.delete_element_entry (
1300: p_dt_delete_mode => 'ZAP',
1301: p_session_date => old_entry.effective_start_date,

Line 1310: hr_utility.trace (l_proc ||

1306: then
1307: -- Create a correction element to reverse the old entry. Then create a
1308: -- brand new entry with the correct values.
1309: --
1310: hr_utility.trace (l_proc ||
1311: ' Inserting CORRECTION entry for week commencing ' ||
1312: to_char (old_entry.week_commencing));
1313: hr_utility.trace (l_proc||' Old value / New value:');
1314: if entry_number is null then

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

1309: --
1310: hr_utility.trace (l_proc ||
1311: ' Inserting CORRECTION entry for week commencing ' ||
1312: to_char (old_entry.week_commencing));
1313: hr_utility.trace (l_proc||' Old value / New value:');
1314: if entry_number is null then
1315: hr_utility.trace (l_proc||' Rate: '
1316: ||old_entry.rate||' / NA');
1317: hr_utility.trace (l_proc||' Amount: '

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

1311: ' Inserting CORRECTION entry for week commencing ' ||
1312: to_char (old_entry.week_commencing));
1313: hr_utility.trace (l_proc||' Old value / New value:');
1314: if entry_number is null then
1315: hr_utility.trace (l_proc||' Rate: '
1316: ||old_entry.rate||' / NA');
1317: hr_utility.trace (l_proc||' Amount: '
1318: ||old_entry.amount||' / NA');
1319: hr_utility.trace (l_proc||' Recoverable: '

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

1313: hr_utility.trace (l_proc||' Old value / New value:');
1314: if entry_number is null then
1315: hr_utility.trace (l_proc||' Rate: '
1316: ||old_entry.rate||' / NA');
1317: hr_utility.trace (l_proc||' Amount: '
1318: ||old_entry.amount||' / NA');
1319: hr_utility.trace (l_proc||' Recoverable: '
1320: ||old_entry.recoverable_amount||' / NA');
1321: else

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

1315: hr_utility.trace (l_proc||' Rate: '
1316: ||old_entry.rate||' / NA');
1317: hr_utility.trace (l_proc||' Amount: '
1318: ||old_entry.amount||' / NA');
1319: hr_utility.trace (l_proc||' Recoverable: '
1320: ||old_entry.recoverable_amount||' / NA');
1321: else
1322: hr_utility.trace (l_proc||' Rate: '
1323: ||old_entry.rate||' / '

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

1318: ||old_entry.amount||' / NA');
1319: hr_utility.trace (l_proc||' Recoverable: '
1320: ||old_entry.recoverable_amount||' / NA');
1321: else
1322: hr_utility.trace (l_proc||' Rate: '
1323: ||old_entry.rate||' / '
1324: ||hypothetical_entry.rate (Entry_number));
1325: hr_utility.trace (l_proc||' Amount: '
1326: ||old_entry.amount||' / '

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

1321: else
1322: hr_utility.trace (l_proc||' Rate: '
1323: ||old_entry.rate||' / '
1324: ||hypothetical_entry.rate (Entry_number));
1325: hr_utility.trace (l_proc||' Amount: '
1326: ||old_entry.amount||' / '
1327: ||hypothetical_entry.amount (entry_number));
1328: hr_utility.trace (l_proc||' Recoverable: '
1329: ||old_entry.recoverable_amount||' /'

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

1324: ||hypothetical_entry.rate (Entry_number));
1325: hr_utility.trace (l_proc||' Amount: '
1326: ||old_entry.amount||' / '
1327: ||hypothetical_entry.amount (entry_number));
1328: hr_utility.trace (l_proc||' Recoverable: '
1329: ||old_entry.recoverable_amount||' /'
1330: ||hypothetical_entry.recoverable_amount (entry_number));
1331: end if;
1332: --

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

1377: -- Having been through all the existing entries, we now check that we
1378: -- have dealt with all the newly derived entries by inserting any which
1379: -- were not flagged as dealt with during the above actions.
1380: --
1381: hr_utility.set_location (l_proc,20);
1382: --
1383: <>
1384: begin
1385: if p_deleting then

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

1382: --
1383: <>
1384: begin
1385: if p_deleting then
1386: hr_utility.trace('Deleting an absence so don''t insert entries');
1387: else
1388: for new_entry in 1..g_PAB_element.maximum_PPP_weeks LOOP
1389:
1390: if (not hypothetical_entry.dealt_with (new_entry) = 'TRUE')

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

1433: if l_no_of_absence_periods = 0 then
1434: remove_stoppages;
1435: end if;
1436: --
1437: hr_utility.set_location(' Leaving: '||l_proc,100);
1438: --
1439: end save_hypothetical_entries;
1440: --
1441: procedure derive_PAB_week (p_week_number in integer) is

Line 1449: hr_utility.set_location ('Entering: ssp_sap_pkg.derive_PAB_week',1);

1445: -- we are and finding the offset from the start date.
1446: --
1447: begin
1448: --
1449: hr_utility.set_location ('Entering: ssp_sap_pkg.derive_PAB_week',1);
1450: hr_utility.trace ('Entry number = '||to_char (p_week_number));
1451: --
1452: hypothetical_entry.week_commencing (p_week_number)
1453: := (person.APP_start_date + ((p_week_number -1) * 7));

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

1446: --
1447: begin
1448: --
1449: hr_utility.set_location ('Entering: ssp_sap_pkg.derive_PAB_week',1);
1450: hr_utility.trace ('Entry number = '||to_char (p_week_number));
1451: --
1452: hypothetical_entry.week_commencing (p_week_number)
1453: := (person.APP_start_date + ((p_week_number -1) * 7));
1454: --

Line 1460: hr_utility.trace ('week_commencing = '

1456: hypothetical_entry.stopped (p_week_number) := 'FALSE';
1457: hypothetical_entry.element_link_id (p_week_number) := null;
1458: hypothetical_entry.assignment_id (p_week_number) := null;
1459: --
1460: hr_utility.trace ('week_commencing = '
1461: ||to_char (hypothetical_entry.week_commencing (p_week_number)));
1462: --
1463: hr_utility.set_location ('Leaving : ssp_sap_pkg.derive_PAB_week',100);
1464: --

Line 1463: hr_utility.set_location ('Leaving : ssp_sap_pkg.derive_PAB_week',100);

1459: --
1460: hr_utility.trace ('week_commencing = '
1461: ||to_char (hypothetical_entry.week_commencing (p_week_number)));
1462: --
1463: hr_utility.set_location ('Leaving : ssp_sap_pkg.derive_PAB_week',100);
1464: --
1465: end derive_PAB_week;
1466: --
1467: procedure Check_PAB_stoppages (p_week_number in integer) is

Line 1500: hr_utility.set_location ('ssp_sap_pkg.Check_PAB_stoppages',1);

1496: l_dummy integer (1);
1497: --
1498: begin
1499: --
1500: hr_utility.set_location ('ssp_sap_pkg.Check_PAB_stoppages',1);
1501: --
1502: hypothetical_entry.stopped (p_week_number) := 'FALSE';
1503: --
1504: --

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

1516: -- is payable.
1517: --
1518: hypothetical_entry.stopped (p_week_number) := 'TRUE';
1519: --
1520: hr_utility.trace ('Entry is STOPPED');
1521: --
1522: -- Keep a tally of the number of stopped weeks
1523: --
1524: l_stopped_weeks := l_stopped_weeks +1;

Line 1529: hr_utility.set_location ('ssp_sap_pkg.Check_PAB_stoppages',10);

1525: end if;
1526: --
1527: close csr_stoppages;
1528: --
1529: hr_utility.set_location ('ssp_sap_pkg.Check_PAB_stoppages',10);
1530: --
1531: end Check_PAB_stoppages;
1532: --
1533: procedure Calculate_correct_PAB_rate (p_week_number in number) is

Line 1547: hr_utility.set_location ('ssp_sap_pkg.Calculate_correct_PAB_rate',1);

1543: and lookup_code = p_rate_band;
1544: --
1545: begin
1546: --
1547: hr_utility.set_location ('ssp_sap_pkg.Calculate_correct_PAB_rate',1);
1548: --
1549: if l_high_rate is null then
1550: --
1551: -- Get the meanings for the rate bands

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

1561: /*
1562: if (p_week_number - l_stopped_weeks)
1563: <= g_SMP_element.period_at_higher_rate
1564: then
1565: hr_utility.set_location ('ssp_smp_pkg.Calculate_correct_SMP_rate',1);
1566: --
1567: -- We have not yet given the employee all their higher rate weeks
1568: --
1569: */

Line 1577: hr_utility.trace ('PAB Rate = '

1573: hypothetical_entry.rate (p_week_number) := l_low_rate;
1574: end if;
1575: */
1576: --
1577: hr_utility.trace ('PAB Rate = '
1578: ||hypothetical_entry.rate (p_week_number));
1579: --
1580: hr_utility.set_location ('ssp_sap_pkg.Calculate_correct_PAB_rate',10);
1581: --

Line 1580: hr_utility.set_location ('ssp_sap_pkg.Calculate_correct_PAB_rate',10);

1576: --
1577: hr_utility.trace ('PAB Rate = '
1578: ||hypothetical_entry.rate (p_week_number));
1579: --
1580: hr_utility.set_location ('ssp_sap_pkg.Calculate_correct_PAB_rate',10);
1581: --
1582: end Calculate_correct_PAB_rate;
1583: --
1584: procedure Calculate_PAB_amounts (p_week_number in integer, p_APP_start_date in date) is

Line 1588: hr_utility.set_location('Entering: ssp_sAp_pkg.Calculate_SaP_amounts',1);

1584: procedure Calculate_PAB_amounts (p_week_number in integer, p_APP_start_date in date) is
1585: --
1586: begin
1587: --
1588: hr_utility.set_location('Entering: ssp_sAp_pkg.Calculate_SaP_amounts',1);
1589: --
1590: -- Get the SAP element for each week in case the SAP rate has changed
1591: --
1592: get_PAB_element (hypothetical_entry.week_commencing (p_week_number));

Line 1604: hr_utility.trace ('PAB amount = '

1600: hypothetical_entry.recoverable_amount (p_week_number)
1601: := round (hypothetical_entry.amount (p_week_number)
1602: * g_PAB_element.recovery_rate,2);
1603: --
1604: hr_utility.trace ('PAB amount = '
1605: ||to_char (hypothetical_entry.amount (p_week_number)));
1606: hr_utility.trace ('Recoverable amount = '
1607: ||to_char (hypothetical_entry.recoverable_amount (p_week_number)));
1608: --

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

1602: * g_PAB_element.recovery_rate,2);
1603: --
1604: hr_utility.trace ('PAB amount = '
1605: ||to_char (hypothetical_entry.amount (p_week_number)));
1606: hr_utility.trace ('Recoverable amount = '
1607: ||to_char (hypothetical_entry.recoverable_amount (p_week_number)));
1608: --
1609: hr_utility.set_location('Leaving : ssp_sap_pkg.Calculate_PAB_amounts',100);
1610: --

Line 1609: hr_utility.set_location('Leaving : ssp_sap_pkg.Calculate_PAB_amounts',100);

1605: ||to_char (hypothetical_entry.amount (p_week_number)));
1606: hr_utility.trace ('Recoverable amount = '
1607: ||to_char (hypothetical_entry.recoverable_amount (p_week_number)));
1608: --
1609: hr_utility.set_location('Leaving : ssp_sap_pkg.Calculate_PAB_amounts',100);
1610: --
1611: end calculate_PAB_amounts;
1612: --
1613: procedure check_parameters is

Line 1624: hr_utility.set_location ('ssp_sap_pkg.generate_payments',1);

1620: end check_parameters;
1621: --
1622: begin
1623: --
1624: hr_utility.set_location ('ssp_sap_pkg.generate_payments',1);
1625: --
1626: check_parameters;
1627: --
1628: <>

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

1714: l_proc varchar2 (72) := g_package||'PAB_control';
1715: --
1716: begin
1717: --
1718: hr_utility.set_location (l_proc,1);
1719: --
1720: open csr_maternity;
1721: fetch csr_maternity into l_dummy;
1722: --

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

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

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

1744: --
1745: for obsolete in csr_entries LOOP
1746: hr_utility.trace (l_proc||' Deleting element entry_id '||
1747: to_char (obsolete.element_entry_id));
1748: hr_utility.trace (l_proc||'-------------------------------------------');
1749: --
1750: hr_entry_api.delete_element_entry (
1751: p_dt_delete_mode => 'ZAP',
1752: p_session_date => obsolete.effective_start_date,

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

1753: p_element_entry_id => obsolete.element_entry_id);
1754: end loop;
1755: end if;
1756: --
1757: hr_utility.set_location (l_proc,100);
1758: --
1759: end PAB_control;
1760: --------------------------------------------------------------------------------
1761: end ssp_pab_pkg;