DBA Data[Home] [Help]

APPS.HXC_TIMECARD_UTILITIES dependencies on HR_UTILITY

Line 4: g_debug boolean := hr_utility.debug_enabled;

1: PACKAGE BODY hxc_timecard_utilities AS
2: /* $Header: hxctcutil.pkb 120.25.12010000.2 2008/11/13 12:20:37 bbayragi ship $ */
3:
4: g_debug boolean := hr_utility.debug_enabled;
5: g_assignment_periods periods;
6: g_past_date_limit DATE;
7: g_future_date_limit DATE;
8: g_rec_period_start_date hxc_recurring_periods.start_date%TYPE;

Line 293: hr_utility.trace('add_period start=' || to_char(p_start_date, 'YYYY/MM/DD'));

289: BEGIN
290:
291:
292: IF g_debug THEN
293: hr_utility.trace('add_period start=' || to_char(p_start_date, 'YYYY/MM/DD'));
294: hr_utility.trace('add_period end=' || to_char(p_end_date, 'YYYY/MM/DD'));
295: END IF;
296:
297: IF p_position = 'AFTER'

Line 294: hr_utility.trace('add_period end=' || to_char(p_end_date, 'YYYY/MM/DD'));

290:
291:
292: IF g_debug THEN
293: hr_utility.trace('add_period start=' || to_char(p_start_date, 'YYYY/MM/DD'));
294: hr_utility.trace('add_period end=' || to_char(p_end_date, 'YYYY/MM/DD'));
295: END IF;
296:
297: IF p_position = 'AFTER'
298: THEN

Line 303: hr_utility.trace('not added');

299: IF TRUNC(p_start_date) > TRUNC(p_future_date_limit)
300: OR TRUNC(p_start_date) > TRUNC(p_assignment_end)
301: THEN
302: IF g_debug THEN
303: hr_utility.trace('not added');
304: END IF;
305: RETURN FALSE;
306: END IF;
307:

Line 318: hr_utility.trace('added ok');

314: p_periods(l_index).end_date := p_end_date;
315: p_periods(l_index).p_set_more_period := p_set_more_period;
316:
317: IF g_debug THEN
318: hr_utility.trace('added ok');
319: END IF;
320: RETURN TRUE;
321: END add_period;
322:

