DBA Data[Home] [Help]

APPS.SSP_SAP_PKG dependencies on HR_UTILITY

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

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

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

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

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

184: open csr_SAP_element_details (p_effective_date,c_SAP_Corr_element_name);
185: fetch csr_SAP_element_details into g_SAP_Correction_element;
186: close csr_SAP_element_details;
187: --
188: hr_utility.set_location (l_proc,100);
189: --
190: end get_SAP_correction_element;
191: --
192: --------------------------------------------------------------------------------

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

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

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

207: end check_parameters;
208: --
209: begin
210: --
211: hr_utility.set_location (l_proc,1);
212: --
213: check_parameters;
214: --
215: open csr_SAP_element_details (p_effective_date,c_SAP_element_name);

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

215: open csr_SAP_element_details (p_effective_date,c_SAP_element_name);
216: fetch csr_SAP_element_details into g_SAP_element;
217: close csr_SAP_element_details;
218: --
219: hr_utility.set_location (l_proc,100);
220: --
221: end get_SAP_element;
222: --
223: --------------------------------------------------------------------------------

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

283: and effective_date = l_effective_date;
284: --
285: begin
286: --
287: hr_utility.set_location ('Entering '||l_proc,1);
288: --
289: l_effective_date := greatest(person.MW, person.date_start);
290: --
291: open csr_average_earnings;

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

303: end if;
304: --
305: close csr_average_earnings;
306: --
307: hr_utility.set_location ('Leaving '||l_proc,10);
308: --
309: return l_average_earnings;
310: --
311: end average_earnings;

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

388: procedure check_parameters is
389: --
390: begin
391: --
392: hr_utility.trace (l_proc||' p_reason = '||p_reason);
393: hr_utility.trace (l_proc||' withhold from '||to_char (p_withhold_from));
394: hr_utility.trace (l_proc||' withhold to '||to_char (p_withhold_to));
395: --
396: hr_api.mandatory_arg_error (

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

389: --
390: begin
391: --
392: hr_utility.trace (l_proc||' p_reason = '||p_reason);
393: hr_utility.trace (l_proc||' withhold from '||to_char (p_withhold_from));
394: hr_utility.trace (l_proc||' withhold to '||to_char (p_withhold_to));
395: --
396: hr_api.mandatory_arg_error (
397: p_api_name => l_proc,

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

390: begin
391: --
392: hr_utility.trace (l_proc||' p_reason = '||p_reason);
393: hr_utility.trace (l_proc||' withhold from '||to_char (p_withhold_from));
394: hr_utility.trace (l_proc||' withhold to '||to_char (p_withhold_to));
395: --
396: hr_api.mandatory_arg_error (
397: p_api_name => l_proc,
398: p_argument => 'reason',

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

406: end check_parameters;
407: --
408: begin
409: --
410: hr_utility.set_location (l_proc,1);
411: --
412: check_parameters;
413: --
414: l_reason_id := ssp_smp_support_pkg.withholding_reason_id (

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

431: p_maternity_id => p_maternity_id,
432: p_user_entered => 'N',
433: p_reason_id => l_reason_id);
434: else
435: hr_utility.trace (l_proc||' Stoppage is overridden');
436: end if;
437: --
438: hr_utility.set_location (l_proc,100);
439: --

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

434: else
435: hr_utility.trace (l_proc||' Stoppage is overridden');
436: end if;
437: --
438: hr_utility.set_location (l_proc,100);
439: --
440: end create_stoppage;
441: --
442: procedure remove_stoppages is

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

454: l_proc varchar2 (72) := g_package||'remove_stoppages';
455: --
456: begin
457: --
458: hr_utility.set_location (l_proc,1);
459: --
460: for each_stoppage in csr_stoppages LOOP
461: ssp_stp_del.del (p_stoppage_id => each_stoppage.stoppage_id,
462: p_object_version_number => l_dummy);

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

461: ssp_stp_del.del (p_stoppage_id => each_stoppage.stoppage_id,
462: p_object_version_number => l_dummy);
463: end loop;
464: --
465: hr_utility.set_location (l_proc,100);
466: --
467: end remove_stoppages;
468: --
469: procedure check_continuity_rule is

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

487: l_proc varchar2 (72) := g_package||'check_continuity_rule';
488: --
489: begin
490: --
491: hr_utility.set_location (l_proc,1);
492: --
493: open period_of_service;
494: fetch period_of_service into l_dummy;
495: --

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

503: end if;
504: --
505: close period_of_service;
506: --
507: hr_utility.set_location (l_proc,100);
508: --
509: end check_continuity_rule;
510: --
511: /*

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

516: l_proc varchar2 (72) := g_package||'check_stillbirth';
517: --
518: begin
519: --
520: hr_utility.set_location (l_proc,1);
521: --
522: -- Woman must be still pregnant, have had a live birth, or have had a
523: -- stillbirth after the threshhold week to be eligible for SMP
524: --

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

534: create_stoppage (p_withhold_from => woman.MPP_start_date,
535: p_reason => 'Stillbirth');
536: end if;
537: --
538: hr_utility.set_location (l_proc,100);
539: --
540: end check_stillbirth;
541: --
542: */

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

548: l_proc varchar2 (72) := g_package||'check_new_employer';
549: --
550: begin
551: --
552: hr_utility.set_location (l_proc,1);
553: --
554: if person.start_date_with_new_employer >= person.placement_date then
555: --
556: -- Stop SAP payment from the start of the week in which the person

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

560: (person.start_date_with_new_employer),
561: p_reason => 'Worked for another employer');
562: end if;
563: --
564: hr_utility.set_location (l_proc,100);
565: --
566: end check_new_employer;
567: --
568: procedure check_maternity_allowance is

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

572: l_proc varchar2 (72) := g_package||'check_maternity_allowance';
573: --
574: begin
575: --
576: hr_utility.set_location (l_proc,1);
577: --
578: if person.start_date_maternity_allowance is not null then
579: --
580: -- Stop SAP payment from the start of the week in which SMA was first

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

584: (person.start_date_maternity_allowance),
585: p_reason => 'Employee is receiving SMA');
586: end if;
587: --
588: hr_utility.set_location (l_proc,100);
589: --
590: end check_maternity_allowance;
591: --
592: procedure check_death is

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

609: l_death_date date;
610:
611: begin
612: --
613: hr_utility.set_location (l_proc,1);
614: --
615: open csr_check_death;
616: fetch csr_check_death into l_death_date;
617: close csr_check_death;

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

627: l_date_of_the_week), --l_sunday),
628: p_reason => 'Employee died');
629: end if;
630: --
631: hr_utility.set_location (l_proc,100);
632: --
633: end check_death;
634: --
635: procedure check_disrupted_placement is

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

