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 1113: hr_utility.trace('Exception Block : When others');

1109: -- Added by tmehra for nocopy changes Feb'03
1110:
1111: EXCEPTION
1112: WHEN OTHERS THEN
1113: hr_utility.trace('Exception Block : When others');
1114: p_error_code := SQLCODE;
1115: p_error_message := SQLERRM;
1116: raise;
1117:

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

1134: l_working_dates t_working_dates;
1135:
1136: BEGIN /*is_working_day*/
1137:
1138: hr_utility.trace('Entered Is Working Day?'||
1139: fnd_date.date_to_canonical(p_date));
1140: hr_utility.trace('p_assignment_id:'||
1141: fnd_number.number_to_canonical(p_assignment_id));
1142: hr_utility.trace('p_override_wp:'||p_override_wp);

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

1136: BEGIN /*is_working_day*/
1137:
1138: hr_utility.trace('Entered Is Working Day?'||
1139: fnd_date.date_to_canonical(p_date));
1140: hr_utility.trace('p_assignment_id:'||
1141: fnd_number.number_to_canonical(p_assignment_id));
1142: hr_utility.trace('p_override_wp:'||p_override_wp);
1143:
1144: l_days_worked := get_days_worked

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

1138: hr_utility.trace('Entered Is Working Day?'||
1139: fnd_date.date_to_canonical(p_date));
1140: hr_utility.trace('p_assignment_id:'||
1141: fnd_number.number_to_canonical(p_assignment_id));
1142: hr_utility.trace('p_override_wp:'||p_override_wp);
1143:
1144: l_days_worked := get_days_worked
1145: (p_assignment_id => p_assignment_id
1146: ,p_business_group_id => p_business_group_id

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

1156: IF l_days_worked = 1 AND p_error_code = 0 THEN
1157: l_is_working_day := 'Y';
1158: END IF;
1159:
1160: hr_utility.trace('p_assignment_id:'||
1161: fnd_number.number_to_canonical(p_assignment_id));
1162: hr_utility.trace('Leaving Is Working Day?'||
1163: fnd_date.date_to_canonical(p_date));
1164:

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

1158: END IF;
1159:
1160: hr_utility.trace('p_assignment_id:'||
1161: fnd_number.number_to_canonical(p_assignment_id));
1162: hr_utility.trace('Leaving Is Working Day?'||
1163: fnd_date.date_to_canonical(p_date));
1164:
1165:
1166:

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

1169: -- Added by tmehra for nocopy changes Feb'03
1170:
1171: EXCEPTION
1172: WHEN OTHERS THEN
1173: hr_utility.trace('Exception Block : When others');
1174: p_error_code := SQLCODE;
1175: p_error_message := SQLERRM;
1176: raise;
1177:

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

1201:
1202:
1203: BEGIN -- add_working_days_wp
1204:
1205: hr_utility.set_location('Entered get_next_working_date_WP', 10);
1206:
1207: -- nocopy changes tmehra
1208: l_curr_date_nc := p_curr_date;
1209: l_balance_days_nc := p_balance_days;

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

1230: );
1231:
1232: l_curr_day_no := l_day_no;
1233:
1234: hr_utility.set_location('l_curr_day_no :'||l_curr_day_no, 20);
1235: hr_utility.set_location('p_curr_date :'||p_curr_date, 30);
1236: hr_utility.set_location('Work Pattern :'||p_wp_dets.work_pattern, 40);
1237:
1238: -- Loop throug the dates starting from p_curr_date

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

1231:
1232: l_curr_day_no := l_day_no;
1233:
1234: hr_utility.set_location('l_curr_day_no :'||l_curr_day_no, 20);
1235: hr_utility.set_location('p_curr_date :'||p_curr_date, 30);
1236: hr_utility.set_location('Work Pattern :'||p_wp_dets.work_pattern, 40);
1237:
1238: -- Loop throug the dates starting from p_curr_date
1239: -- PS : we don't know till when to loop, so p_balance_days

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

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

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

1241: loop -- Through dates starting with p_curr_date
1242:
1243: l_day := 'Day '||lpad(l_curr_day_no,2,0);
1244:
1245: hr_utility.set_location('Processing date :'||to_char(p_curr_date,
1246: 'DD/MM/YYYY'), 60);
1247:
1248: begin
1249: l_hours := hruserdt.get_table_value

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

1261: */
1262: l_hours := 0;
1263: end;
1264:
1265: hr_utility.set_location('Hours on '||l_day||' = '||l_hours, 70);
1266:
1267: -- Decrement working days balance if l_curr_day_no
1268: -- is a working day
1269: if l_hours > 0 then

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

1296: end if;
1297:
1298: end loop; -- Through dates starting with p_curr_date
1299:
1300: hr_utility.set_location('Leaving get_next_working_date_wp', 100);
1301: RETURN;
1302:
1303: -- Added by tmehra for nocopy changes Feb'03
1304:

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

1303: -- Added by tmehra for nocopy changes Feb'03
1304:
1305: EXCEPTION
1306: WHEN OTHERS THEN
1307: hr_utility.set_location('Exception Block : When others',110);
1308: p_curr_date := l_curr_date_nc;
1309: p_balance_days := l_balance_days_nc;
1310: raise;
1311:

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

1342: r_def_wp_dets c_wp_dets%ROWTYPE;
1343:
1344: BEGIN /*add_working_days*/
1345:
1346: hr_utility.set_location('Entered add_working_days', 10);
1347: hr_utility.set_location('UDT Name :'||g_udt_name, 20);
1348:
1349: -- Add 1 to working days and assign to balance days
1350: -- We need to this as we want to return the date

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