Line 379: hr_utility.trace('start=' || p_periods(l_index).start_date

375: LOOP
376: EXIT WHEN NOT p_periods.exists(l_index);
377:
378: IF g_debug THEN
379: hr_utility.trace('start=' || p_periods(l_index).start_date
380: || ' end=' || p_periods(l_index).end_date
381: || 'exists=' || NVL(p_periods(l_index).exist_flag, 'N'));
382: END IF;
383:

Line 487: g_debug := hr_utility.debug_enabled;

483: ORDER BY START_TIME;
484:
485: BEGIN
486:
487: g_debug := hr_utility.debug_enabled;
488:
489: IF g_debug THEN
490: l_proc := 'get_periods';
491: hr_utility.set_location (g_package||l_proc, 10);

Line 491: hr_utility.set_location (g_package||l_proc, 10);

487: g_debug := hr_utility.debug_enabled;
488:
489: IF g_debug THEN
490: l_proc := 'get_periods';
491: hr_utility.set_location (g_package||l_proc, 10);
492: END IF;
493:
494:
495:

Line 507: hr_utility.set_location (g_package||l_proc, 20);

503: ,p_period_end => l_end_date
504: );
505:
506: IF g_debug THEN
507: hr_utility.set_location (g_package||l_proc, 20);
508: END IF;
509:
510:
511: /* Aug 23 always add current period

Line 521: hr_utility.set_location (g_package||l_proc, 30);

517: ,p_assignment_end => g_assignment_periods(g_assignment_periods.last).end_date
518: );
519:
520: IF g_debug THEN
521: hr_utility.set_location (g_package||l_proc, 30);
522: END IF;
523:
524: -- this case only happens when we are looking for an empty period
525: -- in the future. Since we already know the period before the current

Line 540: hr_utility.set_location (g_package||l_proc, 40);

536: l_periods(1).start_date := l_start_date;
537: l_periods(1).end_date := l_end_date;
538:
539: IF g_debug THEN
540: hr_utility.set_location (g_package||l_proc, 40);
541: END IF;
542: --get past periods
543:
544: l_period_count := 0;

Line 549: hr_utility.trace('l_period_count=' || l_period_count);

545: l_current_date := l_start_date - 1;
546: l_assignment_index := g_assignment_periods.last;
547:
548: IF g_debug THEN
549: hr_utility.trace('l_period_count=' || l_period_count);
550: hr_utility.trace('g_num_past_entries=' || g_num_past_entries);
551: END IF;
552:
553:

Line 550: hr_utility.trace('g_num_past_entries=' || g_num_past_entries);

546: l_assignment_index := g_assignment_periods.last;
547:
548: IF g_debug THEN
549: hr_utility.trace('l_period_count=' || l_period_count);
550: hr_utility.trace('g_num_past_entries=' || g_num_past_entries);
551: END IF;
552:
553:
554: WHILE l_period_count <= g_num_past_entries

Line 557: hr_utility.set_location (g_package||l_proc, 50);

553:
554: WHILE l_period_count <= g_num_past_entries
555: LOOP
556: IF g_debug THEN
557: hr_utility.set_location (g_package||l_proc, 50);
558: END IF;
559:
560: find_current_period(
561: p_rec_period_start_date => g_rec_period_start_date

Line 570: hr_utility.set_location (g_package||l_proc, 60);

566: ,p_period_end => l_end_date
567: );
568:
569: IF g_debug THEN
570: hr_utility.set_location (g_package||l_proc, 60);
571: END IF;
572:
573: IF l_end_date < g_past_date_limit
574: THEN

Line 579: hr_utility.set_location (g_package||l_proc, 61);

575: EXIT;
576: END IF;
577:
578: IF g_debug THEN
579: hr_utility.set_location (g_package||l_proc, 61);
580: END IF;
581:
582: IF TRUNC(l_end_date) >= TRUNC(g_assignment_periods(l_assignment_index).start_date)
583: THEN

Line 609: hr_utility.set_location (g_package||l_proc, 70);

605: l_period_count := l_period_count + 1;
606: l_current_date := l_start_date - 1;
607:
608: IF g_debug THEN
609: hr_utility.set_location (g_package||l_proc, 70);
610: END IF;
611: ELSE
612: -- earlier than current assignment period, look at the assignment
613: -- following this one

Line 624: hr_utility.set_location (g_package||l_proc, 80);

620: -- period start_date
621: IF g_assignment_periods(l_assignment_index).end_date <= l_end_date
622: THEN
623: IF g_debug THEN
624: hr_utility.set_location (g_package||l_proc, 80);
625: END IF;
626:
627: l_current_date := g_assignment_periods(l_assignment_index).end_date;
628: ELSE

Line 630: hr_utility.set_location (g_package||l_proc, 90);

626:
627: l_current_date := g_assignment_periods(l_assignment_index).end_date;
628: ELSE
629: IF g_debug THEN
630: hr_utility.set_location (g_package||l_proc, 90);
631: END IF;
632:
633: l_current_date := l_end_date;
634: END IF;

Line 637: hr_utility.set_location (g_package||l_proc, 100);

633: l_current_date := l_end_date;
634: END IF;
635: ELSE
636: IF g_debug THEN
637: hr_utility.set_location (g_package||l_proc, 100);
638: END IF;
639:
640: EXIT;
641: END IF;

Line 648: hr_utility.set_location (g_package||l_proc, 120);

644:
645:
646:
647: IF g_debug THEN
648: hr_utility.set_location (g_package||l_proc, 120);
649: END IF;
650:
651: --get future periods
652: l_assignment_index := g_assignment_periods.last;

Line 754: hr_utility.set_location (g_package||l_proc, 70);

750: l_period_index := l_periods.next(l_period_index);
751: END LOOP;
752:
753: IF g_debug THEN
754: hr_utility.set_location (g_package||l_proc, 70);
755: END IF;
756: -- For this period we need not check whether its archived or not, as this is an existing period.
757: -- Existing periods are found from hxc_time_building_blocks table, which means the data is
758: -- present in the online tables.

Line 778: hr_utility.set_location ( g_package||l_proc, 80);

774:
775: l_last_period_end := l_end_date;
776:
777: IF g_debug THEN
778: hr_utility.set_location ( g_package||l_proc, 80);
779: END IF;
780:
781: -- ignore overlapping periods
782: WHILE l_periods.exists(l_period_index)

Line 789: hr_utility.set_location ( g_package||l_proc, 90);

785: l_period_index := l_periods.next(l_period_index);
786: END LOOP;
787:
788: IF g_debug THEN
789: hr_utility.set_location ( g_package||l_proc, 90);
790: END IF;
791:
792: END LOOP;
793:

Line 834: hr_utility.set_location ( g_package||l_proc, 100);

830:
831: END LOOP;
832:
833: IF g_debug THEN
834: hr_utility.set_location ( g_package||l_proc, 100);
835: END IF;
836:
837: --RETURN l_new_periods;
838:

Line 1156: g_debug := hr_utility.debug_enabled;

1152: l_temp_periods periods;
1153: l_current_date DATE;
1154: l_proc VARCHAR2(500);
1155: BEGIN
1156: g_debug := hr_utility.debug_enabled;
1157:
1158: IF g_debug THEN
1159: l_proc := 'get_period_list';
1160: hr_utility.set_location(g_package||l_proc, 10);

Line 1160: hr_utility.set_location(g_package||l_proc, 10);

1156: g_debug := hr_utility.debug_enabled;
1157:
1158: IF g_debug THEN
1159: l_proc := 'get_period_list';
1160: hr_utility.set_location(g_package||l_proc, 10);
1161: END IF;
1162:
1163: l_current_date := p_current_date;
1164:

Line 1175: hr_utility.set_location(g_package||l_proc, 20);

1171: ,p_show_existing_timecard => p_show_existing_timecard
1172: );
1173:
1174: IF g_debug THEN
1175: hr_utility.set_location(g_package||l_proc, 20);
1176: END IF;
1177:
1178: IF l_temp_periods.count = 0
1179: OR l_periods.count > 0

Line 1182: hr_utility.set_location(g_package||l_proc, 30);

1178: IF l_temp_periods.count = 0
1179: OR l_periods.count > 0
1180: THEN
1181: IF g_debug THEN
1182: hr_utility.set_location(g_package||l_proc, 30);
1183: END IF;
1184:
1185: --if this list is empty, or this is the second list,
1186: --combine this list with the first list and return

Line 1193: hr_utility.set_location(g_package||l_proc, 40);

1189: ,p_second_periods => l_temp_periods
1190: ,p_periods => p_periods
1191: );
1192: IF g_debug THEN
1193: hr_utility.set_location(g_package||l_proc, 40);
1194: END IF;
1195: RETURN;
1196: ELSE
1197: --this is the first list and it is not empty

Line 1203: hr_utility.set_location(g_package||l_proc, 50);

1199: --go forward one more day after current period. This is to avoid
1200: --the senario:
1201:
1202: IF g_debug THEN
1203: hr_utility.set_location(g_package||l_proc, 50);
1204: END IF;
1205:
1206: IF l_temp_periods(l_temp_periods.last).start_date = p_current_date
1207: THEN

Line 1209: hr_utility.set_location(g_package||l_proc, 60);

1205:
1206: IF l_temp_periods(l_temp_periods.last).start_date = p_current_date
1207: THEN
1208: IF g_debug THEN
1209: hr_utility.set_location(g_package||l_proc, 60);
1210: END IF;
1211:
1212: l_current_date := l_temp_periods(l_temp_periods.last).end_date + 1;
1213: l_periods := l_temp_periods;

Line 1223: hr_utility.trace('start=' || to_char(l_temp_periods(l_temp_periods.last).start_date, 'YYYY/MM/DD'));

1219: ,p_periods => p_periods
1220: );
1221:
1222: IF g_debug THEN
1223: hr_utility.trace('start=' || to_char(l_temp_periods(l_temp_periods.last).start_date, 'YYYY/MM/DD'));
1224:
1225: hr_utility.set_location(g_package||l_proc, 70);
1226: END IF;
1227:

Line 1225: hr_utility.set_location(g_package||l_proc, 70);

1221:
1222: IF g_debug THEN
1223: hr_utility.trace('start=' || to_char(l_temp_periods(l_temp_periods.last).start_date, 'YYYY/MM/DD'));
1224:
1225: hr_utility.set_location(g_package||l_proc, 70);
1226: END IF;
1227:
1228: RETURN;
1229: END IF;

Line 1414: g_debug := hr_utility.debug_enabled;

1410: where hrp.recurring_period_id = p_recurring_period_id;
1411:
1412: BEGIN
1413:
1414: g_debug := hr_utility.debug_enabled;
1415:
1416: g_assignment_periods.delete;
1417:
1418: g_assignment_periods := get_assignment_periods(p_resource_id);

Line 1480: hr_utility.trace('l_period_type=' || g_period_type);

1476: CLOSE c_period_info;
1477:
1478:
1479: IF g_debug THEN
1480: hr_utility.trace('l_period_type=' || g_period_type);
1481: hr_utility.trace('l_duration_in_days=' || g_duration_in_days);
1482: hr_utility.trace('l_rec_period_start_date=' || g_rec_period_start_date);
1483: END IF;
1484:

Line 1481: hr_utility.trace('l_duration_in_days=' || g_duration_in_days);

1477:
1478:
1479: IF g_debug THEN
1480: hr_utility.trace('l_period_type=' || g_period_type);
1481: hr_utility.trace('l_duration_in_days=' || g_duration_in_days);
1482: hr_utility.trace('l_rec_period_start_date=' || g_rec_period_start_date);
1483: END IF;
1484:
1485: -- l_num_past_days :=

Line 1482: hr_utility.trace('l_rec_period_start_date=' || g_rec_period_start_date);

1478:
1479: IF g_debug THEN
1480: hr_utility.trace('l_period_type=' || g_period_type);
1481: hr_utility.trace('l_duration_in_days=' || g_duration_in_days);
1482: hr_utility.trace('l_rec_period_start_date=' || g_rec_period_start_date);
1483: END IF;
1484:
1485: -- l_num_past_days :=
1486: -- hxc_preference_evaluation.resource_preferences(

Line 1498: hr_utility.trace('l_num_past_days=' || l_num_past_days);

1494: -- 'TC_W_TCRD_ST_ALW_EDITS',
1495: -- 11);
1496:
1497: IF g_debug THEN
1498: hr_utility.trace('l_num_past_days=' || l_num_past_days);
1499: hr_utility.trace('l_num_future_days=' || l_num_future_days);
1500: END IF;
1501:
1502: IF l_num_past_days IS NOT NULL

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

1495: -- 11);
1496:
1497: IF g_debug THEN
1498: hr_utility.trace('l_num_past_days=' || l_num_past_days);
1499: hr_utility.trace('l_num_future_days=' || l_num_future_days);
1500: END IF;
1501:
1502: IF l_num_past_days IS NOT NULL
1503: THEN

Line 1518: hr_utility.trace(' l_past_date_limit =' || to_char(g_past_date_limit, 'YYYY/MM/DD'));

1514: END IF;
1515: g_initialized := 'Y';
1516:
1517: IF g_debug THEN
1518: hr_utility.trace(' l_past_date_limit =' || to_char(g_past_date_limit, 'YYYY/MM/DD'));
1519: hr_utility.trace(' l_future_date_limit=' ||to_char(g_future_date_limit, 'YYYY/MM/DD') );
1520: END IF;
1521:
1522: END init_globals;

Line 1519: hr_utility.trace(' l_future_date_limit=' ||to_char(g_future_date_limit, 'YYYY/MM/DD') );

1515: g_initialized := 'Y';
1516:
1517: IF g_debug THEN
1518: hr_utility.trace(' l_past_date_limit =' || to_char(g_past_date_limit, 'YYYY/MM/DD'));
1519: hr_utility.trace(' l_future_date_limit=' ||to_char(g_future_date_limit, 'YYYY/MM/DD') );
1520: END IF;
1521:
1522: END init_globals;
1523:

Line 1547: g_debug := hr_utility.debug_enabled;

1543: l_end_date DATE;
1544: l_resource_id NUMBER := TO_NUMBER(p_resource_id);
1545:
1546: BEGIN
1547: g_debug := hr_utility.debug_enabled;
1548:
1549: /*
1550: IF l_resource_id = 10251
1551: THEN

Line 1552: --hr_utility.trace_on(NULL, 'test');

1548:
1549: /*
1550: IF l_resource_id = 10251
1551: THEN
1552: --hr_utility.trace_on(NULL, 'test');
1553: END IF;
1554: */
1555: -- mstewart 5/20/2002
1556: -- temporary fix to resolve pl/sql caching issues. For now force

