DBA Data[Home] [Help]

APPS.PQP_SCHEDULE_CALCULATION_PKG dependencies on HR_UTILITY

Line 22: g_debug BOOLEAN := hr_utility.debug_enabled ;

18:
19: --g_wp_days t_wp_days_type;
20:
21: g_package_name VARCHAR2(31) := 'pqp_schedule_calculation_pkg.' ;
22: g_debug BOOLEAN := hr_utility.debug_enabled ;
23:
24:
25: -- cache for load_work_pattern_into_cache
26: g_last_business_group_id pay_user_tables.business_group_id%TYPE;

Line 292: hr_utility.trace('in get_day_dets:'||p_wp_dets.work_pattern);

288:
289: -- Get the legislation code for this business group,
290: -- if not already populated.
291:
292: hr_utility.trace('in get_day_dets:'||p_wp_dets.work_pattern);
293:
294: if g_legislation_code is NULL then
295: open c_get_legcode(p_wp_dets.business_group_id);
296: fetch c_get_legcode into g_legislation_code;

Line 303: hr_utility.trace('get_days_dets:l_days_in_wp:'||

299:
300: /* Get the number of days in the Work Pattern */
301: open c_get_days;
302: fetch c_get_days into l_days_in_wp;
303: hr_utility.trace('get_days_dets:l_days_in_wp:'||
304: fnd_number.number_to_canonical(l_days_in_wp));
305: close c_get_days;
306:
307: /* Find number of days to be added to effective date to get next date on 'Day

Line 309: --hr_utility.trace('get_days_dets:p_wp_dets.start_day:'||

305: close c_get_days;
306:
307: /* Find number of days to be added to effective date to get next date on 'Day
308: 01' */
309: --hr_utility.trace('get_days_dets:p_wp_dets.start_day:'||
310: --p_wp_dets.start_day);
311:
312: l_diff_days := l_days_in_wp - to_number(substr(p_wp_dets.start_day,5,2)) + 1;
313:

Line 314: --hr_utility.trace('get_days_dets:l_diff_days:'||

310: --p_wp_dets.start_day);
311:
312: l_diff_days := l_days_in_wp - to_number(substr(p_wp_dets.start_day,5,2)) + 1;
313:
314: --hr_utility.trace('get_days_dets:l_diff_days:'||
315: --fnd_number.number_to_canonical(l_diff_days));
316:
317:
318: /* Find the next date that would be 'Day 01' w.r.t. the p_wp_dets record */

Line 321: --hr_utility.trace('get_days_dets:l_dt_on_day1:'||

317:
318: /* Find the next date that would be 'Day 01' w.r.t. the p_wp_dets record */
319: l_dt_on_day1 := p_wp_dets.effective_start_date + l_diff_days;
320:
321: --hr_utility.trace('get_days_dets:l_dt_on_day1:'||
322: --fnd_date.date_to_canonical(l_dt_on_day1));
323:
324:
325: /* Find difference between calculation start_date and date on 'Day 01' */

Line 328: hr_utility.trace('get_days_dets:l_diff_temp:'||

324:
325: /* Find difference between calculation start_date and date on 'Day 01' */
326: l_diff_temp := p_calc_stdt - l_dt_on_day1;
327:
328: hr_utility.trace('get_days_dets:l_diff_temp:'||
329: fnd_number.number_to_canonical(l_diff_temp));
330:
331:
332: /* If difference is negative, multiply by -1 to make it positive */

Line 335: --hr_utility.trace('get_days_dets:l_diff_CalcStDt_DtOnDay1:'||

331:
332: /* If difference is negative, multiply by -1 to make it positive */
333: l_diff_CalcStDt_DtOnDay1 := l_diff_temp * sign(l_diff_temp);
334:
335: --hr_utility.trace('get_days_dets:l_diff_CalcStDt_DtOnDay1:'||
336: --fnd_number.number_to_canonical(l_diff_CalcStDt_DtOnDay1));
337:
338:
339: /* Calculate Day Number on Calculation Start Date */

Line 343: --hr_utility.trace('get_days_dets:l_day_no1:'||

339: /* Calculate Day Number on Calculation Start Date */
340: if l_diff_temp < 0
341: then
342: l_day_no := l_days_in_wp - l_diff_CalcStDt_DtOnDay1 + 1;
343: --hr_utility.trace('get_days_dets:l_day_no1:'||
344: --fnd_number.number_to_canonical(l_day_no));
345:
346: else
347: l_day_no := mod(l_diff_CalcStDt_DtOnDay1,l_days_in_wp) + 1;

Line 348: --hr_utility.trace('get_days_dets:l_day_no2:'||

344: --fnd_number.number_to_canonical(l_day_no));
345:
346: else
347: l_day_no := mod(l_diff_CalcStDt_DtOnDay1,l_days_in_wp) + 1;
348: --hr_utility.trace('get_days_dets:l_day_no2:'||
349: --fnd_number.number_to_canonical(l_day_no));
350: end if;
351:
352: /* Assign values to be returned */

Line 354: hr_utility.trace('get_days_dets:l_day_no:'||

350: end if;
351:
352: /* Assign values to be returned */
353:
354: hr_utility.trace('get_days_dets:l_day_no:'||
355: fnd_number.number_to_canonical(l_day_no));
356:
357: p_day_no := l_day_no;
358: p_days_in_wp := l_days_in_wp;

Line 364: hr_utility.trace('in get_day_dets: Exception block');

360: -- Added by tmehra for nocopy changes Feb'03
361:
362: EXCEPTION
363: WHEN OTHERS THEN
364: hr_utility.trace('in get_day_dets: Exception block');
365: p_day_no := NULL;
366: p_days_in_wp := NULL;
367: raise;
368:

Line 397: hr_utility.set_location('Entered calculate_time_worked', 10);

393:
394:
395: BEGIN /* calculate_time_worked */
396:
397: hr_utility.set_location('Entered calculate_time_worked', 10);
398: hr_utility.set_location('UDT Name :'||g_udt_name, 15);
399:
400: /* If start date is greater than end date then return zero hours */
401: if p_date_start > p_date_end

Line 398: hr_utility.set_location('UDT Name :'||g_udt_name, 15);

394:
395: BEGIN /* calculate_time_worked */
396:
397: hr_utility.set_location('Entered calculate_time_worked', 10);
398: hr_utility.set_location('UDT Name :'||g_udt_name, 15);
399:
400: /* If start date is greater than end date then return zero hours */
401: if p_date_start > p_date_end
402: then

Line 410: hr_utility.set_location('Inside Loop to get WP detail', 20);

406: for r_wp_dets in c_wp_dets(p_assignment_id, p_date_start, p_date_end)
407: loop /* Get Work Pattern Details */
408:
409:
410: hr_utility.set_location('Inside Loop to get WP detail', 20);
411:
412: /* Determine Calculation Start Date for this Work Pattern */
413: if p_date_start > r_wp_dets.effective_start_date
414: then

Line 443: hr_utility.set_location('l_curr_day_no :'||l_curr_day_no, 30);

439:
440: l_curr_day_no := l_day_no;
441: l_curr_date := l_calc_stdt;
442:
443: hr_utility.set_location('l_curr_day_no :'||l_curr_day_no, 30);
444: hr_utility.set_location('l_curr_date :'||l_curr_date, 35);
445: hr_utility.set_location('Work Pattern :'||r_wp_dets.work_pattern, 40);
446:
447: for l_loopindx in 1..(l_calc_endt - l_calc_stdt + 1)

Line 444: hr_utility.set_location('l_curr_date :'||l_curr_date, 35);

440: l_curr_day_no := l_day_no;
441: l_curr_date := l_calc_stdt;
442:
443: hr_utility.set_location('l_curr_day_no :'||l_curr_day_no, 30);
444: hr_utility.set_location('l_curr_date :'||l_curr_date, 35);
445: hr_utility.set_location('Work Pattern :'||r_wp_dets.work_pattern, 40);
446:
447: for l_loopindx in 1..(l_calc_endt - l_calc_stdt + 1)
448: loop /* Process dates in range */

Line 445: hr_utility.set_location('Work Pattern :'||r_wp_dets.work_pattern, 40);

441: l_curr_date := l_calc_stdt;
442:
443: hr_utility.set_location('l_curr_day_no :'||l_curr_day_no, 30);
444: hr_utility.set_location('l_curr_date :'||l_curr_date, 35);
445: hr_utility.set_location('Work Pattern :'||r_wp_dets.work_pattern, 40);
446:
447: for l_loopindx in 1..(l_calc_endt - l_calc_stdt + 1)
448: loop /* Process dates in range */
449:

Line 472: hr_utility.set_location('Hours on '||l_day||' = '||l_hours, 50);

468: l_hours := 0;
469:
470: end;
471:
472: hr_utility.set_location('Hours on '||l_day||' = '||l_hours, 50);
473:
474: l_total_hours := l_total_hours + l_hours;
475:
476: -- add this date to the number of days in the date range.

Line 480: hr_utility.set_location('Adding day for date :'||to_char(l_curr_date,

476: -- add this date to the number of days in the date range.
477: if l_hours > 0 then
478:
479: g_days_worked := g_days_worked + 1;
480: hr_utility.set_location('Adding day for date :'||to_char(l_curr_date,
481: 'DD/MM/YYYY'), 60);
482:
483: end if;
484:

Line 532: hr_utility.set_location('Entered calculate_time_worked_wp', 10);

528: l_working_dates t_working_dates;
529:
530: BEGIN -- calculate_time_worked_wp
531:
532: hr_utility.set_location('Entered calculate_time_worked_wp', 10);
533:
534: r_wp_dets := p_wp_dets;
535: l_working_dates := p_working_dates;
536:

Line 566: hr_utility.set_location('l_curr_day_no :'||l_curr_day_no, 20);

562:
563: l_curr_day_no := l_day_no;
564: l_curr_date := l_calc_stdt;
565:
566: hr_utility.set_location('l_curr_day_no :'||l_curr_day_no, 20);
567: hr_utility.set_location('l_curr_date :'||l_curr_date, 30);
568: hr_utility.set_location('Work Pattern :'||r_wp_dets.work_pattern, 40);
569:
570: for l_loopindx in 1..(l_calc_endt - l_calc_stdt + 1)

Line 567: hr_utility.set_location('l_curr_date :'||l_curr_date, 30);

563: l_curr_day_no := l_day_no;
564: l_curr_date := l_calc_stdt;
565:
566: hr_utility.set_location('l_curr_day_no :'||l_curr_day_no, 20);
567: hr_utility.set_location('l_curr_date :'||l_curr_date, 30);
568: hr_utility.set_location('Work Pattern :'||r_wp_dets.work_pattern, 40);
569:
570: for l_loopindx in 1..(l_calc_endt - l_calc_stdt + 1)
571: loop /* Process dates in range */

Line 568: hr_utility.set_location('Work Pattern :'||r_wp_dets.work_pattern, 40);

564: l_curr_date := l_calc_stdt;
565:
566: hr_utility.set_location('l_curr_day_no :'||l_curr_day_no, 20);
567: hr_utility.set_location('l_curr_date :'||l_curr_date, 30);
568: hr_utility.set_location('Work Pattern :'||r_wp_dets.work_pattern, 40);
569:
570: for l_loopindx in 1..(l_calc_endt - l_calc_stdt + 1)
571: loop /* Process dates in range */
572:

Line 573: hr_utility.set_location('Processing date :'||to_char(l_curr_date,

569:
570: for l_loopindx in 1..(l_calc_endt - l_calc_stdt + 1)
571: loop /* Process dates in range */
572:
573: hr_utility.set_location('Processing date :'||to_char(l_curr_date,
574: 'DD/MM/YYYY'), 60);
575:
576: l_day := 'Day '||lpad(l_curr_day_no,2,0);
577:

Line 595: hr_utility.set_location('Hours on '||l_day||' = '||l_hours, 70);

591: */
592: l_hours := 0;
593: end;
594:
595: hr_utility.set_location('Hours on '||l_day||' = '||l_hours, 70);
596:
597: l_total_hours := l_total_hours + l_hours;
598:
599: -- add this date to the number of days in the date range.

Line 622: hr_utility.set_location('Leaving calculate_time_worked_wp', 100);

618: p_hours_worked := l_total_hours;
619: p_days_worked := l_days_worked;
620: -- p_working_dates := l_working_dates;
621:
622: hr_utility.set_location('Leaving calculate_time_worked_wp', 100);
623: RETURN;
624:
625: -- Added by tmehra for nocopy changes Feb'03
626:

Line 629: hr_utility.set_location('Entering excep:', 110);

625: -- Added by tmehra for nocopy changes Feb'03
626:
627: EXCEPTION
628: WHEN OTHERS THEN
629: hr_utility.set_location('Entering excep:', 110);
630: p_hours_worked := NULL;
631: p_days_worked := NULL;
632: p_working_dates := l_working_dates;
633: raise;

Line 688: hr_utility.set_location('Entered get_time_worked', 10);

684: l_working_dates_nc t_working_dates;
685:
686: BEGIN /* get_time_worked */
687:
688: hr_utility.set_location('Entered get_time_worked', 10);
689: hr_utility.set_location('UDT Name :'||g_udt_name, 20);
690: hr_utility.trace('get_time_worked:p_override_wp:'||p_override_wp);
691:
692: -- nocopy changes tmehra

Line 689: hr_utility.set_location('UDT Name :'||g_udt_name, 20);

685:
686: BEGIN /* get_time_worked */
687:
688: hr_utility.set_location('Entered get_time_worked', 10);
689: hr_utility.set_location('UDT Name :'||g_udt_name, 20);
690: hr_utility.trace('get_time_worked:p_override_wp:'||p_override_wp);
691:
692: -- nocopy changes tmehra
693: l_working_dates_nc := p_working_dates;

Line 690: hr_utility.trace('get_time_worked:p_override_wp:'||p_override_wp);

686: BEGIN /* get_time_worked */
687:
688: hr_utility.set_location('Entered get_time_worked', 10);
689: hr_utility.set_location('UDT Name :'||g_udt_name, 20);
690: hr_utility.trace('get_time_worked:p_override_wp:'||p_override_wp);
691:
692: -- nocopy changes tmehra
693: l_working_dates_nc := p_working_dates;
694:

Line 706: hr_utility.trace('p_is_assignment_wp FALSE:'||p_override_wp);

702: -- If an override work pattern is supplied then no matter
703: -- whether the person had a work pattern or work pattern changes
704: -- or regardless of what the default work pattern is always use the
705: -- override the same
706: hr_utility.trace('p_is_assignment_wp FALSE:'||p_override_wp);
707: r_def_wp_dets := NULL;
708: r_def_wp_dets.effective_start_date := p_date_start;
709: r_def_wp_dets.effective_end_date := p_date_end;
710: r_def_wp_dets.business_group_id := p_business_group_id;

Line 716: hr_utility.trace('r_def_wp_dets.work_pattern:'||

712: r_def_wp_dets.work_pattern := p_default_wp;
713: ELSE
714: r_def_wp_dets.work_pattern := p_override_wp;
715: END IF;
716: hr_utility.trace('r_def_wp_dets.work_pattern:'||
717: r_def_wp_dets.work_pattern);
718:
719: r_def_wp_dets.start_day
720: := 'Day '||LPAD

Line 729: hr_utility.set_location('Start Day :'||r_def_wp_dets.start_day, 100);

725: )
726: )
727: ,2,'0');
728:
729: hr_utility.set_location('Start Day :'||r_def_wp_dets.start_day, 100);
730:
731: calculate_time_worked_wp
732: (p_date_start => p_date_start
733: ,p_date_end => p_date_end

Line 757: hr_utility.set_location('Asg WP Found', 30);

753: IF r_wp_dets.work_pattern IS NOT NULL THEN
754:
755: l_calc_stdt := l_curr_date;
756:
757: hr_utility.set_location('Asg WP Found', 30);
758: l_asg_wp_found := TRUE;
759:
760: -- And Calc Start Date is between ESD and EED
761: IF l_calc_stdt BETWEEN r_wp_dets.effective_start_date

Line 765: hr_utility.set_location('Using only Asg WP', 40);

761: IF l_calc_stdt BETWEEN r_wp_dets.effective_start_date
762: AND r_wp_dets.effective_end_date THEN
763:
764: -- Use only the AAT work pattern
765: hr_utility.set_location('Using only Asg WP', 40);
766:
767: l_calc_endt := LEAST(p_date_end, r_wp_dets.effective_end_date);
768:
769: hr_utility.trace(fnd_date.date_to_canonical(l_calc_stdt));

Line 769: hr_utility.trace(fnd_date.date_to_canonical(l_calc_stdt));

765: hr_utility.set_location('Using only Asg WP', 40);
766:
767: l_calc_endt := LEAST(p_date_end, r_wp_dets.effective_end_date);
768:
769: hr_utility.trace(fnd_date.date_to_canonical(l_calc_stdt));
770: calculate_time_worked_wp
771: (p_date_start => l_calc_stdt
772: ,p_date_end => l_calc_endt
773: ,p_wp_dets => r_wp_dets

Line 786: hr_utility.set_location('Using default and Asg WP', 50);

782: ELSIF p_default_wp IS NOT NULL THEN
783: -- Use the default work pattern for the period where there is no
784: -- work pattern on assignment and then use the asg work pattern
785:
786: hr_utility.set_location('Using default and Asg WP', 50);
787:
788: -- Step 1) Get working hours and days for the default work pattern
789: l_calc_endt := LEAST(p_date_end, (r_wp_dets.effective_start_date - 1));
790:

Line 800: hr_utility.set_location('Start Day :'||r_def_wp_dets.start_day, 60);

796: r_def_wp_dets.start_day := 'Day '||LPAD(TO_CHAR(8 -
797: (NEXT_DAY(l_calc_stdt, g_default_start_day) -
798: l_calc_stdt)),2,'0');
799:
800: hr_utility.set_location('Start Day :'||r_def_wp_dets.start_day, 60);
801:
802: hr_utility.trace(fnd_date.date_to_canonical(l_calc_stdt));
803: calculate_time_worked_wp
804: (p_date_start => l_calc_stdt

Line 802: hr_utility.trace(fnd_date.date_to_canonical(l_calc_stdt));

798: l_calc_stdt)),2,'0');
799:
800: hr_utility.set_location('Start Day :'||r_def_wp_dets.start_day, 60);
801:
802: hr_utility.trace(fnd_date.date_to_canonical(l_calc_stdt));
803: calculate_time_worked_wp
804: (p_date_start => l_calc_stdt
805: ,p_date_end => l_calc_endt
806: ,p_wp_dets => r_def_wp_dets

Line 864: hr_utility.set_location('Default WP available', 70);

860: ) THEN
861:
862: IF p_default_wp IS NOT NULL THEN
863:
864: hr_utility.set_location('Default WP available', 70);
865:
866: -- Set the start and end dates
867: IF NOT l_asg_wp_found THEN
868: hr_utility.set_location('Asg WP was NOT Found', 80);

Line 868: hr_utility.set_location('Asg WP was NOT Found', 80);

864: hr_utility.set_location('Default WP available', 70);
865:
866: -- Set the start and end dates
867: IF NOT l_asg_wp_found THEN
868: hr_utility.set_location('Asg WP was NOT Found', 80);
869: l_calc_stdt := p_date_start;
870: ELSE
871: hr_utility.set_location('Asg WP history insufficient or incomplete',
872: 90);

Line 871: hr_utility.set_location('Asg WP history insufficient or incomplete',

867: IF NOT l_asg_wp_found THEN
868: hr_utility.set_location('Asg WP was NOT Found', 80);
869: l_calc_stdt := p_date_start;
870: ELSE
871: hr_utility.set_location('Asg WP history insufficient or incomplete',
872: 90);
873: l_calc_stdt := l_curr_date;
874: END IF;
875: --

Line 887: hr_utility.set_location('Start Day :'||r_def_wp_dets.start_day, 100);

883: r_def_wp_dets.start_day := 'Day '||LPAD(TO_CHAR(8 -
884: (NEXT_DAY(l_calc_stdt, g_default_start_day) -
885: l_calc_stdt)),2,'0');
886:
887: hr_utility.set_location('Start Day :'||r_def_wp_dets.start_day, 100);
888:
889: calculate_time_worked_wp
890: (p_date_start => l_calc_stdt
891: ,p_date_end => l_calc_endt

Line 912: hr_utility.trace('l_error_code:'||

908: END IF; -- IF p_override_wp IS NOT NULL THEN ... ELSE ...
909:
910: -- Check for errors
911:
912: hr_utility.trace('l_error_code:'||
913: fnd_number.number_to_canonical(l_error_code));
914: IF l_error_code <> 0 THEN
915: l_retval := 0;
916: ELSE -- No errors, assign the value

Line 918: hr_utility.trace('p_dimension:'||p_dimension);

914: IF l_error_code <> 0 THEN
915: l_retval := 0;
916: ELSE -- No errors, assign the value
917: -- Decide what to return
918: hr_utility.trace('p_dimension:'||p_dimension);
919:
920: IF p_dimension = 'DAYS' THEN
921: hr_utility.trace('l_total_days:'||
922: fnd_number.number_to_canonical(l_total_days));

Line 921: hr_utility.trace('l_total_days:'||

917: -- Decide what to return
918: hr_utility.trace('p_dimension:'||p_dimension);
919:
920: IF p_dimension = 'DAYS' THEN
921: hr_utility.trace('l_total_days:'||
922: fnd_number.number_to_canonical(l_total_days));
923: l_retval := l_total_days;
924: ELSIF p_dimension = 'HOURS' THEN
925: hr_utility.trace('l_total_hours:'||

Line 925: hr_utility.trace('l_total_hours:'||

921: hr_utility.trace('l_total_days:'||
922: fnd_number.number_to_canonical(l_total_days));
923: l_retval := l_total_days;
924: ELSIF p_dimension = 'HOURS' THEN
925: hr_utility.trace('l_total_hours:'||
926: fnd_number.number_to_canonical(l_total_hours));
927: l_retval := l_total_hours;
928: END IF;
929: --

Line 942: hr_utility.trace('get_time_worked:l_retval:'||

938: ,255 -- Bugfix 3405270
939: );
940: END IF;
941: --
942: hr_utility.trace('get_time_worked:l_retval:'||
943: fnd_number.number_to_canonical(l_retval));
944:
945: RETURN l_retval;
946:

Line 951: hr_utility.trace('Exception Block : When others');

947: -- Added by tmehra for nocopy changes Feb'03
948:
949: EXCEPTION
950: WHEN OTHERS THEN
951: hr_utility.trace('Exception Block : When others');
952: p_error_code := SQLCODE;
953: p_error_message := SQLERRM;
954: p_working_dates := l_working_dates_nc;
955: raise;

Line 979: hr_utility.trace('get_days_worked2:p_override_wp:'||p_override_wp);

975: l_working_dates_nc t_working_dates;
976:
977: BEGIN
978:
979: hr_utility.trace('get_days_worked2:p_override_wp:'||p_override_wp);
980:
981: -- nocopy changes tmehra
982: l_working_dates_nc := p_working_dates;
983:

Line 1011: hr_utility.trace('Exception Block : When others');

1007: -- Added by tmehra for nocopy changes Feb'03
1008:
1009: EXCEPTION
1010: WHEN OTHERS THEN
1011: hr_utility.trace('Exception Block : When others');
1012: p_error_code := SQLCODE;
1013: p_error_message := SQLERRM;
1014: p_working_dates := l_working_dates_nc;
1015: raise;

Line 1037: hr_utility.trace('get_days_worked1:p_override_wp:'||p_override_wp);

1033: l_working_dates t_working_dates;
1034:
1035: BEGIN
1036:
1037: hr_utility.trace('get_days_worked1:p_override_wp:'||p_override_wp);
1038:
1039: l_days_worked := get_days_worked
1040: (p_assignment_id => p_assignment_id
1041: ,p_business_group_id => p_business_group_id

Line 1057: hr_utility.trace('Exception Block : When others');

1053: -- Added by tmehra for nocopy changes Feb'03
1054:
1055: EXCEPTION
1056: WHEN OTHERS THEN
1057: hr_utility.trace('Exception Block : When others');
1058: p_error_code := SQLCODE;
1059: p_error_message := SQLERRM;
1060: raise;
1061:

Line 1108: hr_utility.trace('Exception Block : When others');

1104: -- Added by tmehra for nocopy changes Feb'03
1105:
1106: EXCEPTION
1107: WHEN OTHERS THEN
1108: hr_utility.trace('Exception Block : When others');
1109: p_error_code := SQLCODE;
1110: p_error_message := SQLERRM;
1111: raise;
1112:

Line 1132: hr_utility.trace('Entered Is Working Day?'||

1128: l_working_dates t_working_dates;
1129:
1130: BEGIN /*is_working_day*/
1131:
1132: hr_utility.trace('Entered Is Working Day?'||
1133: fnd_date.date_to_canonical(p_date));
1134: hr_utility.trace('p_assignment_id:'||
1135: fnd_number.number_to_canonical(p_assignment_id));
1136: hr_utility.trace('p_override_wp:'||p_override_wp);

Line 1134: hr_utility.trace('p_assignment_id:'||

1130: BEGIN /*is_working_day*/
1131:
1132: hr_utility.trace('Entered Is Working Day?'||
1133: fnd_date.date_to_canonical(p_date));
1134: hr_utility.trace('p_assignment_id:'||
1135: fnd_number.number_to_canonical(p_assignment_id));
1136: hr_utility.trace('p_override_wp:'||p_override_wp);
1137:
1138: l_days_worked := get_days_worked

Line 1136: hr_utility.trace('p_override_wp:'||p_override_wp);

1132: hr_utility.trace('Entered Is Working Day?'||
1133: fnd_date.date_to_canonical(p_date));
1134: hr_utility.trace('p_assignment_id:'||
1135: fnd_number.number_to_canonical(p_assignment_id));
1136: hr_utility.trace('p_override_wp:'||p_override_wp);
1137:
1138: l_days_worked := get_days_worked
1139: (p_assignment_id => p_assignment_id
1140: ,p_business_group_id => p_business_group_id

Line 1154: hr_utility.trace('p_assignment_id:'||

1150: IF l_days_worked = 1 AND p_error_code = 0 THEN
1151: l_is_working_day := 'Y';
1152: END IF;
1153:
1154: hr_utility.trace('p_assignment_id:'||
1155: fnd_number.number_to_canonical(p_assignment_id));
1156: hr_utility.trace('Leaving Is Working Day?'||
1157: fnd_date.date_to_canonical(p_date));
1158:

Line 1156: hr_utility.trace('Leaving Is Working Day?'||

1152: END IF;
1153:
1154: hr_utility.trace('p_assignment_id:'||
1155: fnd_number.number_to_canonical(p_assignment_id));
1156: hr_utility.trace('Leaving Is Working Day?'||
1157: fnd_date.date_to_canonical(p_date));
1158:
1159:
1160:

Line 1167: hr_utility.trace('Exception Block : When others');

1163: -- Added by tmehra for nocopy changes Feb'03
1164:
1165: EXCEPTION
1166: WHEN OTHERS THEN
1167: hr_utility.trace('Exception Block : When others');
1168: p_error_code := SQLCODE;
1169: p_error_message := SQLERRM;
1170: raise;
1171:

Line 1199: hr_utility.set_location('Entered get_next_working_date_WP', 10);

1195:
1196:
1197: BEGIN -- add_working_days_wp
1198:
1199: hr_utility.set_location('Entered get_next_working_date_WP', 10);
1200:
1201: -- nocopy changes tmehra
1202: l_curr_date_nc := p_curr_date;
1203: l_balance_days_nc := p_balance_days;

Line 1228: hr_utility.set_location('l_curr_day_no :'||l_curr_day_no, 20);

1224: );
1225:
1226: l_curr_day_no := l_day_no;
1227:
1228: hr_utility.set_location('l_curr_day_no :'||l_curr_day_no, 20);
1229: hr_utility.set_location('p_curr_date :'||p_curr_date, 30);
1230: hr_utility.set_location('Work Pattern :'||p_wp_dets.work_pattern, 40);
1231:
1232: -- Loop throug the dates starting from p_curr_date

Line 1229: hr_utility.set_location('p_curr_date :'||p_curr_date, 30);

1225:
1226: l_curr_day_no := l_day_no;
1227:
1228: hr_utility.set_location('l_curr_day_no :'||l_curr_day_no, 20);
1229: hr_utility.set_location('p_curr_date :'||p_curr_date, 30);
1230: hr_utility.set_location('Work Pattern :'||p_wp_dets.work_pattern, 40);
1231:
1232: -- Loop throug the dates starting from p_curr_date
1233: -- PS : we don't know till when to loop, so p_balance_days

Line 1230: hr_utility.set_location('Work Pattern :'||p_wp_dets.work_pattern, 40);

1226: l_curr_day_no := l_day_no;
1227:
1228: hr_utility.set_location('l_curr_day_no :'||l_curr_day_no, 20);
1229: hr_utility.set_location('p_curr_date :'||p_curr_date, 30);
1230: hr_utility.set_location('Work Pattern :'||p_wp_dets.work_pattern, 40);
1231:
1232: -- Loop throug the dates starting from p_curr_date
1233: -- PS : we don't know till when to loop, so p_balance_days
1234: -- will be used as a balance counter

Line 1239: hr_utility.set_location('Processing date :'||to_char(p_curr_date,

1235: loop -- Through dates starting with p_curr_date
1236:
1237: l_day := 'Day '||lpad(l_curr_day_no,2,0);
1238:
1239: hr_utility.set_location('Processing date :'||to_char(p_curr_date,
1240: 'DD/MM/YYYY'), 60);
1241:
1242: begin
1243: l_hours := hruserdt.get_table_value

Line 1259: hr_utility.set_location('Hours on '||l_day||' = '||l_hours, 70);

1255: */
1256: l_hours := 0;
1257: end;
1258:
1259: hr_utility.set_location('Hours on '||l_day||' = '||l_hours, 70);
1260:
1261: -- Decrement working days balance if l_curr_day_no
1262: -- is a working day
1263: if l_hours > 0 then

Line 1294: hr_utility.set_location('Leaving get_next_working_date_wp', 100);

1290: end if;
1291:
1292: end loop; -- Through dates starting with p_curr_date
1293:
1294: hr_utility.set_location('Leaving get_next_working_date_wp', 100);
1295: RETURN;
1296:
1297: -- Added by tmehra for nocopy changes Feb'03
1298:

Line 1301: hr_utility.set_location('Exception Block : When others',110);

1297: -- Added by tmehra for nocopy changes Feb'03
1298:
1299: EXCEPTION
1300: WHEN OTHERS THEN
1301: hr_utility.set_location('Exception Block : When others',110);
1302: p_curr_date := l_curr_date_nc;
1303: p_balance_days := l_balance_days_nc;
1304: raise;
1305:

Line 1340: hr_utility.set_location('Entered add_working_days', 10);

1336: r_def_wp_dets c_wp_dets%ROWTYPE;
1337:
1338: BEGIN /*add_working_days*/
1339:
1340: hr_utility.set_location('Entered add_working_days', 10);
1341: hr_utility.set_location('UDT Name :'||g_udt_name, 20);
1342:
1343: -- Add 1 to working days and assign to balance days
1344: -- We need to this as we want to return the date

Line 1341: hr_utility.set_location('UDT Name :'||g_udt_name, 20);

1337:
1338: BEGIN /*add_working_days*/
1339:
1340: hr_utility.set_location('Entered add_working_days', 10);
1341: hr_utility.set_location('UDT Name :'||g_udt_name, 20);
1342:
1343: -- Add 1 to working days and assign to balance days
1344: -- We need to this as we want to return the date
1345: -- prior to the NEXT working day after p_days working days

Line 1357: hr_utility.set_location('Asg WP Found', 30);

1353:
1354: -- Only if this aat record contains a work pattern
1355: if r_wp_dets.work_pattern is not null then
1356:
1357: hr_utility.set_location('Asg WP Found', 30);
1358: l_asg_wp_found := TRUE;
1359:
1360: if l_curr_date between r_wp_dets.effective_start_date
1361: and r_wp_dets.effective_end_date then

Line 1373: hr_utility.set_location('Using default and Asg WP', 50);

1369: elsif p_default_wp IS NOT NULL then
1370: -- Use the default work pattern for the period where there is no
1371: -- work pattern on assignment and then use the asg work pattern
1372:
1373: hr_utility.set_location('Using default and Asg WP', 50);
1374:
1375: -- Step 1) Add days for the default work pattern
1376: r_def_wp_dets := NULL;
1377: r_def_wp_dets.effective_start_date := l_curr_date;

Line 1387: hr_utility.set_location('Start Day :'||r_def_wp_dets.start_day, 50);

1383: r_def_wp_dets.start_day := 'Day '||LPAD(TO_CHAR(8 -
1384: (NEXT_DAY(l_curr_date, g_default_start_day) -
1385: l_curr_date)),2,'0');
1386:
1387: hr_utility.set_location('Start Day :'||r_def_wp_dets.start_day, 50);
1388:
1389: add_working_days_wp
1390: (p_wp_dets => r_def_wp_dets
1391: ,p_curr_date => l_curr_date -- IN OUT

Line 1430: hr_utility.set_location('Asg WP NOT Found, default WP available', 40);

1426: ) then
1427:
1428: if p_default_wp IS NOT NULL then
1429:
1430: hr_utility.set_location('Asg WP NOT Found, default WP available', 40);
1431:
1432: r_def_wp_dets := NULL;
1433: r_def_wp_dets.effective_start_date := l_curr_date;
1434: r_def_wp_dets.effective_end_date := hr_api.g_eot; -- End of Time

Line 1441: hr_utility.set_location('Start Day :'||r_def_wp_dets.start_day, 50);

1437: r_def_wp_dets.start_day := 'Day '||LPAD(TO_CHAR(8 -
1438: (NEXT_DAY(l_curr_date, g_default_start_day) -
1439: l_curr_date)),2,'0');
1440:
1441: hr_utility.set_location('Start Day :'||r_def_wp_dets.start_day, 50);
1442:
1443: add_working_days_wp
1444: (p_wp_dets => r_def_wp_dets
1445: ,p_curr_date => l_curr_date -- IN OUT

Line 1482: hr_utility.trace('Exception Block : When others');

1478: -- Added by tmehra for nocopy changes Feb'03
1479:
1480: EXCEPTION
1481: WHEN OTHERS THEN
1482: hr_utility.trace('Exception Block : When others');
1483: p_error_code := SQLCODE;
1484: p_error_message := SQLERRM;
1485: raise;
1486:

Line 1660: IF SQLCODE <> hr_utility.HR_ERROR_NUMBER THEN

1656: RETURN l_value ; -- l_count ;
1657:
1658: EXCEPTION
1659: WHEN OTHERS THEN
1660: IF SQLCODE <> hr_utility.HR_ERROR_NUMBER THEN
1661: pqp_utilities.debug_others
1662: (l_proc_name
1663: ,l_proc_step
1664: );

Line 1695: g_debug := hr_utility.debug_enabled;

1691: l_proc_name VARCHAR2(61):= g_package_name||'get_day_index_for_date';
1692:
1693: BEGIN
1694:
1695: g_debug := hr_utility.debug_enabled;
1696: IF g_debug THEN
1697: debug_enter(l_proc_name);
1698: END IF;
1699:

Line 1751: IF SQLCODE <> hr_utility.HR_ERROR_NUMBER THEN

1747:
1748: EXCEPTION
1749: WHEN OTHERS THEN
1750: clear_cache;
1751: IF SQLCODE <> hr_utility.HR_ERROR_NUMBER THEN
1752: debug_others(l_proc_name,l_proc_step);
1753: IF g_debug THEN
1754: debug('Leaving: '||l_proc_name,-999);
1755: END IF;

Line 1866: g_debug := hr_utility.debug_enabled;

1862: --*/
1863:
1864: --1. Determine the required working pattern, ie assignment, default or override
1865:
1866: g_debug := hr_utility.debug_enabled;
1867: IF g_debug THEN
1868: debug_enter(l_proc_name);
1869: END IF;
1870:

Line 2191: IF SQLCODE <> hr_utility.HR_ERROR_NUMBER THEN

2187:
2188: EXCEPTION
2189: WHEN OTHERS THEN
2190: clear_cache;
2191: IF SQLCODE <> hr_utility.HR_ERROR_NUMBER THEN
2192: debug_others(l_proc_name,l_proc_step);
2193: IF g_debug THEN
2194: debug('Leaving: '||l_proc_name,-999);
2195: END IF;

Line 2239: g_debug := hr_utility.debug_enabled;

2235: --9. part p_days is rounded down...ie adding 0.5 returns the same date as adding 1
2236: --10. special check for p_days
2237: */
2238:
2239: g_debug := hr_utility.debug_enabled;
2240: IF g_debug THEN
2241: debug_enter(l_proc_name);
2242: END IF;
2243:

Line 2336: IF SQLCODE <> hr_utility.HR_ERROR_NUMBER THEN

2332:
2333: EXCEPTION
2334: WHEN OTHERS THEN
2335: clear_cache;
2336: IF SQLCODE <> hr_utility.HR_ERROR_NUMBER THEN
2337: debug_others(l_proc_name,l_proc_step);
2338: IF g_debug THEN
2339: debug('Leaving: '||l_proc_name,-999);
2340: END IF;