1343:
1344: BEGIN /*add_working_days*/
1345:
1346: hr_utility.set_location('Entered add_working_days', 10);
1347: hr_utility.set_location('UDT Name :'||g_udt_name, 20);
1348:
1349: -- Add 1 to working days and assign to balance days
1350: -- We need to this as we want to return the date
1351: -- prior to the NEXT working day after p_days working days

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

1359:
1360: -- Only if this aat record contains a work pattern
1361: if r_wp_dets.work_pattern is not null then
1362:
1363: hr_utility.set_location('Asg WP Found', 30);
1364: l_asg_wp_found := TRUE;
1365:
1366: if l_curr_date between r_wp_dets.effective_start_date
1367: and r_wp_dets.effective_end_date then

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

1375: elsif p_default_wp IS NOT NULL then
1376: -- Use the default work pattern for the period where there is no
1377: -- work pattern on assignment and then use the asg work pattern
1378:
1379: hr_utility.set_location('Using default and Asg WP', 50);
1380:
1381: -- Step 1) Add days for the default work pattern
1382: r_def_wp_dets := NULL;
1383: r_def_wp_dets.effective_start_date := l_curr_date;

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

1389: r_def_wp_dets.start_day := 'Day '||LPAD(TO_CHAR(8 -
1390: (NEXT_DAY(l_curr_date, g_default_start_day) -
1391: l_curr_date)),2,'0');
1392:
1393: hr_utility.set_location('Start Day :'||r_def_wp_dets.start_day, 50);
1394:
1395: add_working_days_wp
1396: (p_wp_dets => r_def_wp_dets
1397: ,p_curr_date => l_curr_date -- IN OUT

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

1432: ) then
1433:
1434: if p_default_wp IS NOT NULL then
1435:
1436: hr_utility.set_location('Asg WP NOT Found, default WP available', 40);
1437:
1438: r_def_wp_dets := NULL;
1439: r_def_wp_dets.effective_start_date := l_curr_date;
1440: r_def_wp_dets.effective_end_date := hr_api.g_eot; -- End of Time

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

1443: r_def_wp_dets.start_day := 'Day '||LPAD(TO_CHAR(8 -
1444: (NEXT_DAY(l_curr_date, g_default_start_day) -
1445: l_curr_date)),2,'0');
1446:
1447: hr_utility.set_location('Start Day :'||r_def_wp_dets.start_day, 50);
1448:
1449: add_working_days_wp
1450: (p_wp_dets => r_def_wp_dets
1451: ,p_curr_date => l_curr_date -- IN OUT

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

1484: -- Added by tmehra for nocopy changes Feb'03
1485:
1486: EXCEPTION
1487: WHEN OTHERS THEN
1488: hr_utility.trace('Exception Block : When others');
1489: p_error_code := SQLCODE;
1490: p_error_message := SQLERRM;
1491: raise;
1492:

Line 1666: IF SQLCODE <> hr_utility.HR_ERROR_NUMBER THEN

1662: RETURN l_value ; -- l_count ;
1663:
1664: EXCEPTION
1665: WHEN OTHERS THEN
1666: IF SQLCODE <> hr_utility.HR_ERROR_NUMBER THEN
1667: pqp_utilities.debug_others
1668: (l_proc_name
1669: ,l_proc_step
1670: );

Line 1701: g_debug := hr_utility.debug_enabled;

1697: l_proc_name VARCHAR2(61):= g_package_name||'get_day_index_for_date';
1698:
1699: BEGIN
1700:
1701: g_debug := hr_utility.debug_enabled;
1702: IF g_debug THEN
1703: debug_enter(l_proc_name);
1704: END IF;
1705:

Line 1757: IF SQLCODE <> hr_utility.HR_ERROR_NUMBER THEN

1753:
1754: EXCEPTION
1755: WHEN OTHERS THEN
1756: clear_cache;
1757: IF SQLCODE <> hr_utility.HR_ERROR_NUMBER THEN
1758: debug_others(l_proc_name,l_proc_step);
1759: IF g_debug THEN
1760: debug('Leaving: '||l_proc_name,-999);
1761: END IF;

Line 1875: g_debug := hr_utility.debug_enabled;

1871: --*/
1872:
1873: --1. Determine the required working pattern, ie assignment, default or override
1874:
1875: g_debug := hr_utility.debug_enabled;
1876: IF g_debug THEN
1877: debug_enter(l_proc_name);
1878: END IF;
1879:

Line 2203: IF SQLCODE <> hr_utility.HR_ERROR_NUMBER THEN

2199:
2200: EXCEPTION
2201: WHEN OTHERS THEN
2202: clear_cache;
2203: IF SQLCODE <> hr_utility.HR_ERROR_NUMBER THEN
2204: debug_others(l_proc_name,l_proc_step);
2205: IF g_debug THEN
2206: debug('Leaving: '||l_proc_name,-999);
2207: END IF;

Line 2251: g_debug := hr_utility.debug_enabled;

2247: --9. part p_days is rounded down...ie adding 0.5 returns the same date as adding 1
2248: --10. special check for p_days
2249: */
2250:
2251: g_debug := hr_utility.debug_enabled;
2252: IF g_debug THEN
2253: debug_enter(l_proc_name);
2254: END IF;
2255:

Line 2348: IF SQLCODE <> hr_utility.HR_ERROR_NUMBER THEN

2344:
2345: EXCEPTION
2346: WHEN OTHERS THEN
2347: clear_cache;
2348: IF SQLCODE <> hr_utility.HR_ERROR_NUMBER THEN
2349: debug_others(l_proc_name,l_proc_step);
2350: IF g_debug THEN
2351: debug('Leaving: '||l_proc_name,-999);
2352: END IF;