Line 1577: hr_utility.trace('start empty');

1573: IF p_first_empty_period = 'Y'
1574: THEN
1575:
1576: IF g_debug THEN
1577: hr_utility.trace('start empty');
1578: END IF;
1579:
1580: get_first_empty_period(
1581: p_resource_id => l_resource_id

Line 1588: hr_utility.trace('returned empty period=' || p_periods);

1584: ,p_show_existing_timecard => 'Y'
1585: ,p_periods => p_periods
1586: );
1587: IF g_debug THEN
1588: hr_utility.trace('returned empty period=' || p_periods);
1589: END IF;
1590: ELSE
1591: IF g_debug THEN
1592: hr_utility.trace('start getting list');

Line 1592: hr_utility.trace('start getting list');

1588: hr_utility.trace('returned empty period=' || p_periods);
1589: END IF;
1590: ELSE
1591: IF g_debug THEN
1592: hr_utility.trace('start getting list');
1593: END IF;
1594:
1595: get_period_list(
1596: p_resource_id => l_resource_id

Line 1604: hr_utility.trace('finished getting list');

1600: ,p_periods => p_periods
1601: );
1602:
1603: IF g_debug THEN
1604: hr_utility.trace('finished getting list');
1605: END IF;
1606: END IF;
1607:
1608:

