DBA Data[Home] [Help]

APPS.PAY_GB_EDI_P46_CAR dependencies on HR_UTILITY

Line 352: hr_utility.set_location(l_proc, 10);

348: --
349: l_archived_flag VARCHAR2(1) := 'Y';
350: l_proc VARCHAR2(50) := g_package||'CHK_ACTION_ARCHIVED';
351: BEGIN
352: hr_utility.set_location(l_proc, 10);
353: hr_utility.trace(l_proc||': p_assignment_id='|| p_assignment_id);
354: hr_utility.trace(l_proc||': p_vehicle_allocation_id='|| p_vehicle_allocation_id);
355: hr_utility.trace(l_proc||': p_allocation_start_date='|| fnd_date.date_to_displaydate(p_allocation_start_date));
356: hr_utility.trace(l_proc||': p_action_flag='|| p_action_flag);

Line 353: hr_utility.trace(l_proc||': p_assignment_id='|| p_assignment_id);

349: l_archived_flag VARCHAR2(1) := 'Y';
350: l_proc VARCHAR2(50) := g_package||'CHK_ACTION_ARCHIVED';
351: BEGIN
352: hr_utility.set_location(l_proc, 10);
353: hr_utility.trace(l_proc||': p_assignment_id='|| p_assignment_id);
354: hr_utility.trace(l_proc||': p_vehicle_allocation_id='|| p_vehicle_allocation_id);
355: hr_utility.trace(l_proc||': p_allocation_start_date='|| fnd_date.date_to_displaydate(p_allocation_start_date));
356: hr_utility.trace(l_proc||': p_action_flag='|| p_action_flag);
357: --

Line 354: hr_utility.trace(l_proc||': p_vehicle_allocation_id='|| p_vehicle_allocation_id);

350: l_proc VARCHAR2(50) := g_package||'CHK_ACTION_ARCHIVED';
351: BEGIN
352: hr_utility.set_location(l_proc, 10);
353: hr_utility.trace(l_proc||': p_assignment_id='|| p_assignment_id);
354: hr_utility.trace(l_proc||': p_vehicle_allocation_id='|| p_vehicle_allocation_id);
355: hr_utility.trace(l_proc||': p_allocation_start_date='|| fnd_date.date_to_displaydate(p_allocation_start_date));
356: hr_utility.trace(l_proc||': p_action_flag='|| p_action_flag);
357: --
358: OPEN c_chk_archive;

Line 355: hr_utility.trace(l_proc||': p_allocation_start_date='|| fnd_date.date_to_displaydate(p_allocation_start_date));

351: BEGIN
352: hr_utility.set_location(l_proc, 10);
353: hr_utility.trace(l_proc||': p_assignment_id='|| p_assignment_id);
354: hr_utility.trace(l_proc||': p_vehicle_allocation_id='|| p_vehicle_allocation_id);
355: hr_utility.trace(l_proc||': p_allocation_start_date='|| fnd_date.date_to_displaydate(p_allocation_start_date));
356: hr_utility.trace(l_proc||': p_action_flag='|| p_action_flag);
357: --
358: OPEN c_chk_archive;
359: FETCH c_chk_archive INTO chk_archive_rec;

Line 356: hr_utility.trace(l_proc||': p_action_flag='|| p_action_flag);

352: hr_utility.set_location(l_proc, 10);
353: hr_utility.trace(l_proc||': p_assignment_id='|| p_assignment_id);
354: hr_utility.trace(l_proc||': p_vehicle_allocation_id='|| p_vehicle_allocation_id);
355: hr_utility.trace(l_proc||': p_allocation_start_date='|| fnd_date.date_to_displaydate(p_allocation_start_date));
356: hr_utility.trace(l_proc||': p_action_flag='|| p_action_flag);
357: --
358: OPEN c_chk_archive;
359: FETCH c_chk_archive INTO chk_archive_rec;
360: IF c_chk_archive%NOTFOUND THEN

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

357: --
358: OPEN c_chk_archive;
359: FETCH c_chk_archive INTO chk_archive_rec;
360: IF c_chk_archive%NOTFOUND THEN
361: hr_utility.set_location(l_proc, 20);
362: l_archived_flag := 'N';
363: END IF;
364: CLOSE c_chk_archive;
365: --

Line 366: hr_utility.set_location(l_proc, 30);

362: l_archived_flag := 'N';
363: END IF;
364: CLOSE c_chk_archive;
365: --
366: hr_utility.set_location(l_proc, 30);
367: RETURN l_archived_flag;
368: END chk_action_archived;
369:
370: --For Bug 6652235

Line 407: hr_utility.set_location(l_proc, 10);

403: --
404: l_archived_flag VARCHAR2(1) := 'Y';
405: l_proc VARCHAR2(50) := g_package||'CHK_ACTION_ARCHIVED_V2';
406: BEGIN
407: hr_utility.set_location(l_proc, 10);
408: hr_utility.trace(l_proc||': p_assignment_id='|| p_assignment_id);
409: hr_utility.trace(l_proc||': p_vehicle_allocation_id='|| p_vehicle_allocation_id);
410: hr_utility.trace(l_proc||': p_allocation_start_date='|| fnd_date.date_to_displaydate(p_allocation_start_date));
411: hr_utility.trace(l_proc||': p_action_flag='|| p_action_flag);

Line 408: hr_utility.trace(l_proc||': p_assignment_id='|| p_assignment_id);

404: l_archived_flag VARCHAR2(1) := 'Y';
405: l_proc VARCHAR2(50) := g_package||'CHK_ACTION_ARCHIVED_V2';
406: BEGIN
407: hr_utility.set_location(l_proc, 10);
408: hr_utility.trace(l_proc||': p_assignment_id='|| p_assignment_id);
409: hr_utility.trace(l_proc||': p_vehicle_allocation_id='|| p_vehicle_allocation_id);
410: hr_utility.trace(l_proc||': p_allocation_start_date='|| fnd_date.date_to_displaydate(p_allocation_start_date));
411: hr_utility.trace(l_proc||': p_action_flag='|| p_action_flag);
412: --

Line 409: hr_utility.trace(l_proc||': p_vehicle_allocation_id='|| p_vehicle_allocation_id);

405: l_proc VARCHAR2(50) := g_package||'CHK_ACTION_ARCHIVED_V2';
406: BEGIN
407: hr_utility.set_location(l_proc, 10);
408: hr_utility.trace(l_proc||': p_assignment_id='|| p_assignment_id);
409: hr_utility.trace(l_proc||': p_vehicle_allocation_id='|| p_vehicle_allocation_id);
410: hr_utility.trace(l_proc||': p_allocation_start_date='|| fnd_date.date_to_displaydate(p_allocation_start_date));
411: hr_utility.trace(l_proc||': p_action_flag='|| p_action_flag);
412: --
413: OPEN c_chk_archive;

Line 410: hr_utility.trace(l_proc||': p_allocation_start_date='|| fnd_date.date_to_displaydate(p_allocation_start_date));

406: BEGIN
407: hr_utility.set_location(l_proc, 10);
408: hr_utility.trace(l_proc||': p_assignment_id='|| p_assignment_id);
409: hr_utility.trace(l_proc||': p_vehicle_allocation_id='|| p_vehicle_allocation_id);
410: hr_utility.trace(l_proc||': p_allocation_start_date='|| fnd_date.date_to_displaydate(p_allocation_start_date));
411: hr_utility.trace(l_proc||': p_action_flag='|| p_action_flag);
412: --
413: OPEN c_chk_archive;
414: FETCH c_chk_archive INTO chk_archive_rec;

Line 411: hr_utility.trace(l_proc||': p_action_flag='|| p_action_flag);

407: hr_utility.set_location(l_proc, 10);
408: hr_utility.trace(l_proc||': p_assignment_id='|| p_assignment_id);
409: hr_utility.trace(l_proc||': p_vehicle_allocation_id='|| p_vehicle_allocation_id);
410: hr_utility.trace(l_proc||': p_allocation_start_date='|| fnd_date.date_to_displaydate(p_allocation_start_date));
411: hr_utility.trace(l_proc||': p_action_flag='|| p_action_flag);
412: --
413: OPEN c_chk_archive;
414: FETCH c_chk_archive INTO chk_archive_rec;
415: IF c_chk_archive%NOTFOUND THEN

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

412: --
413: OPEN c_chk_archive;
414: FETCH c_chk_archive INTO chk_archive_rec;
415: IF c_chk_archive%NOTFOUND THEN
416: hr_utility.set_location(l_proc, 20);
417: l_archived_flag := 'N';
418: END IF;
419: CLOSE c_chk_archive;
420: --

Line 421: hr_utility.set_location(l_proc, 30);

417: l_archived_flag := 'N';
418: END IF;
419: CLOSE c_chk_archive;
420: --
421: hr_utility.set_location(l_proc, 30);
422: RETURN l_archived_flag;
423: END chk_action_archived_v2;
424:
425: -----------------------------------------------------

Line 462: -- hr_utility.trace_on(null, 'RMAKHIJA');

458: l_ovn pay_action_information.object_version_number%TYPE;
459: --
460: BEGIN
461: --
462: -- hr_utility.trace_on(null, 'RMAKHIJA');
463: hr_utility.set_location('Enering: '||l_proc, 10);
464: hr_utility.trace(l_proc||': payroll_action_id='||pactid);
465: --
466: -- Get Employer information

Line 463: hr_utility.set_location('Enering: '||l_proc, 10);

459: --
460: BEGIN
461: --
462: -- hr_utility.trace_on(null, 'RMAKHIJA');
463: hr_utility.set_location('Enering: '||l_proc, 10);
464: hr_utility.trace(l_proc||': payroll_action_id='||pactid);
465: --
466: -- Get Employer information
467: OPEN c_employer;

Line 464: hr_utility.trace(l_proc||': payroll_action_id='||pactid);

460: BEGIN
461: --
462: -- hr_utility.trace_on(null, 'RMAKHIJA');
463: hr_utility.set_location('Enering: '||l_proc, 10);
464: hr_utility.trace(l_proc||': payroll_action_id='||pactid);
465: --
466: -- Get Employer information
467: OPEN c_employer;
468: FETCH c_employer INTO employer_rec;

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

466: -- Get Employer information
467: OPEN c_employer;
468: FETCH c_employer INTO employer_rec;
469: IF c_employer%NOTFOUND THEN
470: hr_utility.set_location(l_proc, 20);
471: raise NO_DATA_FOUND;
472: END IF;
473: CLOSE c_employer;
474: --

Line 477: hr_utility.trace(l_proc||': employer_name='||employer_rec.employer_name);

473: CLOSE c_employer;
474: --
475: g_effective_date := employer_rec.effective_Date;
476: --
477: hr_utility.trace(l_proc||': employer_name='||employer_rec.employer_name);
478: hr_utility.trace(l_proc||': employer_address_line='||employer_rec.employer_address_line);
479: hr_utility.trace(l_proc||': tax_district_name='||employer_rec.tax_district_name);
480: hr_utility.trace(l_proc||': organization_id='||employer_rec.organization_id);
481: hr_utility.trace(l_proc||': effective_Date='||fnd_date.date_to_displaydate(employer_rec.effective_date));

Line 478: hr_utility.trace(l_proc||': employer_address_line='||employer_rec.employer_address_line);

474: --
475: g_effective_date := employer_rec.effective_Date;
476: --
477: hr_utility.trace(l_proc||': employer_name='||employer_rec.employer_name);
478: hr_utility.trace(l_proc||': employer_address_line='||employer_rec.employer_address_line);
479: hr_utility.trace(l_proc||': tax_district_name='||employer_rec.tax_district_name);
480: hr_utility.trace(l_proc||': organization_id='||employer_rec.organization_id);
481: hr_utility.trace(l_proc||': effective_Date='||fnd_date.date_to_displaydate(employer_rec.effective_date));
482: --

Line 479: hr_utility.trace(l_proc||': tax_district_name='||employer_rec.tax_district_name);

475: g_effective_date := employer_rec.effective_Date;
476: --
477: hr_utility.trace(l_proc||': employer_name='||employer_rec.employer_name);
478: hr_utility.trace(l_proc||': employer_address_line='||employer_rec.employer_address_line);
479: hr_utility.trace(l_proc||': tax_district_name='||employer_rec.tax_district_name);
480: hr_utility.trace(l_proc||': organization_id='||employer_rec.organization_id);
481: hr_utility.trace(l_proc||': effective_Date='||fnd_date.date_to_displaydate(employer_rec.effective_date));
482: --
483: pay_action_information_api.create_action_information (

Line 480: hr_utility.trace(l_proc||': organization_id='||employer_rec.organization_id);

476: --
477: hr_utility.trace(l_proc||': employer_name='||employer_rec.employer_name);
478: hr_utility.trace(l_proc||': employer_address_line='||employer_rec.employer_address_line);
479: hr_utility.trace(l_proc||': tax_district_name='||employer_rec.tax_district_name);
480: hr_utility.trace(l_proc||': organization_id='||employer_rec.organization_id);
481: hr_utility.trace(l_proc||': effective_Date='||fnd_date.date_to_displaydate(employer_rec.effective_date));
482: --
483: pay_action_information_api.create_action_information (
484: p_action_information_id => l_action_info_id

Line 481: hr_utility.trace(l_proc||': effective_Date='||fnd_date.date_to_displaydate(employer_rec.effective_date));

477: hr_utility.trace(l_proc||': employer_name='||employer_rec.employer_name);
478: hr_utility.trace(l_proc||': employer_address_line='||employer_rec.employer_address_line);
479: hr_utility.trace(l_proc||': tax_district_name='||employer_rec.tax_district_name);
480: hr_utility.trace(l_proc||': organization_id='||employer_rec.organization_id);
481: hr_utility.trace(l_proc||': effective_Date='||fnd_date.date_to_displaydate(employer_rec.effective_date));
482: --
483: pay_action_information_api.create_action_information (
484: p_action_information_id => l_action_info_id
485: , p_action_context_id => pactid

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

494: , p_action_information2 => upper(employer_rec.employer_name)
495: , p_action_information3 => upper(employer_rec.tax_district_name)
496: , p_action_information4 => upper(employer_rec.employer_address_line));
497: --
498: hr_utility.set_location(l_proc, 30);
499: --
500: sqlstr := 'select distinct person_id '||
501: 'from per_people_f ppf, '||
502: 'pay_payroll_actions ppa '||

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

504: 'and ppa.business_group_id = ppf.business_group_id '||
505: 'order by ppf.person_id';
506:
507: --
508: hr_utility.set_location('Leaving: '||l_proc, 100);
509: --
510: -- hr_utility.trace_off;
511: EXCEPTION
512: WHEN OTHERS THEN

Line 510: -- hr_utility.trace_off;

506:
507: --
508: hr_utility.set_location('Leaving: '||l_proc, 100);
509: --
510: -- hr_utility.trace_off;
511: EXCEPTION
512: WHEN OTHERS THEN
513: -- Return cursor that selects no rows
514: sqlstr := 'select 1 '||

Line 518: hr_utility.set_location(' Leaving: '||l_proc,110);

514: sqlstr := 'select 1 '||
515: '/* ERROR - Employer Details Fetch failed with: '||
516: sqlerrm(sqlcode)||' */ '||
517: 'from dual where to_char(:payroll_action_id) = dummy';
518: hr_utility.set_location(' Leaving: '||l_proc,110);
519: END range_cursor;
520:
521: --For Bug 8986543
522: -----------------------------------------------------

Line 559: hr_utility.set_location('Enering: '||l_proc, 10);

555: l_ovn pay_action_information.object_version_number%TYPE;
556: --
557: BEGIN
558: --
559: hr_utility.set_location('Enering: '||l_proc, 10);
560: hr_utility.trace(l_proc||': payroll_action_id='||pactid);
561: --
562: -- Get Employer information
563: OPEN c_employer;

Line 560: hr_utility.trace(l_proc||': payroll_action_id='||pactid);

556: --
557: BEGIN
558: --
559: hr_utility.set_location('Enering: '||l_proc, 10);
560: hr_utility.trace(l_proc||': payroll_action_id='||pactid);
561: --
562: -- Get Employer information
563: OPEN c_employer;
564: FETCH c_employer INTO employer_rec;

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

562: -- Get Employer information
563: OPEN c_employer;
564: FETCH c_employer INTO employer_rec;
565: IF c_employer%NOTFOUND THEN
566: hr_utility.set_location(l_proc, 20);
567: raise NO_DATA_FOUND;
568: END IF;
569: CLOSE c_employer;
570: --

Line 573: hr_utility.trace(l_proc||': employer_name='||employer_rec.employer_name);

569: CLOSE c_employer;
570: --
571: g_effective_date := employer_rec.effective_Date;
572: --
573: hr_utility.trace(l_proc||': employer_name='||employer_rec.employer_name);
574: hr_utility.trace(l_proc||': employer_address_line='||employer_rec.employer_address_line);
575: hr_utility.trace(l_proc||': tax_district_name='||employer_rec.tax_district_name);
576: hr_utility.trace(l_proc||': organization_id='||employer_rec.organization_id);
577: hr_utility.trace(l_proc||': effective_Date='||fnd_date.date_to_displaydate(employer_rec.effective_date));

Line 574: hr_utility.trace(l_proc||': employer_address_line='||employer_rec.employer_address_line);

570: --
571: g_effective_date := employer_rec.effective_Date;
572: --
573: hr_utility.trace(l_proc||': employer_name='||employer_rec.employer_name);
574: hr_utility.trace(l_proc||': employer_address_line='||employer_rec.employer_address_line);
575: hr_utility.trace(l_proc||': tax_district_name='||employer_rec.tax_district_name);
576: hr_utility.trace(l_proc||': organization_id='||employer_rec.organization_id);
577: hr_utility.trace(l_proc||': effective_Date='||fnd_date.date_to_displaydate(employer_rec.effective_date));
578: --

Line 575: hr_utility.trace(l_proc||': tax_district_name='||employer_rec.tax_district_name);

571: g_effective_date := employer_rec.effective_Date;
572: --
573: hr_utility.trace(l_proc||': employer_name='||employer_rec.employer_name);
574: hr_utility.trace(l_proc||': employer_address_line='||employer_rec.employer_address_line);
575: hr_utility.trace(l_proc||': tax_district_name='||employer_rec.tax_district_name);
576: hr_utility.trace(l_proc||': organization_id='||employer_rec.organization_id);
577: hr_utility.trace(l_proc||': effective_Date='||fnd_date.date_to_displaydate(employer_rec.effective_date));
578: --
579: pay_action_information_api.create_action_information (

Line 576: hr_utility.trace(l_proc||': organization_id='||employer_rec.organization_id);

572: --
573: hr_utility.trace(l_proc||': employer_name='||employer_rec.employer_name);
574: hr_utility.trace(l_proc||': employer_address_line='||employer_rec.employer_address_line);
575: hr_utility.trace(l_proc||': tax_district_name='||employer_rec.tax_district_name);
576: hr_utility.trace(l_proc||': organization_id='||employer_rec.organization_id);
577: hr_utility.trace(l_proc||': effective_Date='||fnd_date.date_to_displaydate(employer_rec.effective_date));
578: --
579: pay_action_information_api.create_action_information (
580: p_action_information_id => l_action_info_id

Line 577: hr_utility.trace(l_proc||': effective_Date='||fnd_date.date_to_displaydate(employer_rec.effective_date));

573: hr_utility.trace(l_proc||': employer_name='||employer_rec.employer_name);
574: hr_utility.trace(l_proc||': employer_address_line='||employer_rec.employer_address_line);
575: hr_utility.trace(l_proc||': tax_district_name='||employer_rec.tax_district_name);
576: hr_utility.trace(l_proc||': organization_id='||employer_rec.organization_id);
577: hr_utility.trace(l_proc||': effective_Date='||fnd_date.date_to_displaydate(employer_rec.effective_date));
578: --
579: pay_action_information_api.create_action_information (
580: p_action_information_id => l_action_info_id
581: , p_action_context_id => pactid

Line 594: hr_utility.set_location(l_proc, 30);

590: , p_action_information2 => upper(employer_rec.employer_name)
591: , p_action_information3 => upper(employer_rec.tax_district_name)
592: , p_action_information4 => upper(employer_rec.employer_address_line));
593: --
594: hr_utility.set_location(l_proc, 30);
595: --
596: sqlstr := 'select distinct person_id '||
597: 'from per_people_f ppf, '||
598: 'pay_payroll_actions ppa '||

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

600: 'and ppa.business_group_id = ppf.business_group_id '||
601: 'order by ppf.person_id';
602:
603: --
604: hr_utility.set_location('Leaving: '||l_proc, 100);
605: --
606: -- hr_utility.trace_off;
607: EXCEPTION
608: WHEN OTHERS THEN

Line 606: -- hr_utility.trace_off;

602:
603: --
604: hr_utility.set_location('Leaving: '||l_proc, 100);
605: --
606: -- hr_utility.trace_off;
607: EXCEPTION
608: WHEN OTHERS THEN
609: -- Return cursor that selects no rows
610: sqlstr := 'select 1 '||

Line 614: hr_utility.set_location(' Leaving: '||l_proc,110);

610: sqlstr := 'select 1 '||
611: '/* ERROR - Employer Details Fetch failed with: '||
612: sqlerrm(sqlcode)||' */ '||
613: 'from dual where to_char(:payroll_action_id) = dummy';
614: hr_utility.set_location(' Leaving: '||l_proc,110);
615: END range_code_v3;
616:
617:
618: --For Bug 10095492

Line 656: hr_utility.set_location('Enering: '||l_proc, 10);

652: l_ovn pay_action_information.object_version_number%TYPE;
653: --
654: BEGIN
655: --
656: hr_utility.set_location('Enering: '||l_proc, 10);
657: hr_utility.trace(l_proc||': payroll_action_id='||pactid);
658: --
659: -- Get Employer information
660: OPEN c_employer;

Line 657: hr_utility.trace(l_proc||': payroll_action_id='||pactid);

653: --
654: BEGIN
655: --
656: hr_utility.set_location('Enering: '||l_proc, 10);
657: hr_utility.trace(l_proc||': payroll_action_id='||pactid);
658: --
659: -- Get Employer information
660: OPEN c_employer;
661: FETCH c_employer INTO employer_rec;

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

659: -- Get Employer information
660: OPEN c_employer;
661: FETCH c_employer INTO employer_rec;
662: IF c_employer%NOTFOUND THEN
663: hr_utility.set_location(l_proc, 20);
664: raise NO_DATA_FOUND;
665: END IF;
666: CLOSE c_employer;
667: --

Line 670: hr_utility.trace(l_proc||': employer_name='||employer_rec.employer_name);

666: CLOSE c_employer;
667: --
668: g_effective_date := employer_rec.effective_Date;
669: --
670: hr_utility.trace(l_proc||': employer_name='||employer_rec.employer_name);
671: hr_utility.trace(l_proc||': employer_address_line='||employer_rec.employer_address_line);
672: hr_utility.trace(l_proc||': tax_district_name='||employer_rec.tax_district_name);
673: hr_utility.trace(l_proc||': organization_id='||employer_rec.organization_id);
674: hr_utility.trace(l_proc||': effective_Date='||fnd_date.date_to_displaydate(employer_rec.effective_date));

Line 671: hr_utility.trace(l_proc||': employer_address_line='||employer_rec.employer_address_line);

667: --
668: g_effective_date := employer_rec.effective_Date;
669: --
670: hr_utility.trace(l_proc||': employer_name='||employer_rec.employer_name);
671: hr_utility.trace(l_proc||': employer_address_line='||employer_rec.employer_address_line);
672: hr_utility.trace(l_proc||': tax_district_name='||employer_rec.tax_district_name);
673: hr_utility.trace(l_proc||': organization_id='||employer_rec.organization_id);
674: hr_utility.trace(l_proc||': effective_Date='||fnd_date.date_to_displaydate(employer_rec.effective_date));
675: --

Line 672: hr_utility.trace(l_proc||': tax_district_name='||employer_rec.tax_district_name);

668: g_effective_date := employer_rec.effective_Date;
669: --
670: hr_utility.trace(l_proc||': employer_name='||employer_rec.employer_name);
671: hr_utility.trace(l_proc||': employer_address_line='||employer_rec.employer_address_line);
672: hr_utility.trace(l_proc||': tax_district_name='||employer_rec.tax_district_name);
673: hr_utility.trace(l_proc||': organization_id='||employer_rec.organization_id);
674: hr_utility.trace(l_proc||': effective_Date='||fnd_date.date_to_displaydate(employer_rec.effective_date));
675: --
676: pay_action_information_api.create_action_information (

Line 673: hr_utility.trace(l_proc||': organization_id='||employer_rec.organization_id);

669: --
670: hr_utility.trace(l_proc||': employer_name='||employer_rec.employer_name);
671: hr_utility.trace(l_proc||': employer_address_line='||employer_rec.employer_address_line);
672: hr_utility.trace(l_proc||': tax_district_name='||employer_rec.tax_district_name);
673: hr_utility.trace(l_proc||': organization_id='||employer_rec.organization_id);
674: hr_utility.trace(l_proc||': effective_Date='||fnd_date.date_to_displaydate(employer_rec.effective_date));
675: --
676: pay_action_information_api.create_action_information (
677: p_action_information_id => l_action_info_id

Line 674: hr_utility.trace(l_proc||': effective_Date='||fnd_date.date_to_displaydate(employer_rec.effective_date));

670: hr_utility.trace(l_proc||': employer_name='||employer_rec.employer_name);
671: hr_utility.trace(l_proc||': employer_address_line='||employer_rec.employer_address_line);
672: hr_utility.trace(l_proc||': tax_district_name='||employer_rec.tax_district_name);
673: hr_utility.trace(l_proc||': organization_id='||employer_rec.organization_id);
674: hr_utility.trace(l_proc||': effective_Date='||fnd_date.date_to_displaydate(employer_rec.effective_date));
675: --
676: pay_action_information_api.create_action_information (
677: p_action_information_id => l_action_info_id
678: , p_action_context_id => pactid

Line 691: hr_utility.set_location(l_proc, 30);

687: , p_action_information2 => upper(employer_rec.employer_name)
688: , p_action_information3 => upper(employer_rec.tax_district_name)
689: , p_action_information4 => upper(employer_rec.employer_address_line));
690: --
691: hr_utility.set_location(l_proc, 30);
692: --
693: sqlstr := 'select distinct person_id '||
694: 'from per_people_f ppf, '||
695: 'pay_payroll_actions ppa '||

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

697: 'and ppa.business_group_id = ppf.business_group_id '||
698: 'order by ppf.person_id';
699:
700: --
701: hr_utility.set_location('Leaving: '||l_proc, 100);
702: --
703: -- hr_utility.trace_off;
704: EXCEPTION
705: WHEN OTHERS THEN

Line 703: -- hr_utility.trace_off;

699:
700: --
701: hr_utility.set_location('Leaving: '||l_proc, 100);
702: --
703: -- hr_utility.trace_off;
704: EXCEPTION
705: WHEN OTHERS THEN
706: -- Return cursor that selects no rows
707: sqlstr := 'select 1 '||

Line 711: hr_utility.set_location(' Leaving: '||l_proc,110);

707: sqlstr := 'select 1 '||
708: '/* ERROR - Employer Details Fetch failed with: '||
709: sqlerrm(sqlcode)||' */ '||
710: 'from dual where to_char(:payroll_action_id) = dummy';
711: hr_utility.set_location(' Leaving: '||l_proc,110);
712: END range_code_v4;
713:
714: --For Bug 13400872
715: -----------------------------------------------------

Line 752: hr_utility.set_location('Enering: '||l_proc, 10);

748: l_ovn pay_action_information.object_version_number%TYPE;
749: --
750: BEGIN
751: --
752: hr_utility.set_location('Enering: '||l_proc, 10);
753: hr_utility.trace(l_proc||': payroll_action_id='||pactid);
754: --
755: -- Get Employer information
756: OPEN c_employer;

Line 753: hr_utility.trace(l_proc||': payroll_action_id='||pactid);

749: --
750: BEGIN
751: --
752: hr_utility.set_location('Enering: '||l_proc, 10);
753: hr_utility.trace(l_proc||': payroll_action_id='||pactid);
754: --
755: -- Get Employer information
756: OPEN c_employer;
757: FETCH c_employer INTO employer_rec;

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

755: -- Get Employer information
756: OPEN c_employer;
757: FETCH c_employer INTO employer_rec;
758: IF c_employer%NOTFOUND THEN
759: hr_utility.set_location(l_proc, 20);
760: raise NO_DATA_FOUND;
761: END IF;
762: CLOSE c_employer;
763: --

Line 766: hr_utility.trace(l_proc||': employer_name='||employer_rec.employer_name);

762: CLOSE c_employer;
763: --
764: g_effective_date := employer_rec.effective_Date;
765: --
766: hr_utility.trace(l_proc||': employer_name='||employer_rec.employer_name);
767: hr_utility.trace(l_proc||': employer_address_line='||employer_rec.employer_address_line);
768: hr_utility.trace(l_proc||': tax_district_name='||employer_rec.tax_district_name);
769: hr_utility.trace(l_proc||': organization_id='||employer_rec.organization_id);
770: hr_utility.trace(l_proc||': effective_Date='||fnd_date.date_to_displaydate(employer_rec.effective_date));

Line 767: hr_utility.trace(l_proc||': employer_address_line='||employer_rec.employer_address_line);

763: --
764: g_effective_date := employer_rec.effective_Date;
765: --
766: hr_utility.trace(l_proc||': employer_name='||employer_rec.employer_name);
767: hr_utility.trace(l_proc||': employer_address_line='||employer_rec.employer_address_line);
768: hr_utility.trace(l_proc||': tax_district_name='||employer_rec.tax_district_name);
769: hr_utility.trace(l_proc||': organization_id='||employer_rec.organization_id);
770: hr_utility.trace(l_proc||': effective_Date='||fnd_date.date_to_displaydate(employer_rec.effective_date));
771: --

Line 768: hr_utility.trace(l_proc||': tax_district_name='||employer_rec.tax_district_name);

764: g_effective_date := employer_rec.effective_Date;
765: --
766: hr_utility.trace(l_proc||': employer_name='||employer_rec.employer_name);
767: hr_utility.trace(l_proc||': employer_address_line='||employer_rec.employer_address_line);
768: hr_utility.trace(l_proc||': tax_district_name='||employer_rec.tax_district_name);
769: hr_utility.trace(l_proc||': organization_id='||employer_rec.organization_id);
770: hr_utility.trace(l_proc||': effective_Date='||fnd_date.date_to_displaydate(employer_rec.effective_date));
771: --
772: pay_action_information_api.create_action_information (

Line 769: hr_utility.trace(l_proc||': organization_id='||employer_rec.organization_id);

765: --
766: hr_utility.trace(l_proc||': employer_name='||employer_rec.employer_name);
767: hr_utility.trace(l_proc||': employer_address_line='||employer_rec.employer_address_line);
768: hr_utility.trace(l_proc||': tax_district_name='||employer_rec.tax_district_name);
769: hr_utility.trace(l_proc||': organization_id='||employer_rec.organization_id);
770: hr_utility.trace(l_proc||': effective_Date='||fnd_date.date_to_displaydate(employer_rec.effective_date));
771: --
772: pay_action_information_api.create_action_information (
773: p_action_information_id => l_action_info_id

Line 770: hr_utility.trace(l_proc||': effective_Date='||fnd_date.date_to_displaydate(employer_rec.effective_date));

766: hr_utility.trace(l_proc||': employer_name='||employer_rec.employer_name);
767: hr_utility.trace(l_proc||': employer_address_line='||employer_rec.employer_address_line);
768: hr_utility.trace(l_proc||': tax_district_name='||employer_rec.tax_district_name);
769: hr_utility.trace(l_proc||': organization_id='||employer_rec.organization_id);
770: hr_utility.trace(l_proc||': effective_Date='||fnd_date.date_to_displaydate(employer_rec.effective_date));
771: --
772: pay_action_information_api.create_action_information (
773: p_action_information_id => l_action_info_id
774: , p_action_context_id => pactid

Line 787: hr_utility.set_location(l_proc, 30);

783: , p_action_information2 => upper(employer_rec.employer_name)
784: , p_action_information3 => upper(employer_rec.tax_district_name)
785: , p_action_information4 => upper(employer_rec.employer_address_line));
786: --
787: hr_utility.set_location(l_proc, 30);
788: --
789: sqlstr := 'select distinct person_id '||
790: 'from per_people_f ppf, '||
791: 'pay_payroll_actions ppa '||

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

793: 'and ppa.business_group_id = ppf.business_group_id '||
794: 'order by ppf.person_id';
795:
796: --
797: hr_utility.set_location('Leaving: '||l_proc, 100);
798: --
799: -- hr_utility.trace_off;
800: EXCEPTION
801: WHEN OTHERS THEN

Line 799: -- hr_utility.trace_off;

795:
796: --
797: hr_utility.set_location('Leaving: '||l_proc, 100);
798: --
799: -- hr_utility.trace_off;
800: EXCEPTION
801: WHEN OTHERS THEN
802: -- Return cursor that selects no rows
803: sqlstr := 'select 1 '||

Line 807: hr_utility.set_location(' Leaving: '||l_proc,110);

803: sqlstr := 'select 1 '||
804: '/* ERROR - Employer Details Fetch failed with: '||
805: sqlerrm(sqlcode)||' */ '||
806: 'from dual where to_char(:payroll_action_id) = dummy';
807: hr_utility.set_location(' Leaving: '||l_proc,110);
808: END range_code_v5;
809:
810:
811: --For Bug 6652235

Line 879: --hr_utility.trace_on(null, 'KTHAMPAN');

875: l_create_assact_flag VARCHAR2(1);
876: l_action_flag VARCHAR2(1);
877: l_archived_flag VARCHAR2(1);
878: BEGIN
879: --hr_utility.trace_on(null, 'KTHAMPAN');
880: hr_utility.set_location('Entering '||l_proc, 10);
881: --
882: OPEN c_param_values;
883: FETCH c_param_values INTO g_payroll_id,

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

876: l_action_flag VARCHAR2(1);
877: l_archived_flag VARCHAR2(1);
878: BEGIN
879: --hr_utility.trace_on(null, 'KTHAMPAN');
880: hr_utility.set_location('Entering '||l_proc, 10);
881: --
882: OPEN c_param_values;
883: FETCH c_param_values INTO g_payroll_id,
884: g_tax_ref,

Line 891: hr_utility.set_location(l_proc, 15);

887: g_end_date,
888: g_business_group_id;
889: CLOSE c_param_values;
890: --
891: hr_utility.set_location(l_proc, 15);
892: hr_utility.trace(l_proc||': g_payroll_id='||g_payroll_id);
893: hr_utility.trace(l_proc||': g_tax_ref='||g_tax_ref);
894: hr_utility.trace(l_proc||': g_start_date='||fnd_date.date_to_displaydate(g_start_date));
895: hr_utility.trace(l_proc||': g_effective_date='||fnd_date.date_to_displaydate(g_effective_date));

Line 892: hr_utility.trace(l_proc||': g_payroll_id='||g_payroll_id);

888: g_business_group_id;
889: CLOSE c_param_values;
890: --
891: hr_utility.set_location(l_proc, 15);
892: hr_utility.trace(l_proc||': g_payroll_id='||g_payroll_id);
893: hr_utility.trace(l_proc||': g_tax_ref='||g_tax_ref);
894: hr_utility.trace(l_proc||': g_start_date='||fnd_date.date_to_displaydate(g_start_date));
895: hr_utility.trace(l_proc||': g_effective_date='||fnd_date.date_to_displaydate(g_effective_date));
896: hr_utility.trace(l_proc||': g_end_date='||fnd_date.date_to_displaydate(g_end_date));

Line 893: hr_utility.trace(l_proc||': g_tax_ref='||g_tax_ref);

889: CLOSE c_param_values;
890: --
891: hr_utility.set_location(l_proc, 15);
892: hr_utility.trace(l_proc||': g_payroll_id='||g_payroll_id);
893: hr_utility.trace(l_proc||': g_tax_ref='||g_tax_ref);
894: hr_utility.trace(l_proc||': g_start_date='||fnd_date.date_to_displaydate(g_start_date));
895: hr_utility.trace(l_proc||': g_effective_date='||fnd_date.date_to_displaydate(g_effective_date));
896: hr_utility.trace(l_proc||': g_end_date='||fnd_date.date_to_displaydate(g_end_date));
897: hr_utility.trace(l_proc||': g_business_group_id='||g_business_group_id);

Line 894: hr_utility.trace(l_proc||': g_start_date='||fnd_date.date_to_displaydate(g_start_date));

890: --
891: hr_utility.set_location(l_proc, 15);
892: hr_utility.trace(l_proc||': g_payroll_id='||g_payroll_id);
893: hr_utility.trace(l_proc||': g_tax_ref='||g_tax_ref);
894: hr_utility.trace(l_proc||': g_start_date='||fnd_date.date_to_displaydate(g_start_date));
895: hr_utility.trace(l_proc||': g_effective_date='||fnd_date.date_to_displaydate(g_effective_date));
896: hr_utility.trace(l_proc||': g_end_date='||fnd_date.date_to_displaydate(g_end_date));
897: hr_utility.trace(l_proc||': g_business_group_id='||g_business_group_id);
898: For asg_rec IN c_asg

Line 895: hr_utility.trace(l_proc||': g_effective_date='||fnd_date.date_to_displaydate(g_effective_date));

891: hr_utility.set_location(l_proc, 15);
892: hr_utility.trace(l_proc||': g_payroll_id='||g_payroll_id);
893: hr_utility.trace(l_proc||': g_tax_ref='||g_tax_ref);
894: hr_utility.trace(l_proc||': g_start_date='||fnd_date.date_to_displaydate(g_start_date));
895: hr_utility.trace(l_proc||': g_effective_date='||fnd_date.date_to_displaydate(g_effective_date));
896: hr_utility.trace(l_proc||': g_end_date='||fnd_date.date_to_displaydate(g_end_date));
897: hr_utility.trace(l_proc||': g_business_group_id='||g_business_group_id);
898: For asg_rec IN c_asg
899: LOOP

Line 896: hr_utility.trace(l_proc||': g_end_date='||fnd_date.date_to_displaydate(g_end_date));

892: hr_utility.trace(l_proc||': g_payroll_id='||g_payroll_id);
893: hr_utility.trace(l_proc||': g_tax_ref='||g_tax_ref);
894: hr_utility.trace(l_proc||': g_start_date='||fnd_date.date_to_displaydate(g_start_date));
895: hr_utility.trace(l_proc||': g_effective_date='||fnd_date.date_to_displaydate(g_effective_date));
896: hr_utility.trace(l_proc||': g_end_date='||fnd_date.date_to_displaydate(g_end_date));
897: hr_utility.trace(l_proc||': g_business_group_id='||g_business_group_id);
898: For asg_rec IN c_asg
899: LOOP
900: -- Loop through all assignments

Line 897: hr_utility.trace(l_proc||': g_business_group_id='||g_business_group_id);

893: hr_utility.trace(l_proc||': g_tax_ref='||g_tax_ref);
894: hr_utility.trace(l_proc||': g_start_date='||fnd_date.date_to_displaydate(g_start_date));
895: hr_utility.trace(l_proc||': g_effective_date='||fnd_date.date_to_displaydate(g_effective_date));
896: hr_utility.trace(l_proc||': g_end_date='||fnd_date.date_to_displaydate(g_end_date));
897: hr_utility.trace(l_proc||': g_business_group_id='||g_business_group_id);
898: For asg_rec IN c_asg
899: LOOP
900: -- Loop through all assignments
901: hr_utility.set_location(l_proc, 20);

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

897: hr_utility.trace(l_proc||': g_business_group_id='||g_business_group_id);
898: For asg_rec IN c_asg
899: LOOP
900: -- Loop through all assignments
901: hr_utility.set_location(l_proc, 20);
902: hr_utility.trace(l_proc||': assignment_id='||asg_rec.assignment_id);
903: hr_utility.trace(l_proc||': asg_min_start_date='||fnd_date.date_to_displaydate(asg_rec.asg_min_start_date));
904: hr_utility.trace(l_proc||': asg_max_end_date='||fnd_date.date_to_displaydate(asg_rec.asg_max_end_date));
905: --

Line 902: hr_utility.trace(l_proc||': assignment_id='||asg_rec.assignment_id);

898: For asg_rec IN c_asg
899: LOOP
900: -- Loop through all assignments
901: hr_utility.set_location(l_proc, 20);
902: hr_utility.trace(l_proc||': assignment_id='||asg_rec.assignment_id);
903: hr_utility.trace(l_proc||': asg_min_start_date='||fnd_date.date_to_displaydate(asg_rec.asg_min_start_date));
904: hr_utility.trace(l_proc||': asg_max_end_date='||fnd_date.date_to_displaydate(asg_rec.asg_max_end_date));
905: --
906: l_create_assact_flag := 'N';

Line 903: hr_utility.trace(l_proc||': asg_min_start_date='||fnd_date.date_to_displaydate(asg_rec.asg_min_start_date));

899: LOOP
900: -- Loop through all assignments
901: hr_utility.set_location(l_proc, 20);
902: hr_utility.trace(l_proc||': assignment_id='||asg_rec.assignment_id);
903: hr_utility.trace(l_proc||': asg_min_start_date='||fnd_date.date_to_displaydate(asg_rec.asg_min_start_date));
904: hr_utility.trace(l_proc||': asg_max_end_date='||fnd_date.date_to_displaydate(asg_rec.asg_max_end_date));
905: --
906: l_create_assact_flag := 'N';
907: --

Line 904: hr_utility.trace(l_proc||': asg_max_end_date='||fnd_date.date_to_displaydate(asg_rec.asg_max_end_date));

900: -- Loop through all assignments
901: hr_utility.set_location(l_proc, 20);
902: hr_utility.trace(l_proc||': assignment_id='||asg_rec.assignment_id);
903: hr_utility.trace(l_proc||': asg_min_start_date='||fnd_date.date_to_displaydate(asg_rec.asg_min_start_date));
904: hr_utility.trace(l_proc||': asg_max_end_date='||fnd_date.date_to_displaydate(asg_rec.asg_max_end_date));
905: --
906: l_create_assact_flag := 'N';
907: --
908: FOR alc_rec IN c_allocations(asg_rec.assignment_id) LOOP

Line 911: hr_utility.set_location(l_proc, 30);

907: --
908: FOR alc_rec IN c_allocations(asg_rec.assignment_id) LOOP
909: -- Loop through all vehicle allocations
910: -- over the date range
911: hr_utility.set_location(l_proc, 30);
912: hr_utility.trace(l_proc||': vehicle_allocation_id='||alc_rec.vehicle_allocation_id);
913: hr_utility.trace(l_proc||': usage_type='||alc_rec.usage_type);
914: --
915: L_action_flag := 'X';

Line 912: hr_utility.trace(l_proc||': vehicle_allocation_id='||alc_rec.vehicle_allocation_id);

908: FOR alc_rec IN c_allocations(asg_rec.assignment_id) LOOP
909: -- Loop through all vehicle allocations
910: -- over the date range
911: hr_utility.set_location(l_proc, 30);
912: hr_utility.trace(l_proc||': vehicle_allocation_id='||alc_rec.vehicle_allocation_id);
913: hr_utility.trace(l_proc||': usage_type='||alc_rec.usage_type);
914: --
915: L_action_flag := 'X';
916: l_archived_flag := 'Y';

Line 913: hr_utility.trace(l_proc||': usage_type='||alc_rec.usage_type);

909: -- Loop through all vehicle allocations
910: -- over the date range
911: hr_utility.set_location(l_proc, 30);
912: hr_utility.trace(l_proc||': vehicle_allocation_id='||alc_rec.vehicle_allocation_id);
913: hr_utility.trace(l_proc||': usage_type='||alc_rec.usage_type);
914: --
915: L_action_flag := 'X';
916: l_archived_flag := 'Y';
917: --

Line 922: hr_utility.set_location(l_proc, 40);

918: OPEN c_alloc_dates(alc_rec.vehicle_allocation_id);
919: FETCH c_alloc_dates INTO alc_dates_rec;
920: CLOSE c_alloc_dates;
921: --
922: hr_utility.set_location(l_proc, 40);
923: hr_utility.trace(l_proc||': min_start_date='|| fnd_date.date_to_displaydate(alc_dates_rec.min_start_date));
924: hr_utility.trace(l_proc||': max_end_date='|| fnd_date.date_to_displaydate(alc_dates_rec.max_end_date));
925: --
926: -- Check whether vehicle was allocated or

Line 923: hr_utility.trace(l_proc||': min_start_date='|| fnd_date.date_to_displaydate(alc_dates_rec.min_start_date));

919: FETCH c_alloc_dates INTO alc_dates_rec;
920: CLOSE c_alloc_dates;
921: --
922: hr_utility.set_location(l_proc, 40);
923: hr_utility.trace(l_proc||': min_start_date='|| fnd_date.date_to_displaydate(alc_dates_rec.min_start_date));
924: hr_utility.trace(l_proc||': max_end_date='|| fnd_date.date_to_displaydate(alc_dates_rec.max_end_date));
925: --
926: -- Check whether vehicle was allocated or
927: -- Withdrawn within the date range also

Line 924: hr_utility.trace(l_proc||': max_end_date='|| fnd_date.date_to_displaydate(alc_dates_rec.max_end_date));

920: CLOSE c_alloc_dates;
921: --
922: hr_utility.set_location(l_proc, 40);
923: hr_utility.trace(l_proc||': min_start_date='|| fnd_date.date_to_displaydate(alc_dates_rec.min_start_date));
924: hr_utility.trace(l_proc||': max_end_date='|| fnd_date.date_to_displaydate(alc_dates_rec.max_end_date));
925: --
926: -- Check whether vehicle was allocated or
927: -- Withdrawn within the date range also
928: -- check that this allocation or withdrawal

Line 946: hr_utility.set_location(l_proc, 50);

942: OPEN c_first_asg(asg_rec.assignment_id, alc_dates_rec.min_start_date);
943: FETCH c_first_asg INTO first_asg_rec;
944: CLOSE c_first_asg;
945: --
946: hr_utility.set_location(l_proc, 50);
947: hr_utility.trace(l_proc||': First Assignment='|| first_asg_rec.assignment_id);
948: -- Get primary car allocation of the
949: -- first assignment of this person
950: -- in this tax ref

Line 947: hr_utility.trace(l_proc||': First Assignment='|| first_asg_rec.assignment_id);

943: FETCH c_first_asg INTO first_asg_rec;
944: CLOSE c_first_asg;
945: --
946: hr_utility.set_location(l_proc, 50);
947: hr_utility.trace(l_proc||': First Assignment='|| first_asg_rec.assignment_id);
948: -- Get primary car allocation of the
949: -- first assignment of this person
950: -- in this tax ref
951: OPEN c_primary_car(first_asg_rec.assignment_id, alc_dates_rec.min_start_date);

Line 955: hr_utility.set_location(l_proc, 60);

951: OPEN c_primary_car(first_asg_rec.assignment_id, alc_dates_rec.min_start_date);
952: FETCH c_primary_car INTO primary_car_rec;
953: CLOSE c_primary_car;
954: --
955: hr_utility.set_location(l_proc, 60);
956: hr_utility.trace(l_proc||': Primary Car Allocation='|| primary_car_rec.vehicle_allocation_id);
957: --
958: IF primary_car_rec.vehicle_allocation_id = alc_rec.vehicle_allocation_id THEN
959: -- This is the first car allocation

Line 956: hr_utility.trace(l_proc||': Primary Car Allocation='|| primary_car_rec.vehicle_allocation_id);

952: FETCH c_primary_car INTO primary_car_rec;
953: CLOSE c_primary_car;
954: --
955: hr_utility.set_location(l_proc, 60);
956: hr_utility.trace(l_proc||': Primary Car Allocation='|| primary_car_rec.vehicle_allocation_id);
957: --
958: IF primary_car_rec.vehicle_allocation_id = alc_rec.vehicle_allocation_id THEN
959: -- This is the first car allocation
960: -- of this employee in this tax ref

Line 971: hr_utility.set_location(l_proc, 70);

967: ELSE
968: L_action_flag := 'N';
969: END IF;
970: --
971: hr_utility.set_location(l_proc, 70);
972: hr_utility.trace(l_proc||': l_action_flag='|| l_action_flag);
973: --
974: CLOSE c_prior_prim_car;
975: ELSE

Line 972: hr_utility.trace(l_proc||': l_action_flag='|| l_action_flag);

968: L_action_flag := 'N';
969: END IF;
970: --
971: hr_utility.set_location(l_proc, 70);
972: hr_utility.trace(l_proc||': l_action_flag='|| l_action_flag);
973: --
974: CLOSE c_prior_prim_car;
975: ELSE
976: -- Not the first car of the employee

Line 981: hr_utility.set_location(l_proc, 80);

977: -- report this as new car
978: L_action_flag := 'N';
979: END IF;
980: --
981: hr_utility.set_location(l_proc, 80);
982: hr_utility.trace(l_proc||': l_action_flag='|| l_action_flag);
983: --
984: ELSE
985: -- Not a primary car therefore mark

Line 982: hr_utility.trace(l_proc||': l_action_flag='|| l_action_flag);

978: L_action_flag := 'N';
979: END IF;
980: --
981: hr_utility.set_location(l_proc, 80);
982: hr_utility.trace(l_proc||': l_action_flag='|| l_action_flag);
983: --
984: ELSE
985: -- Not a primary car therefore mark
986: -- it as new car allocation action

Line 990: hr_utility.set_location(l_proc, 90);

986: -- it as new car allocation action
987: l_action_flag := 'N';
988: END IF;
989: --
990: hr_utility.set_location(l_proc, 90);
991: hr_utility.trace(l_proc||': l_action_flag='|| l_action_flag);
992: --
993: IF L_action_flag <> 'X' THEN
994: -- Check whether this allocation action

Line 991: hr_utility.trace(l_proc||': l_action_flag='|| l_action_flag);

987: l_action_flag := 'N';
988: END IF;
989: --
990: hr_utility.set_location(l_proc, 90);
991: hr_utility.trace(l_proc||': l_action_flag='|| l_action_flag);
992: --
993: IF L_action_flag <> 'X' THEN
994: -- Check whether this allocation action
995: -- has been already archived

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

998: alc_rec.vehicle_allocation_id,
999: alc_dates_rec.min_start_date,
1000: l_action_flag);
1001: --
1002: hr_utility.set_location(l_proc, 100);
1003: hr_utility.trace(l_proc||': l_archived_flag='|| l_archived_flag);
1004: --
1005: IF l_archived_flag = 'N' THEN
1006: -- Action has not been archived already

Line 1003: hr_utility.trace(l_proc||': l_archived_flag='|| l_archived_flag);

999: alc_dates_rec.min_start_date,
1000: l_action_flag);
1001: --
1002: hr_utility.set_location(l_proc, 100);
1003: hr_utility.trace(l_proc||': l_archived_flag='|| l_archived_flag);
1004: --
1005: IF l_archived_flag = 'N' THEN
1006: -- Action has not been archived already
1007: -- therefore create assignment action

Line 1032: hr_utility.set_location(l_proc, 50);

1028: OPEN c_first_asg(asg_rec.assignment_id, alc_dates_rec.max_end_date);
1029: FETCH c_first_asg INTO first_asg_rec;
1030: CLOSE c_first_asg;
1031: --
1032: hr_utility.set_location(l_proc, 50);
1033: hr_utility.trace(l_proc||': First Assignment='|| first_asg_rec.assignment_id);
1034: -- Get primary car allocation of the
1035: -- first assignment of this person
1036: -- in this tax ref

Line 1033: hr_utility.trace(l_proc||': First Assignment='|| first_asg_rec.assignment_id);

1029: FETCH c_first_asg INTO first_asg_rec;
1030: CLOSE c_first_asg;
1031: --
1032: hr_utility.set_location(l_proc, 50);
1033: hr_utility.trace(l_proc||': First Assignment='|| first_asg_rec.assignment_id);
1034: -- Get primary car allocation of the
1035: -- first assignment of this person
1036: -- in this tax ref
1037: OPEN c_primary_car(first_asg_rec.assignment_id, alc_dates_rec.max_end_date);

Line 1041: hr_utility.set_location(l_proc, 60);

1037: OPEN c_primary_car(first_asg_rec.assignment_id, alc_dates_rec.max_end_date);
1038: FETCH c_primary_car INTO primary_car_rec;
1039: CLOSE c_primary_car;
1040: --
1041: hr_utility.set_location(l_proc, 60);
1042: hr_utility.trace(l_proc||': Primary Car Allocation='|| primary_car_rec.vehicle_allocation_id);
1043: --
1044: IF primary_car_rec.vehicle_allocation_id = alc_rec.vehicle_allocation_id THEN
1045: --

Line 1042: hr_utility.trace(l_proc||': Primary Car Allocation='|| primary_car_rec.vehicle_allocation_id);

1038: FETCH c_primary_car INTO primary_car_rec;
1039: CLOSE c_primary_car;
1040: --
1041: hr_utility.set_location(l_proc, 60);
1042: hr_utility.trace(l_proc||': Primary Car Allocation='|| primary_car_rec.vehicle_allocation_id);
1043: --
1044: IF primary_car_rec.vehicle_allocation_id = alc_rec.vehicle_allocation_id THEN
1045: --
1046: OPEN c_next_prim_car(asg_rec.assignment_id, Alc_dates_rec.max_end_date);

Line 1058: hr_utility.set_location(l_proc, 70);

1054: -- This is a withdrawal action
1055: L_action_flag := 'W';
1056: END IF;
1057: --
1058: hr_utility.set_location(l_proc, 70);
1059: hr_utility.trace(l_proc||': l_action_flag='|| l_action_flag);
1060: --
1061: CLOSE c_next_prim_car;
1062: ELSE

Line 1059: hr_utility.trace(l_proc||': l_action_flag='|| l_action_flag);

1055: L_action_flag := 'W';
1056: END IF;
1057: --
1058: hr_utility.set_location(l_proc, 70);
1059: hr_utility.trace(l_proc||': l_action_flag='|| l_action_flag);
1060: --
1061: CLOSE c_next_prim_car;
1062: ELSE
1063: -- Not the first car of the employee

Line 1069: hr_utility.set_location(l_proc, 80);

1065: L_action_flag := 'W';
1066: END IF;
1067: --
1068: --
1069: hr_utility.set_location(l_proc, 80);
1070: hr_utility.trace(l_proc||': l_action_flag='|| l_action_flag);
1071: --
1072: ELSE
1073: -- Not a first car therefore mark

Line 1070: hr_utility.trace(l_proc||': l_action_flag='|| l_action_flag);

1066: END IF;
1067: --
1068: --
1069: hr_utility.set_location(l_proc, 80);
1070: hr_utility.trace(l_proc||': l_action_flag='|| l_action_flag);
1071: --
1072: ELSE
1073: -- Not a first car therefore mark
1074: -- it as withdrawal car action

Line 1078: hr_utility.set_location(l_proc, 90);

1074: -- it as withdrawal car action
1075: l_action_flag := 'W';
1076: END IF;
1077: --
1078: hr_utility.set_location(l_proc, 90);
1079: hr_utility.trace(l_proc||': l_action_flag='|| l_action_flag);
1080: --
1081: IF L_action_flag <> 'X' THEN
1082: -- Check whether this allocation action

Line 1079: hr_utility.trace(l_proc||': l_action_flag='|| l_action_flag);

1075: l_action_flag := 'W';
1076: END IF;
1077: --
1078: hr_utility.set_location(l_proc, 90);
1079: hr_utility.trace(l_proc||': l_action_flag='|| l_action_flag);
1080: --
1081: IF L_action_flag <> 'X' THEN
1082: -- Check whether this allocation action
1083: -- has been already archived

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

1086: alc_rec.vehicle_allocation_id,
1087: alc_dates_rec.min_start_date,
1088: l_action_flag);
1089: --
1090: hr_utility.set_location(l_proc, 100);
1091: hr_utility.trace(l_proc||': l_archived_flag='|| l_archived_flag);
1092: --
1093: IF l_archived_flag = 'N' THEN
1094: -- Action has not been archived already

Line 1091: hr_utility.trace(l_proc||': l_archived_flag='|| l_archived_flag);

1087: alc_dates_rec.min_start_date,
1088: l_action_flag);
1089: --
1090: hr_utility.set_location(l_proc, 100);
1091: hr_utility.trace(l_proc||': l_archived_flag='|| l_archived_flag);
1092: --
1093: IF l_archived_flag = 'N' THEN
1094: -- Action has not been archived already
1095: -- therefore create assignment action

Line 1107: hr_utility.set_location(l_proc, 110);

1103: -- Fuel type has changed therefore make sure
1104: -- this change occured after the vehicle was
1105: -- allocated to this assignment
1106: --
1107: hr_utility.set_location(l_proc, 110);
1108: hr_utility.trace(l_proc||': effective_start_date='|| vehicle_changes_rec.effective_start_date);
1109: hr_utility.trace(l_proc||': fuel_type='|| vehicle_changes_rec.fuel_type);
1110: --
1111: IF (vehicle_changes_rec.effective_start_date

Line 1108: hr_utility.trace(l_proc||': effective_start_date='|| vehicle_changes_rec.effective_start_date);

1104: -- this change occured after the vehicle was
1105: -- allocated to this assignment
1106: --
1107: hr_utility.set_location(l_proc, 110);
1108: hr_utility.trace(l_proc||': effective_start_date='|| vehicle_changes_rec.effective_start_date);
1109: hr_utility.trace(l_proc||': fuel_type='|| vehicle_changes_rec.fuel_type);
1110: --
1111: IF (vehicle_changes_rec.effective_start_date
1112: BETWEEN alc_dates_rec.min_start_date+1 AND alc_dates_rec.max_end_date) AND

Line 1109: hr_utility.trace(l_proc||': fuel_type='|| vehicle_changes_rec.fuel_type);

1105: -- allocated to this assignment
1106: --
1107: hr_utility.set_location(l_proc, 110);
1108: hr_utility.trace(l_proc||': effective_start_date='|| vehicle_changes_rec.effective_start_date);
1109: hr_utility.trace(l_proc||': fuel_type='|| vehicle_changes_rec.fuel_type);
1110: --
1111: IF (vehicle_changes_rec.effective_start_date
1112: BETWEEN alc_dates_rec.min_start_date+1 AND alc_dates_rec.max_end_date) AND
1113: (vehicle_changes_rec.effective_start_date

Line 1124: hr_utility.set_location(l_proc, 120);

1120: alc_rec.vehicle_allocation_id,
1121: vehicle_changes_rec.effective_start_date,
1122: 'F');
1123: --
1124: hr_utility.set_location(l_proc, 120);
1125: hr_utility.trace(l_proc||': l_archived_flag='|| l_archived_flag);
1126: --
1127: IF l_archived_flag = 'N' THEN
1128: -- Action has not been archived already

Line 1125: hr_utility.trace(l_proc||': l_archived_flag='|| l_archived_flag);

1121: vehicle_changes_rec.effective_start_date,
1122: 'F');
1123: --
1124: hr_utility.set_location(l_proc, 120);
1125: hr_utility.trace(l_proc||': l_archived_flag='|| l_archived_flag);
1126: --
1127: IF l_archived_flag = 'N' THEN
1128: -- Action has not been archived already
1129: -- therefore create assignment action

Line 1136: hr_utility.set_location(l_proc, 130);

1132: END IF;
1133: END IF;
1134: END LOOP;
1135: --
1136: hr_utility.set_location(l_proc, 130);
1137: --
1138: --
1139: L_action_flag := 'X';
1140: l_archived_flag := 'Y';

Line 1153: hr_utility.set_location(l_proc, 160);

1149: -- Assignment has started on this payroll or tax ref during the
1150: -- input date range and this car allocation was active on the
1151: -- start date therefore check whether it is a transfer
1152: -- from another tax ref
1153: hr_utility.set_location(l_proc, 160);
1154: l_previous_tax_ref := NULL;
1155: --
1156: OPEN c_tax_ref(asg_rec.assignment_id, asg_rec.asg_min_start_date-1);
1157: FETCH c_tax_ref INTO l_previous_tax_ref;

Line 1160: hr_utility.set_location(l_proc, 170);

1156: OPEN c_tax_ref(asg_rec.assignment_id, asg_rec.asg_min_start_date-1);
1157: FETCH c_tax_ref INTO l_previous_tax_ref;
1158: CLOSE c_tax_ref;
1159: --
1160: hr_utility.set_location(l_proc, 170);
1161: hr_utility.trace(l_proc||', l_previous_tax_ref='||l_previous_tax_ref);
1162: --
1163: IF l_previous_tax_ref is NOT NULL AND l_previous_tax_ref <> g_tax_ref THEN
1164: -- This assignment has a different prior tax ref

Line 1161: hr_utility.trace(l_proc||', l_previous_tax_ref='||l_previous_tax_ref);

1157: FETCH c_tax_ref INTO l_previous_tax_ref;
1158: CLOSE c_tax_ref;
1159: --
1160: hr_utility.set_location(l_proc, 170);
1161: hr_utility.trace(l_proc||', l_previous_tax_ref='||l_previous_tax_ref);
1162: --
1163: IF l_previous_tax_ref is NOT NULL AND l_previous_tax_ref <> g_tax_ref THEN
1164: -- This assignment has a different prior tax ref
1165: -- therefore it should be reported as a new car

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

1163: IF l_previous_tax_ref is NOT NULL AND l_previous_tax_ref <> g_tax_ref THEN
1164: -- This assignment has a different prior tax ref
1165: -- therefore it should be reported as a new car
1166: -- allocation on this EDI message.
1167: hr_utility.set_location(l_proc, 180);
1168: l_action_flag := 'N';
1169: --
1170: -- Check whether this allocation action
1171: -- has been already archived

Line 1178: hr_utility.set_location(l_proc, 190);

1174: alc_rec.vehicle_allocation_id,
1175: asg_rec.asg_min_start_date,
1176: l_action_flag);
1177: --
1178: hr_utility.set_location(l_proc, 190);
1179: hr_utility.trace(l_proc||', l_archived_flag='||l_archived_flag);
1180: --
1181: IF l_archived_flag = 'N' THEN
1182: -- Action has not been archived already

Line 1179: hr_utility.trace(l_proc||', l_archived_flag='||l_archived_flag);

1175: asg_rec.asg_min_start_date,
1176: l_action_flag);
1177: --
1178: hr_utility.set_location(l_proc, 190);
1179: hr_utility.trace(l_proc||', l_archived_flag='||l_archived_flag);
1180: --
1181: IF l_archived_flag = 'N' THEN
1182: -- Action has not been archived already
1183: -- therefore create assignment action

Line 1199: hr_utility.set_location(l_proc, 200);

1195: -- Assignment has ended on this payroll or tax ref during the
1196: -- input date range and this car allocation was active on the
1197: -- end date therefore check whether it is a transfer
1198: -- to another tax ref
1199: hr_utility.set_location(l_proc, 200);
1200: l_next_tax_ref := NULL;
1201: --
1202: OPEN c_tax_ref(asg_rec.assignment_id, asg_rec.asg_max_end_date+1);
1203: FETCH c_tax_ref INTO l_next_tax_ref;

Line 1206: hr_utility.set_location(l_proc, 210);

1202: OPEN c_tax_ref(asg_rec.assignment_id, asg_rec.asg_max_end_date+1);
1203: FETCH c_tax_ref INTO l_next_tax_ref;
1204: CLOSE c_tax_ref;
1205: --
1206: hr_utility.set_location(l_proc, 210);
1207: hr_utility.trace(l_proc||', l_next_tax_ref='||l_next_tax_ref);
1208: --
1209: IF l_next_tax_ref is NOT NULL AND l_next_tax_ref <> g_tax_ref THEN
1210: -- This assignment has a different tax ref after end date

Line 1207: hr_utility.trace(l_proc||', l_next_tax_ref='||l_next_tax_ref);

1203: FETCH c_tax_ref INTO l_next_tax_ref;
1204: CLOSE c_tax_ref;
1205: --
1206: hr_utility.set_location(l_proc, 210);
1207: hr_utility.trace(l_proc||', l_next_tax_ref='||l_next_tax_ref);
1208: --
1209: IF l_next_tax_ref is NOT NULL AND l_next_tax_ref <> g_tax_ref THEN
1210: -- This assignment has a different tax ref after end date
1211: -- therefore it should be reported as allocation withdrawal

Line 1213: hr_utility.set_location(l_proc, 220);

1209: IF l_next_tax_ref is NOT NULL AND l_next_tax_ref <> g_tax_ref THEN
1210: -- This assignment has a different tax ref after end date
1211: -- therefore it should be reported as allocation withdrawal
1212: -- on this EDI message.
1213: hr_utility.set_location(l_proc, 220);
1214: l_action_flag := 'W';
1215: --
1216: -- Check whether this allocation action
1217: -- has been already archived

Line 1224: hr_utility.set_location(l_proc, 230);

1220: alc_rec.vehicle_allocation_id,
1221: asg_rec.asg_max_end_date,
1222: l_action_flag);
1223: --
1224: hr_utility.set_location(l_proc, 230);
1225: hr_utility.trace(l_proc||', l_archived_flag='||l_archived_flag);
1226: --
1227: IF l_archived_flag = 'N' THEN
1228: -- Action has not been archived already

Line 1225: hr_utility.trace(l_proc||', l_archived_flag='||l_archived_flag);

1221: asg_rec.asg_max_end_date,
1222: l_action_flag);
1223: --
1224: hr_utility.set_location(l_proc, 230);
1225: hr_utility.trace(l_proc||', l_archived_flag='||l_archived_flag);
1226: --
1227: IF l_archived_flag = 'N' THEN
1228: -- Action has not been archived already
1229: -- therefore create assignment action

Line 1236: hr_utility.set_location(l_proc, 240);

1232: --
1233: END IF;
1234: END IF;
1235: --
1236: hr_utility.set_location(l_proc, 240);
1237: --
1238: hr_utility.set_location(l_proc, 250);
1239: END LOOP;
1240: --

Line 1238: hr_utility.set_location(l_proc, 250);

1234: END IF;
1235: --
1236: hr_utility.set_location(l_proc, 240);
1237: --
1238: hr_utility.set_location(l_proc, 250);
1239: END LOOP;
1240: --
1241: hr_utility.set_location(l_proc, 260);
1242: --

Line 1241: hr_utility.set_location(l_proc, 260);

1237: --
1238: hr_utility.set_location(l_proc, 250);
1239: END LOOP;
1240: --
1241: hr_utility.set_location(l_proc, 260);
1242: --
1243: -- If flag is set then create action
1244: IF l_create_assact_flag = 'Y' THEN
1245: --

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

1246: SELECT pay_assignment_actions_s.nextval
1247: INTO l_actid
1248: FROM dual;
1249:
1250: hr_utility.set_location(l_proc, 270);
1251: hr_utility.trace(l_proc||': l_actid='||l_actid);
1252: hr_utility.trace(l_proc||': asg_rec.assignment_id='||asg_rec.assignment_id);
1253: hr_utility.trace(l_proc||': pactid='||pactid);
1254: hr_utility.trace(l_proc||': chunk='||chunk);

Line 1251: hr_utility.trace(l_proc||': l_actid='||l_actid);

1247: INTO l_actid
1248: FROM dual;
1249:
1250: hr_utility.set_location(l_proc, 270);
1251: hr_utility.trace(l_proc||': l_actid='||l_actid);
1252: hr_utility.trace(l_proc||': asg_rec.assignment_id='||asg_rec.assignment_id);
1253: hr_utility.trace(l_proc||': pactid='||pactid);
1254: hr_utility.trace(l_proc||': chunk='||chunk);
1255: --

Line 1252: hr_utility.trace(l_proc||': asg_rec.assignment_id='||asg_rec.assignment_id);

1248: FROM dual;
1249:
1250: hr_utility.set_location(l_proc, 270);
1251: hr_utility.trace(l_proc||': l_actid='||l_actid);
1252: hr_utility.trace(l_proc||': asg_rec.assignment_id='||asg_rec.assignment_id);
1253: hr_utility.trace(l_proc||': pactid='||pactid);
1254: hr_utility.trace(l_proc||': chunk='||chunk);
1255: --
1256: hr_nonrun_asact.insact(l_actid,

Line 1253: hr_utility.trace(l_proc||': pactid='||pactid);

1249:
1250: hr_utility.set_location(l_proc, 270);
1251: hr_utility.trace(l_proc||': l_actid='||l_actid);
1252: hr_utility.trace(l_proc||': asg_rec.assignment_id='||asg_rec.assignment_id);
1253: hr_utility.trace(l_proc||': pactid='||pactid);
1254: hr_utility.trace(l_proc||': chunk='||chunk);
1255: --
1256: hr_nonrun_asact.insact(l_actid,
1257: asg_rec.assignment_id,

Line 1254: hr_utility.trace(l_proc||': chunk='||chunk);

1250: hr_utility.set_location(l_proc, 270);
1251: hr_utility.trace(l_proc||': l_actid='||l_actid);
1252: hr_utility.trace(l_proc||': asg_rec.assignment_id='||asg_rec.assignment_id);
1253: hr_utility.trace(l_proc||': pactid='||pactid);
1254: hr_utility.trace(l_proc||': chunk='||chunk);
1255: --
1256: hr_nonrun_asact.insact(l_actid,
1257: asg_rec.assignment_id,
1258: pactid,

Line 1261: hr_utility.set_location(l_proc, 280);

1257: asg_rec.assignment_id,
1258: pactid,
1259: chunk, NULL);
1260: --
1261: hr_utility.set_location(l_proc, 280);
1262: --
1263: END IF;
1264: END LOOP;
1265: --

Line 1266: hr_utility.set_location('Leaving: '||l_proc,290);

1262: --
1263: END IF;
1264: END LOOP;
1265: --
1266: hr_utility.set_location('Leaving: '||l_proc,290);
1267: -- hr_utility.trace_off;
1268: EXCEPTION
1269: WHEN OTHERS THEN
1270: hr_utility.set_location('Leaving: '||l_proc,300);

Line 1267: -- hr_utility.trace_off;

1263: END IF;
1264: END LOOP;
1265: --
1266: hr_utility.set_location('Leaving: '||l_proc,290);
1267: -- hr_utility.trace_off;
1268: EXCEPTION
1269: WHEN OTHERS THEN
1270: hr_utility.set_location('Leaving: '||l_proc,300);
1271: -- hr_utility.trace_off;

Line 1270: hr_utility.set_location('Leaving: '||l_proc,300);

1266: hr_utility.set_location('Leaving: '||l_proc,290);
1267: -- hr_utility.trace_off;
1268: EXCEPTION
1269: WHEN OTHERS THEN
1270: hr_utility.set_location('Leaving: '||l_proc,300);
1271: -- hr_utility.trace_off;
1272: raise;
1273: END Create_asg_act_v2;
1274:

Line 1271: -- hr_utility.trace_off;

1267: -- hr_utility.trace_off;
1268: EXCEPTION
1269: WHEN OTHERS THEN
1270: hr_utility.set_location('Leaving: '||l_proc,300);
1271: -- hr_utility.trace_off;
1272: raise;
1273: END Create_asg_act_v2;
1274:
1275:

Line 1346: --hr_utility.trace_on(null, 'KTHAMPAN');

1342: l_archived_flag VARCHAR2(1);
1343: l_private_start_dt date;
1344: l_latest_private_flag varchar2(1);
1345: BEGIN
1346: --hr_utility.trace_on(null, 'KTHAMPAN');
1347: hr_utility.set_location('Entering '||l_proc, 10);
1348: --
1349: OPEN c_param_values;
1350: FETCH c_param_values INTO g_payroll_id,

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

1343: l_private_start_dt date;
1344: l_latest_private_flag varchar2(1);
1345: BEGIN
1346: --hr_utility.trace_on(null, 'KTHAMPAN');
1347: hr_utility.set_location('Entering '||l_proc, 10);
1348: --
1349: OPEN c_param_values;
1350: FETCH c_param_values INTO g_payroll_id,
1351: g_tax_ref,

Line 1358: hr_utility.set_location(l_proc, 15);

1354: g_end_date,
1355: g_business_group_id;
1356: CLOSE c_param_values;
1357: --
1358: hr_utility.set_location(l_proc, 15);
1359: hr_utility.trace(l_proc||': g_payroll_id='||g_payroll_id);
1360: hr_utility.trace(l_proc||': g_tax_ref='||g_tax_ref);
1361: hr_utility.trace(l_proc||': g_start_date='||fnd_date.date_to_displaydate(g_start_date));
1362: hr_utility.trace(l_proc||': g_effective_date='||fnd_date.date_to_displaydate(g_effective_date));

Line 1359: hr_utility.trace(l_proc||': g_payroll_id='||g_payroll_id);

1355: g_business_group_id;
1356: CLOSE c_param_values;
1357: --
1358: hr_utility.set_location(l_proc, 15);
1359: hr_utility.trace(l_proc||': g_payroll_id='||g_payroll_id);
1360: hr_utility.trace(l_proc||': g_tax_ref='||g_tax_ref);
1361: hr_utility.trace(l_proc||': g_start_date='||fnd_date.date_to_displaydate(g_start_date));
1362: hr_utility.trace(l_proc||': g_effective_date='||fnd_date.date_to_displaydate(g_effective_date));
1363: hr_utility.trace(l_proc||': g_end_date='||fnd_date.date_to_displaydate(g_end_date));

Line 1360: hr_utility.trace(l_proc||': g_tax_ref='||g_tax_ref);

1356: CLOSE c_param_values;
1357: --
1358: hr_utility.set_location(l_proc, 15);
1359: hr_utility.trace(l_proc||': g_payroll_id='||g_payroll_id);
1360: hr_utility.trace(l_proc||': g_tax_ref='||g_tax_ref);
1361: hr_utility.trace(l_proc||': g_start_date='||fnd_date.date_to_displaydate(g_start_date));
1362: hr_utility.trace(l_proc||': g_effective_date='||fnd_date.date_to_displaydate(g_effective_date));
1363: hr_utility.trace(l_proc||': g_end_date='||fnd_date.date_to_displaydate(g_end_date));
1364: hr_utility.trace(l_proc||': g_business_group_id='||g_business_group_id);

Line 1361: hr_utility.trace(l_proc||': g_start_date='||fnd_date.date_to_displaydate(g_start_date));

1357: --
1358: hr_utility.set_location(l_proc, 15);
1359: hr_utility.trace(l_proc||': g_payroll_id='||g_payroll_id);
1360: hr_utility.trace(l_proc||': g_tax_ref='||g_tax_ref);
1361: hr_utility.trace(l_proc||': g_start_date='||fnd_date.date_to_displaydate(g_start_date));
1362: hr_utility.trace(l_proc||': g_effective_date='||fnd_date.date_to_displaydate(g_effective_date));
1363: hr_utility.trace(l_proc||': g_end_date='||fnd_date.date_to_displaydate(g_end_date));
1364: hr_utility.trace(l_proc||': g_business_group_id='||g_business_group_id);
1365: For asg_rec IN c_asg

Line 1362: hr_utility.trace(l_proc||': g_effective_date='||fnd_date.date_to_displaydate(g_effective_date));

1358: hr_utility.set_location(l_proc, 15);
1359: hr_utility.trace(l_proc||': g_payroll_id='||g_payroll_id);
1360: hr_utility.trace(l_proc||': g_tax_ref='||g_tax_ref);
1361: hr_utility.trace(l_proc||': g_start_date='||fnd_date.date_to_displaydate(g_start_date));
1362: hr_utility.trace(l_proc||': g_effective_date='||fnd_date.date_to_displaydate(g_effective_date));
1363: hr_utility.trace(l_proc||': g_end_date='||fnd_date.date_to_displaydate(g_end_date));
1364: hr_utility.trace(l_proc||': g_business_group_id='||g_business_group_id);
1365: For asg_rec IN c_asg
1366: LOOP

Line 1363: hr_utility.trace(l_proc||': g_end_date='||fnd_date.date_to_displaydate(g_end_date));

1359: hr_utility.trace(l_proc||': g_payroll_id='||g_payroll_id);
1360: hr_utility.trace(l_proc||': g_tax_ref='||g_tax_ref);
1361: hr_utility.trace(l_proc||': g_start_date='||fnd_date.date_to_displaydate(g_start_date));
1362: hr_utility.trace(l_proc||': g_effective_date='||fnd_date.date_to_displaydate(g_effective_date));
1363: hr_utility.trace(l_proc||': g_end_date='||fnd_date.date_to_displaydate(g_end_date));
1364: hr_utility.trace(l_proc||': g_business_group_id='||g_business_group_id);
1365: For asg_rec IN c_asg
1366: LOOP
1367: -- Loop through all assignments

Line 1364: hr_utility.trace(l_proc||': g_business_group_id='||g_business_group_id);

1360: hr_utility.trace(l_proc||': g_tax_ref='||g_tax_ref);
1361: hr_utility.trace(l_proc||': g_start_date='||fnd_date.date_to_displaydate(g_start_date));
1362: hr_utility.trace(l_proc||': g_effective_date='||fnd_date.date_to_displaydate(g_effective_date));
1363: hr_utility.trace(l_proc||': g_end_date='||fnd_date.date_to_displaydate(g_end_date));
1364: hr_utility.trace(l_proc||': g_business_group_id='||g_business_group_id);
1365: For asg_rec IN c_asg
1366: LOOP
1367: -- Loop through all assignments
1368: hr_utility.set_location(l_proc, 20);

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

1364: hr_utility.trace(l_proc||': g_business_group_id='||g_business_group_id);
1365: For asg_rec IN c_asg
1366: LOOP
1367: -- Loop through all assignments
1368: hr_utility.set_location(l_proc, 20);
1369: hr_utility.trace(l_proc||': assignment_id='||asg_rec.assignment_id);
1370: hr_utility.trace(l_proc||': asg_min_start_date='||fnd_date.date_to_displaydate(asg_rec.asg_min_start_date));
1371: hr_utility.trace(l_proc||': asg_max_end_date='||fnd_date.date_to_displaydate(asg_rec.asg_max_end_date));
1372: --

Line 1369: hr_utility.trace(l_proc||': assignment_id='||asg_rec.assignment_id);

1365: For asg_rec IN c_asg
1366: LOOP
1367: -- Loop through all assignments
1368: hr_utility.set_location(l_proc, 20);
1369: hr_utility.trace(l_proc||': assignment_id='||asg_rec.assignment_id);
1370: hr_utility.trace(l_proc||': asg_min_start_date='||fnd_date.date_to_displaydate(asg_rec.asg_min_start_date));
1371: hr_utility.trace(l_proc||': asg_max_end_date='||fnd_date.date_to_displaydate(asg_rec.asg_max_end_date));
1372: --
1373: l_create_assact_flag := 'N';

Line 1370: hr_utility.trace(l_proc||': asg_min_start_date='||fnd_date.date_to_displaydate(asg_rec.asg_min_start_date));

1366: LOOP
1367: -- Loop through all assignments
1368: hr_utility.set_location(l_proc, 20);
1369: hr_utility.trace(l_proc||': assignment_id='||asg_rec.assignment_id);
1370: hr_utility.trace(l_proc||': asg_min_start_date='||fnd_date.date_to_displaydate(asg_rec.asg_min_start_date));
1371: hr_utility.trace(l_proc||': asg_max_end_date='||fnd_date.date_to_displaydate(asg_rec.asg_max_end_date));
1372: --
1373: l_create_assact_flag := 'N';
1374: --

Line 1371: hr_utility.trace(l_proc||': asg_max_end_date='||fnd_date.date_to_displaydate(asg_rec.asg_max_end_date));

1367: -- Loop through all assignments
1368: hr_utility.set_location(l_proc, 20);
1369: hr_utility.trace(l_proc||': assignment_id='||asg_rec.assignment_id);
1370: hr_utility.trace(l_proc||': asg_min_start_date='||fnd_date.date_to_displaydate(asg_rec.asg_min_start_date));
1371: hr_utility.trace(l_proc||': asg_max_end_date='||fnd_date.date_to_displaydate(asg_rec.asg_max_end_date));
1372: --
1373: l_create_assact_flag := 'N';
1374: --
1375: FOR alc_rec IN c_allocations(asg_rec.assignment_id) LOOP

Line 1378: hr_utility.set_location(l_proc, 30);

1374: --
1375: FOR alc_rec IN c_allocations(asg_rec.assignment_id) LOOP
1376: -- Loop through all vehicle allocations
1377: -- over the date range
1378: hr_utility.set_location(l_proc, 30);
1379: hr_utility.trace(l_proc||': vehicle_allocation_id='||alc_rec.vehicle_allocation_id);
1380: hr_utility.trace(l_proc||': usage_type='||alc_rec.usage_type);
1381: --
1382: L_action_flag := 'X';

Line 1379: hr_utility.trace(l_proc||': vehicle_allocation_id='||alc_rec.vehicle_allocation_id);

1375: FOR alc_rec IN c_allocations(asg_rec.assignment_id) LOOP
1376: -- Loop through all vehicle allocations
1377: -- over the date range
1378: hr_utility.set_location(l_proc, 30);
1379: hr_utility.trace(l_proc||': vehicle_allocation_id='||alc_rec.vehicle_allocation_id);
1380: hr_utility.trace(l_proc||': usage_type='||alc_rec.usage_type);
1381: --
1382: L_action_flag := 'X';
1383: l_archived_flag := 'Y';

Line 1380: hr_utility.trace(l_proc||': usage_type='||alc_rec.usage_type);

1376: -- Loop through all vehicle allocations
1377: -- over the date range
1378: hr_utility.set_location(l_proc, 30);
1379: hr_utility.trace(l_proc||': vehicle_allocation_id='||alc_rec.vehicle_allocation_id);
1380: hr_utility.trace(l_proc||': usage_type='||alc_rec.usage_type);
1381: --
1382: L_action_flag := 'X';
1383: l_archived_flag := 'Y';
1384: --

Line 1392: hr_utility.set_location(l_proc, 32);

1388: open private_flag_check(alc_rec.vehicle_allocation_id);
1389: fetch private_flag_check into l_private_start_dt;
1390: close private_flag_check;
1391:
1392: hr_utility.set_location(l_proc, 32);
1393: hr_utility.trace(l_proc||': l_private_start_dt='||l_private_start_dt);
1394: if l_private_start_dt is not null then
1395: -- Cursor to check if the change was from Y to N i.e. Withdrawal
1396: -- else was it from N to Y i.e. new Benifit

Line 1393: hr_utility.trace(l_proc||': l_private_start_dt='||l_private_start_dt);

1389: fetch private_flag_check into l_private_start_dt;
1390: close private_flag_check;
1391:
1392: hr_utility.set_location(l_proc, 32);
1393: hr_utility.trace(l_proc||': l_private_start_dt='||l_private_start_dt);
1394: if l_private_start_dt is not null then
1395: -- Cursor to check if the change was from Y to N i.e. Withdrawal
1396: -- else was it from N to Y i.e. new Benifit
1397:

Line 1402: hr_utility.set_location(l_proc, 35);

1398: open withdrawal_check(alc_rec.vehicle_allocation_id,l_private_start_dt );
1399: fetch withdrawal_check into l_latest_private_flag;
1400: close withdrawal_check;
1401:
1402: hr_utility.set_location(l_proc, 35);
1403: hr_utility.trace(l_proc||': l_latest_private_flag='||nvl(l_latest_private_flag,'NULL'));
1404:
1405: if l_latest_private_flag = 'Y' then
1406: -- This means the value has changed from N to Y so this is a new benefit

Line 1403: hr_utility.trace(l_proc||': l_latest_private_flag='||nvl(l_latest_private_flag,'NULL'));

1399: fetch withdrawal_check into l_latest_private_flag;
1400: close withdrawal_check;
1401:
1402: hr_utility.set_location(l_proc, 35);
1403: hr_utility.trace(l_proc||': l_latest_private_flag='||nvl(l_latest_private_flag,'NULL'));
1404:
1405: if l_latest_private_flag = 'Y' then
1406: -- This means the value has changed from N to Y so this is a new benefit
1407: L_action_flag := 'N';

Line 1422: hr_utility.set_location(l_proc, 38);

1418: alc_rec.vehicle_allocation_id,
1419: l_private_start_dt,
1420: l_action_flag);
1421: --
1422: hr_utility.set_location(l_proc, 38);
1423: hr_utility.trace(l_proc||': l_archived_flag='|| l_archived_flag);
1424: --
1425: IF l_archived_flag = 'N' THEN
1426: -- Action has not been archived already

Line 1423: hr_utility.trace(l_proc||': l_archived_flag='|| l_archived_flag);

1419: l_private_start_dt,
1420: l_action_flag);
1421: --
1422: hr_utility.set_location(l_proc, 38);
1423: hr_utility.trace(l_proc||': l_archived_flag='|| l_archived_flag);
1424: --
1425: IF l_archived_flag = 'N' THEN
1426: -- Action has not been archived already
1427: -- therefore create assignment action

Line 1445: hr_utility.set_location(l_proc, 40);

1441: OPEN c_alloc_dates(alc_rec.vehicle_allocation_id);
1442: FETCH c_alloc_dates INTO alc_dates_rec;
1443: CLOSE c_alloc_dates;
1444: --
1445: hr_utility.set_location(l_proc, 40);
1446: hr_utility.trace(l_proc||': min_start_date='|| fnd_date.date_to_displaydate(alc_dates_rec.min_start_date));
1447: hr_utility.trace(l_proc||': max_end_date='|| fnd_date.date_to_displaydate(alc_dates_rec.max_end_date));
1448: --
1449: -- Check whether vehicle was allocated or

Line 1446: hr_utility.trace(l_proc||': min_start_date='|| fnd_date.date_to_displaydate(alc_dates_rec.min_start_date));

1442: FETCH c_alloc_dates INTO alc_dates_rec;
1443: CLOSE c_alloc_dates;
1444: --
1445: hr_utility.set_location(l_proc, 40);
1446: hr_utility.trace(l_proc||': min_start_date='|| fnd_date.date_to_displaydate(alc_dates_rec.min_start_date));
1447: hr_utility.trace(l_proc||': max_end_date='|| fnd_date.date_to_displaydate(alc_dates_rec.max_end_date));
1448: --
1449: -- Check whether vehicle was allocated or
1450: -- Withdrawn within the date range also

Line 1447: hr_utility.trace(l_proc||': max_end_date='|| fnd_date.date_to_displaydate(alc_dates_rec.max_end_date));

1443: CLOSE c_alloc_dates;
1444: --
1445: hr_utility.set_location(l_proc, 40);
1446: hr_utility.trace(l_proc||': min_start_date='|| fnd_date.date_to_displaydate(alc_dates_rec.min_start_date));
1447: hr_utility.trace(l_proc||': max_end_date='|| fnd_date.date_to_displaydate(alc_dates_rec.max_end_date));
1448: --
1449: -- Check whether vehicle was allocated or
1450: -- Withdrawn within the date range also
1451: -- check that this allocation or withdrawal

Line 1453: hr_utility.trace(l_proc||': alc_dates_rec.min_start_date='|| fnd_date.date_to_displaydate(alc_dates_rec.min_start_date));

1449: -- Check whether vehicle was allocated or
1450: -- Withdrawn within the date range also
1451: -- check that this allocation or withdrawal
1452: -- happened when assignment was with input tax ref
1453: hr_utility.trace(l_proc||': alc_dates_rec.min_start_date='|| fnd_date.date_to_displaydate(alc_dates_rec.min_start_date));
1454: hr_utility.trace(l_proc||': asg_rec.asg_min_start_date='|| fnd_date.date_to_displaydate(asg_rec.asg_min_start_date));
1455: hr_utility.trace(l_proc||': asg_rec.asg_max_end_date='|| fnd_date.date_to_displaydate(asg_rec.asg_max_end_date));
1456: hr_utility.trace(l_proc||': alc_rec.usage_type='|| alc_rec.usage_type);
1457: IF (alc_dates_rec.min_start_date BETWEEN g_start_date AND g_end_Date) AND

Line 1454: hr_utility.trace(l_proc||': asg_rec.asg_min_start_date='|| fnd_date.date_to_displaydate(asg_rec.asg_min_start_date));

1450: -- Withdrawn within the date range also
1451: -- check that this allocation or withdrawal
1452: -- happened when assignment was with input tax ref
1453: hr_utility.trace(l_proc||': alc_dates_rec.min_start_date='|| fnd_date.date_to_displaydate(alc_dates_rec.min_start_date));
1454: hr_utility.trace(l_proc||': asg_rec.asg_min_start_date='|| fnd_date.date_to_displaydate(asg_rec.asg_min_start_date));
1455: hr_utility.trace(l_proc||': asg_rec.asg_max_end_date='|| fnd_date.date_to_displaydate(asg_rec.asg_max_end_date));
1456: hr_utility.trace(l_proc||': alc_rec.usage_type='|| alc_rec.usage_type);
1457: IF (alc_dates_rec.min_start_date BETWEEN g_start_date AND g_end_Date) AND
1458: (alc_dates_rec.min_start_date BETWEEN asg_rec.asg_min_start_date AND asg_rec.asg_max_end_date) THEN

Line 1455: hr_utility.trace(l_proc||': asg_rec.asg_max_end_date='|| fnd_date.date_to_displaydate(asg_rec.asg_max_end_date));

1451: -- check that this allocation or withdrawal
1452: -- happened when assignment was with input tax ref
1453: hr_utility.trace(l_proc||': alc_dates_rec.min_start_date='|| fnd_date.date_to_displaydate(alc_dates_rec.min_start_date));
1454: hr_utility.trace(l_proc||': asg_rec.asg_min_start_date='|| fnd_date.date_to_displaydate(asg_rec.asg_min_start_date));
1455: hr_utility.trace(l_proc||': asg_rec.asg_max_end_date='|| fnd_date.date_to_displaydate(asg_rec.asg_max_end_date));
1456: hr_utility.trace(l_proc||': alc_rec.usage_type='|| alc_rec.usage_type);
1457: IF (alc_dates_rec.min_start_date BETWEEN g_start_date AND g_end_Date) AND
1458: (alc_dates_rec.min_start_date BETWEEN asg_rec.asg_min_start_date AND asg_rec.asg_max_end_date) THEN
1459: --

Line 1456: hr_utility.trace(l_proc||': alc_rec.usage_type='|| alc_rec.usage_type);

1452: -- happened when assignment was with input tax ref
1453: hr_utility.trace(l_proc||': alc_dates_rec.min_start_date='|| fnd_date.date_to_displaydate(alc_dates_rec.min_start_date));
1454: hr_utility.trace(l_proc||': asg_rec.asg_min_start_date='|| fnd_date.date_to_displaydate(asg_rec.asg_min_start_date));
1455: hr_utility.trace(l_proc||': asg_rec.asg_max_end_date='|| fnd_date.date_to_displaydate(asg_rec.asg_max_end_date));
1456: hr_utility.trace(l_proc||': alc_rec.usage_type='|| alc_rec.usage_type);
1457: IF (alc_dates_rec.min_start_date BETWEEN g_start_date AND g_end_Date) AND
1458: (alc_dates_rec.min_start_date BETWEEN asg_rec.asg_min_start_date AND asg_rec.asg_max_end_date) THEN
1459: --
1460: -- This is a New Car or replacement action

Line 1473: hr_utility.set_location(l_proc, 50);

1469: OPEN c_first_asg(asg_rec.assignment_id, alc_dates_rec.min_start_date);
1470: FETCH c_first_asg INTO first_asg_rec;
1471: CLOSE c_first_asg;
1472: --
1473: hr_utility.set_location(l_proc, 50);
1474: hr_utility.trace(l_proc||': First Assignment='|| first_asg_rec.assignment_id);
1475: -- Get primary car allocation of the
1476: -- first assignment of this person
1477: -- in this tax ref

Line 1474: hr_utility.trace(l_proc||': First Assignment='|| first_asg_rec.assignment_id);

1470: FETCH c_first_asg INTO first_asg_rec;
1471: CLOSE c_first_asg;
1472: --
1473: hr_utility.set_location(l_proc, 50);
1474: hr_utility.trace(l_proc||': First Assignment='|| first_asg_rec.assignment_id);
1475: -- Get primary car allocation of the
1476: -- first assignment of this person
1477: -- in this tax ref
1478: OPEN c_primary_car(first_asg_rec.assignment_id, alc_dates_rec.min_start_date);

Line 1482: hr_utility.set_location(l_proc, 60);

1478: OPEN c_primary_car(first_asg_rec.assignment_id, alc_dates_rec.min_start_date);
1479: FETCH c_primary_car INTO primary_car_rec;
1480: CLOSE c_primary_car;
1481: --
1482: hr_utility.set_location(l_proc, 60);
1483: hr_utility.trace(l_proc||': Primary Car Allocation='|| primary_car_rec.vehicle_allocation_id);
1484: --
1485: IF primary_car_rec.vehicle_allocation_id = alc_rec.vehicle_allocation_id THEN
1486: -- This is the first car allocation

Line 1483: hr_utility.trace(l_proc||': Primary Car Allocation='|| primary_car_rec.vehicle_allocation_id);

1479: FETCH c_primary_car INTO primary_car_rec;
1480: CLOSE c_primary_car;
1481: --
1482: hr_utility.set_location(l_proc, 60);
1483: hr_utility.trace(l_proc||': Primary Car Allocation='|| primary_car_rec.vehicle_allocation_id);
1484: --
1485: IF primary_car_rec.vehicle_allocation_id = alc_rec.vehicle_allocation_id THEN
1486: -- This is the first car allocation
1487: -- of this employee in this tax ref

Line 1498: hr_utility.set_location(l_proc, 70);

1494: ELSE
1495: L_action_flag := 'N';
1496: END IF;
1497: --
1498: hr_utility.set_location(l_proc, 70);
1499: hr_utility.trace(l_proc||': l_action_flag='|| l_action_flag);
1500: --
1501: CLOSE c_prior_prim_car;
1502: ELSE

Line 1499: hr_utility.trace(l_proc||': l_action_flag='|| l_action_flag);

1495: L_action_flag := 'N';
1496: END IF;
1497: --
1498: hr_utility.set_location(l_proc, 70);
1499: hr_utility.trace(l_proc||': l_action_flag='|| l_action_flag);
1500: --
1501: CLOSE c_prior_prim_car;
1502: ELSE
1503: -- Not the first car of the employee

Line 1508: hr_utility.set_location(l_proc, 80);

1504: -- report this as new car
1505: L_action_flag := 'N';
1506: END IF;
1507: --
1508: hr_utility.set_location(l_proc, 80);
1509: hr_utility.trace(l_proc||': l_action_flag='|| l_action_flag);
1510: --
1511: ELSE
1512: -- Not a primary car therefore mark

Line 1509: hr_utility.trace(l_proc||': l_action_flag='|| l_action_flag);

1505: L_action_flag := 'N';
1506: END IF;
1507: --
1508: hr_utility.set_location(l_proc, 80);
1509: hr_utility.trace(l_proc||': l_action_flag='|| l_action_flag);
1510: --
1511: ELSE
1512: -- Not a primary car therefore mark
1513: -- it as new car allocation action

Line 1517: hr_utility.set_location(l_proc, 90);

1513: -- it as new car allocation action
1514: l_action_flag := 'N';
1515: END IF;
1516: --
1517: hr_utility.set_location(l_proc, 90);
1518: hr_utility.trace(l_proc||': l_action_flag='|| l_action_flag);
1519: --
1520: IF L_action_flag <> 'X' THEN
1521: -- Check whether this allocation action

Line 1518: hr_utility.trace(l_proc||': l_action_flag='|| l_action_flag);

1514: l_action_flag := 'N';
1515: END IF;
1516: --
1517: hr_utility.set_location(l_proc, 90);
1518: hr_utility.trace(l_proc||': l_action_flag='|| l_action_flag);
1519: --
1520: IF L_action_flag <> 'X' THEN
1521: -- Check whether this allocation action
1522: -- has been already archived

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

1525: alc_rec.vehicle_allocation_id,
1526: alc_dates_rec.min_start_date,
1527: l_action_flag);
1528: --
1529: hr_utility.set_location(l_proc, 100);
1530: hr_utility.trace(l_proc||': l_archived_flag='|| l_archived_flag);
1531: --
1532: IF l_archived_flag = 'N' THEN
1533: -- Action has not been archived already

Line 1530: hr_utility.trace(l_proc||': l_archived_flag='|| l_archived_flag);

1526: alc_dates_rec.min_start_date,
1527: l_action_flag);
1528: --
1529: hr_utility.set_location(l_proc, 100);
1530: hr_utility.trace(l_proc||': l_archived_flag='|| l_archived_flag);
1531: --
1532: IF l_archived_flag = 'N' THEN
1533: -- Action has not been archived already
1534: -- therefore create assignment action

Line 1566: hr_utility.set_location(l_proc, 50);

1562: OPEN c_first_asg(asg_rec.assignment_id, alc_dates_rec.max_end_date);
1563: FETCH c_first_asg INTO first_asg_rec;
1564: CLOSE c_first_asg;
1565: --
1566: hr_utility.set_location(l_proc, 50);
1567: hr_utility.trace(l_proc||': First Assignment='|| first_asg_rec.assignment_id);
1568: -- Get primary car allocation of the
1569: -- first assignment of this person
1570: -- in this tax ref

Line 1567: hr_utility.trace(l_proc||': First Assignment='|| first_asg_rec.assignment_id);

1563: FETCH c_first_asg INTO first_asg_rec;
1564: CLOSE c_first_asg;
1565: --
1566: hr_utility.set_location(l_proc, 50);
1567: hr_utility.trace(l_proc||': First Assignment='|| first_asg_rec.assignment_id);
1568: -- Get primary car allocation of the
1569: -- first assignment of this person
1570: -- in this tax ref
1571: OPEN c_primary_car(first_asg_rec.assignment_id, alc_dates_rec.max_end_date);

Line 1575: hr_utility.set_location(l_proc, 60);

1571: OPEN c_primary_car(first_asg_rec.assignment_id, alc_dates_rec.max_end_date);
1572: FETCH c_primary_car INTO primary_car_rec;
1573: CLOSE c_primary_car;
1574: --
1575: hr_utility.set_location(l_proc, 60);
1576: hr_utility.trace(l_proc||': Primary Car Allocation='|| primary_car_rec.vehicle_allocation_id);
1577: --
1578: IF primary_car_rec.vehicle_allocation_id = alc_rec.vehicle_allocation_id THEN
1579: --

Line 1576: hr_utility.trace(l_proc||': Primary Car Allocation='|| primary_car_rec.vehicle_allocation_id);

1572: FETCH c_primary_car INTO primary_car_rec;
1573: CLOSE c_primary_car;
1574: --
1575: hr_utility.set_location(l_proc, 60);
1576: hr_utility.trace(l_proc||': Primary Car Allocation='|| primary_car_rec.vehicle_allocation_id);
1577: --
1578: IF primary_car_rec.vehicle_allocation_id = alc_rec.vehicle_allocation_id THEN
1579: --
1580: OPEN c_next_prim_car(asg_rec.assignment_id, Alc_dates_rec.max_end_date);

Line 1592: hr_utility.set_location(l_proc, 70);

1588: -- This is a withdrawal action
1589: L_action_flag := 'W';
1590: END IF;
1591: --
1592: hr_utility.set_location(l_proc, 70);
1593: hr_utility.trace(l_proc||': l_action_flag='|| l_action_flag);
1594: --
1595: CLOSE c_next_prim_car;
1596: ELSE

Line 1593: hr_utility.trace(l_proc||': l_action_flag='|| l_action_flag);

1589: L_action_flag := 'W';
1590: END IF;
1591: --
1592: hr_utility.set_location(l_proc, 70);
1593: hr_utility.trace(l_proc||': l_action_flag='|| l_action_flag);
1594: --
1595: CLOSE c_next_prim_car;
1596: ELSE
1597: -- Not the first car of the employee

Line 1603: hr_utility.set_location(l_proc, 80);

1599: L_action_flag := 'W';
1600: END IF;
1601: --
1602: --
1603: hr_utility.set_location(l_proc, 80);
1604: hr_utility.trace(l_proc||': l_action_flag='|| l_action_flag);
1605: --
1606: ELSE
1607: -- Not a Primary car therefore mark

Line 1604: hr_utility.trace(l_proc||': l_action_flag='|| l_action_flag);

1600: END IF;
1601: --
1602: --
1603: hr_utility.set_location(l_proc, 80);
1604: hr_utility.trace(l_proc||': l_action_flag='|| l_action_flag);
1605: --
1606: ELSE
1607: -- Not a Primary car therefore mark
1608: -- it as withdrawal car action

Line 1612: hr_utility.set_location(l_proc, 90);

1608: -- it as withdrawal car action
1609: l_action_flag := 'W';
1610: END IF;
1611: --
1612: hr_utility.set_location(l_proc, 90);
1613: hr_utility.trace(l_proc||': l_action_flag='|| l_action_flag);
1614: --
1615: IF L_action_flag <> 'X' THEN
1616: -- Check whether this allocation action

Line 1613: hr_utility.trace(l_proc||': l_action_flag='|| l_action_flag);

1609: l_action_flag := 'W';
1610: END IF;
1611: --
1612: hr_utility.set_location(l_proc, 90);
1613: hr_utility.trace(l_proc||': l_action_flag='|| l_action_flag);
1614: --
1615: IF L_action_flag <> 'X' THEN
1616: -- Check whether this allocation action
1617: -- has been already archived

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

1620: alc_rec.vehicle_allocation_id,
1621: alc_dates_rec.min_start_date,
1622: l_action_flag);
1623: --
1624: hr_utility.set_location(l_proc, 100);
1625: hr_utility.trace(l_proc||': l_archived_flag='|| l_archived_flag);
1626: --
1627: IF l_archived_flag = 'N' THEN
1628: -- Action has not been archived already

Line 1625: hr_utility.trace(l_proc||': l_archived_flag='|| l_archived_flag);

1621: alc_dates_rec.min_start_date,
1622: l_action_flag);
1623: --
1624: hr_utility.set_location(l_proc, 100);
1625: hr_utility.trace(l_proc||': l_archived_flag='|| l_archived_flag);
1626: --
1627: IF l_archived_flag = 'N' THEN
1628: -- Action has not been archived already
1629: -- therefore create assignment action

Line 1641: hr_utility.set_location(l_proc, 110);

1637: -- Fuel type has changed therefore make sure
1638: -- this change occured after the vehicle was
1639: -- allocated to this assignment
1640: --
1641: hr_utility.set_location(l_proc, 110);
1642: hr_utility.trace(l_proc||': effective_start_date='|| vehicle_changes_rec.effective_start_date);
1643: hr_utility.trace(l_proc||': fuel_type='|| vehicle_changes_rec.fuel_type);
1644: --
1645: IF (vehicle_changes_rec.effective_start_date

Line 1642: hr_utility.trace(l_proc||': effective_start_date='|| vehicle_changes_rec.effective_start_date);

1638: -- this change occured after the vehicle was
1639: -- allocated to this assignment
1640: --
1641: hr_utility.set_location(l_proc, 110);
1642: hr_utility.trace(l_proc||': effective_start_date='|| vehicle_changes_rec.effective_start_date);
1643: hr_utility.trace(l_proc||': fuel_type='|| vehicle_changes_rec.fuel_type);
1644: --
1645: IF (vehicle_changes_rec.effective_start_date
1646: BETWEEN alc_dates_rec.min_start_date+1 AND alc_dates_rec.max_end_date) AND

Line 1643: hr_utility.trace(l_proc||': fuel_type='|| vehicle_changes_rec.fuel_type);

1639: -- allocated to this assignment
1640: --
1641: hr_utility.set_location(l_proc, 110);
1642: hr_utility.trace(l_proc||': effective_start_date='|| vehicle_changes_rec.effective_start_date);
1643: hr_utility.trace(l_proc||': fuel_type='|| vehicle_changes_rec.fuel_type);
1644: --
1645: IF (vehicle_changes_rec.effective_start_date
1646: BETWEEN alc_dates_rec.min_start_date+1 AND alc_dates_rec.max_end_date) AND
1647: (vehicle_changes_rec.effective_start_date

Line 1658: hr_utility.set_location(l_proc, 120);

1654: alc_rec.vehicle_allocation_id,
1655: vehicle_changes_rec.effective_start_date,
1656: 'F');
1657: --
1658: hr_utility.set_location(l_proc, 120);
1659: hr_utility.trace(l_proc||': l_archived_flag='|| l_archived_flag);
1660: --
1661: IF l_archived_flag = 'N' THEN
1662: -- Action has not been archived already

Line 1659: hr_utility.trace(l_proc||': l_archived_flag='|| l_archived_flag);

1655: vehicle_changes_rec.effective_start_date,
1656: 'F');
1657: --
1658: hr_utility.set_location(l_proc, 120);
1659: hr_utility.trace(l_proc||': l_archived_flag='|| l_archived_flag);
1660: --
1661: IF l_archived_flag = 'N' THEN
1662: -- Action has not been archived already
1663: -- therefore create assignment action

Line 1670: hr_utility.set_location(l_proc, 130);

1666: END IF;
1667: END IF;
1668: END LOOP;
1669: --
1670: hr_utility.set_location(l_proc, 130);
1671: --
1672: --
1673: L_action_flag := 'X';
1674: l_archived_flag := 'Y';

Line 1687: hr_utility.set_location(l_proc, 160);

1683: -- Assignment has started on this payroll or tax ref during the
1684: -- input date range and this car allocation was active on the
1685: -- start date therefore check whether it is a transfer
1686: -- from another tax ref
1687: hr_utility.set_location(l_proc, 160);
1688: l_previous_tax_ref := NULL;
1689: --
1690: OPEN c_tax_ref(asg_rec.assignment_id, asg_rec.asg_min_start_date-1);
1691: FETCH c_tax_ref INTO l_previous_tax_ref;

Line 1694: hr_utility.set_location(l_proc, 170);

1690: OPEN c_tax_ref(asg_rec.assignment_id, asg_rec.asg_min_start_date-1);
1691: FETCH c_tax_ref INTO l_previous_tax_ref;
1692: CLOSE c_tax_ref;
1693: --
1694: hr_utility.set_location(l_proc, 170);
1695: hr_utility.trace(l_proc||', l_previous_tax_ref='||l_previous_tax_ref);
1696: --
1697: IF l_previous_tax_ref is NOT NULL AND l_previous_tax_ref <> g_tax_ref THEN
1698: -- This assignment has a different prior tax ref

Line 1695: hr_utility.trace(l_proc||', l_previous_tax_ref='||l_previous_tax_ref);

1691: FETCH c_tax_ref INTO l_previous_tax_ref;
1692: CLOSE c_tax_ref;
1693: --
1694: hr_utility.set_location(l_proc, 170);
1695: hr_utility.trace(l_proc||', l_previous_tax_ref='||l_previous_tax_ref);
1696: --
1697: IF l_previous_tax_ref is NOT NULL AND l_previous_tax_ref <> g_tax_ref THEN
1698: -- This assignment has a different prior tax ref
1699: -- therefore it should be reported as a new car

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

1697: IF l_previous_tax_ref is NOT NULL AND l_previous_tax_ref <> g_tax_ref THEN
1698: -- This assignment has a different prior tax ref
1699: -- therefore it should be reported as a new car
1700: -- allocation on this EDI message.
1701: hr_utility.set_location(l_proc, 180);
1702: l_action_flag := 'N';
1703: --
1704: -- Check whether this allocation action
1705: -- has been already archived

Line 1712: hr_utility.set_location(l_proc, 190);

1708: alc_rec.vehicle_allocation_id,
1709: asg_rec.asg_min_start_date,
1710: l_action_flag);
1711: --
1712: hr_utility.set_location(l_proc, 190);
1713: hr_utility.trace(l_proc||', l_archived_flag='||l_archived_flag);
1714: --
1715: IF l_archived_flag = 'N' THEN
1716: -- Action has not been archived already

Line 1713: hr_utility.trace(l_proc||', l_archived_flag='||l_archived_flag);

1709: asg_rec.asg_min_start_date,
1710: l_action_flag);
1711: --
1712: hr_utility.set_location(l_proc, 190);
1713: hr_utility.trace(l_proc||', l_archived_flag='||l_archived_flag);
1714: --
1715: IF l_archived_flag = 'N' THEN
1716: -- Action has not been archived already
1717: -- therefore create assignment action

Line 1733: hr_utility.set_location(l_proc, 200);

1729: -- Assignment has ended on this payroll or tax ref during the
1730: -- input date range and this car allocation was active on the
1731: -- end date therefore check whether it is a transfer
1732: -- to another tax ref
1733: hr_utility.set_location(l_proc, 200);
1734: l_next_tax_ref := NULL;
1735: --
1736: OPEN c_tax_ref(asg_rec.assignment_id, asg_rec.asg_max_end_date+1);
1737: FETCH c_tax_ref INTO l_next_tax_ref;

Line 1740: hr_utility.set_location(l_proc, 210);

1736: OPEN c_tax_ref(asg_rec.assignment_id, asg_rec.asg_max_end_date+1);
1737: FETCH c_tax_ref INTO l_next_tax_ref;
1738: CLOSE c_tax_ref;
1739: --
1740: hr_utility.set_location(l_proc, 210);
1741: hr_utility.trace(l_proc||', l_next_tax_ref='||l_next_tax_ref);
1742: --
1743: IF l_next_tax_ref is NOT NULL AND l_next_tax_ref <> g_tax_ref THEN
1744: -- This assignment has a different tax ref after end date

Line 1741: hr_utility.trace(l_proc||', l_next_tax_ref='||l_next_tax_ref);

1737: FETCH c_tax_ref INTO l_next_tax_ref;
1738: CLOSE c_tax_ref;
1739: --
1740: hr_utility.set_location(l_proc, 210);
1741: hr_utility.trace(l_proc||', l_next_tax_ref='||l_next_tax_ref);
1742: --
1743: IF l_next_tax_ref is NOT NULL AND l_next_tax_ref <> g_tax_ref THEN
1744: -- This assignment has a different tax ref after end date
1745: -- therefore it should be reported as allocation withdrawal

Line 1747: hr_utility.set_location(l_proc, 220);

1743: IF l_next_tax_ref is NOT NULL AND l_next_tax_ref <> g_tax_ref THEN
1744: -- This assignment has a different tax ref after end date
1745: -- therefore it should be reported as allocation withdrawal
1746: -- on this EDI message.
1747: hr_utility.set_location(l_proc, 220);
1748: l_action_flag := 'W';
1749: --
1750: -- Check whether this allocation action
1751: -- has been already archived

Line 1758: hr_utility.set_location(l_proc, 230);

1754: alc_rec.vehicle_allocation_id,
1755: asg_rec.asg_max_end_date,
1756: l_action_flag);
1757: --
1758: hr_utility.set_location(l_proc, 230);
1759: hr_utility.trace(l_proc||', l_archived_flag='||l_archived_flag);
1760: --
1761: IF l_archived_flag = 'N' THEN
1762: -- Action has not been archived already

Line 1759: hr_utility.trace(l_proc||', l_archived_flag='||l_archived_flag);

1755: asg_rec.asg_max_end_date,
1756: l_action_flag);
1757: --
1758: hr_utility.set_location(l_proc, 230);
1759: hr_utility.trace(l_proc||', l_archived_flag='||l_archived_flag);
1760: --
1761: IF l_archived_flag = 'N' THEN
1762: -- Action has not been archived already
1763: -- therefore create assignment action

Line 1770: hr_utility.set_location(l_proc, 240);

1766: --
1767: END IF;
1768: END IF;
1769: --
1770: hr_utility.set_location(l_proc, 240);
1771: --
1772: hr_utility.set_location(l_proc, 250);
1773: END LOOP;
1774: --

Line 1772: hr_utility.set_location(l_proc, 250);

1768: END IF;
1769: --
1770: hr_utility.set_location(l_proc, 240);
1771: --
1772: hr_utility.set_location(l_proc, 250);
1773: END LOOP;
1774: --
1775: hr_utility.set_location(l_proc, 260);
1776: --

Line 1775: hr_utility.set_location(l_proc, 260);

1771: --
1772: hr_utility.set_location(l_proc, 250);
1773: END LOOP;
1774: --
1775: hr_utility.set_location(l_proc, 260);
1776: --
1777: -- If flag is set then create action
1778: IF l_create_assact_flag = 'Y' THEN
1779: --

Line 1784: hr_utility.set_location(l_proc, 270);

1780: SELECT pay_assignment_actions_s.nextval
1781: INTO l_actid
1782: FROM dual;
1783:
1784: hr_utility.set_location(l_proc, 270);
1785: hr_utility.trace(l_proc||': l_actid='||l_actid);
1786: hr_utility.trace(l_proc||': asg_rec.assignment_id='||asg_rec.assignment_id);
1787: hr_utility.trace(l_proc||': pactid='||pactid);
1788: hr_utility.trace(l_proc||': chunk='||chunk);

Line 1785: hr_utility.trace(l_proc||': l_actid='||l_actid);

1781: INTO l_actid
1782: FROM dual;
1783:
1784: hr_utility.set_location(l_proc, 270);
1785: hr_utility.trace(l_proc||': l_actid='||l_actid);
1786: hr_utility.trace(l_proc||': asg_rec.assignment_id='||asg_rec.assignment_id);
1787: hr_utility.trace(l_proc||': pactid='||pactid);
1788: hr_utility.trace(l_proc||': chunk='||chunk);
1789: --

Line 1786: hr_utility.trace(l_proc||': asg_rec.assignment_id='||asg_rec.assignment_id);

1782: FROM dual;
1783:
1784: hr_utility.set_location(l_proc, 270);
1785: hr_utility.trace(l_proc||': l_actid='||l_actid);
1786: hr_utility.trace(l_proc||': asg_rec.assignment_id='||asg_rec.assignment_id);
1787: hr_utility.trace(l_proc||': pactid='||pactid);
1788: hr_utility.trace(l_proc||': chunk='||chunk);
1789: --
1790: hr_nonrun_asact.insact(l_actid,

Line 1787: hr_utility.trace(l_proc||': pactid='||pactid);

1783:
1784: hr_utility.set_location(l_proc, 270);
1785: hr_utility.trace(l_proc||': l_actid='||l_actid);
1786: hr_utility.trace(l_proc||': asg_rec.assignment_id='||asg_rec.assignment_id);
1787: hr_utility.trace(l_proc||': pactid='||pactid);
1788: hr_utility.trace(l_proc||': chunk='||chunk);
1789: --
1790: hr_nonrun_asact.insact(l_actid,
1791: asg_rec.assignment_id,

Line 1788: hr_utility.trace(l_proc||': chunk='||chunk);

1784: hr_utility.set_location(l_proc, 270);
1785: hr_utility.trace(l_proc||': l_actid='||l_actid);
1786: hr_utility.trace(l_proc||': asg_rec.assignment_id='||asg_rec.assignment_id);
1787: hr_utility.trace(l_proc||': pactid='||pactid);
1788: hr_utility.trace(l_proc||': chunk='||chunk);
1789: --
1790: hr_nonrun_asact.insact(l_actid,
1791: asg_rec.assignment_id,
1792: pactid,

Line 1795: hr_utility.set_location(l_proc, 280);

1791: asg_rec.assignment_id,
1792: pactid,
1793: chunk, NULL);
1794: --
1795: hr_utility.set_location(l_proc, 280);
1796: --
1797: END IF;
1798: END LOOP;
1799: --

Line 1800: hr_utility.set_location('Leaving: '||l_proc,290);

1796: --
1797: END IF;
1798: END LOOP;
1799: --
1800: hr_utility.set_location('Leaving: '||l_proc,290);
1801: -- hr_utility.trace_off;
1802: EXCEPTION
1803: WHEN OTHERS THEN
1804: hr_utility.set_location('Leaving: '||l_proc,300);

Line 1801: -- hr_utility.trace_off;

1797: END IF;
1798: END LOOP;
1799: --
1800: hr_utility.set_location('Leaving: '||l_proc,290);
1801: -- hr_utility.trace_off;
1802: EXCEPTION
1803: WHEN OTHERS THEN
1804: hr_utility.set_location('Leaving: '||l_proc,300);
1805: -- hr_utility.trace_off;

Line 1804: hr_utility.set_location('Leaving: '||l_proc,300);

1800: hr_utility.set_location('Leaving: '||l_proc,290);
1801: -- hr_utility.trace_off;
1802: EXCEPTION
1803: WHEN OTHERS THEN
1804: hr_utility.set_location('Leaving: '||l_proc,300);
1805: -- hr_utility.trace_off;
1806: raise;
1807: END Create_asg_act_v3;
1808:

Line 1805: -- hr_utility.trace_off;

1801: -- hr_utility.trace_off;
1802: EXCEPTION
1803: WHEN OTHERS THEN
1804: hr_utility.set_location('Leaving: '||l_proc,300);
1805: -- hr_utility.trace_off;
1806: raise;
1807: END Create_asg_act_v3;
1808:
1809:

Line 1880: --hr_utility.trace_on(null, 'KTHAMPAN');

1876: l_archived_flag VARCHAR2(1);
1877: l_private_start_dt date;
1878: l_latest_private_flag varchar2(1);
1879: BEGIN
1880: --hr_utility.trace_on(null, 'KTHAMPAN');
1881: hr_utility.set_location('Entering '||l_proc, 10);
1882: --
1883: OPEN c_param_values;
1884: FETCH c_param_values INTO g_payroll_id,

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

1877: l_private_start_dt date;
1878: l_latest_private_flag varchar2(1);
1879: BEGIN
1880: --hr_utility.trace_on(null, 'KTHAMPAN');
1881: hr_utility.set_location('Entering '||l_proc, 10);
1882: --
1883: OPEN c_param_values;
1884: FETCH c_param_values INTO g_payroll_id,
1885: g_tax_ref,

Line 1892: hr_utility.set_location(l_proc, 15);

1888: g_end_date,
1889: g_business_group_id;
1890: CLOSE c_param_values;
1891: --
1892: hr_utility.set_location(l_proc, 15);
1893: hr_utility.trace(l_proc||': g_payroll_id='||g_payroll_id);
1894: hr_utility.trace(l_proc||': g_tax_ref='||g_tax_ref);
1895: hr_utility.trace(l_proc||': g_start_date='||fnd_date.date_to_displaydate(g_start_date));
1896: hr_utility.trace(l_proc||': g_effective_date='||fnd_date.date_to_displaydate(g_effective_date));

Line 1893: hr_utility.trace(l_proc||': g_payroll_id='||g_payroll_id);

1889: g_business_group_id;
1890: CLOSE c_param_values;
1891: --
1892: hr_utility.set_location(l_proc, 15);
1893: hr_utility.trace(l_proc||': g_payroll_id='||g_payroll_id);
1894: hr_utility.trace(l_proc||': g_tax_ref='||g_tax_ref);
1895: hr_utility.trace(l_proc||': g_start_date='||fnd_date.date_to_displaydate(g_start_date));
1896: hr_utility.trace(l_proc||': g_effective_date='||fnd_date.date_to_displaydate(g_effective_date));
1897: hr_utility.trace(l_proc||': g_end_date='||fnd_date.date_to_displaydate(g_end_date));

Line 1894: hr_utility.trace(l_proc||': g_tax_ref='||g_tax_ref);

1890: CLOSE c_param_values;
1891: --
1892: hr_utility.set_location(l_proc, 15);
1893: hr_utility.trace(l_proc||': g_payroll_id='||g_payroll_id);
1894: hr_utility.trace(l_proc||': g_tax_ref='||g_tax_ref);
1895: hr_utility.trace(l_proc||': g_start_date='||fnd_date.date_to_displaydate(g_start_date));
1896: hr_utility.trace(l_proc||': g_effective_date='||fnd_date.date_to_displaydate(g_effective_date));
1897: hr_utility.trace(l_proc||': g_end_date='||fnd_date.date_to_displaydate(g_end_date));
1898: hr_utility.trace(l_proc||': g_business_group_id='||g_business_group_id);

Line 1895: hr_utility.trace(l_proc||': g_start_date='||fnd_date.date_to_displaydate(g_start_date));

1891: --
1892: hr_utility.set_location(l_proc, 15);
1893: hr_utility.trace(l_proc||': g_payroll_id='||g_payroll_id);
1894: hr_utility.trace(l_proc||': g_tax_ref='||g_tax_ref);
1895: hr_utility.trace(l_proc||': g_start_date='||fnd_date.date_to_displaydate(g_start_date));
1896: hr_utility.trace(l_proc||': g_effective_date='||fnd_date.date_to_displaydate(g_effective_date));
1897: hr_utility.trace(l_proc||': g_end_date='||fnd_date.date_to_displaydate(g_end_date));
1898: hr_utility.trace(l_proc||': g_business_group_id='||g_business_group_id);
1899: For asg_rec IN c_asg

Line 1896: hr_utility.trace(l_proc||': g_effective_date='||fnd_date.date_to_displaydate(g_effective_date));

1892: hr_utility.set_location(l_proc, 15);
1893: hr_utility.trace(l_proc||': g_payroll_id='||g_payroll_id);
1894: hr_utility.trace(l_proc||': g_tax_ref='||g_tax_ref);
1895: hr_utility.trace(l_proc||': g_start_date='||fnd_date.date_to_displaydate(g_start_date));
1896: hr_utility.trace(l_proc||': g_effective_date='||fnd_date.date_to_displaydate(g_effective_date));
1897: hr_utility.trace(l_proc||': g_end_date='||fnd_date.date_to_displaydate(g_end_date));
1898: hr_utility.trace(l_proc||': g_business_group_id='||g_business_group_id);
1899: For asg_rec IN c_asg
1900: LOOP

Line 1897: hr_utility.trace(l_proc||': g_end_date='||fnd_date.date_to_displaydate(g_end_date));

1893: hr_utility.trace(l_proc||': g_payroll_id='||g_payroll_id);
1894: hr_utility.trace(l_proc||': g_tax_ref='||g_tax_ref);
1895: hr_utility.trace(l_proc||': g_start_date='||fnd_date.date_to_displaydate(g_start_date));
1896: hr_utility.trace(l_proc||': g_effective_date='||fnd_date.date_to_displaydate(g_effective_date));
1897: hr_utility.trace(l_proc||': g_end_date='||fnd_date.date_to_displaydate(g_end_date));
1898: hr_utility.trace(l_proc||': g_business_group_id='||g_business_group_id);
1899: For asg_rec IN c_asg
1900: LOOP
1901: -- Loop through all assignments

Line 1898: hr_utility.trace(l_proc||': g_business_group_id='||g_business_group_id);

1894: hr_utility.trace(l_proc||': g_tax_ref='||g_tax_ref);
1895: hr_utility.trace(l_proc||': g_start_date='||fnd_date.date_to_displaydate(g_start_date));
1896: hr_utility.trace(l_proc||': g_effective_date='||fnd_date.date_to_displaydate(g_effective_date));
1897: hr_utility.trace(l_proc||': g_end_date='||fnd_date.date_to_displaydate(g_end_date));
1898: hr_utility.trace(l_proc||': g_business_group_id='||g_business_group_id);
1899: For asg_rec IN c_asg
1900: LOOP
1901: -- Loop through all assignments
1902: hr_utility.set_location(l_proc, 20);

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

1898: hr_utility.trace(l_proc||': g_business_group_id='||g_business_group_id);
1899: For asg_rec IN c_asg
1900: LOOP
1901: -- Loop through all assignments
1902: hr_utility.set_location(l_proc, 20);
1903: hr_utility.trace(l_proc||': assignment_id='||asg_rec.assignment_id);
1904: hr_utility.trace(l_proc||': asg_min_start_date='||fnd_date.date_to_displaydate(asg_rec.asg_min_start_date));
1905: hr_utility.trace(l_proc||': asg_max_end_date='||fnd_date.date_to_displaydate(asg_rec.asg_max_end_date));
1906: --

Line 1903: hr_utility.trace(l_proc||': assignment_id='||asg_rec.assignment_id);

1899: For asg_rec IN c_asg
1900: LOOP
1901: -- Loop through all assignments
1902: hr_utility.set_location(l_proc, 20);
1903: hr_utility.trace(l_proc||': assignment_id='||asg_rec.assignment_id);
1904: hr_utility.trace(l_proc||': asg_min_start_date='||fnd_date.date_to_displaydate(asg_rec.asg_min_start_date));
1905: hr_utility.trace(l_proc||': asg_max_end_date='||fnd_date.date_to_displaydate(asg_rec.asg_max_end_date));
1906: --
1907: l_create_assact_flag := 'N';

Line 1904: hr_utility.trace(l_proc||': asg_min_start_date='||fnd_date.date_to_displaydate(asg_rec.asg_min_start_date));

1900: LOOP
1901: -- Loop through all assignments
1902: hr_utility.set_location(l_proc, 20);
1903: hr_utility.trace(l_proc||': assignment_id='||asg_rec.assignment_id);
1904: hr_utility.trace(l_proc||': asg_min_start_date='||fnd_date.date_to_displaydate(asg_rec.asg_min_start_date));
1905: hr_utility.trace(l_proc||': asg_max_end_date='||fnd_date.date_to_displaydate(asg_rec.asg_max_end_date));
1906: --
1907: l_create_assact_flag := 'N';
1908: --

Line 1905: hr_utility.trace(l_proc||': asg_max_end_date='||fnd_date.date_to_displaydate(asg_rec.asg_max_end_date));

1901: -- Loop through all assignments
1902: hr_utility.set_location(l_proc, 20);
1903: hr_utility.trace(l_proc||': assignment_id='||asg_rec.assignment_id);
1904: hr_utility.trace(l_proc||': asg_min_start_date='||fnd_date.date_to_displaydate(asg_rec.asg_min_start_date));
1905: hr_utility.trace(l_proc||': asg_max_end_date='||fnd_date.date_to_displaydate(asg_rec.asg_max_end_date));
1906: --
1907: l_create_assact_flag := 'N';
1908: --
1909: FOR alc_rec IN c_allocations(asg_rec.assignment_id) LOOP

Line 1912: hr_utility.set_location(l_proc, 30);

1908: --
1909: FOR alc_rec IN c_allocations(asg_rec.assignment_id) LOOP
1910: -- Loop through all vehicle allocations
1911: -- over the date range
1912: hr_utility.set_location(l_proc, 30);
1913: hr_utility.trace(l_proc||': vehicle_allocation_id='||alc_rec.vehicle_allocation_id);
1914: hr_utility.trace(l_proc||': usage_type='||alc_rec.usage_type);
1915: --
1916: L_action_flag := 'X';

Line 1913: hr_utility.trace(l_proc||': vehicle_allocation_id='||alc_rec.vehicle_allocation_id);

1909: FOR alc_rec IN c_allocations(asg_rec.assignment_id) LOOP
1910: -- Loop through all vehicle allocations
1911: -- over the date range
1912: hr_utility.set_location(l_proc, 30);
1913: hr_utility.trace(l_proc||': vehicle_allocation_id='||alc_rec.vehicle_allocation_id);
1914: hr_utility.trace(l_proc||': usage_type='||alc_rec.usage_type);
1915: --
1916: L_action_flag := 'X';
1917: l_archived_flag := 'Y';

Line 1914: hr_utility.trace(l_proc||': usage_type='||alc_rec.usage_type);

1910: -- Loop through all vehicle allocations
1911: -- over the date range
1912: hr_utility.set_location(l_proc, 30);
1913: hr_utility.trace(l_proc||': vehicle_allocation_id='||alc_rec.vehicle_allocation_id);
1914: hr_utility.trace(l_proc||': usage_type='||alc_rec.usage_type);
1915: --
1916: L_action_flag := 'X';
1917: l_archived_flag := 'Y';
1918: --

Line 1926: hr_utility.set_location(l_proc, 32);

1922: open private_flag_check(alc_rec.vehicle_allocation_id);
1923: fetch private_flag_check into l_private_start_dt;
1924: close private_flag_check;
1925:
1926: hr_utility.set_location(l_proc, 32);
1927: hr_utility.trace(l_proc||': l_private_start_dt='||l_private_start_dt);
1928: if l_private_start_dt is not null then
1929: -- Cursor to check if the change was from Y to N i.e. Withdrawal
1930: -- else was it from N to Y i.e. new Benifit

Line 1927: hr_utility.trace(l_proc||': l_private_start_dt='||l_private_start_dt);

1923: fetch private_flag_check into l_private_start_dt;
1924: close private_flag_check;
1925:
1926: hr_utility.set_location(l_proc, 32);
1927: hr_utility.trace(l_proc||': l_private_start_dt='||l_private_start_dt);
1928: if l_private_start_dt is not null then
1929: -- Cursor to check if the change was from Y to N i.e. Withdrawal
1930: -- else was it from N to Y i.e. new Benifit
1931:

Line 1936: hr_utility.set_location(l_proc, 35);

1932: open withdrawal_check(alc_rec.vehicle_allocation_id,l_private_start_dt );
1933: fetch withdrawal_check into l_latest_private_flag;
1934: close withdrawal_check;
1935:
1936: hr_utility.set_location(l_proc, 35);
1937: hr_utility.trace(l_proc||': l_latest_private_flag='||nvl(l_latest_private_flag,'NULL'));
1938:
1939: if l_latest_private_flag = 'Y' then
1940: -- This means the value has changed from N to Y so this is a new benefit

Line 1937: hr_utility.trace(l_proc||': l_latest_private_flag='||nvl(l_latest_private_flag,'NULL'));

1933: fetch withdrawal_check into l_latest_private_flag;
1934: close withdrawal_check;
1935:
1936: hr_utility.set_location(l_proc, 35);
1937: hr_utility.trace(l_proc||': l_latest_private_flag='||nvl(l_latest_private_flag,'NULL'));
1938:
1939: if l_latest_private_flag = 'Y' then
1940: -- This means the value has changed from N to Y so this is a new benefit
1941: L_action_flag := 'N';

Line 1956: hr_utility.set_location(l_proc, 38);

1952: alc_rec.vehicle_allocation_id,
1953: l_private_start_dt,
1954: l_action_flag);
1955: --
1956: hr_utility.set_location(l_proc, 38);
1957: hr_utility.trace(l_proc||': l_archived_flag='|| l_archived_flag);
1958: --
1959: IF l_archived_flag = 'N' THEN
1960: -- Action has not been archived already

Line 1957: hr_utility.trace(l_proc||': l_archived_flag='|| l_archived_flag);

1953: l_private_start_dt,
1954: l_action_flag);
1955: --
1956: hr_utility.set_location(l_proc, 38);
1957: hr_utility.trace(l_proc||': l_archived_flag='|| l_archived_flag);
1958: --
1959: IF l_archived_flag = 'N' THEN
1960: -- Action has not been archived already
1961: -- therefore create assignment action

Line 1982: hr_utility.set_location(l_proc, 40);

1978: OPEN c_alloc_dates(alc_rec.vehicle_allocation_id);
1979: FETCH c_alloc_dates INTO alc_dates_rec;
1980: CLOSE c_alloc_dates;
1981: --
1982: hr_utility.set_location(l_proc, 40);
1983: hr_utility.trace(l_proc||': min_start_date='|| fnd_date.date_to_displaydate(alc_dates_rec.min_start_date));
1984: hr_utility.trace(l_proc||': max_end_date='|| fnd_date.date_to_displaydate(alc_dates_rec.max_end_date));
1985: --
1986: -- Check whether vehicle was allocated or

Line 1983: hr_utility.trace(l_proc||': min_start_date='|| fnd_date.date_to_displaydate(alc_dates_rec.min_start_date));

1979: FETCH c_alloc_dates INTO alc_dates_rec;
1980: CLOSE c_alloc_dates;
1981: --
1982: hr_utility.set_location(l_proc, 40);
1983: hr_utility.trace(l_proc||': min_start_date='|| fnd_date.date_to_displaydate(alc_dates_rec.min_start_date));
1984: hr_utility.trace(l_proc||': max_end_date='|| fnd_date.date_to_displaydate(alc_dates_rec.max_end_date));
1985: --
1986: -- Check whether vehicle was allocated or
1987: -- Withdrawn within the date range also

Line 1984: hr_utility.trace(l_proc||': max_end_date='|| fnd_date.date_to_displaydate(alc_dates_rec.max_end_date));

1980: CLOSE c_alloc_dates;
1981: --
1982: hr_utility.set_location(l_proc, 40);
1983: hr_utility.trace(l_proc||': min_start_date='|| fnd_date.date_to_displaydate(alc_dates_rec.min_start_date));
1984: hr_utility.trace(l_proc||': max_end_date='|| fnd_date.date_to_displaydate(alc_dates_rec.max_end_date));
1985: --
1986: -- Check whether vehicle was allocated or
1987: -- Withdrawn within the date range also
1988: -- check that this allocation or withdrawal

Line 1990: hr_utility.trace(l_proc||': alc_dates_rec.min_start_date='|| fnd_date.date_to_displaydate(alc_dates_rec.min_start_date));

1986: -- Check whether vehicle was allocated or
1987: -- Withdrawn within the date range also
1988: -- check that this allocation or withdrawal
1989: -- happened when assignment was with input tax ref
1990: hr_utility.trace(l_proc||': alc_dates_rec.min_start_date='|| fnd_date.date_to_displaydate(alc_dates_rec.min_start_date));
1991: hr_utility.trace(l_proc||': asg_rec.asg_min_start_date='|| fnd_date.date_to_displaydate(asg_rec.asg_min_start_date));
1992: hr_utility.trace(l_proc||': asg_rec.asg_max_end_date='|| fnd_date.date_to_displaydate(asg_rec.asg_max_end_date));
1993: hr_utility.trace(l_proc||': alc_rec.usage_type='|| alc_rec.usage_type);
1994: IF (alc_dates_rec.min_start_date BETWEEN g_start_date AND g_end_Date) AND

Line 1991: hr_utility.trace(l_proc||': asg_rec.asg_min_start_date='|| fnd_date.date_to_displaydate(asg_rec.asg_min_start_date));

1987: -- Withdrawn within the date range also
1988: -- check that this allocation or withdrawal
1989: -- happened when assignment was with input tax ref
1990: hr_utility.trace(l_proc||': alc_dates_rec.min_start_date='|| fnd_date.date_to_displaydate(alc_dates_rec.min_start_date));
1991: hr_utility.trace(l_proc||': asg_rec.asg_min_start_date='|| fnd_date.date_to_displaydate(asg_rec.asg_min_start_date));
1992: hr_utility.trace(l_proc||': asg_rec.asg_max_end_date='|| fnd_date.date_to_displaydate(asg_rec.asg_max_end_date));
1993: hr_utility.trace(l_proc||': alc_rec.usage_type='|| alc_rec.usage_type);
1994: IF (alc_dates_rec.min_start_date BETWEEN g_start_date AND g_end_Date) AND
1995: (alc_dates_rec.min_start_date BETWEEN asg_rec.asg_min_start_date AND asg_rec.asg_max_end_date) THEN

Line 1992: hr_utility.trace(l_proc||': asg_rec.asg_max_end_date='|| fnd_date.date_to_displaydate(asg_rec.asg_max_end_date));

1988: -- check that this allocation or withdrawal
1989: -- happened when assignment was with input tax ref
1990: hr_utility.trace(l_proc||': alc_dates_rec.min_start_date='|| fnd_date.date_to_displaydate(alc_dates_rec.min_start_date));
1991: hr_utility.trace(l_proc||': asg_rec.asg_min_start_date='|| fnd_date.date_to_displaydate(asg_rec.asg_min_start_date));
1992: hr_utility.trace(l_proc||': asg_rec.asg_max_end_date='|| fnd_date.date_to_displaydate(asg_rec.asg_max_end_date));
1993: hr_utility.trace(l_proc||': alc_rec.usage_type='|| alc_rec.usage_type);
1994: IF (alc_dates_rec.min_start_date BETWEEN g_start_date AND g_end_Date) AND
1995: (alc_dates_rec.min_start_date BETWEEN asg_rec.asg_min_start_date AND asg_rec.asg_max_end_date) THEN
1996: --

Line 1993: hr_utility.trace(l_proc||': alc_rec.usage_type='|| alc_rec.usage_type);

1989: -- happened when assignment was with input tax ref
1990: hr_utility.trace(l_proc||': alc_dates_rec.min_start_date='|| fnd_date.date_to_displaydate(alc_dates_rec.min_start_date));
1991: hr_utility.trace(l_proc||': asg_rec.asg_min_start_date='|| fnd_date.date_to_displaydate(asg_rec.asg_min_start_date));
1992: hr_utility.trace(l_proc||': asg_rec.asg_max_end_date='|| fnd_date.date_to_displaydate(asg_rec.asg_max_end_date));
1993: hr_utility.trace(l_proc||': alc_rec.usage_type='|| alc_rec.usage_type);
1994: IF (alc_dates_rec.min_start_date BETWEEN g_start_date AND g_end_Date) AND
1995: (alc_dates_rec.min_start_date BETWEEN asg_rec.asg_min_start_date AND asg_rec.asg_max_end_date) THEN
1996: --
1997: -- This is a New Car or replacement action

Line 2010: hr_utility.set_location(l_proc, 50);

2006: OPEN c_first_asg(asg_rec.assignment_id, alc_dates_rec.min_start_date);
2007: FETCH c_first_asg INTO first_asg_rec;
2008: CLOSE c_first_asg;
2009: --
2010: hr_utility.set_location(l_proc, 50);
2011: hr_utility.trace(l_proc||': First Assignment='|| first_asg_rec.assignment_id);
2012: -- Get primary car allocation of the
2013: -- first assignment of this person
2014: -- in this tax ref

Line 2011: hr_utility.trace(l_proc||': First Assignment='|| first_asg_rec.assignment_id);

2007: FETCH c_first_asg INTO first_asg_rec;
2008: CLOSE c_first_asg;
2009: --
2010: hr_utility.set_location(l_proc, 50);
2011: hr_utility.trace(l_proc||': First Assignment='|| first_asg_rec.assignment_id);
2012: -- Get primary car allocation of the
2013: -- first assignment of this person
2014: -- in this tax ref
2015: OPEN c_primary_car(first_asg_rec.assignment_id, alc_dates_rec.min_start_date);

Line 2019: hr_utility.set_location(l_proc, 60);

2015: OPEN c_primary_car(first_asg_rec.assignment_id, alc_dates_rec.min_start_date);
2016: FETCH c_primary_car INTO primary_car_rec;
2017: CLOSE c_primary_car;
2018: --
2019: hr_utility.set_location(l_proc, 60);
2020: hr_utility.trace(l_proc||': Primary Car Allocation='|| primary_car_rec.vehicle_allocation_id);
2021: --
2022: IF primary_car_rec.vehicle_allocation_id = alc_rec.vehicle_allocation_id THEN
2023: -- This is the first car allocation

Line 2020: hr_utility.trace(l_proc||': Primary Car Allocation='|| primary_car_rec.vehicle_allocation_id);

2016: FETCH c_primary_car INTO primary_car_rec;
2017: CLOSE c_primary_car;
2018: --
2019: hr_utility.set_location(l_proc, 60);
2020: hr_utility.trace(l_proc||': Primary Car Allocation='|| primary_car_rec.vehicle_allocation_id);
2021: --
2022: IF primary_car_rec.vehicle_allocation_id = alc_rec.vehicle_allocation_id THEN
2023: -- This is the first car allocation
2024: -- of this employee in this tax ref

Line 2035: hr_utility.set_location(l_proc, 70);

2031: ELSE
2032: L_action_flag := 'N';
2033: END IF;
2034: --
2035: hr_utility.set_location(l_proc, 70);
2036: hr_utility.trace(l_proc||': l_action_flag='|| l_action_flag);
2037: --
2038: CLOSE c_prior_prim_car;
2039: ELSE

Line 2036: hr_utility.trace(l_proc||': l_action_flag='|| l_action_flag);

2032: L_action_flag := 'N';
2033: END IF;
2034: --
2035: hr_utility.set_location(l_proc, 70);
2036: hr_utility.trace(l_proc||': l_action_flag='|| l_action_flag);
2037: --
2038: CLOSE c_prior_prim_car;
2039: ELSE
2040: -- Not the first car of the employee

Line 2045: hr_utility.set_location(l_proc, 80);

2041: -- report this as new car
2042: L_action_flag := 'N';
2043: END IF;
2044: --
2045: hr_utility.set_location(l_proc, 80);
2046: hr_utility.trace(l_proc||': l_action_flag='|| l_action_flag);
2047: --
2048: ELSE
2049: -- Not a primary car therefore mark

Line 2046: hr_utility.trace(l_proc||': l_action_flag='|| l_action_flag);

2042: L_action_flag := 'N';
2043: END IF;
2044: --
2045: hr_utility.set_location(l_proc, 80);
2046: hr_utility.trace(l_proc||': l_action_flag='|| l_action_flag);
2047: --
2048: ELSE
2049: -- Not a primary car therefore mark
2050: -- it as new car allocation action

Line 2054: hr_utility.set_location(l_proc, 90);

2050: -- it as new car allocation action
2051: l_action_flag := 'N';
2052: END IF;
2053: --
2054: hr_utility.set_location(l_proc, 90);
2055: hr_utility.trace(l_proc||': l_action_flag='|| l_action_flag);
2056: --
2057: IF L_action_flag <> 'X' THEN
2058: -- Check whether this allocation action

Line 2055: hr_utility.trace(l_proc||': l_action_flag='|| l_action_flag);

2051: l_action_flag := 'N';
2052: END IF;
2053: --
2054: hr_utility.set_location(l_proc, 90);
2055: hr_utility.trace(l_proc||': l_action_flag='|| l_action_flag);
2056: --
2057: IF L_action_flag <> 'X' THEN
2058: -- Check whether this allocation action
2059: -- has been already archived

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

2062: alc_rec.vehicle_allocation_id,
2063: alc_dates_rec.min_start_date,
2064: l_action_flag);
2065: --
2066: hr_utility.set_location(l_proc, 100);
2067: hr_utility.trace(l_proc||': l_archived_flag='|| l_archived_flag);
2068: --
2069: IF l_archived_flag = 'N' THEN
2070: -- Action has not been archived already

Line 2067: hr_utility.trace(l_proc||': l_archived_flag='|| l_archived_flag);

2063: alc_dates_rec.min_start_date,
2064: l_action_flag);
2065: --
2066: hr_utility.set_location(l_proc, 100);
2067: hr_utility.trace(l_proc||': l_archived_flag='|| l_archived_flag);
2068: --
2069: IF l_archived_flag = 'N' THEN
2070: -- Action has not been archived already
2071: -- therefore create assignment action

Line 2106: hr_utility.set_location(l_proc, 50);

2102: OPEN c_first_asg(asg_rec.assignment_id, alc_dates_rec.max_end_date);
2103: FETCH c_first_asg INTO first_asg_rec;
2104: CLOSE c_first_asg;
2105: --
2106: hr_utility.set_location(l_proc, 50);
2107: hr_utility.trace(l_proc||': First Assignment='|| first_asg_rec.assignment_id);
2108: -- Get primary car allocation of the
2109: -- first assignment of this person
2110: -- in this tax ref

Line 2107: hr_utility.trace(l_proc||': First Assignment='|| first_asg_rec.assignment_id);

2103: FETCH c_first_asg INTO first_asg_rec;
2104: CLOSE c_first_asg;
2105: --
2106: hr_utility.set_location(l_proc, 50);
2107: hr_utility.trace(l_proc||': First Assignment='|| first_asg_rec.assignment_id);
2108: -- Get primary car allocation of the
2109: -- first assignment of this person
2110: -- in this tax ref
2111: OPEN c_primary_car(first_asg_rec.assignment_id, alc_dates_rec.max_end_date);

Line 2115: hr_utility.set_location(l_proc, 60);

2111: OPEN c_primary_car(first_asg_rec.assignment_id, alc_dates_rec.max_end_date);
2112: FETCH c_primary_car INTO primary_car_rec;
2113: CLOSE c_primary_car;
2114: --
2115: hr_utility.set_location(l_proc, 60);
2116: hr_utility.trace(l_proc||': Primary Car Allocation='|| primary_car_rec.vehicle_allocation_id);
2117: --
2118: IF primary_car_rec.vehicle_allocation_id = alc_rec.vehicle_allocation_id THEN
2119: --

Line 2116: hr_utility.trace(l_proc||': Primary Car Allocation='|| primary_car_rec.vehicle_allocation_id);

2112: FETCH c_primary_car INTO primary_car_rec;
2113: CLOSE c_primary_car;
2114: --
2115: hr_utility.set_location(l_proc, 60);
2116: hr_utility.trace(l_proc||': Primary Car Allocation='|| primary_car_rec.vehicle_allocation_id);
2117: --
2118: IF primary_car_rec.vehicle_allocation_id = alc_rec.vehicle_allocation_id THEN
2119: --
2120: OPEN c_next_prim_car(asg_rec.assignment_id, Alc_dates_rec.max_end_date);

Line 2132: hr_utility.set_location(l_proc, 70);

2128: -- This is a withdrawal action
2129: L_action_flag := 'W';
2130: END IF;
2131: --
2132: hr_utility.set_location(l_proc, 70);
2133: hr_utility.trace(l_proc||': l_action_flag='|| l_action_flag);
2134: --
2135: CLOSE c_next_prim_car;
2136: ELSE

Line 2133: hr_utility.trace(l_proc||': l_action_flag='|| l_action_flag);

2129: L_action_flag := 'W';
2130: END IF;
2131: --
2132: hr_utility.set_location(l_proc, 70);
2133: hr_utility.trace(l_proc||': l_action_flag='|| l_action_flag);
2134: --
2135: CLOSE c_next_prim_car;
2136: ELSE
2137: -- Not the first car of the employee

Line 2143: hr_utility.set_location(l_proc, 80);

2139: L_action_flag := 'W';
2140: END IF;
2141: --
2142: --
2143: hr_utility.set_location(l_proc, 80);
2144: hr_utility.trace(l_proc||': l_action_flag='|| l_action_flag);
2145: --
2146: ELSE
2147: -- Not a Primary car therefore mark

Line 2144: hr_utility.trace(l_proc||': l_action_flag='|| l_action_flag);

2140: END IF;
2141: --
2142: --
2143: hr_utility.set_location(l_proc, 80);
2144: hr_utility.trace(l_proc||': l_action_flag='|| l_action_flag);
2145: --
2146: ELSE
2147: -- Not a Primary car therefore mark
2148: -- it as withdrawal car action

Line 2152: hr_utility.set_location(l_proc, 90);

2148: -- it as withdrawal car action
2149: l_action_flag := 'W';
2150: END IF;
2151: --
2152: hr_utility.set_location(l_proc, 90);
2153: hr_utility.trace(l_proc||': l_action_flag='|| l_action_flag);
2154: --
2155: IF L_action_flag <> 'X' THEN
2156: -- Check whether this allocation action

Line 2153: hr_utility.trace(l_proc||': l_action_flag='|| l_action_flag);

2149: l_action_flag := 'W';
2150: END IF;
2151: --
2152: hr_utility.set_location(l_proc, 90);
2153: hr_utility.trace(l_proc||': l_action_flag='|| l_action_flag);
2154: --
2155: IF L_action_flag <> 'X' THEN
2156: -- Check whether this allocation action
2157: -- has been already archived

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

2160: alc_rec.vehicle_allocation_id,
2161: alc_dates_rec.min_start_date,
2162: l_action_flag);
2163: --
2164: hr_utility.set_location(l_proc, 100);
2165: hr_utility.trace(l_proc||': l_archived_flag='|| l_archived_flag);
2166: --
2167: IF l_archived_flag = 'N' THEN
2168: -- Action has not been archived already

Line 2165: hr_utility.trace(l_proc||': l_archived_flag='|| l_archived_flag);

2161: alc_dates_rec.min_start_date,
2162: l_action_flag);
2163: --
2164: hr_utility.set_location(l_proc, 100);
2165: hr_utility.trace(l_proc||': l_archived_flag='|| l_archived_flag);
2166: --
2167: IF l_archived_flag = 'N' THEN
2168: -- Action has not been archived already
2169: -- therefore create assignment action

Line 2181: hr_utility.set_location(l_proc, 110);

2177: -- Fuel type has changed therefore make sure
2178: -- this change occured after the vehicle was
2179: -- allocated to this assignment
2180: --
2181: hr_utility.set_location(l_proc, 110);
2182: hr_utility.trace(l_proc||': effective_start_date='|| vehicle_changes_rec.effective_start_date);
2183: hr_utility.trace(l_proc||': fuel_type='|| vehicle_changes_rec.fuel_type);
2184: --
2185: IF (vehicle_changes_rec.effective_start_date

Line 2182: hr_utility.trace(l_proc||': effective_start_date='|| vehicle_changes_rec.effective_start_date);

2178: -- this change occured after the vehicle was
2179: -- allocated to this assignment
2180: --
2181: hr_utility.set_location(l_proc, 110);
2182: hr_utility.trace(l_proc||': effective_start_date='|| vehicle_changes_rec.effective_start_date);
2183: hr_utility.trace(l_proc||': fuel_type='|| vehicle_changes_rec.fuel_type);
2184: --
2185: IF (vehicle_changes_rec.effective_start_date
2186: BETWEEN alc_dates_rec.min_start_date+1 AND alc_dates_rec.max_end_date) AND

Line 2183: hr_utility.trace(l_proc||': fuel_type='|| vehicle_changes_rec.fuel_type);

2179: -- allocated to this assignment
2180: --
2181: hr_utility.set_location(l_proc, 110);
2182: hr_utility.trace(l_proc||': effective_start_date='|| vehicle_changes_rec.effective_start_date);
2183: hr_utility.trace(l_proc||': fuel_type='|| vehicle_changes_rec.fuel_type);
2184: --
2185: IF (vehicle_changes_rec.effective_start_date
2186: BETWEEN alc_dates_rec.min_start_date+1 AND alc_dates_rec.max_end_date) AND
2187: (vehicle_changes_rec.effective_start_date

Line 2198: hr_utility.set_location(l_proc, 120);

2194: alc_rec.vehicle_allocation_id,
2195: vehicle_changes_rec.effective_start_date,
2196: 'F');
2197: --
2198: hr_utility.set_location(l_proc, 120);
2199: hr_utility.trace(l_proc||': l_archived_flag='|| l_archived_flag);
2200: --
2201: IF l_archived_flag = 'N' THEN
2202: -- Action has not been archived already

Line 2199: hr_utility.trace(l_proc||': l_archived_flag='|| l_archived_flag);

2195: vehicle_changes_rec.effective_start_date,
2196: 'F');
2197: --
2198: hr_utility.set_location(l_proc, 120);
2199: hr_utility.trace(l_proc||': l_archived_flag='|| l_archived_flag);
2200: --
2201: IF l_archived_flag = 'N' THEN
2202: -- Action has not been archived already
2203: -- therefore create assignment action

Line 2210: hr_utility.set_location(l_proc, 130);

2206: END IF;
2207: END IF;
2208: END LOOP;
2209: --
2210: hr_utility.set_location(l_proc, 130);
2211: --
2212: --
2213: L_action_flag := 'X';
2214: l_archived_flag := 'Y';

Line 2227: hr_utility.set_location(l_proc, 160);

2223: -- Assignment has started on this payroll or tax ref during the
2224: -- input date range and this car allocation was active on the
2225: -- start date therefore check whether it is a transfer
2226: -- from another tax ref
2227: hr_utility.set_location(l_proc, 160);
2228: l_previous_tax_ref := NULL;
2229: --
2230: OPEN c_tax_ref(asg_rec.assignment_id, asg_rec.asg_min_start_date-1);
2231: FETCH c_tax_ref INTO l_previous_tax_ref;

Line 2234: hr_utility.set_location(l_proc, 170);

2230: OPEN c_tax_ref(asg_rec.assignment_id, asg_rec.asg_min_start_date-1);
2231: FETCH c_tax_ref INTO l_previous_tax_ref;
2232: CLOSE c_tax_ref;
2233: --
2234: hr_utility.set_location(l_proc, 170);
2235: hr_utility.trace(l_proc||', l_previous_tax_ref='||l_previous_tax_ref);
2236: --
2237: IF l_previous_tax_ref is NOT NULL AND l_previous_tax_ref <> g_tax_ref THEN
2238: -- This assignment has a different prior tax ref

Line 2235: hr_utility.trace(l_proc||', l_previous_tax_ref='||l_previous_tax_ref);

2231: FETCH c_tax_ref INTO l_previous_tax_ref;
2232: CLOSE c_tax_ref;
2233: --
2234: hr_utility.set_location(l_proc, 170);
2235: hr_utility.trace(l_proc||', l_previous_tax_ref='||l_previous_tax_ref);
2236: --
2237: IF l_previous_tax_ref is NOT NULL AND l_previous_tax_ref <> g_tax_ref THEN
2238: -- This assignment has a different prior tax ref
2239: -- therefore it should be reported as a new car

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

2237: IF l_previous_tax_ref is NOT NULL AND l_previous_tax_ref <> g_tax_ref THEN
2238: -- This assignment has a different prior tax ref
2239: -- therefore it should be reported as a new car
2240: -- allocation on this EDI message.
2241: hr_utility.set_location(l_proc, 180);
2242: l_action_flag := 'N';
2243: --
2244: -- Check whether this allocation action
2245: -- has been already archived

Line 2252: hr_utility.set_location(l_proc, 190);

2248: alc_rec.vehicle_allocation_id,
2249: asg_rec.asg_min_start_date,
2250: l_action_flag);
2251: --
2252: hr_utility.set_location(l_proc, 190);
2253: hr_utility.trace(l_proc||', l_archived_flag='||l_archived_flag);
2254: --
2255: IF l_archived_flag = 'N' THEN
2256: -- Action has not been archived already

Line 2253: hr_utility.trace(l_proc||', l_archived_flag='||l_archived_flag);

2249: asg_rec.asg_min_start_date,
2250: l_action_flag);
2251: --
2252: hr_utility.set_location(l_proc, 190);
2253: hr_utility.trace(l_proc||', l_archived_flag='||l_archived_flag);
2254: --
2255: IF l_archived_flag = 'N' THEN
2256: -- Action has not been archived already
2257: -- therefore create assignment action

Line 2273: hr_utility.set_location(l_proc, 200);

2269: -- Assignment has ended on this payroll or tax ref during the
2270: -- input date range and this car allocation was active on the
2271: -- end date therefore check whether it is a transfer
2272: -- to another tax ref
2273: hr_utility.set_location(l_proc, 200);
2274: l_next_tax_ref := NULL;
2275: --
2276: OPEN c_tax_ref(asg_rec.assignment_id, asg_rec.asg_max_end_date+1);
2277: FETCH c_tax_ref INTO l_next_tax_ref;

Line 2280: hr_utility.set_location(l_proc, 210);

2276: OPEN c_tax_ref(asg_rec.assignment_id, asg_rec.asg_max_end_date+1);
2277: FETCH c_tax_ref INTO l_next_tax_ref;
2278: CLOSE c_tax_ref;
2279: --
2280: hr_utility.set_location(l_proc, 210);
2281: hr_utility.trace(l_proc||', l_next_tax_ref='||l_next_tax_ref);
2282: --
2283: IF l_next_tax_ref is NOT NULL AND l_next_tax_ref <> g_tax_ref THEN
2284: -- This assignment has a different tax ref after end date

Line 2281: hr_utility.trace(l_proc||', l_next_tax_ref='||l_next_tax_ref);

2277: FETCH c_tax_ref INTO l_next_tax_ref;
2278: CLOSE c_tax_ref;
2279: --
2280: hr_utility.set_location(l_proc, 210);
2281: hr_utility.trace(l_proc||', l_next_tax_ref='||l_next_tax_ref);
2282: --
2283: IF l_next_tax_ref is NOT NULL AND l_next_tax_ref <> g_tax_ref THEN
2284: -- This assignment has a different tax ref after end date
2285: -- therefore it should be reported as allocation withdrawal

Line 2287: hr_utility.set_location(l_proc, 220);

2283: IF l_next_tax_ref is NOT NULL AND l_next_tax_ref <> g_tax_ref THEN
2284: -- This assignment has a different tax ref after end date
2285: -- therefore it should be reported as allocation withdrawal
2286: -- on this EDI message.
2287: hr_utility.set_location(l_proc, 220);
2288: l_action_flag := 'W';
2289: --
2290: -- Check whether this allocation action
2291: -- has been already archived

Line 2298: hr_utility.set_location(l_proc, 230);

2294: alc_rec.vehicle_allocation_id,
2295: asg_rec.asg_max_end_date,
2296: l_action_flag);
2297: --
2298: hr_utility.set_location(l_proc, 230);
2299: hr_utility.trace(l_proc||', l_archived_flag='||l_archived_flag);
2300: --
2301: IF l_archived_flag = 'N' THEN
2302: -- Action has not been archived already

Line 2299: hr_utility.trace(l_proc||', l_archived_flag='||l_archived_flag);

2295: asg_rec.asg_max_end_date,
2296: l_action_flag);
2297: --
2298: hr_utility.set_location(l_proc, 230);
2299: hr_utility.trace(l_proc||', l_archived_flag='||l_archived_flag);
2300: --
2301: IF l_archived_flag = 'N' THEN
2302: -- Action has not been archived already
2303: -- therefore create assignment action

Line 2310: hr_utility.set_location(l_proc, 240);

2306: --
2307: END IF;
2308: END IF;
2309: --
2310: hr_utility.set_location(l_proc, 240);
2311: --
2312: hr_utility.set_location(l_proc, 250);
2313: END LOOP;
2314: --

Line 2312: hr_utility.set_location(l_proc, 250);

2308: END IF;
2309: --
2310: hr_utility.set_location(l_proc, 240);
2311: --
2312: hr_utility.set_location(l_proc, 250);
2313: END LOOP;
2314: --
2315: hr_utility.set_location(l_proc, 260);
2316: --

Line 2315: hr_utility.set_location(l_proc, 260);

2311: --
2312: hr_utility.set_location(l_proc, 250);
2313: END LOOP;
2314: --
2315: hr_utility.set_location(l_proc, 260);
2316: --
2317: -- If flag is set then create action
2318: IF l_create_assact_flag = 'Y' THEN
2319: --

Line 2324: hr_utility.set_location(l_proc, 270);

2320: SELECT pay_assignment_actions_s.nextval
2321: INTO l_actid
2322: FROM dual;
2323:
2324: hr_utility.set_location(l_proc, 270);
2325: hr_utility.trace(l_proc||': l_actid='||l_actid);
2326: hr_utility.trace(l_proc||': asg_rec.assignment_id='||asg_rec.assignment_id);
2327: hr_utility.trace(l_proc||': pactid='||pactid);
2328: hr_utility.trace(l_proc||': chunk='||chunk);

Line 2325: hr_utility.trace(l_proc||': l_actid='||l_actid);

2321: INTO l_actid
2322: FROM dual;
2323:
2324: hr_utility.set_location(l_proc, 270);
2325: hr_utility.trace(l_proc||': l_actid='||l_actid);
2326: hr_utility.trace(l_proc||': asg_rec.assignment_id='||asg_rec.assignment_id);
2327: hr_utility.trace(l_proc||': pactid='||pactid);
2328: hr_utility.trace(l_proc||': chunk='||chunk);
2329: --

Line 2326: hr_utility.trace(l_proc||': asg_rec.assignment_id='||asg_rec.assignment_id);

2322: FROM dual;
2323:
2324: hr_utility.set_location(l_proc, 270);
2325: hr_utility.trace(l_proc||': l_actid='||l_actid);
2326: hr_utility.trace(l_proc||': asg_rec.assignment_id='||asg_rec.assignment_id);
2327: hr_utility.trace(l_proc||': pactid='||pactid);
2328: hr_utility.trace(l_proc||': chunk='||chunk);
2329: --
2330: hr_nonrun_asact.insact(l_actid,

Line 2327: hr_utility.trace(l_proc||': pactid='||pactid);

2323:
2324: hr_utility.set_location(l_proc, 270);
2325: hr_utility.trace(l_proc||': l_actid='||l_actid);
2326: hr_utility.trace(l_proc||': asg_rec.assignment_id='||asg_rec.assignment_id);
2327: hr_utility.trace(l_proc||': pactid='||pactid);
2328: hr_utility.trace(l_proc||': chunk='||chunk);
2329: --
2330: hr_nonrun_asact.insact(l_actid,
2331: asg_rec.assignment_id,

Line 2328: hr_utility.trace(l_proc||': chunk='||chunk);

2324: hr_utility.set_location(l_proc, 270);
2325: hr_utility.trace(l_proc||': l_actid='||l_actid);
2326: hr_utility.trace(l_proc||': asg_rec.assignment_id='||asg_rec.assignment_id);
2327: hr_utility.trace(l_proc||': pactid='||pactid);
2328: hr_utility.trace(l_proc||': chunk='||chunk);
2329: --
2330: hr_nonrun_asact.insact(l_actid,
2331: asg_rec.assignment_id,
2332: pactid,

Line 2335: hr_utility.set_location(l_proc, 280);

2331: asg_rec.assignment_id,
2332: pactid,
2333: chunk, NULL);
2334: --
2335: hr_utility.set_location(l_proc, 280);
2336: --
2337: END IF;
2338: END LOOP;
2339: --

Line 2340: hr_utility.set_location('Leaving: '||l_proc,290);

2336: --
2337: END IF;
2338: END LOOP;
2339: --
2340: hr_utility.set_location('Leaving: '||l_proc,290);
2341: -- hr_utility.trace_off;
2342: EXCEPTION
2343: WHEN OTHERS THEN
2344: hr_utility.set_location('Leaving: '||l_proc,300);

Line 2341: -- hr_utility.trace_off;

2337: END IF;
2338: END LOOP;
2339: --
2340: hr_utility.set_location('Leaving: '||l_proc,290);
2341: -- hr_utility.trace_off;
2342: EXCEPTION
2343: WHEN OTHERS THEN
2344: hr_utility.set_location('Leaving: '||l_proc,300);
2345: -- hr_utility.trace_off;

Line 2344: hr_utility.set_location('Leaving: '||l_proc,300);

2340: hr_utility.set_location('Leaving: '||l_proc,290);
2341: -- hr_utility.trace_off;
2342: EXCEPTION
2343: WHEN OTHERS THEN
2344: hr_utility.set_location('Leaving: '||l_proc,300);
2345: -- hr_utility.trace_off;
2346: raise;
2347: END Create_asg_act_v4;
2348:

Line 2345: -- hr_utility.trace_off;

2341: -- hr_utility.trace_off;
2342: EXCEPTION
2343: WHEN OTHERS THEN
2344: hr_utility.set_location('Leaving: '||l_proc,300);
2345: -- hr_utility.trace_off;
2346: raise;
2347: END Create_asg_act_v4;
2348:
2349:

Line 2420: --hr_utility.trace_on(null, 'KTHAMPAN');

2416: l_archived_flag VARCHAR2(1);
2417: l_private_start_dt date;
2418: l_latest_private_flag varchar2(1);
2419: BEGIN
2420: --hr_utility.trace_on(null, 'KTHAMPAN');
2421: hr_utility.set_location('Entering '||l_proc, 10);
2422: --
2423: OPEN c_param_values;
2424: FETCH c_param_values INTO g_payroll_id,

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

2417: l_private_start_dt date;
2418: l_latest_private_flag varchar2(1);
2419: BEGIN
2420: --hr_utility.trace_on(null, 'KTHAMPAN');
2421: hr_utility.set_location('Entering '||l_proc, 10);
2422: --
2423: OPEN c_param_values;
2424: FETCH c_param_values INTO g_payroll_id,
2425: g_tax_ref,

Line 2432: hr_utility.set_location(l_proc, 15);

2428: g_end_date,
2429: g_business_group_id;
2430: CLOSE c_param_values;
2431: --
2432: hr_utility.set_location(l_proc, 15);
2433: hr_utility.trace(l_proc||': g_payroll_id='||g_payroll_id);
2434: hr_utility.trace(l_proc||': g_tax_ref='||g_tax_ref);
2435: hr_utility.trace(l_proc||': g_start_date='||fnd_date.date_to_displaydate(g_start_date));
2436: hr_utility.trace(l_proc||': g_effective_date='||fnd_date.date_to_displaydate(g_effective_date));

Line 2433: hr_utility.trace(l_proc||': g_payroll_id='||g_payroll_id);

2429: g_business_group_id;
2430: CLOSE c_param_values;
2431: --
2432: hr_utility.set_location(l_proc, 15);
2433: hr_utility.trace(l_proc||': g_payroll_id='||g_payroll_id);
2434: hr_utility.trace(l_proc||': g_tax_ref='||g_tax_ref);
2435: hr_utility.trace(l_proc||': g_start_date='||fnd_date.date_to_displaydate(g_start_date));
2436: hr_utility.trace(l_proc||': g_effective_date='||fnd_date.date_to_displaydate(g_effective_date));
2437: hr_utility.trace(l_proc||': g_end_date='||fnd_date.date_to_displaydate(g_end_date));

Line 2434: hr_utility.trace(l_proc||': g_tax_ref='||g_tax_ref);

2430: CLOSE c_param_values;
2431: --
2432: hr_utility.set_location(l_proc, 15);
2433: hr_utility.trace(l_proc||': g_payroll_id='||g_payroll_id);
2434: hr_utility.trace(l_proc||': g_tax_ref='||g_tax_ref);
2435: hr_utility.trace(l_proc||': g_start_date='||fnd_date.date_to_displaydate(g_start_date));
2436: hr_utility.trace(l_proc||': g_effective_date='||fnd_date.date_to_displaydate(g_effective_date));
2437: hr_utility.trace(l_proc||': g_end_date='||fnd_date.date_to_displaydate(g_end_date));
2438: hr_utility.trace(l_proc||': g_business_group_id='||g_business_group_id);

Line 2435: hr_utility.trace(l_proc||': g_start_date='||fnd_date.date_to_displaydate(g_start_date));

2431: --
2432: hr_utility.set_location(l_proc, 15);
2433: hr_utility.trace(l_proc||': g_payroll_id='||g_payroll_id);
2434: hr_utility.trace(l_proc||': g_tax_ref='||g_tax_ref);
2435: hr_utility.trace(l_proc||': g_start_date='||fnd_date.date_to_displaydate(g_start_date));
2436: hr_utility.trace(l_proc||': g_effective_date='||fnd_date.date_to_displaydate(g_effective_date));
2437: hr_utility.trace(l_proc||': g_end_date='||fnd_date.date_to_displaydate(g_end_date));
2438: hr_utility.trace(l_proc||': g_business_group_id='||g_business_group_id);
2439: For asg_rec IN c_asg

Line 2436: hr_utility.trace(l_proc||': g_effective_date='||fnd_date.date_to_displaydate(g_effective_date));

2432: hr_utility.set_location(l_proc, 15);
2433: hr_utility.trace(l_proc||': g_payroll_id='||g_payroll_id);
2434: hr_utility.trace(l_proc||': g_tax_ref='||g_tax_ref);
2435: hr_utility.trace(l_proc||': g_start_date='||fnd_date.date_to_displaydate(g_start_date));
2436: hr_utility.trace(l_proc||': g_effective_date='||fnd_date.date_to_displaydate(g_effective_date));
2437: hr_utility.trace(l_proc||': g_end_date='||fnd_date.date_to_displaydate(g_end_date));
2438: hr_utility.trace(l_proc||': g_business_group_id='||g_business_group_id);
2439: For asg_rec IN c_asg
2440: LOOP

Line 2437: hr_utility.trace(l_proc||': g_end_date='||fnd_date.date_to_displaydate(g_end_date));

2433: hr_utility.trace(l_proc||': g_payroll_id='||g_payroll_id);
2434: hr_utility.trace(l_proc||': g_tax_ref='||g_tax_ref);
2435: hr_utility.trace(l_proc||': g_start_date='||fnd_date.date_to_displaydate(g_start_date));
2436: hr_utility.trace(l_proc||': g_effective_date='||fnd_date.date_to_displaydate(g_effective_date));
2437: hr_utility.trace(l_proc||': g_end_date='||fnd_date.date_to_displaydate(g_end_date));
2438: hr_utility.trace(l_proc||': g_business_group_id='||g_business_group_id);
2439: For asg_rec IN c_asg
2440: LOOP
2441: -- Loop through all assignments

Line 2438: hr_utility.trace(l_proc||': g_business_group_id='||g_business_group_id);

2434: hr_utility.trace(l_proc||': g_tax_ref='||g_tax_ref);
2435: hr_utility.trace(l_proc||': g_start_date='||fnd_date.date_to_displaydate(g_start_date));
2436: hr_utility.trace(l_proc||': g_effective_date='||fnd_date.date_to_displaydate(g_effective_date));
2437: hr_utility.trace(l_proc||': g_end_date='||fnd_date.date_to_displaydate(g_end_date));
2438: hr_utility.trace(l_proc||': g_business_group_id='||g_business_group_id);
2439: For asg_rec IN c_asg
2440: LOOP
2441: -- Loop through all assignments
2442: hr_utility.set_location(l_proc, 20);

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

2438: hr_utility.trace(l_proc||': g_business_group_id='||g_business_group_id);
2439: For asg_rec IN c_asg
2440: LOOP
2441: -- Loop through all assignments
2442: hr_utility.set_location(l_proc, 20);
2443: hr_utility.trace(l_proc||': assignment_id='||asg_rec.assignment_id);
2444: hr_utility.trace(l_proc||': asg_min_start_date='||fnd_date.date_to_displaydate(asg_rec.asg_min_start_date));
2445: hr_utility.trace(l_proc||': asg_max_end_date='||fnd_date.date_to_displaydate(asg_rec.asg_max_end_date));
2446: --

Line 2443: hr_utility.trace(l_proc||': assignment_id='||asg_rec.assignment_id);

2439: For asg_rec IN c_asg
2440: LOOP
2441: -- Loop through all assignments
2442: hr_utility.set_location(l_proc, 20);
2443: hr_utility.trace(l_proc||': assignment_id='||asg_rec.assignment_id);
2444: hr_utility.trace(l_proc||': asg_min_start_date='||fnd_date.date_to_displaydate(asg_rec.asg_min_start_date));
2445: hr_utility.trace(l_proc||': asg_max_end_date='||fnd_date.date_to_displaydate(asg_rec.asg_max_end_date));
2446: --
2447: l_create_assact_flag := 'N';

Line 2444: hr_utility.trace(l_proc||': asg_min_start_date='||fnd_date.date_to_displaydate(asg_rec.asg_min_start_date));

2440: LOOP
2441: -- Loop through all assignments
2442: hr_utility.set_location(l_proc, 20);
2443: hr_utility.trace(l_proc||': assignment_id='||asg_rec.assignment_id);
2444: hr_utility.trace(l_proc||': asg_min_start_date='||fnd_date.date_to_displaydate(asg_rec.asg_min_start_date));
2445: hr_utility.trace(l_proc||': asg_max_end_date='||fnd_date.date_to_displaydate(asg_rec.asg_max_end_date));
2446: --
2447: l_create_assact_flag := 'N';
2448: --

Line 2445: hr_utility.trace(l_proc||': asg_max_end_date='||fnd_date.date_to_displaydate(asg_rec.asg_max_end_date));

2441: -- Loop through all assignments
2442: hr_utility.set_location(l_proc, 20);
2443: hr_utility.trace(l_proc||': assignment_id='||asg_rec.assignment_id);
2444: hr_utility.trace(l_proc||': asg_min_start_date='||fnd_date.date_to_displaydate(asg_rec.asg_min_start_date));
2445: hr_utility.trace(l_proc||': asg_max_end_date='||fnd_date.date_to_displaydate(asg_rec.asg_max_end_date));
2446: --
2447: l_create_assact_flag := 'N';
2448: --
2449: FOR alc_rec IN c_allocations(asg_rec.assignment_id) LOOP

Line 2452: hr_utility.set_location(l_proc, 30);

2448: --
2449: FOR alc_rec IN c_allocations(asg_rec.assignment_id) LOOP
2450: -- Loop through all vehicle allocations
2451: -- over the date range
2452: hr_utility.set_location(l_proc, 30);
2453: hr_utility.trace(l_proc||': vehicle_allocation_id='||alc_rec.vehicle_allocation_id);
2454: hr_utility.trace(l_proc||': usage_type='||alc_rec.usage_type);
2455: --
2456: L_action_flag := 'X';

Line 2453: hr_utility.trace(l_proc||': vehicle_allocation_id='||alc_rec.vehicle_allocation_id);

2449: FOR alc_rec IN c_allocations(asg_rec.assignment_id) LOOP
2450: -- Loop through all vehicle allocations
2451: -- over the date range
2452: hr_utility.set_location(l_proc, 30);
2453: hr_utility.trace(l_proc||': vehicle_allocation_id='||alc_rec.vehicle_allocation_id);
2454: hr_utility.trace(l_proc||': usage_type='||alc_rec.usage_type);
2455: --
2456: L_action_flag := 'X';
2457: l_archived_flag := 'Y';

Line 2454: hr_utility.trace(l_proc||': usage_type='||alc_rec.usage_type);

2450: -- Loop through all vehicle allocations
2451: -- over the date range
2452: hr_utility.set_location(l_proc, 30);
2453: hr_utility.trace(l_proc||': vehicle_allocation_id='||alc_rec.vehicle_allocation_id);
2454: hr_utility.trace(l_proc||': usage_type='||alc_rec.usage_type);
2455: --
2456: L_action_flag := 'X';
2457: l_archived_flag := 'Y';
2458: --

Line 2466: hr_utility.set_location(l_proc, 32);

2462: open private_flag_check(alc_rec.vehicle_allocation_id);
2463: fetch private_flag_check into l_private_start_dt;
2464: close private_flag_check;
2465:
2466: hr_utility.set_location(l_proc, 32);
2467: hr_utility.trace(l_proc||': l_private_start_dt='||l_private_start_dt);
2468: if l_private_start_dt is not null then
2469: -- Cursor to check if the change was from Y to N i.e. Withdrawal
2470: -- else was it from N to Y i.e. new Benifit

Line 2467: hr_utility.trace(l_proc||': l_private_start_dt='||l_private_start_dt);

2463: fetch private_flag_check into l_private_start_dt;
2464: close private_flag_check;
2465:
2466: hr_utility.set_location(l_proc, 32);
2467: hr_utility.trace(l_proc||': l_private_start_dt='||l_private_start_dt);
2468: if l_private_start_dt is not null then
2469: -- Cursor to check if the change was from Y to N i.e. Withdrawal
2470: -- else was it from N to Y i.e. new Benifit
2471:

Line 2476: hr_utility.set_location(l_proc, 35);

2472: open withdrawal_check(alc_rec.vehicle_allocation_id,l_private_start_dt );
2473: fetch withdrawal_check into l_latest_private_flag;
2474: close withdrawal_check;
2475:
2476: hr_utility.set_location(l_proc, 35);
2477: hr_utility.trace(l_proc||': l_latest_private_flag='||nvl(l_latest_private_flag,'NULL'));
2478:
2479: if l_latest_private_flag = 'Y' then
2480: -- This means the value has changed from N to Y so this is a new benefit

Line 2477: hr_utility.trace(l_proc||': l_latest_private_flag='||nvl(l_latest_private_flag,'NULL'));

2473: fetch withdrawal_check into l_latest_private_flag;
2474: close withdrawal_check;
2475:
2476: hr_utility.set_location(l_proc, 35);
2477: hr_utility.trace(l_proc||': l_latest_private_flag='||nvl(l_latest_private_flag,'NULL'));
2478:
2479: if l_latest_private_flag = 'Y' then
2480: -- This means the value has changed from N to Y so this is a new benefit
2481: L_action_flag := 'N';

Line 2496: hr_utility.set_location(l_proc, 38);

2492: alc_rec.vehicle_allocation_id,
2493: l_private_start_dt,
2494: l_action_flag);
2495: --
2496: hr_utility.set_location(l_proc, 38);
2497: hr_utility.trace(l_proc||': l_archived_flag='|| l_archived_flag);
2498: --
2499: IF l_archived_flag = 'N' THEN
2500: -- Action has not been archived already

Line 2497: hr_utility.trace(l_proc||': l_archived_flag='|| l_archived_flag);

2493: l_private_start_dt,
2494: l_action_flag);
2495: --
2496: hr_utility.set_location(l_proc, 38);
2497: hr_utility.trace(l_proc||': l_archived_flag='|| l_archived_flag);
2498: --
2499: IF l_archived_flag = 'N' THEN
2500: -- Action has not been archived already
2501: -- therefore create assignment action

Line 2522: hr_utility.set_location(l_proc, 40);

2518: OPEN c_alloc_dates(alc_rec.vehicle_allocation_id);
2519: FETCH c_alloc_dates INTO alc_dates_rec;
2520: CLOSE c_alloc_dates;
2521: --
2522: hr_utility.set_location(l_proc, 40);
2523: hr_utility.trace(l_proc||': min_start_date='|| fnd_date.date_to_displaydate(alc_dates_rec.min_start_date));
2524: hr_utility.trace(l_proc||': max_end_date='|| fnd_date.date_to_displaydate(alc_dates_rec.max_end_date));
2525: --
2526: -- Check whether vehicle was allocated or

Line 2523: hr_utility.trace(l_proc||': min_start_date='|| fnd_date.date_to_displaydate(alc_dates_rec.min_start_date));

2519: FETCH c_alloc_dates INTO alc_dates_rec;
2520: CLOSE c_alloc_dates;
2521: --
2522: hr_utility.set_location(l_proc, 40);
2523: hr_utility.trace(l_proc||': min_start_date='|| fnd_date.date_to_displaydate(alc_dates_rec.min_start_date));
2524: hr_utility.trace(l_proc||': max_end_date='|| fnd_date.date_to_displaydate(alc_dates_rec.max_end_date));
2525: --
2526: -- Check whether vehicle was allocated or
2527: -- Withdrawn within the date range also

Line 2524: hr_utility.trace(l_proc||': max_end_date='|| fnd_date.date_to_displaydate(alc_dates_rec.max_end_date));

2520: CLOSE c_alloc_dates;
2521: --
2522: hr_utility.set_location(l_proc, 40);
2523: hr_utility.trace(l_proc||': min_start_date='|| fnd_date.date_to_displaydate(alc_dates_rec.min_start_date));
2524: hr_utility.trace(l_proc||': max_end_date='|| fnd_date.date_to_displaydate(alc_dates_rec.max_end_date));
2525: --
2526: -- Check whether vehicle was allocated or
2527: -- Withdrawn within the date range also
2528: -- check that this allocation or withdrawal

Line 2530: hr_utility.trace(l_proc||': alc_dates_rec.min_start_date='|| fnd_date.date_to_displaydate(alc_dates_rec.min_start_date));

2526: -- Check whether vehicle was allocated or
2527: -- Withdrawn within the date range also
2528: -- check that this allocation or withdrawal
2529: -- happened when assignment was with input tax ref
2530: hr_utility.trace(l_proc||': alc_dates_rec.min_start_date='|| fnd_date.date_to_displaydate(alc_dates_rec.min_start_date));
2531: hr_utility.trace(l_proc||': asg_rec.asg_min_start_date='|| fnd_date.date_to_displaydate(asg_rec.asg_min_start_date));
2532: hr_utility.trace(l_proc||': asg_rec.asg_max_end_date='|| fnd_date.date_to_displaydate(asg_rec.asg_max_end_date));
2533: hr_utility.trace(l_proc||': alc_rec.usage_type='|| alc_rec.usage_type);
2534: IF (alc_dates_rec.min_start_date BETWEEN g_start_date AND g_end_Date) AND

Line 2531: hr_utility.trace(l_proc||': asg_rec.asg_min_start_date='|| fnd_date.date_to_displaydate(asg_rec.asg_min_start_date));

2527: -- Withdrawn within the date range also
2528: -- check that this allocation or withdrawal
2529: -- happened when assignment was with input tax ref
2530: hr_utility.trace(l_proc||': alc_dates_rec.min_start_date='|| fnd_date.date_to_displaydate(alc_dates_rec.min_start_date));
2531: hr_utility.trace(l_proc||': asg_rec.asg_min_start_date='|| fnd_date.date_to_displaydate(asg_rec.asg_min_start_date));
2532: hr_utility.trace(l_proc||': asg_rec.asg_max_end_date='|| fnd_date.date_to_displaydate(asg_rec.asg_max_end_date));
2533: hr_utility.trace(l_proc||': alc_rec.usage_type='|| alc_rec.usage_type);
2534: IF (alc_dates_rec.min_start_date BETWEEN g_start_date AND g_end_Date) AND
2535: (alc_dates_rec.min_start_date BETWEEN asg_rec.asg_min_start_date AND asg_rec.asg_max_end_date) THEN

Line 2532: hr_utility.trace(l_proc||': asg_rec.asg_max_end_date='|| fnd_date.date_to_displaydate(asg_rec.asg_max_end_date));

2528: -- check that this allocation or withdrawal
2529: -- happened when assignment was with input tax ref
2530: hr_utility.trace(l_proc||': alc_dates_rec.min_start_date='|| fnd_date.date_to_displaydate(alc_dates_rec.min_start_date));
2531: hr_utility.trace(l_proc||': asg_rec.asg_min_start_date='|| fnd_date.date_to_displaydate(asg_rec.asg_min_start_date));
2532: hr_utility.trace(l_proc||': asg_rec.asg_max_end_date='|| fnd_date.date_to_displaydate(asg_rec.asg_max_end_date));
2533: hr_utility.trace(l_proc||': alc_rec.usage_type='|| alc_rec.usage_type);
2534: IF (alc_dates_rec.min_start_date BETWEEN g_start_date AND g_end_Date) AND
2535: (alc_dates_rec.min_start_date BETWEEN asg_rec.asg_min_start_date AND asg_rec.asg_max_end_date) THEN
2536: --

Line 2533: hr_utility.trace(l_proc||': alc_rec.usage_type='|| alc_rec.usage_type);

2529: -- happened when assignment was with input tax ref
2530: hr_utility.trace(l_proc||': alc_dates_rec.min_start_date='|| fnd_date.date_to_displaydate(alc_dates_rec.min_start_date));
2531: hr_utility.trace(l_proc||': asg_rec.asg_min_start_date='|| fnd_date.date_to_displaydate(asg_rec.asg_min_start_date));
2532: hr_utility.trace(l_proc||': asg_rec.asg_max_end_date='|| fnd_date.date_to_displaydate(asg_rec.asg_max_end_date));
2533: hr_utility.trace(l_proc||': alc_rec.usage_type='|| alc_rec.usage_type);
2534: IF (alc_dates_rec.min_start_date BETWEEN g_start_date AND g_end_Date) AND
2535: (alc_dates_rec.min_start_date BETWEEN asg_rec.asg_min_start_date AND asg_rec.asg_max_end_date) THEN
2536: --
2537: -- This is a New Car or replacement action

Line 2550: hr_utility.set_location(l_proc, 50);

2546: OPEN c_first_asg(asg_rec.assignment_id, alc_dates_rec.min_start_date);
2547: FETCH c_first_asg INTO first_asg_rec;
2548: CLOSE c_first_asg;
2549: --
2550: hr_utility.set_location(l_proc, 50);
2551: hr_utility.trace(l_proc||': First Assignment='|| first_asg_rec.assignment_id);
2552: -- Get primary car allocation of the
2553: -- first assignment of this person
2554: -- in this tax ref

Line 2551: hr_utility.trace(l_proc||': First Assignment='|| first_asg_rec.assignment_id);

2547: FETCH c_first_asg INTO first_asg_rec;
2548: CLOSE c_first_asg;
2549: --
2550: hr_utility.set_location(l_proc, 50);
2551: hr_utility.trace(l_proc||': First Assignment='|| first_asg_rec.assignment_id);
2552: -- Get primary car allocation of the
2553: -- first assignment of this person
2554: -- in this tax ref
2555: OPEN c_primary_car(first_asg_rec.assignment_id, alc_dates_rec.min_start_date);

Line 2559: hr_utility.set_location(l_proc, 60);

2555: OPEN c_primary_car(first_asg_rec.assignment_id, alc_dates_rec.min_start_date);
2556: FETCH c_primary_car INTO primary_car_rec;
2557: CLOSE c_primary_car;
2558: --
2559: hr_utility.set_location(l_proc, 60);
2560: hr_utility.trace(l_proc||': Primary Car Allocation='|| primary_car_rec.vehicle_allocation_id);
2561: --
2562: IF primary_car_rec.vehicle_allocation_id = alc_rec.vehicle_allocation_id THEN
2563: -- This is the first car allocation

Line 2560: hr_utility.trace(l_proc||': Primary Car Allocation='|| primary_car_rec.vehicle_allocation_id);

2556: FETCH c_primary_car INTO primary_car_rec;
2557: CLOSE c_primary_car;
2558: --
2559: hr_utility.set_location(l_proc, 60);
2560: hr_utility.trace(l_proc||': Primary Car Allocation='|| primary_car_rec.vehicle_allocation_id);
2561: --
2562: IF primary_car_rec.vehicle_allocation_id = alc_rec.vehicle_allocation_id THEN
2563: -- This is the first car allocation
2564: -- of this employee in this tax ref

Line 2575: hr_utility.set_location(l_proc, 70);

2571: ELSE
2572: L_action_flag := 'N';
2573: END IF;
2574: --
2575: hr_utility.set_location(l_proc, 70);
2576: hr_utility.trace(l_proc||': l_action_flag='|| l_action_flag);
2577: --
2578: CLOSE c_prior_prim_car;
2579: ELSE

Line 2576: hr_utility.trace(l_proc||': l_action_flag='|| l_action_flag);

2572: L_action_flag := 'N';
2573: END IF;
2574: --
2575: hr_utility.set_location(l_proc, 70);
2576: hr_utility.trace(l_proc||': l_action_flag='|| l_action_flag);
2577: --
2578: CLOSE c_prior_prim_car;
2579: ELSE
2580: -- Not the first car of the employee

Line 2585: hr_utility.set_location(l_proc, 80);

2581: -- report this as new car
2582: L_action_flag := 'N';
2583: END IF;
2584: --
2585: hr_utility.set_location(l_proc, 80);
2586: hr_utility.trace(l_proc||': l_action_flag='|| l_action_flag);
2587: --
2588: ELSE
2589: -- Not a primary car therefore mark

Line 2586: hr_utility.trace(l_proc||': l_action_flag='|| l_action_flag);

2582: L_action_flag := 'N';
2583: END IF;
2584: --
2585: hr_utility.set_location(l_proc, 80);
2586: hr_utility.trace(l_proc||': l_action_flag='|| l_action_flag);
2587: --
2588: ELSE
2589: -- Not a primary car therefore mark
2590: -- it as new car allocation action

Line 2594: hr_utility.set_location(l_proc, 90);

2590: -- it as new car allocation action
2591: l_action_flag := 'N';
2592: END IF;
2593: --
2594: hr_utility.set_location(l_proc, 90);
2595: hr_utility.trace(l_proc||': l_action_flag='|| l_action_flag);
2596: --
2597: IF L_action_flag <> 'X' THEN
2598: -- Check whether this allocation action

Line 2595: hr_utility.trace(l_proc||': l_action_flag='|| l_action_flag);

2591: l_action_flag := 'N';
2592: END IF;
2593: --
2594: hr_utility.set_location(l_proc, 90);
2595: hr_utility.trace(l_proc||': l_action_flag='|| l_action_flag);
2596: --
2597: IF L_action_flag <> 'X' THEN
2598: -- Check whether this allocation action
2599: -- has been already archived

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

2602: alc_rec.vehicle_allocation_id,
2603: alc_dates_rec.min_start_date,
2604: l_action_flag);
2605: --
2606: hr_utility.set_location(l_proc, 100);
2607: hr_utility.trace(l_proc||': l_archived_flag='|| l_archived_flag);
2608: --
2609: IF l_archived_flag = 'N' THEN
2610: -- Action has not been archived already

Line 2607: hr_utility.trace(l_proc||': l_archived_flag='|| l_archived_flag);

2603: alc_dates_rec.min_start_date,
2604: l_action_flag);
2605: --
2606: hr_utility.set_location(l_proc, 100);
2607: hr_utility.trace(l_proc||': l_archived_flag='|| l_archived_flag);
2608: --
2609: IF l_archived_flag = 'N' THEN
2610: -- Action has not been archived already
2611: -- therefore create assignment action

Line 2646: hr_utility.set_location(l_proc, 50);

2642: OPEN c_first_asg(asg_rec.assignment_id, alc_dates_rec.max_end_date);
2643: FETCH c_first_asg INTO first_asg_rec;
2644: CLOSE c_first_asg;
2645: --
2646: hr_utility.set_location(l_proc, 50);
2647: hr_utility.trace(l_proc||': First Assignment='|| first_asg_rec.assignment_id);
2648: -- Get primary car allocation of the
2649: -- first assignment of this person
2650: -- in this tax ref

Line 2647: hr_utility.trace(l_proc||': First Assignment='|| first_asg_rec.assignment_id);

2643: FETCH c_first_asg INTO first_asg_rec;
2644: CLOSE c_first_asg;
2645: --
2646: hr_utility.set_location(l_proc, 50);
2647: hr_utility.trace(l_proc||': First Assignment='|| first_asg_rec.assignment_id);
2648: -- Get primary car allocation of the
2649: -- first assignment of this person
2650: -- in this tax ref
2651: OPEN c_primary_car(first_asg_rec.assignment_id, alc_dates_rec.max_end_date);

Line 2655: hr_utility.set_location(l_proc, 60);

2651: OPEN c_primary_car(first_asg_rec.assignment_id, alc_dates_rec.max_end_date);
2652: FETCH c_primary_car INTO primary_car_rec;
2653: CLOSE c_primary_car;
2654: --
2655: hr_utility.set_location(l_proc, 60);
2656: hr_utility.trace(l_proc||': Primary Car Allocation='|| primary_car_rec.vehicle_allocation_id);
2657: --
2658: IF primary_car_rec.vehicle_allocation_id = alc_rec.vehicle_allocation_id THEN
2659: --

Line 2656: hr_utility.trace(l_proc||': Primary Car Allocation='|| primary_car_rec.vehicle_allocation_id);

2652: FETCH c_primary_car INTO primary_car_rec;
2653: CLOSE c_primary_car;
2654: --
2655: hr_utility.set_location(l_proc, 60);
2656: hr_utility.trace(l_proc||': Primary Car Allocation='|| primary_car_rec.vehicle_allocation_id);
2657: --
2658: IF primary_car_rec.vehicle_allocation_id = alc_rec.vehicle_allocation_id THEN
2659: --
2660: OPEN c_next_prim_car(asg_rec.assignment_id, Alc_dates_rec.max_end_date);

Line 2672: hr_utility.set_location(l_proc, 70);

2668: -- This is a withdrawal action
2669: L_action_flag := 'W';
2670: END IF;
2671: --
2672: hr_utility.set_location(l_proc, 70);
2673: hr_utility.trace(l_proc||': l_action_flag='|| l_action_flag);
2674: --
2675: CLOSE c_next_prim_car;
2676: ELSE

Line 2673: hr_utility.trace(l_proc||': l_action_flag='|| l_action_flag);

2669: L_action_flag := 'W';
2670: END IF;
2671: --
2672: hr_utility.set_location(l_proc, 70);
2673: hr_utility.trace(l_proc||': l_action_flag='|| l_action_flag);
2674: --
2675: CLOSE c_next_prim_car;
2676: ELSE
2677: -- Not the first car of the employee

Line 2683: hr_utility.set_location(l_proc, 80);

2679: L_action_flag := 'W';
2680: END IF;
2681: --
2682: --
2683: hr_utility.set_location(l_proc, 80);
2684: hr_utility.trace(l_proc||': l_action_flag='|| l_action_flag);
2685: --
2686: ELSE
2687: -- Not a Primary car therefore mark

Line 2684: hr_utility.trace(l_proc||': l_action_flag='|| l_action_flag);

2680: END IF;
2681: --
2682: --
2683: hr_utility.set_location(l_proc, 80);
2684: hr_utility.trace(l_proc||': l_action_flag='|| l_action_flag);
2685: --
2686: ELSE
2687: -- Not a Primary car therefore mark
2688: -- it as withdrawal car action

Line 2692: hr_utility.set_location(l_proc, 90);

2688: -- it as withdrawal car action
2689: l_action_flag := 'W';
2690: END IF;
2691: --
2692: hr_utility.set_location(l_proc, 90);
2693: hr_utility.trace(l_proc||': l_action_flag='|| l_action_flag);
2694: --
2695: IF L_action_flag <> 'X' THEN
2696: -- Check whether this allocation action

Line 2693: hr_utility.trace(l_proc||': l_action_flag='|| l_action_flag);

2689: l_action_flag := 'W';
2690: END IF;
2691: --
2692: hr_utility.set_location(l_proc, 90);
2693: hr_utility.trace(l_proc||': l_action_flag='|| l_action_flag);
2694: --
2695: IF L_action_flag <> 'X' THEN
2696: -- Check whether this allocation action
2697: -- has been already archived

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

2700: alc_rec.vehicle_allocation_id,
2701: alc_dates_rec.min_start_date,
2702: l_action_flag);
2703: --
2704: hr_utility.set_location(l_proc, 100);
2705: hr_utility.trace(l_proc||': l_archived_flag='|| l_archived_flag);
2706: --
2707: IF l_archived_flag = 'N' THEN
2708: -- Action has not been archived already

Line 2705: hr_utility.trace(l_proc||': l_archived_flag='|| l_archived_flag);

2701: alc_dates_rec.min_start_date,
2702: l_action_flag);
2703: --
2704: hr_utility.set_location(l_proc, 100);
2705: hr_utility.trace(l_proc||': l_archived_flag='|| l_archived_flag);
2706: --
2707: IF l_archived_flag = 'N' THEN
2708: -- Action has not been archived already
2709: -- therefore create assignment action

Line 2721: hr_utility.set_location(l_proc, 110);

2717: -- Fuel type has changed therefore make sure
2718: -- this change occured after the vehicle was
2719: -- allocated to this assignment
2720: --
2721: hr_utility.set_location(l_proc, 110);
2722: hr_utility.trace(l_proc||': effective_start_date='|| vehicle_changes_rec.effective_start_date);
2723: hr_utility.trace(l_proc||': fuel_type='|| vehicle_changes_rec.fuel_type);
2724: --
2725: IF (vehicle_changes_rec.effective_start_date

Line 2722: hr_utility.trace(l_proc||': effective_start_date='|| vehicle_changes_rec.effective_start_date);

2718: -- this change occured after the vehicle was
2719: -- allocated to this assignment
2720: --
2721: hr_utility.set_location(l_proc, 110);
2722: hr_utility.trace(l_proc||': effective_start_date='|| vehicle_changes_rec.effective_start_date);
2723: hr_utility.trace(l_proc||': fuel_type='|| vehicle_changes_rec.fuel_type);
2724: --
2725: IF (vehicle_changes_rec.effective_start_date
2726: BETWEEN alc_dates_rec.min_start_date+1 AND alc_dates_rec.max_end_date) AND

Line 2723: hr_utility.trace(l_proc||': fuel_type='|| vehicle_changes_rec.fuel_type);

2719: -- allocated to this assignment
2720: --
2721: hr_utility.set_location(l_proc, 110);
2722: hr_utility.trace(l_proc||': effective_start_date='|| vehicle_changes_rec.effective_start_date);
2723: hr_utility.trace(l_proc||': fuel_type='|| vehicle_changes_rec.fuel_type);
2724: --
2725: IF (vehicle_changes_rec.effective_start_date
2726: BETWEEN alc_dates_rec.min_start_date+1 AND alc_dates_rec.max_end_date) AND
2727: (vehicle_changes_rec.effective_start_date

Line 2738: hr_utility.set_location(l_proc, 120);

2734: alc_rec.vehicle_allocation_id,
2735: vehicle_changes_rec.effective_start_date,
2736: 'F');
2737: --
2738: hr_utility.set_location(l_proc, 120);
2739: hr_utility.trace(l_proc||': l_archived_flag='|| l_archived_flag);
2740: --
2741: IF l_archived_flag = 'N' THEN
2742: -- Action has not been archived already

Line 2739: hr_utility.trace(l_proc||': l_archived_flag='|| l_archived_flag);

2735: vehicle_changes_rec.effective_start_date,
2736: 'F');
2737: --
2738: hr_utility.set_location(l_proc, 120);
2739: hr_utility.trace(l_proc||': l_archived_flag='|| l_archived_flag);
2740: --
2741: IF l_archived_flag = 'N' THEN
2742: -- Action has not been archived already
2743: -- therefore create assignment action

Line 2750: hr_utility.set_location(l_proc, 130);

2746: END IF;
2747: END IF;
2748: END LOOP;
2749: --
2750: hr_utility.set_location(l_proc, 130);
2751: --
2752: --
2753: L_action_flag := 'X';
2754: l_archived_flag := 'Y';

Line 2767: hr_utility.set_location(l_proc, 160);

2763: -- Assignment has started on this payroll or tax ref during the
2764: -- input date range and this car allocation was active on the
2765: -- start date therefore check whether it is a transfer
2766: -- from another tax ref
2767: hr_utility.set_location(l_proc, 160);
2768: l_previous_tax_ref := NULL;
2769: --
2770: OPEN c_tax_ref(asg_rec.assignment_id, asg_rec.asg_min_start_date-1);
2771: FETCH c_tax_ref INTO l_previous_tax_ref;

Line 2774: hr_utility.set_location(l_proc, 170);

2770: OPEN c_tax_ref(asg_rec.assignment_id, asg_rec.asg_min_start_date-1);
2771: FETCH c_tax_ref INTO l_previous_tax_ref;
2772: CLOSE c_tax_ref;
2773: --
2774: hr_utility.set_location(l_proc, 170);
2775: hr_utility.trace(l_proc||', l_previous_tax_ref='||l_previous_tax_ref);
2776: --
2777: IF l_previous_tax_ref is NOT NULL AND l_previous_tax_ref <> g_tax_ref THEN
2778: -- This assignment has a different prior tax ref

Line 2775: hr_utility.trace(l_proc||', l_previous_tax_ref='||l_previous_tax_ref);

2771: FETCH c_tax_ref INTO l_previous_tax_ref;
2772: CLOSE c_tax_ref;
2773: --
2774: hr_utility.set_location(l_proc, 170);
2775: hr_utility.trace(l_proc||', l_previous_tax_ref='||l_previous_tax_ref);
2776: --
2777: IF l_previous_tax_ref is NOT NULL AND l_previous_tax_ref <> g_tax_ref THEN
2778: -- This assignment has a different prior tax ref
2779: -- therefore it should be reported as a new car

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

2777: IF l_previous_tax_ref is NOT NULL AND l_previous_tax_ref <> g_tax_ref THEN
2778: -- This assignment has a different prior tax ref
2779: -- therefore it should be reported as a new car
2780: -- allocation on this EDI message.
2781: hr_utility.set_location(l_proc, 180);
2782: l_action_flag := 'N';
2783: --
2784: -- Check whether this allocation action
2785: -- has been already archived

Line 2792: hr_utility.set_location(l_proc, 190);

2788: alc_rec.vehicle_allocation_id,
2789: asg_rec.asg_min_start_date,
2790: l_action_flag);
2791: --
2792: hr_utility.set_location(l_proc, 190);
2793: hr_utility.trace(l_proc||', l_archived_flag='||l_archived_flag);
2794: --
2795: IF l_archived_flag = 'N' THEN
2796: -- Action has not been archived already

Line 2793: hr_utility.trace(l_proc||', l_archived_flag='||l_archived_flag);

2789: asg_rec.asg_min_start_date,
2790: l_action_flag);
2791: --
2792: hr_utility.set_location(l_proc, 190);
2793: hr_utility.trace(l_proc||', l_archived_flag='||l_archived_flag);
2794: --
2795: IF l_archived_flag = 'N' THEN
2796: -- Action has not been archived already
2797: -- therefore create assignment action

Line 2813: hr_utility.set_location(l_proc, 200);

2809: -- Assignment has ended on this payroll or tax ref during the
2810: -- input date range and this car allocation was active on the
2811: -- end date therefore check whether it is a transfer
2812: -- to another tax ref
2813: hr_utility.set_location(l_proc, 200);
2814: l_next_tax_ref := NULL;
2815: --
2816: OPEN c_tax_ref(asg_rec.assignment_id, asg_rec.asg_max_end_date+1);
2817: FETCH c_tax_ref INTO l_next_tax_ref;

Line 2820: hr_utility.set_location(l_proc, 210);

2816: OPEN c_tax_ref(asg_rec.assignment_id, asg_rec.asg_max_end_date+1);
2817: FETCH c_tax_ref INTO l_next_tax_ref;
2818: CLOSE c_tax_ref;
2819: --
2820: hr_utility.set_location(l_proc, 210);
2821: hr_utility.trace(l_proc||', l_next_tax_ref='||l_next_tax_ref);
2822: --
2823: IF l_next_tax_ref is NOT NULL AND l_next_tax_ref <> g_tax_ref THEN
2824: -- This assignment has a different tax ref after end date

Line 2821: hr_utility.trace(l_proc||', l_next_tax_ref='||l_next_tax_ref);

2817: FETCH c_tax_ref INTO l_next_tax_ref;
2818: CLOSE c_tax_ref;
2819: --
2820: hr_utility.set_location(l_proc, 210);
2821: hr_utility.trace(l_proc||', l_next_tax_ref='||l_next_tax_ref);
2822: --
2823: IF l_next_tax_ref is NOT NULL AND l_next_tax_ref <> g_tax_ref THEN
2824: -- This assignment has a different tax ref after end date
2825: -- therefore it should be reported as allocation withdrawal

Line 2827: hr_utility.set_location(l_proc, 220);

2823: IF l_next_tax_ref is NOT NULL AND l_next_tax_ref <> g_tax_ref THEN
2824: -- This assignment has a different tax ref after end date
2825: -- therefore it should be reported as allocation withdrawal
2826: -- on this EDI message.
2827: hr_utility.set_location(l_proc, 220);
2828: l_action_flag := 'W';
2829: --
2830: -- Check whether this allocation action
2831: -- has been already archived

Line 2838: hr_utility.set_location(l_proc, 230);

2834: alc_rec.vehicle_allocation_id,
2835: asg_rec.asg_max_end_date,
2836: l_action_flag);
2837: --
2838: hr_utility.set_location(l_proc, 230);
2839: hr_utility.trace(l_proc||', l_archived_flag='||l_archived_flag);
2840: --
2841: IF l_archived_flag = 'N' THEN
2842: -- Action has not been archived already

Line 2839: hr_utility.trace(l_proc||', l_archived_flag='||l_archived_flag);

2835: asg_rec.asg_max_end_date,
2836: l_action_flag);
2837: --
2838: hr_utility.set_location(l_proc, 230);
2839: hr_utility.trace(l_proc||', l_archived_flag='||l_archived_flag);
2840: --
2841: IF l_archived_flag = 'N' THEN
2842: -- Action has not been archived already
2843: -- therefore create assignment action

Line 2850: hr_utility.set_location(l_proc, 240);

2846: --
2847: END IF;
2848: END IF;
2849: --
2850: hr_utility.set_location(l_proc, 240);
2851: --
2852: hr_utility.set_location(l_proc, 250);
2853: END LOOP;
2854: --

Line 2852: hr_utility.set_location(l_proc, 250);

2848: END IF;
2849: --
2850: hr_utility.set_location(l_proc, 240);
2851: --
2852: hr_utility.set_location(l_proc, 250);
2853: END LOOP;
2854: --
2855: hr_utility.set_location(l_proc, 260);
2856: --

Line 2855: hr_utility.set_location(l_proc, 260);

2851: --
2852: hr_utility.set_location(l_proc, 250);
2853: END LOOP;
2854: --
2855: hr_utility.set_location(l_proc, 260);
2856: --
2857: -- If flag is set then create action
2858: IF l_create_assact_flag = 'Y' THEN
2859: --

Line 2864: hr_utility.set_location(l_proc, 270);

2860: SELECT pay_assignment_actions_s.nextval
2861: INTO l_actid
2862: FROM dual;
2863:
2864: hr_utility.set_location(l_proc, 270);
2865: hr_utility.trace(l_proc||': l_actid='||l_actid);
2866: hr_utility.trace(l_proc||': asg_rec.assignment_id='||asg_rec.assignment_id);
2867: hr_utility.trace(l_proc||': pactid='||pactid);
2868: hr_utility.trace(l_proc||': chunk='||chunk);

Line 2865: hr_utility.trace(l_proc||': l_actid='||l_actid);

2861: INTO l_actid
2862: FROM dual;
2863:
2864: hr_utility.set_location(l_proc, 270);
2865: hr_utility.trace(l_proc||': l_actid='||l_actid);
2866: hr_utility.trace(l_proc||': asg_rec.assignment_id='||asg_rec.assignment_id);
2867: hr_utility.trace(l_proc||': pactid='||pactid);
2868: hr_utility.trace(l_proc||': chunk='||chunk);
2869: --

Line 2866: hr_utility.trace(l_proc||': asg_rec.assignment_id='||asg_rec.assignment_id);

2862: FROM dual;
2863:
2864: hr_utility.set_location(l_proc, 270);
2865: hr_utility.trace(l_proc||': l_actid='||l_actid);
2866: hr_utility.trace(l_proc||': asg_rec.assignment_id='||asg_rec.assignment_id);
2867: hr_utility.trace(l_proc||': pactid='||pactid);
2868: hr_utility.trace(l_proc||': chunk='||chunk);
2869: --
2870: hr_nonrun_asact.insact(l_actid,

Line 2867: hr_utility.trace(l_proc||': pactid='||pactid);

2863:
2864: hr_utility.set_location(l_proc, 270);
2865: hr_utility.trace(l_proc||': l_actid='||l_actid);
2866: hr_utility.trace(l_proc||': asg_rec.assignment_id='||asg_rec.assignment_id);
2867: hr_utility.trace(l_proc||': pactid='||pactid);
2868: hr_utility.trace(l_proc||': chunk='||chunk);
2869: --
2870: hr_nonrun_asact.insact(l_actid,
2871: asg_rec.assignment_id,

Line 2868: hr_utility.trace(l_proc||': chunk='||chunk);

2864: hr_utility.set_location(l_proc, 270);
2865: hr_utility.trace(l_proc||': l_actid='||l_actid);
2866: hr_utility.trace(l_proc||': asg_rec.assignment_id='||asg_rec.assignment_id);
2867: hr_utility.trace(l_proc||': pactid='||pactid);
2868: hr_utility.trace(l_proc||': chunk='||chunk);
2869: --
2870: hr_nonrun_asact.insact(l_actid,
2871: asg_rec.assignment_id,
2872: pactid,

Line 2875: hr_utility.set_location(l_proc, 280);

2871: asg_rec.assignment_id,
2872: pactid,
2873: chunk, NULL);
2874: --
2875: hr_utility.set_location(l_proc, 280);
2876: --
2877: END IF;
2878: END LOOP;
2879: --

Line 2880: hr_utility.set_location('Leaving: '||l_proc,290);

2876: --
2877: END IF;
2878: END LOOP;
2879: --
2880: hr_utility.set_location('Leaving: '||l_proc,290);
2881: -- hr_utility.trace_off;
2882: EXCEPTION
2883: WHEN OTHERS THEN
2884: hr_utility.set_location('Leaving: '||l_proc,300);

Line 2881: -- hr_utility.trace_off;

2877: END IF;
2878: END LOOP;
2879: --
2880: hr_utility.set_location('Leaving: '||l_proc,290);
2881: -- hr_utility.trace_off;
2882: EXCEPTION
2883: WHEN OTHERS THEN
2884: hr_utility.set_location('Leaving: '||l_proc,300);
2885: -- hr_utility.trace_off;

Line 2884: hr_utility.set_location('Leaving: '||l_proc,300);

2880: hr_utility.set_location('Leaving: '||l_proc,290);
2881: -- hr_utility.trace_off;
2882: EXCEPTION
2883: WHEN OTHERS THEN
2884: hr_utility.set_location('Leaving: '||l_proc,300);
2885: -- hr_utility.trace_off;
2886: raise;
2887: END Create_asg_act_v5;
2888:

Line 2885: -- hr_utility.trace_off;

2881: -- hr_utility.trace_off;
2882: EXCEPTION
2883: WHEN OTHERS THEN
2884: hr_utility.set_location('Leaving: '||l_proc,300);
2885: -- hr_utility.trace_off;
2886: raise;
2887: END Create_asg_act_v5;
2888:
2889:

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

3022: l_proc CONSTANT VARCHAR2(50):= g_package||'archive_allocation_action';
3023: l_interval_of_payment VARCHAR2(1); -- Added the for the bug 9354919
3024: --
3025: BEGIN
3026: hr_utility.set_location('Entering '||l_proc, 10);
3027: hr_utility.trace('p_assignment_id='||p_assignment_id);
3028: hr_utility.trace('p_asg_act_id='||p_asg_act_id);
3029: hr_utility.trace('p_vehicle_allocation_id='||p_vehicle_allocation_id);
3030: hr_utility.trace('p_vehicle_repository_id='||p_vehicle_repository_id);

Line 3027: hr_utility.trace('p_assignment_id='||p_assignment_id);

3023: l_interval_of_payment VARCHAR2(1); -- Added the for the bug 9354919
3024: --
3025: BEGIN
3026: hr_utility.set_location('Entering '||l_proc, 10);
3027: hr_utility.trace('p_assignment_id='||p_assignment_id);
3028: hr_utility.trace('p_asg_act_id='||p_asg_act_id);
3029: hr_utility.trace('p_vehicle_allocation_id='||p_vehicle_allocation_id);
3030: hr_utility.trace('p_vehicle_repository_id='||p_vehicle_repository_id);
3031: hr_utility.trace('p_action_flag='||p_action_flag);

Line 3028: hr_utility.trace('p_asg_act_id='||p_asg_act_id);

3024: --
3025: BEGIN
3026: hr_utility.set_location('Entering '||l_proc, 10);
3027: hr_utility.trace('p_assignment_id='||p_assignment_id);
3028: hr_utility.trace('p_asg_act_id='||p_asg_act_id);
3029: hr_utility.trace('p_vehicle_allocation_id='||p_vehicle_allocation_id);
3030: hr_utility.trace('p_vehicle_repository_id='||p_vehicle_repository_id);
3031: hr_utility.trace('p_action_flag='||p_action_flag);
3032: hr_utility.trace('p_fuel_type_change_date='||fnd_date.date_to_displaydate(p_fuel_type_change_date));

Line 3029: hr_utility.trace('p_vehicle_allocation_id='||p_vehicle_allocation_id);

3025: BEGIN
3026: hr_utility.set_location('Entering '||l_proc, 10);
3027: hr_utility.trace('p_assignment_id='||p_assignment_id);
3028: hr_utility.trace('p_asg_act_id='||p_asg_act_id);
3029: hr_utility.trace('p_vehicle_allocation_id='||p_vehicle_allocation_id);
3030: hr_utility.trace('p_vehicle_repository_id='||p_vehicle_repository_id);
3031: hr_utility.trace('p_action_flag='||p_action_flag);
3032: hr_utility.trace('p_fuel_type_change_date='||fnd_date.date_to_displaydate(p_fuel_type_change_date));
3033: hr_utility.trace('p_allocation_start_date='||fnd_date.date_to_displaydate(p_allocation_start_date));

Line 3030: hr_utility.trace('p_vehicle_repository_id='||p_vehicle_repository_id);

3026: hr_utility.set_location('Entering '||l_proc, 10);
3027: hr_utility.trace('p_assignment_id='||p_assignment_id);
3028: hr_utility.trace('p_asg_act_id='||p_asg_act_id);
3029: hr_utility.trace('p_vehicle_allocation_id='||p_vehicle_allocation_id);
3030: hr_utility.trace('p_vehicle_repository_id='||p_vehicle_repository_id);
3031: hr_utility.trace('p_action_flag='||p_action_flag);
3032: hr_utility.trace('p_fuel_type_change_date='||fnd_date.date_to_displaydate(p_fuel_type_change_date));
3033: hr_utility.trace('p_allocation_start_date='||fnd_date.date_to_displaydate(p_allocation_start_date));
3034: hr_utility.trace('p_allocation_end_date='||fnd_date.date_to_displaydate(p_allocation_end_date));

Line 3031: hr_utility.trace('p_action_flag='||p_action_flag);

3027: hr_utility.trace('p_assignment_id='||p_assignment_id);
3028: hr_utility.trace('p_asg_act_id='||p_asg_act_id);
3029: hr_utility.trace('p_vehicle_allocation_id='||p_vehicle_allocation_id);
3030: hr_utility.trace('p_vehicle_repository_id='||p_vehicle_repository_id);
3031: hr_utility.trace('p_action_flag='||p_action_flag);
3032: hr_utility.trace('p_fuel_type_change_date='||fnd_date.date_to_displaydate(p_fuel_type_change_date));
3033: hr_utility.trace('p_allocation_start_date='||fnd_date.date_to_displaydate(p_allocation_start_date));
3034: hr_utility.trace('p_allocation_end_date='||fnd_date.date_to_displaydate(p_allocation_end_date));
3035: -- Get data as of the action date within

Line 3032: hr_utility.trace('p_fuel_type_change_date='||fnd_date.date_to_displaydate(p_fuel_type_change_date));

3028: hr_utility.trace('p_asg_act_id='||p_asg_act_id);
3029: hr_utility.trace('p_vehicle_allocation_id='||p_vehicle_allocation_id);
3030: hr_utility.trace('p_vehicle_repository_id='||p_vehicle_repository_id);
3031: hr_utility.trace('p_action_flag='||p_action_flag);
3032: hr_utility.trace('p_fuel_type_change_date='||fnd_date.date_to_displaydate(p_fuel_type_change_date));
3033: hr_utility.trace('p_allocation_start_date='||fnd_date.date_to_displaydate(p_allocation_start_date));
3034: hr_utility.trace('p_allocation_end_date='||fnd_date.date_to_displaydate(p_allocation_end_date));
3035: -- Get data as of the action date within
3036: -- the date range, effective date is:

Line 3033: hr_utility.trace('p_allocation_start_date='||fnd_date.date_to_displaydate(p_allocation_start_date));

3029: hr_utility.trace('p_vehicle_allocation_id='||p_vehicle_allocation_id);
3030: hr_utility.trace('p_vehicle_repository_id='||p_vehicle_repository_id);
3031: hr_utility.trace('p_action_flag='||p_action_flag);
3032: hr_utility.trace('p_fuel_type_change_date='||fnd_date.date_to_displaydate(p_fuel_type_change_date));
3033: hr_utility.trace('p_allocation_start_date='||fnd_date.date_to_displaydate(p_allocation_start_date));
3034: hr_utility.trace('p_allocation_end_date='||fnd_date.date_to_displaydate(p_allocation_end_date));
3035: -- Get data as of the action date within
3036: -- the date range, effective date is:
3037: IF p_action_flag = 'F' THEN

Line 3034: hr_utility.trace('p_allocation_end_date='||fnd_date.date_to_displaydate(p_allocation_end_date));

3030: hr_utility.trace('p_vehicle_repository_id='||p_vehicle_repository_id);
3031: hr_utility.trace('p_action_flag='||p_action_flag);
3032: hr_utility.trace('p_fuel_type_change_date='||fnd_date.date_to_displaydate(p_fuel_type_change_date));
3033: hr_utility.trace('p_allocation_start_date='||fnd_date.date_to_displaydate(p_allocation_start_date));
3034: hr_utility.trace('p_allocation_end_date='||fnd_date.date_to_displaydate(p_allocation_end_date));
3035: -- Get data as of the action date within
3036: -- the date range, effective date is:
3037: IF p_action_flag = 'F' THEN
3038: -- Get data as of the fuel type change date

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

3041: l_eff_date := p_allocation_start_date;
3042: ELSIF p_action_flag = 'W' THEN
3043: l_eff_date := p_allocation_end_date;
3044: END IF;
3045: hr_utility.set_location(l_proc, 20);
3046: hr_utility.trace('l_eff_date='||fnd_date.date_to_displaydate(l_eff_date));
3047: --
3048: -- Get person details
3049: OPEN c_person(p_assignment_id);

Line 3046: hr_utility.trace('l_eff_date='||fnd_date.date_to_displaydate(l_eff_date));

3042: ELSIF p_action_flag = 'W' THEN
3043: l_eff_date := p_allocation_end_date;
3044: END IF;
3045: hr_utility.set_location(l_proc, 20);
3046: hr_utility.trace('l_eff_date='||fnd_date.date_to_displaydate(l_eff_date));
3047: --
3048: -- Get person details
3049: OPEN c_person(p_assignment_id);
3050: FETCH c_person INTO person_rec;

Line 3053: hr_utility.set_location(l_proc, 30);

3049: OPEN c_person(p_assignment_id);
3050: FETCH c_person INTO person_rec;
3051: CLOSE c_person;
3052: --
3053: hr_utility.set_location(l_proc, 30);
3054: -- Get Address Details
3055: OPEN c_addr(person_rec.person_id);
3056: FETCH c_addr INTO addr_rec;
3057: CLOSE c_addr;

Line 3059: hr_utility.set_location(l_proc, 40);

3055: OPEN c_addr(person_rec.person_id);
3056: FETCH c_addr INTO addr_rec;
3057: CLOSE c_addr;
3058: --
3059: hr_utility.set_location(l_proc, 40);
3060: -- Get Allocation details
3061: OPEN c_alloc;
3062: FETCH c_alloc INTO alloc_rec;
3063: CLOSE c_alloc;

Line 3065: hr_utility.set_location(l_proc, 50);

3061: OPEN c_alloc;
3062: FETCH c_alloc INTO alloc_rec;
3063: CLOSE c_alloc;
3064: --
3065: hr_utility.set_location(l_proc, 50);
3066: -- Get Car details
3067: OPEN c_car;
3068: FETCH c_car INTO car_rec;
3069: CLOSE c_car;

Line 3078: hr_utility.set_location(l_proc, 60);

3074: CLOSE c_interval_of_payment;
3075: -- Modification for the bug 9354919 ends here
3076:
3077: --
3078: hr_utility.set_location(l_proc, 60);
3079: ---------------------------------------------
3080: -- Archive Person and Address details --
3081: ---------------------------------------------
3082: hr_utility.trace('Person ID : ' || person_rec.person_id);

Line 3082: hr_utility.trace('Person ID : ' || person_rec.person_id);

3078: hr_utility.set_location(l_proc, 60);
3079: ---------------------------------------------
3080: -- Archive Person and Address details --
3081: ---------------------------------------------
3082: hr_utility.trace('Person ID : ' || person_rec.person_id);
3083: hr_utility.trace('Last Name : ' || person_rec.last_name);
3084: hr_utility.trace('First Nme : ' || person_rec.first_name);
3085: hr_utility.trace('Title : ' || person_rec.title);
3086: hr_utility.trace('NINO : ' || person_rec.national_identifier);

Line 3083: hr_utility.trace('Last Name : ' || person_rec.last_name);

3079: ---------------------------------------------
3080: -- Archive Person and Address details --
3081: ---------------------------------------------
3082: hr_utility.trace('Person ID : ' || person_rec.person_id);
3083: hr_utility.trace('Last Name : ' || person_rec.last_name);
3084: hr_utility.trace('First Nme : ' || person_rec.first_name);
3085: hr_utility.trace('Title : ' || person_rec.title);
3086: hr_utility.trace('NINO : ' || person_rec.national_identifier);
3087: hr_utility.trace('ADDR1 : ' || addr_rec.address_line1);

Line 3084: hr_utility.trace('First Nme : ' || person_rec.first_name);

3080: -- Archive Person and Address details --
3081: ---------------------------------------------
3082: hr_utility.trace('Person ID : ' || person_rec.person_id);
3083: hr_utility.trace('Last Name : ' || person_rec.last_name);
3084: hr_utility.trace('First Nme : ' || person_rec.first_name);
3085: hr_utility.trace('Title : ' || person_rec.title);
3086: hr_utility.trace('NINO : ' || person_rec.national_identifier);
3087: hr_utility.trace('ADDR1 : ' || addr_rec.address_line1);
3088: hr_utility.trace('ADDR1 : ' || addr_rec.address_line2);

Line 3085: hr_utility.trace('Title : ' || person_rec.title);

3081: ---------------------------------------------
3082: hr_utility.trace('Person ID : ' || person_rec.person_id);
3083: hr_utility.trace('Last Name : ' || person_rec.last_name);
3084: hr_utility.trace('First Nme : ' || person_rec.first_name);
3085: hr_utility.trace('Title : ' || person_rec.title);
3086: hr_utility.trace('NINO : ' || person_rec.national_identifier);
3087: hr_utility.trace('ADDR1 : ' || addr_rec.address_line1);
3088: hr_utility.trace('ADDR1 : ' || addr_rec.address_line2);
3089: hr_utility.trace('ADDR1 : ' || addr_rec.address_line3);

Line 3086: hr_utility.trace('NINO : ' || person_rec.national_identifier);

3082: hr_utility.trace('Person ID : ' || person_rec.person_id);
3083: hr_utility.trace('Last Name : ' || person_rec.last_name);
3084: hr_utility.trace('First Nme : ' || person_rec.first_name);
3085: hr_utility.trace('Title : ' || person_rec.title);
3086: hr_utility.trace('NINO : ' || person_rec.national_identifier);
3087: hr_utility.trace('ADDR1 : ' || addr_rec.address_line1);
3088: hr_utility.trace('ADDR1 : ' || addr_rec.address_line2);
3089: hr_utility.trace('ADDR1 : ' || addr_rec.address_line3);
3090: hr_utility.trace('City/Town : ' || addr_rec.town_or_city);

Line 3087: hr_utility.trace('ADDR1 : ' || addr_rec.address_line1);

3083: hr_utility.trace('Last Name : ' || person_rec.last_name);
3084: hr_utility.trace('First Nme : ' || person_rec.first_name);
3085: hr_utility.trace('Title : ' || person_rec.title);
3086: hr_utility.trace('NINO : ' || person_rec.national_identifier);
3087: hr_utility.trace('ADDR1 : ' || addr_rec.address_line1);
3088: hr_utility.trace('ADDR1 : ' || addr_rec.address_line2);
3089: hr_utility.trace('ADDR1 : ' || addr_rec.address_line3);
3090: hr_utility.trace('City/Town : ' || addr_rec.town_or_city);
3091: hr_utility.trace('Regioin_1 : ' || addr_rec.region_1);

Line 3088: hr_utility.trace('ADDR1 : ' || addr_rec.address_line2);

3084: hr_utility.trace('First Nme : ' || person_rec.first_name);
3085: hr_utility.trace('Title : ' || person_rec.title);
3086: hr_utility.trace('NINO : ' || person_rec.national_identifier);
3087: hr_utility.trace('ADDR1 : ' || addr_rec.address_line1);
3088: hr_utility.trace('ADDR1 : ' || addr_rec.address_line2);
3089: hr_utility.trace('ADDR1 : ' || addr_rec.address_line3);
3090: hr_utility.trace('City/Town : ' || addr_rec.town_or_city);
3091: hr_utility.trace('Regioin_1 : ' || addr_rec.region_1);
3092: hr_utility.trace('Postal : ' || addr_rec.postal_code);

Line 3089: hr_utility.trace('ADDR1 : ' || addr_rec.address_line3);

3085: hr_utility.trace('Title : ' || person_rec.title);
3086: hr_utility.trace('NINO : ' || person_rec.national_identifier);
3087: hr_utility.trace('ADDR1 : ' || addr_rec.address_line1);
3088: hr_utility.trace('ADDR1 : ' || addr_rec.address_line2);
3089: hr_utility.trace('ADDR1 : ' || addr_rec.address_line3);
3090: hr_utility.trace('City/Town : ' || addr_rec.town_or_city);
3091: hr_utility.trace('Regioin_1 : ' || addr_rec.region_1);
3092: hr_utility.trace('Postal : ' || addr_rec.postal_code);
3093: hr_utility.trace('DOB : ' || fnd_date.date_to_canonical(person_rec.date_of_birth)); --For Bug 6652235

Line 3090: hr_utility.trace('City/Town : ' || addr_rec.town_or_city);

3086: hr_utility.trace('NINO : ' || person_rec.national_identifier);
3087: hr_utility.trace('ADDR1 : ' || addr_rec.address_line1);
3088: hr_utility.trace('ADDR1 : ' || addr_rec.address_line2);
3089: hr_utility.trace('ADDR1 : ' || addr_rec.address_line3);
3090: hr_utility.trace('City/Town : ' || addr_rec.town_or_city);
3091: hr_utility.trace('Regioin_1 : ' || addr_rec.region_1);
3092: hr_utility.trace('Postal : ' || addr_rec.postal_code);
3093: hr_utility.trace('DOB : ' || fnd_date.date_to_canonical(person_rec.date_of_birth)); --For Bug 6652235
3094: hr_utility.trace('Gender : ' || person_rec.sex); --For Bug 6652235

Line 3091: hr_utility.trace('Regioin_1 : ' || addr_rec.region_1);

3087: hr_utility.trace('ADDR1 : ' || addr_rec.address_line1);
3088: hr_utility.trace('ADDR1 : ' || addr_rec.address_line2);
3089: hr_utility.trace('ADDR1 : ' || addr_rec.address_line3);
3090: hr_utility.trace('City/Town : ' || addr_rec.town_or_city);
3091: hr_utility.trace('Regioin_1 : ' || addr_rec.region_1);
3092: hr_utility.trace('Postal : ' || addr_rec.postal_code);
3093: hr_utility.trace('DOB : ' || fnd_date.date_to_canonical(person_rec.date_of_birth)); --For Bug 6652235
3094: hr_utility.trace('Gender : ' || person_rec.sex); --For Bug 6652235
3095:

Line 3092: hr_utility.trace('Postal : ' || addr_rec.postal_code);

3088: hr_utility.trace('ADDR1 : ' || addr_rec.address_line2);
3089: hr_utility.trace('ADDR1 : ' || addr_rec.address_line3);
3090: hr_utility.trace('City/Town : ' || addr_rec.town_or_city);
3091: hr_utility.trace('Regioin_1 : ' || addr_rec.region_1);
3092: hr_utility.trace('Postal : ' || addr_rec.postal_code);
3093: hr_utility.trace('DOB : ' || fnd_date.date_to_canonical(person_rec.date_of_birth)); --For Bug 6652235
3094: hr_utility.trace('Gender : ' || person_rec.sex); --For Bug 6652235
3095:
3096: pay_action_information_api.create_action_information (

Line 3093: hr_utility.trace('DOB : ' || fnd_date.date_to_canonical(person_rec.date_of_birth)); --For Bug 6652235

3089: hr_utility.trace('ADDR1 : ' || addr_rec.address_line3);
3090: hr_utility.trace('City/Town : ' || addr_rec.town_or_city);
3091: hr_utility.trace('Regioin_1 : ' || addr_rec.region_1);
3092: hr_utility.trace('Postal : ' || addr_rec.postal_code);
3093: hr_utility.trace('DOB : ' || fnd_date.date_to_canonical(person_rec.date_of_birth)); --For Bug 6652235
3094: hr_utility.trace('Gender : ' || person_rec.sex); --For Bug 6652235
3095:
3096: pay_action_information_api.create_action_information (
3097: p_action_information_id => l_action_info_id

Line 3094: hr_utility.trace('Gender : ' || person_rec.sex); --For Bug 6652235

3090: hr_utility.trace('City/Town : ' || addr_rec.town_or_city);
3091: hr_utility.trace('Regioin_1 : ' || addr_rec.region_1);
3092: hr_utility.trace('Postal : ' || addr_rec.postal_code);
3093: hr_utility.trace('DOB : ' || fnd_date.date_to_canonical(person_rec.date_of_birth)); --For Bug 6652235
3094: hr_utility.trace('Gender : ' || person_rec.sex); --For Bug 6652235
3095:
3096: pay_action_information_api.create_action_information (
3097: p_action_information_id => l_action_info_id
3098: , p_action_context_id => p_asg_act_id

Line 3120: hr_utility.set_location(l_proc, 70);

3116: , p_action_information11 => upper(addr_rec.postal_code)
3117: , p_action_information12 => fnd_date.date_to_canonical(person_rec.date_of_birth) --For Bug 6652235
3118: , p_action_information13 => upper(person_rec.sex)); --For Bug 6652235
3119: --
3120: hr_utility.set_location(l_proc, 70);
3121: ---------------------------------------------
3122: -- Archive Vehicle Allocation Details --
3123: ---------------------------------------------
3124: IF g_effective_date <

Line 3139: hr_utility.set_location(l_proc, 80);

3135: l_tax_year_start := fnd_date.canonical_to_date(
3136: to_char(g_effective_date, 'YYYY')||'04/06');
3137: END IF;
3138: --
3139: hr_utility.set_location(l_proc, 80);
3140: --
3141: IF p_allocation_start_date >= l_tax_year_start THEN
3142: -- Car was first allocated in this tax year
3143: -- Archive Date Car First Available

Line 3149: hr_utility.set_location(l_proc, 90);

3145: ELSE
3146: l_date_first_avail := NULL;
3147: END IF;
3148: --
3149: hr_utility.set_location(l_proc, 90);
3150: hr_utility.trace('l_date_first_avail='||l_date_first_avail);
3151: --
3152: ---------------------------------------------
3153: -- Check whether it's the primary car of --

Line 3150: hr_utility.trace('l_date_first_avail='||l_date_first_avail);

3146: l_date_first_avail := NULL;
3147: END IF;
3148: --
3149: hr_utility.set_location(l_proc, 90);
3150: hr_utility.trace('l_date_first_avail='||l_date_first_avail);
3151: --
3152: ---------------------------------------------
3153: -- Check whether it's the primary car of --
3154: -- the employee --

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

3158: OPEN c_first_asg(p_assignment_id, l_eff_date);
3159: FETCH c_first_asg INTO first_asg_rec;
3160: CLOSE c_first_asg;
3161: --
3162: hr_utility.set_location(l_proc, 100);
3163: --
3164: -- Get primary car allocation of the
3165: -- first assignment of this person
3166: -- in this tax ref

Line 3171: hr_utility.set_location(l_proc, 110);

3167: OPEN c_primary_car(first_asg_rec.assignment_id, l_eff_date);
3168: FETCH c_primary_car INTO primary_car_rec;
3169: CLOSE c_primary_car;
3170: --
3171: hr_utility.set_location(l_proc, 110);
3172: --
3173: IF primary_car_rec.vehicle_allocation_id
3174: = p_vehicle_allocation_id THEN
3175: -- This is the primary car allocation

Line 3184: hr_utility.set_location(l_proc, 120);

3180: -- therefore mark it as a second car.
3181: l_second_car_flag := 'Y';
3182: END IF;
3183: --
3184: hr_utility.set_location(l_proc, 120);
3185: hr_utility.trace('l_second_car_flag='||l_second_car_flag);
3186: --
3187: -- To indicate the Fuel Type change date in EDI File. Also checked
3188: -- that this is not Second/Further car.

Line 3185: hr_utility.trace('l_second_car_flag='||l_second_car_flag);

3181: l_second_car_flag := 'Y';
3182: END IF;
3183: --
3184: hr_utility.set_location(l_proc, 120);
3185: hr_utility.trace('l_second_car_flag='||l_second_car_flag);
3186: --
3187: -- To indicate the Fuel Type change date in EDI File. Also checked
3188: -- that this is not Second/Further car.
3189: IF NOT(p_fuel_type_Change_date is NULL) AND p_action_flag = 'F' THEN

Line 3191: hr_utility.trace('p_fuel_type_change_date='||p_fuel_type_Change_date);

3187: -- To indicate the Fuel Type change date in EDI File. Also checked
3188: -- that this is not Second/Further car.
3189: IF NOT(p_fuel_type_Change_date is NULL) AND p_action_flag = 'F' THEN
3190: l_date_first_avail := fnd_date.date_to_canonical(p_fuel_type_Change_date);
3191: hr_utility.trace('p_fuel_type_change_date='||p_fuel_type_Change_date);
3192: END IF;
3193:
3194:
3195: IF p_action_flag = 'N' THEN

Line 3196: hr_utility.set_location(l_proc, 130);

3192: END IF;
3193:
3194:
3195: IF p_action_flag = 'N' THEN
3196: hr_utility.set_location(l_proc, 130);
3197: --
3198: pay_action_information_api.create_action_information (
3199: p_action_information_id => l_action_info_id
3200: , p_action_context_id => p_asg_act_id

Line 3227: hr_utility.set_location(l_proc, 140);

3223: , p_action_information16 => upper(car_rec.make || ' ' || car_rec.model)
3224: , p_action_information17 => to_char(car_rec.engine_capacity_in_cc)
3225: , p_action_information22 => nvl(l_interval_of_payment,'Y')); -- Added for the bug 9354919
3226: --
3227: hr_utility.set_location(l_proc, 140);
3228: ELSIF p_action_flag = 'R' THEN
3229: hr_utility.set_location(l_proc, 150);
3230: --
3231: pay_action_information_api.create_action_information (

Line 3229: hr_utility.set_location(l_proc, 150);

3225: , p_action_information22 => nvl(l_interval_of_payment,'Y')); -- Added for the bug 9354919
3226: --
3227: hr_utility.set_location(l_proc, 140);
3228: ELSIF p_action_flag = 'R' THEN
3229: hr_utility.set_location(l_proc, 150);
3230: --
3231: pay_action_information_api.create_action_information (
3232: p_action_information_id => l_action_info_id
3233: , p_action_context_id => p_asg_act_id

Line 3265: hr_utility.set_location(l_proc, 160);

3261: , p_action_information21 => fnd_date.date_to_canonical(prior_prim_car_rec.effective_end_date)
3262: , p_action_information22 => nvl(l_interval_of_payment,'Y') -- Added for the bug 9354919
3263: );
3264: --
3265: hr_utility.set_location(l_proc, 160);
3266: ELSIF p_action_flag = 'W' THEN
3267: hr_utility.set_location(l_proc, 170);
3268: --
3269: pay_action_information_api.create_action_information (

Line 3267: hr_utility.set_location(l_proc, 170);

3263: );
3264: --
3265: hr_utility.set_location(l_proc, 160);
3266: ELSIF p_action_flag = 'W' THEN
3267: hr_utility.set_location(l_proc, 170);
3268: --
3269: pay_action_information_api.create_action_information (
3270: p_action_information_id => l_action_info_id
3271: , p_action_context_id => p_asg_act_id

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

3295: , p_action_information17 => to_char(car_rec.engine_capacity_in_cc)
3296: , p_action_information22 => nvl(l_interval_of_payment,'Y') -- Added for the bug 9354919
3297: );
3298: --
3299: hr_utility.set_location(l_proc, 180);
3300: ELSIF p_action_flag = 'F' THEN
3301: hr_utility.set_location(l_proc, 190);
3302: --
3303: pay_action_information_api.create_action_information (

Line 3301: hr_utility.set_location(l_proc, 190);

3297: );
3298: --
3299: hr_utility.set_location(l_proc, 180);
3300: ELSIF p_action_flag = 'F' THEN
3301: hr_utility.set_location(l_proc, 190);
3302: --
3303: pay_action_information_api.create_action_information (
3304: p_action_information_id => l_action_info_id
3305: , p_action_context_id => p_asg_act_id

Line 3337: hr_utility.set_location(l_proc, 200);

3333: , p_action_information21 => fnd_date.date_to_canonical(p_fuel_type_change_date-1)
3334: , p_action_information22 => nvl(l_interval_of_payment,'Y') -- Added for the bug 9354919
3335: );
3336: --
3337: hr_utility.set_location(l_proc, 200);
3338: END IF;
3339: --
3340: hr_utility.set_location('Leaving '||l_proc, 300);
3341: END archive_allocation_action;

Line 3340: hr_utility.set_location('Leaving '||l_proc, 300);

3336: --
3337: hr_utility.set_location(l_proc, 200);
3338: END IF;
3339: --
3340: hr_utility.set_location('Leaving '||l_proc, 300);
3341: END archive_allocation_action;
3342:
3343:
3344:

Line 3379: --hr_utility.trace_on(null, 'KTHAMPAN');

3375: l_action_flag VARCHAR2(1);
3376: l_archived_flag VARCHAR2(1);
3377: --
3378: BEGIN
3379: --hr_utility.trace_on(null, 'KTHAMPAN');
3380: hr_utility.set_location('Entering '||l_proc, 10);
3381: --
3382: For asg_rec IN c_asg
3383: LOOP

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

3376: l_archived_flag VARCHAR2(1);
3377: --
3378: BEGIN
3379: --hr_utility.trace_on(null, 'KTHAMPAN');
3380: hr_utility.set_location('Entering '||l_proc, 10);
3381: --
3382: For asg_rec IN c_asg
3383: LOOP
3384: -- Loop through all assignments

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

3381: --
3382: For asg_rec IN c_asg
3383: LOOP
3384: -- Loop through all assignments
3385: hr_utility.set_location(l_proc, 20);
3386: hr_utility.trace(l_proc||': assignment_id='||asg_rec.assignment_id);
3387: hr_utility.trace(l_proc||': asg_min_start_date='||fnd_date.date_to_displaydate(asg_rec.asg_min_start_date));
3388: hr_utility.trace(l_proc||': asg_max_end_date='||fnd_date.date_to_displaydate(asg_rec.asg_max_end_date));
3389: --

Line 3386: hr_utility.trace(l_proc||': assignment_id='||asg_rec.assignment_id);

3382: For asg_rec IN c_asg
3383: LOOP
3384: -- Loop through all assignments
3385: hr_utility.set_location(l_proc, 20);
3386: hr_utility.trace(l_proc||': assignment_id='||asg_rec.assignment_id);
3387: hr_utility.trace(l_proc||': asg_min_start_date='||fnd_date.date_to_displaydate(asg_rec.asg_min_start_date));
3388: hr_utility.trace(l_proc||': asg_max_end_date='||fnd_date.date_to_displaydate(asg_rec.asg_max_end_date));
3389: --
3390: FOR alc_rec IN c_allocations(asg_rec.assignment_id) LOOP

Line 3387: hr_utility.trace(l_proc||': asg_min_start_date='||fnd_date.date_to_displaydate(asg_rec.asg_min_start_date));

3383: LOOP
3384: -- Loop through all assignments
3385: hr_utility.set_location(l_proc, 20);
3386: hr_utility.trace(l_proc||': assignment_id='||asg_rec.assignment_id);
3387: hr_utility.trace(l_proc||': asg_min_start_date='||fnd_date.date_to_displaydate(asg_rec.asg_min_start_date));
3388: hr_utility.trace(l_proc||': asg_max_end_date='||fnd_date.date_to_displaydate(asg_rec.asg_max_end_date));
3389: --
3390: FOR alc_rec IN c_allocations(asg_rec.assignment_id) LOOP
3391: -- Loop through all vehicle allocations

Line 3388: hr_utility.trace(l_proc||': asg_max_end_date='||fnd_date.date_to_displaydate(asg_rec.asg_max_end_date));

3384: -- Loop through all assignments
3385: hr_utility.set_location(l_proc, 20);
3386: hr_utility.trace(l_proc||': assignment_id='||asg_rec.assignment_id);
3387: hr_utility.trace(l_proc||': asg_min_start_date='||fnd_date.date_to_displaydate(asg_rec.asg_min_start_date));
3388: hr_utility.trace(l_proc||': asg_max_end_date='||fnd_date.date_to_displaydate(asg_rec.asg_max_end_date));
3389: --
3390: FOR alc_rec IN c_allocations(asg_rec.assignment_id) LOOP
3391: -- Loop through all vehicle allocations
3392: -- over the date range

Line 3393: hr_utility.set_location(l_proc, 30);

3389: --
3390: FOR alc_rec IN c_allocations(asg_rec.assignment_id) LOOP
3391: -- Loop through all vehicle allocations
3392: -- over the date range
3393: hr_utility.set_location(l_proc, 30);
3394: hr_utility.trace(l_proc||': vehicle_allocation_id='||alc_rec.vehicle_allocation_id);
3395: hr_utility.trace(l_proc||': usage_type='||alc_rec.usage_type);
3396: --
3397: L_action_flag := 'X';

Line 3394: hr_utility.trace(l_proc||': vehicle_allocation_id='||alc_rec.vehicle_allocation_id);

3390: FOR alc_rec IN c_allocations(asg_rec.assignment_id) LOOP
3391: -- Loop through all vehicle allocations
3392: -- over the date range
3393: hr_utility.set_location(l_proc, 30);
3394: hr_utility.trace(l_proc||': vehicle_allocation_id='||alc_rec.vehicle_allocation_id);
3395: hr_utility.trace(l_proc||': usage_type='||alc_rec.usage_type);
3396: --
3397: L_action_flag := 'X';
3398: l_archived_flag := 'Y';

Line 3395: hr_utility.trace(l_proc||': usage_type='||alc_rec.usage_type);

3391: -- Loop through all vehicle allocations
3392: -- over the date range
3393: hr_utility.set_location(l_proc, 30);
3394: hr_utility.trace(l_proc||': vehicle_allocation_id='||alc_rec.vehicle_allocation_id);
3395: hr_utility.trace(l_proc||': usage_type='||alc_rec.usage_type);
3396: --
3397: L_action_flag := 'X';
3398: l_archived_flag := 'Y';
3399: --

Line 3404: hr_utility.set_location(l_proc, 40);

3400: OPEN c_alloc_dates(alc_rec.vehicle_allocation_id);
3401: FETCH c_alloc_dates INTO alc_dates_rec;
3402: CLOSE c_alloc_dates;
3403: --
3404: hr_utility.set_location(l_proc, 40);
3405: hr_utility.trace(l_proc||': min_start_date='|| fnd_date.date_to_displaydate(alc_dates_rec.min_start_date));
3406: hr_utility.trace(l_proc||': max_end_date='|| fnd_date.date_to_displaydate(alc_dates_rec.max_end_date));
3407: --
3408: -- Check whether vehicle was allocated or

Line 3405: hr_utility.trace(l_proc||': min_start_date='|| fnd_date.date_to_displaydate(alc_dates_rec.min_start_date));

3401: FETCH c_alloc_dates INTO alc_dates_rec;
3402: CLOSE c_alloc_dates;
3403: --
3404: hr_utility.set_location(l_proc, 40);
3405: hr_utility.trace(l_proc||': min_start_date='|| fnd_date.date_to_displaydate(alc_dates_rec.min_start_date));
3406: hr_utility.trace(l_proc||': max_end_date='|| fnd_date.date_to_displaydate(alc_dates_rec.max_end_date));
3407: --
3408: -- Check whether vehicle was allocated or
3409: -- Withdrawn within the date range also

Line 3406: hr_utility.trace(l_proc||': max_end_date='|| fnd_date.date_to_displaydate(alc_dates_rec.max_end_date));

3402: CLOSE c_alloc_dates;
3403: --
3404: hr_utility.set_location(l_proc, 40);
3405: hr_utility.trace(l_proc||': min_start_date='|| fnd_date.date_to_displaydate(alc_dates_rec.min_start_date));
3406: hr_utility.trace(l_proc||': max_end_date='|| fnd_date.date_to_displaydate(alc_dates_rec.max_end_date));
3407: --
3408: -- Check whether vehicle was allocated or
3409: -- Withdrawn within the date range also
3410: -- check that this allocation or withdrawal

Line 3428: hr_utility.set_location(l_proc, 50);

3424: OPEN c_first_asg(asg_rec.assignment_id, alc_dates_rec.min_start_date);
3425: FETCH c_first_asg INTO first_asg_rec;
3426: CLOSE c_first_asg;
3427: --
3428: hr_utility.set_location(l_proc, 50);
3429: hr_utility.trace(l_proc||': First Assignment='|| first_asg_rec.assignment_id);
3430: -- Get primary car allocation of the
3431: -- first assignment of this person
3432: -- in this tax ref

Line 3429: hr_utility.trace(l_proc||': First Assignment='|| first_asg_rec.assignment_id);

3425: FETCH c_first_asg INTO first_asg_rec;
3426: CLOSE c_first_asg;
3427: --
3428: hr_utility.set_location(l_proc, 50);
3429: hr_utility.trace(l_proc||': First Assignment='|| first_asg_rec.assignment_id);
3430: -- Get primary car allocation of the
3431: -- first assignment of this person
3432: -- in this tax ref
3433: OPEN c_primary_car(first_asg_rec.assignment_id, alc_dates_rec.min_start_date);

Line 3437: hr_utility.set_location(l_proc, 60);

3433: OPEN c_primary_car(first_asg_rec.assignment_id, alc_dates_rec.min_start_date);
3434: FETCH c_primary_car INTO primary_car_rec;
3435: CLOSE c_primary_car;
3436: --
3437: hr_utility.set_location(l_proc, 60);
3438: hr_utility.trace(l_proc||': Primary Car Allocation='|| primary_car_rec.vehicle_allocation_id);
3439: --
3440: IF primary_car_rec.vehicle_allocation_id = alc_rec.vehicle_allocation_id THEN
3441: -- This is the first car allocation

Line 3438: hr_utility.trace(l_proc||': Primary Car Allocation='|| primary_car_rec.vehicle_allocation_id);

3434: FETCH c_primary_car INTO primary_car_rec;
3435: CLOSE c_primary_car;
3436: --
3437: hr_utility.set_location(l_proc, 60);
3438: hr_utility.trace(l_proc||': Primary Car Allocation='|| primary_car_rec.vehicle_allocation_id);
3439: --
3440: IF primary_car_rec.vehicle_allocation_id = alc_rec.vehicle_allocation_id THEN
3441: -- This is the first car allocation
3442: -- of this employee in this tax ref

Line 3453: hr_utility.set_location(l_proc, 70);

3449: ELSE
3450: L_action_flag := 'N';
3451: END IF;
3452: --
3453: hr_utility.set_location(l_proc, 70);
3454: hr_utility.trace(l_proc||': l_action_flag='|| l_action_flag);
3455: --
3456: CLOSE c_prior_prim_car;
3457: ELSE

Line 3454: hr_utility.trace(l_proc||': l_action_flag='|| l_action_flag);

3450: L_action_flag := 'N';
3451: END IF;
3452: --
3453: hr_utility.set_location(l_proc, 70);
3454: hr_utility.trace(l_proc||': l_action_flag='|| l_action_flag);
3455: --
3456: CLOSE c_prior_prim_car;
3457: ELSE
3458: -- Not the first car of the employee

Line 3463: hr_utility.set_location(l_proc, 80);

3459: -- report this as new car
3460: L_action_flag := 'N';
3461: END IF;
3462: --
3463: hr_utility.set_location(l_proc, 80);
3464: hr_utility.trace(l_proc||': l_action_flag='|| l_action_flag);
3465: --
3466: ELSE
3467: -- Not a primary car therefore mark

Line 3464: hr_utility.trace(l_proc||': l_action_flag='|| l_action_flag);

3460: L_action_flag := 'N';
3461: END IF;
3462: --
3463: hr_utility.set_location(l_proc, 80);
3464: hr_utility.trace(l_proc||': l_action_flag='|| l_action_flag);
3465: --
3466: ELSE
3467: -- Not a primary car therefore mark
3468: -- it as new car allocation action

Line 3472: hr_utility.set_location(l_proc, 90);

3468: -- it as new car allocation action
3469: l_action_flag := 'N';
3470: END IF;
3471: --
3472: hr_utility.set_location(l_proc, 90);
3473: hr_utility.trace(l_proc||': l_action_flag='|| l_action_flag);
3474: --
3475: IF L_action_flag <> 'X' THEN
3476: -- Check whether this allocation action

Line 3473: hr_utility.trace(l_proc||': l_action_flag='|| l_action_flag);

3469: l_action_flag := 'N';
3470: END IF;
3471: --
3472: hr_utility.set_location(l_proc, 90);
3473: hr_utility.trace(l_proc||': l_action_flag='|| l_action_flag);
3474: --
3475: IF L_action_flag <> 'X' THEN
3476: -- Check whether this allocation action
3477: -- has been already archived

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

3480: alc_rec.vehicle_allocation_id,
3481: alc_dates_rec.min_start_date,
3482: l_action_flag);
3483: --
3484: hr_utility.set_location(l_proc, 100);
3485: hr_utility.trace(l_proc||': l_archived_flag='|| l_archived_flag);
3486: --
3487: IF l_archived_flag = 'N' THEN
3488: -- Action has not been archived already

Line 3485: hr_utility.trace(l_proc||': l_archived_flag='|| l_archived_flag);

3481: alc_dates_rec.min_start_date,
3482: l_action_flag);
3483: --
3484: hr_utility.set_location(l_proc, 100);
3485: hr_utility.trace(l_proc||': l_archived_flag='|| l_archived_flag);
3486: --
3487: IF l_archived_flag = 'N' THEN
3488: -- Action has not been archived already
3489: -- therefore archive it.

Line 3490: hr_utility.set_location(l_proc, 105);

3486: --
3487: IF l_archived_flag = 'N' THEN
3488: -- Action has not been archived already
3489: -- therefore archive it.
3490: hr_utility.set_location(l_proc, 105);
3491: hr_utility.trace(l_proc||': p_assactid='|| p_assactid);
3492: hr_utility.trace(l_proc||': vehicle_allocation_id='|| alc_rec.vehicle_allocation_id);
3493: hr_utility.trace(l_proc||': vehicle_repository_id='|| alc_rec.vehicle_repository_id);
3494: hr_utility.trace(l_proc||': l_action_flag='|| l_action_flag);

Line 3491: hr_utility.trace(l_proc||': p_assactid='|| p_assactid);

3487: IF l_archived_flag = 'N' THEN
3488: -- Action has not been archived already
3489: -- therefore archive it.
3490: hr_utility.set_location(l_proc, 105);
3491: hr_utility.trace(l_proc||': p_assactid='|| p_assactid);
3492: hr_utility.trace(l_proc||': vehicle_allocation_id='|| alc_rec.vehicle_allocation_id);
3493: hr_utility.trace(l_proc||': vehicle_repository_id='|| alc_rec.vehicle_repository_id);
3494: hr_utility.trace(l_proc||': l_action_flag='|| l_action_flag);
3495: hr_utility.trace(l_proc||': alc_dates_rec.min_start_date='|| fnd_date.date_to_displaydate(alc_dates_rec.min_start_date));

Line 3492: hr_utility.trace(l_proc||': vehicle_allocation_id='|| alc_rec.vehicle_allocation_id);

3488: -- Action has not been archived already
3489: -- therefore archive it.
3490: hr_utility.set_location(l_proc, 105);
3491: hr_utility.trace(l_proc||': p_assactid='|| p_assactid);
3492: hr_utility.trace(l_proc||': vehicle_allocation_id='|| alc_rec.vehicle_allocation_id);
3493: hr_utility.trace(l_proc||': vehicle_repository_id='|| alc_rec.vehicle_repository_id);
3494: hr_utility.trace(l_proc||': l_action_flag='|| l_action_flag);
3495: hr_utility.trace(l_proc||': alc_dates_rec.min_start_date='|| fnd_date.date_to_displaydate(alc_dates_rec.min_start_date));
3496: hr_utility.trace(l_proc||': alc_dates_rec.max_end_date='|| fnd_date.date_to_displaydate(alc_dates_rec.max_end_date));

Line 3493: hr_utility.trace(l_proc||': vehicle_repository_id='|| alc_rec.vehicle_repository_id);

3489: -- therefore archive it.
3490: hr_utility.set_location(l_proc, 105);
3491: hr_utility.trace(l_proc||': p_assactid='|| p_assactid);
3492: hr_utility.trace(l_proc||': vehicle_allocation_id='|| alc_rec.vehicle_allocation_id);
3493: hr_utility.trace(l_proc||': vehicle_repository_id='|| alc_rec.vehicle_repository_id);
3494: hr_utility.trace(l_proc||': l_action_flag='|| l_action_flag);
3495: hr_utility.trace(l_proc||': alc_dates_rec.min_start_date='|| fnd_date.date_to_displaydate(alc_dates_rec.min_start_date));
3496: hr_utility.trace(l_proc||': alc_dates_rec.max_end_date='|| fnd_date.date_to_displaydate(alc_dates_rec.max_end_date));
3497: --

Line 3494: hr_utility.trace(l_proc||': l_action_flag='|| l_action_flag);

3490: hr_utility.set_location(l_proc, 105);
3491: hr_utility.trace(l_proc||': p_assactid='|| p_assactid);
3492: hr_utility.trace(l_proc||': vehicle_allocation_id='|| alc_rec.vehicle_allocation_id);
3493: hr_utility.trace(l_proc||': vehicle_repository_id='|| alc_rec.vehicle_repository_id);
3494: hr_utility.trace(l_proc||': l_action_flag='|| l_action_flag);
3495: hr_utility.trace(l_proc||': alc_dates_rec.min_start_date='|| fnd_date.date_to_displaydate(alc_dates_rec.min_start_date));
3496: hr_utility.trace(l_proc||': alc_dates_rec.max_end_date='|| fnd_date.date_to_displaydate(alc_dates_rec.max_end_date));
3497: --
3498: archive_allocation_action(p_assignment_id => asg_rec.assignment_id,

Line 3495: hr_utility.trace(l_proc||': alc_dates_rec.min_start_date='|| fnd_date.date_to_displaydate(alc_dates_rec.min_start_date));

3491: hr_utility.trace(l_proc||': p_assactid='|| p_assactid);
3492: hr_utility.trace(l_proc||': vehicle_allocation_id='|| alc_rec.vehicle_allocation_id);
3493: hr_utility.trace(l_proc||': vehicle_repository_id='|| alc_rec.vehicle_repository_id);
3494: hr_utility.trace(l_proc||': l_action_flag='|| l_action_flag);
3495: hr_utility.trace(l_proc||': alc_dates_rec.min_start_date='|| fnd_date.date_to_displaydate(alc_dates_rec.min_start_date));
3496: hr_utility.trace(l_proc||': alc_dates_rec.max_end_date='|| fnd_date.date_to_displaydate(alc_dates_rec.max_end_date));
3497: --
3498: archive_allocation_action(p_assignment_id => asg_rec.assignment_id,
3499: p_asg_act_id => p_assactid,

Line 3496: hr_utility.trace(l_proc||': alc_dates_rec.max_end_date='|| fnd_date.date_to_displaydate(alc_dates_rec.max_end_date));

3492: hr_utility.trace(l_proc||': vehicle_allocation_id='|| alc_rec.vehicle_allocation_id);
3493: hr_utility.trace(l_proc||': vehicle_repository_id='|| alc_rec.vehicle_repository_id);
3494: hr_utility.trace(l_proc||': l_action_flag='|| l_action_flag);
3495: hr_utility.trace(l_proc||': alc_dates_rec.min_start_date='|| fnd_date.date_to_displaydate(alc_dates_rec.min_start_date));
3496: hr_utility.trace(l_proc||': alc_dates_rec.max_end_date='|| fnd_date.date_to_displaydate(alc_dates_rec.max_end_date));
3497: --
3498: archive_allocation_action(p_assignment_id => asg_rec.assignment_id,
3499: p_asg_act_id => p_assactid,
3500: p_vehicle_allocation_id => alc_rec.vehicle_allocation_id,

Line 3527: hr_utility.set_location(l_proc, 50);

3523: OPEN c_first_asg(asg_rec.assignment_id, alc_dates_rec.max_end_date);
3524: FETCH c_first_asg INTO first_asg_rec;
3525: CLOSE c_first_asg;
3526: --
3527: hr_utility.set_location(l_proc, 50);
3528: hr_utility.trace(l_proc||': First Assignment='|| first_asg_rec.assignment_id);
3529: -- Get primary car allocation of the
3530: -- first assignment of this person
3531: -- in this tax ref

Line 3528: hr_utility.trace(l_proc||': First Assignment='|| first_asg_rec.assignment_id);

3524: FETCH c_first_asg INTO first_asg_rec;
3525: CLOSE c_first_asg;
3526: --
3527: hr_utility.set_location(l_proc, 50);
3528: hr_utility.trace(l_proc||': First Assignment='|| first_asg_rec.assignment_id);
3529: -- Get primary car allocation of the
3530: -- first assignment of this person
3531: -- in this tax ref
3532: OPEN c_primary_car(first_asg_rec.assignment_id, alc_dates_rec.max_end_date);

Line 3536: hr_utility.set_location(l_proc, 60);

3532: OPEN c_primary_car(first_asg_rec.assignment_id, alc_dates_rec.max_end_date);
3533: FETCH c_primary_car INTO primary_car_rec;
3534: CLOSE c_primary_car;
3535: --
3536: hr_utility.set_location(l_proc, 60);
3537: hr_utility.trace(l_proc||': Primary Car Allocation='|| primary_car_rec.vehicle_allocation_id);
3538: --
3539: IF primary_car_rec.vehicle_allocation_id = alc_rec.vehicle_allocation_id THEN
3540: --

Line 3537: hr_utility.trace(l_proc||': Primary Car Allocation='|| primary_car_rec.vehicle_allocation_id);

3533: FETCH c_primary_car INTO primary_car_rec;
3534: CLOSE c_primary_car;
3535: --
3536: hr_utility.set_location(l_proc, 60);
3537: hr_utility.trace(l_proc||': Primary Car Allocation='|| primary_car_rec.vehicle_allocation_id);
3538: --
3539: IF primary_car_rec.vehicle_allocation_id = alc_rec.vehicle_allocation_id THEN
3540: --
3541: OPEN c_next_prim_car(asg_rec.assignment_id, Alc_dates_rec.max_end_date);

Line 3553: hr_utility.set_location(l_proc, 70);

3549: -- This is a withdrawal action
3550: L_action_flag := 'W';
3551: END IF;
3552: --
3553: hr_utility.set_location(l_proc, 70);
3554: hr_utility.trace(l_proc||': l_action_flag='|| l_action_flag);
3555: --
3556: CLOSE c_next_prim_car;
3557: ELSE

Line 3554: hr_utility.trace(l_proc||': l_action_flag='|| l_action_flag);

3550: L_action_flag := 'W';
3551: END IF;
3552: --
3553: hr_utility.set_location(l_proc, 70);
3554: hr_utility.trace(l_proc||': l_action_flag='|| l_action_flag);
3555: --
3556: CLOSE c_next_prim_car;
3557: ELSE
3558: -- Not the first car of the employee

Line 3564: hr_utility.set_location(l_proc, 80);

3560: L_action_flag := 'W';
3561: END IF;
3562: --
3563: --
3564: hr_utility.set_location(l_proc, 80);
3565: hr_utility.trace(l_proc||': l_action_flag='|| l_action_flag);
3566: --
3567: ELSE
3568: -- Not a first car therefore mark

Line 3565: hr_utility.trace(l_proc||': l_action_flag='|| l_action_flag);

3561: END IF;
3562: --
3563: --
3564: hr_utility.set_location(l_proc, 80);
3565: hr_utility.trace(l_proc||': l_action_flag='|| l_action_flag);
3566: --
3567: ELSE
3568: -- Not a first car therefore mark
3569: -- it as withdrawal car action

Line 3573: hr_utility.set_location(l_proc, 90);

3569: -- it as withdrawal car action
3570: l_action_flag := 'W';
3571: END IF;
3572: --
3573: hr_utility.set_location(l_proc, 90);
3574: hr_utility.trace(l_proc||': l_action_flag='|| l_action_flag);
3575: --
3576: IF L_action_flag <> 'X' THEN
3577: -- Check whether this allocation action

Line 3574: hr_utility.trace(l_proc||': l_action_flag='|| l_action_flag);

3570: l_action_flag := 'W';
3571: END IF;
3572: --
3573: hr_utility.set_location(l_proc, 90);
3574: hr_utility.trace(l_proc||': l_action_flag='|| l_action_flag);
3575: --
3576: IF L_action_flag <> 'X' THEN
3577: -- Check whether this allocation action
3578: -- has been already archived

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

3581: alc_rec.vehicle_allocation_id,
3582: alc_dates_rec.min_start_date,
3583: l_action_flag);
3584: --
3585: hr_utility.set_location(l_proc, 100);
3586: hr_utility.trace(l_proc||': l_archived_flag='|| l_archived_flag);
3587: --
3588: IF l_archived_flag = 'N' THEN
3589: -- Action has not been archived already

Line 3586: hr_utility.trace(l_proc||': l_archived_flag='|| l_archived_flag);

3582: alc_dates_rec.min_start_date,
3583: l_action_flag);
3584: --
3585: hr_utility.set_location(l_proc, 100);
3586: hr_utility.trace(l_proc||': l_archived_flag='|| l_archived_flag);
3587: --
3588: IF l_archived_flag = 'N' THEN
3589: -- Action has not been archived already
3590: -- therefore archive it.

Line 3591: hr_utility.set_location(l_proc, 105);

3587: --
3588: IF l_archived_flag = 'N' THEN
3589: -- Action has not been archived already
3590: -- therefore archive it.
3591: hr_utility.set_location(l_proc, 105);
3592: hr_utility.trace(l_proc||': p_assactid='|| p_assactid);
3593: hr_utility.trace(l_proc||': vehicle_allocation_id='|| alc_rec.vehicle_allocation_id);
3594: hr_utility.trace(l_proc||': vehicle_repository_id='|| alc_rec.vehicle_repository_id);
3595: hr_utility.trace(l_proc||': l_action_flag='|| l_action_flag);

Line 3592: hr_utility.trace(l_proc||': p_assactid='|| p_assactid);

3588: IF l_archived_flag = 'N' THEN
3589: -- Action has not been archived already
3590: -- therefore archive it.
3591: hr_utility.set_location(l_proc, 105);
3592: hr_utility.trace(l_proc||': p_assactid='|| p_assactid);
3593: hr_utility.trace(l_proc||': vehicle_allocation_id='|| alc_rec.vehicle_allocation_id);
3594: hr_utility.trace(l_proc||': vehicle_repository_id='|| alc_rec.vehicle_repository_id);
3595: hr_utility.trace(l_proc||': l_action_flag='|| l_action_flag);
3596: hr_utility.trace(l_proc||': alc_dates_rec.min_start_date='|| fnd_date.date_to_displaydate(alc_dates_rec.min_start_date));

Line 3593: hr_utility.trace(l_proc||': vehicle_allocation_id='|| alc_rec.vehicle_allocation_id);

3589: -- Action has not been archived already
3590: -- therefore archive it.
3591: hr_utility.set_location(l_proc, 105);
3592: hr_utility.trace(l_proc||': p_assactid='|| p_assactid);
3593: hr_utility.trace(l_proc||': vehicle_allocation_id='|| alc_rec.vehicle_allocation_id);
3594: hr_utility.trace(l_proc||': vehicle_repository_id='|| alc_rec.vehicle_repository_id);
3595: hr_utility.trace(l_proc||': l_action_flag='|| l_action_flag);
3596: hr_utility.trace(l_proc||': alc_dates_rec.min_start_date='|| fnd_date.date_to_displaydate(alc_dates_rec.min_start_date));
3597: hr_utility.trace(l_proc||': alc_dates_rec.max_end_date='|| fnd_date.date_to_displaydate(alc_dates_rec.max_end_date));

Line 3594: hr_utility.trace(l_proc||': vehicle_repository_id='|| alc_rec.vehicle_repository_id);

3590: -- therefore archive it.
3591: hr_utility.set_location(l_proc, 105);
3592: hr_utility.trace(l_proc||': p_assactid='|| p_assactid);
3593: hr_utility.trace(l_proc||': vehicle_allocation_id='|| alc_rec.vehicle_allocation_id);
3594: hr_utility.trace(l_proc||': vehicle_repository_id='|| alc_rec.vehicle_repository_id);
3595: hr_utility.trace(l_proc||': l_action_flag='|| l_action_flag);
3596: hr_utility.trace(l_proc||': alc_dates_rec.min_start_date='|| fnd_date.date_to_displaydate(alc_dates_rec.min_start_date));
3597: hr_utility.trace(l_proc||': alc_dates_rec.max_end_date='|| fnd_date.date_to_displaydate(alc_dates_rec.max_end_date));
3598: --

Line 3595: hr_utility.trace(l_proc||': l_action_flag='|| l_action_flag);

3591: hr_utility.set_location(l_proc, 105);
3592: hr_utility.trace(l_proc||': p_assactid='|| p_assactid);
3593: hr_utility.trace(l_proc||': vehicle_allocation_id='|| alc_rec.vehicle_allocation_id);
3594: hr_utility.trace(l_proc||': vehicle_repository_id='|| alc_rec.vehicle_repository_id);
3595: hr_utility.trace(l_proc||': l_action_flag='|| l_action_flag);
3596: hr_utility.trace(l_proc||': alc_dates_rec.min_start_date='|| fnd_date.date_to_displaydate(alc_dates_rec.min_start_date));
3597: hr_utility.trace(l_proc||': alc_dates_rec.max_end_date='|| fnd_date.date_to_displaydate(alc_dates_rec.max_end_date));
3598: --
3599: archive_allocation_action(p_assignment_id => asg_rec.assignment_id,

Line 3596: hr_utility.trace(l_proc||': alc_dates_rec.min_start_date='|| fnd_date.date_to_displaydate(alc_dates_rec.min_start_date));

3592: hr_utility.trace(l_proc||': p_assactid='|| p_assactid);
3593: hr_utility.trace(l_proc||': vehicle_allocation_id='|| alc_rec.vehicle_allocation_id);
3594: hr_utility.trace(l_proc||': vehicle_repository_id='|| alc_rec.vehicle_repository_id);
3595: hr_utility.trace(l_proc||': l_action_flag='|| l_action_flag);
3596: hr_utility.trace(l_proc||': alc_dates_rec.min_start_date='|| fnd_date.date_to_displaydate(alc_dates_rec.min_start_date));
3597: hr_utility.trace(l_proc||': alc_dates_rec.max_end_date='|| fnd_date.date_to_displaydate(alc_dates_rec.max_end_date));
3598: --
3599: archive_allocation_action(p_assignment_id => asg_rec.assignment_id,
3600: p_asg_act_id => p_assactid,

Line 3597: hr_utility.trace(l_proc||': alc_dates_rec.max_end_date='|| fnd_date.date_to_displaydate(alc_dates_rec.max_end_date));

3593: hr_utility.trace(l_proc||': vehicle_allocation_id='|| alc_rec.vehicle_allocation_id);
3594: hr_utility.trace(l_proc||': vehicle_repository_id='|| alc_rec.vehicle_repository_id);
3595: hr_utility.trace(l_proc||': l_action_flag='|| l_action_flag);
3596: hr_utility.trace(l_proc||': alc_dates_rec.min_start_date='|| fnd_date.date_to_displaydate(alc_dates_rec.min_start_date));
3597: hr_utility.trace(l_proc||': alc_dates_rec.max_end_date='|| fnd_date.date_to_displaydate(alc_dates_rec.max_end_date));
3598: --
3599: archive_allocation_action(p_assignment_id => asg_rec.assignment_id,
3600: p_asg_act_id => p_assactid,
3601: p_vehicle_allocation_id => alc_rec.vehicle_allocation_id,

Line 3616: hr_utility.set_location(l_proc, 110);

3612: -- Fuel type has changed therefore make sure
3613: -- this change occured after the vehicle was
3614: -- allocated to this assignment
3615: --
3616: hr_utility.set_location(l_proc, 110);
3617: hr_utility.trace(l_proc||': effective_start_date='|| vehicle_changes_rec.effective_start_date);
3618: hr_utility.trace(l_proc||': fuel_type='|| vehicle_changes_rec.fuel_type);
3619: --
3620: IF (vehicle_changes_rec.effective_start_date

Line 3617: hr_utility.trace(l_proc||': effective_start_date='|| vehicle_changes_rec.effective_start_date);

3613: -- this change occured after the vehicle was
3614: -- allocated to this assignment
3615: --
3616: hr_utility.set_location(l_proc, 110);
3617: hr_utility.trace(l_proc||': effective_start_date='|| vehicle_changes_rec.effective_start_date);
3618: hr_utility.trace(l_proc||': fuel_type='|| vehicle_changes_rec.fuel_type);
3619: --
3620: IF (vehicle_changes_rec.effective_start_date
3621: BETWEEN alc_dates_rec.min_start_date+1 AND alc_dates_rec.max_end_date) AND

Line 3618: hr_utility.trace(l_proc||': fuel_type='|| vehicle_changes_rec.fuel_type);

3614: -- allocated to this assignment
3615: --
3616: hr_utility.set_location(l_proc, 110);
3617: hr_utility.trace(l_proc||': effective_start_date='|| vehicle_changes_rec.effective_start_date);
3618: hr_utility.trace(l_proc||': fuel_type='|| vehicle_changes_rec.fuel_type);
3619: --
3620: IF (vehicle_changes_rec.effective_start_date
3621: BETWEEN alc_dates_rec.min_start_date+1 AND alc_dates_rec.max_end_date) AND
3622: (vehicle_changes_rec.effective_start_date

Line 3633: hr_utility.set_location(l_proc, 120);

3629: alc_rec.vehicle_allocation_id,
3630: vehicle_changes_rec.effective_start_date,
3631: 'F');
3632: --
3633: hr_utility.set_location(l_proc, 120);
3634: hr_utility.trace(l_proc||': l_archived_flag='|| l_archived_flag);
3635: --
3636: IF l_archived_flag = 'N' THEN
3637: -- Action has not been archived already

Line 3634: hr_utility.trace(l_proc||': l_archived_flag='|| l_archived_flag);

3630: vehicle_changes_rec.effective_start_date,
3631: 'F');
3632: --
3633: hr_utility.set_location(l_proc, 120);
3634: hr_utility.trace(l_proc||': l_archived_flag='|| l_archived_flag);
3635: --
3636: IF l_archived_flag = 'N' THEN
3637: -- Action has not been archived already
3638: -- therefore archive it.

Line 3652: hr_utility.set_location(l_proc, 130);

3648: END IF;
3649: END IF;
3650: END LOOP;
3651: --
3652: hr_utility.set_location(l_proc, 130);
3653: --
3654: L_action_flag := 'X';
3655: l_archived_flag := 'Y';
3656: --

Line 3668: hr_utility.set_location(l_proc, 160);

3664: -- Assignment has started on this payroll or tax ref during the
3665: -- input date range and this car allocation was active on the
3666: -- start date therefore check whether it is a transfer
3667: -- from another tax ref
3668: hr_utility.set_location(l_proc, 160);
3669: l_previous_tax_ref := NULL;
3670: --
3671: OPEN c_tax_ref(asg_rec.assignment_id, asg_rec.asg_min_start_date-1);
3672: FETCH c_tax_ref INTO l_previous_tax_ref;

Line 3675: hr_utility.set_location(l_proc, 170);

3671: OPEN c_tax_ref(asg_rec.assignment_id, asg_rec.asg_min_start_date-1);
3672: FETCH c_tax_ref INTO l_previous_tax_ref;
3673: CLOSE c_tax_ref;
3674: --
3675: hr_utility.set_location(l_proc, 170);
3676: hr_utility.trace(l_proc||', l_previous_tax_ref='||l_previous_tax_ref);
3677: --
3678: IF l_previous_tax_ref is NOT NULL AND l_previous_tax_ref <> g_tax_ref THEN
3679: -- This assignment has a different prior tax ref

Line 3676: hr_utility.trace(l_proc||', l_previous_tax_ref='||l_previous_tax_ref);

3672: FETCH c_tax_ref INTO l_previous_tax_ref;
3673: CLOSE c_tax_ref;
3674: --
3675: hr_utility.set_location(l_proc, 170);
3676: hr_utility.trace(l_proc||', l_previous_tax_ref='||l_previous_tax_ref);
3677: --
3678: IF l_previous_tax_ref is NOT NULL AND l_previous_tax_ref <> g_tax_ref THEN
3679: -- This assignment has a different prior tax ref
3680: -- therefore it should be reported as a new car

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

3678: IF l_previous_tax_ref is NOT NULL AND l_previous_tax_ref <> g_tax_ref THEN
3679: -- This assignment has a different prior tax ref
3680: -- therefore it should be reported as a new car
3681: -- allocation on this EDI message.
3682: hr_utility.set_location(l_proc, 180);
3683: l_action_flag := 'N';
3684: --
3685: -- Check whether this allocation action
3686: -- has been already archived

Line 3693: hr_utility.set_location(l_proc, 190);

3689: alc_rec.vehicle_allocation_id,
3690: asg_rec.asg_min_start_date,
3691: l_action_flag);
3692: --
3693: hr_utility.set_location(l_proc, 190);
3694: hr_utility.trace(l_proc||', l_archived_flag='||l_archived_flag);
3695: --
3696: IF l_archived_flag = 'N' THEN
3697: -- Action has not been archived already

Line 3694: hr_utility.trace(l_proc||', l_archived_flag='||l_archived_flag);

3690: asg_rec.asg_min_start_date,
3691: l_action_flag);
3692: --
3693: hr_utility.set_location(l_proc, 190);
3694: hr_utility.trace(l_proc||', l_archived_flag='||l_archived_flag);
3695: --
3696: IF l_archived_flag = 'N' THEN
3697: -- Action has not been archived already
3698: -- therefore archive it.

Line 3720: hr_utility.set_location(l_proc, 200);

3716: -- Assignment has ended on this payroll or tax ref during the
3717: -- input date range and this car allocation was active on the
3718: -- end date therefore check whether it is a transfer
3719: -- to another tax ref
3720: hr_utility.set_location(l_proc, 200);
3721: l_next_tax_ref := NULL;
3722: --
3723: OPEN c_tax_ref(asg_rec.assignment_id, asg_rec.asg_max_end_date+1);
3724: FETCH c_tax_ref INTO l_next_tax_ref;

Line 3727: hr_utility.set_location(l_proc, 210);

3723: OPEN c_tax_ref(asg_rec.assignment_id, asg_rec.asg_max_end_date+1);
3724: FETCH c_tax_ref INTO l_next_tax_ref;
3725: CLOSE c_tax_ref;
3726: --
3727: hr_utility.set_location(l_proc, 210);
3728: hr_utility.trace(l_proc||', l_next_tax_ref='||l_next_tax_ref);
3729: --
3730: IF l_next_tax_ref is NOT NULL AND l_next_tax_ref <> g_tax_ref THEN
3731: -- This assignment has a different tax ref after end date

Line 3728: hr_utility.trace(l_proc||', l_next_tax_ref='||l_next_tax_ref);

3724: FETCH c_tax_ref INTO l_next_tax_ref;
3725: CLOSE c_tax_ref;
3726: --
3727: hr_utility.set_location(l_proc, 210);
3728: hr_utility.trace(l_proc||', l_next_tax_ref='||l_next_tax_ref);
3729: --
3730: IF l_next_tax_ref is NOT NULL AND l_next_tax_ref <> g_tax_ref THEN
3731: -- This assignment has a different tax ref after end date
3732: -- therefore it should be reported as allocation withdrawal

Line 3734: hr_utility.set_location(l_proc, 220);

3730: IF l_next_tax_ref is NOT NULL AND l_next_tax_ref <> g_tax_ref THEN
3731: -- This assignment has a different tax ref after end date
3732: -- therefore it should be reported as allocation withdrawal
3733: -- on this EDI message.
3734: hr_utility.set_location(l_proc, 220);
3735: l_action_flag := 'W';
3736: --
3737: -- Check whether this allocation action
3738: -- has been already archived

Line 3745: hr_utility.set_location(l_proc, 230);

3741: alc_rec.vehicle_allocation_id,
3742: asg_rec.asg_max_end_date,
3743: l_action_flag);
3744: --
3745: hr_utility.set_location(l_proc, 230);
3746: hr_utility.trace(l_proc||', l_archived_flag='||l_archived_flag);
3747: --
3748: IF l_archived_flag = 'N' THEN
3749: -- Action has not been archived already

Line 3746: hr_utility.trace(l_proc||', l_archived_flag='||l_archived_flag);

3742: asg_rec.asg_max_end_date,
3743: l_action_flag);
3744: --
3745: hr_utility.set_location(l_proc, 230);
3746: hr_utility.trace(l_proc||', l_archived_flag='||l_archived_flag);
3747: --
3748: IF l_archived_flag = 'N' THEN
3749: -- Action has not been archived already
3750: -- therefore archive it.

Line 3763: hr_utility.set_location(l_proc, 240);

3759: --
3760: END IF;
3761: END IF;
3762: --
3763: hr_utility.set_location(l_proc, 240);
3764: --
3765: hr_utility.set_location(l_proc, 250);
3766: END LOOP;
3767: --

Line 3765: hr_utility.set_location(l_proc, 250);

3761: END IF;
3762: --
3763: hr_utility.set_location(l_proc, 240);
3764: --
3765: hr_utility.set_location(l_proc, 250);
3766: END LOOP;
3767: --
3768: hr_utility.set_location(l_proc, 260);
3769: --

Line 3768: hr_utility.set_location(l_proc, 260);

3764: --
3765: hr_utility.set_location(l_proc, 250);
3766: END LOOP;
3767: --
3768: hr_utility.set_location(l_proc, 260);
3769: --
3770: END LOOP;
3771: --
3772: hr_utility.set_location('Leaving: '||l_proc,290);

Line 3772: hr_utility.set_location('Leaving: '||l_proc,290);

3768: hr_utility.set_location(l_proc, 260);
3769: --
3770: END LOOP;
3771: --
3772: hr_utility.set_location('Leaving: '||l_proc,290);
3773: --hr_utility.trace_off;
3774: EXCEPTION
3775: WHEN OTHERS THEN
3776: hr_utility.set_location('Leaving: '||l_proc,300);

Line 3773: --hr_utility.trace_off;

3769: --
3770: END LOOP;
3771: --
3772: hr_utility.set_location('Leaving: '||l_proc,290);
3773: --hr_utility.trace_off;
3774: EXCEPTION
3775: WHEN OTHERS THEN
3776: hr_utility.set_location('Leaving: '||l_proc,300);
3777: -- hr_utility.trace_off;

Line 3776: hr_utility.set_location('Leaving: '||l_proc,300);

3772: hr_utility.set_location('Leaving: '||l_proc,290);
3773: --hr_utility.trace_off;
3774: EXCEPTION
3775: WHEN OTHERS THEN
3776: hr_utility.set_location('Leaving: '||l_proc,300);
3777: -- hr_utility.trace_off;
3778: raise;
3779: END archive_code_v2;
3780:

Line 3777: -- hr_utility.trace_off;

3773: --hr_utility.trace_off;
3774: EXCEPTION
3775: WHEN OTHERS THEN
3776: hr_utility.set_location('Leaving: '||l_proc,300);
3777: -- hr_utility.trace_off;
3778: raise;
3779: END archive_code_v2;
3780:
3781: --For Bug 8986543

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

3812: l_archived_flag VARCHAR2(1);
3813: --
3814: BEGIN
3815:
3816: hr_utility.set_location('Entering '||l_proc, 10);
3817: --
3818: For asg_rec IN c_asg
3819: LOOP
3820: -- Loop through all assignments

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

3817: --
3818: For asg_rec IN c_asg
3819: LOOP
3820: -- Loop through all assignments
3821: hr_utility.set_location(l_proc, 20);
3822: hr_utility.trace(l_proc||': assignment_id='||asg_rec.assignment_id);
3823: hr_utility.trace(l_proc||': asg_min_start_date='||fnd_date.date_to_displaydate(asg_rec.asg_min_start_date));
3824: hr_utility.trace(l_proc||': asg_max_end_date='||fnd_date.date_to_displaydate(asg_rec.asg_max_end_date));
3825: --

Line 3822: hr_utility.trace(l_proc||': assignment_id='||asg_rec.assignment_id);

3818: For asg_rec IN c_asg
3819: LOOP
3820: -- Loop through all assignments
3821: hr_utility.set_location(l_proc, 20);
3822: hr_utility.trace(l_proc||': assignment_id='||asg_rec.assignment_id);
3823: hr_utility.trace(l_proc||': asg_min_start_date='||fnd_date.date_to_displaydate(asg_rec.asg_min_start_date));
3824: hr_utility.trace(l_proc||': asg_max_end_date='||fnd_date.date_to_displaydate(asg_rec.asg_max_end_date));
3825: --
3826: FOR alc_rec IN c_allocations(asg_rec.assignment_id) LOOP

Line 3823: hr_utility.trace(l_proc||': asg_min_start_date='||fnd_date.date_to_displaydate(asg_rec.asg_min_start_date));

3819: LOOP
3820: -- Loop through all assignments
3821: hr_utility.set_location(l_proc, 20);
3822: hr_utility.trace(l_proc||': assignment_id='||asg_rec.assignment_id);
3823: hr_utility.trace(l_proc||': asg_min_start_date='||fnd_date.date_to_displaydate(asg_rec.asg_min_start_date));
3824: hr_utility.trace(l_proc||': asg_max_end_date='||fnd_date.date_to_displaydate(asg_rec.asg_max_end_date));
3825: --
3826: FOR alc_rec IN c_allocations(asg_rec.assignment_id) LOOP
3827: -- Loop through all vehicle allocations

Line 3824: hr_utility.trace(l_proc||': asg_max_end_date='||fnd_date.date_to_displaydate(asg_rec.asg_max_end_date));

3820: -- Loop through all assignments
3821: hr_utility.set_location(l_proc, 20);
3822: hr_utility.trace(l_proc||': assignment_id='||asg_rec.assignment_id);
3823: hr_utility.trace(l_proc||': asg_min_start_date='||fnd_date.date_to_displaydate(asg_rec.asg_min_start_date));
3824: hr_utility.trace(l_proc||': asg_max_end_date='||fnd_date.date_to_displaydate(asg_rec.asg_max_end_date));
3825: --
3826: FOR alc_rec IN c_allocations(asg_rec.assignment_id) LOOP
3827: -- Loop through all vehicle allocations
3828: -- over the date range

Line 3829: hr_utility.set_location(l_proc, 30);

3825: --
3826: FOR alc_rec IN c_allocations(asg_rec.assignment_id) LOOP
3827: -- Loop through all vehicle allocations
3828: -- over the date range
3829: hr_utility.set_location(l_proc, 30);
3830: hr_utility.trace(l_proc||': vehicle_allocation_id='||alc_rec.vehicle_allocation_id);
3831: hr_utility.trace(l_proc||': usage_type='||alc_rec.usage_type);
3832: --
3833: L_action_flag := 'X';

Line 3830: hr_utility.trace(l_proc||': vehicle_allocation_id='||alc_rec.vehicle_allocation_id);

3826: FOR alc_rec IN c_allocations(asg_rec.assignment_id) LOOP
3827: -- Loop through all vehicle allocations
3828: -- over the date range
3829: hr_utility.set_location(l_proc, 30);
3830: hr_utility.trace(l_proc||': vehicle_allocation_id='||alc_rec.vehicle_allocation_id);
3831: hr_utility.trace(l_proc||': usage_type='||alc_rec.usage_type);
3832: --
3833: L_action_flag := 'X';
3834: l_archived_flag := 'Y';

Line 3831: hr_utility.trace(l_proc||': usage_type='||alc_rec.usage_type);

3827: -- Loop through all vehicle allocations
3828: -- over the date range
3829: hr_utility.set_location(l_proc, 30);
3830: hr_utility.trace(l_proc||': vehicle_allocation_id='||alc_rec.vehicle_allocation_id);
3831: hr_utility.trace(l_proc||': usage_type='||alc_rec.usage_type);
3832: --
3833: L_action_flag := 'X';
3834: l_archived_flag := 'Y';
3835: --

Line 3840: hr_utility.set_location(l_proc, 40);

3836: OPEN c_alloc_dates(alc_rec.vehicle_allocation_id);
3837: FETCH c_alloc_dates INTO alc_dates_rec;
3838: CLOSE c_alloc_dates;
3839: --
3840: hr_utility.set_location(l_proc, 40);
3841: hr_utility.trace(l_proc||': min_start_date='|| fnd_date.date_to_displaydate(alc_dates_rec.min_start_date));
3842: hr_utility.trace(l_proc||': max_end_date='|| fnd_date.date_to_displaydate(alc_dates_rec.max_end_date));
3843:
3844: -- Moved the code here from below for the bug 10088866

Line 3841: hr_utility.trace(l_proc||': min_start_date='|| fnd_date.date_to_displaydate(alc_dates_rec.min_start_date));

3837: FETCH c_alloc_dates INTO alc_dates_rec;
3838: CLOSE c_alloc_dates;
3839: --
3840: hr_utility.set_location(l_proc, 40);
3841: hr_utility.trace(l_proc||': min_start_date='|| fnd_date.date_to_displaydate(alc_dates_rec.min_start_date));
3842: hr_utility.trace(l_proc||': max_end_date='|| fnd_date.date_to_displaydate(alc_dates_rec.max_end_date));
3843:
3844: -- Moved the code here from below for the bug 10088866
3845: -- Start moving for the bug 10088866

Line 3842: hr_utility.trace(l_proc||': max_end_date='|| fnd_date.date_to_displaydate(alc_dates_rec.max_end_date));

3838: CLOSE c_alloc_dates;
3839: --
3840: hr_utility.set_location(l_proc, 40);
3841: hr_utility.trace(l_proc||': min_start_date='|| fnd_date.date_to_displaydate(alc_dates_rec.min_start_date));
3842: hr_utility.trace(l_proc||': max_end_date='|| fnd_date.date_to_displaydate(alc_dates_rec.max_end_date));
3843:
3844: -- Moved the code here from below for the bug 10088866
3845: -- Start moving for the bug 10088866
3846: -- Private flag logic

Line 3854: hr_utility.set_location(l_proc, 250);

3850: L_action_flag := 'X';
3851: l_archived_flag := 'Y';
3852: --
3853: FOR private_flag_iterator IN private_flag_arch(alc_rec.vehicle_allocation_id) LOOP
3854: hr_utility.set_location(l_proc, 250);
3855: hr_utility.trace(l_proc||', private_flag_iterator.private_use_flag='||private_flag_iterator.private_use_flag);
3856:
3857: L_action_flag := 'X';
3858: l_archived_flag := 'Y';

Line 3855: hr_utility.trace(l_proc||', private_flag_iterator.private_use_flag='||private_flag_iterator.private_use_flag);

3851: l_archived_flag := 'Y';
3852: --
3853: FOR private_flag_iterator IN private_flag_arch(alc_rec.vehicle_allocation_id) LOOP
3854: hr_utility.set_location(l_proc, 250);
3855: hr_utility.trace(l_proc||', private_flag_iterator.private_use_flag='||private_flag_iterator.private_use_flag);
3856:
3857: L_action_flag := 'X';
3858: l_archived_flag := 'Y';
3859:

Line 3873: hr_utility.set_location(l_proc, 260);

3869: private_flag_iterator.effective_start_date,
3870: l_action_flag,
3871: private_flag_iterator.effective_start_date);
3872: --
3873: hr_utility.set_location(l_proc, 260);
3874: hr_utility.trace(l_proc||', l_archived_flag='||l_archived_flag);
3875: --
3876: IF l_archived_flag = 'N' THEN
3877: -- Action has not been archived already

Line 3874: hr_utility.trace(l_proc||', l_archived_flag='||l_archived_flag);

3870: l_action_flag,
3871: private_flag_iterator.effective_start_date);
3872: --
3873: hr_utility.set_location(l_proc, 260);
3874: hr_utility.trace(l_proc||', l_archived_flag='||l_archived_flag);
3875: --
3876: IF l_archived_flag = 'N' THEN
3877: -- Action has not been archived already
3878: -- therefore archive it.

Line 3921: hr_utility.set_location(l_proc, 50);

3917: OPEN c_first_asg(asg_rec.assignment_id, alc_dates_rec.min_start_date);
3918: FETCH c_first_asg INTO first_asg_rec;
3919: CLOSE c_first_asg;
3920: --
3921: hr_utility.set_location(l_proc, 50);
3922: hr_utility.trace(l_proc||': First Assignment='|| first_asg_rec.assignment_id);
3923: -- Get primary car allocation of the
3924: -- first assignment of this person
3925: -- in this tax ref

Line 3922: hr_utility.trace(l_proc||': First Assignment='|| first_asg_rec.assignment_id);

3918: FETCH c_first_asg INTO first_asg_rec;
3919: CLOSE c_first_asg;
3920: --
3921: hr_utility.set_location(l_proc, 50);
3922: hr_utility.trace(l_proc||': First Assignment='|| first_asg_rec.assignment_id);
3923: -- Get primary car allocation of the
3924: -- first assignment of this person
3925: -- in this tax ref
3926: OPEN c_primary_car(first_asg_rec.assignment_id, alc_dates_rec.min_start_date);

Line 3930: hr_utility.set_location(l_proc, 60);

3926: OPEN c_primary_car(first_asg_rec.assignment_id, alc_dates_rec.min_start_date);
3927: FETCH c_primary_car INTO primary_car_rec;
3928: CLOSE c_primary_car;
3929: --
3930: hr_utility.set_location(l_proc, 60);
3931: hr_utility.trace(l_proc||': Primary Car Allocation='|| primary_car_rec.vehicle_allocation_id);
3932: --
3933: IF primary_car_rec.vehicle_allocation_id = alc_rec.vehicle_allocation_id THEN
3934: -- This is the first car allocation

Line 3931: hr_utility.trace(l_proc||': Primary Car Allocation='|| primary_car_rec.vehicle_allocation_id);

3927: FETCH c_primary_car INTO primary_car_rec;
3928: CLOSE c_primary_car;
3929: --
3930: hr_utility.set_location(l_proc, 60);
3931: hr_utility.trace(l_proc||': Primary Car Allocation='|| primary_car_rec.vehicle_allocation_id);
3932: --
3933: IF primary_car_rec.vehicle_allocation_id = alc_rec.vehicle_allocation_id THEN
3934: -- This is the first car allocation
3935: -- of this employee in this tax ref

Line 3946: hr_utility.set_location(l_proc, 70);

3942: ELSE
3943: L_action_flag := 'N';
3944: END IF;
3945: --
3946: hr_utility.set_location(l_proc, 70);
3947: hr_utility.trace(l_proc||': l_action_flag='|| l_action_flag);
3948: --
3949: CLOSE c_prior_prim_car;
3950: ELSE

Line 3947: hr_utility.trace(l_proc||': l_action_flag='|| l_action_flag);

3943: L_action_flag := 'N';
3944: END IF;
3945: --
3946: hr_utility.set_location(l_proc, 70);
3947: hr_utility.trace(l_proc||': l_action_flag='|| l_action_flag);
3948: --
3949: CLOSE c_prior_prim_car;
3950: ELSE
3951: -- Not the first car of the employee

Line 3956: hr_utility.set_location(l_proc, 80);

3952: -- report this as new car
3953: L_action_flag := 'N';
3954: END IF;
3955: --
3956: hr_utility.set_location(l_proc, 80);
3957: hr_utility.trace(l_proc||': l_action_flag='|| l_action_flag);
3958: --
3959: ELSE
3960: -- Not a primary car therefore mark

Line 3957: hr_utility.trace(l_proc||': l_action_flag='|| l_action_flag);

3953: L_action_flag := 'N';
3954: END IF;
3955: --
3956: hr_utility.set_location(l_proc, 80);
3957: hr_utility.trace(l_proc||': l_action_flag='|| l_action_flag);
3958: --
3959: ELSE
3960: -- Not a primary car therefore mark
3961: -- it as new car allocation action

Line 3965: hr_utility.set_location(l_proc, 90);

3961: -- it as new car allocation action
3962: l_action_flag := 'N';
3963: END IF;
3964: --
3965: hr_utility.set_location(l_proc, 90);
3966: hr_utility.trace(l_proc||': l_action_flag='|| l_action_flag);
3967: --
3968: IF L_action_flag <> 'X' THEN
3969: -- Check whether this allocation action

Line 3966: hr_utility.trace(l_proc||': l_action_flag='|| l_action_flag);

3962: l_action_flag := 'N';
3963: END IF;
3964: --
3965: hr_utility.set_location(l_proc, 90);
3966: hr_utility.trace(l_proc||': l_action_flag='|| l_action_flag);
3967: --
3968: IF L_action_flag <> 'X' THEN
3969: -- Check whether this allocation action
3970: -- has been already archived

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

3974: alc_dates_rec.min_start_date,
3975: l_action_flag,
3976: alc_rec.effective_start_date); -- Added for the bug 10088866
3977: --
3978: hr_utility.set_location(l_proc, 100);
3979: hr_utility.trace(l_proc||': l_archived_flag='|| l_archived_flag);
3980: --
3981: IF (l_archived_flag = 'N' AND l_action_flag <> 'R') --No need to archive replaced car as per new requirements of V3
3982: THEN

Line 3979: hr_utility.trace(l_proc||': l_archived_flag='|| l_archived_flag);

3975: l_action_flag,
3976: alc_rec.effective_start_date); -- Added for the bug 10088866
3977: --
3978: hr_utility.set_location(l_proc, 100);
3979: hr_utility.trace(l_proc||': l_archived_flag='|| l_archived_flag);
3980: --
3981: IF (l_archived_flag = 'N' AND l_action_flag <> 'R') --No need to archive replaced car as per new requirements of V3
3982: THEN
3983: -- Action has not been archived already

Line 3985: hr_utility.set_location(l_proc, 105);

3981: IF (l_archived_flag = 'N' AND l_action_flag <> 'R') --No need to archive replaced car as per new requirements of V3
3982: THEN
3983: -- Action has not been archived already
3984: -- therefore archive it.
3985: hr_utility.set_location(l_proc, 105);
3986: hr_utility.trace(l_proc||': p_assactid='|| p_assactid);
3987: hr_utility.trace(l_proc||': vehicle_allocation_id='|| alc_rec.vehicle_allocation_id);
3988: hr_utility.trace(l_proc||': vehicle_repository_id='|| alc_rec.vehicle_repository_id);
3989: hr_utility.trace(l_proc||': l_action_flag='|| l_action_flag);

Line 3986: hr_utility.trace(l_proc||': p_assactid='|| p_assactid);

3982: THEN
3983: -- Action has not been archived already
3984: -- therefore archive it.
3985: hr_utility.set_location(l_proc, 105);
3986: hr_utility.trace(l_proc||': p_assactid='|| p_assactid);
3987: hr_utility.trace(l_proc||': vehicle_allocation_id='|| alc_rec.vehicle_allocation_id);
3988: hr_utility.trace(l_proc||': vehicle_repository_id='|| alc_rec.vehicle_repository_id);
3989: hr_utility.trace(l_proc||': l_action_flag='|| l_action_flag);
3990: hr_utility.trace(l_proc||': alc_dates_rec.min_start_date='|| fnd_date.date_to_displaydate(alc_dates_rec.min_start_date));

Line 3987: hr_utility.trace(l_proc||': vehicle_allocation_id='|| alc_rec.vehicle_allocation_id);

3983: -- Action has not been archived already
3984: -- therefore archive it.
3985: hr_utility.set_location(l_proc, 105);
3986: hr_utility.trace(l_proc||': p_assactid='|| p_assactid);
3987: hr_utility.trace(l_proc||': vehicle_allocation_id='|| alc_rec.vehicle_allocation_id);
3988: hr_utility.trace(l_proc||': vehicle_repository_id='|| alc_rec.vehicle_repository_id);
3989: hr_utility.trace(l_proc||': l_action_flag='|| l_action_flag);
3990: hr_utility.trace(l_proc||': alc_dates_rec.min_start_date='|| fnd_date.date_to_displaydate(alc_dates_rec.min_start_date));
3991: hr_utility.trace(l_proc||': alc_dates_rec.max_end_date='|| fnd_date.date_to_displaydate(alc_dates_rec.max_end_date));

Line 3988: hr_utility.trace(l_proc||': vehicle_repository_id='|| alc_rec.vehicle_repository_id);

3984: -- therefore archive it.
3985: hr_utility.set_location(l_proc, 105);
3986: hr_utility.trace(l_proc||': p_assactid='|| p_assactid);
3987: hr_utility.trace(l_proc||': vehicle_allocation_id='|| alc_rec.vehicle_allocation_id);
3988: hr_utility.trace(l_proc||': vehicle_repository_id='|| alc_rec.vehicle_repository_id);
3989: hr_utility.trace(l_proc||': l_action_flag='|| l_action_flag);
3990: hr_utility.trace(l_proc||': alc_dates_rec.min_start_date='|| fnd_date.date_to_displaydate(alc_dates_rec.min_start_date));
3991: hr_utility.trace(l_proc||': alc_dates_rec.max_end_date='|| fnd_date.date_to_displaydate(alc_dates_rec.max_end_date));
3992: --

Line 3989: hr_utility.trace(l_proc||': l_action_flag='|| l_action_flag);

3985: hr_utility.set_location(l_proc, 105);
3986: hr_utility.trace(l_proc||': p_assactid='|| p_assactid);
3987: hr_utility.trace(l_proc||': vehicle_allocation_id='|| alc_rec.vehicle_allocation_id);
3988: hr_utility.trace(l_proc||': vehicle_repository_id='|| alc_rec.vehicle_repository_id);
3989: hr_utility.trace(l_proc||': l_action_flag='|| l_action_flag);
3990: hr_utility.trace(l_proc||': alc_dates_rec.min_start_date='|| fnd_date.date_to_displaydate(alc_dates_rec.min_start_date));
3991: hr_utility.trace(l_proc||': alc_dates_rec.max_end_date='|| fnd_date.date_to_displaydate(alc_dates_rec.max_end_date));
3992: --
3993: archive_allocation_action(p_assignment_id => asg_rec.assignment_id,

Line 3990: hr_utility.trace(l_proc||': alc_dates_rec.min_start_date='|| fnd_date.date_to_displaydate(alc_dates_rec.min_start_date));

3986: hr_utility.trace(l_proc||': p_assactid='|| p_assactid);
3987: hr_utility.trace(l_proc||': vehicle_allocation_id='|| alc_rec.vehicle_allocation_id);
3988: hr_utility.trace(l_proc||': vehicle_repository_id='|| alc_rec.vehicle_repository_id);
3989: hr_utility.trace(l_proc||': l_action_flag='|| l_action_flag);
3990: hr_utility.trace(l_proc||': alc_dates_rec.min_start_date='|| fnd_date.date_to_displaydate(alc_dates_rec.min_start_date));
3991: hr_utility.trace(l_proc||': alc_dates_rec.max_end_date='|| fnd_date.date_to_displaydate(alc_dates_rec.max_end_date));
3992: --
3993: archive_allocation_action(p_assignment_id => asg_rec.assignment_id,
3994: p_asg_act_id => p_assactid,

Line 3991: hr_utility.trace(l_proc||': alc_dates_rec.max_end_date='|| fnd_date.date_to_displaydate(alc_dates_rec.max_end_date));

3987: hr_utility.trace(l_proc||': vehicle_allocation_id='|| alc_rec.vehicle_allocation_id);
3988: hr_utility.trace(l_proc||': vehicle_repository_id='|| alc_rec.vehicle_repository_id);
3989: hr_utility.trace(l_proc||': l_action_flag='|| l_action_flag);
3990: hr_utility.trace(l_proc||': alc_dates_rec.min_start_date='|| fnd_date.date_to_displaydate(alc_dates_rec.min_start_date));
3991: hr_utility.trace(l_proc||': alc_dates_rec.max_end_date='|| fnd_date.date_to_displaydate(alc_dates_rec.max_end_date));
3992: --
3993: archive_allocation_action(p_assignment_id => asg_rec.assignment_id,
3994: p_asg_act_id => p_assactid,
3995: p_vehicle_allocation_id => alc_rec.vehicle_allocation_id,

Line 4022: hr_utility.set_location(l_proc, 50);

4018: OPEN c_first_asg(asg_rec.assignment_id, alc_dates_rec.max_end_date);
4019: FETCH c_first_asg INTO first_asg_rec;
4020: CLOSE c_first_asg;
4021: --
4022: hr_utility.set_location(l_proc, 50);
4023: hr_utility.trace(l_proc||': First Assignment='|| first_asg_rec.assignment_id);
4024: -- Get primary car allocation of the
4025: -- first assignment of this person
4026: -- in this tax ref

Line 4023: hr_utility.trace(l_proc||': First Assignment='|| first_asg_rec.assignment_id);

4019: FETCH c_first_asg INTO first_asg_rec;
4020: CLOSE c_first_asg;
4021: --
4022: hr_utility.set_location(l_proc, 50);
4023: hr_utility.trace(l_proc||': First Assignment='|| first_asg_rec.assignment_id);
4024: -- Get primary car allocation of the
4025: -- first assignment of this person
4026: -- in this tax ref
4027: OPEN c_primary_car(first_asg_rec.assignment_id, alc_dates_rec.max_end_date);

Line 4031: hr_utility.set_location(l_proc, 60);

4027: OPEN c_primary_car(first_asg_rec.assignment_id, alc_dates_rec.max_end_date);
4028: FETCH c_primary_car INTO primary_car_rec;
4029: CLOSE c_primary_car;
4030: --
4031: hr_utility.set_location(l_proc, 60);
4032: hr_utility.trace(l_proc||': Primary Car Allocation='|| primary_car_rec.vehicle_allocation_id);
4033: --
4034: IF primary_car_rec.vehicle_allocation_id = alc_rec.vehicle_allocation_id THEN
4035: --

Line 4032: hr_utility.trace(l_proc||': Primary Car Allocation='|| primary_car_rec.vehicle_allocation_id);

4028: FETCH c_primary_car INTO primary_car_rec;
4029: CLOSE c_primary_car;
4030: --
4031: hr_utility.set_location(l_proc, 60);
4032: hr_utility.trace(l_proc||': Primary Car Allocation='|| primary_car_rec.vehicle_allocation_id);
4033: --
4034: IF primary_car_rec.vehicle_allocation_id = alc_rec.vehicle_allocation_id THEN
4035: --
4036: OPEN c_next_prim_car(asg_rec.assignment_id, Alc_dates_rec.max_end_date);

Line 4048: hr_utility.set_location(l_proc, 70);

4044: -- This is a withdrawal action
4045: L_action_flag := 'W';
4046: END IF;
4047: --
4048: hr_utility.set_location(l_proc, 70);
4049: hr_utility.trace(l_proc||': l_action_flag='|| l_action_flag);
4050: --
4051: CLOSE c_next_prim_car;
4052: ELSE

Line 4049: hr_utility.trace(l_proc||': l_action_flag='|| l_action_flag);

4045: L_action_flag := 'W';
4046: END IF;
4047: --
4048: hr_utility.set_location(l_proc, 70);
4049: hr_utility.trace(l_proc||': l_action_flag='|| l_action_flag);
4050: --
4051: CLOSE c_next_prim_car;
4052: ELSE
4053: -- Not the first car of the employee

Line 4059: hr_utility.set_location(l_proc, 80);

4055: L_action_flag := 'W';
4056: END IF;
4057: --
4058: --
4059: hr_utility.set_location(l_proc, 80);
4060: hr_utility.trace(l_proc||': l_action_flag='|| l_action_flag);
4061: --
4062: ELSE
4063: -- Not a first car therefore mark

Line 4060: hr_utility.trace(l_proc||': l_action_flag='|| l_action_flag);

4056: END IF;
4057: --
4058: --
4059: hr_utility.set_location(l_proc, 80);
4060: hr_utility.trace(l_proc||': l_action_flag='|| l_action_flag);
4061: --
4062: ELSE
4063: -- Not a first car therefore mark
4064: -- it as withdrawal car action

Line 4068: hr_utility.set_location(l_proc, 90);

4064: -- it as withdrawal car action
4065: l_action_flag := 'W';
4066: END IF;
4067: --
4068: hr_utility.set_location(l_proc, 90);
4069: hr_utility.trace(l_proc||': l_action_flag='|| l_action_flag);
4070: --
4071: IF L_action_flag <> 'X' THEN
4072: -- Check whether this allocation action

Line 4069: hr_utility.trace(l_proc||': l_action_flag='|| l_action_flag);

4065: l_action_flag := 'W';
4066: END IF;
4067: --
4068: hr_utility.set_location(l_proc, 90);
4069: hr_utility.trace(l_proc||': l_action_flag='|| l_action_flag);
4070: --
4071: IF L_action_flag <> 'X' THEN
4072: -- Check whether this allocation action
4073: -- has been already archived

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

4077: alc_dates_rec.min_start_date,
4078: l_action_flag,
4079: alc_rec.effective_start_date); -- Added for the bug 10088866
4080: --
4081: hr_utility.set_location(l_proc, 100);
4082: hr_utility.trace(l_proc||': l_archived_flag='|| l_archived_flag);
4083: --
4084: IF l_archived_flag = 'N' THEN
4085: -- Action has not been archived already

Line 4082: hr_utility.trace(l_proc||': l_archived_flag='|| l_archived_flag);

4078: l_action_flag,
4079: alc_rec.effective_start_date); -- Added for the bug 10088866
4080: --
4081: hr_utility.set_location(l_proc, 100);
4082: hr_utility.trace(l_proc||': l_archived_flag='|| l_archived_flag);
4083: --
4084: IF l_archived_flag = 'N' THEN
4085: -- Action has not been archived already
4086: -- therefore archive it.

Line 4087: hr_utility.set_location(l_proc, 105);

4083: --
4084: IF l_archived_flag = 'N' THEN
4085: -- Action has not been archived already
4086: -- therefore archive it.
4087: hr_utility.set_location(l_proc, 105);
4088: hr_utility.trace(l_proc||': p_assactid='|| p_assactid);
4089: hr_utility.trace(l_proc||': vehicle_allocation_id='|| alc_rec.vehicle_allocation_id);
4090: hr_utility.trace(l_proc||': vehicle_repository_id='|| alc_rec.vehicle_repository_id);
4091: hr_utility.trace(l_proc||': l_action_flag='|| l_action_flag);

Line 4088: hr_utility.trace(l_proc||': p_assactid='|| p_assactid);

4084: IF l_archived_flag = 'N' THEN
4085: -- Action has not been archived already
4086: -- therefore archive it.
4087: hr_utility.set_location(l_proc, 105);
4088: hr_utility.trace(l_proc||': p_assactid='|| p_assactid);
4089: hr_utility.trace(l_proc||': vehicle_allocation_id='|| alc_rec.vehicle_allocation_id);
4090: hr_utility.trace(l_proc||': vehicle_repository_id='|| alc_rec.vehicle_repository_id);
4091: hr_utility.trace(l_proc||': l_action_flag='|| l_action_flag);
4092: hr_utility.trace(l_proc||': alc_dates_rec.min_start_date='|| fnd_date.date_to_displaydate(alc_dates_rec.min_start_date));

Line 4089: hr_utility.trace(l_proc||': vehicle_allocation_id='|| alc_rec.vehicle_allocation_id);

4085: -- Action has not been archived already
4086: -- therefore archive it.
4087: hr_utility.set_location(l_proc, 105);
4088: hr_utility.trace(l_proc||': p_assactid='|| p_assactid);
4089: hr_utility.trace(l_proc||': vehicle_allocation_id='|| alc_rec.vehicle_allocation_id);
4090: hr_utility.trace(l_proc||': vehicle_repository_id='|| alc_rec.vehicle_repository_id);
4091: hr_utility.trace(l_proc||': l_action_flag='|| l_action_flag);
4092: hr_utility.trace(l_proc||': alc_dates_rec.min_start_date='|| fnd_date.date_to_displaydate(alc_dates_rec.min_start_date));
4093: hr_utility.trace(l_proc||': alc_dates_rec.max_end_date='|| fnd_date.date_to_displaydate(alc_dates_rec.max_end_date));

Line 4090: hr_utility.trace(l_proc||': vehicle_repository_id='|| alc_rec.vehicle_repository_id);

4086: -- therefore archive it.
4087: hr_utility.set_location(l_proc, 105);
4088: hr_utility.trace(l_proc||': p_assactid='|| p_assactid);
4089: hr_utility.trace(l_proc||': vehicle_allocation_id='|| alc_rec.vehicle_allocation_id);
4090: hr_utility.trace(l_proc||': vehicle_repository_id='|| alc_rec.vehicle_repository_id);
4091: hr_utility.trace(l_proc||': l_action_flag='|| l_action_flag);
4092: hr_utility.trace(l_proc||': alc_dates_rec.min_start_date='|| fnd_date.date_to_displaydate(alc_dates_rec.min_start_date));
4093: hr_utility.trace(l_proc||': alc_dates_rec.max_end_date='|| fnd_date.date_to_displaydate(alc_dates_rec.max_end_date));
4094: --

Line 4091: hr_utility.trace(l_proc||': l_action_flag='|| l_action_flag);

4087: hr_utility.set_location(l_proc, 105);
4088: hr_utility.trace(l_proc||': p_assactid='|| p_assactid);
4089: hr_utility.trace(l_proc||': vehicle_allocation_id='|| alc_rec.vehicle_allocation_id);
4090: hr_utility.trace(l_proc||': vehicle_repository_id='|| alc_rec.vehicle_repository_id);
4091: hr_utility.trace(l_proc||': l_action_flag='|| l_action_flag);
4092: hr_utility.trace(l_proc||': alc_dates_rec.min_start_date='|| fnd_date.date_to_displaydate(alc_dates_rec.min_start_date));
4093: hr_utility.trace(l_proc||': alc_dates_rec.max_end_date='|| fnd_date.date_to_displaydate(alc_dates_rec.max_end_date));
4094: --
4095: archive_allocation_action(p_assignment_id => asg_rec.assignment_id,

Line 4092: hr_utility.trace(l_proc||': alc_dates_rec.min_start_date='|| fnd_date.date_to_displaydate(alc_dates_rec.min_start_date));

4088: hr_utility.trace(l_proc||': p_assactid='|| p_assactid);
4089: hr_utility.trace(l_proc||': vehicle_allocation_id='|| alc_rec.vehicle_allocation_id);
4090: hr_utility.trace(l_proc||': vehicle_repository_id='|| alc_rec.vehicle_repository_id);
4091: hr_utility.trace(l_proc||': l_action_flag='|| l_action_flag);
4092: hr_utility.trace(l_proc||': alc_dates_rec.min_start_date='|| fnd_date.date_to_displaydate(alc_dates_rec.min_start_date));
4093: hr_utility.trace(l_proc||': alc_dates_rec.max_end_date='|| fnd_date.date_to_displaydate(alc_dates_rec.max_end_date));
4094: --
4095: archive_allocation_action(p_assignment_id => asg_rec.assignment_id,
4096: p_asg_act_id => p_assactid,

Line 4093: hr_utility.trace(l_proc||': alc_dates_rec.max_end_date='|| fnd_date.date_to_displaydate(alc_dates_rec.max_end_date));

4089: hr_utility.trace(l_proc||': vehicle_allocation_id='|| alc_rec.vehicle_allocation_id);
4090: hr_utility.trace(l_proc||': vehicle_repository_id='|| alc_rec.vehicle_repository_id);
4091: hr_utility.trace(l_proc||': l_action_flag='|| l_action_flag);
4092: hr_utility.trace(l_proc||': alc_dates_rec.min_start_date='|| fnd_date.date_to_displaydate(alc_dates_rec.min_start_date));
4093: hr_utility.trace(l_proc||': alc_dates_rec.max_end_date='|| fnd_date.date_to_displaydate(alc_dates_rec.max_end_date));
4094: --
4095: archive_allocation_action(p_assignment_id => asg_rec.assignment_id,
4096: p_asg_act_id => p_assactid,
4097: p_vehicle_allocation_id => alc_rec.vehicle_allocation_id,

Line 4112: hr_utility.set_location(l_proc, 110);

4108: -- Fuel type has changed therefore make sure
4109: -- this change occured after the vehicle was
4110: -- allocated to this assignment
4111: --
4112: hr_utility.set_location(l_proc, 110);
4113: hr_utility.trace(l_proc||': effective_start_date='|| vehicle_changes_rec.effective_start_date);
4114: hr_utility.trace(l_proc||': fuel_type='|| vehicle_changes_rec.fuel_type);
4115: --
4116: IF (vehicle_changes_rec.effective_start_date

Line 4113: hr_utility.trace(l_proc||': effective_start_date='|| vehicle_changes_rec.effective_start_date);

4109: -- this change occured after the vehicle was
4110: -- allocated to this assignment
4111: --
4112: hr_utility.set_location(l_proc, 110);
4113: hr_utility.trace(l_proc||': effective_start_date='|| vehicle_changes_rec.effective_start_date);
4114: hr_utility.trace(l_proc||': fuel_type='|| vehicle_changes_rec.fuel_type);
4115: --
4116: IF (vehicle_changes_rec.effective_start_date
4117: BETWEEN alc_dates_rec.min_start_date+1 AND alc_dates_rec.max_end_date) AND

Line 4114: hr_utility.trace(l_proc||': fuel_type='|| vehicle_changes_rec.fuel_type);

4110: -- allocated to this assignment
4111: --
4112: hr_utility.set_location(l_proc, 110);
4113: hr_utility.trace(l_proc||': effective_start_date='|| vehicle_changes_rec.effective_start_date);
4114: hr_utility.trace(l_proc||': fuel_type='|| vehicle_changes_rec.fuel_type);
4115: --
4116: IF (vehicle_changes_rec.effective_start_date
4117: BETWEEN alc_dates_rec.min_start_date+1 AND alc_dates_rec.max_end_date) AND
4118: (vehicle_changes_rec.effective_start_date

Line 4130: hr_utility.set_location(l_proc, 120);

4126: vehicle_changes_rec.effective_start_date,
4127: 'F',
4128: alc_rec.effective_start_date); -- Added for the bug 10088866
4129: --
4130: hr_utility.set_location(l_proc, 120);
4131: hr_utility.trace(l_proc||': l_archived_flag='|| l_archived_flag);
4132: --
4133: IF l_archived_flag = 'N' THEN
4134: -- Action has not been archived already

Line 4131: hr_utility.trace(l_proc||': l_archived_flag='|| l_archived_flag);

4127: 'F',
4128: alc_rec.effective_start_date); -- Added for the bug 10088866
4129: --
4130: hr_utility.set_location(l_proc, 120);
4131: hr_utility.trace(l_proc||': l_archived_flag='|| l_archived_flag);
4132: --
4133: IF l_archived_flag = 'N' THEN
4134: -- Action has not been archived already
4135: -- therefore archive it.

Line 4149: hr_utility.set_location(l_proc, 130);

4145: END IF;
4146: END IF;
4147: END LOOP;
4148: --
4149: hr_utility.set_location(l_proc, 130);
4150: --
4151: L_action_flag := 'X';
4152: l_archived_flag := 'Y';
4153: --

Line 4165: hr_utility.set_location(l_proc, 160);

4161: -- Assignment has started on this payroll or tax ref during the
4162: -- input date range and this car allocation was active on the
4163: -- start date therefore check whether it is a transfer
4164: -- from another tax ref
4165: hr_utility.set_location(l_proc, 160);
4166: l_previous_tax_ref := NULL;
4167: --
4168: OPEN c_tax_ref(asg_rec.assignment_id, asg_rec.asg_min_start_date-1);
4169: FETCH c_tax_ref INTO l_previous_tax_ref;

Line 4172: hr_utility.set_location(l_proc, 170);

4168: OPEN c_tax_ref(asg_rec.assignment_id, asg_rec.asg_min_start_date-1);
4169: FETCH c_tax_ref INTO l_previous_tax_ref;
4170: CLOSE c_tax_ref;
4171: --
4172: hr_utility.set_location(l_proc, 170);
4173: hr_utility.trace(l_proc||', l_previous_tax_ref='||l_previous_tax_ref);
4174: --
4175: IF l_previous_tax_ref is NOT NULL AND l_previous_tax_ref <> g_tax_ref THEN
4176: -- This assignment has a different prior tax ref

Line 4173: hr_utility.trace(l_proc||', l_previous_tax_ref='||l_previous_tax_ref);

4169: FETCH c_tax_ref INTO l_previous_tax_ref;
4170: CLOSE c_tax_ref;
4171: --
4172: hr_utility.set_location(l_proc, 170);
4173: hr_utility.trace(l_proc||', l_previous_tax_ref='||l_previous_tax_ref);
4174: --
4175: IF l_previous_tax_ref is NOT NULL AND l_previous_tax_ref <> g_tax_ref THEN
4176: -- This assignment has a different prior tax ref
4177: -- therefore it should be reported as a new car

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

4175: IF l_previous_tax_ref is NOT NULL AND l_previous_tax_ref <> g_tax_ref THEN
4176: -- This assignment has a different prior tax ref
4177: -- therefore it should be reported as a new car
4178: -- allocation on this EDI message.
4179: hr_utility.set_location(l_proc, 180);
4180: l_action_flag := 'N';
4181: --
4182: -- Check whether this allocation action
4183: -- has been already archived

Line 4191: hr_utility.set_location(l_proc, 190);

4187: asg_rec.asg_min_start_date,
4188: l_action_flag,
4189: alc_rec.effective_start_date); -- Added for the bug 10088866
4190: --
4191: hr_utility.set_location(l_proc, 190);
4192: hr_utility.trace(l_proc||', l_archived_flag='||l_archived_flag);
4193: --
4194: IF l_archived_flag = 'N' THEN
4195: -- Action has not been archived already

Line 4192: hr_utility.trace(l_proc||', l_archived_flag='||l_archived_flag);

4188: l_action_flag,
4189: alc_rec.effective_start_date); -- Added for the bug 10088866
4190: --
4191: hr_utility.set_location(l_proc, 190);
4192: hr_utility.trace(l_proc||', l_archived_flag='||l_archived_flag);
4193: --
4194: IF l_archived_flag = 'N' THEN
4195: -- Action has not been archived already
4196: -- therefore archive it.

Line 4218: hr_utility.set_location(l_proc, 200);

4214: -- Assignment has ended on this payroll or tax ref during the
4215: -- input date range and this car allocation was active on the
4216: -- end date therefore check whether it is a transfer
4217: -- to another tax ref
4218: hr_utility.set_location(l_proc, 200);
4219: l_next_tax_ref := NULL;
4220: --
4221: OPEN c_tax_ref(asg_rec.assignment_id, asg_rec.asg_max_end_date+1);
4222: FETCH c_tax_ref INTO l_next_tax_ref;

Line 4225: hr_utility.set_location(l_proc, 210);

4221: OPEN c_tax_ref(asg_rec.assignment_id, asg_rec.asg_max_end_date+1);
4222: FETCH c_tax_ref INTO l_next_tax_ref;
4223: CLOSE c_tax_ref;
4224: --
4225: hr_utility.set_location(l_proc, 210);
4226: hr_utility.trace(l_proc||', l_next_tax_ref='||l_next_tax_ref);
4227: --
4228: IF l_next_tax_ref is NOT NULL AND l_next_tax_ref <> g_tax_ref THEN
4229: -- This assignment has a different tax ref after end date

Line 4226: hr_utility.trace(l_proc||', l_next_tax_ref='||l_next_tax_ref);

4222: FETCH c_tax_ref INTO l_next_tax_ref;
4223: CLOSE c_tax_ref;
4224: --
4225: hr_utility.set_location(l_proc, 210);
4226: hr_utility.trace(l_proc||', l_next_tax_ref='||l_next_tax_ref);
4227: --
4228: IF l_next_tax_ref is NOT NULL AND l_next_tax_ref <> g_tax_ref THEN
4229: -- This assignment has a different tax ref after end date
4230: -- therefore it should be reported as allocation withdrawal

Line 4232: hr_utility.set_location(l_proc, 220);

4228: IF l_next_tax_ref is NOT NULL AND l_next_tax_ref <> g_tax_ref THEN
4229: -- This assignment has a different tax ref after end date
4230: -- therefore it should be reported as allocation withdrawal
4231: -- on this EDI message.
4232: hr_utility.set_location(l_proc, 220);
4233: l_action_flag := 'W';
4234: --
4235: -- Check whether this allocation action
4236: -- has been already archived

Line 4244: hr_utility.set_location(l_proc, 230);

4240: asg_rec.asg_max_end_date,
4241: l_action_flag,
4242: alc_rec.effective_start_date); -- Added for the bug 10088866
4243: --
4244: hr_utility.set_location(l_proc, 230);
4245: hr_utility.trace(l_proc||', l_archived_flag='||l_archived_flag);
4246: --
4247: IF l_archived_flag = 'N' THEN
4248: -- Action has not been archived already

Line 4245: hr_utility.trace(l_proc||', l_archived_flag='||l_archived_flag);

4241: l_action_flag,
4242: alc_rec.effective_start_date); -- Added for the bug 10088866
4243: --
4244: hr_utility.set_location(l_proc, 230);
4245: hr_utility.trace(l_proc||', l_archived_flag='||l_archived_flag);
4246: --
4247: IF l_archived_flag = 'N' THEN
4248: -- Action has not been archived already
4249: -- therefore archive it.

Line 4262: hr_utility.set_location(l_proc, 240);

4258: --
4259: END IF;
4260: END IF;
4261: --
4262: hr_utility.set_location(l_proc, 240);
4263:
4264: hr_utility.set_location(l_proc, 390);
4265: END LOOP;
4266: --

Line 4264: hr_utility.set_location(l_proc, 390);

4260: END IF;
4261: --
4262: hr_utility.set_location(l_proc, 240);
4263:
4264: hr_utility.set_location(l_proc, 390);
4265: END LOOP;
4266: --
4267: hr_utility.set_location(l_proc, 400);
4268: --

Line 4267: hr_utility.set_location(l_proc, 400);

4263:
4264: hr_utility.set_location(l_proc, 390);
4265: END LOOP;
4266: --
4267: hr_utility.set_location(l_proc, 400);
4268: --
4269: END LOOP;
4270: --
4271: hr_utility.set_location('Leaving: '||l_proc,450);

Line 4271: hr_utility.set_location('Leaving: '||l_proc,450);

4267: hr_utility.set_location(l_proc, 400);
4268: --
4269: END LOOP;
4270: --
4271: hr_utility.set_location('Leaving: '||l_proc,450);
4272: --hr_utility.trace_off;
4273: EXCEPTION
4274: WHEN OTHERS THEN
4275: hr_utility.set_location('Leaving: '||l_proc,300);

Line 4272: --hr_utility.trace_off;

4268: --
4269: END LOOP;
4270: --
4271: hr_utility.set_location('Leaving: '||l_proc,450);
4272: --hr_utility.trace_off;
4273: EXCEPTION
4274: WHEN OTHERS THEN
4275: hr_utility.set_location('Leaving: '||l_proc,300);
4276: -- hr_utility.trace_off;

Line 4275: hr_utility.set_location('Leaving: '||l_proc,300);

4271: hr_utility.set_location('Leaving: '||l_proc,450);
4272: --hr_utility.trace_off;
4273: EXCEPTION
4274: WHEN OTHERS THEN
4275: hr_utility.set_location('Leaving: '||l_proc,300);
4276: -- hr_utility.trace_off;
4277: raise;
4278: END archive_code_v3;
4279:

Line 4276: -- hr_utility.trace_off;

4272: --hr_utility.trace_off;
4273: EXCEPTION
4274: WHEN OTHERS THEN
4275: hr_utility.set_location('Leaving: '||l_proc,300);
4276: -- hr_utility.trace_off;
4277: raise;
4278: END archive_code_v3;
4279:
4280: --For Bug 10095492

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

4311: l_archived_flag VARCHAR2(1);
4312: --
4313: BEGIN
4314:
4315: hr_utility.set_location('Entering '||l_proc, 10);
4316: --
4317: For asg_rec IN c_asg
4318: LOOP
4319: -- Loop through all assignments

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

4316: --
4317: For asg_rec IN c_asg
4318: LOOP
4319: -- Loop through all assignments
4320: hr_utility.set_location(l_proc, 20);
4321: hr_utility.trace(l_proc||': assignment_id='||asg_rec.assignment_id);
4322: hr_utility.trace(l_proc||': asg_min_start_date='||fnd_date.date_to_displaydate(asg_rec.asg_min_start_date));
4323: hr_utility.trace(l_proc||': asg_max_end_date='||fnd_date.date_to_displaydate(asg_rec.asg_max_end_date));
4324: --

Line 4321: hr_utility.trace(l_proc||': assignment_id='||asg_rec.assignment_id);

4317: For asg_rec IN c_asg
4318: LOOP
4319: -- Loop through all assignments
4320: hr_utility.set_location(l_proc, 20);
4321: hr_utility.trace(l_proc||': assignment_id='||asg_rec.assignment_id);
4322: hr_utility.trace(l_proc||': asg_min_start_date='||fnd_date.date_to_displaydate(asg_rec.asg_min_start_date));
4323: hr_utility.trace(l_proc||': asg_max_end_date='||fnd_date.date_to_displaydate(asg_rec.asg_max_end_date));
4324: --
4325: FOR alc_rec IN c_allocations(asg_rec.assignment_id) LOOP

Line 4322: hr_utility.trace(l_proc||': asg_min_start_date='||fnd_date.date_to_displaydate(asg_rec.asg_min_start_date));

4318: LOOP
4319: -- Loop through all assignments
4320: hr_utility.set_location(l_proc, 20);
4321: hr_utility.trace(l_proc||': assignment_id='||asg_rec.assignment_id);
4322: hr_utility.trace(l_proc||': asg_min_start_date='||fnd_date.date_to_displaydate(asg_rec.asg_min_start_date));
4323: hr_utility.trace(l_proc||': asg_max_end_date='||fnd_date.date_to_displaydate(asg_rec.asg_max_end_date));
4324: --
4325: FOR alc_rec IN c_allocations(asg_rec.assignment_id) LOOP
4326: -- Loop through all vehicle allocations

Line 4323: hr_utility.trace(l_proc||': asg_max_end_date='||fnd_date.date_to_displaydate(asg_rec.asg_max_end_date));

4319: -- Loop through all assignments
4320: hr_utility.set_location(l_proc, 20);
4321: hr_utility.trace(l_proc||': assignment_id='||asg_rec.assignment_id);
4322: hr_utility.trace(l_proc||': asg_min_start_date='||fnd_date.date_to_displaydate(asg_rec.asg_min_start_date));
4323: hr_utility.trace(l_proc||': asg_max_end_date='||fnd_date.date_to_displaydate(asg_rec.asg_max_end_date));
4324: --
4325: FOR alc_rec IN c_allocations(asg_rec.assignment_id) LOOP
4326: -- Loop through all vehicle allocations
4327: -- over the date range

Line 4328: hr_utility.set_location(l_proc, 30);

4324: --
4325: FOR alc_rec IN c_allocations(asg_rec.assignment_id) LOOP
4326: -- Loop through all vehicle allocations
4327: -- over the date range
4328: hr_utility.set_location(l_proc, 30);
4329: hr_utility.trace(l_proc||': vehicle_allocation_id='||alc_rec.vehicle_allocation_id);
4330: hr_utility.trace(l_proc||': usage_type='||alc_rec.usage_type);
4331: --
4332: L_action_flag := 'X';

Line 4329: hr_utility.trace(l_proc||': vehicle_allocation_id='||alc_rec.vehicle_allocation_id);

4325: FOR alc_rec IN c_allocations(asg_rec.assignment_id) LOOP
4326: -- Loop through all vehicle allocations
4327: -- over the date range
4328: hr_utility.set_location(l_proc, 30);
4329: hr_utility.trace(l_proc||': vehicle_allocation_id='||alc_rec.vehicle_allocation_id);
4330: hr_utility.trace(l_proc||': usage_type='||alc_rec.usage_type);
4331: --
4332: L_action_flag := 'X';
4333: l_archived_flag := 'Y';

Line 4330: hr_utility.trace(l_proc||': usage_type='||alc_rec.usage_type);

4326: -- Loop through all vehicle allocations
4327: -- over the date range
4328: hr_utility.set_location(l_proc, 30);
4329: hr_utility.trace(l_proc||': vehicle_allocation_id='||alc_rec.vehicle_allocation_id);
4330: hr_utility.trace(l_proc||': usage_type='||alc_rec.usage_type);
4331: --
4332: L_action_flag := 'X';
4333: l_archived_flag := 'Y';
4334: --

Line 4339: hr_utility.set_location(l_proc, 40);

4335: OPEN c_alloc_dates(alc_rec.vehicle_allocation_id);
4336: FETCH c_alloc_dates INTO alc_dates_rec;
4337: CLOSE c_alloc_dates;
4338: --
4339: hr_utility.set_location(l_proc, 40);
4340: hr_utility.trace(l_proc||': min_start_date='|| fnd_date.date_to_displaydate(alc_dates_rec.min_start_date));
4341: hr_utility.trace(l_proc||': max_end_date='|| fnd_date.date_to_displaydate(alc_dates_rec.max_end_date));
4342:
4343: -- Moved the code here from below for the bug 10088866

Line 4340: hr_utility.trace(l_proc||': min_start_date='|| fnd_date.date_to_displaydate(alc_dates_rec.min_start_date));

4336: FETCH c_alloc_dates INTO alc_dates_rec;
4337: CLOSE c_alloc_dates;
4338: --
4339: hr_utility.set_location(l_proc, 40);
4340: hr_utility.trace(l_proc||': min_start_date='|| fnd_date.date_to_displaydate(alc_dates_rec.min_start_date));
4341: hr_utility.trace(l_proc||': max_end_date='|| fnd_date.date_to_displaydate(alc_dates_rec.max_end_date));
4342:
4343: -- Moved the code here from below for the bug 10088866
4344: -- Start moving for the bug 10088866

Line 4341: hr_utility.trace(l_proc||': max_end_date='|| fnd_date.date_to_displaydate(alc_dates_rec.max_end_date));

4337: CLOSE c_alloc_dates;
4338: --
4339: hr_utility.set_location(l_proc, 40);
4340: hr_utility.trace(l_proc||': min_start_date='|| fnd_date.date_to_displaydate(alc_dates_rec.min_start_date));
4341: hr_utility.trace(l_proc||': max_end_date='|| fnd_date.date_to_displaydate(alc_dates_rec.max_end_date));
4342:
4343: -- Moved the code here from below for the bug 10088866
4344: -- Start moving for the bug 10088866
4345: -- Private flag logic

Line 4353: hr_utility.set_location(l_proc, 250);

4349: L_action_flag := 'X';
4350: l_archived_flag := 'Y';
4351: --
4352: FOR private_flag_iterator IN private_flag_arch(alc_rec.vehicle_allocation_id) LOOP
4353: hr_utility.set_location(l_proc, 250);
4354: hr_utility.trace(l_proc||', private_flag_iterator.private_use_flag='||private_flag_iterator.private_use_flag);
4355:
4356: L_action_flag := 'X';
4357: l_archived_flag := 'Y';

Line 4354: hr_utility.trace(l_proc||', private_flag_iterator.private_use_flag='||private_flag_iterator.private_use_flag);

4350: l_archived_flag := 'Y';
4351: --
4352: FOR private_flag_iterator IN private_flag_arch(alc_rec.vehicle_allocation_id) LOOP
4353: hr_utility.set_location(l_proc, 250);
4354: hr_utility.trace(l_proc||', private_flag_iterator.private_use_flag='||private_flag_iterator.private_use_flag);
4355:
4356: L_action_flag := 'X';
4357: l_archived_flag := 'Y';
4358:

Line 4372: hr_utility.set_location(l_proc, 260);

4368: private_flag_iterator.effective_start_date,
4369: l_action_flag,
4370: private_flag_iterator.effective_start_date);
4371: --
4372: hr_utility.set_location(l_proc, 260);
4373: hr_utility.trace(l_proc||', l_archived_flag='||l_archived_flag);
4374: --
4375: IF l_archived_flag = 'N' THEN
4376: -- Action has not been archived already

Line 4373: hr_utility.trace(l_proc||', l_archived_flag='||l_archived_flag);

4369: l_action_flag,
4370: private_flag_iterator.effective_start_date);
4371: --
4372: hr_utility.set_location(l_proc, 260);
4373: hr_utility.trace(l_proc||', l_archived_flag='||l_archived_flag);
4374: --
4375: IF l_archived_flag = 'N' THEN
4376: -- Action has not been archived already
4377: -- therefore archive it.

Line 4421: hr_utility.set_location(l_proc, 50);

4417: OPEN c_first_asg(asg_rec.assignment_id, alc_dates_rec.min_start_date);
4418: FETCH c_first_asg INTO first_asg_rec;
4419: CLOSE c_first_asg;
4420: --
4421: hr_utility.set_location(l_proc, 50);
4422: hr_utility.trace(l_proc||': First Assignment='|| first_asg_rec.assignment_id);
4423: -- Get primary car allocation of the
4424: -- first assignment of this person
4425: -- in this tax ref

Line 4422: hr_utility.trace(l_proc||': First Assignment='|| first_asg_rec.assignment_id);

4418: FETCH c_first_asg INTO first_asg_rec;
4419: CLOSE c_first_asg;
4420: --
4421: hr_utility.set_location(l_proc, 50);
4422: hr_utility.trace(l_proc||': First Assignment='|| first_asg_rec.assignment_id);
4423: -- Get primary car allocation of the
4424: -- first assignment of this person
4425: -- in this tax ref
4426: OPEN c_primary_car(first_asg_rec.assignment_id, alc_dates_rec.min_start_date);

Line 4430: hr_utility.set_location(l_proc, 60);

4426: OPEN c_primary_car(first_asg_rec.assignment_id, alc_dates_rec.min_start_date);
4427: FETCH c_primary_car INTO primary_car_rec;
4428: CLOSE c_primary_car;
4429: --
4430: hr_utility.set_location(l_proc, 60);
4431: hr_utility.trace(l_proc||': Primary Car Allocation='|| primary_car_rec.vehicle_allocation_id);
4432: --
4433: IF primary_car_rec.vehicle_allocation_id = alc_rec.vehicle_allocation_id THEN
4434: -- This is the first car allocation

Line 4431: hr_utility.trace(l_proc||': Primary Car Allocation='|| primary_car_rec.vehicle_allocation_id);

4427: FETCH c_primary_car INTO primary_car_rec;
4428: CLOSE c_primary_car;
4429: --
4430: hr_utility.set_location(l_proc, 60);
4431: hr_utility.trace(l_proc||': Primary Car Allocation='|| primary_car_rec.vehicle_allocation_id);
4432: --
4433: IF primary_car_rec.vehicle_allocation_id = alc_rec.vehicle_allocation_id THEN
4434: -- This is the first car allocation
4435: -- of this employee in this tax ref

Line 4446: hr_utility.set_location(l_proc, 70);

4442: ELSE
4443: L_action_flag := 'N';
4444: END IF;
4445: --
4446: hr_utility.set_location(l_proc, 70);
4447: hr_utility.trace(l_proc||': l_action_flag='|| l_action_flag);
4448: --
4449: CLOSE c_prior_prim_car;
4450: ELSE

Line 4447: hr_utility.trace(l_proc||': l_action_flag='|| l_action_flag);

4443: L_action_flag := 'N';
4444: END IF;
4445: --
4446: hr_utility.set_location(l_proc, 70);
4447: hr_utility.trace(l_proc||': l_action_flag='|| l_action_flag);
4448: --
4449: CLOSE c_prior_prim_car;
4450: ELSE
4451: -- Not the first car of the employee

Line 4456: hr_utility.set_location(l_proc, 80);

4452: -- report this as new car
4453: L_action_flag := 'N';
4454: END IF;
4455: --
4456: hr_utility.set_location(l_proc, 80);
4457: hr_utility.trace(l_proc||': l_action_flag='|| l_action_flag);
4458: --
4459: ELSE
4460: -- Not a primary car therefore mark

Line 4457: hr_utility.trace(l_proc||': l_action_flag='|| l_action_flag);

4453: L_action_flag := 'N';
4454: END IF;
4455: --
4456: hr_utility.set_location(l_proc, 80);
4457: hr_utility.trace(l_proc||': l_action_flag='|| l_action_flag);
4458: --
4459: ELSE
4460: -- Not a primary car therefore mark
4461: -- it as new car allocation action

Line 4465: hr_utility.set_location(l_proc, 90);

4461: -- it as new car allocation action
4462: l_action_flag := 'N';
4463: END IF;
4464: --
4465: hr_utility.set_location(l_proc, 90);
4466: hr_utility.trace(l_proc||': l_action_flag='|| l_action_flag);
4467: --
4468: IF L_action_flag <> 'X' THEN
4469: -- Check whether this allocation action

Line 4466: hr_utility.trace(l_proc||': l_action_flag='|| l_action_flag);

4462: l_action_flag := 'N';
4463: END IF;
4464: --
4465: hr_utility.set_location(l_proc, 90);
4466: hr_utility.trace(l_proc||': l_action_flag='|| l_action_flag);
4467: --
4468: IF L_action_flag <> 'X' THEN
4469: -- Check whether this allocation action
4470: -- has been already archived

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

4474: alc_dates_rec.min_start_date,
4475: l_action_flag,
4476: alc_rec.effective_start_date); -- Added for the bug 10088866
4477: --
4478: hr_utility.set_location(l_proc, 100);
4479: hr_utility.trace(l_proc||': l_archived_flag='|| l_archived_flag);
4480: --
4481: IF (l_archived_flag = 'N')
4482: THEN

Line 4479: hr_utility.trace(l_proc||': l_archived_flag='|| l_archived_flag);

4475: l_action_flag,
4476: alc_rec.effective_start_date); -- Added for the bug 10088866
4477: --
4478: hr_utility.set_location(l_proc, 100);
4479: hr_utility.trace(l_proc||': l_archived_flag='|| l_archived_flag);
4480: --
4481: IF (l_archived_flag = 'N')
4482: THEN
4483: -- Action has not been archived already

Line 4485: hr_utility.set_location(l_proc, 105);

4481: IF (l_archived_flag = 'N')
4482: THEN
4483: -- Action has not been archived already
4484: -- therefore archive it.
4485: hr_utility.set_location(l_proc, 105);
4486: hr_utility.trace(l_proc||': p_assactid='|| p_assactid);
4487: hr_utility.trace(l_proc||': vehicle_allocation_id='|| alc_rec.vehicle_allocation_id);
4488: hr_utility.trace(l_proc||': vehicle_repository_id='|| alc_rec.vehicle_repository_id);
4489: hr_utility.trace(l_proc||': l_action_flag='|| l_action_flag);

Line 4486: hr_utility.trace(l_proc||': p_assactid='|| p_assactid);

4482: THEN
4483: -- Action has not been archived already
4484: -- therefore archive it.
4485: hr_utility.set_location(l_proc, 105);
4486: hr_utility.trace(l_proc||': p_assactid='|| p_assactid);
4487: hr_utility.trace(l_proc||': vehicle_allocation_id='|| alc_rec.vehicle_allocation_id);
4488: hr_utility.trace(l_proc||': vehicle_repository_id='|| alc_rec.vehicle_repository_id);
4489: hr_utility.trace(l_proc||': l_action_flag='|| l_action_flag);
4490: hr_utility.trace(l_proc||': alc_dates_rec.min_start_date='|| fnd_date.date_to_displaydate(alc_dates_rec.min_start_date));

Line 4487: hr_utility.trace(l_proc||': vehicle_allocation_id='|| alc_rec.vehicle_allocation_id);

4483: -- Action has not been archived already
4484: -- therefore archive it.
4485: hr_utility.set_location(l_proc, 105);
4486: hr_utility.trace(l_proc||': p_assactid='|| p_assactid);
4487: hr_utility.trace(l_proc||': vehicle_allocation_id='|| alc_rec.vehicle_allocation_id);
4488: hr_utility.trace(l_proc||': vehicle_repository_id='|| alc_rec.vehicle_repository_id);
4489: hr_utility.trace(l_proc||': l_action_flag='|| l_action_flag);
4490: hr_utility.trace(l_proc||': alc_dates_rec.min_start_date='|| fnd_date.date_to_displaydate(alc_dates_rec.min_start_date));
4491: hr_utility.trace(l_proc||': alc_dates_rec.max_end_date='|| fnd_date.date_to_displaydate(alc_dates_rec.max_end_date));

Line 4488: hr_utility.trace(l_proc||': vehicle_repository_id='|| alc_rec.vehicle_repository_id);

4484: -- therefore archive it.
4485: hr_utility.set_location(l_proc, 105);
4486: hr_utility.trace(l_proc||': p_assactid='|| p_assactid);
4487: hr_utility.trace(l_proc||': vehicle_allocation_id='|| alc_rec.vehicle_allocation_id);
4488: hr_utility.trace(l_proc||': vehicle_repository_id='|| alc_rec.vehicle_repository_id);
4489: hr_utility.trace(l_proc||': l_action_flag='|| l_action_flag);
4490: hr_utility.trace(l_proc||': alc_dates_rec.min_start_date='|| fnd_date.date_to_displaydate(alc_dates_rec.min_start_date));
4491: hr_utility.trace(l_proc||': alc_dates_rec.max_end_date='|| fnd_date.date_to_displaydate(alc_dates_rec.max_end_date));
4492: --

Line 4489: hr_utility.trace(l_proc||': l_action_flag='|| l_action_flag);

4485: hr_utility.set_location(l_proc, 105);
4486: hr_utility.trace(l_proc||': p_assactid='|| p_assactid);
4487: hr_utility.trace(l_proc||': vehicle_allocation_id='|| alc_rec.vehicle_allocation_id);
4488: hr_utility.trace(l_proc||': vehicle_repository_id='|| alc_rec.vehicle_repository_id);
4489: hr_utility.trace(l_proc||': l_action_flag='|| l_action_flag);
4490: hr_utility.trace(l_proc||': alc_dates_rec.min_start_date='|| fnd_date.date_to_displaydate(alc_dates_rec.min_start_date));
4491: hr_utility.trace(l_proc||': alc_dates_rec.max_end_date='|| fnd_date.date_to_displaydate(alc_dates_rec.max_end_date));
4492: --
4493: archive_allocation_action(p_assignment_id => asg_rec.assignment_id,

Line 4490: hr_utility.trace(l_proc||': alc_dates_rec.min_start_date='|| fnd_date.date_to_displaydate(alc_dates_rec.min_start_date));

4486: hr_utility.trace(l_proc||': p_assactid='|| p_assactid);
4487: hr_utility.trace(l_proc||': vehicle_allocation_id='|| alc_rec.vehicle_allocation_id);
4488: hr_utility.trace(l_proc||': vehicle_repository_id='|| alc_rec.vehicle_repository_id);
4489: hr_utility.trace(l_proc||': l_action_flag='|| l_action_flag);
4490: hr_utility.trace(l_proc||': alc_dates_rec.min_start_date='|| fnd_date.date_to_displaydate(alc_dates_rec.min_start_date));
4491: hr_utility.trace(l_proc||': alc_dates_rec.max_end_date='|| fnd_date.date_to_displaydate(alc_dates_rec.max_end_date));
4492: --
4493: archive_allocation_action(p_assignment_id => asg_rec.assignment_id,
4494: p_asg_act_id => p_assactid,

Line 4491: hr_utility.trace(l_proc||': alc_dates_rec.max_end_date='|| fnd_date.date_to_displaydate(alc_dates_rec.max_end_date));

4487: hr_utility.trace(l_proc||': vehicle_allocation_id='|| alc_rec.vehicle_allocation_id);
4488: hr_utility.trace(l_proc||': vehicle_repository_id='|| alc_rec.vehicle_repository_id);
4489: hr_utility.trace(l_proc||': l_action_flag='|| l_action_flag);
4490: hr_utility.trace(l_proc||': alc_dates_rec.min_start_date='|| fnd_date.date_to_displaydate(alc_dates_rec.min_start_date));
4491: hr_utility.trace(l_proc||': alc_dates_rec.max_end_date='|| fnd_date.date_to_displaydate(alc_dates_rec.max_end_date));
4492: --
4493: archive_allocation_action(p_assignment_id => asg_rec.assignment_id,
4494: p_asg_act_id => p_assactid,
4495: p_vehicle_allocation_id => alc_rec.vehicle_allocation_id,

Line 4523: hr_utility.set_location(l_proc, 50);

4519: OPEN c_first_asg(asg_rec.assignment_id, alc_dates_rec.max_end_date);
4520: FETCH c_first_asg INTO first_asg_rec;
4521: CLOSE c_first_asg;
4522: --
4523: hr_utility.set_location(l_proc, 50);
4524: hr_utility.trace(l_proc||': First Assignment='|| first_asg_rec.assignment_id);
4525: -- Get primary car allocation of the
4526: -- first assignment of this person
4527: -- in this tax ref

Line 4524: hr_utility.trace(l_proc||': First Assignment='|| first_asg_rec.assignment_id);

4520: FETCH c_first_asg INTO first_asg_rec;
4521: CLOSE c_first_asg;
4522: --
4523: hr_utility.set_location(l_proc, 50);
4524: hr_utility.trace(l_proc||': First Assignment='|| first_asg_rec.assignment_id);
4525: -- Get primary car allocation of the
4526: -- first assignment of this person
4527: -- in this tax ref
4528: OPEN c_primary_car(first_asg_rec.assignment_id, alc_dates_rec.max_end_date);

Line 4532: hr_utility.set_location(l_proc, 60);

4528: OPEN c_primary_car(first_asg_rec.assignment_id, alc_dates_rec.max_end_date);
4529: FETCH c_primary_car INTO primary_car_rec;
4530: CLOSE c_primary_car;
4531: --
4532: hr_utility.set_location(l_proc, 60);
4533: hr_utility.trace(l_proc||': Primary Car Allocation='|| primary_car_rec.vehicle_allocation_id);
4534: --
4535: IF primary_car_rec.vehicle_allocation_id = alc_rec.vehicle_allocation_id THEN
4536: --

Line 4533: hr_utility.trace(l_proc||': Primary Car Allocation='|| primary_car_rec.vehicle_allocation_id);

4529: FETCH c_primary_car INTO primary_car_rec;
4530: CLOSE c_primary_car;
4531: --
4532: hr_utility.set_location(l_proc, 60);
4533: hr_utility.trace(l_proc||': Primary Car Allocation='|| primary_car_rec.vehicle_allocation_id);
4534: --
4535: IF primary_car_rec.vehicle_allocation_id = alc_rec.vehicle_allocation_id THEN
4536: --
4537: OPEN c_next_prim_car(asg_rec.assignment_id, Alc_dates_rec.max_end_date);

Line 4549: hr_utility.set_location(l_proc, 70);

4545: -- This is a withdrawal action
4546: L_action_flag := 'W';
4547: END IF;
4548: --
4549: hr_utility.set_location(l_proc, 70);
4550: hr_utility.trace(l_proc||': l_action_flag='|| l_action_flag);
4551: --
4552: CLOSE c_next_prim_car;
4553: ELSE

Line 4550: hr_utility.trace(l_proc||': l_action_flag='|| l_action_flag);

4546: L_action_flag := 'W';
4547: END IF;
4548: --
4549: hr_utility.set_location(l_proc, 70);
4550: hr_utility.trace(l_proc||': l_action_flag='|| l_action_flag);
4551: --
4552: CLOSE c_next_prim_car;
4553: ELSE
4554: -- Not the first car of the employee

Line 4560: hr_utility.set_location(l_proc, 80);

4556: L_action_flag := 'W';
4557: END IF;
4558: --
4559: --
4560: hr_utility.set_location(l_proc, 80);
4561: hr_utility.trace(l_proc||': l_action_flag='|| l_action_flag);
4562: --
4563: ELSE
4564: -- Not a first car therefore mark

Line 4561: hr_utility.trace(l_proc||': l_action_flag='|| l_action_flag);

4557: END IF;
4558: --
4559: --
4560: hr_utility.set_location(l_proc, 80);
4561: hr_utility.trace(l_proc||': l_action_flag='|| l_action_flag);
4562: --
4563: ELSE
4564: -- Not a first car therefore mark
4565: -- it as withdrawal car action

Line 4569: hr_utility.set_location(l_proc, 90);

4565: -- it as withdrawal car action
4566: l_action_flag := 'W';
4567: END IF;
4568: --
4569: hr_utility.set_location(l_proc, 90);
4570: hr_utility.trace(l_proc||': l_action_flag='|| l_action_flag);
4571: --
4572: IF L_action_flag <> 'X' THEN
4573: -- Check whether this allocation action

Line 4570: hr_utility.trace(l_proc||': l_action_flag='|| l_action_flag);

4566: l_action_flag := 'W';
4567: END IF;
4568: --
4569: hr_utility.set_location(l_proc, 90);
4570: hr_utility.trace(l_proc||': l_action_flag='|| l_action_flag);
4571: --
4572: IF L_action_flag <> 'X' THEN
4573: -- Check whether this allocation action
4574: -- has been already archived

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

4578: alc_dates_rec.min_start_date,
4579: l_action_flag,
4580: alc_rec.effective_start_date); -- Added for the bug 10088866
4581: --
4582: hr_utility.set_location(l_proc, 100);
4583: hr_utility.trace(l_proc||': l_archived_flag='|| l_archived_flag);
4584: --
4585: IF l_archived_flag = 'N' THEN
4586: -- Action has not been archived already

Line 4583: hr_utility.trace(l_proc||': l_archived_flag='|| l_archived_flag);

4579: l_action_flag,
4580: alc_rec.effective_start_date); -- Added for the bug 10088866
4581: --
4582: hr_utility.set_location(l_proc, 100);
4583: hr_utility.trace(l_proc||': l_archived_flag='|| l_archived_flag);
4584: --
4585: IF l_archived_flag = 'N' THEN
4586: -- Action has not been archived already
4587: -- therefore archive it.

Line 4588: hr_utility.set_location(l_proc, 105);

4584: --
4585: IF l_archived_flag = 'N' THEN
4586: -- Action has not been archived already
4587: -- therefore archive it.
4588: hr_utility.set_location(l_proc, 105);
4589: hr_utility.trace(l_proc||': p_assactid='|| p_assactid);
4590: hr_utility.trace(l_proc||': vehicle_allocation_id='|| alc_rec.vehicle_allocation_id);
4591: hr_utility.trace(l_proc||': vehicle_repository_id='|| alc_rec.vehicle_repository_id);
4592: hr_utility.trace(l_proc||': l_action_flag='|| l_action_flag);

Line 4589: hr_utility.trace(l_proc||': p_assactid='|| p_assactid);

4585: IF l_archived_flag = 'N' THEN
4586: -- Action has not been archived already
4587: -- therefore archive it.
4588: hr_utility.set_location(l_proc, 105);
4589: hr_utility.trace(l_proc||': p_assactid='|| p_assactid);
4590: hr_utility.trace(l_proc||': vehicle_allocation_id='|| alc_rec.vehicle_allocation_id);
4591: hr_utility.trace(l_proc||': vehicle_repository_id='|| alc_rec.vehicle_repository_id);
4592: hr_utility.trace(l_proc||': l_action_flag='|| l_action_flag);
4593: hr_utility.trace(l_proc||': alc_dates_rec.min_start_date='|| fnd_date.date_to_displaydate(alc_dates_rec.min_start_date));

Line 4590: hr_utility.trace(l_proc||': vehicle_allocation_id='|| alc_rec.vehicle_allocation_id);

4586: -- Action has not been archived already
4587: -- therefore archive it.
4588: hr_utility.set_location(l_proc, 105);
4589: hr_utility.trace(l_proc||': p_assactid='|| p_assactid);
4590: hr_utility.trace(l_proc||': vehicle_allocation_id='|| alc_rec.vehicle_allocation_id);
4591: hr_utility.trace(l_proc||': vehicle_repository_id='|| alc_rec.vehicle_repository_id);
4592: hr_utility.trace(l_proc||': l_action_flag='|| l_action_flag);
4593: hr_utility.trace(l_proc||': alc_dates_rec.min_start_date='|| fnd_date.date_to_displaydate(alc_dates_rec.min_start_date));
4594: hr_utility.trace(l_proc||': alc_dates_rec.max_end_date='|| fnd_date.date_to_displaydate(alc_dates_rec.max_end_date));

Line 4591: hr_utility.trace(l_proc||': vehicle_repository_id='|| alc_rec.vehicle_repository_id);

4587: -- therefore archive it.
4588: hr_utility.set_location(l_proc, 105);
4589: hr_utility.trace(l_proc||': p_assactid='|| p_assactid);
4590: hr_utility.trace(l_proc||': vehicle_allocation_id='|| alc_rec.vehicle_allocation_id);
4591: hr_utility.trace(l_proc||': vehicle_repository_id='|| alc_rec.vehicle_repository_id);
4592: hr_utility.trace(l_proc||': l_action_flag='|| l_action_flag);
4593: hr_utility.trace(l_proc||': alc_dates_rec.min_start_date='|| fnd_date.date_to_displaydate(alc_dates_rec.min_start_date));
4594: hr_utility.trace(l_proc||': alc_dates_rec.max_end_date='|| fnd_date.date_to_displaydate(alc_dates_rec.max_end_date));
4595: --

Line 4592: hr_utility.trace(l_proc||': l_action_flag='|| l_action_flag);

4588: hr_utility.set_location(l_proc, 105);
4589: hr_utility.trace(l_proc||': p_assactid='|| p_assactid);
4590: hr_utility.trace(l_proc||': vehicle_allocation_id='|| alc_rec.vehicle_allocation_id);
4591: hr_utility.trace(l_proc||': vehicle_repository_id='|| alc_rec.vehicle_repository_id);
4592: hr_utility.trace(l_proc||': l_action_flag='|| l_action_flag);
4593: hr_utility.trace(l_proc||': alc_dates_rec.min_start_date='|| fnd_date.date_to_displaydate(alc_dates_rec.min_start_date));
4594: hr_utility.trace(l_proc||': alc_dates_rec.max_end_date='|| fnd_date.date_to_displaydate(alc_dates_rec.max_end_date));
4595: --
4596: archive_allocation_action(p_assignment_id => asg_rec.assignment_id,

Line 4593: hr_utility.trace(l_proc||': alc_dates_rec.min_start_date='|| fnd_date.date_to_displaydate(alc_dates_rec.min_start_date));

4589: hr_utility.trace(l_proc||': p_assactid='|| p_assactid);
4590: hr_utility.trace(l_proc||': vehicle_allocation_id='|| alc_rec.vehicle_allocation_id);
4591: hr_utility.trace(l_proc||': vehicle_repository_id='|| alc_rec.vehicle_repository_id);
4592: hr_utility.trace(l_proc||': l_action_flag='|| l_action_flag);
4593: hr_utility.trace(l_proc||': alc_dates_rec.min_start_date='|| fnd_date.date_to_displaydate(alc_dates_rec.min_start_date));
4594: hr_utility.trace(l_proc||': alc_dates_rec.max_end_date='|| fnd_date.date_to_displaydate(alc_dates_rec.max_end_date));
4595: --
4596: archive_allocation_action(p_assignment_id => asg_rec.assignment_id,
4597: p_asg_act_id => p_assactid,

Line 4594: hr_utility.trace(l_proc||': alc_dates_rec.max_end_date='|| fnd_date.date_to_displaydate(alc_dates_rec.max_end_date));

4590: hr_utility.trace(l_proc||': vehicle_allocation_id='|| alc_rec.vehicle_allocation_id);
4591: hr_utility.trace(l_proc||': vehicle_repository_id='|| alc_rec.vehicle_repository_id);
4592: hr_utility.trace(l_proc||': l_action_flag='|| l_action_flag);
4593: hr_utility.trace(l_proc||': alc_dates_rec.min_start_date='|| fnd_date.date_to_displaydate(alc_dates_rec.min_start_date));
4594: hr_utility.trace(l_proc||': alc_dates_rec.max_end_date='|| fnd_date.date_to_displaydate(alc_dates_rec.max_end_date));
4595: --
4596: archive_allocation_action(p_assignment_id => asg_rec.assignment_id,
4597: p_asg_act_id => p_assactid,
4598: p_vehicle_allocation_id => alc_rec.vehicle_allocation_id,

Line 4614: hr_utility.set_location(l_proc, 110);

4610: -- Fuel type has changed therefore make sure
4611: -- this change occured after the vehicle was
4612: -- allocated to this assignment
4613: --
4614: hr_utility.set_location(l_proc, 110);
4615: hr_utility.trace(l_proc||': effective_start_date='|| vehicle_changes_rec.effective_start_date);
4616: hr_utility.trace(l_proc||': fuel_type='|| vehicle_changes_rec.fuel_type);
4617: --
4618: IF (vehicle_changes_rec.effective_start_date

Line 4615: hr_utility.trace(l_proc||': effective_start_date='|| vehicle_changes_rec.effective_start_date);

4611: -- this change occured after the vehicle was
4612: -- allocated to this assignment
4613: --
4614: hr_utility.set_location(l_proc, 110);
4615: hr_utility.trace(l_proc||': effective_start_date='|| vehicle_changes_rec.effective_start_date);
4616: hr_utility.trace(l_proc||': fuel_type='|| vehicle_changes_rec.fuel_type);
4617: --
4618: IF (vehicle_changes_rec.effective_start_date
4619: BETWEEN alc_dates_rec.min_start_date+1 AND alc_dates_rec.max_end_date) AND

Line 4616: hr_utility.trace(l_proc||': fuel_type='|| vehicle_changes_rec.fuel_type);

4612: -- allocated to this assignment
4613: --
4614: hr_utility.set_location(l_proc, 110);
4615: hr_utility.trace(l_proc||': effective_start_date='|| vehicle_changes_rec.effective_start_date);
4616: hr_utility.trace(l_proc||': fuel_type='|| vehicle_changes_rec.fuel_type);
4617: --
4618: IF (vehicle_changes_rec.effective_start_date
4619: BETWEEN alc_dates_rec.min_start_date+1 AND alc_dates_rec.max_end_date) AND
4620: (vehicle_changes_rec.effective_start_date

Line 4632: hr_utility.set_location(l_proc, 120);

4628: vehicle_changes_rec.effective_start_date,
4629: 'F',
4630: alc_rec.effective_start_date); -- Added for the bug 10088866
4631: --
4632: hr_utility.set_location(l_proc, 120);
4633: hr_utility.trace(l_proc||': l_archived_flag='|| l_archived_flag);
4634: --
4635: IF l_archived_flag = 'N' THEN
4636: -- Action has not been archived already

Line 4633: hr_utility.trace(l_proc||': l_archived_flag='|| l_archived_flag);

4629: 'F',
4630: alc_rec.effective_start_date); -- Added for the bug 10088866
4631: --
4632: hr_utility.set_location(l_proc, 120);
4633: hr_utility.trace(l_proc||': l_archived_flag='|| l_archived_flag);
4634: --
4635: IF l_archived_flag = 'N' THEN
4636: -- Action has not been archived already
4637: -- therefore archive it.

Line 4652: hr_utility.set_location(l_proc, 130);

4648: END IF;
4649: END IF;
4650: END LOOP;
4651: --
4652: hr_utility.set_location(l_proc, 130);
4653: --
4654: L_action_flag := 'X';
4655: l_archived_flag := 'Y';
4656: --

Line 4668: hr_utility.set_location(l_proc, 160);

4664: -- Assignment has started on this payroll or tax ref during the
4665: -- input date range and this car allocation was active on the
4666: -- start date therefore check whether it is a transfer
4667: -- from another tax ref
4668: hr_utility.set_location(l_proc, 160);
4669: l_previous_tax_ref := NULL;
4670: --
4671: OPEN c_tax_ref(asg_rec.assignment_id, asg_rec.asg_min_start_date-1);
4672: FETCH c_tax_ref INTO l_previous_tax_ref;

Line 4675: hr_utility.set_location(l_proc, 170);

4671: OPEN c_tax_ref(asg_rec.assignment_id, asg_rec.asg_min_start_date-1);
4672: FETCH c_tax_ref INTO l_previous_tax_ref;
4673: CLOSE c_tax_ref;
4674: --
4675: hr_utility.set_location(l_proc, 170);
4676: hr_utility.trace(l_proc||', l_previous_tax_ref='||l_previous_tax_ref);
4677: --
4678: IF l_previous_tax_ref is NOT NULL AND l_previous_tax_ref <> g_tax_ref THEN
4679: -- This assignment has a different prior tax ref

Line 4676: hr_utility.trace(l_proc||', l_previous_tax_ref='||l_previous_tax_ref);

4672: FETCH c_tax_ref INTO l_previous_tax_ref;
4673: CLOSE c_tax_ref;
4674: --
4675: hr_utility.set_location(l_proc, 170);
4676: hr_utility.trace(l_proc||', l_previous_tax_ref='||l_previous_tax_ref);
4677: --
4678: IF l_previous_tax_ref is NOT NULL AND l_previous_tax_ref <> g_tax_ref THEN
4679: -- This assignment has a different prior tax ref
4680: -- therefore it should be reported as a new car

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

4678: IF l_previous_tax_ref is NOT NULL AND l_previous_tax_ref <> g_tax_ref THEN
4679: -- This assignment has a different prior tax ref
4680: -- therefore it should be reported as a new car
4681: -- allocation on this EDI message.
4682: hr_utility.set_location(l_proc, 180);
4683: l_action_flag := 'N';
4684: --
4685: -- Check whether this allocation action
4686: -- has been already archived

Line 4694: hr_utility.set_location(l_proc, 190);

4690: asg_rec.asg_min_start_date,
4691: l_action_flag,
4692: alc_rec.effective_start_date); -- Added for the bug 10088866
4693: --
4694: hr_utility.set_location(l_proc, 190);
4695: hr_utility.trace(l_proc||', l_archived_flag='||l_archived_flag);
4696: --
4697: IF l_archived_flag = 'N' THEN
4698: -- Action has not been archived already

Line 4695: hr_utility.trace(l_proc||', l_archived_flag='||l_archived_flag);

4691: l_action_flag,
4692: alc_rec.effective_start_date); -- Added for the bug 10088866
4693: --
4694: hr_utility.set_location(l_proc, 190);
4695: hr_utility.trace(l_proc||', l_archived_flag='||l_archived_flag);
4696: --
4697: IF l_archived_flag = 'N' THEN
4698: -- Action has not been archived already
4699: -- therefore archive it.

Line 4722: hr_utility.set_location(l_proc, 200);

4718: -- Assignment has ended on this payroll or tax ref during the
4719: -- input date range and this car allocation was active on the
4720: -- end date therefore check whether it is a transfer
4721: -- to another tax ref
4722: hr_utility.set_location(l_proc, 200);
4723: l_next_tax_ref := NULL;
4724: --
4725: OPEN c_tax_ref(asg_rec.assignment_id, asg_rec.asg_max_end_date+1);
4726: FETCH c_tax_ref INTO l_next_tax_ref;

Line 4729: hr_utility.set_location(l_proc, 210);

4725: OPEN c_tax_ref(asg_rec.assignment_id, asg_rec.asg_max_end_date+1);
4726: FETCH c_tax_ref INTO l_next_tax_ref;
4727: CLOSE c_tax_ref;
4728: --
4729: hr_utility.set_location(l_proc, 210);
4730: hr_utility.trace(l_proc||', l_next_tax_ref='||l_next_tax_ref);
4731: --
4732: IF l_next_tax_ref is NOT NULL AND l_next_tax_ref <> g_tax_ref THEN
4733: -- This assignment has a different tax ref after end date

Line 4730: hr_utility.trace(l_proc||', l_next_tax_ref='||l_next_tax_ref);

4726: FETCH c_tax_ref INTO l_next_tax_ref;
4727: CLOSE c_tax_ref;
4728: --
4729: hr_utility.set_location(l_proc, 210);
4730: hr_utility.trace(l_proc||', l_next_tax_ref='||l_next_tax_ref);
4731: --
4732: IF l_next_tax_ref is NOT NULL AND l_next_tax_ref <> g_tax_ref THEN
4733: -- This assignment has a different tax ref after end date
4734: -- therefore it should be reported as allocation withdrawal

Line 4736: hr_utility.set_location(l_proc, 220);

4732: IF l_next_tax_ref is NOT NULL AND l_next_tax_ref <> g_tax_ref THEN
4733: -- This assignment has a different tax ref after end date
4734: -- therefore it should be reported as allocation withdrawal
4735: -- on this EDI message.
4736: hr_utility.set_location(l_proc, 220);
4737: l_action_flag := 'W';
4738: --
4739: -- Check whether this allocation action
4740: -- has been already archived

Line 4748: hr_utility.set_location(l_proc, 230);

4744: asg_rec.asg_max_end_date,
4745: l_action_flag,
4746: alc_rec.effective_start_date); -- Added for the bug 10088866
4747: --
4748: hr_utility.set_location(l_proc, 230);
4749: hr_utility.trace(l_proc||', l_archived_flag='||l_archived_flag);
4750: --
4751: IF l_archived_flag = 'N' THEN
4752: -- Action has not been archived already

Line 4749: hr_utility.trace(l_proc||', l_archived_flag='||l_archived_flag);

4745: l_action_flag,
4746: alc_rec.effective_start_date); -- Added for the bug 10088866
4747: --
4748: hr_utility.set_location(l_proc, 230);
4749: hr_utility.trace(l_proc||', l_archived_flag='||l_archived_flag);
4750: --
4751: IF l_archived_flag = 'N' THEN
4752: -- Action has not been archived already
4753: -- therefore archive it.

Line 4767: hr_utility.set_location(l_proc, 240);

4763: --
4764: END IF;
4765: END IF;
4766: --
4767: hr_utility.set_location(l_proc, 240);
4768:
4769: hr_utility.set_location(l_proc, 390);
4770: END LOOP;
4771: --

Line 4769: hr_utility.set_location(l_proc, 390);

4765: END IF;
4766: --
4767: hr_utility.set_location(l_proc, 240);
4768:
4769: hr_utility.set_location(l_proc, 390);
4770: END LOOP;
4771: --
4772: hr_utility.set_location(l_proc, 400);
4773: --

Line 4772: hr_utility.set_location(l_proc, 400);

4768:
4769: hr_utility.set_location(l_proc, 390);
4770: END LOOP;
4771: --
4772: hr_utility.set_location(l_proc, 400);
4773: --
4774: END LOOP;
4775: --
4776: hr_utility.set_location('Leaving: '||l_proc,450);

Line 4776: hr_utility.set_location('Leaving: '||l_proc,450);

4772: hr_utility.set_location(l_proc, 400);
4773: --
4774: END LOOP;
4775: --
4776: hr_utility.set_location('Leaving: '||l_proc,450);
4777: --hr_utility.trace_off;
4778: EXCEPTION
4779: WHEN OTHERS THEN
4780: hr_utility.set_location('Leaving: '||l_proc,300);

Line 4777: --hr_utility.trace_off;

4773: --
4774: END LOOP;
4775: --
4776: hr_utility.set_location('Leaving: '||l_proc,450);
4777: --hr_utility.trace_off;
4778: EXCEPTION
4779: WHEN OTHERS THEN
4780: hr_utility.set_location('Leaving: '||l_proc,300);
4781: -- hr_utility.trace_off;

Line 4780: hr_utility.set_location('Leaving: '||l_proc,300);

4776: hr_utility.set_location('Leaving: '||l_proc,450);
4777: --hr_utility.trace_off;
4778: EXCEPTION
4779: WHEN OTHERS THEN
4780: hr_utility.set_location('Leaving: '||l_proc,300);
4781: -- hr_utility.trace_off;
4782: raise;
4783: END archive_code_v4;
4784:

Line 4781: -- hr_utility.trace_off;

4777: --hr_utility.trace_off;
4778: EXCEPTION
4779: WHEN OTHERS THEN
4780: hr_utility.set_location('Leaving: '||l_proc,300);
4781: -- hr_utility.trace_off;
4782: raise;
4783: END archive_code_v4;
4784:
4785:

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

4818: l_archived_flag VARCHAR2(1);
4819: --
4820: BEGIN
4821:
4822: hr_utility.set_location('Entering '||l_proc, 10);
4823: --
4824: For asg_rec IN c_asg
4825: LOOP
4826: -- Loop through all assignments

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

4823: --
4824: For asg_rec IN c_asg
4825: LOOP
4826: -- Loop through all assignments
4827: hr_utility.set_location(l_proc, 20);
4828: hr_utility.trace(l_proc||': assignment_id='||asg_rec.assignment_id);
4829: hr_utility.trace(l_proc||': asg_min_start_date='||fnd_date.date_to_displaydate(asg_rec.asg_min_start_date));
4830: hr_utility.trace(l_proc||': asg_max_end_date='||fnd_date.date_to_displaydate(asg_rec.asg_max_end_date));
4831: --

Line 4828: hr_utility.trace(l_proc||': assignment_id='||asg_rec.assignment_id);

4824: For asg_rec IN c_asg
4825: LOOP
4826: -- Loop through all assignments
4827: hr_utility.set_location(l_proc, 20);
4828: hr_utility.trace(l_proc||': assignment_id='||asg_rec.assignment_id);
4829: hr_utility.trace(l_proc||': asg_min_start_date='||fnd_date.date_to_displaydate(asg_rec.asg_min_start_date));
4830: hr_utility.trace(l_proc||': asg_max_end_date='||fnd_date.date_to_displaydate(asg_rec.asg_max_end_date));
4831: --
4832: FOR alc_rec IN c_allocations(asg_rec.assignment_id) LOOP

Line 4829: hr_utility.trace(l_proc||': asg_min_start_date='||fnd_date.date_to_displaydate(asg_rec.asg_min_start_date));

4825: LOOP
4826: -- Loop through all assignments
4827: hr_utility.set_location(l_proc, 20);
4828: hr_utility.trace(l_proc||': assignment_id='||asg_rec.assignment_id);
4829: hr_utility.trace(l_proc||': asg_min_start_date='||fnd_date.date_to_displaydate(asg_rec.asg_min_start_date));
4830: hr_utility.trace(l_proc||': asg_max_end_date='||fnd_date.date_to_displaydate(asg_rec.asg_max_end_date));
4831: --
4832: FOR alc_rec IN c_allocations(asg_rec.assignment_id) LOOP
4833: -- Loop through all vehicle allocations

Line 4830: hr_utility.trace(l_proc||': asg_max_end_date='||fnd_date.date_to_displaydate(asg_rec.asg_max_end_date));

4826: -- Loop through all assignments
4827: hr_utility.set_location(l_proc, 20);
4828: hr_utility.trace(l_proc||': assignment_id='||asg_rec.assignment_id);
4829: hr_utility.trace(l_proc||': asg_min_start_date='||fnd_date.date_to_displaydate(asg_rec.asg_min_start_date));
4830: hr_utility.trace(l_proc||': asg_max_end_date='||fnd_date.date_to_displaydate(asg_rec.asg_max_end_date));
4831: --
4832: FOR alc_rec IN c_allocations(asg_rec.assignment_id) LOOP
4833: -- Loop through all vehicle allocations
4834: -- over the date range

Line 4835: hr_utility.set_location(l_proc, 30);

4831: --
4832: FOR alc_rec IN c_allocations(asg_rec.assignment_id) LOOP
4833: -- Loop through all vehicle allocations
4834: -- over the date range
4835: hr_utility.set_location(l_proc, 30);
4836: hr_utility.trace(l_proc||': vehicle_allocation_id='||alc_rec.vehicle_allocation_id);
4837: hr_utility.trace(l_proc||': usage_type='||alc_rec.usage_type);
4838: --
4839: L_action_flag := 'X';

Line 4836: hr_utility.trace(l_proc||': vehicle_allocation_id='||alc_rec.vehicle_allocation_id);

4832: FOR alc_rec IN c_allocations(asg_rec.assignment_id) LOOP
4833: -- Loop through all vehicle allocations
4834: -- over the date range
4835: hr_utility.set_location(l_proc, 30);
4836: hr_utility.trace(l_proc||': vehicle_allocation_id='||alc_rec.vehicle_allocation_id);
4837: hr_utility.trace(l_proc||': usage_type='||alc_rec.usage_type);
4838: --
4839: L_action_flag := 'X';
4840: l_archived_flag := 'Y';

Line 4837: hr_utility.trace(l_proc||': usage_type='||alc_rec.usage_type);

4833: -- Loop through all vehicle allocations
4834: -- over the date range
4835: hr_utility.set_location(l_proc, 30);
4836: hr_utility.trace(l_proc||': vehicle_allocation_id='||alc_rec.vehicle_allocation_id);
4837: hr_utility.trace(l_proc||': usage_type='||alc_rec.usage_type);
4838: --
4839: L_action_flag := 'X';
4840: l_archived_flag := 'Y';
4841: --

Line 4846: hr_utility.set_location(l_proc, 40);

4842: OPEN c_alloc_dates(alc_rec.vehicle_allocation_id);
4843: FETCH c_alloc_dates INTO alc_dates_rec;
4844: CLOSE c_alloc_dates;
4845: --
4846: hr_utility.set_location(l_proc, 40);
4847: hr_utility.trace(l_proc||': min_start_date='|| fnd_date.date_to_displaydate(alc_dates_rec.min_start_date));
4848: hr_utility.trace(l_proc||': max_end_date='|| fnd_date.date_to_displaydate(alc_dates_rec.max_end_date));
4849:
4850: -- Moved the code here from below for the bug 10088866

Line 4847: hr_utility.trace(l_proc||': min_start_date='|| fnd_date.date_to_displaydate(alc_dates_rec.min_start_date));

4843: FETCH c_alloc_dates INTO alc_dates_rec;
4844: CLOSE c_alloc_dates;
4845: --
4846: hr_utility.set_location(l_proc, 40);
4847: hr_utility.trace(l_proc||': min_start_date='|| fnd_date.date_to_displaydate(alc_dates_rec.min_start_date));
4848: hr_utility.trace(l_proc||': max_end_date='|| fnd_date.date_to_displaydate(alc_dates_rec.max_end_date));
4849:
4850: -- Moved the code here from below for the bug 10088866
4851: -- Start moving for the bug 10088866

Line 4848: hr_utility.trace(l_proc||': max_end_date='|| fnd_date.date_to_displaydate(alc_dates_rec.max_end_date));

4844: CLOSE c_alloc_dates;
4845: --
4846: hr_utility.set_location(l_proc, 40);
4847: hr_utility.trace(l_proc||': min_start_date='|| fnd_date.date_to_displaydate(alc_dates_rec.min_start_date));
4848: hr_utility.trace(l_proc||': max_end_date='|| fnd_date.date_to_displaydate(alc_dates_rec.max_end_date));
4849:
4850: -- Moved the code here from below for the bug 10088866
4851: -- Start moving for the bug 10088866
4852: -- Private flag logic

Line 4860: hr_utility.set_location(l_proc, 250);

4856: L_action_flag := 'X';
4857: l_archived_flag := 'Y';
4858: --
4859: FOR private_flag_iterator IN private_flag_arch(alc_rec.vehicle_allocation_id) LOOP
4860: hr_utility.set_location(l_proc, 250);
4861: hr_utility.trace(l_proc||', private_flag_iterator.private_use_flag='||private_flag_iterator.private_use_flag);
4862:
4863: L_action_flag := 'X';
4864: l_archived_flag := 'Y';

Line 4861: hr_utility.trace(l_proc||', private_flag_iterator.private_use_flag='||private_flag_iterator.private_use_flag);

4857: l_archived_flag := 'Y';
4858: --
4859: FOR private_flag_iterator IN private_flag_arch(alc_rec.vehicle_allocation_id) LOOP
4860: hr_utility.set_location(l_proc, 250);
4861: hr_utility.trace(l_proc||', private_flag_iterator.private_use_flag='||private_flag_iterator.private_use_flag);
4862:
4863: L_action_flag := 'X';
4864: l_archived_flag := 'Y';
4865:

Line 4879: hr_utility.set_location(l_proc, 260);

4875: private_flag_iterator.effective_start_date,
4876: l_action_flag,
4877: private_flag_iterator.effective_start_date);
4878: --
4879: hr_utility.set_location(l_proc, 260);
4880: hr_utility.trace(l_proc||', l_archived_flag='||l_archived_flag);
4881: --
4882: IF l_archived_flag = 'N' THEN
4883: -- Action has not been archived already

Line 4880: hr_utility.trace(l_proc||', l_archived_flag='||l_archived_flag);

4876: l_action_flag,
4877: private_flag_iterator.effective_start_date);
4878: --
4879: hr_utility.set_location(l_proc, 260);
4880: hr_utility.trace(l_proc||', l_archived_flag='||l_archived_flag);
4881: --
4882: IF l_archived_flag = 'N' THEN
4883: -- Action has not been archived already
4884: -- therefore archive it.

Line 4928: hr_utility.set_location(l_proc, 50);

4924: OPEN c_first_asg(asg_rec.assignment_id, alc_dates_rec.min_start_date);
4925: FETCH c_first_asg INTO first_asg_rec;
4926: CLOSE c_first_asg;
4927: --
4928: hr_utility.set_location(l_proc, 50);
4929: hr_utility.trace(l_proc||': First Assignment='|| first_asg_rec.assignment_id);
4930: -- Get primary car allocation of the
4931: -- first assignment of this person
4932: -- in this tax ref

Line 4929: hr_utility.trace(l_proc||': First Assignment='|| first_asg_rec.assignment_id);

4925: FETCH c_first_asg INTO first_asg_rec;
4926: CLOSE c_first_asg;
4927: --
4928: hr_utility.set_location(l_proc, 50);
4929: hr_utility.trace(l_proc||': First Assignment='|| first_asg_rec.assignment_id);
4930: -- Get primary car allocation of the
4931: -- first assignment of this person
4932: -- in this tax ref
4933: OPEN c_primary_car(first_asg_rec.assignment_id, alc_dates_rec.min_start_date);

Line 4937: hr_utility.set_location(l_proc, 60);

4933: OPEN c_primary_car(first_asg_rec.assignment_id, alc_dates_rec.min_start_date);
4934: FETCH c_primary_car INTO primary_car_rec;
4935: CLOSE c_primary_car;
4936: --
4937: hr_utility.set_location(l_proc, 60);
4938: hr_utility.trace(l_proc||': Primary Car Allocation='|| primary_car_rec.vehicle_allocation_id);
4939: --
4940: IF primary_car_rec.vehicle_allocation_id = alc_rec.vehicle_allocation_id THEN
4941: -- This is the first car allocation

Line 4938: hr_utility.trace(l_proc||': Primary Car Allocation='|| primary_car_rec.vehicle_allocation_id);

4934: FETCH c_primary_car INTO primary_car_rec;
4935: CLOSE c_primary_car;
4936: --
4937: hr_utility.set_location(l_proc, 60);
4938: hr_utility.trace(l_proc||': Primary Car Allocation='|| primary_car_rec.vehicle_allocation_id);
4939: --
4940: IF primary_car_rec.vehicle_allocation_id = alc_rec.vehicle_allocation_id THEN
4941: -- This is the first car allocation
4942: -- of this employee in this tax ref

Line 4953: hr_utility.set_location(l_proc, 70);

4949: ELSE
4950: L_action_flag := 'N';
4951: END IF;
4952: --
4953: hr_utility.set_location(l_proc, 70);
4954: hr_utility.trace(l_proc||': l_action_flag='|| l_action_flag);
4955: --
4956: CLOSE c_prior_prim_car;
4957: ELSE

Line 4954: hr_utility.trace(l_proc||': l_action_flag='|| l_action_flag);

4950: L_action_flag := 'N';
4951: END IF;
4952: --
4953: hr_utility.set_location(l_proc, 70);
4954: hr_utility.trace(l_proc||': l_action_flag='|| l_action_flag);
4955: --
4956: CLOSE c_prior_prim_car;
4957: ELSE
4958: -- Not the first car of the employee

Line 4963: hr_utility.set_location(l_proc, 80);

4959: -- report this as new car
4960: L_action_flag := 'N';
4961: END IF;
4962: --
4963: hr_utility.set_location(l_proc, 80);
4964: hr_utility.trace(l_proc||': l_action_flag='|| l_action_flag);
4965: --
4966: ELSE
4967: -- Not a primary car therefore mark

Line 4964: hr_utility.trace(l_proc||': l_action_flag='|| l_action_flag);

4960: L_action_flag := 'N';
4961: END IF;
4962: --
4963: hr_utility.set_location(l_proc, 80);
4964: hr_utility.trace(l_proc||': l_action_flag='|| l_action_flag);
4965: --
4966: ELSE
4967: -- Not a primary car therefore mark
4968: -- it as new car allocation action

Line 4972: hr_utility.set_location(l_proc, 90);

4968: -- it as new car allocation action
4969: l_action_flag := 'N';
4970: END IF;
4971: --
4972: hr_utility.set_location(l_proc, 90);
4973: hr_utility.trace(l_proc||': l_action_flag='|| l_action_flag);
4974: --
4975: IF L_action_flag <> 'X' THEN
4976: -- Check whether this allocation action

Line 4973: hr_utility.trace(l_proc||': l_action_flag='|| l_action_flag);

4969: l_action_flag := 'N';
4970: END IF;
4971: --
4972: hr_utility.set_location(l_proc, 90);
4973: hr_utility.trace(l_proc||': l_action_flag='|| l_action_flag);
4974: --
4975: IF L_action_flag <> 'X' THEN
4976: -- Check whether this allocation action
4977: -- has been already archived

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

4981: alc_dates_rec.min_start_date,
4982: l_action_flag,
4983: alc_rec.effective_start_date); -- Added for the bug 10088866
4984: --
4985: hr_utility.set_location(l_proc, 100);
4986: hr_utility.trace(l_proc||': l_archived_flag='|| l_archived_flag);
4987: --
4988: IF (l_archived_flag = 'N')
4989: THEN

Line 4986: hr_utility.trace(l_proc||': l_archived_flag='|| l_archived_flag);

4982: l_action_flag,
4983: alc_rec.effective_start_date); -- Added for the bug 10088866
4984: --
4985: hr_utility.set_location(l_proc, 100);
4986: hr_utility.trace(l_proc||': l_archived_flag='|| l_archived_flag);
4987: --
4988: IF (l_archived_flag = 'N')
4989: THEN
4990: -- Action has not been archived already

Line 4992: hr_utility.set_location(l_proc, 105);

4988: IF (l_archived_flag = 'N')
4989: THEN
4990: -- Action has not been archived already
4991: -- therefore archive it.
4992: hr_utility.set_location(l_proc, 105);
4993: hr_utility.trace(l_proc||': p_assactid='|| p_assactid);
4994: hr_utility.trace(l_proc||': vehicle_allocation_id='|| alc_rec.vehicle_allocation_id);
4995: hr_utility.trace(l_proc||': vehicle_repository_id='|| alc_rec.vehicle_repository_id);
4996: hr_utility.trace(l_proc||': l_action_flag='|| l_action_flag);

Line 4993: hr_utility.trace(l_proc||': p_assactid='|| p_assactid);

4989: THEN
4990: -- Action has not been archived already
4991: -- therefore archive it.
4992: hr_utility.set_location(l_proc, 105);
4993: hr_utility.trace(l_proc||': p_assactid='|| p_assactid);
4994: hr_utility.trace(l_proc||': vehicle_allocation_id='|| alc_rec.vehicle_allocation_id);
4995: hr_utility.trace(l_proc||': vehicle_repository_id='|| alc_rec.vehicle_repository_id);
4996: hr_utility.trace(l_proc||': l_action_flag='|| l_action_flag);
4997: hr_utility.trace(l_proc||': alc_dates_rec.min_start_date='|| fnd_date.date_to_displaydate(alc_dates_rec.min_start_date));

Line 4994: hr_utility.trace(l_proc||': vehicle_allocation_id='|| alc_rec.vehicle_allocation_id);

4990: -- Action has not been archived already
4991: -- therefore archive it.
4992: hr_utility.set_location(l_proc, 105);
4993: hr_utility.trace(l_proc||': p_assactid='|| p_assactid);
4994: hr_utility.trace(l_proc||': vehicle_allocation_id='|| alc_rec.vehicle_allocation_id);
4995: hr_utility.trace(l_proc||': vehicle_repository_id='|| alc_rec.vehicle_repository_id);
4996: hr_utility.trace(l_proc||': l_action_flag='|| l_action_flag);
4997: hr_utility.trace(l_proc||': alc_dates_rec.min_start_date='|| fnd_date.date_to_displaydate(alc_dates_rec.min_start_date));
4998: hr_utility.trace(l_proc||': alc_dates_rec.max_end_date='|| fnd_date.date_to_displaydate(alc_dates_rec.max_end_date));

Line 4995: hr_utility.trace(l_proc||': vehicle_repository_id='|| alc_rec.vehicle_repository_id);

4991: -- therefore archive it.
4992: hr_utility.set_location(l_proc, 105);
4993: hr_utility.trace(l_proc||': p_assactid='|| p_assactid);
4994: hr_utility.trace(l_proc||': vehicle_allocation_id='|| alc_rec.vehicle_allocation_id);
4995: hr_utility.trace(l_proc||': vehicle_repository_id='|| alc_rec.vehicle_repository_id);
4996: hr_utility.trace(l_proc||': l_action_flag='|| l_action_flag);
4997: hr_utility.trace(l_proc||': alc_dates_rec.min_start_date='|| fnd_date.date_to_displaydate(alc_dates_rec.min_start_date));
4998: hr_utility.trace(l_proc||': alc_dates_rec.max_end_date='|| fnd_date.date_to_displaydate(alc_dates_rec.max_end_date));
4999: --

Line 4996: hr_utility.trace(l_proc||': l_action_flag='|| l_action_flag);

4992: hr_utility.set_location(l_proc, 105);
4993: hr_utility.trace(l_proc||': p_assactid='|| p_assactid);
4994: hr_utility.trace(l_proc||': vehicle_allocation_id='|| alc_rec.vehicle_allocation_id);
4995: hr_utility.trace(l_proc||': vehicle_repository_id='|| alc_rec.vehicle_repository_id);
4996: hr_utility.trace(l_proc||': l_action_flag='|| l_action_flag);
4997: hr_utility.trace(l_proc||': alc_dates_rec.min_start_date='|| fnd_date.date_to_displaydate(alc_dates_rec.min_start_date));
4998: hr_utility.trace(l_proc||': alc_dates_rec.max_end_date='|| fnd_date.date_to_displaydate(alc_dates_rec.max_end_date));
4999: --
5000: archive_allocation_action(p_assignment_id => asg_rec.assignment_id,

Line 4997: hr_utility.trace(l_proc||': alc_dates_rec.min_start_date='|| fnd_date.date_to_displaydate(alc_dates_rec.min_start_date));

4993: hr_utility.trace(l_proc||': p_assactid='|| p_assactid);
4994: hr_utility.trace(l_proc||': vehicle_allocation_id='|| alc_rec.vehicle_allocation_id);
4995: hr_utility.trace(l_proc||': vehicle_repository_id='|| alc_rec.vehicle_repository_id);
4996: hr_utility.trace(l_proc||': l_action_flag='|| l_action_flag);
4997: hr_utility.trace(l_proc||': alc_dates_rec.min_start_date='|| fnd_date.date_to_displaydate(alc_dates_rec.min_start_date));
4998: hr_utility.trace(l_proc||': alc_dates_rec.max_end_date='|| fnd_date.date_to_displaydate(alc_dates_rec.max_end_date));
4999: --
5000: archive_allocation_action(p_assignment_id => asg_rec.assignment_id,
5001: p_asg_act_id => p_assactid,

Line 4998: hr_utility.trace(l_proc||': alc_dates_rec.max_end_date='|| fnd_date.date_to_displaydate(alc_dates_rec.max_end_date));

4994: hr_utility.trace(l_proc||': vehicle_allocation_id='|| alc_rec.vehicle_allocation_id);
4995: hr_utility.trace(l_proc||': vehicle_repository_id='|| alc_rec.vehicle_repository_id);
4996: hr_utility.trace(l_proc||': l_action_flag='|| l_action_flag);
4997: hr_utility.trace(l_proc||': alc_dates_rec.min_start_date='|| fnd_date.date_to_displaydate(alc_dates_rec.min_start_date));
4998: hr_utility.trace(l_proc||': alc_dates_rec.max_end_date='|| fnd_date.date_to_displaydate(alc_dates_rec.max_end_date));
4999: --
5000: archive_allocation_action(p_assignment_id => asg_rec.assignment_id,
5001: p_asg_act_id => p_assactid,
5002: p_vehicle_allocation_id => alc_rec.vehicle_allocation_id,

Line 5030: hr_utility.set_location(l_proc, 50);

5026: OPEN c_first_asg(asg_rec.assignment_id, alc_dates_rec.max_end_date);
5027: FETCH c_first_asg INTO first_asg_rec;
5028: CLOSE c_first_asg;
5029: --
5030: hr_utility.set_location(l_proc, 50);
5031: hr_utility.trace(l_proc||': First Assignment='|| first_asg_rec.assignment_id);
5032: -- Get primary car allocation of the
5033: -- first assignment of this person
5034: -- in this tax ref

Line 5031: hr_utility.trace(l_proc||': First Assignment='|| first_asg_rec.assignment_id);

5027: FETCH c_first_asg INTO first_asg_rec;
5028: CLOSE c_first_asg;
5029: --
5030: hr_utility.set_location(l_proc, 50);
5031: hr_utility.trace(l_proc||': First Assignment='|| first_asg_rec.assignment_id);
5032: -- Get primary car allocation of the
5033: -- first assignment of this person
5034: -- in this tax ref
5035: OPEN c_primary_car(first_asg_rec.assignment_id, alc_dates_rec.max_end_date);

Line 5039: hr_utility.set_location(l_proc, 60);

5035: OPEN c_primary_car(first_asg_rec.assignment_id, alc_dates_rec.max_end_date);
5036: FETCH c_primary_car INTO primary_car_rec;
5037: CLOSE c_primary_car;
5038: --
5039: hr_utility.set_location(l_proc, 60);
5040: hr_utility.trace(l_proc||': Primary Car Allocation='|| primary_car_rec.vehicle_allocation_id);
5041: --
5042: IF primary_car_rec.vehicle_allocation_id = alc_rec.vehicle_allocation_id THEN
5043: --

Line 5040: hr_utility.trace(l_proc||': Primary Car Allocation='|| primary_car_rec.vehicle_allocation_id);

5036: FETCH c_primary_car INTO primary_car_rec;
5037: CLOSE c_primary_car;
5038: --
5039: hr_utility.set_location(l_proc, 60);
5040: hr_utility.trace(l_proc||': Primary Car Allocation='|| primary_car_rec.vehicle_allocation_id);
5041: --
5042: IF primary_car_rec.vehicle_allocation_id = alc_rec.vehicle_allocation_id THEN
5043: --
5044: OPEN c_next_prim_car(asg_rec.assignment_id, Alc_dates_rec.max_end_date);

Line 5056: hr_utility.set_location(l_proc, 70);

5052: -- This is a withdrawal action
5053: L_action_flag := 'W';
5054: END IF;
5055: --
5056: hr_utility.set_location(l_proc, 70);
5057: hr_utility.trace(l_proc||': l_action_flag='|| l_action_flag);
5058: --
5059: CLOSE c_next_prim_car;
5060: ELSE

Line 5057: hr_utility.trace(l_proc||': l_action_flag='|| l_action_flag);

5053: L_action_flag := 'W';
5054: END IF;
5055: --
5056: hr_utility.set_location(l_proc, 70);
5057: hr_utility.trace(l_proc||': l_action_flag='|| l_action_flag);
5058: --
5059: CLOSE c_next_prim_car;
5060: ELSE
5061: -- Not the first car of the employee

Line 5067: hr_utility.set_location(l_proc, 80);

5063: L_action_flag := 'W';
5064: END IF;
5065: --
5066: --
5067: hr_utility.set_location(l_proc, 80);
5068: hr_utility.trace(l_proc||': l_action_flag='|| l_action_flag);
5069: --
5070: ELSE
5071: -- Not a first car therefore mark

Line 5068: hr_utility.trace(l_proc||': l_action_flag='|| l_action_flag);

5064: END IF;
5065: --
5066: --
5067: hr_utility.set_location(l_proc, 80);
5068: hr_utility.trace(l_proc||': l_action_flag='|| l_action_flag);
5069: --
5070: ELSE
5071: -- Not a first car therefore mark
5072: -- it as withdrawal car action

Line 5076: hr_utility.set_location(l_proc, 90);

5072: -- it as withdrawal car action
5073: l_action_flag := 'W';
5074: END IF;
5075: --
5076: hr_utility.set_location(l_proc, 90);
5077: hr_utility.trace(l_proc||': l_action_flag='|| l_action_flag);
5078: --
5079: IF L_action_flag <> 'X' THEN
5080: -- Check whether this allocation action

Line 5077: hr_utility.trace(l_proc||': l_action_flag='|| l_action_flag);

5073: l_action_flag := 'W';
5074: END IF;
5075: --
5076: hr_utility.set_location(l_proc, 90);
5077: hr_utility.trace(l_proc||': l_action_flag='|| l_action_flag);
5078: --
5079: IF L_action_flag <> 'X' THEN
5080: -- Check whether this allocation action
5081: -- has been already archived

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

5085: alc_dates_rec.min_start_date,
5086: l_action_flag,
5087: alc_rec.effective_start_date); -- Added for the bug 10088866
5088: --
5089: hr_utility.set_location(l_proc, 100);
5090: hr_utility.trace(l_proc||': l_archived_flag='|| l_archived_flag);
5091: --
5092: IF l_archived_flag = 'N' THEN
5093: -- Action has not been archived already

Line 5090: hr_utility.trace(l_proc||': l_archived_flag='|| l_archived_flag);

5086: l_action_flag,
5087: alc_rec.effective_start_date); -- Added for the bug 10088866
5088: --
5089: hr_utility.set_location(l_proc, 100);
5090: hr_utility.trace(l_proc||': l_archived_flag='|| l_archived_flag);
5091: --
5092: IF l_archived_flag = 'N' THEN
5093: -- Action has not been archived already
5094: -- therefore archive it.

Line 5095: hr_utility.set_location(l_proc, 105);

5091: --
5092: IF l_archived_flag = 'N' THEN
5093: -- Action has not been archived already
5094: -- therefore archive it.
5095: hr_utility.set_location(l_proc, 105);
5096: hr_utility.trace(l_proc||': p_assactid='|| p_assactid);
5097: hr_utility.trace(l_proc||': vehicle_allocation_id='|| alc_rec.vehicle_allocation_id);
5098: hr_utility.trace(l_proc||': vehicle_repository_id='|| alc_rec.vehicle_repository_id);
5099: hr_utility.trace(l_proc||': l_action_flag='|| l_action_flag);

Line 5096: hr_utility.trace(l_proc||': p_assactid='|| p_assactid);

5092: IF l_archived_flag = 'N' THEN
5093: -- Action has not been archived already
5094: -- therefore archive it.
5095: hr_utility.set_location(l_proc, 105);
5096: hr_utility.trace(l_proc||': p_assactid='|| p_assactid);
5097: hr_utility.trace(l_proc||': vehicle_allocation_id='|| alc_rec.vehicle_allocation_id);
5098: hr_utility.trace(l_proc||': vehicle_repository_id='|| alc_rec.vehicle_repository_id);
5099: hr_utility.trace(l_proc||': l_action_flag='|| l_action_flag);
5100: hr_utility.trace(l_proc||': alc_dates_rec.min_start_date='|| fnd_date.date_to_displaydate(alc_dates_rec.min_start_date));

Line 5097: hr_utility.trace(l_proc||': vehicle_allocation_id='|| alc_rec.vehicle_allocation_id);

5093: -- Action has not been archived already
5094: -- therefore archive it.
5095: hr_utility.set_location(l_proc, 105);
5096: hr_utility.trace(l_proc||': p_assactid='|| p_assactid);
5097: hr_utility.trace(l_proc||': vehicle_allocation_id='|| alc_rec.vehicle_allocation_id);
5098: hr_utility.trace(l_proc||': vehicle_repository_id='|| alc_rec.vehicle_repository_id);
5099: hr_utility.trace(l_proc||': l_action_flag='|| l_action_flag);
5100: hr_utility.trace(l_proc||': alc_dates_rec.min_start_date='|| fnd_date.date_to_displaydate(alc_dates_rec.min_start_date));
5101: hr_utility.trace(l_proc||': alc_dates_rec.max_end_date='|| fnd_date.date_to_displaydate(alc_dates_rec.max_end_date));

Line 5098: hr_utility.trace(l_proc||': vehicle_repository_id='|| alc_rec.vehicle_repository_id);

5094: -- therefore archive it.
5095: hr_utility.set_location(l_proc, 105);
5096: hr_utility.trace(l_proc||': p_assactid='|| p_assactid);
5097: hr_utility.trace(l_proc||': vehicle_allocation_id='|| alc_rec.vehicle_allocation_id);
5098: hr_utility.trace(l_proc||': vehicle_repository_id='|| alc_rec.vehicle_repository_id);
5099: hr_utility.trace(l_proc||': l_action_flag='|| l_action_flag);
5100: hr_utility.trace(l_proc||': alc_dates_rec.min_start_date='|| fnd_date.date_to_displaydate(alc_dates_rec.min_start_date));
5101: hr_utility.trace(l_proc||': alc_dates_rec.max_end_date='|| fnd_date.date_to_displaydate(alc_dates_rec.max_end_date));
5102: --

Line 5099: hr_utility.trace(l_proc||': l_action_flag='|| l_action_flag);

5095: hr_utility.set_location(l_proc, 105);
5096: hr_utility.trace(l_proc||': p_assactid='|| p_assactid);
5097: hr_utility.trace(l_proc||': vehicle_allocation_id='|| alc_rec.vehicle_allocation_id);
5098: hr_utility.trace(l_proc||': vehicle_repository_id='|| alc_rec.vehicle_repository_id);
5099: hr_utility.trace(l_proc||': l_action_flag='|| l_action_flag);
5100: hr_utility.trace(l_proc||': alc_dates_rec.min_start_date='|| fnd_date.date_to_displaydate(alc_dates_rec.min_start_date));
5101: hr_utility.trace(l_proc||': alc_dates_rec.max_end_date='|| fnd_date.date_to_displaydate(alc_dates_rec.max_end_date));
5102: --
5103: archive_allocation_action(p_assignment_id => asg_rec.assignment_id,

Line 5100: hr_utility.trace(l_proc||': alc_dates_rec.min_start_date='|| fnd_date.date_to_displaydate(alc_dates_rec.min_start_date));

5096: hr_utility.trace(l_proc||': p_assactid='|| p_assactid);
5097: hr_utility.trace(l_proc||': vehicle_allocation_id='|| alc_rec.vehicle_allocation_id);
5098: hr_utility.trace(l_proc||': vehicle_repository_id='|| alc_rec.vehicle_repository_id);
5099: hr_utility.trace(l_proc||': l_action_flag='|| l_action_flag);
5100: hr_utility.trace(l_proc||': alc_dates_rec.min_start_date='|| fnd_date.date_to_displaydate(alc_dates_rec.min_start_date));
5101: hr_utility.trace(l_proc||': alc_dates_rec.max_end_date='|| fnd_date.date_to_displaydate(alc_dates_rec.max_end_date));
5102: --
5103: archive_allocation_action(p_assignment_id => asg_rec.assignment_id,
5104: p_asg_act_id => p_assactid,

Line 5101: hr_utility.trace(l_proc||': alc_dates_rec.max_end_date='|| fnd_date.date_to_displaydate(alc_dates_rec.max_end_date));

5097: hr_utility.trace(l_proc||': vehicle_allocation_id='|| alc_rec.vehicle_allocation_id);
5098: hr_utility.trace(l_proc||': vehicle_repository_id='|| alc_rec.vehicle_repository_id);
5099: hr_utility.trace(l_proc||': l_action_flag='|| l_action_flag);
5100: hr_utility.trace(l_proc||': alc_dates_rec.min_start_date='|| fnd_date.date_to_displaydate(alc_dates_rec.min_start_date));
5101: hr_utility.trace(l_proc||': alc_dates_rec.max_end_date='|| fnd_date.date_to_displaydate(alc_dates_rec.max_end_date));
5102: --
5103: archive_allocation_action(p_assignment_id => asg_rec.assignment_id,
5104: p_asg_act_id => p_assactid,
5105: p_vehicle_allocation_id => alc_rec.vehicle_allocation_id,

Line 5121: hr_utility.set_location(l_proc, 110);

5117: -- Fuel type has changed therefore make sure
5118: -- this change occured after the vehicle was
5119: -- allocated to this assignment
5120: --
5121: hr_utility.set_location(l_proc, 110);
5122: hr_utility.trace(l_proc||': effective_start_date='|| vehicle_changes_rec.effective_start_date);
5123: hr_utility.trace(l_proc||': fuel_type='|| vehicle_changes_rec.fuel_type);
5124: --
5125: IF (vehicle_changes_rec.effective_start_date

Line 5122: hr_utility.trace(l_proc||': effective_start_date='|| vehicle_changes_rec.effective_start_date);

5118: -- this change occured after the vehicle was
5119: -- allocated to this assignment
5120: --
5121: hr_utility.set_location(l_proc, 110);
5122: hr_utility.trace(l_proc||': effective_start_date='|| vehicle_changes_rec.effective_start_date);
5123: hr_utility.trace(l_proc||': fuel_type='|| vehicle_changes_rec.fuel_type);
5124: --
5125: IF (vehicle_changes_rec.effective_start_date
5126: BETWEEN alc_dates_rec.min_start_date+1 AND alc_dates_rec.max_end_date) AND

Line 5123: hr_utility.trace(l_proc||': fuel_type='|| vehicle_changes_rec.fuel_type);

5119: -- allocated to this assignment
5120: --
5121: hr_utility.set_location(l_proc, 110);
5122: hr_utility.trace(l_proc||': effective_start_date='|| vehicle_changes_rec.effective_start_date);
5123: hr_utility.trace(l_proc||': fuel_type='|| vehicle_changes_rec.fuel_type);
5124: --
5125: IF (vehicle_changes_rec.effective_start_date
5126: BETWEEN alc_dates_rec.min_start_date+1 AND alc_dates_rec.max_end_date) AND
5127: (vehicle_changes_rec.effective_start_date

Line 5139: hr_utility.set_location(l_proc, 120);

5135: vehicle_changes_rec.effective_start_date,
5136: 'F',
5137: alc_rec.effective_start_date); -- Added for the bug 10088866
5138: --
5139: hr_utility.set_location(l_proc, 120);
5140: hr_utility.trace(l_proc||': l_archived_flag='|| l_archived_flag);
5141: --
5142: IF l_archived_flag = 'N' THEN
5143: -- Action has not been archived already

Line 5140: hr_utility.trace(l_proc||': l_archived_flag='|| l_archived_flag);

5136: 'F',
5137: alc_rec.effective_start_date); -- Added for the bug 10088866
5138: --
5139: hr_utility.set_location(l_proc, 120);
5140: hr_utility.trace(l_proc||': l_archived_flag='|| l_archived_flag);
5141: --
5142: IF l_archived_flag = 'N' THEN
5143: -- Action has not been archived already
5144: -- therefore archive it.

Line 5159: hr_utility.set_location(l_proc, 130);

5155: END IF;
5156: END IF;
5157: END LOOP;
5158: --
5159: hr_utility.set_location(l_proc, 130);
5160: --
5161: L_action_flag := 'X';
5162: l_archived_flag := 'Y';
5163: --

Line 5175: hr_utility.set_location(l_proc, 160);

5171: -- Assignment has started on this payroll or tax ref during the
5172: -- input date range and this car allocation was active on the
5173: -- start date therefore check whether it is a transfer
5174: -- from another tax ref
5175: hr_utility.set_location(l_proc, 160);
5176: l_previous_tax_ref := NULL;
5177: --
5178: OPEN c_tax_ref(asg_rec.assignment_id, asg_rec.asg_min_start_date-1);
5179: FETCH c_tax_ref INTO l_previous_tax_ref;

Line 5182: hr_utility.set_location(l_proc, 170);

5178: OPEN c_tax_ref(asg_rec.assignment_id, asg_rec.asg_min_start_date-1);
5179: FETCH c_tax_ref INTO l_previous_tax_ref;
5180: CLOSE c_tax_ref;
5181: --
5182: hr_utility.set_location(l_proc, 170);
5183: hr_utility.trace(l_proc||', l_previous_tax_ref='||l_previous_tax_ref);
5184: --
5185: IF l_previous_tax_ref is NOT NULL AND l_previous_tax_ref <> g_tax_ref THEN
5186: -- This assignment has a different prior tax ref

Line 5183: hr_utility.trace(l_proc||', l_previous_tax_ref='||l_previous_tax_ref);

5179: FETCH c_tax_ref INTO l_previous_tax_ref;
5180: CLOSE c_tax_ref;
5181: --
5182: hr_utility.set_location(l_proc, 170);
5183: hr_utility.trace(l_proc||', l_previous_tax_ref='||l_previous_tax_ref);
5184: --
5185: IF l_previous_tax_ref is NOT NULL AND l_previous_tax_ref <> g_tax_ref THEN
5186: -- This assignment has a different prior tax ref
5187: -- therefore it should be reported as a new car

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

5185: IF l_previous_tax_ref is NOT NULL AND l_previous_tax_ref <> g_tax_ref THEN
5186: -- This assignment has a different prior tax ref
5187: -- therefore it should be reported as a new car
5188: -- allocation on this EDI message.
5189: hr_utility.set_location(l_proc, 180);
5190: l_action_flag := 'N';
5191: --
5192: -- Check whether this allocation action
5193: -- has been already archived

Line 5201: hr_utility.set_location(l_proc, 190);

5197: asg_rec.asg_min_start_date,
5198: l_action_flag,
5199: alc_rec.effective_start_date); -- Added for the bug 10088866
5200: --
5201: hr_utility.set_location(l_proc, 190);
5202: hr_utility.trace(l_proc||', l_archived_flag='||l_archived_flag);
5203: --
5204: IF l_archived_flag = 'N' THEN
5205: -- Action has not been archived already

Line 5202: hr_utility.trace(l_proc||', l_archived_flag='||l_archived_flag);

5198: l_action_flag,
5199: alc_rec.effective_start_date); -- Added for the bug 10088866
5200: --
5201: hr_utility.set_location(l_proc, 190);
5202: hr_utility.trace(l_proc||', l_archived_flag='||l_archived_flag);
5203: --
5204: IF l_archived_flag = 'N' THEN
5205: -- Action has not been archived already
5206: -- therefore archive it.

Line 5229: hr_utility.set_location(l_proc, 200);

5225: -- Assignment has ended on this payroll or tax ref during the
5226: -- input date range and this car allocation was active on the
5227: -- end date therefore check whether it is a transfer
5228: -- to another tax ref
5229: hr_utility.set_location(l_proc, 200);
5230: l_next_tax_ref := NULL;
5231:
5232: --
5233: OPEN c_tax_ref(asg_rec.assignment_id, asg_rec.asg_max_end_date+1);

Line 5237: hr_utility.set_location(l_proc, 210);

5233: OPEN c_tax_ref(asg_rec.assignment_id, asg_rec.asg_max_end_date+1);
5234: FETCH c_tax_ref INTO l_next_tax_ref;
5235: CLOSE c_tax_ref;
5236: --
5237: hr_utility.set_location(l_proc, 210);
5238: hr_utility.trace(l_proc||', l_next_tax_ref='||l_next_tax_ref);
5239: --
5240: IF l_next_tax_ref is NOT NULL AND l_next_tax_ref <> g_tax_ref THEN
5241: -- This assignment has a different tax ref after end date

Line 5238: hr_utility.trace(l_proc||', l_next_tax_ref='||l_next_tax_ref);

5234: FETCH c_tax_ref INTO l_next_tax_ref;
5235: CLOSE c_tax_ref;
5236: --
5237: hr_utility.set_location(l_proc, 210);
5238: hr_utility.trace(l_proc||', l_next_tax_ref='||l_next_tax_ref);
5239: --
5240: IF l_next_tax_ref is NOT NULL AND l_next_tax_ref <> g_tax_ref THEN
5241: -- This assignment has a different tax ref after end date
5242: -- therefore it should be reported as allocation withdrawal

Line 5244: hr_utility.set_location(l_proc, 220);

5240: IF l_next_tax_ref is NOT NULL AND l_next_tax_ref <> g_tax_ref THEN
5241: -- This assignment has a different tax ref after end date
5242: -- therefore it should be reported as allocation withdrawal
5243: -- on this EDI message.
5244: hr_utility.set_location(l_proc, 220);
5245: l_action_flag := 'W';
5246: --
5247: -- Check whether this allocation action
5248: -- has been already archived

Line 5256: hr_utility.set_location(l_proc, 230);

5252: asg_rec.asg_max_end_date,
5253: l_action_flag,
5254: alc_rec.effective_start_date); -- Added for the bug 10088866
5255: --
5256: hr_utility.set_location(l_proc, 230);
5257: hr_utility.trace(l_proc||', l_archived_flag='||l_archived_flag);
5258: --
5259: IF l_archived_flag = 'N' THEN
5260: -- Action has not been archived already

Line 5257: hr_utility.trace(l_proc||', l_archived_flag='||l_archived_flag);

5253: l_action_flag,
5254: alc_rec.effective_start_date); -- Added for the bug 10088866
5255: --
5256: hr_utility.set_location(l_proc, 230);
5257: hr_utility.trace(l_proc||', l_archived_flag='||l_archived_flag);
5258: --
5259: IF l_archived_flag = 'N' THEN
5260: -- Action has not been archived already
5261: -- therefore archive it.

Line 5275: hr_utility.set_location(l_proc, 240);

5271: --
5272: END IF;
5273: END IF;
5274: --
5275: hr_utility.set_location(l_proc, 240);
5276:
5277: hr_utility.set_location(l_proc, 390);
5278: END LOOP;
5279: --

Line 5277: hr_utility.set_location(l_proc, 390);

5273: END IF;
5274: --
5275: hr_utility.set_location(l_proc, 240);
5276:
5277: hr_utility.set_location(l_proc, 390);
5278: END LOOP;
5279: --
5280: hr_utility.set_location(l_proc, 400);
5281: --

Line 5280: hr_utility.set_location(l_proc, 400);

5276:
5277: hr_utility.set_location(l_proc, 390);
5278: END LOOP;
5279: --
5280: hr_utility.set_location(l_proc, 400);
5281: --
5282: END LOOP;
5283: --
5284: hr_utility.set_location('Leaving: '||l_proc,450);

Line 5284: hr_utility.set_location('Leaving: '||l_proc,450);

5280: hr_utility.set_location(l_proc, 400);
5281: --
5282: END LOOP;
5283: --
5284: hr_utility.set_location('Leaving: '||l_proc,450);
5285: --hr_utility.trace_off;
5286: EXCEPTION
5287: WHEN OTHERS THEN
5288: hr_utility.set_location('Leaving: '||l_proc,300);

Line 5285: --hr_utility.trace_off;

5281: --
5282: END LOOP;
5283: --
5284: hr_utility.set_location('Leaving: '||l_proc,450);
5285: --hr_utility.trace_off;
5286: EXCEPTION
5287: WHEN OTHERS THEN
5288: hr_utility.set_location('Leaving: '||l_proc,300);
5289: -- hr_utility.trace_off;

Line 5288: hr_utility.set_location('Leaving: '||l_proc,300);

5284: hr_utility.set_location('Leaving: '||l_proc,450);
5285: --hr_utility.trace_off;
5286: EXCEPTION
5287: WHEN OTHERS THEN
5288: hr_utility.set_location('Leaving: '||l_proc,300);
5289: -- hr_utility.trace_off;
5290: raise;
5291: END archive_code_v5;
5292:

Line 5289: -- hr_utility.trace_off;

5285: --hr_utility.trace_off;
5286: EXCEPTION
5287: WHEN OTHERS THEN
5288: hr_utility.set_location('Leaving: '||l_proc,300);
5289: -- hr_utility.trace_off;
5290: raise;
5291: END archive_code_v5;
5292:
5293: END pay_gb_edi_p46_car;