659: earnings_not_derived exception;
660: --
661: begin
662: --
663: hr_utility.set_location (l_proc,1);
664: --
665: if l_average_earnings = 0
666: then
667: --

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

690: create_stoppage (p_withhold_from => person.APP_start_date,
691: p_reason => 'Earnings too low');
692: end if;
693: --
694: hr_utility.set_location (l_proc,100);
695: --
696: exception
697: --
698: when earnings_not_derived then

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

698: when earnings_not_derived then
699: --
700: -- Exit silently from this procedure
701: --
702: hr_utility.trace (l_proc||' Earnings not derived');
703: null;
704: --
705: end check_average_earnings;
706: --

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

719: l_medical medical%rowtype;
720: --
721: begin
722: --
723: hr_utility.set_location (l_proc,1);
724: --
725: open medical;
726: fetch medical into l_medical;
727: --

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

753: end if;
754: --
755: close medical;
756: --
757: hr_utility.set_location (l_proc,100);
758: --
759: end check_medical_evidence;
760: --
761: */

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

767: l_proc varchar2 (72) := g_package||'check_birth_confirmation';
768: --
769: begin
770: --
771: hr_utility.set_location (l_proc,1);
772: --
773: --
774: -- This should not create a stoppage. A quick fix for bug 1021179
775: -- is to comment out the stoppage process.

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

788: -- create_stoppage (p_withhold_from => woman.MPP_start_date,
789: -- p_reason => 'Late notification of birth');
790: -- end if;
791: --
792: hr_utility.set_location (l_proc,100);
793: --
794: end check_birth_confirmation;
795: --
796: */

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

797: procedure check_parameters is
798: --
799: begin
800: --
801: hr_utility.trace (l_proc||' p_maternity_id = '
802: ||to_char (p_maternity_id));
803: --
804: hr_api.mandatory_arg_error (
805: p_api_name => l_proc,

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

809: end check_parameters;
810: --
811: begin
812: --
813: hr_utility.set_location (l_proc,1);
814: --
815: check_parameters;
816: --
817: -- Get the details of the woman and her maternity.

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

825: -- If no maternity record exists then there can be no entitlement to SAP
826: --
827: close csr_personal_details;
828: --
829: hr_utility.trace (l_proc||' Person has no maternity record - exiting');
830: --
831: raise no_prima_facia_entitlement;
832: end if;
833: --

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

836: if person.APP_start_date is null then
837: --
838: -- If the APP has not started then there is no entitlement to SAP.
839: --
840: hr_utility.trace (l_proc||' Person has no APP start date - exiting');
841: --
842: raise no_prima_facia_entitlement;
843: end if;
844: --

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

857: fetch csr_check_if_existing_entries into l_existing_entries;
858: --
859: if csr_check_if_existing_entries%NOTFOUND
860: then
861: hr_utility.trace (l_proc||' Person has not stopped work - exiting');
862: raise no_prima_facia_entitlement;
863: end if;
864: --
865: -- if entries are found then the absence has been deleted and entries remain

Line 879: hr_utility.set_location ('ssp_smp_pkg.entitled_to_SAP',2);

875: --
876: -- Having established a prima facia entitlement to SAP, perform checks which
877: -- may lead to creation of stoppages for particular periods.
878: --
879: hr_utility.set_location ('ssp_smp_pkg.entitled_to_SAP',2);
880: --
881: -- Get the SAP legislative parameters.
882: --
883: get_SAP_element (person.due_date);

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

924: p_reason => 'Late absence notification');
925: */
926: end if;
927: --
928: hr_utility.set_location ('ssp_sap_pkg.entitled_to_SaP',3);
929: --
930: -- Check for any work done during the APP.
931: --
932: if

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

972: else
973: --
974: -- This is not the last absence in the maternity but it has no end date.
975: --
976: hr_utility.trace (l_proc||' ERROR: Invalid null absence end date');
977: --
978: raise invalid_absence_date;
979: end if;
980: end if;

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

1239: l_proc varchar2 (72) := g_package||'.remove_stoppages';
1240: --
1241: begin
1242: --
1243: hr_utility.set_location (l_proc,1);
1244: --
1245: for each_stoppage in csr_stoppages LOOP
1246: ssp_stp_del.del (p_stoppage_id => each_stoppage.stoppage_id,
1247: p_object_version_number => l_dummy);

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

1246: ssp_stp_del.del (p_stoppage_id => each_stoppage.stoppage_id,
1247: p_object_version_number => l_dummy);
1248: end loop;
1249: --
1250: hr_utility.set_location (l_proc,100);
1251: --
1252: end remove_stoppages;
1253: --
1254: begin

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

1252: end remove_stoppages;
1253: --
1254: begin
1255: --
1256: hr_utility.set_location('Entering: '||l_proc,10);
1257: --
1258: get_SAP_correction_element (person.due_date);
1259: --
1260: -- Check each existing SaP entry in turn against all the potential new ones.

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

1291: = hypothetical_entry.week_commencing (entry_number)
1292: and not hypothetical_entry.stopped (entry_number) = 'TRUE'
1293: and ssp_smp_pkg.g_smp_update = 'Y'));
1294: end loop;
1295: hr_utility.trace (l_proc||' Old entry / Hypo entry time Match with values:');
1296: hr_utility.trace (l_proc||' Rate: ' ||old_entry.rate||' / '
1297: ||hypothetical_entry.rate (Entry_number));
1298: hr_utility.trace (l_proc||' Amount: '
1299: ||old_entry.amount||' / '

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

1292: and not hypothetical_entry.stopped (entry_number) = 'TRUE'
1293: and ssp_smp_pkg.g_smp_update = 'Y'));
1294: end loop;
1295: hr_utility.trace (l_proc||' Old entry / Hypo entry time Match with values:');
1296: hr_utility.trace (l_proc||' Rate: ' ||old_entry.rate||' / '
1297: ||hypothetical_entry.rate (Entry_number));
1298: hr_utility.trace (l_proc||' Amount: '
1299: ||old_entry.amount||' / '
1300: ||hypothetical_entry.amount (entry_number));

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

1294: end loop;
1295: hr_utility.trace (l_proc||' Old entry / Hypo entry time Match with values:');
1296: hr_utility.trace (l_proc||' Rate: ' ||old_entry.rate||' / '
1297: ||hypothetical_entry.rate (Entry_number));
1298: hr_utility.trace (l_proc||' Amount: '
1299: ||old_entry.amount||' / '
1300: ||hypothetical_entry.amount (entry_number));
1301: hr_utility.trace (l_proc||' Recoverable: '
1302: ||old_entry.recoverable_amount||' / '

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

1297: ||hypothetical_entry.rate (Entry_number));
1298: hr_utility.trace (l_proc||' Amount: '
1299: ||old_entry.amount||' / '
1300: ||hypothetical_entry.amount (entry_number));
1301: hr_utility.trace (l_proc||' Recoverable: '
1302: ||old_entry.recoverable_amount||' / '
1303: ||hypothetical_entry.recoverable_amount (entry_number));
1304: hr_utility.trace (l_proc||' Week Comm: '
1305: ||hypothetical_entry.week_commencing (entry_number) );

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

1300: ||hypothetical_entry.amount (entry_number));
1301: hr_utility.trace (l_proc||' Recoverable: '
1302: ||old_entry.recoverable_amount||' / '
1303: ||hypothetical_entry.recoverable_amount (entry_number));
1304: hr_utility.trace (l_proc||' Week Comm: '
1305: ||hypothetical_entry.week_commencing (entry_number) );
1306: --A hypo entry covers the same week as the old one
1307: if old_entry.rate = hypothetical_entry.rate (entry_number)
1308: and old_entry.amount = hypothetical_entry.amount(entry_number)

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

1312: -- the hypo entry has the same values as the old one
1313: -- don't create a correction element.
1314: -- don't create a new entry
1315: hypothetical_entry.dealt_with (entry_number) := 'TRUE';
1316: hr_utility.trace (l_proc||' leave unchanged');
1317: else
1318: if ssp_smp_support_pkg.entry_already_processed
1319: (old_entry.element_entry_id)
1320: then l_ins_corr_ele := TRUE;

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

1317: else
1318: if ssp_smp_support_pkg.entry_already_processed
1319: (old_entry.element_entry_id)
1320: then l_ins_corr_ele := TRUE;
1321: hr_utility.trace (l_proc||' processed - correct it');
1322: else
1323: -- update old entry
1324: hr_utility.trace (l_proc||' unprocessed - update it');
1325: hr_entry_api.update_element_entry (

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

1320: then l_ins_corr_ele := TRUE;
1321: hr_utility.trace (l_proc||' processed - correct it');
1322: else
1323: -- update old entry
1324: hr_utility.trace (l_proc||' unprocessed - update it');
1325: hr_entry_api.update_element_entry (
1326: p_dt_update_mode => 'CORRECTION',
1327: p_session_date => old_entry.effective_start_date,
1328: p_element_entry_id => old_entry.element_entry_id,

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

1343: when no_data_found then
1344: -- There was no new entry which exactly matched the old entry.
1345: -- or we are deleting.
1346: entry_number := null;
1347: hr_utility.trace (l_proc||' No Old entry - Hypo entry time Match');
1348: hr_utility.trace (l_proc||' or p_deleting is true');
1349: hr_utility.trace (l_proc||' Old entry values:');
1350: hr_utility.trace (l_proc||' Rate: '||old_entry.rate);
1351: hr_utility.trace (l_proc||' Amount: '||old_entry.amount);

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

1344: -- There was no new entry which exactly matched the old entry.
1345: -- or we are deleting.
1346: entry_number := null;
1347: hr_utility.trace (l_proc||' No Old entry - Hypo entry time Match');
1348: hr_utility.trace (l_proc||' or p_deleting is true');
1349: hr_utility.trace (l_proc||' Old entry values:');
1350: hr_utility.trace (l_proc||' Rate: '||old_entry.rate);
1351: hr_utility.trace (l_proc||' Amount: '||old_entry.amount);
1352: hr_utility.trace (l_proc||' Recoverable: '

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

1345: -- or we are deleting.
1346: entry_number := null;
1347: hr_utility.trace (l_proc||' No Old entry - Hypo entry time Match');
1348: hr_utility.trace (l_proc||' or p_deleting is true');
1349: hr_utility.trace (l_proc||' Old entry values:');
1350: hr_utility.trace (l_proc||' Rate: '||old_entry.rate);
1351: hr_utility.trace (l_proc||' Amount: '||old_entry.amount);
1352: hr_utility.trace (l_proc||' Recoverable: '
1353: ||old_entry.recoverable_amount);

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

1346: entry_number := null;
1347: hr_utility.trace (l_proc||' No Old entry - Hypo entry time Match');
1348: hr_utility.trace (l_proc||' or p_deleting is true');
1349: hr_utility.trace (l_proc||' Old entry values:');
1350: hr_utility.trace (l_proc||' Rate: '||old_entry.rate);
1351: hr_utility.trace (l_proc||' Amount: '||old_entry.amount);
1352: hr_utility.trace (l_proc||' Recoverable: '
1353: ||old_entry.recoverable_amount);
1354: if ssp_smp_support_pkg.entry_already_processed

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

1347: hr_utility.trace (l_proc||' No Old entry - Hypo entry time Match');
1348: hr_utility.trace (l_proc||' or p_deleting is true');
1349: hr_utility.trace (l_proc||' Old entry values:');
1350: hr_utility.trace (l_proc||' Rate: '||old_entry.rate);
1351: hr_utility.trace (l_proc||' Amount: '||old_entry.amount);
1352: hr_utility.trace (l_proc||' Recoverable: '
1353: ||old_entry.recoverable_amount);
1354: if ssp_smp_support_pkg.entry_already_processed
1355: (old_entry.element_entry_id)

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

1348: hr_utility.trace (l_proc||' or p_deleting is true');
1349: hr_utility.trace (l_proc||' Old entry values:');
1350: hr_utility.trace (l_proc||' Rate: '||old_entry.rate);
1351: hr_utility.trace (l_proc||' Amount: '||old_entry.amount);
1352: hr_utility.trace (l_proc||' Recoverable: '
1353: ||old_entry.recoverable_amount);
1354: if ssp_smp_support_pkg.entry_already_processed
1355: (old_entry.element_entry_id)
1356: then l_ins_corr_ele := TRUE;

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

1353: ||old_entry.recoverable_amount);
1354: if ssp_smp_support_pkg.entry_already_processed
1355: (old_entry.element_entry_id)
1356: then l_ins_corr_ele := TRUE;
1357: hr_utility.trace (l_proc||' Old entry already processed');
1358: else
1359: hr_utility.trace (l_proc||' Old entry NOT already processed');
1360: --Old entry not already processed so delete it
1361: hr_entry_api.delete_element_entry (

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

1355: (old_entry.element_entry_id)
1356: then l_ins_corr_ele := TRUE;
1357: hr_utility.trace (l_proc||' Old entry already processed');
1358: else
1359: hr_utility.trace (l_proc||' Old entry NOT already processed');
1360: --Old entry not already processed so delete it
1361: hr_entry_api.delete_element_entry (
1362: p_dt_delete_mode => 'ZAP',
1363: p_session_date => old_entry.effective_start_date,

Line 1372: hr_utility.trace (l_proc ||

1368: then
1369: -- Create a correction element to reverse the old entry. Then create a
1370: -- brand new entry with the correct values.
1371: --
1372: hr_utility.trace (l_proc ||
1373: ' Inserting CORRECTION entry for week commencing ' ||
1374: to_char (old_entry.week_commencing));
1375: hr_utility.trace (l_proc||' Old value / New value:');
1376: if entry_number is null then

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

1371: --
1372: hr_utility.trace (l_proc ||
1373: ' Inserting CORRECTION entry for week commencing ' ||
1374: to_char (old_entry.week_commencing));
1375: hr_utility.trace (l_proc||' Old value / New value:');
1376: if entry_number is null then
1377: hr_utility.trace (l_proc||' Rate: '
1378: ||old_entry.rate||' / NA');
1379: hr_utility.trace (l_proc||' Amount: '

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

1373: ' Inserting CORRECTION entry for week commencing ' ||
1374: to_char (old_entry.week_commencing));
1375: hr_utility.trace (l_proc||' Old value / New value:');
1376: if entry_number is null then
1377: hr_utility.trace (l_proc||' Rate: '
1378: ||old_entry.rate||' / NA');
1379: hr_utility.trace (l_proc||' Amount: '
1380: ||old_entry.amount||' / NA');
1381: hr_utility.trace (l_proc||' Recoverable: '

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

1375: hr_utility.trace (l_proc||' Old value / New value:');
1376: if entry_number is null then
1377: hr_utility.trace (l_proc||' Rate: '
1378: ||old_entry.rate||' / NA');
1379: hr_utility.trace (l_proc||' Amount: '
1380: ||old_entry.amount||' / NA');
1381: hr_utility.trace (l_proc||' Recoverable: '
1382: ||old_entry.recoverable_amount||' / NA');
1383: else

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

1377: hr_utility.trace (l_proc||' Rate: '
1378: ||old_entry.rate||' / NA');
1379: hr_utility.trace (l_proc||' Amount: '
1380: ||old_entry.amount||' / NA');
1381: hr_utility.trace (l_proc||' Recoverable: '
1382: ||old_entry.recoverable_amount||' / NA');
1383: else
1384: hr_utility.trace (l_proc||' Rate: '
1385: ||old_entry.rate||' / '

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

1380: ||old_entry.amount||' / NA');
1381: hr_utility.trace (l_proc||' Recoverable: '
1382: ||old_entry.recoverable_amount||' / NA');
1383: else
1384: hr_utility.trace (l_proc||' Rate: '
1385: ||old_entry.rate||' / '
1386: ||hypothetical_entry.rate (Entry_number));
1387: hr_utility.trace (l_proc||' Amount: '
1388: ||old_entry.amount||' / '

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

1383: else
1384: hr_utility.trace (l_proc||' Rate: '
1385: ||old_entry.rate||' / '
1386: ||hypothetical_entry.rate (Entry_number));
1387: hr_utility.trace (l_proc||' Amount: '
1388: ||old_entry.amount||' / '
1389: ||hypothetical_entry.amount (entry_number));
1390: hr_utility.trace (l_proc||' Recoverable: '
1391: ||old_entry.recoverable_amount||' /'

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

1386: ||hypothetical_entry.rate (Entry_number));
1387: hr_utility.trace (l_proc||' Amount: '
1388: ||old_entry.amount||' / '
1389: ||hypothetical_entry.amount (entry_number));
1390: hr_utility.trace (l_proc||' Recoverable: '
1391: ||old_entry.recoverable_amount||' /'
1392: ||hypothetical_entry.recoverable_amount (entry_number));
1393: end if;
1394: --

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

1439: -- Having been through all the existing entries, we now check that we
1440: -- have dealt with all the newly derived entries by inserting any which
1441: -- were not flagged as dealt with during the above actions.
1442: --
1443: hr_utility.set_location (l_proc,20);
1444: --
1445: <>
1446: begin
1447: if p_deleting then

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

1444: --
1445: <>
1446: begin
1447: if p_deleting then
1448: hr_utility.trace('Deleting an absence so don''t insert entries');
1449: else
1450: for new_entry in 1..g_SAP_element.maximum_APP LOOP
1451: if (not hypothetical_entry.dealt_with (new_entry) = 'TRUE')
1452: and (not hypothetical_entry.stopped (new_entry) = 'TRUE')

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

1494: if l_no_of_absence_periods = 0 then
1495: remove_stoppages;
1496: end if;
1497: --
1498: hr_utility.set_location(' Leaving: '||l_proc,100);
1499: --
1500: end save_hypothetical_entries;
1501: --
1502: procedure derive_SAP_week (p_week_number in integer) is

Line 1510: hr_utility.set_location ('Entering: ssp_sap_pkg.derive_SAP_week',1);

1506: -- we are and finding the offset from the start date.
1507: --
1508: begin
1509: --
1510: hr_utility.set_location ('Entering: ssp_sap_pkg.derive_SAP_week',1);
1511: hr_utility.trace ('Entry number = '||to_char (p_week_number));
1512: --
1513: hypothetical_entry.week_commencing (p_week_number)
1514: := (person.APP_start_date + ((p_week_number -1) * 7));

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

1507: --
1508: begin
1509: --
1510: hr_utility.set_location ('Entering: ssp_sap_pkg.derive_SAP_week',1);
1511: hr_utility.trace ('Entry number = '||to_char (p_week_number));
1512: --
1513: hypothetical_entry.week_commencing (p_week_number)
1514: := (person.APP_start_date + ((p_week_number -1) * 7));
1515: --

Line 1521: hr_utility.trace ('week_commencing = '

1517: hypothetical_entry.stopped (p_week_number) := 'FALSE';
1518: hypothetical_entry.element_link_id (p_week_number) := null;
1519: hypothetical_entry.assignment_id (p_week_number) := null;
1520: --
1521: hr_utility.trace ('week_commencing = '
1522: ||to_char (hypothetical_entry.week_commencing (p_week_number)));
1523: --
1524: hr_utility.set_location ('Leaving : ssp_sap_pkg.derive_SAP_week',100);
1525: --

Line 1524: hr_utility.set_location ('Leaving : ssp_sap_pkg.derive_SAP_week',100);

1520: --
1521: hr_utility.trace ('week_commencing = '
1522: ||to_char (hypothetical_entry.week_commencing (p_week_number)));
1523: --
1524: hr_utility.set_location ('Leaving : ssp_sap_pkg.derive_SAP_week',100);
1525: --
1526: end derive_SAP_week;
1527: --
1528: procedure Check_SAP_stoppages (p_week_number in integer) is

Line 1561: hr_utility.set_location ('ssp_sap_pkg.Check_SAP_stoppages',1);

1557: l_dummy integer (1);
1558: --
1559: begin
1560: --
1561: hr_utility.set_location ('ssp_sap_pkg.Check_SAP_stoppages',1);
1562: --
1563: hypothetical_entry.stopped (p_week_number) := 'FALSE';
1564: --
1565: open csr_stoppages (

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

1576: -- is payable.
1577: --
1578: hypothetical_entry.stopped (p_week_number) := 'TRUE';
1579: --
1580: hr_utility.trace ('Entry is STOPPED');
1581: --
1582: -- Keep a tally of the number of stopped weeks
1583: --
1584: l_stopped_weeks := l_stopped_weeks +1;

Line 1589: hr_utility.set_location ('ssp_sap_pkg.Check_SAP_stoppages',10);

1585: end if;
1586: --
1587: close csr_stoppages;
1588: --
1589: hr_utility.set_location ('ssp_sap_pkg.Check_SAP_stoppages',10);
1590: --
1591: end Check_SAP_stoppages;
1592: --
1593: procedure Calculate_correct_SAP_rate (p_week_number in number) is

Line 1607: hr_utility.set_location ('ssp_sap_pkg.Calculate_correct_SAP_rate',1);

1603: and lookup_code = p_rate_band;
1604: --
1605: begin
1606: --
1607: hr_utility.set_location ('ssp_sap_pkg.Calculate_correct_SAP_rate',1);
1608: --
1609: if l_high_rate is null then
1610: --
1611: -- Get the meanings for the rate bands

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

1621: /*
1622: if (p_week_number - l_stopped_weeks)
1623: <= g_SMP_element.period_at_higher_rate
1624: then
1625: hr_utility.set_location ('ssp_smp_pkg.Calculate_correct_SMP_rate',1);
1626: --
1627: -- We have not yet given the employee all their higher rate weeks
1628: --
1629: */

Line 1637: hr_utility.trace ('SAP Rate = '

1633: hypothetical_entry.rate (p_week_number) := l_low_rate;
1634: end if;
1635: */
1636: --
1637: hr_utility.trace ('SAP Rate = '
1638: ||hypothetical_entry.rate (p_week_number));
1639: --
1640: hr_utility.set_location ('ssp_sap_pkg.Calculate_correct_SAP_rate',10);
1641: --

Line 1640: hr_utility.set_location ('ssp_sap_pkg.Calculate_correct_SAP_rate',10);

1636: --
1637: hr_utility.trace ('SAP Rate = '
1638: ||hypothetical_entry.rate (p_week_number));
1639: --
1640: hr_utility.set_location ('ssp_sap_pkg.Calculate_correct_SAP_rate',10);
1641: --
1642: end Calculate_correct_SaP_rate;
1643: --
1644: procedure Calculate_SAP_amounts (p_week_number in integer, p_APP_start_date in date) is

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

1644: procedure Calculate_SAP_amounts (p_week_number in integer, p_APP_start_date in date) is
1645: --
1646: begin
1647: --
1648: hr_utility.set_location('Entering: ssp_sAp_pkg.Calculate_SaP_amounts',1);
1649: --
1650: -- Get the SAP element for each week in case the SAP rate has changed
1651: --
1652: get_SAP_element (hypothetical_entry.week_commencing (p_week_number));

Line 1664: hr_utility.trace ('SAP amount = '

1660: hypothetical_entry.recoverable_amount (p_week_number)
1661: := round (hypothetical_entry.amount (p_week_number)
1662: * g_SAP_element.recovery_rate,2);
1663: --
1664: hr_utility.trace ('SAP amount = '
1665: ||to_char (hypothetical_entry.amount (p_week_number)));
1666: hr_utility.trace ('Recoverable amount = '
1667: ||to_char (hypothetical_entry.recoverable_amount (p_week_number)));
1668: --

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

1662: * g_SAP_element.recovery_rate,2);
1663: --
1664: hr_utility.trace ('SAP amount = '
1665: ||to_char (hypothetical_entry.amount (p_week_number)));
1666: hr_utility.trace ('Recoverable amount = '
1667: ||to_char (hypothetical_entry.recoverable_amount (p_week_number)));
1668: --
1669: hr_utility.set_location('Leaving : ssp_sap_pkg.Calculate_SAP_amounts',100);
1670: --

Line 1669: hr_utility.set_location('Leaving : ssp_sap_pkg.Calculate_SAP_amounts',100);

1665: ||to_char (hypothetical_entry.amount (p_week_number)));
1666: hr_utility.trace ('Recoverable amount = '
1667: ||to_char (hypothetical_entry.recoverable_amount (p_week_number)));
1668: --
1669: hr_utility.set_location('Leaving : ssp_sap_pkg.Calculate_SAP_amounts',100);
1670: --
1671: end calculate_SAP_amounts;
1672: --
1673: procedure check_parameters is

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

1680: end check_parameters;
1681: --
1682: begin
1683: --
1684: hr_utility.set_location ('ssp_sap_pkg.generate_payments',1);
1685: --
1686: check_parameters;
1687: --
1688: <>

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

1774: l_proc varchar2 (72) := g_package||'SAP_control';
1775: --
1776: begin
1777: --
1778: hr_utility.set_location (l_proc,1);
1779: --
1780: open csr_maternity;
1781: fetch csr_maternity into l_dummy;
1782: --

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

1802: -- The maternity may have been deleted. Remove any element entries associated
1803: -- with it (the absences, stoppages and medicals are handled by constraints).
1804: --
1805: for obsolete in csr_entries LOOP
1806: hr_utility.trace (l_proc||' Deleting element entry_id '||
1807: to_char (obsolete.element_entry_id));
1808: hr_utility.trace (l_proc||'-------------------------------------------');
1809: --
1810: hr_entry_api.delete_element_entry (

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

1804: --
1805: for obsolete in csr_entries LOOP
1806: hr_utility.trace (l_proc||' Deleting element entry_id '||
1807: to_char (obsolete.element_entry_id));
1808: hr_utility.trace (l_proc||'-------------------------------------------');
1809: --
1810: hr_entry_api.delete_element_entry (
1811: p_dt_delete_mode => 'ZAP',
1812: p_session_date => obsolete.effective_start_date,

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

1813: p_element_entry_id => obsolete.element_entry_id);
1814: end loop;
1815: end if;
1816: --
1817: hr_utility.set_location (l_proc,100);
1818: --
1819: end SAP_control;
1820: --
1821: --------------------------------------------------------------------------------