Line 1657: g_debug := hr_utility.debug_enabled;

1653: l_end_date DATE;
1654: l_proc VARCHAR2(50);
1655: BEGIN
1656:
1657: g_debug := hr_utility.debug_enabled;
1658:
1659: IF g_debug THEN
1660: l_proc := 'get_current_period';
1661: hr_utility.set_location(g_package||l_proc, 10);

Line 1661: hr_utility.set_location(g_package||l_proc, 10);

1657: g_debug := hr_utility.debug_enabled;
1658:
1659: IF g_debug THEN
1660: l_proc := 'get_current_period';
1661: hr_utility.set_location(g_package||l_proc, 10);
1662: END IF;
1663:
1664: find_current_period(
1665: p_rec_period_start_date => fnd_date.canonical_to_date

Line 1675: hr_utility.set_location(g_package||l_proc, 20);

1671: ,p_period_end => l_end_date
1672: );
1673:
1674: IF g_debug THEN
1675: hr_utility.set_location(g_package||l_proc, 20);
1676: END IF;
1677:
1678: p_period := TO_CHAR(l_start_date, g_date_format)
1679: || g_separator

Line 1683: hr_utility.set_location(g_package||l_proc, 30);

1679: || g_separator
1680: || TO_CHAR(l_end_date, g_date_format);
1681:
1682: IF g_debug THEN
1683: hr_utility.set_location(g_package||l_proc, 30);
1684: END IF;
1685:
1686: END get_current_period;
1687: